function np(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const a=Object.getOwnPropertyDescriptor(r,l);a&&Object.defineProperty(e,l,a.get?a:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const a of l)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const a={};return l.integrity&&(a.integrity=l.integrity),l.referrerPolicy&&(a.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?a.credentials="include":l.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(l){if(l.ep)return;l.ep=!0;const a=n(l);fetch(l.href,a)}})();function rp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pu={exports:{}},Gl={},xu={exports:{}},Q={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ir=Symbol.for("react.element"),lp=Symbol.for("react.portal"),ap=Symbol.for("react.fragment"),ip=Symbol.for("react.strict_mode"),op=Symbol.for("react.profiler"),cp=Symbol.for("react.provider"),dp=Symbol.for("react.context"),up=Symbol.for("react.forward_ref"),mp=Symbol.for("react.suspense"),hp=Symbol.for("react.memo"),pp=Symbol.for("react.lazy"),gc=Symbol.iterator;function xp(e){return e===null||typeof e!="object"?null:(e=gc&&e[gc]||e["@@iterator"],typeof e=="function"?e:null)}var fu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gu=Object.assign,vu={};function In(e,t,n){this.props=e,this.context=t,this.refs=vu,this.updater=n||fu}In.prototype.isReactComponent={};In.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};In.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function yu(){}yu.prototype=In.prototype;function to(e,t,n){this.props=e,this.context=t,this.refs=vu,this.updater=n||fu}var so=to.prototype=new yu;so.constructor=to;gu(so,In.prototype);so.isPureReactComponent=!0;var vc=Array.isArray,ju=Object.prototype.hasOwnProperty,no={current:null},wu={key:!0,ref:!0,__self:!0,__source:!0};function Nu(e,t,n){var r,l={},a=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)ju.call(t,r)&&!wu.hasOwnProperty(r)&&(l[r]=t[r]);var o=arguments.length-2;if(o===1)l.children=n;else if(1<o){for(var c=Array(o),d=0;d<o;d++)c[d]=arguments[d+2];l.children=c}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)l[r]===void 0&&(l[r]=o[r]);return{$$typeof:Ir,type:e,key:a,ref:i,props:l,_owner:no.current}}function fp(e,t){return{$$typeof:Ir,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ro(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ir}function gp(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var yc=/\/+/g;function ga(e,t){return typeof e=="object"&&e!==null&&e.key!=null?gp(""+e.key):t.toString(36)}function ol(e,t,n,r,l){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Ir:case lp:i=!0}}if(i)return i=e,l=l(i),e=r===""?"."+ga(i,0):r,vc(l)?(n="",e!=null&&(n=e.replace(yc,"$&/")+"/"),ol(l,t,n,"",function(d){return d})):l!=null&&(ro(l)&&(l=fp(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(yc,"$&/")+"/")+e)),t.push(l)),1;if(i=0,r=r===""?".":r+":",vc(e))for(var o=0;o<e.length;o++){a=e[o];var c=r+ga(a,o);i+=ol(a,t,n,c,l)}else if(c=xp(e),typeof c=="function")for(e=c.call(e),o=0;!(a=e.next()).done;)a=a.value,c=r+ga(a,o++),i+=ol(a,t,n,c,l);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Or(e,t,n){if(e==null)return e;var r=[],l=0;return ol(e,r,"","",function(a){return t.call(n,a,l++)}),r}function vp(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var We={current:null},cl={transition:null},yp={ReactCurrentDispatcher:We,ReactCurrentBatchConfig:cl,ReactCurrentOwner:no};function bu(){throw Error("act(...) is not supported in production builds of React.")}Q.Children={map:Or,forEach:function(e,t,n){Or(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Or(e,function(){t++}),t},toArray:function(e){return Or(e,function(t){return t})||[]},only:function(e){if(!ro(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Q.Component=In;Q.Fragment=ap;Q.Profiler=op;Q.PureComponent=to;Q.StrictMode=ip;Q.Suspense=mp;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yp;Q.act=bu;Q.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=gu({},e.props),l=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=no.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(c in t)ju.call(t,c)&&!wu.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&o!==void 0?o[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){o=Array(c);for(var d=0;d<c;d++)o[d]=arguments[d+2];r.children=o}return{$$typeof:Ir,type:e.type,key:l,ref:a,props:r,_owner:i}};Q.createContext=function(e){return e={$$typeof:dp,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:cp,_context:e},e.Consumer=e};Q.createElement=Nu;Q.createFactory=function(e){var t=Nu.bind(null,e);return t.type=e,t};Q.createRef=function(){return{current:null}};Q.forwardRef=function(e){return{$$typeof:up,render:e}};Q.isValidElement=ro;Q.lazy=function(e){return{$$typeof:pp,_payload:{_status:-1,_result:e},_init:vp}};Q.memo=function(e,t){return{$$typeof:hp,type:e,compare:t===void 0?null:t}};Q.startTransition=function(e){var t=cl.transition;cl.transition={};try{e()}finally{cl.transition=t}};Q.unstable_act=bu;Q.useCallback=function(e,t){return We.current.useCallback(e,t)};Q.useContext=function(e){return We.current.useContext(e)};Q.useDebugValue=function(){};Q.useDeferredValue=function(e){return We.current.useDeferredValue(e)};Q.useEffect=function(e,t){return We.current.useEffect(e,t)};Q.useId=function(){return We.current.useId()};Q.useImperativeHandle=function(e,t,n){return We.current.useImperativeHandle(e,t,n)};Q.useInsertionEffect=function(e,t){return We.current.useInsertionEffect(e,t)};Q.useLayoutEffect=function(e,t){return We.current.useLayoutEffect(e,t)};Q.useMemo=function(e,t){return We.current.useMemo(e,t)};Q.useReducer=function(e,t,n){return We.current.useReducer(e,t,n)};Q.useRef=function(e){return We.current.useRef(e)};Q.useState=function(e){return We.current.useState(e)};Q.useSyncExternalStore=function(e,t,n){return We.current.useSyncExternalStore(e,t,n)};Q.useTransition=function(){return We.current.useTransition()};Q.version="18.3.1";xu.exports=Q;var j=xu.exports;const Qt=rp(j),jp=np({__proto__:null,default:Qt},[j]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var wp=j,Np=Symbol.for("react.element"),bp=Symbol.for("react.fragment"),kp=Object.prototype.hasOwnProperty,Cp=wp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Sp={key:!0,ref:!0,__self:!0,__source:!0};function ku(e,t,n){var r,l={},a=null,i=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)kp.call(t,r)&&!Sp.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Np,type:e,key:a,ref:i,props:l,_owner:Cp.current}}Gl.Fragment=bp;Gl.jsx=ku;Gl.jsxs=ku;pu.exports=Gl;var s=pu.exports,Za={},Cu={exports:{}},rt={},Su={exports:{}},Eu={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function t(P,I){var T=P.length;P.push(I);e:for(;0<T;){var V=T-1>>>1,H=P[V];if(0<l(H,I))P[V]=I,P[T]=H,T=V;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var I=P[0],T=P.pop();if(T!==I){P[0]=T;e:for(var V=0,H=P.length,De=H>>>1;V<De;){var Re=2*(V+1)-1,B=P[Re],se=Re+1,pe=P[se];if(0>l(B,T))se<H&&0>l(pe,B)?(P[V]=pe,P[se]=T,V=se):(P[V]=B,P[Re]=T,V=Re);else if(se<H&&0>l(pe,T))P[V]=pe,P[se]=T,V=se;else break e}}return I}function l(P,I){var T=P.sortIndex-I.sortIndex;return T!==0?T:P.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var c=[],d=[],h=1,u=null,m=3,x=!1,f=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(P){for(var I=n(d);I!==null;){if(I.callback===null)r(d);else if(I.startTime<=P)r(d),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(d)}}function b(P){if(v=!1,y(P),!f)if(n(c)!==null)f=!0,X(L);else{var I=n(d);I!==null&&ae(b,I.startTime-P)}}function L(P,I){f=!1,v&&(v=!1,g(N),N=-1),x=!0;var T=m;try{for(y(I),u=n(c);u!==null&&(!(u.expirationTime>I)||P&&!G());){var V=u.callback;if(typeof V=="function"){u.callback=null,m=u.priorityLevel;var H=V(u.expirationTime<=I);I=e.unstable_now(),typeof H=="function"?u.callback=H:u===n(c)&&r(c),y(I)}else r(c);u=n(c)}if(u!==null)var De=!0;else{var Re=n(d);Re!==null&&ae(b,Re.startTime-I),De=!1}return De}finally{u=null,m=T,x=!1}}var M=!1,A=null,N=-1,F=5,R=-1;function G(){return!(e.unstable_now()-R<F)}function D(){if(A!==null){var P=e.unstable_now();R=P;var I=!0;try{I=A(!0,P)}finally{I?we():(M=!1,A=null)}}else M=!1}var we;if(typeof p=="function")we=function(){p(D)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,K=O.port2;O.port1.onmessage=D,we=function(){K.postMessage(null)}}else we=function(){w(D,0)};function X(P){A=P,M||(M=!0,we())}function ae(P,I){N=w(function(){P(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){f||x||(f=!0,X(L))},e.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},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(P){switch(m){case 1:case 2:case 3:var I=3;break;default:I=m}var T=m;m=I;try{return P()}finally{m=T}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,I){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var T=m;m=P;try{return I()}finally{m=T}},e.unstable_scheduleCallback=function(P,I,T){var V=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?V+T:V):T=V,P){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=T+H,P={id:h++,callback:I,priorityLevel:P,startTime:T,expirationTime:H,sortIndex:-1},T>V?(P.sortIndex=T,t(d,P),n(c)===null&&P===n(d)&&(v?(g(N),N=-1):v=!0,ae(b,T-V))):(P.sortIndex=H,t(c,P),f||x||(f=!0,X(L))),P},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(P){var I=m;return function(){var T=m;m=I;try{return P.apply(this,arguments)}finally{m=T}}}})(Eu);Su.exports=Eu;var Ep=Su.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Lp=j,nt=Ep;function S(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Lu=new Set,cr={};function $s(e,t){wn(e,t),wn(e+"Capture",t)}function wn(e,t){for(cr[e]=t,e=0;e<t.length;e++)Lu.add(t[e])}var Ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ei=Object.prototype.hasOwnProperty,Pp=/^[: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]*$/,jc={},wc={};function Ip(e){return ei.call(wc,e)?!0:ei.call(jc,e)?!1:Pp.test(e)?wc[e]=!0:(jc[e]=!0,!1)}function Rp(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zp(e,t,n,r){if(t===null||typeof t>"u"||Rp(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ge(e,t,n,r,l,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_e[e]=new Ge(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_e[t]=new Ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_e[e]=new Ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_e[e]=new Ge(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){_e[e]=new Ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_e[e]=new Ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_e[e]=new Ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_e[e]=new Ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_e[e]=new Ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var lo=/[\-:]([a-z])/g;function ao(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(lo,ao);_e[t]=new Ge(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(lo,ao);_e[t]=new Ge(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(lo,ao);_e[t]=new Ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_e[e]=new Ge(e,1,!1,e.toLowerCase(),null,!1,!1)});_e.xlinkHref=new Ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_e[e]=new Ge(e,1,!1,e.toLowerCase(),null,!0,!0)});function io(e,t,n,r){var l=_e.hasOwnProperty(t)?_e[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(zp(t,n,l,r)&&(n=null),r||l===null?Ip(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Yt=Lp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Vr=Symbol.for("react.element"),Zs=Symbol.for("react.portal"),en=Symbol.for("react.fragment"),oo=Symbol.for("react.strict_mode"),ti=Symbol.for("react.profiler"),Pu=Symbol.for("react.provider"),Iu=Symbol.for("react.context"),co=Symbol.for("react.forward_ref"),si=Symbol.for("react.suspense"),ni=Symbol.for("react.suspense_list"),uo=Symbol.for("react.memo"),es=Symbol.for("react.lazy"),Ru=Symbol.for("react.offscreen"),Nc=Symbol.iterator;function Dn(e){return e===null||typeof e!="object"?null:(e=Nc&&e[Nc]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Object.assign,va;function Qn(e){if(va===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);va=t&&t[1]||""}return`
`+va+e}var ya=!1;function ja(e,t){if(!e||ya)return"";ya=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var l=d.stack.split(`
`),a=r.stack.split(`
`),i=l.length-1,o=a.length-1;1<=i&&0<=o&&l[i]!==a[o];)o--;for(;1<=i&&0<=o;i--,o--)if(l[i]!==a[o]){if(i!==1||o!==1)do if(i--,o--,0>o||l[i]!==a[o]){var c=`
`+l[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=o);break}}}finally{ya=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Qn(e):""}function Fp(e){switch(e.tag){case 5:return Qn(e.type);case 16:return Qn("Lazy");case 13:return Qn("Suspense");case 19:return Qn("SuspenseList");case 0:case 2:case 15:return e=ja(e.type,!1),e;case 11:return e=ja(e.type.render,!1),e;case 1:return e=ja(e.type,!0),e;default:return""}}function ri(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case en:return"Fragment";case Zs:return"Portal";case ti:return"Profiler";case oo:return"StrictMode";case si:return"Suspense";case ni:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Iu:return(e.displayName||"Context")+".Consumer";case Pu:return(e._context.displayName||"Context")+".Provider";case co:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uo:return t=e.displayName||null,t!==null?t:ri(e.type)||"Memo";case es:t=e._payload,e=e._init;try{return ri(e(t))}catch{}}return null}function Mp(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ri(t);case 8:return t===oo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ys(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ap(e){var t=zu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qr(e){e._valueTracker||(e._valueTracker=Ap(e))}function Fu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=zu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function jl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function li(e,t){var n=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ys(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Mu(e,t){t=t.checked,t!=null&&io(e,"checked",t,!1)}function ai(e,t){Mu(e,t);var n=ys(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ii(e,t.type,n):t.hasOwnProperty("defaultValue")&&ii(e,t.type,ys(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function kc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ii(e,t,n){(t!=="number"||jl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Yn=Array.isArray;function hn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ys(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function oi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(S(91));return ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Cc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(S(92));if(Yn(n)){if(1<n.length)throw Error(S(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ys(n)}}function Au(e,t){var n=ys(t.value),r=ys(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Sc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Tu(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ci(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Tu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Br,_u=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Br=Br||document.createElement("div"),Br.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Br.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function dr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Tp=["Webkit","ms","Moz","O"];Object.keys(Zn).forEach(function(e){Tp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zn[t]=Zn[e]})});function Du(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zn.hasOwnProperty(e)&&Zn[e]?(""+t).trim():t+"px"}function Ou(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Du(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var _p=ve({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function di(e,t){if(t){if(_p[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62))}}function ui(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var mi=null;function mo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hi=null,pn=null,xn=null;function Ec(e){if(e=Fr(e)){if(typeof hi!="function")throw Error(S(280));var t=e.stateNode;t&&(t=Kl(t),hi(e.stateNode,e.type,t))}}function Vu(e){pn?xn?xn.push(e):xn=[e]:pn=e}function qu(){if(pn){var e=pn,t=xn;if(xn=pn=null,Ec(e),t)for(e=0;e<t.length;e++)Ec(t[e])}}function Bu(e,t){return e(t)}function $u(){}var wa=!1;function Hu(e,t,n){if(wa)return e(t,n);wa=!0;try{return Bu(e,t,n)}finally{wa=!1,(pn!==null||xn!==null)&&($u(),qu())}}function ur(e,t){var n=e.stateNode;if(n===null)return null;var r=Kl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(S(231,t,typeof n));return n}var pi=!1;if(Ht)try{var On={};Object.defineProperty(On,"passive",{get:function(){pi=!0}}),window.addEventListener("test",On,On),window.removeEventListener("test",On,On)}catch{pi=!1}function Dp(e,t,n,r,l,a,i,o,c){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(h){this.onError(h)}}var er=!1,wl=null,Nl=!1,xi=null,Op={onError:function(e){er=!0,wl=e}};function Vp(e,t,n,r,l,a,i,o,c){er=!1,wl=null,Dp.apply(Op,arguments)}function qp(e,t,n,r,l,a,i,o,c){if(Vp.apply(this,arguments),er){if(er){var d=wl;er=!1,wl=null}else throw Error(S(198));Nl||(Nl=!0,xi=d)}}function Hs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Uu(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Lc(e){if(Hs(e)!==e)throw Error(S(188))}function Bp(e){var t=e.alternate;if(!t){if(t=Hs(e),t===null)throw Error(S(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var a=l.alternate;if(a===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===a.child){for(a=l.child;a;){if(a===n)return Lc(l),e;if(a===r)return Lc(l),t;a=a.sibling}throw Error(S(188))}if(n.return!==r.return)n=l,r=a;else{for(var i=!1,o=l.child;o;){if(o===n){i=!0,n=l,r=a;break}if(o===r){i=!0,r=l,n=a;break}o=o.sibling}if(!i){for(o=a.child;o;){if(o===n){i=!0,n=a,r=l;break}if(o===r){i=!0,r=a,n=l;break}o=o.sibling}if(!i)throw Error(S(189))}}if(n.alternate!==r)throw Error(S(190))}if(n.tag!==3)throw Error(S(188));return n.stateNode.current===n?e:t}function Wu(e){return e=Bp(e),e!==null?Gu(e):null}function Gu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Gu(e);if(t!==null)return t;e=e.sibling}return null}var Xu=nt.unstable_scheduleCallback,Pc=nt.unstable_cancelCallback,$p=nt.unstable_shouldYield,Hp=nt.unstable_requestPaint,Ne=nt.unstable_now,Up=nt.unstable_getCurrentPriorityLevel,ho=nt.unstable_ImmediatePriority,Qu=nt.unstable_UserBlockingPriority,bl=nt.unstable_NormalPriority,Wp=nt.unstable_LowPriority,Yu=nt.unstable_IdlePriority,Xl=null,Rt=null;function Gp(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(Xl,e,void 0,(e.current.flags&128)===128)}catch{}}var kt=Math.clz32?Math.clz32:Yp,Xp=Math.log,Qp=Math.LN2;function Yp(e){return e>>>=0,e===0?32:31-(Xp(e)/Qp|0)|0}var $r=64,Hr=4194304;function Jn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function kl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,a=e.pingedLanes,i=n&268435455;if(i!==0){var o=i&~l;o!==0?r=Jn(o):(a&=i,a!==0&&(r=Jn(a)))}else i=n&~l,i!==0?r=Jn(i):a!==0&&(r=Jn(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,a=t&-t,l>=a||l===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-kt(t),l=1<<n,r|=e[n],t&=~l;return r}function Jp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Kp(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-kt(a),o=1<<i,c=l[i];c===-1?(!(o&n)||o&r)&&(l[i]=Jp(o,t)):c<=t&&(e.expiredLanes|=o),a&=~o}}function fi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ju(){var e=$r;return $r<<=1,!($r&4194240)&&($r=64),e}function Na(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Rr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kt(t),e[t]=n}function Zp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-kt(n),a=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~a}}function po(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kt(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var ne=0;function Ku(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Zu,xo,em,tm,sm,gi=!1,Ur=[],is=null,os=null,cs=null,mr=new Map,hr=new Map,ss=[],ex="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ic(e,t){switch(e){case"focusin":case"focusout":is=null;break;case"dragenter":case"dragleave":os=null;break;case"mouseover":case"mouseout":cs=null;break;case"pointerover":case"pointerout":mr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":hr.delete(t.pointerId)}}function Vn(e,t,n,r,l,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[l]},t!==null&&(t=Fr(t),t!==null&&xo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function tx(e,t,n,r,l){switch(t){case"focusin":return is=Vn(is,e,t,n,r,l),!0;case"dragenter":return os=Vn(os,e,t,n,r,l),!0;case"mouseover":return cs=Vn(cs,e,t,n,r,l),!0;case"pointerover":var a=l.pointerId;return mr.set(a,Vn(mr.get(a)||null,e,t,n,r,l)),!0;case"gotpointercapture":return a=l.pointerId,hr.set(a,Vn(hr.get(a)||null,e,t,n,r,l)),!0}return!1}function nm(e){var t=Ps(e.target);if(t!==null){var n=Hs(t);if(n!==null){if(t=n.tag,t===13){if(t=Uu(n),t!==null){e.blockedOn=t,sm(e.priority,function(){em(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function dl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=vi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mi=r,n.target.dispatchEvent(r),mi=null}else return t=Fr(n),t!==null&&xo(t),e.blockedOn=n,!1;t.shift()}return!0}function Rc(e,t,n){dl(e)&&n.delete(t)}function sx(){gi=!1,is!==null&&dl(is)&&(is=null),os!==null&&dl(os)&&(os=null),cs!==null&&dl(cs)&&(cs=null),mr.forEach(Rc),hr.forEach(Rc)}function qn(e,t){e.blockedOn===t&&(e.blockedOn=null,gi||(gi=!0,nt.unstable_scheduleCallback(nt.unstable_NormalPriority,sx)))}function pr(e){function t(l){return qn(l,e)}if(0<Ur.length){qn(Ur[0],e);for(var n=1;n<Ur.length;n++){var r=Ur[n];r.blockedOn===e&&(r.blockedOn=null)}}for(is!==null&&qn(is,e),os!==null&&qn(os,e),cs!==null&&qn(cs,e),mr.forEach(t),hr.forEach(t),n=0;n<ss.length;n++)r=ss[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ss.length&&(n=ss[0],n.blockedOn===null);)nm(n),n.blockedOn===null&&ss.shift()}var fn=Yt.ReactCurrentBatchConfig,Cl=!0;function nx(e,t,n,r){var l=ne,a=fn.transition;fn.transition=null;try{ne=1,fo(e,t,n,r)}finally{ne=l,fn.transition=a}}function rx(e,t,n,r){var l=ne,a=fn.transition;fn.transition=null;try{ne=4,fo(e,t,n,r)}finally{ne=l,fn.transition=a}}function fo(e,t,n,r){if(Cl){var l=vi(e,t,n,r);if(l===null)za(e,t,r,Sl,n),Ic(e,r);else if(tx(l,e,t,n,r))r.stopPropagation();else if(Ic(e,r),t&4&&-1<ex.indexOf(e)){for(;l!==null;){var a=Fr(l);if(a!==null&&Zu(a),a=vi(e,t,n,r),a===null&&za(e,t,r,Sl,n),a===l)break;l=a}l!==null&&r.stopPropagation()}else za(e,t,r,null,n)}}var Sl=null;function vi(e,t,n,r){if(Sl=null,e=mo(r),e=Ps(e),e!==null)if(t=Hs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Uu(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Sl=e,null}function rm(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Up()){case ho:return 1;case Qu:return 4;case bl:case Wp:return 16;case Yu:return 536870912;default:return 16}default:return 16}}var rs=null,go=null,ul=null;function lm(){if(ul)return ul;var e,t=go,n=t.length,r,l="value"in rs?rs.value:rs.textContent,a=l.length;for(e=0;e<n&&t[e]===l[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===l[a-r];r++);return ul=l.slice(e,1<r?1-r:void 0)}function ml(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Wr(){return!0}function zc(){return!1}function lt(e){function t(n,r,l,a,i){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(a):a[o]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Wr:zc,this.isPropagationStopped=zc,this}return ve(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Wr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Wr)},persist:function(){},isPersistent:Wr}),t}var Rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vo=lt(Rn),zr=ve({},Rn,{view:0,detail:0}),lx=lt(zr),ba,ka,Bn,Ql=ve({},zr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Bn&&(Bn&&e.type==="mousemove"?(ba=e.screenX-Bn.screenX,ka=e.screenY-Bn.screenY):ka=ba=0,Bn=e),ba)},movementY:function(e){return"movementY"in e?e.movementY:ka}}),Fc=lt(Ql),ax=ve({},Ql,{dataTransfer:0}),ix=lt(ax),ox=ve({},zr,{relatedTarget:0}),Ca=lt(ox),cx=ve({},Rn,{animationName:0,elapsedTime:0,pseudoElement:0}),dx=lt(cx),ux=ve({},Rn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mx=lt(ux),hx=ve({},Rn,{data:0}),Mc=lt(hx),px={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xx={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"},fx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fx[e])?!!t[e]:!1}function yo(){return gx}var vx=ve({},zr,{key:function(e){if(e.key){var t=px[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ml(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yo,charCode:function(e){return e.type==="keypress"?ml(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ml(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yx=lt(vx),jx=ve({},Ql,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ac=lt(jx),wx=ve({},zr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yo}),Nx=lt(wx),bx=ve({},Rn,{propertyName:0,elapsedTime:0,pseudoElement:0}),kx=lt(bx),Cx=ve({},Ql,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Sx=lt(Cx),Ex=[9,13,27,32],jo=Ht&&"CompositionEvent"in window,tr=null;Ht&&"documentMode"in document&&(tr=document.documentMode);var Lx=Ht&&"TextEvent"in window&&!tr,am=Ht&&(!jo||tr&&8<tr&&11>=tr),Tc=" ",_c=!1;function im(e,t){switch(e){case"keyup":return Ex.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function om(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tn=!1;function Px(e,t){switch(e){case"compositionend":return om(t);case"keypress":return t.which!==32?null:(_c=!0,Tc);case"textInput":return e=t.data,e===Tc&&_c?null:e;default:return null}}function Ix(e,t){if(tn)return e==="compositionend"||!jo&&im(e,t)?(e=lm(),ul=go=rs=null,tn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return am&&t.locale!=="ko"?null:t.data;default:return null}}var Rx={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 Dc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rx[e.type]:t==="textarea"}function cm(e,t,n,r){Vu(r),t=El(t,"onChange"),0<t.length&&(n=new vo("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var sr=null,xr=null;function zx(e){jm(e,0)}function Yl(e){var t=rn(e);if(Fu(t))return e}function Fx(e,t){if(e==="change")return t}var dm=!1;if(Ht){var Sa;if(Ht){var Ea="oninput"in document;if(!Ea){var Oc=document.createElement("div");Oc.setAttribute("oninput","return;"),Ea=typeof Oc.oninput=="function"}Sa=Ea}else Sa=!1;dm=Sa&&(!document.documentMode||9<document.documentMode)}function Vc(){sr&&(sr.detachEvent("onpropertychange",um),xr=sr=null)}function um(e){if(e.propertyName==="value"&&Yl(xr)){var t=[];cm(t,xr,e,mo(e)),Hu(zx,t)}}function Mx(e,t,n){e==="focusin"?(Vc(),sr=t,xr=n,sr.attachEvent("onpropertychange",um)):e==="focusout"&&Vc()}function Ax(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yl(xr)}function Tx(e,t){if(e==="click")return Yl(t)}function _x(e,t){if(e==="input"||e==="change")return Yl(t)}function Dx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var St=typeof Object.is=="function"?Object.is:Dx;function fr(e,t){if(St(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!ei.call(t,l)||!St(e[l],t[l]))return!1}return!0}function qc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bc(e,t){var n=qc(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qc(n)}}function mm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hm(){for(var e=window,t=jl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=jl(e.document)}return t}function wo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ox(e){var t=hm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mm(n.ownerDocument.documentElement,n)){if(r!==null&&wo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,a=Math.min(r.start,l);r=r.end===void 0?a:Math.min(r.end,l),!e.extend&&a>r&&(l=r,r=a,a=l),l=Bc(n,a);var i=Bc(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Vx=Ht&&"documentMode"in document&&11>=document.documentMode,sn=null,yi=null,nr=null,ji=!1;function $c(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ji||sn==null||sn!==jl(r)||(r=sn,"selectionStart"in r&&wo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),nr&&fr(nr,r)||(nr=r,r=El(yi,"onSelect"),0<r.length&&(t=new vo("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=sn)))}function Gr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nn={animationend:Gr("Animation","AnimationEnd"),animationiteration:Gr("Animation","AnimationIteration"),animationstart:Gr("Animation","AnimationStart"),transitionend:Gr("Transition","TransitionEnd")},La={},pm={};Ht&&(pm=document.createElement("div").style,"AnimationEvent"in window||(delete nn.animationend.animation,delete nn.animationiteration.animation,delete nn.animationstart.animation),"TransitionEvent"in window||delete nn.transitionend.transition);function Jl(e){if(La[e])return La[e];if(!nn[e])return e;var t=nn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in pm)return La[e]=t[n];return e}var xm=Jl("animationend"),fm=Jl("animationiteration"),gm=Jl("animationstart"),vm=Jl("transitionend"),ym=new Map,Hc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function bs(e,t){ym.set(e,t),$s(t,[e])}for(var Pa=0;Pa<Hc.length;Pa++){var Ia=Hc[Pa],qx=Ia.toLowerCase(),Bx=Ia[0].toUpperCase()+Ia.slice(1);bs(qx,"on"+Bx)}bs(xm,"onAnimationEnd");bs(fm,"onAnimationIteration");bs(gm,"onAnimationStart");bs("dblclick","onDoubleClick");bs("focusin","onFocus");bs("focusout","onBlur");bs(vm,"onTransitionEnd");wn("onMouseEnter",["mouseout","mouseover"]);wn("onMouseLeave",["mouseout","mouseover"]);wn("onPointerEnter",["pointerout","pointerover"]);wn("onPointerLeave",["pointerout","pointerover"]);$s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$s("onBeforeInput",["compositionend","keypress","textInput","paste"]);$s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kn="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(" "),$x=new Set("cancel close invalid load scroll toggle".split(" ").concat(Kn));function Uc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,qp(r,t,void 0,e),e.currentTarget=null}function jm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var o=r[i],c=o.instance,d=o.currentTarget;if(o=o.listener,c!==a&&l.isPropagationStopped())break e;Uc(l,o,d),a=c}else for(i=0;i<r.length;i++){if(o=r[i],c=o.instance,d=o.currentTarget,o=o.listener,c!==a&&l.isPropagationStopped())break e;Uc(l,o,d),a=c}}}if(Nl)throw e=xi,Nl=!1,xi=null,e}function ue(e,t){var n=t[Ci];n===void 0&&(n=t[Ci]=new Set);var r=e+"__bubble";n.has(r)||(wm(t,e,2,!1),n.add(r))}function Ra(e,t,n){var r=0;t&&(r|=4),wm(n,e,r,t)}var Xr="_reactListening"+Math.random().toString(36).slice(2);function gr(e){if(!e[Xr]){e[Xr]=!0,Lu.forEach(function(n){n!=="selectionchange"&&($x.has(n)||Ra(n,!1,e),Ra(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xr]||(t[Xr]=!0,Ra("selectionchange",!1,t))}}function wm(e,t,n,r){switch(rm(t)){case 1:var l=nx;break;case 4:l=rx;break;default:l=fo}n=l.bind(null,t,n,e),l=void 0,!pi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function za(e,t,n,r,l){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var o=r.stateNode.containerInfo;if(o===l||o.nodeType===8&&o.parentNode===l)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===l||c.nodeType===8&&c.parentNode===l))return;i=i.return}for(;o!==null;){if(i=Ps(o),i===null)return;if(c=i.tag,c===5||c===6){r=a=i;continue e}o=o.parentNode}}r=r.return}Hu(function(){var d=a,h=mo(n),u=[];e:{var m=ym.get(e);if(m!==void 0){var x=vo,f=e;switch(e){case"keypress":if(ml(n)===0)break e;case"keydown":case"keyup":x=yx;break;case"focusin":f="focus",x=Ca;break;case"focusout":f="blur",x=Ca;break;case"beforeblur":case"afterblur":x=Ca;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":x=Fc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=ix;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=Nx;break;case xm:case fm:case gm:x=dx;break;case vm:x=kx;break;case"scroll":x=lx;break;case"wheel":x=Sx;break;case"copy":case"cut":case"paste":x=mx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=Ac}var v=(t&4)!==0,w=!v&&e==="scroll",g=v?m!==null?m+"Capture":null:m;v=[];for(var p=d,y;p!==null;){y=p;var b=y.stateNode;if(y.tag===5&&b!==null&&(y=b,g!==null&&(b=ur(p,g),b!=null&&v.push(vr(p,b,y)))),w)break;p=p.return}0<v.length&&(m=new x(m,f,null,n,h),u.push({event:m,listeners:v}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",m&&n!==mi&&(f=n.relatedTarget||n.fromElement)&&(Ps(f)||f[Ut]))break e;if((x||m)&&(m=h.window===h?h:(m=h.ownerDocument)?m.defaultView||m.parentWindow:window,x?(f=n.relatedTarget||n.toElement,x=d,f=f?Ps(f):null,f!==null&&(w=Hs(f),f!==w||f.tag!==5&&f.tag!==6)&&(f=null)):(x=null,f=d),x!==f)){if(v=Fc,b="onMouseLeave",g="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(v=Ac,b="onPointerLeave",g="onPointerEnter",p="pointer"),w=x==null?m:rn(x),y=f==null?m:rn(f),m=new v(b,p+"leave",x,n,h),m.target=w,m.relatedTarget=y,b=null,Ps(h)===d&&(v=new v(g,p+"enter",f,n,h),v.target=y,v.relatedTarget=w,b=v),w=b,x&&f)t:{for(v=x,g=f,p=0,y=v;y;y=Qs(y))p++;for(y=0,b=g;b;b=Qs(b))y++;for(;0<p-y;)v=Qs(v),p--;for(;0<y-p;)g=Qs(g),y--;for(;p--;){if(v===g||g!==null&&v===g.alternate)break t;v=Qs(v),g=Qs(g)}v=null}else v=null;x!==null&&Wc(u,m,x,v,!1),f!==null&&w!==null&&Wc(u,w,f,v,!0)}}e:{if(m=d?rn(d):window,x=m.nodeName&&m.nodeName.toLowerCase(),x==="select"||x==="input"&&m.type==="file")var L=Fx;else if(Dc(m))if(dm)L=_x;else{L=Ax;var M=Mx}else(x=m.nodeName)&&x.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(L=Tx);if(L&&(L=L(e,d))){cm(u,L,n,h);break e}M&&M(e,m,d),e==="focusout"&&(M=m._wrapperState)&&M.controlled&&m.type==="number"&&ii(m,"number",m.value)}switch(M=d?rn(d):window,e){case"focusin":(Dc(M)||M.contentEditable==="true")&&(sn=M,yi=d,nr=null);break;case"focusout":nr=yi=sn=null;break;case"mousedown":ji=!0;break;case"contextmenu":case"mouseup":case"dragend":ji=!1,$c(u,n,h);break;case"selectionchange":if(Vx)break;case"keydown":case"keyup":$c(u,n,h)}var A;if(jo)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else tn?im(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(am&&n.locale!=="ko"&&(tn||N!=="onCompositionStart"?N==="onCompositionEnd"&&tn&&(A=lm()):(rs=h,go="value"in rs?rs.value:rs.textContent,tn=!0)),M=El(d,N),0<M.length&&(N=new Mc(N,e,null,n,h),u.push({event:N,listeners:M}),A?N.data=A:(A=om(n),A!==null&&(N.data=A)))),(A=Lx?Px(e,n):Ix(e,n))&&(d=El(d,"onBeforeInput"),0<d.length&&(h=new Mc("onBeforeInput","beforeinput",null,n,h),u.push({event:h,listeners:d}),h.data=A))}jm(u,t)})}function vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function El(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,a=l.stateNode;l.tag===5&&a!==null&&(l=a,a=ur(e,n),a!=null&&r.unshift(vr(e,a,l)),a=ur(e,t),a!=null&&r.push(vr(e,a,l))),e=e.return}return r}function Qs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Wc(e,t,n,r,l){for(var a=t._reactName,i=[];n!==null&&n!==r;){var o=n,c=o.alternate,d=o.stateNode;if(c!==null&&c===r)break;o.tag===5&&d!==null&&(o=d,l?(c=ur(n,a),c!=null&&i.unshift(vr(n,c,o))):l||(c=ur(n,a),c!=null&&i.push(vr(n,c,o)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Hx=/\r\n?/g,Ux=/\u0000|\uFFFD/g;function Gc(e){return(typeof e=="string"?e:""+e).replace(Hx,`
`).replace(Ux,"")}function Qr(e,t,n){if(t=Gc(t),Gc(e)!==t&&n)throw Error(S(425))}function Ll(){}var wi=null,Ni=null;function bi(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ki=typeof setTimeout=="function"?setTimeout:void 0,Wx=typeof clearTimeout=="function"?clearTimeout:void 0,Xc=typeof Promise=="function"?Promise:void 0,Gx=typeof queueMicrotask=="function"?queueMicrotask:typeof Xc<"u"?function(e){return Xc.resolve(null).then(e).catch(Xx)}:ki;function Xx(e){setTimeout(function(){throw e})}function Fa(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),pr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);pr(t)}function ds(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Qc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var zn=Math.random().toString(36).slice(2),It="__reactFiber$"+zn,yr="__reactProps$"+zn,Ut="__reactContainer$"+zn,Ci="__reactEvents$"+zn,Qx="__reactListeners$"+zn,Yx="__reactHandles$"+zn;function Ps(e){var t=e[It];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ut]||n[It]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Qc(e);e!==null;){if(n=e[It])return n;e=Qc(e)}return t}e=n,n=e.parentNode}return null}function Fr(e){return e=e[It]||e[Ut],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function rn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(S(33))}function Kl(e){return e[yr]||null}var Si=[],ln=-1;function ks(e){return{current:e}}function me(e){0>ln||(e.current=Si[ln],Si[ln]=null,ln--)}function oe(e,t){ln++,Si[ln]=e.current,e.current=t}var js={},$e=ks(js),Ye=ks(!1),As=js;function Nn(e,t){var n=e.type.contextTypes;if(!n)return js;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},a;for(a in n)l[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Je(e){return e=e.childContextTypes,e!=null}function Pl(){me(Ye),me($e)}function Yc(e,t,n){if($e.current!==js)throw Error(S(168));oe($e,t),oe(Ye,n)}function Nm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(S(108,Mp(e)||"Unknown",l));return ve({},n,r)}function Il(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||js,As=$e.current,oe($e,e),oe(Ye,Ye.current),!0}function Jc(e,t,n){var r=e.stateNode;if(!r)throw Error(S(169));n?(e=Nm(e,t,As),r.__reactInternalMemoizedMergedChildContext=e,me(Ye),me($e),oe($e,e)):me(Ye),oe(Ye,n)}var Vt=null,Zl=!1,Ma=!1;function bm(e){Vt===null?Vt=[e]:Vt.push(e)}function Jx(e){Zl=!0,bm(e)}function Cs(){if(!Ma&&Vt!==null){Ma=!0;var e=0,t=ne;try{var n=Vt;for(ne=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Vt=null,Zl=!1}catch(l){throw Vt!==null&&(Vt=Vt.slice(e+1)),Xu(ho,Cs),l}finally{ne=t,Ma=!1}}return null}var an=[],on=0,Rl=null,zl=0,ct=[],dt=0,Ts=null,qt=1,Bt="";function Es(e,t){an[on++]=zl,an[on++]=Rl,Rl=e,zl=t}function km(e,t,n){ct[dt++]=qt,ct[dt++]=Bt,ct[dt++]=Ts,Ts=e;var r=qt;e=Bt;var l=32-kt(r)-1;r&=~(1<<l),n+=1;var a=32-kt(t)+l;if(30<a){var i=l-l%5;a=(r&(1<<i)-1).toString(32),r>>=i,l-=i,qt=1<<32-kt(t)+l|n<<l|r,Bt=a+e}else qt=1<<a|n<<l|r,Bt=e}function No(e){e.return!==null&&(Es(e,1),km(e,1,0))}function bo(e){for(;e===Rl;)Rl=an[--on],an[on]=null,zl=an[--on],an[on]=null;for(;e===Ts;)Ts=ct[--dt],ct[dt]=null,Bt=ct[--dt],ct[dt]=null,qt=ct[--dt],ct[dt]=null}var st=null,tt=null,he=!1,jt=null;function Cm(e,t){var n=ut(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Kc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,st=e,tt=ds(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,st=e,tt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ts!==null?{id:qt,overflow:Bt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ut(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,st=e,tt=null,!0):!1;default:return!1}}function Ei(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Li(e){if(he){var t=tt;if(t){var n=t;if(!Kc(e,t)){if(Ei(e))throw Error(S(418));t=ds(n.nextSibling);var r=st;t&&Kc(e,t)?Cm(r,n):(e.flags=e.flags&-4097|2,he=!1,st=e)}}else{if(Ei(e))throw Error(S(418));e.flags=e.flags&-4097|2,he=!1,st=e}}}function Zc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;st=e}function Yr(e){if(e!==st)return!1;if(!he)return Zc(e),he=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!bi(e.type,e.memoizedProps)),t&&(t=tt)){if(Ei(e))throw Sm(),Error(S(418));for(;t;)Cm(e,t),t=ds(t.nextSibling)}if(Zc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){tt=ds(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}tt=null}}else tt=st?ds(e.stateNode.nextSibling):null;return!0}function Sm(){for(var e=tt;e;)e=ds(e.nextSibling)}function bn(){tt=st=null,he=!1}function ko(e){jt===null?jt=[e]:jt.push(e)}var Kx=Yt.ReactCurrentBatchConfig;function $n(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(S(309));var r=n.stateNode}if(!r)throw Error(S(147,e));var l=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(i){var o=l.refs;i===null?delete o[a]:o[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(S(284));if(!n._owner)throw Error(S(290,e))}return e}function Jr(e,t){throw e=Object.prototype.toString.call(t),Error(S(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ed(e){var t=e._init;return t(e._payload)}function Em(e){function t(g,p){if(e){var y=g.deletions;y===null?(g.deletions=[p],g.flags|=16):y.push(p)}}function n(g,p){if(!e)return null;for(;p!==null;)t(g,p),p=p.sibling;return null}function r(g,p){for(g=new Map;p!==null;)p.key!==null?g.set(p.key,p):g.set(p.index,p),p=p.sibling;return g}function l(g,p){return g=ps(g,p),g.index=0,g.sibling=null,g}function a(g,p,y){return g.index=y,e?(y=g.alternate,y!==null?(y=y.index,y<p?(g.flags|=2,p):y):(g.flags|=2,p)):(g.flags|=1048576,p)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function o(g,p,y,b){return p===null||p.tag!==6?(p=qa(y,g.mode,b),p.return=g,p):(p=l(p,y),p.return=g,p)}function c(g,p,y,b){var L=y.type;return L===en?h(g,p,y.props.children,b,y.key):p!==null&&(p.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===es&&ed(L)===p.type)?(b=l(p,y.props),b.ref=$n(g,p,y),b.return=g,b):(b=yl(y.type,y.key,y.props,null,g.mode,b),b.ref=$n(g,p,y),b.return=g,b)}function d(g,p,y,b){return p===null||p.tag!==4||p.stateNode.containerInfo!==y.containerInfo||p.stateNode.implementation!==y.implementation?(p=Ba(y,g.mode,b),p.return=g,p):(p=l(p,y.children||[]),p.return=g,p)}function h(g,p,y,b,L){return p===null||p.tag!==7?(p=Fs(y,g.mode,b,L),p.return=g,p):(p=l(p,y),p.return=g,p)}function u(g,p,y){if(typeof p=="string"&&p!==""||typeof p=="number")return p=qa(""+p,g.mode,y),p.return=g,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Vr:return y=yl(p.type,p.key,p.props,null,g.mode,y),y.ref=$n(g,null,p),y.return=g,y;case Zs:return p=Ba(p,g.mode,y),p.return=g,p;case es:var b=p._init;return u(g,b(p._payload),y)}if(Yn(p)||Dn(p))return p=Fs(p,g.mode,y,null),p.return=g,p;Jr(g,p)}return null}function m(g,p,y,b){var L=p!==null?p.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return L!==null?null:o(g,p,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Vr:return y.key===L?c(g,p,y,b):null;case Zs:return y.key===L?d(g,p,y,b):null;case es:return L=y._init,m(g,p,L(y._payload),b)}if(Yn(y)||Dn(y))return L!==null?null:h(g,p,y,b,null);Jr(g,y)}return null}function x(g,p,y,b,L){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(y)||null,o(p,g,""+b,L);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Vr:return g=g.get(b.key===null?y:b.key)||null,c(p,g,b,L);case Zs:return g=g.get(b.key===null?y:b.key)||null,d(p,g,b,L);case es:var M=b._init;return x(g,p,y,M(b._payload),L)}if(Yn(b)||Dn(b))return g=g.get(y)||null,h(p,g,b,L,null);Jr(p,b)}return null}function f(g,p,y,b){for(var L=null,M=null,A=p,N=p=0,F=null;A!==null&&N<y.length;N++){A.index>N?(F=A,A=null):F=A.sibling;var R=m(g,A,y[N],b);if(R===null){A===null&&(A=F);break}e&&A&&R.alternate===null&&t(g,A),p=a(R,p,N),M===null?L=R:M.sibling=R,M=R,A=F}if(N===y.length)return n(g,A),he&&Es(g,N),L;if(A===null){for(;N<y.length;N++)A=u(g,y[N],b),A!==null&&(p=a(A,p,N),M===null?L=A:M.sibling=A,M=A);return he&&Es(g,N),L}for(A=r(g,A);N<y.length;N++)F=x(A,g,N,y[N],b),F!==null&&(e&&F.alternate!==null&&A.delete(F.key===null?N:F.key),p=a(F,p,N),M===null?L=F:M.sibling=F,M=F);return e&&A.forEach(function(G){return t(g,G)}),he&&Es(g,N),L}function v(g,p,y,b){var L=Dn(y);if(typeof L!="function")throw Error(S(150));if(y=L.call(y),y==null)throw Error(S(151));for(var M=L=null,A=p,N=p=0,F=null,R=y.next();A!==null&&!R.done;N++,R=y.next()){A.index>N?(F=A,A=null):F=A.sibling;var G=m(g,A,R.value,b);if(G===null){A===null&&(A=F);break}e&&A&&G.alternate===null&&t(g,A),p=a(G,p,N),M===null?L=G:M.sibling=G,M=G,A=F}if(R.done)return n(g,A),he&&Es(g,N),L;if(A===null){for(;!R.done;N++,R=y.next())R=u(g,R.value,b),R!==null&&(p=a(R,p,N),M===null?L=R:M.sibling=R,M=R);return he&&Es(g,N),L}for(A=r(g,A);!R.done;N++,R=y.next())R=x(A,g,N,R.value,b),R!==null&&(e&&R.alternate!==null&&A.delete(R.key===null?N:R.key),p=a(R,p,N),M===null?L=R:M.sibling=R,M=R);return e&&A.forEach(function(D){return t(g,D)}),he&&Es(g,N),L}function w(g,p,y,b){if(typeof y=="object"&&y!==null&&y.type===en&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Vr:e:{for(var L=y.key,M=p;M!==null;){if(M.key===L){if(L=y.type,L===en){if(M.tag===7){n(g,M.sibling),p=l(M,y.props.children),p.return=g,g=p;break e}}else if(M.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===es&&ed(L)===M.type){n(g,M.sibling),p=l(M,y.props),p.ref=$n(g,M,y),p.return=g,g=p;break e}n(g,M);break}else t(g,M);M=M.sibling}y.type===en?(p=Fs(y.props.children,g.mode,b,y.key),p.return=g,g=p):(b=yl(y.type,y.key,y.props,null,g.mode,b),b.ref=$n(g,p,y),b.return=g,g=b)}return i(g);case Zs:e:{for(M=y.key;p!==null;){if(p.key===M)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(g,p.sibling),p=l(p,y.children||[]),p.return=g,g=p;break e}else{n(g,p);break}else t(g,p);p=p.sibling}p=Ba(y,g.mode,b),p.return=g,g=p}return i(g);case es:return M=y._init,w(g,p,M(y._payload),b)}if(Yn(y))return f(g,p,y,b);if(Dn(y))return v(g,p,y,b);Jr(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,p!==null&&p.tag===6?(n(g,p.sibling),p=l(p,y),p.return=g,g=p):(n(g,p),p=qa(y,g.mode,b),p.return=g,g=p),i(g)):n(g,p)}return w}var kn=Em(!0),Lm=Em(!1),Fl=ks(null),Ml=null,cn=null,Co=null;function So(){Co=cn=Ml=null}function Eo(e){var t=Fl.current;me(Fl),e._currentValue=t}function Pi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function gn(e,t){Ml=e,Co=cn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qe=!0),e.firstContext=null)}function ht(e){var t=e._currentValue;if(Co!==e)if(e={context:e,memoizedValue:t,next:null},cn===null){if(Ml===null)throw Error(S(308));cn=e,Ml.dependencies={lanes:0,firstContext:e}}else cn=cn.next=e;return t}var Is=null;function Lo(e){Is===null?Is=[e]:Is.push(e)}function Pm(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Lo(t)):(n.next=l.next,l.next=n),t.interleaved=n,Wt(e,r)}function Wt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ts=!1;function Po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Im(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function us(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Wt(e,n)}return l=r.interleaved,l===null?(t.next=t,Lo(r)):(t.next=l.next,l.next=t),r.interleaved=t,Wt(e,n)}function hl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,po(e,n)}}function td(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?l=a=i:a=a.next=i,n=n.next}while(n!==null);a===null?l=a=t:a=a.next=t}else l=a=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Al(e,t,n,r){var l=e.updateQueue;ts=!1;var a=l.firstBaseUpdate,i=l.lastBaseUpdate,o=l.shared.pending;if(o!==null){l.shared.pending=null;var c=o,d=c.next;c.next=null,i===null?a=d:i.next=d,i=c;var h=e.alternate;h!==null&&(h=h.updateQueue,o=h.lastBaseUpdate,o!==i&&(o===null?h.firstBaseUpdate=d:o.next=d,h.lastBaseUpdate=c))}if(a!==null){var u=l.baseState;i=0,h=d=c=null,o=a;do{var m=o.lane,x=o.eventTime;if((r&m)===m){h!==null&&(h=h.next={eventTime:x,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var f=e,v=o;switch(m=t,x=n,v.tag){case 1:if(f=v.payload,typeof f=="function"){u=f.call(x,u,m);break e}u=f;break e;case 3:f.flags=f.flags&-65537|128;case 0:if(f=v.payload,m=typeof f=="function"?f.call(x,u,m):f,m==null)break e;u=ve({},u,m);break e;case 2:ts=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[o]:m.push(o))}else x={eventTime:x,lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(d=h=x,c=u):h=h.next=x,i|=m;if(o=o.next,o===null){if(o=l.shared.pending,o===null)break;m=o,o=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(h===null&&(c=u),l.baseState=c,l.firstBaseUpdate=d,l.lastBaseUpdate=h,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else a===null&&(l.shared.lanes=0);Ds|=i,e.lanes=i,e.memoizedState=u}}function sd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(S(191,l));l.call(r)}}}var Mr={},zt=ks(Mr),jr=ks(Mr),wr=ks(Mr);function Rs(e){if(e===Mr)throw Error(S(174));return e}function Io(e,t){switch(oe(wr,t),oe(jr,e),oe(zt,Mr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ci(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ci(t,e)}me(zt),oe(zt,t)}function Cn(){me(zt),me(jr),me(wr)}function Rm(e){Rs(wr.current);var t=Rs(zt.current),n=ci(t,e.type);t!==n&&(oe(jr,e),oe(zt,n))}function Ro(e){jr.current===e&&(me(zt),me(jr))}var xe=ks(0);function Tl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Aa=[];function zo(){for(var e=0;e<Aa.length;e++)Aa[e]._workInProgressVersionPrimary=null;Aa.length=0}var pl=Yt.ReactCurrentDispatcher,Ta=Yt.ReactCurrentBatchConfig,_s=0,fe=null,Le=null,ze=null,_l=!1,rr=!1,Nr=0,Zx=0;function Ve(){throw Error(S(321))}function Fo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!St(e[n],t[n]))return!1;return!0}function Mo(e,t,n,r,l,a){if(_s=a,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,pl.current=e===null||e.memoizedState===null?nf:rf,e=n(r,l),rr){a=0;do{if(rr=!1,Nr=0,25<=a)throw Error(S(301));a+=1,ze=Le=null,t.updateQueue=null,pl.current=lf,e=n(r,l)}while(rr)}if(pl.current=Dl,t=Le!==null&&Le.next!==null,_s=0,ze=Le=fe=null,_l=!1,t)throw Error(S(300));return e}function Ao(){var e=Nr!==0;return Nr=0,e}function Pt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?fe.memoizedState=ze=e:ze=ze.next=e,ze}function pt(){if(Le===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=ze===null?fe.memoizedState:ze.next;if(t!==null)ze=t,Le=e;else{if(e===null)throw Error(S(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},ze===null?fe.memoizedState=ze=e:ze=ze.next=e}return ze}function br(e,t){return typeof t=="function"?t(e):t}function _a(e){var t=pt(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=Le,l=r.baseQueue,a=n.pending;if(a!==null){if(l!==null){var i=l.next;l.next=a.next,a.next=i}r.baseQueue=l=a,n.pending=null}if(l!==null){a=l.next,r=r.baseState;var o=i=null,c=null,d=a;do{var h=d.lane;if((_s&h)===h)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var u={lane:h,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(o=c=u,i=r):c=c.next=u,fe.lanes|=h,Ds|=h}d=d.next}while(d!==null&&d!==a);c===null?i=r:c.next=o,St(r,t.memoizedState)||(Qe=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do a=l.lane,fe.lanes|=a,Ds|=a,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Da(e){var t=pt(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,a=t.memoizedState;if(l!==null){n.pending=null;var i=l=l.next;do a=e(a,i.action),i=i.next;while(i!==l);St(a,t.memoizedState)||(Qe=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function zm(){}function Fm(e,t){var n=fe,r=pt(),l=t(),a=!St(r.memoizedState,l);if(a&&(r.memoizedState=l,Qe=!0),r=r.queue,To(Tm.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||ze!==null&&ze.memoizedState.tag&1){if(n.flags|=2048,kr(9,Am.bind(null,n,r,l,t),void 0,null),Me===null)throw Error(S(349));_s&30||Mm(n,t,l)}return l}function Mm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Am(e,t,n,r){t.value=n,t.getSnapshot=r,_m(t)&&Dm(e)}function Tm(e,t,n){return n(function(){_m(t)&&Dm(e)})}function _m(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!St(e,n)}catch{return!0}}function Dm(e){var t=Wt(e,1);t!==null&&Ct(t,e,1,-1)}function nd(e){var t=Pt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:br,lastRenderedState:e},t.queue=e,e=e.dispatch=sf.bind(null,fe,e),[t.memoizedState,e]}function kr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Om(){return pt().memoizedState}function xl(e,t,n,r){var l=Pt();fe.flags|=e,l.memoizedState=kr(1|t,n,void 0,r===void 0?null:r)}function ea(e,t,n,r){var l=pt();r=r===void 0?null:r;var a=void 0;if(Le!==null){var i=Le.memoizedState;if(a=i.destroy,r!==null&&Fo(r,i.deps)){l.memoizedState=kr(t,n,a,r);return}}fe.flags|=e,l.memoizedState=kr(1|t,n,a,r)}function rd(e,t){return xl(8390656,8,e,t)}function To(e,t){return ea(2048,8,e,t)}function Vm(e,t){return ea(4,2,e,t)}function qm(e,t){return ea(4,4,e,t)}function Bm(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function $m(e,t,n){return n=n!=null?n.concat([e]):null,ea(4,4,Bm.bind(null,t,e),n)}function _o(){}function Hm(e,t){var n=pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Um(e,t){var n=pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Wm(e,t,n){return _s&21?(St(n,t)||(n=Ju(),fe.lanes|=n,Ds|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Qe=!0),e.memoizedState=n)}function ef(e,t){var n=ne;ne=n!==0&&4>n?n:4,e(!0);var r=Ta.transition;Ta.transition={};try{e(!1),t()}finally{ne=n,Ta.transition=r}}function Gm(){return pt().memoizedState}function tf(e,t,n){var r=hs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xm(e))Qm(t,n);else if(n=Pm(e,t,n,r),n!==null){var l=Ue();Ct(n,e,r,l),Ym(n,t,r)}}function sf(e,t,n){var r=hs(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xm(e))Qm(t,l);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,o=a(i,n);if(l.hasEagerState=!0,l.eagerState=o,St(o,i)){var c=t.interleaved;c===null?(l.next=l,Lo(t)):(l.next=c.next,c.next=l),t.interleaved=l;return}}catch{}finally{}n=Pm(e,t,l,r),n!==null&&(l=Ue(),Ct(n,e,r,l),Ym(n,t,r))}}function Xm(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function Qm(e,t){rr=_l=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ym(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,po(e,n)}}var Dl={readContext:ht,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useInsertionEffect:Ve,useLayoutEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useMutableSource:Ve,useSyncExternalStore:Ve,useId:Ve,unstable_isNewReconciler:!1},nf={readContext:ht,useCallback:function(e,t){return Pt().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:rd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,xl(4194308,4,Bm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xl(4194308,4,e,t)},useInsertionEffect:function(e,t){return xl(4,2,e,t)},useMemo:function(e,t){var n=Pt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Pt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=tf.bind(null,fe,e),[r.memoizedState,e]},useRef:function(e){var t=Pt();return e={current:e},t.memoizedState=e},useState:nd,useDebugValue:_o,useDeferredValue:function(e){return Pt().memoizedState=e},useTransition:function(){var e=nd(!1),t=e[0];return e=ef.bind(null,e[1]),Pt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fe,l=Pt();if(he){if(n===void 0)throw Error(S(407));n=n()}else{if(n=t(),Me===null)throw Error(S(349));_s&30||Mm(r,t,n)}l.memoizedState=n;var a={value:n,getSnapshot:t};return l.queue=a,rd(Tm.bind(null,r,a,e),[e]),r.flags|=2048,kr(9,Am.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Pt(),t=Me.identifierPrefix;if(he){var n=Bt,r=qt;n=(r&~(1<<32-kt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Nr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Zx++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},rf={readContext:ht,useCallback:Hm,useContext:ht,useEffect:To,useImperativeHandle:$m,useInsertionEffect:Vm,useLayoutEffect:qm,useMemo:Um,useReducer:_a,useRef:Om,useState:function(){return _a(br)},useDebugValue:_o,useDeferredValue:function(e){var t=pt();return Wm(t,Le.memoizedState,e)},useTransition:function(){var e=_a(br)[0],t=pt().memoizedState;return[e,t]},useMutableSource:zm,useSyncExternalStore:Fm,useId:Gm,unstable_isNewReconciler:!1},lf={readContext:ht,useCallback:Hm,useContext:ht,useEffect:To,useImperativeHandle:$m,useInsertionEffect:Vm,useLayoutEffect:qm,useMemo:Um,useReducer:Da,useRef:Om,useState:function(){return Da(br)},useDebugValue:_o,useDeferredValue:function(e){var t=pt();return Le===null?t.memoizedState=e:Wm(t,Le.memoizedState,e)},useTransition:function(){var e=Da(br)[0],t=pt().memoizedState;return[e,t]},useMutableSource:zm,useSyncExternalStore:Fm,useId:Gm,unstable_isNewReconciler:!1};function vt(e,t){if(e&&e.defaultProps){t=ve({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ii(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ve({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ta={isMounted:function(e){return(e=e._reactInternals)?Hs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ue(),l=hs(e),a=$t(r,l);a.payload=t,n!=null&&(a.callback=n),t=us(e,a,l),t!==null&&(Ct(t,e,l,r),hl(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ue(),l=hs(e),a=$t(r,l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=us(e,a,l),t!==null&&(Ct(t,e,l,r),hl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ue(),r=hs(e),l=$t(n,r);l.tag=2,t!=null&&(l.callback=t),t=us(e,l,r),t!==null&&(Ct(t,e,r,n),hl(t,e,r))}};function ld(e,t,n,r,l,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,i):t.prototype&&t.prototype.isPureReactComponent?!fr(n,r)||!fr(l,a):!0}function Jm(e,t,n){var r=!1,l=js,a=t.contextType;return typeof a=="object"&&a!==null?a=ht(a):(l=Je(t)?As:$e.current,r=t.contextTypes,a=(r=r!=null)?Nn(e,l):js),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ta,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),t}function ad(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ta.enqueueReplaceState(t,t.state,null)}function Ri(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Po(e);var a=t.contextType;typeof a=="object"&&a!==null?l.context=ht(a):(a=Je(t)?As:$e.current,l.context=Nn(e,a)),l.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Ii(e,t,a,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&ta.enqueueReplaceState(l,l.state,null),Al(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Sn(e,t){try{var n="",r=t;do n+=Fp(r),r=r.return;while(r);var l=n}catch(a){l=`
Error generating stack: `+a.message+`
`+a.stack}return{value:e,source:t,stack:l,digest:null}}function Oa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function zi(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var af=typeof WeakMap=="function"?WeakMap:Map;function Km(e,t,n){n=$t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vl||(Vl=!0,Bi=r),zi(e,t)},n}function Zm(e,t,n){n=$t(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){zi(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){zi(e,t),typeof r!="function"&&(ms===null?ms=new Set([this]):ms.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function id(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new af;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=wf.bind(null,e,t,n),t.then(e,e))}function od(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function cd(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$t(-1,1),t.tag=2,us(n,t,1))),n.lanes|=1),e)}var of=Yt.ReactCurrentOwner,Qe=!1;function He(e,t,n,r){t.child=e===null?Lm(t,null,n,r):kn(t,e.child,n,r)}function dd(e,t,n,r,l){n=n.render;var a=t.ref;return gn(t,l),r=Mo(e,t,n,r,a,l),n=Ao(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Gt(e,t,l)):(he&&n&&No(t),t.flags|=1,He(e,t,r,l),t.child)}function ud(e,t,n,r,l){if(e===null){var a=n.type;return typeof a=="function"&&!Uo(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,eh(e,t,a,r,l)):(e=yl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&l)){var i=a.memoizedProps;if(n=n.compare,n=n!==null?n:fr,n(i,r)&&e.ref===t.ref)return Gt(e,t,l)}return t.flags|=1,e=ps(a,r),e.ref=t.ref,e.return=t,t.child=e}function eh(e,t,n,r,l){if(e!==null){var a=e.memoizedProps;if(fr(a,r)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=r=a,(e.lanes&l)!==0)e.flags&131072&&(Qe=!0);else return t.lanes=e.lanes,Gt(e,t,l)}return Fi(e,t,n,r,l)}function th(e,t,n){var r=t.pendingProps,l=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(un,et),et|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe(un,et),et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,oe(un,et),et|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,oe(un,et),et|=r;return He(e,t,l,n),t.child}function sh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Fi(e,t,n,r,l){var a=Je(n)?As:$e.current;return a=Nn(t,a),gn(t,l),n=Mo(e,t,n,r,a,l),r=Ao(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Gt(e,t,l)):(he&&r&&No(t),t.flags|=1,He(e,t,n,l),t.child)}function md(e,t,n,r,l){if(Je(n)){var a=!0;Il(t)}else a=!1;if(gn(t,l),t.stateNode===null)fl(e,t),Jm(t,n,r),Ri(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,o=t.memoizedProps;i.props=o;var c=i.context,d=n.contextType;typeof d=="object"&&d!==null?d=ht(d):(d=Je(n)?As:$e.current,d=Nn(t,d));var h=n.getDerivedStateFromProps,u=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function";u||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==r||c!==d)&&ad(t,i,r,d),ts=!1;var m=t.memoizedState;i.state=m,Al(t,r,i,l),c=t.memoizedState,o!==r||m!==c||Ye.current||ts?(typeof h=="function"&&(Ii(t,n,h,r),c=t.memoizedState),(o=ts||ld(t,n,o,r,m,c,d))?(u||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=d,r=o):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Im(e,t),o=t.memoizedProps,d=t.type===t.elementType?o:vt(t.type,o),i.props=d,u=t.pendingProps,m=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=ht(c):(c=Je(n)?As:$e.current,c=Nn(t,c));var x=n.getDerivedStateFromProps;(h=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==u||m!==c)&&ad(t,i,r,c),ts=!1,m=t.memoizedState,i.state=m,Al(t,r,i,l);var f=t.memoizedState;o!==u||m!==f||Ye.current||ts?(typeof x=="function"&&(Ii(t,n,x,r),f=t.memoizedState),(d=ts||ld(t,n,d,r,m,f,c)||!1)?(h||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,f,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,f,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),i.props=r,i.state=f,i.context=c,r=d):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Mi(e,t,n,r,a,l)}function Mi(e,t,n,r,l,a){sh(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&Jc(t,n,!1),Gt(e,t,a);r=t.stateNode,of.current=t;var o=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=kn(t,e.child,null,a),t.child=kn(t,null,o,a)):He(e,t,o,a),t.memoizedState=r.state,l&&Jc(t,n,!0),t.child}function nh(e){var t=e.stateNode;t.pendingContext?Yc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Yc(e,t.context,!1),Io(e,t.containerInfo)}function hd(e,t,n,r,l){return bn(),ko(l),t.flags|=256,He(e,t,n,r),t.child}var Ai={dehydrated:null,treeContext:null,retryLane:0};function Ti(e){return{baseLanes:e,cachePool:null,transitions:null}}function rh(e,t,n){var r=t.pendingProps,l=xe.current,a=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(l&2)!==0),o?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),oe(xe,l&1),e===null)return Li(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,a?(r=t.mode,a=t.child,i={mode:"hidden",children:i},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=i):a=ra(i,r,0,null),e=Fs(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ti(n),t.memoizedState=Ai,e):Do(t,i));if(l=e.memoizedState,l!==null&&(o=l.dehydrated,o!==null))return cf(e,t,i,r,o,l,n);if(a){a=r.fallback,i=t.mode,l=e.child,o=l.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ps(l,c),r.subtreeFlags=l.subtreeFlags&14680064),o!==null?a=ps(o,a):(a=Fs(a,i,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,i=e.child.memoizedState,i=i===null?Ti(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~n,t.memoizedState=Ai,r}return a=e.child,e=a.sibling,r=ps(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Do(e,t){return t=ra({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Kr(e,t,n,r){return r!==null&&ko(r),kn(t,e.child,null,n),e=Do(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cf(e,t,n,r,l,a,i){if(n)return t.flags&256?(t.flags&=-257,r=Oa(Error(S(422))),Kr(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,l=t.mode,r=ra({mode:"visible",children:r.children},l,0,null),a=Fs(a,l,i,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&kn(t,e.child,null,i),t.child.memoizedState=Ti(i),t.memoizedState=Ai,a);if(!(t.mode&1))return Kr(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var o=r.dgst;return r=o,a=Error(S(419)),r=Oa(a,r,void 0),Kr(e,t,i,r)}if(o=(i&e.childLanes)!==0,Qe||o){if(r=Me,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==a.retryLane&&(a.retryLane=l,Wt(e,l),Ct(r,e,l,-1))}return Ho(),r=Oa(Error(S(421))),Kr(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Nf.bind(null,e),l._reactRetry=t,null):(e=a.treeContext,tt=ds(l.nextSibling),st=t,he=!0,jt=null,e!==null&&(ct[dt++]=qt,ct[dt++]=Bt,ct[dt++]=Ts,qt=e.id,Bt=e.overflow,Ts=t),t=Do(t,r.children),t.flags|=4096,t)}function pd(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Pi(e.return,t,n)}function Va(e,t,n,r,l){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=l)}function lh(e,t,n){var r=t.pendingProps,l=r.revealOrder,a=r.tail;if(He(e,t,r.children,n),r=xe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&pd(e,n,t);else if(e.tag===19)pd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oe(xe,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Tl(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Va(t,!1,l,n,a);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Tl(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Va(t,!0,n,null,a);break;case"together":Va(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ds|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,n=ps(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ps(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function df(e,t,n){switch(t.tag){case 3:nh(t),bn();break;case 5:Rm(t);break;case 1:Je(t.type)&&Il(t);break;case 4:Io(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;oe(Fl,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(oe(xe,xe.current&1),t.flags|=128,null):n&t.child.childLanes?rh(e,t,n):(oe(xe,xe.current&1),e=Gt(e,t,n),e!==null?e.sibling:null);oe(xe,xe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return lh(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),oe(xe,xe.current),r)break;return null;case 22:case 23:return t.lanes=0,th(e,t,n)}return Gt(e,t,n)}var ah,_i,ih,oh;ah=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};_i=function(){};ih=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Rs(zt.current);var a=null;switch(n){case"input":l=li(e,l),r=li(e,r),a=[];break;case"select":l=ve({},l,{value:void 0}),r=ve({},r,{value:void 0}),a=[];break;case"textarea":l=oi(e,l),r=oi(e,r),a=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ll)}di(n,r);var i;n=null;for(d in l)if(!r.hasOwnProperty(d)&&l.hasOwnProperty(d)&&l[d]!=null)if(d==="style"){var o=l[d];for(i in o)o.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(cr.hasOwnProperty(d)?a||(a=[]):(a=a||[]).push(d,null));for(d in r){var c=r[d];if(o=l!=null?l[d]:void 0,r.hasOwnProperty(d)&&c!==o&&(c!=null||o!=null))if(d==="style")if(o){for(i in o)!o.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&o[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(a||(a=[]),a.push(d,n)),n=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(a=a||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(cr.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&ue("scroll",e),a||o===c||(a=[])):(a=a||[]).push(d,c))}n&&(a=a||[]).push("style",n);var d=a;(t.updateQueue=d)&&(t.flags|=4)}};oh=function(e,t,n,r){n!==r&&(t.flags|=4)};function Hn(e,t){if(!he)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function uf(e,t,n){var r=t.pendingProps;switch(bo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return Je(t.type)&&Pl(),qe(t),null;case 3:return r=t.stateNode,Cn(),me(Ye),me($e),zo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Yr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,jt!==null&&(Ui(jt),jt=null))),_i(e,t),qe(t),null;case 5:Ro(t);var l=Rs(wr.current);if(n=t.type,e!==null&&t.stateNode!=null)ih(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(S(166));return qe(t),null}if(e=Rs(zt.current),Yr(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[It]=t,r[yr]=a,e=(t.mode&1)!==0,n){case"dialog":ue("cancel",r),ue("close",r);break;case"iframe":case"object":case"embed":ue("load",r);break;case"video":case"audio":for(l=0;l<Kn.length;l++)ue(Kn[l],r);break;case"source":ue("error",r);break;case"img":case"image":case"link":ue("error",r),ue("load",r);break;case"details":ue("toggle",r);break;case"input":bc(r,a),ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},ue("invalid",r);break;case"textarea":Cc(r,a),ue("invalid",r)}di(n,a),l=null;for(var i in a)if(a.hasOwnProperty(i)){var o=a[i];i==="children"?typeof o=="string"?r.textContent!==o&&(a.suppressHydrationWarning!==!0&&Qr(r.textContent,o,e),l=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(a.suppressHydrationWarning!==!0&&Qr(r.textContent,o,e),l=["children",""+o]):cr.hasOwnProperty(i)&&o!=null&&i==="onScroll"&&ue("scroll",r)}switch(n){case"input":qr(r),kc(r,a,!0);break;case"textarea":qr(r),Sc(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Ll)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Tu(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[It]=t,e[yr]=r,ah(e,t,!1,!1),t.stateNode=e;e:{switch(i=ui(n,r),n){case"dialog":ue("cancel",e),ue("close",e),l=r;break;case"iframe":case"object":case"embed":ue("load",e),l=r;break;case"video":case"audio":for(l=0;l<Kn.length;l++)ue(Kn[l],e);l=r;break;case"source":ue("error",e),l=r;break;case"img":case"image":case"link":ue("error",e),ue("load",e),l=r;break;case"details":ue("toggle",e),l=r;break;case"input":bc(e,r),l=li(e,r),ue("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=ve({},r,{value:void 0}),ue("invalid",e);break;case"textarea":Cc(e,r),l=oi(e,r),ue("invalid",e);break;default:l=r}di(n,l),o=l;for(a in o)if(o.hasOwnProperty(a)){var c=o[a];a==="style"?Ou(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&_u(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&dr(e,c):typeof c=="number"&&dr(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(cr.hasOwnProperty(a)?c!=null&&a==="onScroll"&&ue("scroll",e):c!=null&&io(e,a,c,i))}switch(n){case"input":qr(e),kc(e,r,!1);break;case"textarea":qr(e),Sc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ys(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?hn(e,!!r.multiple,a,!1):r.defaultValue!=null&&hn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Ll)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return qe(t),null;case 6:if(e&&t.stateNode!=null)oh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(S(166));if(n=Rs(wr.current),Rs(zt.current),Yr(t)){if(r=t.stateNode,n=t.memoizedProps,r[It]=t,(a=r.nodeValue!==n)&&(e=st,e!==null))switch(e.tag){case 3:Qr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Qr(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[It]=t,t.stateNode=r}return qe(t),null;case 13:if(me(xe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(he&&tt!==null&&t.mode&1&&!(t.flags&128))Sm(),bn(),t.flags|=98560,a=!1;else if(a=Yr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(S(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(S(317));a[It]=t}else bn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qe(t),a=!1}else jt!==null&&(Ui(jt),jt=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||xe.current&1?Pe===0&&(Pe=3):Ho())),t.updateQueue!==null&&(t.flags|=4),qe(t),null);case 4:return Cn(),_i(e,t),e===null&&gr(t.stateNode.containerInfo),qe(t),null;case 10:return Eo(t.type._context),qe(t),null;case 17:return Je(t.type)&&Pl(),qe(t),null;case 19:if(me(xe),a=t.memoizedState,a===null)return qe(t),null;if(r=(t.flags&128)!==0,i=a.rendering,i===null)if(r)Hn(a,!1);else{if(Pe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Tl(e),i!==null){for(t.flags|=128,Hn(a,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,i=a.alternate,i===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oe(xe,xe.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ne()>En&&(t.flags|=128,r=!0,Hn(a,!1),t.lanes=4194304)}else{if(!r)if(e=Tl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!he)return qe(t),null}else 2*Ne()-a.renderingStartTime>En&&n!==1073741824&&(t.flags|=128,r=!0,Hn(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(n=a.last,n!==null?n.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ne(),t.sibling=null,n=xe.current,oe(xe,r?n&1|2:n&1),t):(qe(t),null);case 22:case 23:return $o(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?et&1073741824&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function mf(e,t){switch(bo(t),t.tag){case 1:return Je(t.type)&&Pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cn(),me(Ye),me($e),zo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ro(t),null;case 13:if(me(xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));bn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(xe),null;case 4:return Cn(),null;case 10:return Eo(t.type._context),null;case 22:case 23:return $o(),null;case 24:return null;default:return null}}var Zr=!1,Be=!1,hf=typeof WeakSet=="function"?WeakSet:Set,_=null;function dn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Di(e,t,n){try{n()}catch(r){je(e,t,r)}}var xd=!1;function pf(e,t){if(wi=Cl,e=hm(),wo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var i=0,o=-1,c=-1,d=0,h=0,u=e,m=null;t:for(;;){for(var x;u!==n||l!==0&&u.nodeType!==3||(o=i+l),u!==a||r!==0&&u.nodeType!==3||(c=i+r),u.nodeType===3&&(i+=u.nodeValue.length),(x=u.firstChild)!==null;)m=u,u=x;for(;;){if(u===e)break t;if(m===n&&++d===l&&(o=i),m===a&&++h===r&&(c=i),(x=u.nextSibling)!==null)break;u=m,m=u.parentNode}u=x}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ni={focusedElem:e,selectionRange:n},Cl=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;try{var f=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(f!==null){var v=f.memoizedProps,w=f.memoizedState,g=t.stateNode,p=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:vt(t.type,v),w);g.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(b){je(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return f=xd,xd=!1,f}function lr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var a=l.destroy;l.destroy=void 0,a!==void 0&&Di(t,n,a)}l=l.next}while(l!==r)}}function sa(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Oi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ch(e){var t=e.alternate;t!==null&&(e.alternate=null,ch(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[It],delete t[yr],delete t[Ci],delete t[Qx],delete t[Yx])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function dh(e){return e.tag===5||e.tag===3||e.tag===4}function fd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ll));else if(r!==4&&(e=e.child,e!==null))for(Vi(e,t,n),e=e.sibling;e!==null;)Vi(e,t,n),e=e.sibling}function qi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(qi(e,t,n),e=e.sibling;e!==null;)qi(e,t,n),e=e.sibling}var Ae=null,yt=!1;function Jt(e,t,n){for(n=n.child;n!==null;)uh(e,t,n),n=n.sibling}function uh(e,t,n){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(Xl,n)}catch{}switch(n.tag){case 5:Be||dn(n,t);case 6:var r=Ae,l=yt;Ae=null,Jt(e,t,n),Ae=r,yt=l,Ae!==null&&(yt?(e=Ae,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ae.removeChild(n.stateNode));break;case 18:Ae!==null&&(yt?(e=Ae,n=n.stateNode,e.nodeType===8?Fa(e.parentNode,n):e.nodeType===1&&Fa(e,n),pr(e)):Fa(Ae,n.stateNode));break;case 4:r=Ae,l=yt,Ae=n.stateNode.containerInfo,yt=!0,Jt(e,t,n),Ae=r,yt=l;break;case 0:case 11:case 14:case 15:if(!Be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var a=l,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&Di(n,t,i),l=l.next}while(l!==r)}Jt(e,t,n);break;case 1:if(!Be&&(dn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){je(n,t,o)}Jt(e,t,n);break;case 21:Jt(e,t,n);break;case 22:n.mode&1?(Be=(r=Be)||n.memoizedState!==null,Jt(e,t,n),Be=r):Jt(e,t,n);break;default:Jt(e,t,n)}}function gd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new hf),t.forEach(function(r){var l=bf.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function gt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var a=e,i=t,o=i;e:for(;o!==null;){switch(o.tag){case 5:Ae=o.stateNode,yt=!1;break e;case 3:Ae=o.stateNode.containerInfo,yt=!0;break e;case 4:Ae=o.stateNode.containerInfo,yt=!0;break e}o=o.return}if(Ae===null)throw Error(S(160));uh(a,i,l),Ae=null,yt=!1;var c=l.alternate;c!==null&&(c.return=null),l.return=null}catch(d){je(l,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)mh(t,e),t=t.sibling}function mh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gt(t,e),Lt(e),r&4){try{lr(3,e,e.return),sa(3,e)}catch(v){je(e,e.return,v)}try{lr(5,e,e.return)}catch(v){je(e,e.return,v)}}break;case 1:gt(t,e),Lt(e),r&512&&n!==null&&dn(n,n.return);break;case 5:if(gt(t,e),Lt(e),r&512&&n!==null&&dn(n,n.return),e.flags&32){var l=e.stateNode;try{dr(l,"")}catch(v){je(e,e.return,v)}}if(r&4&&(l=e.stateNode,l!=null)){var a=e.memoizedProps,i=n!==null?n.memoizedProps:a,o=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{o==="input"&&a.type==="radio"&&a.name!=null&&Mu(l,a),ui(o,i);var d=ui(o,a);for(i=0;i<c.length;i+=2){var h=c[i],u=c[i+1];h==="style"?Ou(l,u):h==="dangerouslySetInnerHTML"?_u(l,u):h==="children"?dr(l,u):io(l,h,u,d)}switch(o){case"input":ai(l,a);break;case"textarea":Au(l,a);break;case"select":var m=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!a.multiple;var x=a.value;x!=null?hn(l,!!a.multiple,x,!1):m!==!!a.multiple&&(a.defaultValue!=null?hn(l,!!a.multiple,a.defaultValue,!0):hn(l,!!a.multiple,a.multiple?[]:"",!1))}l[yr]=a}catch(v){je(e,e.return,v)}}break;case 6:if(gt(t,e),Lt(e),r&4){if(e.stateNode===null)throw Error(S(162));l=e.stateNode,a=e.memoizedProps;try{l.nodeValue=a}catch(v){je(e,e.return,v)}}break;case 3:if(gt(t,e),Lt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{pr(t.containerInfo)}catch(v){je(e,e.return,v)}break;case 4:gt(t,e),Lt(e);break;case 13:gt(t,e),Lt(e),l=e.child,l.flags&8192&&(a=l.memoizedState!==null,l.stateNode.isHidden=a,!a||l.alternate!==null&&l.alternate.memoizedState!==null||(qo=Ne())),r&4&&gd(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Be=(d=Be)||h,gt(t,e),Be=d):gt(t,e),Lt(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!h&&e.mode&1)for(_=e,h=e.child;h!==null;){for(u=_=h;_!==null;){switch(m=_,x=m.child,m.tag){case 0:case 11:case 14:case 15:lr(4,m,m.return);break;case 1:dn(m,m.return);var f=m.stateNode;if(typeof f.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(v){je(r,n,v)}}break;case 5:dn(m,m.return);break;case 22:if(m.memoizedState!==null){yd(u);continue}}x!==null?(x.return=m,_=x):yd(u)}h=h.sibling}e:for(h=null,u=e;;){if(u.tag===5){if(h===null){h=u;try{l=u.stateNode,d?(a=l.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(o=u.stateNode,c=u.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=Du("display",i))}catch(v){je(e,e.return,v)}}}else if(u.tag===6){if(h===null)try{u.stateNode.nodeValue=d?"":u.memoizedProps}catch(v){je(e,e.return,v)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:gt(t,e),Lt(e),r&4&&gd(e);break;case 21:break;default:gt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(dh(n)){var r=n;break e}n=n.return}throw Error(S(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(dr(l,""),r.flags&=-33);var a=fd(e);qi(e,a,l);break;case 3:case 4:var i=r.stateNode.containerInfo,o=fd(e);Vi(e,o,i);break;default:throw Error(S(161))}}catch(c){je(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xf(e,t,n){_=e,hh(e)}function hh(e,t,n){for(var r=(e.mode&1)!==0;_!==null;){var l=_,a=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||Zr;if(!i){var o=l.alternate,c=o!==null&&o.memoizedState!==null||Be;o=Zr;var d=Be;if(Zr=i,(Be=c)&&!d)for(_=l;_!==null;)i=_,c=i.child,i.tag===22&&i.memoizedState!==null?jd(l):c!==null?(c.return=i,_=c):jd(l);for(;a!==null;)_=a,hh(a),a=a.sibling;_=l,Zr=o,Be=d}vd(e)}else l.subtreeFlags&8772&&a!==null?(a.return=l,_=a):vd(e)}}function vd(e){for(;_!==null;){var t=_;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Be||sa(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Be)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:vt(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&sd(t,a,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}sd(t,i,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var h=d.memoizedState;if(h!==null){var u=h.dehydrated;u!==null&&pr(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(S(163))}Be||t.flags&512&&Oi(t)}catch(m){je(t,t.return,m)}}if(t===e){_=null;break}if(n=t.sibling,n!==null){n.return=t.return,_=n;break}_=t.return}}function yd(e){for(;_!==null;){var t=_;if(t===e){_=null;break}var n=t.sibling;if(n!==null){n.return=t.return,_=n;break}_=t.return}}function jd(e){for(;_!==null;){var t=_;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{sa(4,t)}catch(c){je(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(c){je(t,l,c)}}var a=t.return;try{Oi(t)}catch(c){je(t,a,c)}break;case 5:var i=t.return;try{Oi(t)}catch(c){je(t,i,c)}}}catch(c){je(t,t.return,c)}if(t===e){_=null;break}var o=t.sibling;if(o!==null){o.return=t.return,_=o;break}_=t.return}}var ff=Math.ceil,Ol=Yt.ReactCurrentDispatcher,Oo=Yt.ReactCurrentOwner,mt=Yt.ReactCurrentBatchConfig,J=0,Me=null,Ce=null,Te=0,et=0,un=ks(0),Pe=0,Cr=null,Ds=0,na=0,Vo=0,ar=null,Xe=null,qo=0,En=1/0,Ot=null,Vl=!1,Bi=null,ms=null,el=!1,ls=null,ql=0,ir=0,$i=null,gl=-1,vl=0;function Ue(){return J&6?Ne():gl!==-1?gl:gl=Ne()}function hs(e){return e.mode&1?J&2&&Te!==0?Te&-Te:Kx.transition!==null?(vl===0&&(vl=Ju()),vl):(e=ne,e!==0||(e=window.event,e=e===void 0?16:rm(e.type)),e):1}function Ct(e,t,n,r){if(50<ir)throw ir=0,$i=null,Error(S(185));Rr(e,n,r),(!(J&2)||e!==Me)&&(e===Me&&(!(J&2)&&(na|=n),Pe===4&&ns(e,Te)),Ke(e,r),n===1&&J===0&&!(t.mode&1)&&(En=Ne()+500,Zl&&Cs()))}function Ke(e,t){var n=e.callbackNode;Kp(e,t);var r=kl(e,e===Me?Te:0);if(r===0)n!==null&&Pc(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Pc(n),t===1)e.tag===0?Jx(wd.bind(null,e)):bm(wd.bind(null,e)),Gx(function(){!(J&6)&&Cs()}),n=null;else{switch(Ku(r)){case 1:n=ho;break;case 4:n=Qu;break;case 16:n=bl;break;case 536870912:n=Yu;break;default:n=bl}n=wh(n,ph.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ph(e,t){if(gl=-1,vl=0,J&6)throw Error(S(327));var n=e.callbackNode;if(vn()&&e.callbackNode!==n)return null;var r=kl(e,e===Me?Te:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Bl(e,r);else{t=r;var l=J;J|=2;var a=fh();(Me!==e||Te!==t)&&(Ot=null,En=Ne()+500,zs(e,t));do try{yf();break}catch(o){xh(e,o)}while(!0);So(),Ol.current=a,J=l,Ce!==null?t=0:(Me=null,Te=0,t=Pe)}if(t!==0){if(t===2&&(l=fi(e),l!==0&&(r=l,t=Hi(e,l))),t===1)throw n=Cr,zs(e,0),ns(e,r),Ke(e,Ne()),n;if(t===6)ns(e,r);else{if(l=e.current.alternate,!(r&30)&&!gf(l)&&(t=Bl(e,r),t===2&&(a=fi(e),a!==0&&(r=a,t=Hi(e,a))),t===1))throw n=Cr,zs(e,0),ns(e,r),Ke(e,Ne()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(S(345));case 2:Ls(e,Xe,Ot);break;case 3:if(ns(e,r),(r&130023424)===r&&(t=qo+500-Ne(),10<t)){if(kl(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){Ue(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=ki(Ls.bind(null,e,Xe,Ot),t);break}Ls(e,Xe,Ot);break;case 4:if(ns(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var i=31-kt(r);a=1<<i,i=t[i],i>l&&(l=i),r&=~a}if(r=l,r=Ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ff(r/1960))-r,10<r){e.timeoutHandle=ki(Ls.bind(null,e,Xe,Ot),r);break}Ls(e,Xe,Ot);break;case 5:Ls(e,Xe,Ot);break;default:throw Error(S(329))}}}return Ke(e,Ne()),e.callbackNode===n?ph.bind(null,e):null}function Hi(e,t){var n=ar;return e.current.memoizedState.isDehydrated&&(zs(e,t).flags|=256),e=Bl(e,t),e!==2&&(t=Xe,Xe=n,t!==null&&Ui(t)),e}function Ui(e){Xe===null?Xe=e:Xe.push.apply(Xe,e)}function gf(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],a=l.getSnapshot;l=l.value;try{if(!St(a(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ns(e,t){for(t&=~Vo,t&=~na,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-kt(t),r=1<<n;e[n]=-1,t&=~r}}function wd(e){if(J&6)throw Error(S(327));vn();var t=kl(e,0);if(!(t&1))return Ke(e,Ne()),null;var n=Bl(e,t);if(e.tag!==0&&n===2){var r=fi(e);r!==0&&(t=r,n=Hi(e,r))}if(n===1)throw n=Cr,zs(e,0),ns(e,t),Ke(e,Ne()),n;if(n===6)throw Error(S(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ls(e,Xe,Ot),Ke(e,Ne()),null}function Bo(e,t){var n=J;J|=1;try{return e(t)}finally{J=n,J===0&&(En=Ne()+500,Zl&&Cs())}}function Os(e){ls!==null&&ls.tag===0&&!(J&6)&&vn();var t=J;J|=1;var n=mt.transition,r=ne;try{if(mt.transition=null,ne=1,e)return e()}finally{ne=r,mt.transition=n,J=t,!(J&6)&&Cs()}}function $o(){et=un.current,me(un)}function zs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Wx(n)),Ce!==null)for(n=Ce.return;n!==null;){var r=n;switch(bo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Pl();break;case 3:Cn(),me(Ye),me($e),zo();break;case 5:Ro(r);break;case 4:Cn();break;case 13:me(xe);break;case 19:me(xe);break;case 10:Eo(r.type._context);break;case 22:case 23:$o()}n=n.return}if(Me=e,Ce=e=ps(e.current,null),Te=et=t,Pe=0,Cr=null,Vo=na=Ds=0,Xe=ar=null,Is!==null){for(t=0;t<Is.length;t++)if(n=Is[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,a=n.pending;if(a!==null){var i=a.next;a.next=l,r.next=i}n.pending=r}Is=null}return e}function xh(e,t){do{var n=Ce;try{if(So(),pl.current=Dl,_l){for(var r=fe.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}_l=!1}if(_s=0,ze=Le=fe=null,rr=!1,Nr=0,Oo.current=null,n===null||n.return===null){Pe=1,Cr=t,Ce=null;break}e:{var a=e,i=n.return,o=n,c=t;if(t=Te,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,h=o,u=h.tag;if(!(h.mode&1)&&(u===0||u===11||u===15)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var x=od(i);if(x!==null){x.flags&=-257,cd(x,i,o,a,t),x.mode&1&&id(a,d,t),t=x,c=d;var f=t.updateQueue;if(f===null){var v=new Set;v.add(c),t.updateQueue=v}else f.add(c);break e}else{if(!(t&1)){id(a,d,t),Ho();break e}c=Error(S(426))}}else if(he&&o.mode&1){var w=od(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),cd(w,i,o,a,t),ko(Sn(c,o));break e}}a=c=Sn(c,o),Pe!==4&&(Pe=2),ar===null?ar=[a]:ar.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=Km(a,c,t);td(a,g);break e;case 1:o=c;var p=a.type,y=a.stateNode;if(!(a.flags&128)&&(typeof p.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ms===null||!ms.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var b=Zm(a,o,t);td(a,b);break e}}a=a.return}while(a!==null)}vh(n)}catch(L){t=L,Ce===n&&n!==null&&(Ce=n=n.return);continue}break}while(!0)}function fh(){var e=Ol.current;return Ol.current=Dl,e===null?Dl:e}function Ho(){(Pe===0||Pe===3||Pe===2)&&(Pe=4),Me===null||!(Ds&268435455)&&!(na&268435455)||ns(Me,Te)}function Bl(e,t){var n=J;J|=2;var r=fh();(Me!==e||Te!==t)&&(Ot=null,zs(e,t));do try{vf();break}catch(l){xh(e,l)}while(!0);if(So(),J=n,Ol.current=r,Ce!==null)throw Error(S(261));return Me=null,Te=0,Pe}function vf(){for(;Ce!==null;)gh(Ce)}function yf(){for(;Ce!==null&&!$p();)gh(Ce)}function gh(e){var t=jh(e.alternate,e,et);e.memoizedProps=e.pendingProps,t===null?vh(e):Ce=t,Oo.current=null}function vh(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=mf(n,t),n!==null){n.flags&=32767,Ce=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Pe=6,Ce=null;return}}else if(n=uf(n,t,et),n!==null){Ce=n;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);Pe===0&&(Pe=5)}function Ls(e,t,n){var r=ne,l=mt.transition;try{mt.transition=null,ne=1,jf(e,t,n,r)}finally{mt.transition=l,ne=r}return null}function jf(e,t,n,r){do vn();while(ls!==null);if(J&6)throw Error(S(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(S(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(Zp(e,a),e===Me&&(Ce=Me=null,Te=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||el||(el=!0,wh(bl,function(){return vn(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=mt.transition,mt.transition=null;var i=ne;ne=1;var o=J;J|=4,Oo.current=null,pf(e,n),mh(n,e),Ox(Ni),Cl=!!wi,Ni=wi=null,e.current=n,xf(n),Hp(),J=o,ne=i,mt.transition=a}else e.current=n;if(el&&(el=!1,ls=e,ql=l),a=e.pendingLanes,a===0&&(ms=null),Gp(n.stateNode),Ke(e,Ne()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(Vl)throw Vl=!1,e=Bi,Bi=null,e;return ql&1&&e.tag!==0&&vn(),a=e.pendingLanes,a&1?e===$i?ir++:(ir=0,$i=e):ir=0,Cs(),null}function vn(){if(ls!==null){var e=Ku(ql),t=mt.transition,n=ne;try{if(mt.transition=null,ne=16>e?16:e,ls===null)var r=!1;else{if(e=ls,ls=null,ql=0,J&6)throw Error(S(331));var l=J;for(J|=4,_=e.current;_!==null;){var a=_,i=a.child;if(_.flags&16){var o=a.deletions;if(o!==null){for(var c=0;c<o.length;c++){var d=o[c];for(_=d;_!==null;){var h=_;switch(h.tag){case 0:case 11:case 15:lr(8,h,a)}var u=h.child;if(u!==null)u.return=h,_=u;else for(;_!==null;){h=_;var m=h.sibling,x=h.return;if(ch(h),h===d){_=null;break}if(m!==null){m.return=x,_=m;break}_=x}}}var f=a.alternate;if(f!==null){var v=f.child;if(v!==null){f.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}_=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,_=i;else e:for(;_!==null;){if(a=_,a.flags&2048)switch(a.tag){case 0:case 11:case 15:lr(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,_=g;break e}_=a.return}}var p=e.current;for(_=p;_!==null;){i=_;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,_=y;else e:for(i=p;_!==null;){if(o=_,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:sa(9,o)}}catch(L){je(o,o.return,L)}if(o===i){_=null;break e}var b=o.sibling;if(b!==null){b.return=o.return,_=b;break e}_=o.return}}if(J=l,Cs(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(Xl,e)}catch{}r=!0}return r}finally{ne=n,mt.transition=t}}return!1}function Nd(e,t,n){t=Sn(n,t),t=Km(e,t,1),e=us(e,t,1),t=Ue(),e!==null&&(Rr(e,1,t),Ke(e,t))}function je(e,t,n){if(e.tag===3)Nd(e,e,n);else for(;t!==null;){if(t.tag===3){Nd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ms===null||!ms.has(r))){e=Sn(n,e),e=Zm(t,e,1),t=us(t,e,1),e=Ue(),t!==null&&(Rr(t,1,e),Ke(t,e));break}}t=t.return}}function wf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ue(),e.pingedLanes|=e.suspendedLanes&n,Me===e&&(Te&n)===n&&(Pe===4||Pe===3&&(Te&130023424)===Te&&500>Ne()-qo?zs(e,0):Vo|=n),Ke(e,t)}function yh(e,t){t===0&&(e.mode&1?(t=Hr,Hr<<=1,!(Hr&130023424)&&(Hr=4194304)):t=1);var n=Ue();e=Wt(e,t),e!==null&&(Rr(e,t,n),Ke(e,n))}function Nf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yh(e,n)}function bf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(S(314))}r!==null&&r.delete(t),yh(e,n)}var jh;jh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Qe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Qe=!1,df(e,t,n);Qe=!!(e.flags&131072)}else Qe=!1,he&&t.flags&1048576&&km(t,zl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;fl(e,t),e=t.pendingProps;var l=Nn(t,$e.current);gn(t,n),l=Mo(null,t,r,e,l,n);var a=Ao();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Je(r)?(a=!0,Il(t)):a=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Po(t),l.updater=ta,t.stateNode=l,l._reactInternals=t,Ri(t,r,e,n),t=Mi(null,t,r,!0,a,n)):(t.tag=0,he&&a&&No(t),He(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(fl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Cf(r),e=vt(r,e),l){case 0:t=Fi(null,t,r,e,n);break e;case 1:t=md(null,t,r,e,n);break e;case 11:t=dd(null,t,r,e,n);break e;case 14:t=ud(null,t,r,vt(r.type,e),n);break e}throw Error(S(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),Fi(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),md(e,t,r,l,n);case 3:e:{if(nh(t),e===null)throw Error(S(387));r=t.pendingProps,a=t.memoizedState,l=a.element,Im(e,t),Al(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){l=Sn(Error(S(423)),t),t=hd(e,t,r,n,l);break e}else if(r!==l){l=Sn(Error(S(424)),t),t=hd(e,t,r,n,l);break e}else for(tt=ds(t.stateNode.containerInfo.firstChild),st=t,he=!0,jt=null,n=Lm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bn(),r===l){t=Gt(e,t,n);break e}He(e,t,r,n)}t=t.child}return t;case 5:return Rm(t),e===null&&Li(t),r=t.type,l=t.pendingProps,a=e!==null?e.memoizedProps:null,i=l.children,bi(r,l)?i=null:a!==null&&bi(r,a)&&(t.flags|=32),sh(e,t),He(e,t,i,n),t.child;case 6:return e===null&&Li(t),null;case 13:return rh(e,t,n);case 4:return Io(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=kn(t,null,r,n):He(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),dd(e,t,r,l,n);case 7:return He(e,t,t.pendingProps,n),t.child;case 8:return He(e,t,t.pendingProps.children,n),t.child;case 12:return He(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,a=t.memoizedProps,i=l.value,oe(Fl,r._currentValue),r._currentValue=i,a!==null)if(St(a.value,i)){if(a.children===l.children&&!Ye.current){t=Gt(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){i=a.child;for(var c=o.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=$t(-1,n&-n),c.tag=2;var d=a.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?c.next=c:(c.next=h.next,h.next=c),d.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Pi(a.return,n,t),o.lanes|=n;break}c=c.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(S(341));i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),Pi(i,n,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}He(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,gn(t,n),l=ht(l),r=r(l),t.flags|=1,He(e,t,r,n),t.child;case 14:return r=t.type,l=vt(r,t.pendingProps),l=vt(r.type,l),ud(e,t,r,l,n);case 15:return eh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),fl(e,t),t.tag=1,Je(r)?(e=!0,Il(t)):e=!1,gn(t,n),Jm(t,r,l),Ri(t,r,l,n),Mi(null,t,r,!0,e,n);case 19:return lh(e,t,n);case 22:return th(e,t,n)}throw Error(S(156,t.tag))};function wh(e,t){return Xu(e,t)}function kf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ut(e,t,n,r){return new kf(e,t,n,r)}function Uo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cf(e){if(typeof e=="function")return Uo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===co)return 11;if(e===uo)return 14}return 2}function ps(e,t){var n=e.alternate;return n===null?(n=ut(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function yl(e,t,n,r,l,a){var i=2;if(r=e,typeof e=="function")Uo(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case en:return Fs(n.children,l,a,t);case oo:i=8,l|=8;break;case ti:return e=ut(12,n,t,l|2),e.elementType=ti,e.lanes=a,e;case si:return e=ut(13,n,t,l),e.elementType=si,e.lanes=a,e;case ni:return e=ut(19,n,t,l),e.elementType=ni,e.lanes=a,e;case Ru:return ra(n,l,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Pu:i=10;break e;case Iu:i=9;break e;case co:i=11;break e;case uo:i=14;break e;case es:i=16,r=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=ut(i,n,t,l),t.elementType=e,t.type=r,t.lanes=a,t}function Fs(e,t,n,r){return e=ut(7,e,r,t),e.lanes=n,e}function ra(e,t,n,r){return e=ut(22,e,r,t),e.elementType=Ru,e.lanes=n,e.stateNode={isHidden:!1},e}function qa(e,t,n){return e=ut(6,e,null,t),e.lanes=n,e}function Ba(e,t,n){return t=ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Sf(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Na(0),this.expirationTimes=Na(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Na(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Wo(e,t,n,r,l,a,i,o,c){return e=new Sf(e,t,n,o,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=ut(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Po(a),e}function Ef(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Zs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Nh(e){if(!e)return js;e=e._reactInternals;e:{if(Hs(e)!==e||e.tag!==1)throw Error(S(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Je(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(S(171))}if(e.tag===1){var n=e.type;if(Je(n))return Nm(e,n,t)}return t}function bh(e,t,n,r,l,a,i,o,c){return e=Wo(n,r,!0,e,l,a,i,o,c),e.context=Nh(null),n=e.current,r=Ue(),l=hs(n),a=$t(r,l),a.callback=t??null,us(n,a,l),e.current.lanes=l,Rr(e,l,r),Ke(e,r),e}function la(e,t,n,r){var l=t.current,a=Ue(),i=hs(l);return n=Nh(n),t.context===null?t.context=n:t.pendingContext=n,t=$t(a,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=us(l,t,i),e!==null&&(Ct(e,l,i,a),hl(e,l,i)),i}function $l(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function bd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Go(e,t){bd(e,t),(e=e.alternate)&&bd(e,t)}function Lf(){return null}var kh=typeof reportError=="function"?reportError:function(e){console.error(e)};function Xo(e){this._internalRoot=e}aa.prototype.render=Xo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(S(409));la(e,t,null,null)};aa.prototype.unmount=Xo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Os(function(){la(null,e,null,null)}),t[Ut]=null}};function aa(e){this._internalRoot=e}aa.prototype.unstable_scheduleHydration=function(e){if(e){var t=tm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ss.length&&t!==0&&t<ss[n].priority;n++);ss.splice(n,0,e),n===0&&nm(e)}};function Qo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ia(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function kd(){}function Pf(e,t,n,r,l){if(l){if(typeof r=="function"){var a=r;r=function(){var d=$l(i);a.call(d)}}var i=bh(t,r,e,0,null,!1,!1,"",kd);return e._reactRootContainer=i,e[Ut]=i.current,gr(e.nodeType===8?e.parentNode:e),Os(),i}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var o=r;r=function(){var d=$l(c);o.call(d)}}var c=Wo(e,0,!1,null,null,!1,!1,"",kd);return e._reactRootContainer=c,e[Ut]=c.current,gr(e.nodeType===8?e.parentNode:e),Os(function(){la(t,c,n,r)}),c}function oa(e,t,n,r,l){var a=n._reactRootContainer;if(a){var i=a;if(typeof l=="function"){var o=l;l=function(){var c=$l(i);o.call(c)}}la(t,i,e,l)}else i=Pf(n,t,e,l,r);return $l(i)}Zu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Jn(t.pendingLanes);n!==0&&(po(t,n|1),Ke(t,Ne()),!(J&6)&&(En=Ne()+500,Cs()))}break;case 13:Os(function(){var r=Wt(e,1);if(r!==null){var l=Ue();Ct(r,e,1,l)}}),Go(e,1)}};xo=function(e){if(e.tag===13){var t=Wt(e,134217728);if(t!==null){var n=Ue();Ct(t,e,134217728,n)}Go(e,134217728)}};em=function(e){if(e.tag===13){var t=hs(e),n=Wt(e,t);if(n!==null){var r=Ue();Ct(n,e,t,r)}Go(e,t)}};tm=function(){return ne};sm=function(e,t){var n=ne;try{return ne=e,t()}finally{ne=n}};hi=function(e,t,n){switch(t){case"input":if(ai(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=Kl(r);if(!l)throw Error(S(90));Fu(r),ai(r,l)}}}break;case"textarea":Au(e,n);break;case"select":t=n.value,t!=null&&hn(e,!!n.multiple,t,!1)}};Bu=Bo;$u=Os;var If={usingClientEntryPoint:!1,Events:[Fr,rn,Kl,Vu,qu,Bo]},Un={findFiberByHostInstance:Ps,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Rf={bundleType:Un.bundleType,version:Un.version,rendererPackageName:Un.rendererPackageName,rendererConfig:Un.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Yt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Wu(e),e===null?null:e.stateNode},findFiberByHostInstance:Un.findFiberByHostInstance||Lf,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tl.isDisabled&&tl.supportsFiber)try{Xl=tl.inject(Rf),Rt=tl}catch{}}rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=If;rt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qo(t))throw Error(S(200));return Ef(e,t,null,n)};rt.createRoot=function(e,t){if(!Qo(e))throw Error(S(299));var n=!1,r="",l=kh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Wo(e,1,!1,null,null,n,!1,r,l),e[Ut]=t.current,gr(e.nodeType===8?e.parentNode:e),new Xo(t)};rt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(S(188)):(e=Object.keys(e).join(","),Error(S(268,e)));return e=Wu(t),e=e===null?null:e.stateNode,e};rt.flushSync=function(e){return Os(e)};rt.hydrate=function(e,t,n){if(!ia(t))throw Error(S(200));return oa(null,e,t,!0,n)};rt.hydrateRoot=function(e,t,n){if(!Qo(e))throw Error(S(405));var r=n!=null&&n.hydratedSources||null,l=!1,a="",i=kh;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=bh(t,null,e,1,n??null,l,!1,a,i),e[Ut]=t.current,gr(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new aa(t)};rt.render=function(e,t,n){if(!ia(t))throw Error(S(200));return oa(null,e,t,!1,n)};rt.unmountComponentAtNode=function(e){if(!ia(e))throw Error(S(40));return e._reactRootContainer?(Os(function(){oa(null,null,e,!1,function(){e._reactRootContainer=null,e[Ut]=null})}),!0):!1};rt.unstable_batchedUpdates=Bo;rt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ia(n))throw Error(S(200));if(e==null||e._reactInternals===void 0)throw Error(S(38));return oa(e,t,n,!1,r)};rt.version="18.3.1-next-f1338f8080-20240426";function Ch(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ch)}catch(e){console.error(e)}}Ch(),Cu.exports=rt;var zf=Cu.exports,Cd=zf;Za.createRoot=Cd.createRoot,Za.hydrateRoot=Cd.hydrateRoot;/**
 * @remix-run/router v1.23.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Sr(){return Sr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sr.apply(this,arguments)}var as;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(as||(as={}));const Sd="popstate";function Ff(e){e===void 0&&(e={});function t(r,l){let{pathname:a,search:i,hash:o}=r.location;return Wi("",{pathname:a,search:i,hash:o},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(r,l){return typeof l=="string"?l:Hl(l)}return Af(t,n,null,e)}function Se(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Yo(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Mf(){return Math.random().toString(36).substr(2,8)}function Ed(e,t){return{usr:e.state,key:e.key,idx:t}}function Wi(e,t,n,r){return n===void 0&&(n=null),Sr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fn(t):t,{state:n,key:t&&t.key||r||Mf()})}function Hl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Fn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Af(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:a=!1}=r,i=l.history,o=as.Pop,c=null,d=h();d==null&&(d=0,i.replaceState(Sr({},i.state,{idx:d}),""));function h(){return(i.state||{idx:null}).idx}function u(){o=as.Pop;let w=h(),g=w==null?null:w-d;d=w,c&&c({action:o,location:v.location,delta:g})}function m(w,g){o=as.Push;let p=Wi(v.location,w,g);d=h()+1;let y=Ed(p,d),b=v.createHref(p);try{i.pushState(y,"",b)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;l.location.assign(b)}a&&c&&c({action:o,location:v.location,delta:1})}function x(w,g){o=as.Replace;let p=Wi(v.location,w,g);d=h();let y=Ed(p,d),b=v.createHref(p);i.replaceState(y,"",b),a&&c&&c({action:o,location:v.location,delta:0})}function f(w){let g=l.location.origin!=="null"?l.location.origin:l.location.href,p=typeof w=="string"?w:Hl(w);return p=p.replace(/ $/,"%20"),Se(g,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,g)}let v={get action(){return o},get location(){return e(l,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return l.addEventListener(Sd,u),c=w,()=>{l.removeEventListener(Sd,u),c=null}},createHref(w){return t(l,w)},createURL:f,encodeLocation(w){let g=f(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:m,replace:x,go(w){return i.go(w)}};return v}var Ld;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ld||(Ld={}));function Tf(e,t,n){return n===void 0&&(n="/"),_f(e,t,n)}function _f(e,t,n,r){let l=typeof t=="string"?Fn(t):t,a=Jo(l.pathname||"/",n);if(a==null)return null;let i=Sh(e);Df(i);let o=null;for(let c=0;o==null&&c<i.length;++c){let d=Yf(a);o=Gf(i[c],d)}return o}function Sh(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let l=(a,i,o)=>{let c={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};c.relativePath.startsWith("/")&&(Se(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=xs([r,c.relativePath]),h=n.concat(c);a.children&&a.children.length>0&&(Se(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),Sh(a.children,t,h,d)),!(a.path==null&&!a.index)&&t.push({path:d,score:Uf(d,a.index),routesMeta:h})};return e.forEach((a,i)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))l(a,i);else for(let c of Eh(a.path))l(a,i,c)}),t}function Eh(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return l?[a,""]:[a];let i=Eh(r.join("/")),o=[];return o.push(...i.map(c=>c===""?a:[a,c].join("/"))),l&&o.push(...i),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function Df(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Wf(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Of=/^:[\w-]+$/,Vf=3,qf=2,Bf=1,$f=10,Hf=-2,Pd=e=>e==="*";function Uf(e,t){let n=e.split("/"),r=n.length;return n.some(Pd)&&(r+=Hf),t&&(r+=qf),n.filter(l=>!Pd(l)).reduce((l,a)=>l+(Of.test(a)?Vf:a===""?Bf:$f),r)}function Wf(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function Gf(e,t,n){let{routesMeta:r}=e,l={},a="/",i=[];for(let o=0;o<r.length;++o){let c=r[o],d=o===r.length-1,h=a==="/"?t:t.slice(a.length)||"/",u=Xf({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},h),m=c.route;if(!u)return null;Object.assign(l,u.params),i.push({params:l,pathname:xs([a,u.pathname]),pathnameBase:tg(xs([a,u.pathnameBase])),route:m}),u.pathnameBase!=="/"&&(a=xs([a,u.pathnameBase]))}return i}function Xf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Qf(e.path,e.caseSensitive,e.end),l=t.match(n);if(!l)return null;let a=l[0],i=a.replace(/(.)\/+$/,"$1"),o=l.slice(1);return{params:r.reduce((d,h,u)=>{let{paramName:m,isOptional:x}=h;if(m==="*"){let v=o[u]||"";i=a.slice(0,a.length-v.length).replace(/(.)\/+$/,"$1")}const f=o[u];return x&&!f?d[m]=void 0:d[m]=(f||"").replace(/%2F/g,"/"),d},{}),pathname:a,pathnameBase:i,pattern:e}}function Qf(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Yo(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,o,c)=>(r.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function Yf(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Yo(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Jo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Jf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kf=e=>Jf.test(e);function Zf(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Fn(e):e,a;if(n)if(Kf(n))a=n;else{if(n.includes("//")){let i=n;n=n.replace(/\/\/+/g,"/"),Yo(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+n))}n.startsWith("/")?a=Id(n.substring(1),"/"):a=Id(n,t)}else a=t;return{pathname:a,search:sg(r),hash:ng(l)}}function Id(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function $a(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function eg(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Lh(e,t){let n=eg(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ph(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Fn(e):(l=Sr({},e),Se(!l.pathname||!l.pathname.includes("?"),$a("?","pathname","search",l)),Se(!l.pathname||!l.pathname.includes("#"),$a("#","pathname","hash",l)),Se(!l.search||!l.search.includes("#"),$a("#","search","hash",l)));let a=e===""||l.pathname==="",i=a?"/":l.pathname,o;if(i==null)o=n;else{let u=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),u-=1;l.pathname=m.join("/")}o=u>=0?t[u]:"/"}let c=Zf(l,o),d=i&&i!=="/"&&i.endsWith("/"),h=(a||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||h)&&(c.pathname+="/"),c}const xs=e=>e.join("/").replace(/\/\/+/g,"/"),tg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),sg=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ng=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function rg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ih=["post","put","patch","delete"];new Set(Ih);const lg=["get",...Ih];new Set(lg);/**
 * React Router v6.30.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Er(){return Er=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Er.apply(this,arguments)}const Ko=j.createContext(null),ag=j.createContext(null),Us=j.createContext(null),ca=j.createContext(null),Ss=j.createContext({outlet:null,matches:[],isDataRoute:!1}),Rh=j.createContext(null);function ig(e,t){let{relative:n}=t===void 0?{}:t;Ar()||Se(!1);let{basename:r,navigator:l}=j.useContext(Us),{hash:a,pathname:i,search:o}=Fh(e,{relative:n}),c=i;return r!=="/"&&(c=i==="/"?r:xs([r,i])),l.createHref({pathname:c,search:o,hash:a})}function Ar(){return j.useContext(ca)!=null}function Tr(){return Ar()||Se(!1),j.useContext(ca).location}function zh(e){j.useContext(Us).static||j.useLayoutEffect(e)}function og(){let{isDataRoute:e}=j.useContext(Ss);return e?wg():cg()}function cg(){Ar()||Se(!1);let e=j.useContext(Ko),{basename:t,future:n,navigator:r}=j.useContext(Us),{matches:l}=j.useContext(Ss),{pathname:a}=Tr(),i=JSON.stringify(Lh(l,n.v7_relativeSplatPath)),o=j.useRef(!1);return zh(()=>{o.current=!0}),j.useCallback(function(d,h){if(h===void 0&&(h={}),!o.current)return;if(typeof d=="number"){r.go(d);return}let u=Ph(d,JSON.parse(i),a,h.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:xs([t,u.pathname])),(h.replace?r.replace:r.push)(u,h.state,h)},[t,r,i,a,e])}function da(){let{matches:e}=j.useContext(Ss),t=e[e.length-1];return t?t.params:{}}function Fh(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=j.useContext(Us),{matches:l}=j.useContext(Ss),{pathname:a}=Tr(),i=JSON.stringify(Lh(l,r.v7_relativeSplatPath));return j.useMemo(()=>Ph(e,JSON.parse(i),a,n==="path"),[e,i,a,n])}function dg(e,t){return ug(e,t)}function ug(e,t,n,r){Ar()||Se(!1);let{navigator:l}=j.useContext(Us),{matches:a}=j.useContext(Ss),i=a[a.length-1],o=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let d=Tr(),h;if(t){var u;let w=typeof t=="string"?Fn(t):t;c==="/"||(u=w.pathname)!=null&&u.startsWith(c)||Se(!1),h=w}else h=d;let m=h.pathname||"/",x=m;if(c!=="/"){let w=c.replace(/^\//,"").split("/");x="/"+m.replace(/^\//,"").split("/").slice(w.length).join("/")}let f=Tf(e,{pathname:x}),v=fg(f&&f.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:xs([c,l.encodeLocation?l.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:xs([c,l.encodeLocation?l.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),a,n,r);return t&&v?j.createElement(ca.Provider,{value:{location:Er({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:as.Pop}},v):v}function mg(){let e=jg(),t=rg(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),n?j.createElement("pre",{style:l},n):null,null)}const hg=j.createElement(mg,null);class pg extends j.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?j.createElement(Ss.Provider,{value:this.props.routeContext},j.createElement(Rh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function xg(e){let{routeContext:t,match:n,children:r}=e,l=j.useContext(Ko);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),j.createElement(Ss.Provider,{value:t},r)}function fg(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,o=(l=n)==null?void 0:l.errors;if(o!=null){let h=i.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);h>=0||Se(!1),i=i.slice(0,Math.min(i.length,h+1))}let c=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<i.length;h++){let u=i[h];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(d=h),u.route.id){let{loaderData:m,errors:x}=n,f=u.route.loader&&m[u.route.id]===void 0&&(!x||x[u.route.id]===void 0);if(u.route.lazy||f){c=!0,d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}return i.reduceRight((h,u,m)=>{let x,f=!1,v=null,w=null;n&&(x=o&&u.route.id?o[u.route.id]:void 0,v=u.route.errorElement||hg,c&&(d<0&&m===0?(Ng("route-fallback"),f=!0,w=null):d===m&&(f=!0,w=u.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,m+1)),p=()=>{let y;return x?y=v:f?y=w:u.route.Component?y=j.createElement(u.route.Component,null):u.route.element?y=u.route.element:y=h,j.createElement(xg,{match:u,routeContext:{outlet:h,matches:g,isDataRoute:n!=null},children:y})};return n&&(u.route.ErrorBoundary||u.route.errorElement||m===0)?j.createElement(pg,{location:n.location,revalidation:n.revalidation,component:v,error:x,children:p(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):p()},null)}var Mh=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Mh||{}),Ah=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ah||{});function gg(e){let t=j.useContext(Ko);return t||Se(!1),t}function vg(e){let t=j.useContext(ag);return t||Se(!1),t}function yg(e){let t=j.useContext(Ss);return t||Se(!1),t}function Th(e){let t=yg(),n=t.matches[t.matches.length-1];return n.route.id||Se(!1),n.route.id}function jg(){var e;let t=j.useContext(Rh),n=vg(),r=Th();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function wg(){let{router:e}=gg(Mh.UseNavigateStable),t=Th(Ah.UseNavigateStable),n=j.useRef(!1);return zh(()=>{n.current=!0}),j.useCallback(function(l,a){a===void 0&&(a={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Er({fromRouteId:t},a)))},[e,t])}const Rd={};function Ng(e,t,n){Rd[e]||(Rd[e]=!0)}function bg(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Y(e){Se(!1)}function kg(e){let{basename:t="/",children:n=null,location:r,navigationType:l=as.Pop,navigator:a,static:i=!1,future:o}=e;Ar()&&Se(!1);let c=t.replace(/^\/*/,"/"),d=j.useMemo(()=>({basename:c,navigator:a,static:i,future:Er({v7_relativeSplatPath:!1},o)}),[c,o,a,i]);typeof r=="string"&&(r=Fn(r));let{pathname:h="/",search:u="",hash:m="",state:x=null,key:f="default"}=r,v=j.useMemo(()=>{let w=Jo(h,c);return w==null?null:{location:{pathname:w,search:u,hash:m,state:x,key:f},navigationType:l}},[c,h,u,m,x,f,l]);return v==null?null:j.createElement(Us.Provider,{value:d},j.createElement(ca.Provider,{children:n,value:v}))}function Cg(e){let{children:t,location:n}=e;return dg(Gi(t),n)}new Promise(()=>{});function Gi(e,t){t===void 0&&(t=[]);let n=[];return j.Children.forEach(e,(r,l)=>{if(!j.isValidElement(r))return;let a=[...t,l];if(r.type===j.Fragment){n.push.apply(n,Gi(r.props.children,a));return}r.type!==Y&&Se(!1),!r.props.index||!r.props.children||Se(!1);let i={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=Gi(r.props.children,a)),n.push(i)}),n}/**
 * React Router DOM v6.30.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Xi(){return Xi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xi.apply(this,arguments)}function Sg(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,a;for(a=0;a<r.length;a++)l=r[a],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function Eg(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Lg(e,t){return e.button===0&&(!t||t==="_self")&&!Eg(e)}const Pg=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ig="6";try{window.__reactRouterVersion=Ig}catch{}const Rg="startTransition",zd=jp[Rg];function zg(e){let{basename:t,children:n,future:r,window:l}=e,a=j.useRef();a.current==null&&(a.current=Ff({window:l,v5Compat:!0}));let i=a.current,[o,c]=j.useState({action:i.action,location:i.location}),{v7_startTransition:d}=r||{},h=j.useCallback(u=>{d&&zd?zd(()=>c(u)):c(u)},[c,d]);return j.useLayoutEffect(()=>i.listen(h),[i,h]),j.useEffect(()=>bg(r),[r]),j.createElement(kg,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:i,future:r})}const Fg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Mg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,C=j.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:a,replace:i,state:o,target:c,to:d,preventScrollReset:h,viewTransition:u}=t,m=Sg(t,Pg),{basename:x}=j.useContext(Us),f,v=!1;if(typeof d=="string"&&Mg.test(d)&&(f=d,Fg))try{let y=new URL(window.location.href),b=d.startsWith("//")?new URL(y.protocol+d):new URL(d),L=Jo(b.pathname,x);b.origin===y.origin&&L!=null?d=L+b.search+b.hash:v=!0}catch{}let w=ig(d,{relative:l}),g=Ag(d,{replace:i,state:o,target:c,preventScrollReset:h,relative:l,viewTransition:u});function p(y){r&&r(y),y.defaultPrevented||g(y)}return j.createElement("a",Xi({},m,{href:f||w,onClick:v||a?r:p,ref:n,target:c}))});var Fd;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Fd||(Fd={}));var Md;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Md||(Md={}));function Ag(e,t){let{target:n,replace:r,state:l,preventScrollReset:a,relative:i,viewTransition:o}=t===void 0?{}:t,c=og(),d=Tr(),h=Fh(e,{relative:i});return j.useCallback(u=>{if(Lg(u,n)){u.preventDefault();let m=r!==void 0?r:Hl(d)===Hl(h);c(e,{replace:m,state:l,preventScrollReset:a,relative:i,viewTransition:o})}},[d,c,h,r,l,n,e,a,i,o])}const Ms=["fr","en","es","de","it","pt"],Tg={fr:"Français",en:"English",es:"Español",de:"Deutsch",it:"Italiano",pt:"Português"},Ad={fr:"🇫🇷",en:"🇬🇧",es:"🇪🇸",de:"🇩🇪",it:"🇮🇹",pt:"🇵🇹"};function _g(){if(typeof window>"u")return"fr";const t=window.location.pathname.split("/")[1];if(Ms.includes(t))return t;const n=localStorage.getItem("preferred-language");if(n&&Ms.includes(n))return n;const r=navigator.language.split("-")[0];return Ms.includes(r)?r:"fr"}function Dg(e){const n=e.split("/").filter(Boolean)[0];return Ms.includes(n)?n:"fr"}const _h=j.createContext(void 0);function Og({children:e}){const[t,n]=j.useState(()=>typeof window<"u"?Dg(window.location.pathname)||_g():"fr"),[r,l]=j.useState({}),[a,i]=j.useState(!0);j.useEffect(()=>{async function c(){i(!0);try{const d=await fetch(`/data/translations/${t}/ui.json`);if(d.ok){const h=await d.json();l(h)}}catch(d){console.error("Error loading translations:",d)}finally{i(!1)}}c()},[t]);const o=c=>{if(Ms.includes(c)&&(n(c),localStorage.setItem("preferred-language",c),typeof window<"u")){const h=window.location.pathname.split("/").filter(Boolean);Ms.includes(h[0])?h[0]=c:h.unshift(c);const u="/"+h.join("/");window.history.pushState({},"",u)}};return s.jsx(_h.Provider,{value:{language:t,setLanguage:o,translations:r,loading:a},children:e})}function Ze(){const e=j.useContext(_h);if(!e)throw new Error("useLanguage must be used within LanguageProvider");return e}function Dh(){const{translations:e}=Ze();return function(n,r){const l=n.split(".");let a=e;for(const i of l)if(a=a==null?void 0:a[i],a===void 0)break;return a||r||n}}function E(e){const t={Home:"/",Timeline:"/timeline",Period:"/period",SubPeriod:"/sub-period",Characters:"/characters",Character:"/character",Battles:"/battles",Battle:"/battle",Places:"/places",Place:"/place",Dynasties:"/dynasties",Dynasty:"/dynasty",Events:"/events",Event:"/event",Maps:"/maps",Search:"/search",Shop:"/shop",FamilyTrees:"/family-trees"};return e?t[e]||`/${e.toLowerCase()}`:"/"}function Nt(e,t,n="fr"){var i,o;const r={characters:{fr:"/personnages",en:"/characters",es:"/personajes",de:"/personen",it:"/personaggi",pt:"/personagens"},places:{fr:"/lieux",en:"/places",es:"/lugares",de:"/orte",it:"/luoghi",pt:"/lugares"},battles:{fr:"/batailles",en:"/battles",es:"/batallas",de:"/schlachten",it:"/battaglie",pt:"/batalhas"},events:{fr:"/evenements",en:"/events",es:"/eventos",de:"/ereignisse",it:"/eventi",pt:"/eventos"},dynasties:{fr:"/dynasties",en:"/dynasties",es:"/dinastias",de:"/dynastien",it:"/dinastie",pt:"/dinastias"}},l=((i=r[e])==null?void 0:i[n])||((o=r[e])==null?void 0:o.fr);return`${n==="fr"?"":`/${n}`}${l}/${t}`}/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var Vg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),q=(e,t)=>{const n=j.forwardRef(({color:r="currentColor",size:l=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:o="",children:c,...d},h)=>j.createElement("svg",{ref:h,...Vg,width:l,height:l,stroke:r,strokeWidth:i?Number(a)*24/Number(l):a,className:["lucide",`lucide-${qg(e)}`,o].join(" "),...d},[...t.map(([u,m])=>j.createElement(u,m)),...Array.isArray(c)?c:[c]]));return n.displayName=`${e}`,n};/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Oh=q("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const te=q("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xt=q("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mn=q("CalendarDays",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const le=q("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vh=q("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fe=q("Castle",[["path",{d:"M22 20v-9H2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2Z",key:"109fe4"}],["path",{d:"M18 11V4H6v7",key:"mon5oj"}],["path",{d:"M15 22v-4a3 3 0 0 0-3-3v0a3 3 0 0 0-3 3v4",key:"jdggr9"}],["path",{d:"M22 11V9",key:"3zbp94"}],["path",{d:"M2 11V9",key:"1x5rnq"}],["path",{d:"M6 4V2",key:"1rsq15"}],["path",{d:"M18 4V2",key:"1jsdo1"}],["path",{d:"M10 4V2",key:"75d9ly"}],["path",{d:"M14 4V2",key:"8nj3z6"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ua=q("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qh=q("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xt=q("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bg=q("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fs=q("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $g=q("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U=q("Crown",[["path",{d:"m2 4 3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14",key:"zkxr6b"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yn=q("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zo=q("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const or=q("Flag",[["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",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hg=q("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vs=q("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ug=q("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bh=q("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ma=q("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ec=q("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wg=q("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $h=q("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Td=q("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qi=q("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ha=q("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gg=q("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xg=q("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ke=q("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ul=q("Map",[["polygon",{points:"3 6 9 3 15 6 21 3 21 18 15 21 9 18 3 21",key:"ok2ie8"}],["line",{x1:"9",x2:"9",y1:"3",y2:"18",key:"w34qz5"}],["line",{x1:"15",x2:"15",y1:"6",y2:"21",key:"volv9a"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qg=q("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yg=q("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jg=q("Quote",[["path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z",key:"4rm80e"}],["path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z",key:"10za9r"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wl=q("ScrollText",[["path",{d:"M8 21h12a2 2 0 0 0 2-2v-2H10v2a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v3h4",key:"13a6an"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M15 12h-5",key:"r7krc0"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kg=q("Scroll",[["path",{d:"M8 21h12a2 2 0 0 0 2-2v-2H10v2a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v3h4",key:"13a6an"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _t=q("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _r=q("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ws=q("Shield",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lr=q("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zg=q("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ln=q("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Pn=q("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ce=q("Sword",[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const e0=q("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const t0=q("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yi=q("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const s0=q("Truck",[["path",{d:"M5 18H3c-.6 0-1-.4-1-1V7c0-.6.4-1 1-1h10c.6 0 1 .4 1 1v11",key:"hs4xqm"}],["path",{d:"M14 9h4l4 4v4c0 .6-.4 1-1 1h-2",key:"11fp61"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n0=q("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ge=q("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pa=q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hh=q("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/**
 * @license lucide-react v0.294.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Uh=q("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function Wh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=Wh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function r0(){for(var e,t,n=0,r="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=Wh(e))&&(r&&(r+=" "),r+=t);return r}const tc="-",l0=e=>{const t=i0(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const o=i.split(tc);return o[0]===""&&o.length!==1&&o.shift(),Gh(o,t)||a0(i)},getConflictingClassGroupIds:(i,o)=>{const c=n[i]||[];return o&&r[i]?[...c,...r[i]]:c}}},Gh=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),l=r?Gh(e.slice(1),r):void 0;if(l)return l;if(t.validators.length===0)return;const a=e.join(tc);return(i=t.validators.find(({validator:o})=>o(a)))==null?void 0:i.classGroupId},_d=/^\[(.+)\]$/,a0=e=>{if(_d.test(e)){const t=_d.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},i0=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return c0(Object.entries(e.classGroups),n).forEach(([a,i])=>{Ji(i,r,a,t)}),r},Ji=(e,t,n,r)=>{e.forEach(l=>{if(typeof l=="string"){const a=l===""?t:Dd(t,l);a.classGroupId=n;return}if(typeof l=="function"){if(o0(l)){Ji(l(r),t,n,r);return}t.validators.push({validator:l,classGroupId:n});return}Object.entries(l).forEach(([a,i])=>{Ji(i,Dd(t,a),n,r)})})},Dd=(e,t)=>{let n=e;return t.split(tc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},o0=e=>e.isThemeGetter,c0=(e,t)=>t?e.map(([n,r])=>{const l=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,o])=>[t+i,o])):a);return[n,l]}):e,d0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const l=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return l(a,i),i},set(a,i){n.has(a)?n.set(a,i):l(a,i)}}},Xh="!",u0=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,l=t[0],a=t.length,i=o=>{const c=[];let d=0,h=0,u;for(let w=0;w<o.length;w++){let g=o[w];if(d===0){if(g===l&&(r||o.slice(w,w+a)===t)){c.push(o.slice(h,w)),h=w+a;continue}if(g==="/"){u=w;continue}}g==="["?d++:g==="]"&&d--}const m=c.length===0?o:o.substring(h),x=m.startsWith(Xh),f=x?m.substring(1):m,v=u&&u>h?u-h:void 0;return{modifiers:c,hasImportantModifier:x,baseClassName:f,maybePostfixModifierPosition:v}};return n?o=>n({className:o,parseClassName:i}):i},m0=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},h0=e=>({cache:d0(e.cacheSize),parseClassName:u0(e),...l0(e)}),p0=/\s+/,x0=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:l}=t,a=[],i=e.trim().split(p0);let o="";for(let c=i.length-1;c>=0;c-=1){const d=i[c],{modifiers:h,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:x}=n(d);let f=!!x,v=r(f?m.substring(0,x):m);if(!v){if(!f){o=d+(o.length>0?" "+o:o);continue}if(v=r(m),!v){o=d+(o.length>0?" "+o:o);continue}f=!1}const w=m0(h).join(":"),g=u?w+Xh:w,p=g+v;if(a.includes(p))continue;a.push(p);const y=l(v,f);for(let b=0;b<y.length;++b){const L=y[b];a.push(g+L)}o=d+(o.length>0?" "+o:o)}return o};function f0(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Qh(t))&&(r&&(r+=" "),r+=n);return r}const Qh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qh(e[r]))&&(n&&(n+=" "),n+=t);return n};function g0(e,...t){let n,r,l,a=i;function i(c){const d=t.reduce((h,u)=>u(h),e());return n=h0(d),r=n.cache.get,l=n.cache.set,a=o,o(c)}function o(c){const d=r(c);if(d)return d;const h=x0(c,n);return l(c,h),h}return function(){return a(f0.apply(null,arguments))}}const de=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Yh=/^\[(?:([a-z-]+):)?(.+)\]$/i,v0=/^\d+\/\d+$/,y0=new Set(["px","full","screen"]),j0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,w0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,N0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,b0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,k0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dt=e=>jn(e)||y0.has(e)||v0.test(e),Kt=e=>Mn(e,"length",z0),jn=e=>!!e&&!Number.isNaN(Number(e)),Ha=e=>Mn(e,"number",jn),Wn=e=>!!e&&Number.isInteger(Number(e)),C0=e=>e.endsWith("%")&&jn(e.slice(0,-1)),W=e=>Yh.test(e),Zt=e=>j0.test(e),S0=new Set(["length","size","percentage"]),E0=e=>Mn(e,S0,Jh),L0=e=>Mn(e,"position",Jh),P0=new Set(["image","url"]),I0=e=>Mn(e,P0,M0),R0=e=>Mn(e,"",F0),Gn=()=>!0,Mn=(e,t,n)=>{const r=Yh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},z0=e=>w0.test(e)&&!N0.test(e),Jh=()=>!1,F0=e=>b0.test(e),M0=e=>k0.test(e),A0=()=>{const e=de("colors"),t=de("spacing"),n=de("blur"),r=de("brightness"),l=de("borderColor"),a=de("borderRadius"),i=de("borderSpacing"),o=de("borderWidth"),c=de("contrast"),d=de("grayscale"),h=de("hueRotate"),u=de("invert"),m=de("gap"),x=de("gradientColorStops"),f=de("gradientColorStopPositions"),v=de("inset"),w=de("margin"),g=de("opacity"),p=de("padding"),y=de("saturate"),b=de("scale"),L=de("sepia"),M=de("skew"),A=de("space"),N=de("translate"),F=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",W,t],D=()=>[W,t],we=()=>["",Dt,Kt],O=()=>["auto",jn,W],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],X=()=>["solid","dashed","dotted","double","none"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",W],T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[jn,W];return{cacheSize:500,separator:":",theme:{colors:[Gn],spacing:[Dt,Kt],blur:["none","",Zt,W],brightness:V(),borderColor:[e],borderRadius:["none","","full",Zt,W],borderSpacing:D(),borderWidth:we(),contrast:V(),grayscale:I(),hueRotate:V(),invert:I(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[C0,Kt],inset:G(),margin:G(),opacity:V(),padding:D(),saturate:V(),scale:V(),sepia:I(),skew:V(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",W]}],container:["container"],columns:[{columns:[Zt]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...K(),W]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wn,W]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",W]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Wn,W]}],"grid-cols":[{"grid-cols":[Gn]}],"col-start-end":[{col:["auto",{span:["full",Wn,W]},W]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[Gn]}],"row-start-end":[{row:["auto",{span:[Wn,W]},W]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",W]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",W]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",W,t]}],"min-w":[{"min-w":[W,t,"min","max","fit"]}],"max-w":[{"max-w":[W,t,"none","full","min","max","fit","prose",{screen:[Zt]},Zt]}],h:[{h:[W,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[W,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Zt,Kt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ha]}],"font-family":[{font:[Gn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",W]}],"line-clamp":[{"line-clamp":["none",jn,Ha]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dt,W]}],"list-image":[{"list-image":["none",W]}],"list-style-type":[{list:["none","disc","decimal",W]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dt,Kt]}],"underline-offset":[{"underline-offset":["auto",Dt,W]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",W]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),L0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",E0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},I0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...X(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:X()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...X()]}],"outline-offset":[{"outline-offset":[Dt,W]}],"outline-w":[{outline:[Dt,Kt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:we()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Dt,Kt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Zt,R0]}],"shadow-color":[{shadow:[Gn]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...ae(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ae()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Zt,W]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[u]}],saturate:[{saturate:[y]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",W]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",W]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",W]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Wn,W]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",W]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",W]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",W]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dt,Kt,Ha]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},T0=g0(A0);function k(...e){return T0(r0(e))}const z=j.forwardRef(({className:e,variant:t="default",size:n="default",...r},l)=>s.jsx("button",{className:k("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{"bg-[#1e3a5f] text-white hover:bg-[#2d5a87]":t==="default","border border-gray-300 bg-transparent hover:bg-gray-100":t==="outline","hover:bg-gray-100":t==="ghost","text-[#1e3a5f] underline-offset-4 hover:underline":t==="link","h-10 px-4 py-2":n==="default","h-9 rounded-md px-3":n==="sm","h-11 rounded-md px-8":n==="lg","h-10 w-10":n==="icon"},e),ref:l,...r}));z.displayName="Button";const xa=j.createContext(void 0);function _0({children:e,open:t,onOpenChange:n}){const[r,l]=j.useState(!1),a=t!==void 0?t:r,i=j.useCallback(o=>{t===void 0&&l(o),n==null||n(o)},[t,n]);return j.useEffect(()=>{const o=c=>{a&&i(!1)};if(a)return document.addEventListener("click",o),()=>document.removeEventListener("click",o)},[a,i]),s.jsx(xa.Provider,{value:{open:a,setOpen:i},children:s.jsx("div",{className:"relative inline-block text-left",children:e})})}function D0({asChild:e,children:t,className:n,...r}){const l=j.useContext(xa);if(!l)throw new Error("DropdownMenuTrigger must be used within DropdownMenu");const a=i=>{var o;i.stopPropagation(),l.setOpen(!l.open),(o=r.onClick)==null||o.call(r,i)};return e&&j.isValidElement(t)?j.cloneElement(t,{onClick:a,...r}):s.jsx("button",{className:k("inline-flex items-center justify-center",n),onClick:a,...r,children:t})}function O0({align:e="start",children:t,className:n,...r}){const l=j.useContext(xa);if(!l)throw new Error("DropdownMenuContent must be used within DropdownMenu");return l.open?s.jsx("div",{className:k("absolute z-50 min-w-[8rem] overflow-hidden rounded-md border bg-white shadow-md",e==="end"&&"right-0",e==="center"&&"left-1/2 -translate-x-1/2",n),onClick:a=>a.stopPropagation(),...r,children:t}):null}function V0({children:e,className:t,...n}){const r=j.useContext(xa),l=a=>{var i;a.stopPropagation(),r==null||r.setOpen(!1),(i=n.onClick)==null||i.call(n,a)};return s.jsx("button",{className:k("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-gray-100 focus:bg-gray-100",t),onClick:l,...n,children:e})}function q0({children:e,className:t,...n}){return s.jsx("div",{className:k("px-2 py-1.5 text-sm font-semibold text-gray-900",t),...n,children:e})}function B0({className:e,...t}){return s.jsx("div",{className:k("my-1 h-px bg-gray-200",e),...t})}const fa=j.createContext(void 0);function $0({children:e}){const[t,n]=j.useState(null);return s.jsx(fa.Provider,{value:{openItem:t,setOpenItem:n},children:s.jsx("nav",{className:"relative",children:e})})}function H0({children:e,className:t,...n}){return s.jsx("ul",{className:k("flex flex-row items-center gap-1",t),...n,children:e})}function Xn({children:e}){const t=j.useContext(fa),n=j.useRef(null),r=j.useRef(null),l=j.useRef(null);j.useEffect(()=>{if(n.current){const c=n.current.querySelector("button[data-item-id]");c&&(l.current=c.getAttribute("data-item-id"))}},[]);const a=()=>{r.current&&(clearTimeout(r.current),r.current=null),l.current&&t&&t.setOpenItem(l.current)},i=()=>{r.current=setTimeout(()=>{l.current&&t&&t.openItem===l.current&&t.setOpenItem(null)},500)};j.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]);const o=c=>{if(c.target.closest("a")){setTimeout(()=>{l.current&&t&&t.setOpenItem(null)},150);return}};return s.jsx("li",{ref:n,className:"relative group",onMouseEnter:a,onMouseLeave:i,onClick:o,children:e})}function Od({children:e,className:t,...n}){const r=j.useContext(fa);if(!r)throw new Error("NavigationMenuTrigger must be used within NavigationMenu");const l=j.useId(),a=r.openItem===l,i=o=>{var c;o.stopPropagation(),r.setOpenItem(a?null:l),(c=n.onClick)==null||c.call(n,o)};return j.useEffect(()=>{const o=c=>{const d=c.target,h=document.querySelector(`[data-item-id="${l}"]`),u=h==null?void 0:h.closest("li"),m=u==null?void 0:u.querySelector("[data-content]");if(d.closest("a")){setTimeout(()=>{a&&r&&r.setOpenItem(null)},100);return}a&&h&&!h.contains(d)&&(!m||!m.contains(d))&&r.setOpenItem(null)};if(a)return document.addEventListener("mousedown",o,!0),()=>document.removeEventListener("mousedown",o,!0)},[a,r,l]),s.jsx("button",{"data-item-id":l,className:k("inline-flex items-center justify-center rounded-md px-3 py-2 text-sm font-medium transition-colors hover:bg-gray-100 focus:outline-none focus:bg-gray-100",a&&"bg-gray-100",t),onClick:i,...n,children:e})}function Vd({children:e,className:t,...n}){const r=j.useContext(fa);if(!r)throw new Error("NavigationMenuContent must be used within NavigationMenu");const l=j.useRef(null),a=j.useRef(null),[i,o]=j.useState(!1);j.useRef(null);const c=j.useCallback(()=>{if(l.current){const h=l.current.closest("li");if(h){const u=h.querySelector("button[data-item-id]");if(u){const m=u.getAttribute("data-item-id");if(m)return a.current=m,m}}}return null},[]);if(j.useEffect(()=>{const h=c();h&&(a.current=h,o(r.openItem===h))},[c,r]),j.useEffect(()=>{a.current&&o(r.openItem===a.current)},[r.openItem]),!i)return null;const d=h=>{if(h.target.closest("a")){setTimeout(()=>{a.current&&r&&r.setOpenItem(null)},150);return}h.stopPropagation()};return s.jsx("div",{ref:l,"data-content":!0,className:k("absolute left-0 top-full mt-1 z-[60] w-screen max-w-md rounded-md border bg-white p-4 shadow-lg",t),onClick:d,onMouseLeave:()=>{setTimeout(()=>{a.current&&r&&r.setOpenItem(null)},300)},...n,children:e})}const qd=[{id:"prehistory-france",name:"Préhistoire",years:"-1 800 000 à 800 av. J.-C.",icon:Wl},{id:"antiquity-france",name:"Antiquité",years:"800 av. J.-C. à 476",icon:Wl},{id:"early-middle-ages",name:"Haut Moyen Âge",years:"476 - 987",icon:ce},{id:"high-middle-ages",name:"Moyen Âge Central",years:"987 - 1270",icon:ce}],Bd=[{id:"characters",name:"Personnages",icon:ge,href:"Characters"},{id:"battles",name:"Batailles",icon:ce,href:"Battles"},{id:"dynasties",name:"Dynasties",icon:U,href:"Dynasties"},{id:"places",name:"Lieux",icon:Fe,href:"Places"},{id:"events",name:"Événements",icon:mn,href:"Events"}];function U0({currentLang:e,onLanguageChange:t,isHomePage:n=!1}){const{language:r,setLanguage:l}=Ze(),[a,i]=j.useState(!1),[o,c]=j.useState(!1),d=a||!n;j.useEffect(()=>{const u=()=>{i(window.scrollY>20)};return window.addEventListener("scroll",u),()=>window.removeEventListener("scroll",u)},[]);const h=u=>{l(u),t==null||t(u)};return s.jsxs("header",{className:k("fixed top-0 left-0 right-0 z-50 transition-all duration-500",d||o?"bg-white/95 backdrop-blur-md shadow-lg border-b border-amber-100":"bg-gradient-to-b from-black/50 to-transparent"),children:[s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex items-center justify-between h-16 lg:h-20",children:[s.jsxs(C,{to:E("Home"),className:"flex items-center gap-3 group",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-10 h-10 lg:w-12 lg:h-12 rounded-full bg-gradient-to-br from-[#1e3a5f] to-[#2d5a87] flex items-center justify-center shadow-lg group-hover:shadow-xl transition-shadow",children:s.jsx(U,{className:"w-5 h-5 lg:w-6 lg:h-6 text-[#c9a227]"})}),s.jsx("div",{className:"absolute -bottom-1 -right-1 w-4 h-4 bg-[#c9a227] rounded-full flex items-center justify-center",children:s.jsx("span",{className:"text-[8px] font-bold text-[#1e3a5f]",children:r.toUpperCase()})})]}),s.jsxs("div",{className:"hidden sm:block",children:[s.jsx("h1",{className:k("text-lg lg:text-xl font-bold tracking-tight transition-colors",d?"text-[#1e3a5f]":"text-white"),children:"Histoire de France"}),s.jsx("p",{className:k("text-[10px] lg:text-xs tracking-widest uppercase transition-colors",d?"text-[#1e3a5f]/60":"text-white/70"),children:"L'Encyclopédie"})]})]}),s.jsx("div",{className:"hidden lg:flex items-center gap-1",children:s.jsx($0,{children:s.jsxs(H0,{children:[s.jsxs(Xn,{children:[s.jsx(Od,{className:k("bg-transparent hover:bg-white/10 data-[state=open]:bg-white/10",d?"text-[#1e3a5f]":"text-white"),children:"Périodes"}),s.jsx(Vd,{children:s.jsx("div",{className:"w-[600px] p-6 bg-white rounded-xl shadow-2xl border border-amber-100",children:s.jsx("div",{className:"grid grid-cols-2 gap-3",children:qd.map(u=>{const m=u.icon;return s.jsxs(C,{to:E("Period")+`?id=${u.id}`,onClick:x=>{c(!1)},className:"group flex items-start gap-3 p-3 rounded-lg hover:bg-[#f5f1e8] transition-colors cursor-pointer",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#1e3a5f]/10 flex items-center justify-center group-hover:bg-[#1e3a5f] transition-colors",children:s.jsx(m,{className:"w-5 h-5 text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] text-sm group-hover:text-[#c9a227] transition-colors",children:u.name}),s.jsx("p",{className:"text-xs text-gray-500",children:u.years})]})]},u.id)})})})})]}),s.jsxs(Xn,{children:[s.jsx(Od,{className:k("bg-transparent hover:bg-white/10 data-[state=open]:bg-white/10",d?"text-[#1e3a5f]":"text-white"),children:"Encyclopédie"}),s.jsx(Vd,{children:s.jsx("div",{className:"w-[400px] p-6 bg-white rounded-xl shadow-2xl border border-amber-100",children:s.jsx("div",{className:"grid grid-cols-2 gap-3",children:Bd.map(u=>{const m=u.icon;return s.jsxs(C,{to:E(u.href),onClick:x=>{c(!1)},className:"group flex items-center gap-3 p-4 rounded-lg hover:bg-[#f5f1e8] transition-colors cursor-pointer",children:[s.jsx(m,{className:"w-6 h-6 text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors"}),s.jsx("span",{className:"font-medium text-[#1e3a5f]",children:u.name})]},u.id)})})})})]}),s.jsx(Xn,{children:s.jsx(C,{to:E("Timeline"),className:k("px-4 py-2 rounded-md text-sm font-medium transition-colors inline-block",d?"text-[#1e3a5f] hover:bg-[#f5f1e8]":"text-white hover:bg-white/10"),children:"Chronologie"})}),s.jsx(Xn,{children:s.jsx(C,{to:E("Maps"),className:k("px-4 py-2 rounded-md text-sm font-medium transition-colors inline-block",d?"text-[#1e3a5f] hover:bg-[#f5f1e8]":"text-white hover:bg-white/10"),children:"Carte"})}),s.jsx(Xn,{children:s.jsx(C,{to:E("FamilyTrees"),className:k("px-4 py-2 rounded-md text-sm font-medium transition-colors inline-block",d?"text-[#1e3a5f] hover:bg-[#f5f1e8]":"text-white hover:bg-white/10"),children:"Généalogie"})})]})})}),s.jsxs("div",{className:"flex items-center gap-2 lg:gap-4",children:[s.jsx(C,{to:E("Search"),children:s.jsx(z,{variant:"ghost",size:"icon",className:k("rounded-full",d?"text-[#1e3a5f] hover:bg-[#f5f1e8]":"text-white hover:bg-white/10"),children:s.jsx(_t,{className:"w-5 h-5"})})}),s.jsxs(_0,{children:[s.jsx(D0,{asChild:!0,children:s.jsxs(z,{variant:"ghost",size:"sm",className:k("rounded-full gap-2",d?"text-[#1e3a5f] hover:bg-[#f5f1e8]":"text-white hover:bg-white/10"),children:[s.jsx(Bh,{className:"w-4 h-4"}),s.jsx("span",{className:"hidden sm:inline text-sm",children:Ad[r]}),s.jsx(ua,{className:"w-3 h-3"})]})}),s.jsxs(O0,{align:"end",className:"w-48",children:[s.jsx(q0,{children:"Langue / Language"}),s.jsx(B0,{}),Ms.map(u=>s.jsxs(V0,{onClick:()=>h(u),className:k("cursor-pointer",r===u&&"bg-[#f5f1e8]"),children:[s.jsx("span",{className:"mr-2",children:Ad[u]}),Tg[u]]},u))]})]}),s.jsx(z,{variant:"ghost",size:"icon",className:k("lg:hidden rounded-full",d||o?"text-[#1e3a5f]":"text-white"),onClick:()=>c(!o),children:o?s.jsx(pa,{className:"w-6 h-6"}):s.jsx(Qg,{className:"w-6 h-6"})})]})]})}),s.jsx("div",{className:k("lg:hidden fixed inset-0 top-16 bg-white z-40 transition-transform duration-300",o?"translate-x-0":"translate-x-full"),children:s.jsxs("div",{className:"p-6 space-y-6 overflow-y-auto h-full pb-32",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3",children:"Périodes Historiques"}),s.jsx("div",{className:"space-y-1",children:qd.map(u=>{const m=u.icon;return s.jsxs(C,{to:E("Period")+`?id=${u.id}`,onClick:()=>c(!1),className:"flex items-center gap-3 p-3 rounded-lg hover:bg-[#f5f1e8] transition-colors",children:[s.jsx(m,{className:"w-5 h-5 text-[#1e3a5f]"}),s.jsxs("div",{children:[s.jsx("span",{className:"font-medium text-[#1e3a5f]",children:u.name}),s.jsx("span",{className:"text-xs text-gray-500 ml-2",children:u.years})]})]},u.id)})})]}),s.jsxs("div",{className:"border-t border-gray-100 pt-6",children:[s.jsx("h3",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3",children:"Encyclopédie"}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:Bd.map(u=>{const m=u.icon;return s.jsxs(C,{to:E(u.href),onClick:()=>c(!1),className:"flex items-center gap-2 p-3 rounded-lg bg-[#f5f1e8] hover:bg-[#ebe7de] transition-colors",children:[s.jsx(m,{className:"w-5 h-5 text-[#c9a227]"}),s.jsx("span",{className:"font-medium text-[#1e3a5f] text-sm",children:u.name})]},u.id)})})]}),s.jsxs("div",{className:"border-t border-gray-100 pt-6",children:[s.jsx("h3",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3",children:"Explorer"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(C,{to:E("Timeline"),onClick:()=>c(!1),className:"flex items-center gap-3 p-3 rounded-lg hover:bg-[#f5f1e8] transition-colors",children:[s.jsx(Wl,{className:"w-5 h-5 text-[#c9a227]"}),s.jsx("span",{className:"font-medium text-[#1e3a5f]",children:"Chronologie"})]}),s.jsxs(C,{to:E("Maps"),onClick:()=>c(!1),className:"flex items-center gap-3 p-3 rounded-lg hover:bg-[#f5f1e8] transition-colors",children:[s.jsx(Ul,{className:"w-5 h-5 text-[#c9a227]"}),s.jsx("span",{className:"font-medium text-[#1e3a5f]",children:"Carte"})]}),s.jsxs(C,{to:E("FamilyTrees"),onClick:()=>c(!1),className:"flex items-center gap-3 p-3 rounded-lg hover:bg-[#f5f1e8] transition-colors",children:[s.jsx(Vs,{className:"w-5 h-5 text-[#c9a227]"}),s.jsx("span",{className:"font-medium text-[#1e3a5f]",children:"Généalogie"})]})]})]})]})})]})}const W0=[{id:"prehistory",name:"Préhistoire & Antiquité"},{id:"early-middle-ages",name:"Haut Moyen Âge"},{id:"high-middle-ages",name:"Moyen Âge Central"},{id:"late-middle-ages",name:"Bas Moyen Âge"},{id:"renaissance",name:"Renaissance"},{id:"classical",name:"Époque Classique"},{id:"revolution-empire",name:"Révolution & Empire"},{id:"modern",name:"Époque Moderne"},{id:"contemporary",name:"Époque Contemporaine"}],G0=[{name:"Personnages",href:"Characters",icon:ge},{name:"Batailles",href:"Battles",icon:ce},{name:"Dynasties",href:"Dynasties",icon:U},{name:"Châteaux & Lieux",href:"Places",icon:Fe},{name:"Événements",href:"Events",icon:Wl},{name:"Cartes",href:"Maps",icon:ke}],X0=[{name:"Chronologie complète",href:"Timeline"},{name:"Arbres généalogiques",href:"FamilyTrees"},{name:"Sources historiques",href:"Sources"},{name:"Bibliographie",href:"Bibliography"},{name:"Glossaire",href:"Glossary"}];function Q0(){return s.jsxs("footer",{className:"bg-[#1e3a5f] text-white",children:[s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12",children:[s.jsxs("div",{className:"lg:col-span-1",children:[s.jsxs(C,{to:E("Home"),className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-[#c9a227] to-[#a88620] flex items-center justify-center",children:s.jsx(U,{className:"w-6 h-6 text-white"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-bold",children:"Histoire de France"}),s.jsx("p",{className:"text-xs text-white/60 tracking-wider uppercase",children:"L'Encyclopédie"})]})]}),s.jsx("p",{className:"text-white/70 text-sm leading-relaxed mb-6",children:"La référence mondiale sur l'histoire de France. Des origines préhistoriques jusqu'à nos jours, explorez plus de 2000 ans d'histoire à travers personnages, batailles, dynasties et lieux emblématiques."}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("a",{href:"#",className:"w-10 h-10 rounded-full bg-white/10 flex items-center justify-center hover:bg-[#c9a227] transition-colors",children:s.jsx(n0,{className:"w-5 h-5"})}),s.jsx("a",{href:"#",className:"w-10 h-10 rounded-full bg-white/10 flex items-center justify-center hover:bg-[#c9a227] transition-colors",children:s.jsx(Ug,{className:"w-5 h-5"})}),s.jsx("a",{href:"#",className:"w-10 h-10 rounded-full bg-white/10 flex items-center justify-center hover:bg-[#c9a227] transition-colors",children:s.jsx(Xg,{className:"w-5 h-5"})})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wider text-[#c9a227] mb-6",children:"Périodes Historiques"}),s.jsx("ul",{className:"space-y-3",children:W0.map(e=>s.jsx("li",{children:s.jsxs(C,{to:E("Period")+`?id=${e.id}`,className:"text-sm text-white/70 hover:text-[#c9a227] transition-colors flex items-center gap-2",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#c9a227]/50"}),e.name]})},e.id))})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wider text-[#c9a227] mb-6",children:"Encyclopédie"}),s.jsx("ul",{className:"space-y-3",children:G0.map(e=>{const t=e.icon;return s.jsx("li",{children:s.jsxs(C,{to:E(e.href),className:"text-sm text-white/70 hover:text-[#c9a227] transition-colors flex items-center gap-2",children:[s.jsx(t,{className:"w-4 h-4"}),e.name]})},e.href)})})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wider text-[#c9a227] mb-6",children:"Ressources"}),s.jsx("ul",{className:"space-y-3",children:X0.map(e=>s.jsx("li",{children:s.jsxs(C,{to:E(e.href),className:"text-sm text-white/70 hover:text-[#c9a227] transition-colors flex items-center gap-2",children:[s.jsx(xt,{className:"w-4 h-4"}),e.name]})},e.href))}),s.jsxs("div",{className:"mt-8 pt-6 border-t border-white/10",children:[s.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-white/50 mb-3",children:"Autres Langues"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:["🇬🇧 EN","🇩🇪 DE","🇪🇸 ES","🇮🇹 IT","🇵🇹 PT"].map(e=>s.jsx("span",{className:"text-xs px-2 py-1 rounded bg-white/10 text-white/70 hover:bg-[#c9a227] hover:text-white cursor-pointer transition-colors",children:e},e))})]})]})]})}),s.jsx("div",{className:"border-t border-white/10",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6",children:s.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[s.jsxs("p",{className:"text-sm text-white/50",children:["© ",new Date().getFullYear()," Histoire de France. Tous droits réservés."]}),s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsx(C,{to:E("About"),className:"text-sm text-white/50 hover:text-white transition-colors",children:"À propos"}),s.jsx(C,{to:E("Contact"),className:"text-sm text-white/50 hover:text-white transition-colors",children:"Contact"}),s.jsx(C,{to:E("Privacy"),className:"text-sm text-white/50 hover:text-white transition-colors",children:"Confidentialité"}),s.jsx(C,{to:E("Sitemap"),className:"text-sm text-white/50 hover:text-white transition-colors",children:"Plan du site"})]})]})})}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"WebSite",name:"Histoire de France",alternateName:["History of France","Geschichte Frankreichs","Historia de Francia"],url:"https://timelinefrance.com",potentialAction:{"@type":"SearchAction",target:"https://timelinefrance.com/search?q={search_term_string}","query-input":"required name=search_term_string"}})}})]})}const Kh=j.forwardRef(({className:e,checked:t,onCheckedChange:n,...r},l)=>{const[a,i]=j.useState(t??!1),o=t!==void 0?t:a,c=d=>{const h=d.target.checked;t===void 0&&i(h),n==null||n(h)};return s.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",checked:o,onChange:c,ref:l,...r}),s.jsx("div",{className:k("relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-[#1e3a5f] peer-focus:ring-offset-2 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#c9a227]",e)})]})});Kh.displayName="Switch";const sl="cookie_consent",Y0=[{id:"necessary",name:"Cookies essentiels",nameEn:"Essential Cookies",description:"Nécessaires au fonctionnement du site. Ils ne peuvent pas être désactivés.",descriptionEn:"Required for the website to function. They cannot be disabled.",required:!0},{id:"analytics",name:"Cookies analytiques",nameEn:"Analytics Cookies",description:"Nous aident à comprendre comment vous utilisez le site pour l'améliorer.",descriptionEn:"Help us understand how you use the site to improve it.",required:!1},{id:"marketing",name:"Cookies marketing",nameEn:"Marketing Cookies",description:"Utilisés pour vous proposer des publicités pertinentes.",descriptionEn:"Used to show you relevant advertisements.",required:!1},{id:"preferences",name:"Cookies de préférences",nameEn:"Preference Cookies",description:"Permettent de mémoriser vos choix et préférences.",descriptionEn:"Allow us to remember your choices and preferences.",required:!1}];function J0(){const[e,t]=j.useState(!1),[n,r]=j.useState(!1),[l,a]=j.useState({necessary:!0,analytics:!1,marketing:!1,preferences:!1}),[i,o]=j.useState("eu");j.useEffect(()=>{localStorage.getItem(sl)||t(!0),Intl.DateTimeFormat().resolvedOptions().timeZone.startsWith("America/")&&o("us")},[]);const c=()=>{const x={necessary:!0,analytics:!0,marketing:!0,preferences:!0,timestamp:new Date().toISOString(),region:i};localStorage.setItem(sl,JSON.stringify(x)),t(!1)},d=()=>{const x={necessary:!0,analytics:!1,marketing:!1,preferences:!1,timestamp:new Date().toISOString(),region:i};localStorage.setItem(sl,JSON.stringify(x)),t(!1)},h=()=>{const x={...l,timestamp:new Date().toISOString(),region:i};localStorage.setItem(sl,JSON.stringify(x)),t(!1)},u=x=>{x!=="necessary"&&a(f=>({...f,[x]:!f[x]}))};if(!e)return null;const m=i==="eu";return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-end justify-center p-4 pointer-events-none",children:[s.jsx("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm pointer-events-auto",onClick:()=>{}}),s.jsxs("div",{className:"relative w-full max-w-4xl bg-white rounded-2xl shadow-2xl pointer-events-auto mb-4 overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-100",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-[#c9a227]/10 flex items-center justify-center",children:s.jsx($g,{className:"w-5 h-5 text-[#c9a227]"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-bold text-[#1e3a5f]",children:m?"Gestion des cookies":"Cookie Settings"}),s.jsx("p",{className:"text-sm text-gray-500",children:m?"Conforme RGPD":"CCPA Compliant"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ws,{className:"w-4 h-4 text-emerald-500"}),s.jsx("span",{className:"text-xs text-emerald-600 font-medium",children:m?"RGPD":"CCPA"})]})]}),s.jsxs("div",{className:"p-6",children:[s.jsx("p",{className:"text-gray-600 mb-4",children:m?s.jsx(s.Fragment,{children:"Nous utilisons des cookies pour améliorer votre expérience sur notre site. Conformément au RGPD, nous avons besoin de votre consentement pour utiliser certains cookies. Vous pouvez personnaliser vos choix ci-dessous."}):s.jsx(s.Fragment,{children:"We use cookies to enhance your experience on our website. Under the CCPA, you have the right to opt-out of the sale of your personal information. You can customize your preferences below."})}),s.jsx("button",{onClick:()=>r(!n),className:"flex items-center gap-2 text-[#1e3a5f] font-medium text-sm hover:text-[#c9a227] transition-colors mb-4",children:n?s.jsxs(s.Fragment,{children:[s.jsx(Bg,{className:"w-4 h-4"}),m?"Masquer les détails":"Hide details"]}):s.jsxs(s.Fragment,{children:[s.jsx(ua,{className:"w-4 h-4"}),m?"Personnaliser mes choix":"Customize my choices"]})}),n&&s.jsx("div",{className:"space-y-3 mb-6 p-4 bg-gray-50 rounded-xl",children:Y0.map(x=>s.jsxs("div",{className:"flex items-center justify-between p-3 bg-white rounded-lg",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("p",{className:"font-medium text-[#1e3a5f]",children:m?x.name:x.nameEn}),x.required&&s.jsx("span",{className:"text-xs px-2 py-0.5 bg-gray-100 text-gray-500 rounded-full",children:m?"Requis":"Required"})]}),s.jsx("p",{className:"text-sm text-gray-500 mt-1",children:m?x.description:x.descriptionEn})]}),s.jsx(Kh,{checked:l[x.id],onCheckedChange:()=>u(x.id),disabled:x.required,className:"ml-4"})]},x.id))}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsx(z,{onClick:d,variant:"outline",className:"flex-1 rounded-full border-gray-300",children:m?"Refuser tout":"Reject All"}),n?s.jsx(z,{onClick:h,className:"flex-1 bg-[#1e3a5f] hover:bg-[#2d5a87] rounded-full",children:m?"Enregistrer mes préférences":"Save Preferences"}):s.jsx(z,{onClick:c,className:"flex-1 bg-[#c9a227] hover:bg-[#a88620] rounded-full",children:m?"Accepter tout":"Accept All"})]}),s.jsxs("div",{className:"flex justify-center gap-4 mt-4 text-xs text-gray-400",children:[s.jsx("a",{href:"#",className:"hover:text-[#c9a227] transition-colors",children:m?"Politique de confidentialité":"Privacy Policy"}),s.jsx("span",{children:"•"}),s.jsx("a",{href:"#",className:"hover:text-[#c9a227] transition-colors",children:m?"Mentions légales":"Terms of Service"})]})]})]})]})}function K0({children:e,currentPageName:t}){const{language:n,setLanguage:r}=Ze(),a=["Home"].includes(t||"");return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsx(U0,{currentLang:n,onLanguageChange:r,isHomePage:t==="Home"}),s.jsx("main",{className:a?"":"pt-16 lg:pt-20",children:e}),s.jsx(Q0,{}),s.jsx(J0,{}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Organization",name:"Histoire de France",alternateName:["History of France Encyclopedia","Enzyklopädie der Geschichte Frankreichs"],url:"https://timelinefrance.com",logo:"https://timelinefrance.com/logo.png",description:"L'encyclopédie de référence sur l'histoire de France, des origines à nos jours.",sameAs:["https://twitter.com/histoiredefrance","https://facebook.com/histoiredefrance"]})}}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"WebSite",name:"Histoire de France",url:"https://timelinefrance.com",potentialAction:{"@type":"SearchAction",target:{"@type":"EntryPoint",urlTemplate:"https://timelinefrance.com/search?q={search_term_string}"},"query-input":"required name=search_term_string"}})}})]})}const Ua=[{title:"La France des Rois",subtitle:"De Clovis à Louis XVI",image:"https://images.unsplash.com/photo-1499856871958-5b9627545d1a?w=1920&q=80",accent:"Des Mérovingiens aux Bourbons, découvrez les dynasties qui ont forgé la France",cta:{text:"Les Dynasties",page:"Dynasties"},icon:U},{title:"Les Grandes Batailles",subtitle:"Qui ont changé l'Histoire",image:"https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=1920&q=80",accent:"De Bouvines à Austerlitz, les conflits qui ont façonné la nation",cta:{text:"Les Batailles",page:"Battles"},icon:ce},{title:"Châteaux de France",subtitle:"Témoins de l'Histoire",image:"https://images.unsplash.com/photo-1518998053901-5348d3961a04?w=1920&q=80",accent:"Versailles, Chambord, Vincennes... Explorez les joyaux du patrimoine",cta:{text:"Les Châteaux",page:"Places"},icon:Fe}];function Z0(){const[e,t]=j.useState(0),[n,r]=j.useState(!1);j.useEffect(()=>{const i=setInterval(()=>{r(!0),setTimeout(()=>{t(o=>(o+1)%Ua.length),r(!1)},500)},6e3);return()=>clearInterval(i)},[]);const l=Ua[e],a=l.icon;return s.jsxs("section",{className:"relative h-screen min-h-[700px] overflow-hidden",children:[Ua.map((i,o)=>s.jsx("div",{className:k("absolute inset-0 transition-opacity duration-1000",o===e?"opacity-100":"opacity-0"),children:s.jsx("img",{src:i.image,alt:i.title,className:"w-full h-full object-cover"})},o)),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1e3a5f]/80 via-[#1e3a5f]/60 to-[#1e3a5f]/90"}),s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx("div",{className:"absolute inset-0 animate-pulse",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23c9a227' fill-opacity='1' fill-rule='evenodd'/%3E%3C/svg%3E")`}})}),s.jsxs("div",{className:"relative h-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col justify-center",children:[s.jsxs("div",{className:"pt-20",children:[s.jsxs("div",{className:k("inline-flex items-center gap-3 px-4 py-2 rounded-full bg-[#c9a227]/20 border border-[#c9a227]/30 mb-8 transition-all duration-500",n?"opacity-0 translate-y-4":"opacity-100 translate-y-0"),children:[s.jsx(a,{className:"w-5 h-5 text-[#c9a227]"}),s.jsx("span",{className:"text-[#c9a227] text-sm font-medium tracking-wider uppercase",children:l.subtitle})]}),s.jsx("h1",{className:k("text-5xl md:text-7xl lg:text-8xl font-bold text-white mb-6 max-w-4xl transition-all duration-500",n?"opacity-0 translate-y-8":"opacity-100 translate-y-0"),children:l.title}),s.jsx("p",{className:k("text-xl md:text-2xl text-white/80 max-w-2xl mb-10 leading-relaxed transition-all duration-500 delay-100",n?"opacity-0 translate-y-8":"opacity-100 translate-y-0"),children:l.accent}),s.jsxs("div",{className:k("flex flex-wrap gap-4 transition-all duration-500 delay-200",n?"opacity-0 translate-y-8":"opacity-100 translate-y-0"),children:[s.jsx(C,{to:E("Timeline"),children:s.jsxs(z,{size:"lg",className:"bg-[#c9a227] hover:bg-[#a88620] text-white rounded-full px-8 py-6 text-lg shadow-2xl hover:shadow-[#c9a227]/25 transition-all",children:[s.jsx(Yg,{className:"w-5 h-5 mr-2"}),"Explorer la Chronologie"]})}),s.jsx(C,{to:E(l.cta.page),children:s.jsx(z,{size:"lg",variant:"outline",className:"border-2 border-white/30 text-white hover:bg-white/10 rounded-full px-8 py-6 text-lg backdrop-blur-sm",children:l.cta.text})})]})]}),s.jsx("div",{className:"absolute bottom-6 left-1/2 -translate-x-1/2",children:s.jsx("div",{className:"animate-bounce",children:s.jsx(ua,{className:"w-6 h-6 text-white/50"})})})]})]})}async function Zh(e,t){try{const n=await fetch(`/data/metadata/${e}/${t}.json`);return n.ok?await n.json():null}catch(n){return console.error(`Error loading metadata for ${e}/${t}:`,n),null}}async function bt(e,t,n,r){try{const l=r?`/data/translations/${n}/${e}/${t}/${r}.json`:`/data/translations/${n}/${e}/${t}.json`,a=await fetch(l);if(!a.ok)return n!=="fr"?bt(e,t,"fr",r):null;const i=a.headers.get("content-type");return i&&!i.includes("application/json")?n!=="fr"?bt(e,t,"fr",r):null:await a.json()}catch(l){return l instanceof SyntaxError&&l.message.includes("JSON")||console.error(`Error loading translation for ${e}/${t}/${n}:`,l),n!=="fr"?bt(e,t,"fr",r):null}}async function ep(e,t){try{const n=await fetch(`/data/images/${e}/${t}.json`);if(!n.ok)return n.status!==404&&console.warn(`Image metadata not found for ${e}/${t}`),null;const r=n.headers.get("content-type");return r&&!r.includes("application/json")?null:await n.json()}catch(n){return n instanceof SyntaxError&&n.message.includes("JSON")||console.error(`Error loading image metadata for ${e}/${t}:`,n),null}}async function tp(e,t){try{const n=await fetch(`/data/seo/pages/${e}/${t}.json`);if(!n.ok)return n.status!==404&&console.warn(`SEO metadata not found for ${e}/${t}`),null;const r=n.headers.get("content-type");return r&&!r.includes("application/json")?null:await n.json()}catch(n){return n instanceof SyntaxError&&n.message.includes("JSON")||console.error(`Error loading SEO metadata for ${e}/${t}:`,n),null}}async function wt(e){try{const t=await fetch(`/data/indexes/${e}-index.json`);return t.ok?await t.json():{}}catch(t){return console.error(`Error loading index for ${e}:`,t),{}}}async function Ki(e,t,n="fr"){const[r,l,a,i]=await Promise.all([Zh(e,t),bt(e,t,n,"biography"),ep(e,t),tp(e,t)]);return{metadata:r,biography:l,images:a,seo:i,lang:n}}function $d({id:e,name:t,years:n,description:r,image:l,characterCount:a,battleCount:i,keyFigure:o,variant:c="default",className:d}){const h=s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative h-48 lg:h-56 overflow-hidden",children:[s.jsx("img",{src:l||"https://images.unsplash.com/photo-1461360370896-922624d12a74?w=600&q=80",alt:t,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110",loading:"lazy",decoding:"async"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] via-[#1e3a5f]/50 to-transparent"}),s.jsx("div",{className:"absolute top-4 left-4",children:s.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-[#c9a227] text-white text-xs font-semibold shadow-lg",children:[s.jsx(le,{className:"w-3 h-3"}),n]})}),s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-5",children:[s.jsx("h3",{className:"text-xl lg:text-2xl font-bold text-white mb-1 group-hover:text-[#c9a227] transition-colors",children:t}),o&&s.jsxs("p",{className:"text-white/80 text-sm flex items-center gap-1.5",children:[s.jsx(U,{className:"w-3.5 h-3.5 text-[#c9a227]"}),o]})]})]}),s.jsxs("div",{className:"p-5",children:[r&&s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed line-clamp-3 mb-4",children:r}),s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[a!==void 0&&s.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-gray-500",children:[s.jsx(ge,{className:"w-4 h-4 text-[#1e3a5f]"}),s.jsxs("span",{children:[a," personnages"]})]}),i!==void 0&&s.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-gray-500",children:[s.jsx(ce,{className:"w-4 h-4 text-red-600"}),s.jsxs("span",{children:[i," batailles"]})]})]}),s.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-gray-100",children:[s.jsx("span",{className:"text-sm font-semibold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors",children:"Explorer cette période"}),s.jsx("div",{className:"w-8 h-8 rounded-full bg-[#f5f1e8] flex items-center justify-center group-hover:bg-[#c9a227] transition-colors",children:s.jsx(te,{className:"w-4 h-4 text-[#1e3a5f] group-hover:text-white transition-colors"})})]})]})]});return c==="featured"?s.jsxs(C,{to:E("Period")+`?id=${e}`,className:k("group relative block bg-white rounded-2xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-500 border border-amber-100","lg:flex lg:h-80",d),children:[s.jsxs("div",{className:"lg:w-1/2 relative h-64 lg:h-full overflow-hidden",children:[s.jsx("img",{src:l||"https://images.unsplash.com/photo-1461360370896-922624d12a74?w=800&q=80",alt:t,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110",loading:"lazy",decoding:"async"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent to-[#1e3a5f]/80 hidden lg:block"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] to-transparent lg:hidden"})]}),s.jsxs("div",{className:"lg:w-1/2 p-6 lg:p-8 flex flex-col justify-center",children:[s.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-[#c9a227]/10 text-[#c9a227] text-xs font-semibold w-fit mb-4",children:[s.jsx(le,{className:"w-3 h-3"}),n]}),s.jsx("h3",{className:"text-2xl lg:text-3xl font-bold text-[#1e3a5f] mb-3 group-hover:text-[#c9a227] transition-colors",children:t}),r&&s.jsx("p",{className:"text-gray-600 leading-relaxed line-clamp-4 mb-6",children:r}),s.jsxs("div",{className:"flex items-center gap-6",children:[a!==void 0&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[s.jsx(ge,{className:"w-4 h-4 text-[#1e3a5f]"}),s.jsxs("span",{children:[a," personnages"]})]}),i!==void 0&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[s.jsx(ce,{className:"w-4 h-4 text-red-600"}),s.jsxs("span",{children:[i," batailles"]})]})]})]})]}):s.jsx(C,{to:E("Period")+`?id=${e}`,className:k("group block bg-white rounded-2xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-500 border border-amber-100",d),children:h})}function ev(){const[e,t]=j.useState([]),[n,r]=j.useState(!0),{language:l}=Ze();return j.useEffect(()=>{async function a(){try{const i=await wt("periods"),c=Object.values(i||{}).filter(u=>!u.parentPeriod),h=(await Promise.allSettled(c.map(async u=>{var m,x,f,v,w,g,p;try{const y=await bt("periods",u.id,l,"overview");return{id:u.id,name:((m=y==null?void 0:y.name)==null?void 0:m[l])||((x=y==null?void 0:y.name)==null?void 0:x.fr)||((f=u.name)==null?void 0:f[l])||((v=u.name)==null?void 0:v.fr),years:(y==null?void 0:y.years)||u.years,description:(y==null?void 0:y.shortDescription)||"",image:"https://images.unsplash.com/photo-1564399579883-451a5d44ec08?w=800&q=80",characterCount:u.characterCount||0,battleCount:u.battleCount||0,keyFigure:void 0}}catch{return{id:u.id,name:((w=u.name)==null?void 0:w[l])||((g=u.name)==null?void 0:g.fr)||((p=u.name)==null?void 0:p.en)||"Unknown",years:u.years||"",description:"",image:"https://images.unsplash.com/photo-1564399579883-451a5d44ec08?w=800&q=80",characterCount:u.characterCount||0,battleCount:u.battleCount||0,keyFigure:void 0}}}))).filter(u=>u.status==="fulfilled").map(u=>u.value);t(h)}catch(i){console.error("Error loading periods:",i)}finally{r(!1)}}a()},[l]),s.jsx("section",{className:"py-24 bg-gradient-to-b from-white to-[#f5f1e8]/30",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end lg:justify-between mb-16 gap-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(fs,{className:"w-5 h-5 text-[#c9a227]"}),s.jsx("span",{className:"text-sm font-semibold text-[#c9a227] uppercase tracking-wider",children:"Voyagez dans le temps"})]}),s.jsx("h2",{className:"text-4xl lg:text-5xl font-bold text-[#1e3a5f] mb-4",children:"Les Grandes Périodes"}),s.jsx("p",{className:"text-xl text-gray-600 max-w-2xl",children:"De la Préhistoire à nos jours, explorez les époques qui ont façonné l'histoire de France et découvrez les événements marquants de chaque ère."})]}),s.jsx(C,{to:E("Timeline"),children:s.jsxs(z,{variant:"outline",className:"border-[#1e3a5f] text-[#1e3a5f] hover:bg-[#1e3a5f] hover:text-white rounded-full px-6",children:["Voir la chronologie complète",s.jsx(te,{className:"w-4 h-4 ml-2"})]})})]}),n?s.jsxs("div",{className:"text-center py-12",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-[#c9a227] mx-auto mb-4"}),s.jsx("p",{className:"text-gray-600",children:"Chargement des périodes..."})]}):e.length>0?s.jsxs(s.Fragment,{children:[e.length>0&&s.jsx("div",{className:"mb-8",children:s.jsx($d,{...e[e.length-1],variant:"featured"})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[e.slice(0,e.length-1).map(a=>s.jsx($d,{...a},a.id)),s.jsxs(C,{to:E("Timeline"),className:"group flex flex-col items-center justify-center bg-[#1e3a5f] rounded-2xl p-8 text-center hover:bg-[#2d5a87] transition-colors min-h-[300px]",children:[s.jsx("div",{className:"w-16 h-16 rounded-full bg-[#c9a227]/20 flex items-center justify-center mb-6 group-hover:bg-[#c9a227]/30 transition-colors",children:s.jsx(te,{className:"w-8 h-8 text-[#c9a227]"})}),s.jsx("h3",{className:"text-xl font-bold text-white mb-2",children:"Voir toutes les périodes"}),s.jsx("p",{className:"text-white/70 text-sm",children:"Explorez toutes les périodes de l'histoire de France"})]})]})]}):s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600",children:"Aucune période disponible."})})]})})}function $({className:e,variant:t="default",...n}){return s.jsx("div",{className:k("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",{"border-transparent bg-[#1e3a5f] text-white":t==="default","border-transparent bg-gray-100 text-gray-900":t==="secondary","text-gray-950":t==="outline"},e),...n})}function ft({id:e,name:t,title:n,years:r,birthYear:l,deathYear:a,portrait:i,dynasty:o,role:c,description:d,variant:h="default",className:u}){const{language:m}=Ze(),x=Nt("characters",e,m),f={king:U,queen:U,military:ce,religious:xt,noble:ws,default:U},v={king:"bg-[#c9a227] text-white",queen:"bg-purple-600 text-white",military:"bg-red-600 text-white",religious:"bg-indigo-600 text-white",noble:"bg-emerald-600 text-white",default:"bg-[#1e3a5f] text-white"},w=f[c]||f.default,g=v[c]||v.default,p=r||(l&&a?`${l} - ${a}`:l||"");return h==="compact"?s.jsxs(C,{to:x,className:k("group flex items-center gap-4 p-4 bg-white rounded-xl border border-amber-100 hover:border-[#c9a227] hover:shadow-lg transition-all duration-300",u),children:[s.jsxs("div",{className:"relative flex-shrink-0",children:[s.jsx("div",{className:"w-14 h-14 rounded-full overflow-hidden border-2 border-[#c9a227]/30 group-hover:border-[#c9a227] transition-colors",children:s.jsx("img",{src:i||"https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=100&q=80",alt:t,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})}),s.jsx("div",{className:k("absolute -bottom-1 -right-1 w-6 h-6 rounded-full flex items-center justify-center",g),children:s.jsx(w,{className:"w-3 h-3"})})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h4",{className:"font-semibold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors truncate",children:t}),n&&s.jsx("p",{className:"text-sm text-gray-500 truncate",children:n}),p&&s.jsxs("p",{className:"text-xs text-gray-400 flex items-center gap-1 mt-1",children:[s.jsx(le,{className:"w-3 h-3"}),p]})]}),s.jsx(te,{className:"w-4 h-4 text-gray-300 group-hover:text-[#c9a227] transition-colors flex-shrink-0"})]}):h==="mini"?s.jsxs(C,{to:x,className:k("group flex items-center gap-3 p-2 rounded-lg hover:bg-[#f5f1e8] transition-colors",u),children:[s.jsx("div",{className:"w-10 h-10 rounded-full overflow-hidden border border-[#c9a227]/30",children:s.jsx("img",{src:i||"https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=80&q=80",alt:t,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h5",{className:"font-medium text-sm text-[#1e3a5f] group-hover:text-[#c9a227] truncate",children:t}),p&&s.jsx("p",{className:"text-xs text-gray-400",children:p})]})]}):s.jsxs(C,{to:x,className:k("group block bg-white rounded-2xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-500 border border-amber-100",u),children:[s.jsxs("div",{className:"relative h-64 overflow-hidden",children:[s.jsx("img",{src:i||"https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=400&q=80",alt:t,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110",loading:"lazy",decoding:"async"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] via-transparent to-transparent"}),s.jsx("div",{className:"absolute top-4 right-4",children:s.jsx("div",{className:k("w-10 h-10 rounded-full flex items-center justify-center shadow-lg",g),children:s.jsx(w,{className:"w-5 h-5"})})}),o&&s.jsx("div",{className:"absolute top-4 left-4",children:s.jsx($,{variant:"secondary",className:"bg-white/90 text-[#1e3a5f] text-xs",children:o})}),s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-5",children:[s.jsx("h3",{className:"text-xl font-bold text-white group-hover:text-[#c9a227] transition-colors",children:t}),n&&s.jsx("p",{className:"text-white/80 text-sm mt-1",children:n})]})]}),s.jsxs("div",{className:"p-5",children:[p&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 mb-3",children:[s.jsx(le,{className:"w-4 h-4 text-[#c9a227]"}),s.jsx("span",{children:p})]}),d&&s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed line-clamp-3 mb-4",children:d}),s.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-gray-100",children:[s.jsx("span",{className:"text-sm font-semibold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors",children:"Voir la biographie"}),s.jsx("div",{className:"w-8 h-8 rounded-full bg-[#f5f1e8] flex items-center justify-center group-hover:bg-[#c9a227] transition-colors",children:s.jsx(te,{className:"w-4 h-4 text-[#1e3a5f] group-hover:text-white transition-colors"})})]})]})]})}const tv=[{id:"charlemagne",name:"Charlemagne",title:"Empereur d'Occident",years:"742 - 814",portrait:"https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=400&q=80",dynasty:"Carolingiens",role:"king",description:"Roi des Francs et empereur d'Occident, il unifia une grande partie de l'Europe occidentale et posa les bases de la civilisation médiévale."},{id:"philippe-auguste",name:"Philippe II Auguste",title:"Roi de France",years:"1165 - 1223",portrait:"https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=400&q=80",dynasty:"Capétiens",role:"king",description:"Vainqueur de Bouvines, il transforma le royaume de France en une puissance européenne majeure et tripler le domaine royal."},{id:"louis-xiv",name:"Louis XIV",title:"Le Roi Soleil",years:"1638 - 1715",portrait:"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&q=80",dynasty:"Bourbons",role:"king",description:"Symbole de la monarchie absolue, son règne de 72 ans reste le plus long de l'histoire de France. Bâtisseur de Versailles."},{id:"napoleon",name:"Napoléon Bonaparte",title:"Empereur des Français",years:"1769 - 1821",portrait:"https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=400&q=80",dynasty:"Napoléonides",role:"military",description:"Du Consulat à l'Empire, il redessina la carte de l'Europe et laissa un héritage juridique et administratif indélébile."}],sv=[{id:"clovis",name:"Clovis Ier",years:"466 - 511",portrait:null},{id:"jeanne-darc",name:"Jeanne d'Arc",years:"1412 - 1431",portrait:null},{id:"francois-ier",name:"François Ier",years:"1494 - 1547",portrait:null},{id:"henri-iv",name:"Henri IV",years:"1553 - 1610",portrait:null},{id:"louis-ix",name:"Saint Louis",years:"1214 - 1270",portrait:null},{id:"richelieu",name:"Cardinal Richelieu",years:"1585 - 1642",portrait:null}];function nv(){return s.jsx("section",{className:"py-24 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end lg:justify-between mb-16 gap-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(U,{className:"w-5 h-5 text-[#c9a227]"}),s.jsx("span",{className:"text-sm font-semibold text-[#c9a227] uppercase tracking-wider",children:"Portraits de l'Histoire"})]}),s.jsx("h2",{className:"text-4xl lg:text-5xl font-bold text-[#1e3a5f] mb-4",children:"Personnages Illustres"}),s.jsx("p",{className:"text-xl text-gray-600 max-w-2xl",children:"Rois et reines, généraux et saints, philosophes et révolutionnaires : les hommes et femmes qui ont écrit l'histoire de France."})]}),s.jsx(C,{to:E("Characters"),children:s.jsxs(z,{variant:"outline",className:"border-[#1e3a5f] text-[#1e3a5f] hover:bg-[#1e3a5f] hover:text-white rounded-full px-6",children:["Tous les personnages",s.jsx(te,{className:"w-4 h-4 ml-2"})]})})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12",children:tv.map(e=>s.jsx(ft,{...e},e.id))}),s.jsxs("div",{className:"bg-[#f5f1e8] rounded-2xl p-6 lg:p-8",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ge,{className:"w-5 h-5 text-[#1e3a5f]"}),s.jsx("h3",{className:"text-lg font-semibold text-[#1e3a5f]",children:"Autres figures majeures"})]}),s.jsxs(C,{to:E("Characters"),className:"text-sm text-[#c9a227] hover:text-[#a88620] flex items-center gap-1",children:["Voir plus",s.jsx(te,{className:"w-4 h-4"})]})]}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4",children:sv.map(e=>s.jsx(ft,{...e,variant:"mini"},e.id))})]})]})})}function qs({id:e,name:t,date:n,year:r,location:l,image:a,result:i,commanders:o,forces:c,casualties:d,description:h,variant:u="default",className:m}){const{language:x}=Ze(),f=Nt("battles",e,x),v={victory:"bg-emerald-100 text-emerald-800 border-emerald-200",defeat:"bg-red-100 text-red-800 border-red-200",draw:"bg-amber-100 text-amber-800 border-amber-200",default:"bg-gray-100 text-gray-800 border-gray-200"},w={victory:"Victoire française",defeat:"Défaite française",draw:"Indécis",default:i};return u==="compact"?s.jsxs(C,{to:f,className:k("group flex items-center gap-4 p-4 bg-white rounded-xl border border-amber-100 hover:border-red-300 hover:shadow-lg transition-all duration-300",m),children:[s.jsx("div",{className:"w-14 h-14 rounded-lg bg-gradient-to-br from-red-600 to-red-800 flex items-center justify-center flex-shrink-0",children:s.jsx(ce,{className:"w-6 h-6 text-white"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h4",{className:"font-semibold text-[#1e3a5f] group-hover:text-red-600 transition-colors truncate",children:t}),s.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[(n||r)&&s.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[s.jsx(le,{className:"w-3 h-3"}),n||r]}),l&&s.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[s.jsx(ke,{className:"w-3 h-3"}),l]})]})]}),i&&s.jsx($,{variant:"outline",className:k("flex-shrink-0",v[i]||v.default),children:w[i]||i})]}):u==="mini"?s.jsxs(C,{to:f,className:k("group flex items-center gap-3 p-2 rounded-lg hover:bg-red-50 transition-colors",m),children:[s.jsx("div",{className:"w-8 h-8 rounded bg-red-100 flex items-center justify-center",children:s.jsx(ce,{className:"w-4 h-4 text-red-600"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h5",{className:"font-medium text-sm text-[#1e3a5f] group-hover:text-red-600 truncate",children:t}),s.jsx("p",{className:"text-xs text-gray-400",children:n||r})]})]}):s.jsxs(C,{to:f,className:k("group block bg-white rounded-2xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-500 border border-amber-100",m),children:[s.jsxs("div",{className:"relative h-48 overflow-hidden",children:[s.jsx("img",{src:a||"https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=600&q=80",alt:t,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110",loading:"lazy",decoding:"async"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] via-[#1e3a5f]/30 to-transparent"}),s.jsx("div",{className:"absolute top-4 right-4",children:s.jsx("div",{className:"w-12 h-12 rounded-full bg-red-600 flex items-center justify-center shadow-lg",children:s.jsx(ce,{className:"w-6 h-6 text-white"})})}),i&&s.jsx("div",{className:"absolute top-4 left-4",children:s.jsx($,{className:k("border",v[i]||v.default),children:w[i]||i})}),s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-5",children:[s.jsx("h3",{className:"text-xl font-bold text-white group-hover:text-red-300 transition-colors",children:t}),s.jsxs("div",{className:"flex items-center gap-4 mt-2 text-white/80 text-sm",children:[(n||r)&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(le,{className:"w-3.5 h-3.5"}),n||r]}),l&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ke,{className:"w-3.5 h-3.5"}),l]})]})]})]}),s.jsxs("div",{className:"p-5",children:[o&&o.length>0&&s.jsxs("div",{className:"mb-4",children:[s.jsx("h4",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2",children:"Commandants"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:o.slice(0,4).map((g,p)=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-[#f5f1e8] rounded text-xs text-[#1e3a5f]",children:[s.jsx(ws,{className:"w-3 h-3"}),g]},p))})]}),h&&s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed line-clamp-2 mb-4",children:h}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-500",children:[c&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(ge,{className:"w-4 h-4"}),s.jsx("span",{children:c})]}),d&&s.jsxs("div",{className:"flex items-center gap-1 text-red-600",children:[s.jsx(or,{className:"w-4 h-4"}),s.jsx("span",{children:d})]})]}),s.jsxs("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-gray-100",children:[s.jsx("span",{className:"text-sm font-semibold text-[#1e3a5f] group-hover:text-red-600 transition-colors",children:"Détails de la bataille"}),s.jsx("div",{className:"w-8 h-8 rounded-full bg-red-50 flex items-center justify-center group-hover:bg-red-600 transition-colors",children:s.jsx(te,{className:"w-4 h-4 text-red-600 group-hover:text-white transition-colors"})})]})]})]})}const rv=[{id:"bouvines",name:"Bataille de Bouvines",date:"27 juillet 1214",year:"1214",location:"Bouvines, Flandre",image:"https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=600&q=80",result:"victory",commanders:["Philippe Auguste","Otton IV","Jean sans Terre"],description:"Victoire décisive de Philippe Auguste sur la coalition anglo-germanique. Cette bataille confirme la puissance du royaume de France."},{id:"azincourt",name:"Bataille d'Azincourt",date:"25 octobre 1415",year:"1415",location:"Azincourt, Artois",image:"https://images.unsplash.com/photo-1565689157206-0fddef7589a2?w=600&q=80",result:"defeat",commanders:["Charles d'Albret","Henri V d'Angleterre"],description:"Désastre de la chevalerie française face aux archers anglais. Point culminant de la guerre de Cent Ans."},{id:"marignan",name:"Bataille de Marignan",date:"13-14 septembre 1515",year:"1515",location:"Marignan, Italie",image:"https://images.unsplash.com/photo-1593169158019-e33d5a325c4c?w=600&q=80",result:"victory",commanders:["François Ier","Matthieu Schiner"],description:"Victoire éclatante de François Ier contre les Suisses. Le roi est fait chevalier par Bayard sur le champ de bataille."}],Hd=[{year:"732",name:"Poitiers",result:"victory"},{year:"1214",name:"Bouvines",result:"victory"},{year:"1346",name:"Crécy",result:"defeat"},{year:"1415",name:"Azincourt",result:"defeat"},{year:"1429",name:"Orléans",result:"victory"},{year:"1515",name:"Marignan",result:"victory"},{year:"1643",name:"Rocroi",result:"victory"},{year:"1805",name:"Austerlitz",result:"victory"},{year:"1815",name:"Waterloo",result:"defeat"},{year:"1916",name:"Verdun",result:"victory"}];function lv(){return s.jsxs("section",{className:"py-24 bg-gradient-to-b from-[#f5f1e8]/30 to-white relative overflow-hidden",children:[s.jsx("div",{className:"absolute top-0 right-0 w-1/3 h-full opacity-5",children:s.jsx(ce,{className:"w-full h-full text-[#1e3a5f]"})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end lg:justify-between mb-16 gap-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(ce,{className:"w-5 h-5 text-red-600"}),s.jsx("span",{className:"text-sm font-semibold text-red-600 uppercase tracking-wider",children:"Conflits & Victoires"})]}),s.jsx("h2",{className:"text-4xl lg:text-5xl font-bold text-[#1e3a5f] mb-4",children:"Les Grandes Batailles"}),s.jsx("p",{className:"text-xl text-gray-600 max-w-2xl",children:"De Bouvines à Verdun, les batailles qui ont forgé le destin de la France et marqué l'histoire militaire mondiale."})]}),s.jsx(C,{to:E("Battles"),children:s.jsxs(z,{variant:"outline",className:"border-red-600 text-red-600 hover:bg-red-600 hover:text-white rounded-full px-6",children:["Toutes les batailles",s.jsx(te,{className:"w-4 h-4 ml-2"})]})})]}),s.jsxs("div",{className:"mb-12 overflow-x-auto pb-4 pt-2",children:[s.jsxs("div",{className:"relative flex items-center min-w-max",children:[s.jsx("div",{className:"absolute top-4 left-0 right-0 h-0.5 bg-gray-200"}),Hd.map((e,t)=>s.jsxs(C,{to:E("Battle")+`?id=${e.name.toLowerCase()}`,className:"group flex flex-col items-center relative pt-2",style:{marginRight:t<Hd.length-1?"3rem":0},children:[s.jsx("div",{className:`w-4 h-4 rounded-full transition-transform group-hover:scale-150 z-10 ${e.result==="victory"?"bg-emerald-500":"bg-red-500"}`}),s.jsx("span",{className:"text-xs text-gray-500 mt-2 group-hover:text-[#1e3a5f] transition-colors",children:e.year}),s.jsx("span",{className:"text-xs font-medium text-[#1e3a5f] opacity-0 group-hover:opacity-100 transition-opacity",children:e.name})]},e.year))]}),s.jsxs("div",{className:"flex items-center gap-4 mt-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[s.jsx("div",{className:"w-3 h-3 rounded-full bg-emerald-500"}),s.jsx("span",{children:"Victoire française"})]}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[s.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500"}),s.jsx("span",{children:"Défaite française"})]})]})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:rv.map(e=>s.jsx(qs,{...e},e.id))}),s.jsx("div",{className:"mt-12 grid grid-cols-2 md:grid-cols-4 gap-4",children:[{icon:ce,value:"200+",label:"Batailles documentées"},{icon:ws,value:"150+",label:"Commandants"},{icon:or,value:"60%",label:"Victoires françaises"},{icon:te,value:"2000+",label:"Années couvertes"}].map((e,t)=>{const n=e.icon;return s.jsxs("div",{className:"bg-white rounded-xl p-6 border border-amber-100 shadow-sm",children:[s.jsx(n,{className:"w-6 h-6 text-red-600 mb-3"}),s.jsx("p",{className:"text-2xl font-bold text-[#1e3a5f]",children:e.value}),s.jsx("p",{className:"text-sm text-gray-500",children:e.label})]},t)})})]})]})}function Bs({id:e,name:t,type:n,location:r,region:l,constructionYear:a,image:i,description:o,builders:c,visitInfo:d,variant:h="default",className:u}){const{language:m}=Ze(),x=Nt("places",e,m),f={castle:"Château",cathedral:"Cathédrale",abbey:"Abbaye",palace:"Palais",fortress:"Forteresse",monument:"Monument",battlefield:"Champ de bataille",default:"Lieu historique"},v={castle:"bg-amber-100 text-amber-800",cathedral:"bg-purple-100 text-purple-800",abbey:"bg-indigo-100 text-indigo-800",palace:"bg-[#c9a227]/20 text-[#c9a227]",fortress:"bg-slate-100 text-slate-800",monument:"bg-emerald-100 text-emerald-800",battlefield:"bg-red-100 text-red-800",default:"bg-gray-100 text-gray-800"};return h==="compact"?s.jsxs(C,{to:x,className:k("group flex items-center gap-4 p-4 bg-white rounded-xl border border-amber-100 hover:border-emerald-300 hover:shadow-lg transition-all duration-300",u),children:[s.jsx("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0",children:s.jsx("img",{src:i||"https://images.unsplash.com/photo-1518998053901-5348d3961a04?w=200&q=80",alt:t,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h4",{className:"font-semibold text-[#1e3a5f] group-hover:text-emerald-600 transition-colors truncate",children:t}),s.jsx($,{variant:"secondary",className:k("text-xs flex-shrink-0",v[n]||v.default),children:f[n]||f.default})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[r&&s.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[s.jsx(ke,{className:"w-3 h-3"}),r]}),a&&s.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[s.jsx(le,{className:"w-3 h-3"}),a]})]})]}),s.jsx(te,{className:"w-4 h-4 text-gray-300 group-hover:text-emerald-600 transition-colors flex-shrink-0"})]}):h==="mini"?s.jsxs(C,{to:x,className:k("group flex items-center gap-3 p-2 rounded-lg hover:bg-emerald-50 transition-colors",u),children:[s.jsx("div",{className:"w-10 h-10 rounded overflow-hidden",children:s.jsx("img",{src:i||"https://images.unsplash.com/photo-1518998053901-5348d3961a04?w=100&q=80",alt:t,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h5",{className:"font-medium text-sm text-[#1e3a5f] group-hover:text-emerald-600 truncate",children:t}),r&&s.jsxs("p",{className:"text-xs text-gray-400 flex items-center gap-1",children:[s.jsx(ke,{className:"w-3 h-3"}),r]})]})]}):s.jsxs(C,{to:x,className:k("group block bg-white rounded-2xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-500 border border-amber-100",u),children:[s.jsxs("div",{className:"relative h-56 overflow-hidden",children:[s.jsx("img",{src:i||"https://images.unsplash.com/photo-1518998053901-5348d3961a04?w=600&q=80",alt:t,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110",loading:"lazy",decoding:"async"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] via-transparent to-transparent"}),s.jsx("div",{className:"absolute top-4 left-4",children:s.jsxs($,{className:k("shadow-lg",v[n]||v.default),children:[s.jsx(Fe,{className:"w-3 h-3 mr-1"}),f[n]||f.default]})}),s.jsx("div",{className:"absolute top-4 right-4",children:s.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 rounded-full bg-black/50 text-white text-xs",children:[s.jsx(Vh,{className:"w-3 h-3"}),s.jsx("span",{children:"12"})]})}),s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-5",children:[s.jsx("h3",{className:"text-xl font-bold text-white group-hover:text-[#c9a227] transition-colors",children:t}),s.jsxs("div",{className:"flex items-center gap-3 mt-2 text-white/80 text-sm",children:[r&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ke,{className:"w-3.5 h-3.5"}),r]}),l&&s.jsx("span",{children:l})]})]})]}),s.jsxs("div",{className:"p-5",children:[a&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 mb-3",children:[s.jsx(le,{className:"w-4 h-4 text-[#c9a227]"}),s.jsxs("span",{children:["Construit en ",a]})]}),c&&c.length>0&&s.jsx("div",{className:"mb-3",children:s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[s.jsx(ge,{className:"w-4 h-4 text-[#1e3a5f]"}),s.jsxs("span",{children:["Par ",c.join(", ")]})]})}),o&&s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed line-clamp-3 mb-4",children:o}),d&&s.jsx("div",{className:"mb-4 p-3 rounded-lg bg-emerald-50 text-emerald-700 text-xs",children:d}),s.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-gray-100",children:[s.jsx("span",{className:"text-sm font-semibold text-[#1e3a5f] group-hover:text-emerald-600 transition-colors",children:"Découvrir ce lieu"}),s.jsx("div",{className:"w-8 h-8 rounded-full bg-emerald-50 flex items-center justify-center group-hover:bg-emerald-600 transition-colors",children:s.jsx(te,{className:"w-4 h-4 text-emerald-600 group-hover:text-white transition-colors"})})]})]})]})}const av=[{id:"versailles",name:"Château de Versailles",type:"palace",location:"Versailles",region:"Île-de-France",constructionYear:"1623-1710",image:"https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?w=600&q=80",description:"Symbole absolu de la monarchie française, Versailles fut la résidence des rois de France de Louis XIV à Louis XVI.",builders:["Louis XIII","Louis XIV"],visitInfo:"Ouvert toute l'année"},{id:"chambord",name:"Château de Chambord",type:"castle",location:"Chambord",region:"Centre-Val de Loire",constructionYear:"1519-1547",image:"https://images.unsplash.com/photo-1518998053901-5348d3961a04?w=600&q=80",description:"Chef-d'œuvre de la Renaissance française, commandé par François Ier. Son escalier à double révolution est attribué à Léonard de Vinci.",builders:["François Ier"]},{id:"notre-dame",name:"Notre-Dame de Paris",type:"cathedral",location:"Paris",region:"Île-de-France",constructionYear:"1163-1345",image:"https://images.unsplash.com/photo-1499856871958-5b9627545d1a?w=600&q=80",description:"Cathédrale gothique emblématique, témoin des sacres royaux et des grands événements de l'histoire de France.",builders:["Maurice de Sully"]},{id:"mont-saint-michel",name:"Mont-Saint-Michel",type:"abbey",location:"Mont-Saint-Michel",region:"Normandie",constructionYear:"966-1520",image:"https://images.unsplash.com/photo-1596394516093-501ba68a0ba6?w=600&q=80",description:"Abbaye bénédictine perchée sur un îlot rocheux, chef-d'œuvre de l'architecture médiévale et haut lieu de pèlerinage."}],Ud=[{name:"Île-de-France",count:45,x:55,y:35},{name:"Centre-Val de Loire",count:38,x:45,y:45},{name:"Normandie",count:28,x:40,y:25},{name:"Provence",count:22,x:70,y:75},{name:"Aquitaine",count:31,x:30,y:65}];function iv(){return s.jsx("section",{className:"py-24 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end lg:justify-between mb-16 gap-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(Fe,{className:"w-5 h-5 text-emerald-600"}),s.jsx("span",{className:"text-sm font-semibold text-emerald-600 uppercase tracking-wider",children:"Patrimoine Historique"})]}),s.jsx("h2",{className:"text-4xl lg:text-5xl font-bold text-[#1e3a5f] mb-4",children:"Châteaux & Lieux"}),s.jsx("p",{className:"text-xl text-gray-600 max-w-2xl",children:"Des forteresses médiévales aux palais royaux, découvrez les monuments qui racontent l'histoire de France à travers leurs pierres."})]}),s.jsx(C,{to:E("Places"),children:s.jsxs(z,{variant:"outline",className:"border-emerald-600 text-emerald-600 hover:bg-emerald-600 hover:text-white rounded-full px-6",children:["Tous les lieux",s.jsx(te,{className:"w-4 h-4 ml-2"})]})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsx("div",{className:"lg:col-span-1",children:s.jsxs("div",{className:"bg-[#f5f1e8] rounded-2xl p-6 h-full",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[s.jsx(ke,{className:"w-5 h-5 text-[#1e3a5f]"}),s.jsx("h3",{className:"font-semibold text-[#1e3a5f]",children:"Explorer par région"})]}),s.jsx("div",{className:"relative aspect-square bg-white rounded-xl p-4 mb-6",children:s.jsxs("svg",{viewBox:"0 0 100 100",className:"w-full h-full",children:[s.jsx("path",{d:"M45,5 L60,8 L75,15 L85,25 L90,40 L85,55 L80,70 L70,80 L55,85 L40,82 L25,75 L15,60 L10,45 L15,30 L25,18 L35,10 Z",fill:"#1e3a5f",fillOpacity:"0.1",stroke:"#1e3a5f",strokeWidth:"0.5"}),Ud.map((e,t)=>s.jsxs("g",{children:[s.jsx("circle",{cx:e.x,cy:e.y,r:"4",fill:"#c9a227",className:"cursor-pointer hover:r-6 transition-all"}),s.jsx("circle",{cx:e.x,cy:e.y,r:"6",fill:"#c9a227",fillOpacity:"0.3",className:"animate-ping"})]},e.name))]})}),s.jsx("div",{className:"space-y-2",children:Ud.map(e=>s.jsxs(C,{to:E("Places")+`?region=${e.name}`,className:"flex items-center justify-between p-3 rounded-lg hover:bg-white transition-colors",children:[s.jsx("span",{className:"text-sm text-[#1e3a5f]",children:e.name}),s.jsxs("span",{className:"text-xs text-gray-500",children:[e.count," lieux"]})]},e.name))}),s.jsx(C,{to:E("Maps"),children:s.jsxs(z,{className:"w-full mt-4 bg-[#1e3a5f] hover:bg-[#2d5a87]",children:[s.jsx(ke,{className:"w-4 h-4 mr-2"}),"Carte interactive"]})})]})}),s.jsx("div",{className:"lg:col-span-2 grid grid-cols-1 sm:grid-cols-2 gap-6",children:av.map(e=>s.jsx(Bs,{...e},e.id))})]})]})})}function Pr({id:e,name:t,years:n,startYear:r,endYear:l,image:a,coat_of_arms:i,description:o,rulers:c,rulerCount:d,motto:h,origin:u,variant:m="default",className:x}){const f=n||(r&&l?`${r} - ${l}`:r||"");return m==="compact"?s.jsxs(C,{to:E("Dynasty")+`?id=${e}`,className:k("group flex items-center gap-4 p-4 bg-white rounded-xl border border-amber-100 hover:border-[#c9a227] hover:shadow-lg transition-all duration-300",x),children:[s.jsx("div",{className:"w-16 h-16 rounded-lg bg-gradient-to-br from-[#1e3a5f] to-[#2d5a87] flex items-center justify-center flex-shrink-0 overflow-hidden",children:i?s.jsx("img",{src:i,alt:t,className:"w-full h-full object-contain p-2",loading:"lazy",decoding:"async"}):s.jsx(U,{className:"w-8 h-8 text-[#c9a227]"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h4",{className:"font-semibold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors truncate",children:t}),s.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[f&&s.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[s.jsx(le,{className:"w-3 h-3"}),f]}),d&&s.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[s.jsx(ge,{className:"w-3 h-3"}),d," souverains"]})]})]}),s.jsx(te,{className:"w-4 h-4 text-gray-300 group-hover:text-[#c9a227] transition-colors flex-shrink-0"})]}):m==="mini"?s.jsxs(C,{to:E("Dynasty")+`?id=${e}`,className:k("group flex items-center gap-3 p-2 rounded-lg hover:bg-[#f5f1e8] transition-colors",x),children:[s.jsx("div",{className:"w-10 h-10 rounded bg-[#1e3a5f] flex items-center justify-center",children:i?s.jsx("img",{src:i,alt:t,className:"w-full h-full object-contain p-1",loading:"lazy",decoding:"async"}):s.jsx(U,{className:"w-5 h-5 text-[#c9a227]"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h5",{className:"font-medium text-sm text-[#1e3a5f] group-hover:text-[#c9a227] truncate",children:t}),f&&s.jsx("p",{className:"text-xs text-gray-400",children:f})]})]}):s.jsxs(C,{to:E("Dynasty")+`?id=${e}`,className:k("group block bg-white rounded-2xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-500 border border-amber-100",x),children:[s.jsxs("div",{className:"relative h-48 bg-gradient-to-br from-[#1e3a5f] to-[#2d5a87] overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`}})}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i?s.jsx("img",{src:i,alt:`Armoiries ${t}`,className:"w-32 h-32 object-contain drop-shadow-2xl transition-transform duration-500 group-hover:scale-110",loading:"lazy",decoding:"async"}):s.jsx("div",{className:"w-24 h-24 rounded-full bg-[#c9a227]/20 flex items-center justify-center",children:s.jsx(U,{className:"w-12 h-12 text-[#c9a227]"})})}),f&&s.jsx("div",{className:"absolute top-4 right-4",children:s.jsxs($,{className:"bg-[#c9a227] text-white border-0 shadow-lg",children:[s.jsx(le,{className:"w-3 h-3 mr-1"}),f]})}),u&&s.jsx("div",{className:"absolute top-4 left-4",children:s.jsxs($,{variant:"secondary",className:"bg-white/20 text-white border-0 backdrop-blur-sm",children:[s.jsx(ws,{className:"w-3 h-3 mr-1"}),u]})})]}),s.jsxs("div",{className:"p-5",children:[s.jsx("h3",{className:"text-xl font-bold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors mb-2",children:t}),h&&s.jsxs("div",{className:"flex items-start gap-2 mb-3 p-3 rounded-lg bg-[#f5f1e8]",children:[s.jsx(Ln,{className:"w-4 h-4 text-[#c9a227] flex-shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-sm italic text-[#1e3a5f]",children:["« ",h," »"]})]}),o&&s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed line-clamp-3 mb-4",children:o}),c&&c.length>0&&s.jsxs("div",{className:"mb-4",children:[s.jsx("h4",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2",children:"Souverains notables"}),s.jsxs("div",{className:"flex -space-x-2",children:[c.slice(0,5).map((v,w)=>s.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-white bg-[#f5f1e8] flex items-center justify-center overflow-hidden",title:v.name||v,children:v.portrait?s.jsx("img",{src:v.portrait,alt:v.name,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"}):s.jsx(U,{className:"w-4 h-4 text-[#c9a227]"})},w)),c.length>5&&s.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-white bg-[#1e3a5f] flex items-center justify-center",children:s.jsxs("span",{className:"text-xs text-white font-medium",children:["+",c.length-5]})})]})]}),d&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 mb-4",children:[s.jsx(ge,{className:"w-4 h-4 text-[#1e3a5f]"}),s.jsxs("span",{children:[d," souverains sur le trône de France"]})]}),s.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-gray-100",children:[s.jsx("span",{className:"text-sm font-semibold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors",children:"Explorer la dynastie"}),s.jsx("div",{className:"w-8 h-8 rounded-full bg-[#f5f1e8] flex items-center justify-center group-hover:bg-[#c9a227] transition-colors",children:s.jsx(te,{className:"w-4 h-4 text-[#1e3a5f] group-hover:text-white transition-colors"})})]})]})]})}const Wa=[{id:"merovingiens",name:"Mérovingiens",years:"481 - 751",description:`Première dynastie royale des Francs, fondée par Clovis. Marquée par les "rois fainéants" et l'ascension des maires du palais.`,rulerCount:18,motto:"Par le baptême, la France",origin:"Francs saliens"},{id:"carolingiens",name:"Carolingiens",years:"751 - 987",description:"Dynastie de Charlemagne, qui reconstitua l'empire d'Occident. Apogée de la civilisation carolingienne avant le morcellement féodal.",rulerCount:12,motto:"Renovatio Imperii",origin:"Austrasie"},{id:"capetiens",name:"Capétiens directs",years:"987 - 1328",description:"De Hugues Capet à Charles IV, ils construisirent méthodiquement le royaume de France et le pouvoir royal face aux grands féodaux.",rulerCount:15,motto:"Montjoie Saint Denis !",origin:"Île-de-France"},{id:"valois",name:"Valois",years:"1328 - 1589",description:"La guerre de Cent Ans, Jeanne d'Arc, la Renaissance. Une dynastie marquée par les conflits mais aussi par l'épanouissement culturel.",rulerCount:13,motto:"Le roi ne meurt jamais",origin:"Valois"},{id:"bourbons",name:"Bourbons",years:"1589 - 1792",description:"D'Henri IV à Louis XVI, les Bourbons portèrent la France à son apogée avec Louis XIV avant la chute révolutionnaire.",rulerCount:7,motto:"Dieu et mon droit",origin:"Bourbonnais"},{id:"napoleonides",name:"Napoléonides",years:"1804 - 1870",description:"Napoléon Ier puis Napoléon III. Empire, gloire militaire, modernisation de la France, puis défaite face à la Prusse.",rulerCount:2,motto:"L'Aigle impérial",origin:"Corse"}];function ov(){return s.jsx("section",{className:"py-24 bg-gradient-to-b from-white to-[#1e3a5f]/5",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"text-center mb-16",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-[#c9a227]/10 mb-6",children:[s.jsx(U,{className:"w-5 h-5 text-[#c9a227]"}),s.jsx("span",{className:"text-sm font-semibold text-[#c9a227] uppercase tracking-wider",children:"Lignées Royales"})]}),s.jsx("h2",{className:"text-4xl lg:text-5xl font-bold text-[#1e3a5f] mb-4",children:"Les Dynasties de France"}),s.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto",children:"Des Mérovingiens aux Napoléonides, découvrez les grandes familles qui ont régné sur la France pendant plus de 1300 ans."})]}),s.jsx("div",{className:"mb-12 pb-4",children:s.jsx("div",{className:"flex flex-wrap items-center justify-center gap-4 lg:gap-2",children:Wa.map((e,t)=>s.jsxs(Qt.Fragment,{children:[s.jsxs(C,{to:E("Dynasty")+`?id=${e.id}`,className:"group flex flex-col items-center",children:[s.jsx("div",{className:"w-16 h-16 lg:w-20 lg:h-20 rounded-full bg-[#1e3a5f] flex items-center justify-center group-hover:bg-[#c9a227] transition-colors shadow-lg",children:s.jsx(U,{className:"w-7 h-7 lg:w-9 lg:h-9 text-[#c9a227] group-hover:text-white transition-colors"})}),s.jsxs("div",{className:"text-center mt-3",children:[s.jsx("p",{className:"text-xs lg:text-sm font-semibold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors",children:e.name}),s.jsx("p",{className:"text-[10px] lg:text-xs text-gray-500",children:e.years})]})]}),t<Wa.length-1&&s.jsx("div",{className:"hidden lg:block w-12 h-1 bg-gradient-to-r from-[#1e3a5f] to-[#c9a227]"})]},e.id))})}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mt-20",children:Wa.map(e=>s.jsx(Pr,{...e},e.id))}),s.jsx("div",{className:"text-center mt-12",children:s.jsx(C,{to:E("FamilyTrees"),children:s.jsxs(z,{size:"lg",className:"bg-[#1e3a5f] hover:bg-[#2d5a87] rounded-full px-8",children:[s.jsx(Vs,{className:"w-5 h-5 mr-2"}),"Voir les arbres généalogiques"]})})})]})})}function cv(){return s.jsxs("section",{className:"py-24 bg-[#1e3a5f] relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 opacity-5",children:s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`}})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:[s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-[#c9a227]/20 border border-[#c9a227]/30 mb-8",children:[s.jsx(Ln,{className:"w-4 h-4 text-[#c9a227]"}),s.jsx("span",{className:"text-[#c9a227] text-sm font-medium",children:"L'Encyclopédie de Référence"})]}),s.jsxs("h2",{className:"text-4xl lg:text-5xl font-bold text-white mb-6 leading-tight",children:["Explorez 2000 ans",s.jsx("br",{}),s.jsx("span",{className:"text-[#c9a227]",children:"d'Histoire de France"})]}),s.jsx("p",{className:"text-xl text-white/80 mb-8 leading-relaxed",children:"Plus de 500 personnages, 200 batailles, 150 lieux historiques et des milliers de connexions entre les événements qui ont façonné la France."}),s.jsxs("div",{className:"flex flex-wrap gap-4",children:[s.jsx(C,{to:E("Timeline"),children:s.jsxs(z,{size:"lg",className:"bg-[#c9a227] hover:bg-[#a88620] text-white rounded-full px-8",children:["Commencer l'exploration",s.jsx(te,{className:"w-5 h-5 ml-2"})]})}),s.jsx(C,{to:E("Search"),children:s.jsxs(z,{size:"lg",variant:"outline",className:"border-white/30 text-white hover:bg-white/10 rounded-full px-8",children:[s.jsx(_t,{className:"w-5 h-5 mr-2"}),"Rechercher"]})})]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[{icon:xt,title:"Contenu Encyclopédique",description:"Articles détaillés rédigés par des historiens, avec sources et bibliographie."},{icon:Bh,title:"Multilingue",description:"Disponible en français, anglais, allemand, espagnol, italien et portugais."},{icon:_t,title:"Recherche Avancée",description:"Trouvez instantanément personnages, batailles, lieux et événements."},{icon:Ln,title:"Connexions Intelligentes",description:"Découvrez les liens entre personnages, événements et lieux."}].map((e,t)=>{const n=e.icon;return s.jsxs("div",{className:"bg-white/5 backdrop-blur-sm rounded-2xl p-6 border border-white/10 hover:border-[#c9a227]/30 transition-colors",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#c9a227]/20 flex items-center justify-center mb-4",children:s.jsx(n,{className:"w-6 h-6 text-[#c9a227]"})}),s.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:e.title}),s.jsx("p",{className:"text-white/60 text-sm",children:e.description})]},t)})})]}),s.jsx("div",{className:"mt-16 pt-8 border-t border-white/10",children:s.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-4",children:[s.jsx("span",{className:"text-white/40 text-sm",children:"Également disponible en :"}),[{flag:"🇬🇧",name:"English",code:"en"},{flag:"🇩🇪",name:"Deutsch",code:"de"},{flag:"🇪🇸",name:"Español",code:"es"},{flag:"🇮🇹",name:"Italiano",code:"it"},{flag:"🇵🇹",name:"Português",code:"pt"}].map(e=>s.jsxs("button",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/5 hover:bg-white/10 text-white/80 hover:text-white text-sm transition-colors",children:[s.jsx("span",{children:e.flag}),s.jsx("span",{children:e.name})]},e.code))]})})]})]})}const nl={books:[{id:1,title:"Histoire de France",author:"Jules Michelet",price:"24,90 €",rating:4.8,image:"https://images.unsplash.com/photo-1544947950-fa07a98d237f?w=150&q=80"},{id:2,title:"Les Rois de France",author:"Georges Bordonove",price:"19,90 €",rating:4.6,image:"https://images.unsplash.com/photo-1512820790803-83ca734da794?w=150&q=80"},{id:3,title:"La Révolution française",author:"François Furet",price:"29,90 €",rating:4.9,image:"https://images.unsplash.com/photo-1543002588-bfa74002ed7e?w=150&q=80"}],products:[{id:4,title:"Épée médiévale décorative",price:"89,00 €",rating:4.7,image:"https://images.unsplash.com/photo-1599508704512-2f19efd1e35f?w=150&q=80"},{id:5,title:"Carte ancienne de France",price:"45,00 €",rating:4.5,image:"https://images.unsplash.com/photo-1524661135-423995f22d0b?w=150&q=80"}]};function Et({variant:e="sidebar",category:t="books",context:n=null,className:r}){const l=t==="all"?[...nl.books,...nl.products]:nl[t]||nl.books;return e==="mini"?(l[0],s.jsxs(C,{to:E("Shop"),className:k("group flex items-center gap-3 p-3 bg-gradient-to-r from-[#c9a227]/10 to-[#c9a227]/5 rounded-xl border border-[#c9a227]/20 hover:border-[#c9a227]/40 transition-all",r),children:[s.jsx(xt,{className:"w-5 h-5 text-[#c9a227]"}),s.jsx("span",{className:"text-sm text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors",children:"Découvrir nos livres recommandés"}),s.jsx(yn,{className:"w-4 h-4 text-gray-400 ml-auto"})]})):e==="inline"?s.jsxs("div",{className:k("bg-[#f5f1e8] rounded-2xl p-6",r),children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h3",{className:"font-semibold text-[#1e3a5f] flex items-center gap-2",children:[s.jsx(Ln,{className:"w-5 h-5 text-[#c9a227]"}),"Pour approfondir le sujet"]}),s.jsxs(C,{to:E("Shop"),className:"text-sm text-[#c9a227] hover:underline flex items-center gap-1",children:["Voir tout ",s.jsx(yn,{className:"w-3 h-3"})]})]}),s.jsx("div",{className:"flex gap-4 overflow-x-auto pb-2 -mx-2 px-2",children:l.slice(0,3).map(a=>s.jsxs("a",{href:"#",target:"_blank",rel:"noopener noreferrer sponsored",className:"flex-shrink-0 w-48 bg-white rounded-xl p-4 shadow-sm hover:shadow-lg transition-all group",children:[s.jsx("div",{className:"aspect-[3/4] rounded-lg overflow-hidden mb-3 bg-gray-100",children:s.jsx("img",{src:a.image,alt:a.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform"})}),s.jsx("h4",{className:"font-medium text-sm text-[#1e3a5f] line-clamp-2 group-hover:text-[#c9a227] transition-colors",children:a.title}),a.author&&s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:a.author}),s.jsxs("div",{className:"flex items-center justify-between mt-2",children:[s.jsx("span",{className:"font-bold text-[#c9a227]",children:a.price}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Pn,{className:"w-3 h-3 fill-amber-400 text-amber-400"}),s.jsx("span",{className:"text-xs text-gray-500",children:a.rating})]})]})]},a.id))}),s.jsx("p",{className:"text-xs text-gray-400 mt-4 text-center",children:"Liens affiliés - Nous touchons une commission sur les achats"})]}):e==="banner"?s.jsxs("div",{className:k("relative overflow-hidden rounded-2xl bg-gradient-to-r from-[#1e3a5f] to-[#2d5a87] p-8",r),children:[s.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-[#c9a227]/10 rounded-full blur-3xl"}),s.jsxs("div",{className:"relative flex flex-col md:flex-row items-center gap-6",children:[s.jsxs("div",{className:"flex-1 text-center md:text-left",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 bg-[#c9a227]/20 rounded-full text-[#c9a227] text-sm font-medium mb-3",children:[s.jsx(Lr,{className:"w-4 h-4"}),"Boutique"]}),s.jsx("h3",{className:"text-2xl font-bold text-white mb-2",children:"Passionné d'histoire ?"}),s.jsx("p",{className:"text-white/70 mb-4",children:"Découvrez notre sélection de livres, objets et reproductions historiques."}),s.jsxs(C,{to:E("Shop"),className:"inline-flex items-center gap-2 px-6 py-3 bg-[#c9a227] hover:bg-[#a88620] text-white font-semibold rounded-full transition-colors",children:["Visiter la boutique",s.jsx(yn,{className:"w-4 h-4"})]})]}),s.jsx("div",{className:"flex -space-x-4",children:l.slice(0,3).map((a,i)=>s.jsx("div",{className:"w-24 h-32 rounded-lg overflow-hidden border-2 border-white shadow-lg",style:{transform:`rotate(${(i-1)*5}deg)`},children:s.jsx("img",{src:a.image,alt:a.title,className:"w-full h-full object-cover"})},a.id))})]}),s.jsx("p",{className:"text-xs text-white/40 mt-4 text-center md:text-left",children:"Liens affiliés Amazon"})]}):s.jsxs("div",{className:k("bg-white rounded-2xl border border-amber-100 p-6",r),children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-[#c9a227]/10 flex items-center justify-center",children:s.jsx(xt,{className:"w-4 h-4 text-[#c9a227]"})}),s.jsx("h3",{className:"font-semibold text-[#1e3a5f]",children:"Livres recommandés"})]}),s.jsx("div",{className:"space-y-4",children:l.slice(0,2).map(a=>s.jsxs("a",{href:"#",target:"_blank",rel:"noopener noreferrer sponsored",className:"flex gap-3 group",children:[s.jsx("div",{className:"w-16 h-20 rounded-lg overflow-hidden flex-shrink-0 bg-gray-100",children:s.jsx("img",{src:a.image,alt:a.title,className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h4",{className:"font-medium text-sm text-[#1e3a5f] line-clamp-2 group-hover:text-[#c9a227] transition-colors",children:a.title}),a.author&&s.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:a.author}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("span",{className:"font-bold text-sm text-[#c9a227]",children:a.price}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Pn,{className:"w-3 h-3 fill-amber-400 text-amber-400"}),s.jsx("span",{className:"text-xs text-gray-400",children:a.rating})]})]})]})]},a.id))}),s.jsxs(C,{to:E("Shop"),className:"flex items-center justify-center gap-2 w-full mt-4 py-2.5 bg-[#f5f1e8] hover:bg-[#c9a227]/10 rounded-xl text-sm font-medium text-[#1e3a5f] transition-colors",children:[s.jsx(Lr,{className:"w-4 h-4"}),"Voir toute la boutique"]}),s.jsx("p",{className:"text-[10px] text-gray-400 text-center mt-3",children:"En tant que Partenaire Amazon, nous réalisons un bénéfice sur les achats remplissant les conditions requises."})]})}const Wd={auto:{width:"100%",height:"auto"},rectangle:{width:"300px",height:"250px"},horizontal:{width:"728px",height:"90px"},vertical:{width:"160px",height:"600px"},"in-feed":{width:"100%",height:"auto"},"in-article":{width:"100%",height:"auto"}},dv={default:"","in-article":"my-8 mx-auto max-w-3xl",sidebar:"w-full",banner:"w-full py-4 bg-[#f5f1e8]","between-content":"my-12 py-6 border-y border-amber-100 bg-[#faf8f3]"};function sc({slot:e,format:t="auto",variant:n="default",responsive:r=!0,className:l,showLabel:a=!0}){const i=j.useRef(null),o=j.useRef(!1);j.useEffect(()=>{if(!o.current)try{if(!window.adsbygoogle){const u=document.createElement("script");u.src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",u.async=!0,u.crossOrigin="anonymous",u.setAttribute("data-ad-client","ca-pub-XXXXXXXXXXXXXXXX"),document.head.appendChild(u)}(window.adsbygoogle=window.adsbygoogle||[]).push({}),o.current=!0}catch(u){console.error("Erreur AdSense:",u)}},[]);const c=Wd[t]||Wd.auto,d=dv[n]||"";return e?s.jsxs("div",{className:k(d,l),children:[a&&s.jsx("p",{className:"text-xs text-gray-400 text-center mb-2 uppercase tracking-wider",children:"Publicité"}),s.jsx("ins",{ref:i,className:"adsbygoogle",style:{display:"block",width:r?"100%":c.width,height:c.height,textAlign:"center"},"data-ad-client":"ca-pub-XXXXXXXXXXXXXXXX","data-ad-slot":e,"data-ad-format":r?"auto":t,"data-full-width-responsive":r?"true":"false"})]}):s.jsxs("div",{className:k(d,l),children:[a&&s.jsx("p",{className:"text-xs text-gray-400 text-center mb-2 uppercase tracking-wider",children:"Publicité"}),s.jsx("div",{className:k("bg-gradient-to-br from-gray-100 to-gray-200 rounded-lg flex items-center justify-center border-2 border-dashed border-gray-300",t==="rectangle"&&"w-[300px] h-[250px]",t==="horizontal"&&"w-full max-w-[728px] h-[90px] mx-auto",t==="vertical"&&"w-[160px] h-[600px]",t==="auto"&&"w-full h-[250px]",t==="in-article"&&"w-full h-[280px]",t==="in-feed"&&"w-full h-[120px]"),children:s.jsxs("div",{className:"text-center text-gray-400",children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-2 rounded-full bg-gray-300 flex items-center justify-center",children:s.jsx("span",{className:"text-xl font-bold",children:"Ad"})}),s.jsx("p",{className:"text-sm font-medium",children:"Espace publicitaire"}),s.jsxs("p",{className:"text-xs",children:[t," - ",e||"no-slot"]})]})})]})}function gs({slot:e,className:t}){return s.jsx(sc,{slot:e,format:"in-article",variant:"in-article",className:t})}function Ws({slot:e,className:t}){return s.jsx(sc,{slot:e,format:"auto",variant:"sidebar",responsive:!0,className:t})}function Zi({slot:e,className:t}){return s.jsx(sc,{slot:e,format:"auto",variant:"between-content",className:t})}function Gd(){const{language:e}=Ze();return j.useEffect(()=>{const t="https://timelinefrance.com",n={fr:"/",en:"/en/",es:"/es/",de:"/de/",it:"/it/",pt:"/pt/"};let r=document.querySelector('link[rel="canonical"]');r||(r=document.createElement("link"),r.setAttribute("rel","canonical"),document.head.appendChild(r)),r.setAttribute("href",`${t}${n[e]||n.fr}`);const l=["fr","en","es","de","it","pt"];let a=document.querySelector('link[rel="alternate"][hreflang="x-default"]');a||(a=document.createElement("link"),a.setAttribute("rel","alternate"),a.setAttribute("hreflang","x-default"),document.head.appendChild(a)),a.setAttribute("href",`${t}/`),l.forEach(i=>{let o=document.querySelector(`link[rel="alternate"][hreflang="${i}"]`);o||(o=document.createElement("link"),o.setAttribute("rel","alternate"),o.setAttribute("hreflang",i),document.head.appendChild(o)),o.setAttribute("href",`${t}${n[i]}`)})},[e]),s.jsxs("div",{className:"overflow-hidden",children:[s.jsx(Z0,{}),s.jsx(ev,{}),s.jsx(Zi,{slot:"home-after-periods"}),s.jsx(nv,{}),s.jsx(lv,{}),s.jsx(iv,{}),s.jsx(Zi,{slot:"home-after-places"}),s.jsx(ov,{}),s.jsx("section",{className:"py-16 bg-[#f5f1e8]",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsx(Et,{variant:"banner",category:"all"})})}),s.jsx(cv,{}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"WebPage","@id":"https://timelinefrance.com/#webpage",url:"https://timelinefrance.com/",name:"Histoire de France - L'Encyclopédie de Référence",description:"Découvrez l'histoire de France des origines à nos jours : personnages illustres, grandes batailles, dynasties royales, châteaux et monuments historiques.",isPartOf:{"@type":"WebSite","@id":"https://timelinefrance.com/#website"},primaryImageOfPage:{"@type":"ImageObject",url:"https://timelinefrance.com/og-image.jpg"},inLanguage:"fr-FR",potentialAction:{"@type":"SearchAction",target:"https://timelinefrance.com/search?q={search_term}","query-input":"required name=search_term"}})}})]})}function Ie({items:e=[],className:t}){const n=[{label:"Accueil",pageName:"Home",href:null},...e],r={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:n.map((l,a)=>({"@type":"ListItem",position:a+1,name:l.label,item:l.href||(l.pageName?`https://timelinefrance.com${E(l.pageName)}`:void 0)}))};return s.jsxs(s.Fragment,{children:[s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(r)}}),s.jsx("nav",{"aria-label":"Fil d'Ariane",className:k("flex items-center gap-2 text-sm",t),children:n.map((l,a)=>{const i=a===n.length-1,o=a===0;return s.jsxs(Qt.Fragment,{children:[a>0&&s.jsx(Xt,{className:"w-4 h-4 text-gray-400 flex-shrink-0"}),i?s.jsx("span",{className:"text-[#1e3a5f] font-medium truncate max-w-[200px]","aria-current":"page",children:l.label}):s.jsxs(C,{to:l.href||(l.pageName?E(l.pageName):"/"),className:k("flex items-center gap-1 text-gray-500 hover:text-[#c9a227] transition-colors truncate max-w-[150px]",o&&"max-w-none"),children:[o&&s.jsx(Wg,{className:"w-4 h-4 flex-shrink-0"}),s.jsx("span",{className:k(o&&"hidden sm:inline"),children:l.label})]})]},a)})})]})}const Xd=[{id:"prehistory-france",name:"Préhistoire",years:"-1 800 000 à -800 av. J.-C.",color:"bg-amber-600"},{id:"antiquity-france",name:"Antiquité",years:"-800 av. J.-C. à 476",color:"bg-amber-500"},{id:"early-middle-ages",name:"Haut Moyen Âge",years:"476 - 987",color:"bg-orange-500"},{id:"high-middle-ages",name:"Moyen Âge Central",years:"987 - 1270",color:"bg-red-500"},{id:"late-middle-ages",name:"Bas Moyen Âge",years:"1270 - 1498",color:"bg-rose-500"},{id:"renaissance",name:"Renaissance",years:"1498 - 1610",color:"bg-purple-500"},{id:"classical",name:"Époque Classique",years:"1610 - 1789",color:"bg-indigo-500"},{id:"revolution-empire",name:"Révolution & Empire",years:"1789 - 1815",color:"bg-blue-500"},{id:"modern",name:"Époque Moderne",years:"1815 - 1914",color:"bg-cyan-500"},{id:"contemporary",name:"Époque Contemporaine",years:"1914 - présent",color:"bg-teal-500"}],uv=[{year:"-52",title:"Siège d'Alésia",type:"battle",period:"antiquity-france"},{year:"481",title:"Avènement de Clovis",type:"reign",period:"early-middle-ages"},{year:"496",title:"Baptême de Clovis",type:"event",period:"early-middle-ages"},{year:"732",title:"Bataille de Poitiers",type:"battle",period:"early-middle-ages"},{year:"800",title:"Sacre de Charlemagne",type:"reign",period:"early-middle-ages"},{year:"987",title:"Élection d'Hugues Capet",type:"reign",period:"high-middle-ages"},{year:"1066",title:"Conquête de l'Angleterre",type:"battle",period:"high-middle-ages"},{year:"1095",title:"Première croisade",type:"event",period:"high-middle-ages"},{year:"1163",title:"Construction Notre-Dame",type:"building",period:"high-middle-ages"},{year:"1214",title:"Bataille de Bouvines",type:"battle",period:"high-middle-ages"},{year:"1337",title:"Début Guerre de Cent Ans",type:"battle",period:"late-middle-ages"},{year:"1346",title:"Bataille de Crécy",type:"battle",period:"late-middle-ages"},{year:"1415",title:"Bataille d'Azincourt",type:"battle",period:"late-middle-ages"},{year:"1429",title:"Jeanne d'Arc à Orléans",type:"battle",period:"late-middle-ages"},{year:"1453",title:"Fin Guerre de Cent Ans",type:"battle",period:"late-middle-ages"},{year:"1515",title:"Bataille de Marignan",type:"battle",period:"renaissance"},{year:"1519",title:"Construction Chambord",type:"building",period:"renaissance"},{year:"1572",title:"Saint-Barthélemy",type:"event",period:"renaissance"},{year:"1598",title:"Édit de Nantes",type:"event",period:"renaissance"},{year:"1643",title:"Avènement Louis XIV",type:"reign",period:"classical"},{year:"1661",title:"Début règne personnel",type:"reign",period:"classical"},{year:"1682",title:"Installation à Versailles",type:"building",period:"classical"},{year:"1715",title:"Mort de Louis XIV",type:"reign",period:"classical"},{year:"1789",title:"Révolution française",type:"event",period:"revolution-empire"},{year:"1804",title:"Sacre de Napoléon",type:"reign",period:"revolution-empire"},{year:"1805",title:"Bataille d'Austerlitz",type:"battle",period:"revolution-empire"},{year:"1815",title:"Bataille de Waterloo",type:"battle",period:"revolution-empire"},{year:"1870",title:"Guerre franco-prussienne",type:"battle",period:"modern"},{year:"1889",title:"Tour Eiffel",type:"building",period:"modern"},{year:"1914",title:"Première Guerre mondiale",type:"battle",period:"contemporary"},{year:"1944",title:"Libération de Paris",type:"battle",period:"contemporary"},{year:"1958",title:"Ve République",type:"event",period:"contemporary"}],Qd={reign:{icon:U,color:"bg-[#c9a227]",label:"Règne"},battle:{icon:ce,color:"bg-red-500",label:"Bataille"},building:{icon:Fe,color:"bg-emerald-500",label:"Construction"},event:{icon:xt,color:"bg-blue-500",label:"Événement"}};function mv(){const[e,t]=j.useState("all"),[n,r]=j.useState("all"),l=uv.filter(a=>{const i=e==="all"||a.period===e,o=n==="all"||a.type===n;return i&&o});return s.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-white to-[#f5f1e8]/30",children:[s.jsx("section",{className:"bg-[#1e3a5f] py-16 lg:py-24",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx(Ie,{items:[{label:"Chronologie"}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"}),s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl bg-[#c9a227]/20 flex items-center justify-center",children:s.jsx(le,{className:"w-8 h-8 text-[#c9a227]"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-white",children:"Chronologie"}),s.jsx("p",{className:"text-white/70 mt-1",children:"Plus de 2000 ans d'histoire"})]})]}),s.jsx("p",{className:"text-xl text-white/80 max-w-3xl mt-6",children:"Parcourez l'histoire de France à travers les événements majeurs qui ont façonné la nation, de la Préhistoire à nos jours."})]})}),s.jsx("section",{className:"py-8 bg-white border-b border-gray-100 sticky top-16 lg:top-20 z-30",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx("div",{className:"overflow-x-auto pb-2",children:s.jsxs("div",{className:"flex items-center gap-2 min-w-max",children:[s.jsx(z,{variant:e==="all"?"default":"outline",size:"sm",onClick:()=>t("all"),className:"rounded-full",children:"Toutes les périodes"}),Xd.map(a=>s.jsx(z,{variant:e===a.id?"default":"outline",size:"sm",onClick:()=>t(a.id),className:k("rounded-full",e===a.id&&a.color),children:a.name},a.id))]})}),s.jsxs("div",{className:"flex items-center gap-4 mt-4",children:[s.jsx("span",{className:"text-sm text-gray-500",children:"Filtrer par type :"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(z,{variant:n==="all"?"secondary":"ghost",size:"sm",onClick:()=>r("all"),className:"rounded-full",children:"Tous"}),Object.entries(Qd).map(([a,i])=>{const o=i.icon;return s.jsxs(z,{variant:n===a?"secondary":"ghost",size:"sm",onClick:()=>r(a),className:"rounded-full",children:[s.jsx(o,{className:k("w-4 h-4 mr-1",n===a&&"text-current")}),i.label]},a)})]})]})]})}),s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute left-8 lg:left-1/2 top-0 bottom-0 w-1 bg-gradient-to-b from-[#c9a227] via-[#1e3a5f] to-[#c9a227] rounded-full"}),s.jsx("div",{className:"space-y-8",children:l.map((a,i)=>{const o=Qd[a.type],c=o.icon,d=i%2===0;return s.jsxs("div",{className:k("relative flex items-center gap-8","lg:justify-center"),children:[s.jsx("div",{className:k("hidden lg:block w-5/12",d?"text-right pr-8":"invisible"),children:d&&s.jsxs(C,{to:E("Event")+`?title=${encodeURIComponent(a.title)}`,className:"group inline-block bg-white rounded-2xl p-6 shadow-lg hover:shadow-xl transition-all border border-amber-100 hover:border-[#c9a227] text-left",children:[s.jsxs($,{className:k("mb-3",o.color,"text-white"),children:[s.jsx(c,{className:"w-3 h-3 mr-1"}),o.label]}),s.jsx("h3",{className:"text-xl font-bold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors",children:a.title}),s.jsx("p",{className:"text-[#c9a227] font-semibold mt-1",children:a.year})]})}),s.jsx("div",{className:"absolute left-8 lg:left-1/2 -translate-x-1/2 z-10",children:s.jsx("div",{className:k("w-8 h-8 rounded-full flex items-center justify-center shadow-lg",o.color),children:s.jsx(c,{className:"w-4 h-4 text-white"})})}),s.jsx("div",{className:k("ml-16 lg:ml-0 lg:w-5/12",d?"lg:invisible":"lg:pl-8"),children:s.jsxs(C,{to:E("Event")+`?title=${encodeURIComponent(a.title)}`,className:k("group block bg-white rounded-2xl p-6 shadow-lg hover:shadow-xl transition-all border border-amber-100 hover:border-[#c9a227]",d&&"lg:hidden"),children:[s.jsxs($,{className:k("mb-3",o.color,"text-white"),children:[s.jsx(c,{className:"w-3 h-3 mr-1"}),o.label]}),s.jsx("h3",{className:"text-xl font-bold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors",children:a.title}),s.jsx("p",{className:"text-[#c9a227] font-semibold mt-1",children:a.year})]})})]},`${a.year}-${a.title}`)})})]}),l.length>5&&s.jsx("div",{className:"mt-12",children:s.jsx(Zi,{slot:"timeline-middle"})}),l.length===0&&s.jsxs("div",{className:"text-center py-16",children:[s.jsx(le,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-600 mb-2",children:"Aucun événement trouvé"}),s.jsx("p",{className:"text-gray-500 mb-6",children:"Essayez de modifier vos filtres"}),s.jsx(z,{onClick:()=>{t("all"),r("all")},variant:"outline",children:"Réinitialiser les filtres"})]})]})}),s.jsx("section",{className:"py-16 bg-[#1e3a5f]",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx("h2",{className:"text-2xl font-bold text-white mb-8 text-center",children:"Explorer par période"}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:Xd.map(a=>s.jsxs(C,{to:E("Period")+`?id=${a.id}`,className:"group bg-white/10 backdrop-blur-sm rounded-2xl p-6 hover:bg-white/20 transition-all",children:[s.jsx("div",{className:k("w-3 h-3 rounded-full mb-4",a.color)}),s.jsx("h3",{className:"text-lg font-bold text-white group-hover:text-[#c9a227] transition-colors",children:a.name}),s.jsx("p",{className:"text-white/60 text-sm mt-1",children:a.years}),s.jsxs("div",{className:"flex items-center gap-1 mt-4 text-[#c9a227] text-sm",children:[s.jsx("span",{children:"Explorer"}),s.jsx(Xt,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})]},a.id))})]})})]})}function vs(e,t="fr"){const n=[];let r=0,l=0;const a=[],i=/\*\*([^*]+)\*\*/g;let o;for(;(o=i.exec(e))!==null;)a.push({index:o.index,length:o[0].length,type:"bold",content:o[1]});const c=/\[\[(\w+):([^|\]]+)(?:\|([^\]]+))?\]\]/g;for(;(o=c.exec(e))!==null;)a.push({index:o.index,length:o[0].length,type:"link",content:o[3]||o[2],linkType:o[1],linkId:o[2]});a.sort((h,u)=>h.index-u.index);const d=[];for(let h=0;h<a.length;h++){const u=a[h];d.some(x=>u.index<x.index+x.length&&u.index+u.length>x.index)||d.push(u)}for(const h of d){if(h.index>r&&n.push(e.substring(r,h.index)),h.type==="bold")n.push(s.jsx("strong",{className:"font-semibold text-[#1e3a5f]",children:h.content},`bold-${l++}`));else if(h.type==="link"&&h.linkType&&h.linkId){let u;switch(h.linkType){case"character":u=Nt("characters",h.linkId,t);break;case"battle":u=Nt("battles",h.linkId,t);break;case"place":u=Nt("places",h.linkId,t);break;case"event":u=Nt("events",h.linkId,t);break;case"dynasty":u=Nt("dynasties",h.linkId,t);break;case"period":u=E("Period")+`?id=${h.linkId}`;break;default:n.push(h.content),r=h.index+h.length;continue}n.push(s.jsx(C,{to:u,className:"text-[#1e3a5f] hover:text-[#c9a227] underline underline-offset-2 font-medium transition-colors",children:h.content},`link-${l++}`))}r=h.index+h.length}return r<e.length&&n.push(e.substring(r)),n.length>0?s.jsx(s.Fragment,{children:n}):e}const nc=j.createContext(void 0);function Gs({defaultValue:e,value:t,onValueChange:n,children:r,className:l}){const[a,i]=j.useState(e||""),o=t!==void 0?t:a,c=j.useCallback(d=>{t===void 0&&i(d),n==null||n(d)},[t,n]);return s.jsx(nc.Provider,{value:{value:o,onValueChange:c},children:s.jsx("div",{className:k("w-full",l),children:r})})}function Xs({className:e,...t}){return s.jsx("div",{className:k("inline-flex h-10 items-center justify-center rounded-md bg-gray-100 p-1 text-gray-500",e),...t})}function Z({className:e,value:t,...n}){const r=j.useContext(nc);if(!r)throw new Error("TabsTrigger must be used within Tabs");const l=r.value===t;return s.jsx("button",{className:k("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",l?"bg-white text-[#1e3a5f] shadow-sm":"text-gray-500 hover:text-gray-900",e),onClick:()=>r.onValueChange(t),...n})}function ee({className:e,value:t,...n}){const r=j.useContext(nc);if(!r)throw new Error("TabsContent must be used within Tabs");return r.value!==t?null:s.jsx("div",{className:k("mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",e),...n})}const hv={political:{color:"bg-blue-100 text-blue-800",label:"Politique"},religious:{color:"bg-purple-100 text-purple-800",label:"Religieux"},building:{color:"bg-amber-100 text-amber-800",label:"Construction"},revolution:{color:"bg-red-100 text-red-800",label:"Révolution"},cultural:{color:"bg-emerald-100 text-emerald-800",label:"Culturel"}};function sp({id:e,name:t,date:n,year:r,location:l,type:a,summary:i,image:o,variant:c="default",className:d}){const{language:h}=Ze(),u=Nt("events",e,h),m=hv[a]||{color:"bg-gray-100 text-gray-800",label:a};return c==="compact"?s.jsxs(C,{to:u,className:k("group flex items-center gap-4 p-4 bg-white rounded-xl border border-amber-100 hover:border-[#c9a227] hover:shadow-lg transition-all duration-300",d),children:[s.jsx("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0",children:s.jsx("img",{src:o||"https://images.unsplash.com/photo-1461360370896-922624d12a74?w=200&q=80",alt:t,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h4",{className:"font-semibold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors truncate",children:t}),s.jsx($,{variant:"secondary",className:k("text-xs flex-shrink-0",m.color),children:m.label})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[s.jsx(fs,{className:"w-3 h-3"}),n]}),l&&s.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[s.jsx(ke,{className:"w-3 h-3"}),l]})]})]}),s.jsx(te,{className:"w-4 h-4 text-gray-300 group-hover:text-[#c9a227] transition-colors flex-shrink-0"})]}):c==="mini"?s.jsxs(C,{to:u,className:k("group flex items-center gap-3 p-2 rounded-lg hover:bg-[#f5f1e8] transition-colors",d),children:[s.jsx("div",{className:"w-10 h-10 rounded overflow-hidden",children:s.jsx("img",{src:o||"https://images.unsplash.com/photo-1461360370896-922624d12a74?w=100&q=80",alt:t,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h5",{className:"font-medium text-sm text-[#1e3a5f] group-hover:text-[#c9a227] truncate",children:t}),s.jsxs("p",{className:"text-xs text-gray-400 flex items-center gap-1",children:[s.jsx(fs,{className:"w-3 h-3"}),r||n]})]})]}):s.jsxs(C,{to:u,className:k("group block bg-white rounded-2xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-500 border border-amber-100",d),children:[s.jsxs("div",{className:"relative h-48 overflow-hidden",children:[s.jsx("img",{src:o||"https://images.unsplash.com/photo-1461360370896-922624d12a74?w=600&q=80",alt:t,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110",loading:"lazy",decoding:"async"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] via-transparent to-transparent"}),s.jsx("div",{className:"absolute top-4 left-4",children:s.jsxs($,{className:k("shadow-lg",m.color),children:[s.jsx(mn,{className:"w-3 h-3 mr-1"}),m.label]})}),s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-5",children:[s.jsx("h3",{className:"text-xl font-bold text-white group-hover:text-[#c9a227] transition-colors",children:t}),s.jsxs("div",{className:"flex items-center gap-3 mt-2 text-white/80 text-sm",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(fs,{className:"w-3.5 h-3.5"}),n]}),l&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ke,{className:"w-3.5 h-3.5"}),l]})]})]})]}),s.jsxs("div",{className:"p-5",children:[i&&s.jsx("p",{className:"text-gray-600 text-sm leading-relaxed line-clamp-3 mb-4",children:i}),s.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-gray-100",children:[s.jsx("span",{className:"text-sm font-semibold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors",children:"En savoir plus"}),s.jsx("div",{className:"w-8 h-8 rounded-full bg-[#f5f1e8] flex items-center justify-center group-hover:bg-[#c9a227] transition-colors",children:s.jsx(te,{className:"w-4 h-4 text-[#1e3a5f] group-hover:text-white transition-colors"})})]})]})]})}function rl(){var p,y,b,L,M,A;const[e,t]=j.useState("overview"),[n,r]=j.useState(null),[l,a]=j.useState(!0),[i,o]=j.useState(null),[c,d]=j.useState({characters:[],battles:[],places:[],events:[],dynasties:[],subperiods:[]}),[h,u]=j.useState(null),m=j.useRef(null),{language:x}=Ze(),f=da(),v=f.id||new URLSearchParams(window.location.search).get("id")||"high-middle-ages";if(j.useEffect(()=>{async function N(){const F=f.id||new URLSearchParams(window.location.search).get("id")||"high-middle-ages";a(!0),o(null);try{const[R,G,D,we,O,K,X]=await Promise.all([bt("periods",F,x,"overview"),wt("characters"),wt("battles"),wt("places"),wt("events"),wt("dynasties"),wt("periods")]);if(R){r(R);const ae={characters:Object.values(G||{}).filter(I=>I.period===F),battles:Object.values(D||{}).filter(I=>I.period===F),places:Object.values(we||{}).filter(I=>I.period===F),events:Object.values(O||{}).filter(I=>I.period===F),dynasties:Object.values(K||{}).filter(I=>I.period===F),subperiods:Object.values(X||{}).filter(I=>I.parentPeriod===F)};d(ae);const P=X==null?void 0:X[F];if(P!=null&&P.parentPeriod){const I=X==null?void 0:X[P.parentPeriod];u(I)}else u(null)}else console.error(`No data found for period: ${F}`),o(`Période "${F}" non trouvée`)}catch(R){console.error("Error loading period data:",R),o("Erreur lors du chargement de la période")}finally{a(!1)}}N()},[f.id,x]),j.useEffect(()=>{if(!n)return;const N=()=>{if(!m.current)return;const D=m.current,we=document.querySelector("footer");if(!we)return;const O=D.getBoundingClientRect(),K=we.getBoundingClientRect(),X=K.top-O.top;if(K.top<=window.innerHeight){const ae=Math.max(200,X-20);D.style.maxHeight=`${ae}px`,D.style.overflowY="auto"}else D.style.maxHeight="calc(100vh - 8rem)",D.style.overflowY="visible"};let F;const R=()=>{F&&cancelAnimationFrame(F),F=requestAnimationFrame(N)};window.addEventListener("scroll",R,{passive:!0}),window.addEventListener("resize",R);const G=setTimeout(()=>{N()},200);return()=>{F&&cancelAnimationFrame(F),clearTimeout(G),window.removeEventListener("scroll",R),window.removeEventListener("resize",R)}},[n]),l)return s.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-[#c9a227] mx-auto mb-4"}),s.jsx("p",{className:"text-gray-600",children:"Chargement de la période..."})]})});if(i||!n)return s.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-red-600 mb-4",children:i||"Période non trouvée"}),s.jsx(C,{to:E("Timeline"),children:s.jsx(z,{children:"Retour à la chronologie"})})]})});const w=n.name[x]||n.name.fr,g=[...n.sections||[]].sort((N,F)=>N.order-F.order);return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsxs("section",{className:"relative h-[60vh] min-h-[500px] overflow-hidden bg-gradient-to-br from-[#1e3a5f] to-[#2d4a6b]",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] via-[#1e3a5f]/70 to-[#1e3a5f]/30"}),s.jsxs("div",{className:"relative h-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col justify-end pb-12",children:[s.jsx("div",{className:"mb-6",children:s.jsx(Ie,{items:h?[{label:"Périodes",pageName:"Timeline"},{label:((p=h.name)==null?void 0:p[x])||((y=h.name)==null?void 0:y.fr),href:E("Period")+`?id=${h.id}`},{label:w}]:[{label:"Périodes",pageName:"Timeline"},{label:w}],className:"text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"})}),h&&s.jsx("div",{className:"mb-4",children:s.jsxs(C,{to:E("Period")+`?id=${h.id}`,className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-white/10 text-white/80 text-sm hover:bg-white/20 transition-colors",children:[s.jsx(Qi,{className:"w-4 h-4"}),"Sous-période de ",((b=h.name)==null?void 0:b[x])||((L=h.name)==null?void 0:L.fr)]})}),s.jsxs("div",{className:"flex items-center gap-4 mb-4 flex-wrap",children:[s.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-[#c9a227] text-white text-sm font-semibold",children:[s.jsx(le,{className:"w-4 h-4"}),n.years]}),n.readingTime&&s.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/10 text-white text-sm",children:[s.jsx(fs,{className:"w-4 h-4"}),n.readingTime," min de lecture"]})]}),s.jsx("h1",{className:"text-4xl md:text-6xl font-bold text-white mb-4",children:w}),s.jsx("p",{className:"text-xl text-white/80 max-w-2xl",children:n.shortDescription})]})]}),c.subperiods.length>0&&s.jsx("section",{className:"py-12 bg-gradient-to-r from-[#f5f1e8] to-[#faf8f3]",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-[#c9a227]/20 flex items-center justify-center",children:s.jsx(Qi,{className:"w-5 h-5 text-[#c9a227]"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-[#1e3a5f]",children:"Explorer les sous-périodes"}),s.jsx("p",{className:"text-gray-600 text-sm",children:"Découvrez en détail les différentes phases de cette époque"})]})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:c.subperiods.map(N=>{var F,R;return s.jsxs(C,{to:E("Period")+`?id=${N.id}`,className:"group bg-white rounded-2xl p-6 shadow-md hover:shadow-xl transition-all border border-amber-100 hover:border-[#c9a227]",children:[s.jsx("div",{className:"flex items-center gap-2 mb-3",children:s.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-[#c9a227]/10 text-[#c9a227] text-sm font-medium",children:[s.jsx(le,{className:"w-3.5 h-3.5"}),N.years]})}),s.jsx("h3",{className:"text-lg font-bold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors mb-2",children:((F=N.name)==null?void 0:F[x])||((R=N.name)==null?void 0:R.fr)}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-500 mb-4",children:[N.characterCount>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ge,{className:"w-4 h-4"}),N.characterCount," personnages"]}),N.battleCount>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ce,{className:"w-4 h-4"}),N.battleCount," batailles"]})]}),s.jsxs("div",{className:"flex items-center gap-1 text-[#c9a227] text-sm font-medium",children:[s.jsx("span",{children:"Explorer cette période"}),s.jsx(Xt,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})]},N.id)})})]})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs(Gs,{value:e,onValueChange:t,className:"w-full",children:[s.jsxs(Xs,{className:"mb-8 bg-[#f5f1e8] p-1 rounded-xl",children:[s.jsx(Z,{value:"overview",className:"rounded-lg data-[state=active]:bg-white",children:"Vue d'ensemble"}),s.jsx(Z,{value:"characters",className:"rounded-lg data-[state=active]:bg-white",children:"Personnages"}),s.jsx(Z,{value:"battles",className:"rounded-lg data-[state=active]:bg-white",children:"Batailles"}),s.jsx(Z,{value:"places",className:"rounded-lg data-[state=active]:bg-white",children:"Lieux"}),s.jsx(Z,{value:"events",className:"rounded-lg data-[state=active]:bg-white",children:"Événements"}),s.jsx(Z,{value:"dynasties",className:"rounded-lg data-[state=active]:bg-white",children:"Dynasties"})]}),s.jsx(ee,{value:"overview",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsx("div",{className:"lg:col-span-2",children:s.jsxs("div",{className:"prose prose-lg max-w-none",children:[((M=n.introduction)==null?void 0:M.paragraphs)&&s.jsx("div",{className:"mb-12",children:n.introduction.paragraphs.map((N,F)=>{const R=typeof N=="object"&&N!==null,G=R?N.text:N,D=R?N.image:void 0;return s.jsxs("div",{className:"mb-8",children:[s.jsx("p",{className:"text-gray-700 leading-relaxed mb-4 text-lg",children:vs(G,x)}),D&&s.jsxs("figure",{className:"my-6",children:[s.jsx("div",{className:"relative w-full rounded-xl overflow-hidden shadow-lg",children:s.jsx("img",{src:D.url,alt:D.alt,width:D.width||800,height:D.height||600,loading:"lazy",decoding:"async",className:"w-full h-auto object-cover"})}),(D.caption||D.credit)&&s.jsxs("figcaption",{className:"mt-3 text-sm text-gray-600 italic text-center",children:[D.caption,D.credit&&s.jsx("span",{className:"block mt-1 text-xs text-gray-500",children:D.credit})]})]})]},F)})}),((A=n.introduction)==null?void 0:A.paragraphs)&&g.length>0&&s.jsx("div",{className:"mb-12",children:s.jsx(gs,{slot:"period-after-intro"})}),g.map((N,F)=>s.jsxs("div",{className:"mb-12",id:N.id,children:[F>0&&s.jsx("div",{className:"mb-6",children:s.jsx(gs,{slot:`period-section-${F}`})}),s.jsx("h2",{className:"text-3xl font-bold text-[#1e3a5f] mb-6 border-b-2 border-[#c9a227] pb-2",children:N.title}),s.jsx("div",{className:"space-y-6",children:N.content.paragraphs.map((R,G)=>{const D=typeof R=="object"&&R!==null,we=D?R.text:R,O=D?R.image:void 0;return s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:vs(we,x)}),O&&s.jsxs("figure",{className:"my-6",children:[s.jsx("div",{className:"relative w-full rounded-xl overflow-hidden shadow-lg",children:s.jsx("img",{src:O.url,alt:O.alt,width:O.width||800,height:O.height||600,loading:"lazy",decoding:"async",className:"w-full h-auto object-cover"})}),(O.caption||O.credit)&&s.jsxs("figcaption",{className:"mt-3 text-sm text-gray-600 italic text-center",children:[O.caption,O.credit&&s.jsx("span",{className:"block mt-1 text-xs text-gray-500",children:O.credit})]})]})]},G)})})]},N.id)),s.jsx("div",{className:"mt-12",children:s.jsx(Et,{variant:"inline",category:"all"})})]})}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-[#f5f1e8] rounded-2xl p-6",children:[s.jsxs("h3",{className:"font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(xt,{className:"w-5 h-5 text-[#c9a227]"}),"Informations"]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Période"}),s.jsx("p",{className:"font-semibold text-[#1e3a5f]",children:n.years})]}),n.wordCount&&s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Nombre de mots"}),s.jsx("p",{className:"font-semibold text-[#1e3a5f]",children:n.wordCount.toLocaleString()})]}),n.readingTime&&s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Temps de lecture"}),s.jsxs("p",{className:"font-semibold text-[#1e3a5f]",children:[n.readingTime," minutes"]})]})]})]}),s.jsx("div",{ref:m,className:"sticky top-24 self-start",style:{alignSelf:"flex-start"},children:s.jsxs("div",{className:"space-y-6",children:[g.length>0&&s.jsxs("div",{className:"bg-white rounded-2xl border border-amber-100 p-6 w-full",children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mb-4",children:"Sommaire"}),s.jsx("div",{className:"space-y-2",children:g.map(N=>s.jsx("a",{href:`#${N.id}`,className:"block p-2 rounded-lg hover:bg-[#f5f1e8] transition-colors text-sm text-gray-700 hover:text-[#c9a227]",children:N.title},N.id))})]}),s.jsx("div",{className:"w-full",children:s.jsx(Ws,{slot:"period-sidebar",className:"mb-6 w-full"})}),s.jsx("div",{className:"w-full",children:s.jsx(Et,{variant:"sidebar",category:"books"})})]})})]})]})}),s.jsx(ee,{value:"characters",children:c.characters.length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:c.characters.map(N=>{var F,R,G,D;return s.jsx(ft,{id:N.id,name:((F=N.name)==null?void 0:F[x])||((R=N.name)==null?void 0:R.fr),title:((G=N.title)==null?void 0:G[x])||((D=N.title)==null?void 0:D.fr),years:N.years,dynasty:N.dynasty,image:void 0,variant:"default"},N.id)})}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-gray-600 mb-4",children:"Aucun personnage disponible pour cette période."}),s.jsx(C,{to:E("Characters")+`?period=${v}`,children:s.jsxs(z,{variant:"outline",className:"rounded-full px-8",children:["Voir tous les personnages",s.jsx(te,{className:"w-4 h-4 ml-2"})]})})]})}),s.jsx(ee,{value:"battles",children:c.battles.length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:c.battles.map(N=>{var F,R;return s.jsx(qs,{id:N.id,name:((F=N.name)==null?void 0:F[x])||((R=N.name)==null?void 0:R.fr),date:N.date,location:N.location||"",result:N.result,image:void 0,variant:"default"},N.id)})}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-gray-600 mb-4",children:"Aucune bataille disponible pour cette période."}),s.jsx(C,{to:E("Battles")+`?period=${v}`,children:s.jsxs(z,{variant:"outline",className:"rounded-full px-8",children:["Voir toutes les batailles",s.jsx(te,{className:"w-4 h-4 ml-2"})]})})]})}),s.jsx(ee,{value:"places",children:c.places.length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:c.places.map(N=>{var F,R,G,D;return s.jsx(Bs,{id:N.id,name:((F=N.name)==null?void 0:F[x])||((R=N.name)==null?void 0:R.fr),type:N.type||"archaeological-site",location:((G=N.location)==null?void 0:G.city)||"",region:((D=N.location)==null?void 0:D.region)||"",constructionYear:void 0,image:void 0,description:void 0,builders:void 0,visitInfo:void 0,variant:"default"},N.id)})}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-gray-600 mb-4",children:"Aucun lieu disponible pour cette période."}),s.jsx(C,{to:E("Places")+`?period=${v}`,children:s.jsxs(z,{variant:"outline",className:"rounded-full px-8",children:["Voir tous les lieux",s.jsx(te,{className:"w-4 h-4 ml-2"})]})})]})}),s.jsx(ee,{value:"events",children:c.events.length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:c.events.map(N=>{var F,R,G;return s.jsx(sp,{id:N.id,name:((F=N.name)==null?void 0:F[x])||((R=N.name)==null?void 0:R.fr),date:N.date,year:parseInt(((G=N.date)==null?void 0:G.replace("-",""))||"0"),location:void 0,type:N.type||"cultural",summary:void 0,image:void 0,variant:"default"},N.id)})}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-gray-600 mb-4",children:"Aucun événement disponible pour cette période."}),s.jsx(C,{to:E("Events")+`?period=${v}`,children:s.jsxs(z,{variant:"outline",className:"rounded-full px-8",children:["Voir tous les événements",s.jsx(te,{className:"w-4 h-4 ml-2"})]})})]})}),s.jsx(ee,{value:"dynasties",children:c.dynasties.length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:c.dynasties.map(N=>{var F,R;return s.jsx(Pr,{id:N.id,name:((F=N.name)==null?void 0:F[x])||((R=N.name)==null?void 0:R.fr),years:N.years,rulerCount:N.rulerCount,image:void 0,variant:"default"},N.id)})}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-gray-600 mb-4",children:"Aucune dynastie disponible pour cette période."}),s.jsx(C,{to:E("Dynasties"),children:s.jsxs(z,{variant:"outline",className:"rounded-full px-8",children:["Voir toutes les dynasties",s.jsx(te,{className:"w-4 h-4 ml-2"})]})})]})})]})})}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:w,description:n.shortDescription,datePublished:"2024-01-01",author:{"@type":"Organization",name:"Histoire de France"},about:{"@type":"Event",name:w,startDate:n.years.split(" - ")[0],endDate:n.years.split(" - ")[1]||n.years.split(" à ")[1],location:{"@type":"Place",name:"France"}}})}})]})}function rc({events:e=[],variant:t="full",className:n}){const r=j.useRef(null),[l,a]=j.useState(!1),[i,o]=j.useState(!0),[c,d]=j.useState(null),h=()=>{if(r.current){const{scrollLeft:f,scrollWidth:v,clientWidth:w}=r.current;a(f>0),o(f<v-w-10)}};j.useEffect(()=>(h(),window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)),[e]);const u=f=>{if(r.current){const v=f==="left"?-400:400;r.current.scrollBy({left:v,behavior:"smooth"}),setTimeout(h,300)}},m=f=>{switch(f){case"reign":return U;case"battle":return ce;case"building":return Fe;default:return le}},x=f=>{switch(f){case"reign":return"bg-[#c9a227] text-white";case"battle":return"bg-red-600 text-white";case"building":return"bg-emerald-600 text-white";case"treaty":return"bg-blue-600 text-white";default:return"bg-[#1e3a5f] text-white"}};return t==="mini"?s.jsx("div",{className:k("relative",n),children:s.jsxs("div",{className:"flex items-center gap-1 overflow-hidden",children:[e.slice(0,5).map((f,v)=>s.jsx("div",{className:"flex-shrink-0 w-2 h-2 rounded-full bg-[#c9a227]",title:`${f.year} - ${f.title}`},f.id||v)),e.length>5&&s.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["+",e.length-5]})]})}):s.jsxs("div",{className:k("relative",n),children:[t==="full"&&s.jsxs(s.Fragment,{children:[s.jsx(z,{variant:"outline",size:"icon",className:k("absolute left-0 top-1/2 -translate-y-1/2 z-10 bg-white shadow-lg border-[#c9a227]/30 hover:border-[#c9a227] hover:bg-[#f5f1e8]",!l&&"opacity-0 pointer-events-none"),onClick:()=>u("left"),children:s.jsx(qh,{className:"w-5 h-5 text-[#1e3a5f]"})}),s.jsx(z,{variant:"outline",size:"icon",className:k("absolute right-0 top-1/2 -translate-y-1/2 z-10 bg-white shadow-lg border-[#c9a227]/30 hover:border-[#c9a227] hover:bg-[#f5f1e8]",!i&&"opacity-0 pointer-events-none"),onClick:()=>u("right"),children:s.jsx(Xt,{className:"w-5 h-5 text-[#1e3a5f]"})})]}),s.jsx("div",{ref:r,onScroll:h,className:k("overflow-x-auto scrollbar-hide",t==="full"?"px-12":"px-4"),style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:s.jsxs("div",{className:"relative min-w-max pt-8 pb-40 px-32",children:[s.jsx("div",{className:"absolute left-0 right-0 top-14 h-1 bg-[#c9a227] rounded-full"}),s.jsx("div",{className:"relative flex items-center gap-8 lg:gap-12",children:e.map((f,v)=>{const w=m(f.type),g=c===f.id;return s.jsxs("div",{className:"relative flex flex-col items-center group",onMouseEnter:()=>d(f.id),onMouseLeave:()=>d(null),children:[s.jsx("div",{className:k("absolute -top-12 text-sm font-bold transition-colors",g?"text-[#c9a227]":"text-[#1e3a5f]"),children:f.year}),s.jsxs(C,{to:f.href||E(f.pageName||"Event")+`?id=${f.id}`,className:k("relative w-12 h-12 rounded-full flex items-center justify-center transition-all duration-300 shadow-lg",x(f.type),g&&"scale-125 shadow-xl"),children:[s.jsx(w,{className:"w-5 h-5"}),s.jsx("span",{className:"absolute inset-0 rounded-full animate-ping opacity-20 bg-current"})]}),s.jsxs("div",{className:k("absolute top-16 w-56 sm:w-64 bg-white rounded-xl shadow-2xl border border-amber-100 p-4 transition-all duration-300 z-20 left-1/2 -translate-x-1/2",g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none"),children:[s.jsx("h4",{className:"font-bold text-[#1e3a5f] mb-1",children:f.title}),s.jsx("p",{className:"text-xs text-gray-500 mb-2",children:f.year}),f.description&&s.jsx("p",{className:"text-sm text-gray-600 line-clamp-3",children:f.description}),s.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs text-[#c9a227]",children:[s.jsx("span",{children:"En savoir plus"}),s.jsx(Xt,{className:"w-3 h-3"})]})]})]},f.id||v)})})]})}),t==="full"&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-16 bg-gradient-to-r from-[#f5f1e8] to-transparent pointer-events-none"}),s.jsx("div",{className:"absolute right-0 top-0 bottom-0 w-16 bg-gradient-to-l from-[#f5f1e8] to-transparent pointer-events-none"})]})]})}const Yd={"premiers-capetiens":{id:"premiers-capetiens",name:"Premiers Capétiens",years:"987 - 1108",startYear:987,endYear:1108,parentPeriod:{id:"high-middle-ages",name:"Moyen Âge Central"},previousSubPeriod:null,nextSubPeriod:{id:"essor-capetien",name:"Essor capétien"},image:"https://images.unsplash.com/photo-1569587112025-0d460e81a126?w=1200&q=80",summary:"Les premiers Capétiens établissent une nouvelle dynastie sur le trône de France. Malgré un pouvoir limité à l'Île-de-France, ils posent les fondements du royaume.",description:`La période des premiers Capétiens (987-1108) marque l'établissement d'une nouvelle dynastie sur le trône de France. Hugues Capet, élu roi en 987, inaugure une lignée qui régnera sans interruption pendant plus de trois siècles.

**L'avènement d'Hugues Capet**
En 987, à la mort du dernier Carolingien Louis V, les grands du royaume élisent Hugues Capet, duc de France et comte de Paris.

**Un pouvoir limité**
Les premiers Capétiens ne contrôlent directement que le domaine royal, centré sur l'Île-de-France.

**La consolidation dynastique**
Pour assurer la succession, les premiers Capétiens associent leur fils aîné au trône de leur vivant.`,keyEvents:[{id:"e1",year:"987",title:"Élection d'Hugues Capet",type:"reign"},{id:"e2",year:"996",title:"Mort d'Hugues Capet",type:"event"},{id:"e3",year:"1060",title:"Avènement de Philippe Ier",type:"reign"}],characters:[{id:"hugues-capet",name:"Hugues Capet",title:"Roi de France",years:"987-996",role:"king"},{id:"robert-ii",name:"Robert II le Pieux",title:"Roi de France",years:"996-1031",role:"king"}],battles:[],places:[{id:"saint-denis",name:"Abbaye de Saint-Denis",type:"abbey",location:"Saint-Denis"}],stats:{duration:121,rulers:4,events:28,battles:12}}};function pv(){const[e,t]=j.useState("overview"),r=new URLSearchParams(window.location.search).get("id")||"premiers-capetiens",l=Yd[r]||Yd["premiers-capetiens"];return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsxs("section",{className:"relative h-[50vh] min-h-[400px] overflow-hidden",children:[s.jsx("img",{src:l.image,alt:l.name,className:"absolute inset-0 w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] via-[#1e3a5f]/60 to-[#1e3a5f]/20"}),s.jsxs("div",{className:"relative h-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col justify-end pb-12",children:[s.jsx(Ie,{items:[{label:"Périodes",pageName:"Timeline"},{label:l.parentPeriod.name,pageName:"Period",href:E("Period")+`?id=${l.parentPeriod.id}`},{label:l.name}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"}),s.jsxs($,{className:"bg-[#c9a227] text-white w-fit mb-4",children:[s.jsx(le,{className:"w-4 h-4 mr-2"}),l.years]}),s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-white mb-4",children:l.name}),s.jsxs("div",{className:"flex flex-wrap gap-6 mt-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-white/80",children:[s.jsx(U,{className:"w-5 h-5 text-[#c9a227]"}),s.jsxs("span",{children:[l.stats.rulers," souverains"]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-white/80",children:[s.jsx(xt,{className:"w-5 h-5 text-[#c9a227]"}),s.jsxs("span",{children:[l.stats.events," événements"]})]})]})]})]}),s.jsx("section",{className:"py-8 bg-[#f5f1e8]",children:s.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:s.jsx("p",{className:"text-xl text-gray-700 leading-relaxed",children:l.summary})})}),s.jsx("section",{className:"py-12 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("h2",{className:"text-xl font-bold text-[#1e3a5f] mb-6 flex items-center gap-2",children:[s.jsx(le,{className:"w-5 h-5 text-[#c9a227]"}),"Chronologie"]}),s.jsx(rc,{events:l.keyEvents,variant:"full"})]})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs(Gs,{value:e,onValueChange:t,children:[s.jsxs(Xs,{className:"mb-8 bg-[#f5f1e8] p-1 rounded-xl",children:[s.jsx(Z,{value:"overview",className:"rounded-lg",children:"Vue d'ensemble"}),s.jsx(Z,{value:"characters",className:"rounded-lg",children:"Personnages"}),s.jsx(Z,{value:"places",className:"rounded-lg",children:"Lieux"})]}),s.jsx(ee,{value:"overview",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsx("div",{className:"lg:col-span-2 prose prose-lg max-w-none whitespace-pre-line text-gray-700",children:l.description}),s.jsxs("div",{className:"space-y-6",children:[s.jsx(Ws,{slot:"subperiod-sidebar"}),s.jsx(Et,{variant:"sidebar",category:"books"})]})]})}),s.jsx(ee,{value:"characters",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:l.characters.map(a=>s.jsx(ft,{...a,variant:"compact"},a.id))})}),s.jsx(ee,{value:"places",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:l.places.map(a=>s.jsx(Bs,{...a,variant:"compact"},a.id))})})]})})}),s.jsx("section",{className:"py-8 bg-[#f5f1e8]",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:s.jsx(C,{to:E("Period")+`?id=${l.parentPeriod.id}`,children:s.jsxs(z,{variant:"outline",className:"rounded-full",children:[s.jsx(Oh,{className:"w-4 h-4 mr-2"}),"Retour à ",l.parentPeriod.name]})})})})]})}const Ns=j.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:k("flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1e3a5f] focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Ns.displayName="Input";const Dr=j.createContext(void 0);function Ft({value:e,defaultValue:t,onValueChange:n,children:r}){const[l,a]=j.useState(t||""),[i,o]=j.useState(!1),c=e!==void 0?e:l,d=j.useCallback(h=>{e===void 0&&a(h),n==null||n(h),o(!1)},[e,n]);return j.useEffect(()=>{const h=u=>{i&&o(!1)};if(i)return document.addEventListener("click",h),()=>document.removeEventListener("click",h)},[i]),s.jsx(Dr.Provider,{value:{value:c,onValueChange:d,open:i,setOpen:o},children:s.jsx("div",{className:"relative",children:r})})}function Mt({className:e,children:t,...n}){const r=j.useContext(Dr);if(!r)throw new Error("SelectTrigger must be used within Select");const l=a=>{var i;a.stopPropagation(),r.setOpen(!r.open),(i=n.onClick)==null||i.call(n,a)};return s.jsxs("button",{type:"button",className:k("flex h-10 w-full items-center justify-between rounded-md border border-gray-300 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-[#1e3a5f] focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),onClick:l,...n,children:[t,s.jsx(ua,{className:k("h-4 w-4 opacity-50 transition-transform",r.open&&"rotate-180")})]})}function At({placeholder:e}){const t=j.useContext(Dr);if(!t)throw new Error("SelectValue must be used within Select");const n=t.value||e||"Sélectionner...";return s.jsx("span",{className:k("block truncate",!t.value&&"text-gray-500"),children:n})}function Tt({className:e,children:t,...n}){const r=j.useContext(Dr);if(!r)throw new Error("SelectContent must be used within Select");return r.open?s.jsx("div",{className:k("absolute z-50 min-w-[8rem] overflow-hidden rounded-md border bg-white shadow-md mt-1",e),onClick:l=>l.stopPropagation(),...n,children:t}):null}function be({className:e,value:t,children:n,...r}){const l=j.useContext(Dr);if(!l)throw new Error("SelectItem must be used within Select");const a=l.value===t,i=o=>{var c;o.stopPropagation(),l.onValueChange(t),(c=r.onClick)==null||c.call(r,o)};return s.jsx("button",{type:"button",className:k("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-gray-100 focus:bg-gray-100",a&&"bg-gray-100 font-medium",e),onClick:i,...r,children:n})}const Jd=[{id:"clovis",name:"Clovis Ier",title:"Roi des Francs",years:"466-511",dynasty:"Mérovingiens",role:"king",period:"early-middle-ages"},{id:"charlemagne",name:"Charlemagne",title:"Empereur d'Occident",years:"742-814",dynasty:"Carolingiens",role:"king",period:"early-middle-ages"},{id:"hugues-capet",name:"Hugues Capet",title:"Roi de France",years:"939-996",dynasty:"Capétiens",role:"king",period:"high-middle-ages"},{id:"philippe-auguste",name:"Philippe II Auguste",title:"Roi de France",years:"1165-1223",dynasty:"Capétiens",role:"king",period:"high-middle-ages"},{id:"louis-ix",name:"Saint Louis",title:"Roi de France",years:"1214-1270",dynasty:"Capétiens",role:"king",period:"high-middle-ages"},{id:"jeanne-darc",name:"Jeanne d'Arc",title:"La Pucelle d'Orléans",years:"1412-1431",dynasty:null,role:"military",period:"late-middle-ages"},{id:"francois-ier",name:"François Ier",title:"Roi de France",years:"1494-1547",dynasty:"Valois",role:"king",period:"renaissance"},{id:"henri-iv",name:"Henri IV",title:"Le Bon Roi Henri",years:"1553-1610",dynasty:"Bourbons",role:"king",period:"renaissance"},{id:"louis-xiv",name:"Louis XIV",title:"Le Roi Soleil",years:"1638-1715",dynasty:"Bourbons",role:"king",period:"classical"},{id:"napoleon",name:"Napoléon Ier",title:"Empereur des Français",years:"1769-1821",dynasty:"Napoléonides",role:"military",period:"revolution-empire"},{id:"richelieu",name:"Cardinal Richelieu",title:"Principal ministre",years:"1585-1642",dynasty:null,role:"religious",period:"classical"},{id:"colbert",name:"Jean-Baptiste Colbert",title:"Contrôleur général des finances",years:"1619-1683",dynasty:null,role:"noble",period:"classical"}],xv=["Mérovingiens","Carolingiens","Capétiens","Valois","Bourbons","Napoléonides"],Kd=[{value:"king",label:"Rois"},{value:"queen",label:"Reines"},{value:"military",label:"Militaires"},{value:"religious",label:"Religieux"},{value:"noble",label:"Nobles"}],Zd=[{value:"early-middle-ages",label:"Haut Moyen Âge"},{value:"high-middle-ages",label:"Moyen Âge Central"},{value:"late-middle-ages",label:"Bas Moyen Âge"},{value:"renaissance",label:"Renaissance"},{value:"classical",label:"Époque Classique"},{value:"revolution-empire",label:"Révolution & Empire"}];function fv(){var x,f;const[e,t]=j.useState(""),[n,r]=j.useState("all"),[l,a]=j.useState("all"),[i,o]=j.useState("all"),[c,d]=j.useState("grid"),h=Jd.filter(v=>{const w=v.name.toLowerCase().includes(e.toLowerCase())||v.title.toLowerCase().includes(e.toLowerCase()),g=n==="all"||v.dynasty===n,p=l==="all"||v.role===l,y=i==="all"||v.period===i;return w&&g&&p&&y}),u=()=>{t(""),r("all"),a("all"),o("all")},m=e||n!=="all"||l!=="all"||i!=="all";return s.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-white to-[#f5f1e8]/30",children:[s.jsx("section",{className:"bg-[#1e3a5f] py-16 lg:py-24",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx(Ie,{items:[{label:"Personnages"}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"}),s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl bg-[#c9a227]/20 flex items-center justify-center",children:s.jsx(ge,{className:"w-8 h-8 text-[#c9a227]"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-white",children:"Personnages"}),s.jsxs("p",{className:"text-white/70 mt-1",children:[Jd.length," personnages historiques"]})]})]}),s.jsx("p",{className:"text-xl text-white/80 max-w-3xl mt-6",children:"Rois et reines, généraux et saints, philosophes et révolutionnaires : découvrez les hommes et femmes qui ont façonné l'histoire de France."})]})}),s.jsx("section",{className:"py-8 bg-white border-b border-gray-100 sticky top-16 lg:top-20 z-30",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(_t,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx(Ns,{placeholder:"Rechercher un personnage...",value:e,onChange:v=>t(v.target.value),className:"pl-10 rounded-full border-gray-200"})]}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsxs(Ft,{value:n,onValueChange:r,children:[s.jsxs(Mt,{className:"w-40 rounded-full",children:[s.jsx(U,{className:"w-4 h-4 mr-2 text-[#c9a227]"}),s.jsx(At,{placeholder:"Dynastie"})]}),s.jsxs(Tt,{children:[s.jsx(be,{value:"all",children:"Toutes les dynasties"}),xv.map(v=>s.jsx(be,{value:v,children:v},v))]})]}),s.jsxs(Ft,{value:l,onValueChange:a,children:[s.jsxs(Mt,{className:"w-36 rounded-full",children:[s.jsx(Zo,{className:"w-4 h-4 mr-2 text-gray-400"}),s.jsx(At,{placeholder:"Rôle"})]}),s.jsxs(Tt,{children:[s.jsx(be,{value:"all",children:"Tous les rôles"}),Kd.map(v=>s.jsx(be,{value:v.value,children:v.label},v.value))]})]}),s.jsxs(Ft,{value:i,onValueChange:o,children:[s.jsxs(Mt,{className:"w-44 rounded-full",children:[s.jsx(Zg,{className:"w-4 h-4 mr-2 text-gray-400"}),s.jsx(At,{placeholder:"Période"})]}),s.jsxs(Tt,{children:[s.jsx(be,{value:"all",children:"Toutes les périodes"}),Zd.map(v=>s.jsx(be,{value:v.value,children:v.label},v.value))]})]}),s.jsxs("div",{className:"flex items-center gap-1 bg-gray-100 rounded-full p-1",children:[s.jsx(z,{variant:c==="grid"?"default":"ghost",size:"icon",className:"rounded-full h-8 w-8",onClick:()=>d("grid"),children:s.jsx(ma,{className:"w-4 h-4"})}),s.jsx(z,{variant:c==="list"?"default":"ghost",size:"icon",className:"rounded-full h-8 w-8",onClick:()=>d("list"),children:s.jsx(ha,{className:"w-4 h-4"})})]})]})]}),m&&s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-4",children:[s.jsx("span",{className:"text-sm text-gray-500",children:"Filtres actifs :"}),e&&s.jsxs($,{variant:"secondary",className:"rounded-full",children:["Recherche : ",e]}),n!=="all"&&s.jsx($,{variant:"secondary",className:"rounded-full",children:n}),l!=="all"&&s.jsx($,{variant:"secondary",className:"rounded-full",children:(x=Kd.find(v=>v.value===l))==null?void 0:x.label}),i!=="all"&&s.jsx($,{variant:"secondary",className:"rounded-full",children:(f=Zd.find(v=>v.value===i))==null?void 0:f.label}),s.jsx(z,{variant:"ghost",size:"sm",onClick:u,className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:"Effacer tout"})]})]})}),s.jsx("section",{className:"py-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:[h.length," personnage",h.length>1?"s":""," trouvé",h.length>1?"s":""]}),h.length>0?s.jsx("div",{className:c==="grid"?"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6":"space-y-4",children:h.map(v=>s.jsx(ft,{...v,variant:c==="list"?"compact":"default"},v.id))}):s.jsxs("div",{className:"text-center py-16",children:[s.jsx(ge,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-600 mb-2",children:"Aucun personnage trouvé"}),s.jsx("p",{className:"text-gray-500 mb-6",children:"Essayez de modifier vos critères de recherche"}),s.jsx(z,{onClick:u,variant:"outline",children:"Réinitialiser les filtres"})]})]})})]})}const eu={"philippe-auguste":{id:"philippe-auguste",name:"Philippe II Auguste",title:"Roi de France",fullTitle:"Philippe II dit « Auguste », Roi de France",portrait:"https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=600&q=80",coverImage:"https://images.unsplash.com/photo-1569587112025-0d460e81a126?w=1200&q=80",birthDate:"21 août 1165",birthPlace:"Gonesse",deathDate:"14 juillet 1223",deathPlace:"Mantes-la-Jolie",reignStart:"1180",reignEnd:"1223",dynasty:{id:"capetiens",name:"Capétiens"},parents:{father:{id:"louis-vii",name:"Louis VII"},mother:{id:"adele-champagne",name:"Adèle de Champagne"}},spouses:[{id:"isabelle-hainaut",name:"Isabelle de Hainaut",years:"1180-1190"},{id:"ingeborg-danemark",name:"Ingeburge de Danemark",years:"1193-1223"}],children:[{id:"louis-viii",name:"Louis VIII"}],predecessor:{id:"louis-vii",name:"Louis VII"},successor:{id:"louis-viii",name:"Louis VIII"},role:"king",shortBio:"Philippe Auguste fut l'un des plus grands rois de France. Son règne marque un tournant décisif dans la construction du royaume et l'affirmation du pouvoir royal.",biography:`Philippe II Auguste (21 août 1165 - 14 juillet 1223), roi de France de 1180 à 1223, est considéré comme l'un des plus grands souverains de l'histoire de France. Son surnom d'« Auguste » lui vient de ce qu'il est né au mois d'août, mais aussi parce qu'il augmenta considérablement le domaine royal.

**Jeunesse et accession au trône**
Fils de Louis VII et d'Adèle de Champagne, Philippe devient roi à l'âge de 15 ans. Il doit rapidement s'imposer face aux grands seigneurs du royaume et aux puissants Plantagenêts qui contrôlent l'ouest de la France.

**Le règne**
Philippe Auguste mène une politique habile d'affaiblissement des Plantagenêts. Il profite de la rivalité entre Henri II d'Angleterre et ses fils, puis s'allie temporairement avec Richard Cœur de Lion lors de la troisième croisade avant de l'affronter. La mort de Richard en 1199 et la faiblesse de son successeur Jean sans Terre lui permettent de reconquérir la Normandie, le Maine, l'Anjou et le Poitou.

**La bataille de Bouvines**
Le 27 juillet 1214, Philippe Auguste remporte à Bouvines une victoire décisive sur la coalition formée par Jean sans Terre, l'empereur Otton IV et le comte Ferrand de Flandre. Cette bataille confirme la suprématie française en Europe occidentale.

**L'œuvre administrative**
Philippe Auguste organise le royaume avec méthode : il crée les baillis et les sénéchaux pour administrer les provinces, fait paver les rues de Paris, construit l'enceinte de Philippe Auguste et commence la construction du Louvre.`,quotes:[{text:"Je suis le roi de France et non le roi des Français.",context:"Affirmant sa vision du pouvoir royal"}],keyEvents:[{id:"e1",year:"1165",title:"Naissance à Gonesse",type:"event"},{id:"e2",year:"1180",title:"Sacre à Reims",type:"reign"},{id:"e3",year:"1190",title:"Départ pour la croisade",type:"event"},{id:"e4",year:"1204",title:"Conquête de la Normandie",type:"battle"},{id:"e5",year:"1214",title:"Bataille de Bouvines",type:"battle"},{id:"e6",year:"1223",title:"Mort à Mantes",type:"event"}],battles:[{id:"bouvines",name:"Bataille de Bouvines",date:"1214",result:"victory"},{id:"chateau-gaillard",name:"Siège de Château-Gaillard",date:"1203-1204",result:"victory"}],places:[{id:"louvre",name:"Château du Louvre",type:"castle",location:"Paris"},{id:"reims",name:"Cathédrale de Reims",type:"cathedral",location:"Reims"}],relatedCharacters:[{id:"richard-coeur-lion",name:"Richard Cœur de Lion",role:"Rival",years:"1157-1199"},{id:"jean-sans-terre",name:"Jean sans Terre",role:"Adversaire",years:"1166-1216"}],period:{id:"high-middle-ages",name:"Moyen Âge Central"}}};function gv(){const[e,t]=j.useState("biography"),r=new URLSearchParams(window.location.search).get("id")||"philippe-auguste",l=eu[r]||eu["philippe-auguste"],a={king:"bg-[#c9a227] text-white",queen:"bg-purple-600 text-white",military:"bg-red-600 text-white",religious:"bg-indigo-600 text-white"},i={king:"Roi",queen:"Reine",military:"Chef militaire",religious:"Religieux"};return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsxs("section",{className:"relative",children:[s.jsxs("div",{className:"h-64 lg:h-80 relative overflow-hidden",children:[s.jsx("img",{src:l.coverImage,alt:"",className:"w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-white via-white/50 to-transparent"})]}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative -mt-32",children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-8",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx("div",{className:"w-48 h-48 lg:w-64 lg:h-64 rounded-2xl overflow-hidden border-4 border-white shadow-2xl",children:s.jsx("img",{src:l.portrait,alt:l.name,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})})}),s.jsxs("div",{className:"flex-1 pt-4 lg:pt-12",children:[s.jsx(Ie,{items:[{label:"Personnages",pageName:"Characters"},{label:l.dynasty.name,pageName:"Dynasty",href:E("Dynasty")+`?id=${l.dynasty.id}`},{label:l.name}],className:"mb-4"}),s.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[s.jsxs($,{className:a[l.role],children:[s.jsx(U,{className:"w-3 h-3 mr-1"}),i[l.role]]}),s.jsx($,{variant:"outline",className:"border-[#c9a227] text-[#c9a227]",children:l.dynasty.name}),s.jsx(C,{to:E("Period")+`?id=${l.period.id}`,children:s.jsx($,{variant:"secondary",className:"hover:bg-[#f5f1e8]",children:l.period.name})})]}),s.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-[#1e3a5f] mb-2",children:l.name}),s.jsx("p",{className:"text-xl text-gray-600 mb-6",children:l.fullTitle}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[s.jsxs("div",{className:"bg-[#f5f1e8] rounded-xl p-4",children:[s.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wider mb-1",children:"Naissance"}),s.jsx("p",{className:"font-semibold text-[#1e3a5f]",children:l.birthDate}),s.jsx("p",{className:"text-sm text-gray-500",children:l.birthPlace})]}),s.jsxs("div",{className:"bg-[#f5f1e8] rounded-xl p-4",children:[s.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wider mb-1",children:"Décès"}),s.jsx("p",{className:"font-semibold text-[#1e3a5f]",children:l.deathDate}),s.jsx("p",{className:"text-sm text-gray-500",children:l.deathPlace})]}),s.jsxs("div",{className:"bg-[#c9a227]/10 rounded-xl p-4",children:[s.jsx("p",{className:"text-xs text-[#c9a227] uppercase tracking-wider mb-1",children:"Règne"}),s.jsxs("p",{className:"font-semibold text-[#1e3a5f]",children:[l.reignStart," - ",l.reignEnd]}),s.jsxs("p",{className:"text-sm text-gray-500",children:[parseInt(l.reignEnd)-parseInt(l.reignStart)," ans"]})]}),s.jsxs("div",{className:"bg-[#1e3a5f]/5 rounded-xl p-4",children:[s.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wider mb-1",children:"Dynastie"}),s.jsx(C,{to:E("Dynasty")+`?id=${l.dynasty.id}`,className:"font-semibold text-[#1e3a5f] hover:text-[#c9a227]",children:l.dynasty.name})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsxs(z,{variant:"outline",size:"sm",className:"rounded-full",children:[s.jsx(_r,{className:"w-4 h-4 mr-2"}),"Partager"]}),s.jsxs(z,{variant:"outline",size:"sm",className:"rounded-full",children:[s.jsx(ec,{className:"w-4 h-4 mr-2"}),"Sauvegarder"]}),s.jsx(C,{to:E("FamilyTrees")+`?dynasty=${l.dynasty.id}`,children:s.jsxs(z,{variant:"outline",size:"sm",className:"rounded-full",children:[s.jsx(Vs,{className:"w-4 h-4 mr-2"}),"Arbre généalogique"]})})]})]})]})})]}),s.jsx("section",{className:"py-12 bg-[#f5f1e8] mt-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("h2",{className:"text-xl font-bold text-[#1e3a5f] mb-6 flex items-center gap-2",children:[s.jsx(le,{className:"w-5 h-5 text-[#c9a227]"}),"Chronologie de la vie"]}),s.jsx(rc,{events:l.keyEvents,variant:"full"})]})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs(Gs,{value:e,onValueChange:t,children:[s.jsxs(Xs,{className:"mb-8 bg-[#f5f1e8] p-1 rounded-xl",children:[s.jsx(Z,{value:"biography",className:"rounded-lg",children:"Biographie"}),s.jsx(Z,{value:"family",className:"rounded-lg",children:"Famille"}),s.jsx(Z,{value:"battles",className:"rounded-lg",children:"Batailles"}),s.jsx(Z,{value:"places",className:"rounded-lg",children:"Lieux"}),s.jsx(Z,{value:"related",className:"rounded-lg",children:"Personnages liés"})]}),s.jsx(ee,{value:"biography",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2",children:[s.jsx("p",{className:"text-xl text-gray-600 leading-relaxed mb-8",children:l.shortBio}),s.jsx("div",{className:"prose prose-lg max-w-none whitespace-pre-line",children:l.biography})]}),s.jsxs("div",{className:"space-y-6",children:[l.quotes&&l.quotes.length>0&&s.jsxs("div",{className:"bg-[#1e3a5f] rounded-2xl p-6 text-white",children:[s.jsx(Jg,{className:"w-8 h-8 text-[#c9a227] mb-4"}),s.jsxs("p",{className:"text-lg italic mb-4",children:["« ",l.quotes[0].text," »"]}),s.jsx("p",{className:"text-sm text-white/60",children:l.quotes[0].context})]}),s.jsx(Ws,{slot:"character-sidebar",className:"mb-6"}),s.jsx(Et,{variant:"sidebar",category:"books"}),s.jsxs("div",{className:"bg-white rounded-2xl border border-amber-100 p-6",children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mb-4",children:"Succession"}),s.jsxs("div",{className:"space-y-4",children:[l.predecessor&&s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-gray-500 uppercase",children:"Prédécesseur"}),s.jsx(C,{to:E("Character")+`?id=${l.predecessor.id}`,className:"font-medium text-[#1e3a5f] hover:text-[#c9a227]",children:l.predecessor.name})]}),l.successor&&s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-gray-500 uppercase",children:"Successeur"}),s.jsx(C,{to:E("Character")+`?id=${l.successor.id}`,className:"font-medium text-[#1e3a5f] hover:text-[#c9a227]",children:l.successor.name})]})]})]})]})]})}),s.jsx(ee,{value:"family",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"bg-[#f5f1e8] rounded-2xl p-6",children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mb-4",children:"Parents"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs(C,{to:E("Character")+`?id=${l.parents.father.id}`,className:"block p-3 bg-white rounded-lg hover:shadow-md transition-shadow",children:[s.jsx("p",{className:"text-xs text-gray-500",children:"Père"}),s.jsx("p",{className:"font-medium text-[#1e3a5f]",children:l.parents.father.name})]}),s.jsxs(C,{to:E("Character")+`?id=${l.parents.mother.id}`,className:"block p-3 bg-white rounded-lg hover:shadow-md transition-shadow",children:[s.jsx("p",{className:"text-xs text-gray-500",children:"Mère"}),s.jsx("p",{className:"font-medium text-[#1e3a5f]",children:l.parents.mother.name})]})]})]}),s.jsxs("div",{className:"bg-[#f5f1e8] rounded-2xl p-6",children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mb-4",children:"Épouses"}),s.jsx("div",{className:"space-y-3",children:l.spouses.map(o=>s.jsxs(C,{to:E("Character")+`?id=${o.id}`,className:"block p-3 bg-white rounded-lg hover:shadow-md transition-shadow",children:[s.jsx("p",{className:"font-medium text-[#1e3a5f]",children:o.name}),s.jsx("p",{className:"text-xs text-gray-500",children:o.years})]},o.id))})]}),s.jsxs("div",{className:"bg-[#f5f1e8] rounded-2xl p-6",children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mb-4",children:"Enfants"}),s.jsx("div",{className:"space-y-3",children:l.children.map(o=>s.jsx(C,{to:E("Character")+`?id=${o.id}`,className:"block p-3 bg-white rounded-lg hover:shadow-md transition-shadow",children:s.jsx("p",{className:"font-medium text-[#1e3a5f]",children:o.name})},o.id))})]})]})}),s.jsx(ee,{value:"battles",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:l.battles.map(o=>s.jsx(qs,{...o,variant:"compact"},o.id))})}),s.jsx(ee,{value:"places",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:l.places.map(o=>s.jsx(Bs,{...o,variant:"compact"},o.id))})}),s.jsx(ee,{value:"related",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:l.relatedCharacters.map(o=>s.jsx(ft,{...o,variant:"compact"},o.id))})})]})})}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Person",name:l.name,alternateName:l.fullTitle,birthDate:l.birthDate,birthPlace:{"@type":"Place",name:l.birthPlace},deathDate:l.deathDate,deathPlace:{"@type":"Place",name:l.deathPlace},image:l.portrait,description:l.shortBio,jobTitle:l.title,memberOf:{"@type":"Organization",name:l.dynasty.name}})}})]})}function vv({type:e,id:t,autoLoad:n=!0}){const{language:r}=Ze(),[l,a]=j.useState(null),[i,o]=j.useState(!0),[c,d]=j.useState(null);return j.useEffect(()=>{if(!n||!t)return;async function u(){o(!0),d(null);try{const m=await Ki(e,t,r);a(m)}catch(m){d(m instanceof Error?m:new Error("Failed to load entity data"))}finally{o(!1)}}u()},[e,t,r,n]),{data:l,loading:i,error:c,reload:async()=>{o(!0),d(null);try{const u=await Ki(e,t,r);a(u)}catch(u){d(u instanceof Error?u:new Error("Failed to load entity data"))}finally{o(!1)}}}}function Ga(e,t=160){if(e.length<=t)return e;const n=e.substring(0,t-3),r=n.lastIndexOf("."),l=n.lastIndexOf(" ");return r>t*.7?n.substring(0,r+1):l>t*.7?n.substring(0,l)+"...":n+"..."}function Xa(e,t=60){return e.length<=t?e:e.substring(0,t-3)+"..."}function yv({type:e,id:t,fallback:n}){const{language:r}=Ze();j.useEffect(()=>{async function l(){var i,o,c,d,h;const a=await tp(e,t);if((i=a==null?void 0:a.meta)!=null&&i[r]){const u=a.meta[r];u.title&&(document.title=Xa(u.title));let m=document.querySelector('meta[name="description"]');m||(m=document.createElement("meta"),m.setAttribute("name","description"),document.head.appendChild(m));const x=u.description||(n==null?void 0:n.description)||"";if(m.setAttribute("content",Ga(x)),u.keywords){let f=document.querySelector('meta[name="keywords"]');f||(f=document.createElement("meta"),f.setAttribute("name","keywords"),document.head.appendChild(f)),f.setAttribute("content",Array.isArray(u.keywords)?u.keywords.join(", "):u.keywords)}if((o=a.og)!=null&&o[r]){const f=a.og[r];if(["title","description","image","type"].forEach(v=>{if(f[v]){let w=document.querySelector(`meta[property="og:${v}"]`);w||(w=document.createElement("meta"),w.setAttribute("property",`og:${v}`),document.head.appendChild(w));let g=f[v];v==="description"?g=Ga(g,200):v==="title"&&(g=Xa(g,60)),w.setAttribute("content",g)}}),(c=a.canonical)!=null&&c[r]){let v=document.querySelector('meta[property="og:url"]');v||(v=document.createElement("meta"),v.setAttribute("property","og:url"),document.head.appendChild(v)),v.setAttribute("content",`https://timelinefrance.com${a.canonical[r]}`)}}if((d=a.og)!=null&&d[r]){const f=a.og[r];["card","site","title","description","image"].forEach(v=>{let w=document.querySelector(`meta[name="twitter:${v}"]`);w||(w=document.createElement("meta"),w.setAttribute("name",`twitter:${v}`),document.head.appendChild(w));let g="";v==="card"?g="summary_large_image":v==="site"?g="@histoiredefrance":v==="title"?g=Xa(f.title||u.title||"",70):v==="description"?g=Ga(f.description||u.description||"",200):v==="image"&&(g=f.image||""),w.setAttribute("content",g)})}if(a.hreflang){let f=document.querySelector('link[rel="alternate"][hreflang="x-default"]');f||(f=document.createElement("link"),f.setAttribute("rel","alternate"),f.setAttribute("hreflang","x-default"),document.head.appendChild(f)),f.setAttribute("href",`https://timelinefrance.com${a.hreflang.fr||a.hreflang.fr}`);let v=document.querySelector(`link[rel="alternate"][hreflang="${r}"]`);v||(v=document.createElement("link"),v.setAttribute("rel","alternate"),v.setAttribute("hreflang",r),document.head.appendChild(v)),v.setAttribute("href",`https://timelinefrance.com${a.hreflang[r]}`),Object.entries(a.hreflang).forEach(([w,g])=>{if(w!==r){let p=document.querySelector(`link[rel="alternate"][hreflang="${w}"]`);p||(p=document.createElement("link"),p.setAttribute("rel","alternate"),p.setAttribute("hreflang",w),document.head.appendChild(p)),p.setAttribute("href",`https://timelinefrance.com${g}`)}})}if((h=a.canonical)!=null&&h[r]){let f=document.querySelector('link[rel="canonical"]');f||(f=document.createElement("link"),f.setAttribute("rel","canonical"),document.head.appendChild(f)),f.setAttribute("href",`https://timelinefrance.com${a.canonical[r]}`)}a.schema&&(document.querySelectorAll('script[type="application/ld+json"][data-seo-schema]').forEach(v=>v.remove()),Object.entries(a.schema).forEach(([v,w])=>{let g=w;if(w&&typeof w=="object"&&!w["@type"]){const y={...w};Object.keys(w).forEach(b=>{w[b]&&typeof w[b]=="object"&&!w[b]["@type"]&&(y[b]=w[b][r]||w[b].fr||w[b])}),g=y}!g["@type"]&&v!=="@type"&&(g["@type"]=v);const p=document.createElement("script");p.setAttribute("type","application/ld+json"),p.setAttribute("data-seo-schema",v),p.textContent=JSON.stringify({"@context":"https://schema.org",...g}),document.head.appendChild(p)}))}else if(n&&(n.title&&(document.title=n.title),n.description)){let u=document.querySelector('meta[name="description"]');u||(u=document.createElement("meta"),u.setAttribute("name","description"),document.head.appendChild(u)),u.setAttribute("content",n.description)}}l()},[e,t,r,n])}function jv({type:e,children:t,fallbackTitle:n,fallbackDescription:r}){const a=da().id||"",{data:i,loading:o,error:c}=vv({type:e,id:a,autoLoad:!0});return yv({type:e,id:a,fallback:{title:n,description:r}}),o?s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Gg,{className:"w-8 h-8 animate-spin text-[#c9a227] mx-auto mb-4"}),s.jsx("p",{className:"text-gray-600",children:"Chargement..."})]})}):c?s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-red-600 mb-4",children:"Erreur lors du chargement"}),s.jsx(z,{onClick:()=>window.location.reload(),children:"Réessayer"})]})}):i?s.jsx(s.Fragment,{children:t(i)}):s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-gray-600 mb-4",children:"Contenu non trouvé"}),s.jsx(z,{onClick:()=>window.history.back(),children:"Retour"})]})})}function wv({data:e,t,sidebarRef:n,activeTab:r,setActiveTab:l}){var M,A,N,F,R,G,D,we,O,K,X,ae,P,I,T,V,H,De,Re;const{metadata:a,biography:i,images:o,lang:c}=e,[d,h]=j.useState([]),[u,m]=j.useState([]),x=((M=i==null?void 0:i.name)==null?void 0:M[c])||((A=i==null?void 0:i.name)==null?void 0:A.fr)||(a==null?void 0:a.id)||"",f=((N=i==null?void 0:i.title)==null?void 0:N[c])||((F=i==null?void 0:i.title)==null?void 0:F.fr)||"",v=((R=i==null?void 0:i.fullTitle)==null?void 0:R[c])||((G=i==null?void 0:i.fullTitle)==null?void 0:G.fr)||f,w=((D=i==null?void 0:i.shortBio)==null?void 0:D[c])||((we=i==null?void 0:i.shortBio)==null?void 0:we.fr)||"",g=((O=o==null?void 0:o.portrait)==null?void 0:O.url)||((X=(K=o==null?void 0:o.portrait)==null?void 0:K.sizes)==null?void 0:X.medium)||"",p=a.dates,y=(ae=p==null?void 0:p.birth)!=null&&ae.year&&((P=p==null?void 0:p.death)!=null&&P.year)?`${p.birth.year} - ${p.death.year}`:((I=p==null?void 0:p.birth)==null?void 0:I.year)||((T=p==null?void 0:p.death)==null?void 0:T.year)||"";j.useEffect(()=>{async function B(){var pe;const se=((pe=a.connections)==null?void 0:pe.events)||[];if(se.length===0){h([]);return}try{const at=await wt("events"),it=(await Promise.all(se.map(async re=>{var ot,An,Tn,_n;const Ee=at[re.id];if(!Ee)return null;const ie=await bt("events",re.id,c,"overview"),Oe=(ie==null?void 0:ie.shortDescription)||((ot=ie==null?void 0:ie.description)==null?void 0:ot[c])||((An=ie==null?void 0:ie.description)==null?void 0:An.fr)||"";return{id:re.id,title:((Tn=Ee.name)==null?void 0:Tn[c])||((_n=Ee.name)==null?void 0:_n.fr)||re.id,description:Oe,year:re.year||parseInt(Ee.date)||0,type:re.type||Ee.type||"cultural",href:Nt("events",re.id,c),pageName:"Event"}}))).filter(Boolean);it.sort((re,Ee)=>re.year-Ee.year),h(it)}catch(at){console.error("Error loading timeline events:",at),h([])}}B()},[(V=a.connections)==null?void 0:V.events,c]),j.useEffect(()=>{async function B(){var pe;const se=((pe=a.connections)==null?void 0:pe.relatedCharacters)||[];if(se.length===0){m([]);return}try{const at=await wt("characters"),it=(await Promise.all(se.map(async re=>{var An,Tn,_n,lc,ac,ic,oc,cc,dc,uc,mc,hc,pc,xc,fc;const Ee=at[re.id];if(!Ee)return null;const ie=await Ki("characters",re.id,c),Oe=ie==null?void 0:ie.biography,ot=ie==null?void 0:ie.metadata;return{id:re.id,name:((An=Ee.name)==null?void 0:An[c])||((Tn=Ee.name)==null?void 0:Tn.fr)||re.id,title:((_n=Oe==null?void 0:Oe.title)==null?void 0:_n[c])||((lc=Oe==null?void 0:Oe.title)==null?void 0:lc.fr)||"",years:Ee.years||"",birthYear:(ic=(ac=ot==null?void 0:ot.dates)==null?void 0:ac.birth)==null?void 0:ic.year,deathYear:(cc=(oc=ot==null?void 0:ot.dates)==null?void 0:oc.death)==null?void 0:cc.year,portrait:((uc=(dc=ie==null?void 0:ie.images)==null?void 0:dc.portrait)==null?void 0:uc.url)||((pc=(hc=(mc=ie==null?void 0:ie.images)==null?void 0:mc.portrait)==null?void 0:hc.sizes)==null?void 0:pc.medium)||"",dynasty:Ee.dynasty,role:(ot==null?void 0:ot.role)||Ee.role||"default",description:((xc=Oe==null?void 0:Oe.shortBio)==null?void 0:xc[c])||((fc=Oe==null?void 0:Oe.shortBio)==null?void 0:fc.fr)||"",relation:re.relation,note:re.note}}))).filter(Boolean);m(it)}catch(at){console.error("Error loading related characters:",at),m([])}}B()},[(H=a.connections)==null?void 0:H.relatedCharacters,c]);const b={king:"bg-[#c9a227] text-white",queen:"bg-purple-600 text-white",military:"bg-red-600 text-white",religious:"bg-indigo-600 text-white"};j.useEffect(()=>{if(!i)return;const B=()=>{if(!n.current)return;const ye=n.current,it=document.querySelector("footer");if(!it)return;const re=ye.getBoundingClientRect(),Ee=it.getBoundingClientRect(),ie=Ee.top-re.top;if(Ee.top<=window.innerHeight){const Oe=Math.max(200,ie-20);ye.style.maxHeight=`${Oe}px`,ye.style.overflowY="auto"}else ye.style.maxHeight="calc(100vh - 8rem)",ye.style.overflowY="visible"};let se;const pe=()=>{se&&cancelAnimationFrame(se),se=requestAnimationFrame(B)};window.addEventListener("scroll",pe,{passive:!0}),window.addEventListener("resize",pe);const at=setTimeout(()=>{B()},200);return()=>{se&&cancelAnimationFrame(se),clearTimeout(at),window.removeEventListener("scroll",pe),window.removeEventListener("resize",pe)}},[i,n]);const L=i.sections?[...i.sections].sort((B,se)=>(B.order||0)-(se.order||0)):[];return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsxs("section",{className:"relative h-[60vh] min-h-[500px] overflow-hidden bg-gradient-to-br from-[#1e3a5f] to-[#2d4a6b]",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] via-[#1e3a5f]/70 to-[#1e3a5f]/30"}),s.jsxs("div",{className:"relative h-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col justify-end pb-12",children:[s.jsx("div",{className:"mb-6",children:s.jsx(Ie,{items:[{label:typeof t=="function"?t("characters.title"):"Personnages",pageName:"Characters"},{label:x}],className:"text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"})}),s.jsxs("div",{className:"flex flex-col lg:flex-row gap-8 items-end",children:[s.jsx("div",{className:"flex-shrink-0 order-2 lg:order-1",children:s.jsx("div",{className:"w-48 h-48 lg:w-56 lg:h-56 rounded-xl overflow-hidden border-4 border-white shadow-2xl bg-white",children:s.jsx("img",{src:g||"https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=400&q=80",alt:x,className:"w-full h-full object-cover"})})}),s.jsxs("div",{className:"flex-1 order-1 lg:order-2",children:[s.jsxs("div",{className:"flex items-center gap-4 mb-4 flex-wrap",children:[s.jsxs($,{className:k("text-sm px-4 py-2 rounded-full",b[a.role]||b.king),children:[s.jsx(U,{className:"w-4 h-4 mr-1"}),a.role==="king"?"Roi":a.role]}),y&&s.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-[#c9a227] text-white text-sm font-semibold",children:[s.jsx(le,{className:"w-4 h-4"}),y]}),a.dynasty&&s.jsxs("span",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/10 text-white text-sm",children:[s.jsx(ge,{className:"w-4 h-4"}),a.dynasty]})]}),s.jsx("h1",{className:"text-4xl md:text-6xl font-bold text-white mb-4",children:x}),v&&s.jsx("p",{className:"text-xl text-white/80 max-w-2xl mb-4",children:v}),w&&s.jsx("p",{className:"text-lg text-white/80 max-w-2xl",children:w})]})]})]})]}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs(Gs,{value:r,onValueChange:l,className:"w-full",children:[s.jsxs(Xs,{className:"mb-8 bg-[#f5f1e8] p-1 rounded-xl",children:[s.jsx(Z,{value:"biography",className:"rounded-lg data-[state=active]:bg-white",children:typeof t=="function"?t("characters.biography"):"Biographie"}),s.jsx(Z,{value:"timeline",className:"rounded-lg data-[state=active]:bg-white",children:typeof t=="function"?t("characters.timeline"):"Chronologie"}),s.jsx(Z,{value:"related",className:"rounded-lg data-[state=active]:bg-white",children:typeof t=="function"?t("characters.related"):"Personnages liés"})]}),s.jsx(ee,{value:"biography",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsx("div",{className:"lg:col-span-2",children:s.jsxs("div",{className:"prose prose-lg max-w-none",children:[i.introduction&&s.jsx("div",{className:"mb-12",children:(De=i.introduction.paragraphs)==null?void 0:De.map((B,se)=>{const pe=typeof B=="object"&&B!==null?B[c]||B.fr||B.text||"":B;return s.jsx("p",{className:"text-gray-700 leading-relaxed mb-4 text-lg",children:vs(pe,c)},se)})}),((Re=i.introduction)==null?void 0:Re.paragraphs)&&L.length>0&&s.jsx("div",{className:"mb-12",children:s.jsx(gs,{slot:"character-after-intro"})}),L.map((B,se)=>{var pe,at;return s.jsxs("div",{className:"mb-12",id:B.id,children:[se>0&&s.jsx("div",{className:"mb-6",children:s.jsx(gs,{slot:`character-section-${se}`})}),s.jsx("h2",{className:"text-3xl font-bold text-[#1e3a5f] mb-6 border-b-2 border-[#c9a227] pb-2",children:typeof B.title=="object"&&B.title!==null?B.title[c]||B.title.fr||"":B.title}),s.jsxs("div",{className:"space-y-6",children:[(pe=B.content.paragraphs)==null?void 0:pe.map((ye,it)=>{const re=typeof ye=="object"&&ye!==null?ye[c]||ye.fr||ye.text||"":ye;return s.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:vs(re,c)},it)}),(at=B.content.subsections)==null?void 0:at.map(ye=>{var it;return s.jsxs("div",{className:"mt-8",children:[s.jsx("h3",{className:"text-2xl font-semibold text-[#1e3a5f] mb-4",children:typeof ye.title=="object"&&ye.title!==null?ye.title[c]||ye.title.fr||"":ye.title}),(it=ye.content.paragraphs)==null?void 0:it.map((re,Ee)=>{const ie=typeof re=="object"&&re!==null?re[c]||re.fr||re.text||"":re;return s.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:vs(ie,c)},Ee)})]},ye.id)})]})]},B.id)}),s.jsx("div",{className:"mt-12",children:s.jsx(Et,{variant:"inline",category:"all"})})]})}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-[#f5f1e8] rounded-2xl p-6",children:[s.jsxs("h3",{className:"font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(xt,{className:"w-5 h-5 text-[#c9a227]"}),"Informations"]}),s.jsxs("div",{className:"space-y-3",children:[y&&s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Période"}),s.jsx("p",{className:"font-semibold text-[#1e3a5f]",children:y})]}),a.role&&s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Rôle"}),s.jsx("p",{className:"font-semibold text-[#1e3a5f]",children:a.role==="king"?"Roi":a.role})]}),a.dynasty&&s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600",children:"Dynastie"}),s.jsx("p",{className:"font-semibold text-[#1e3a5f]",children:a.dynasty})]})]})]}),s.jsx("div",{ref:n,className:"sticky top-24 self-start",style:{alignSelf:"flex-start"},children:s.jsxs("div",{className:"space-y-6",children:[L.length>0&&s.jsxs("div",{className:"bg-white rounded-2xl border border-amber-100 p-6 w-full",children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mb-4",children:"Sommaire"}),s.jsx("div",{className:"space-y-2",children:L.map(B=>s.jsx("a",{href:`#${B.id}`,className:"block p-2 rounded-lg hover:bg-[#f5f1e8] transition-colors text-sm text-gray-700 hover:text-[#c9a227]",children:typeof B.title=="object"&&B.title!==null?B.title[c]||B.title.fr||"":B.title},B.id))})]}),s.jsx("div",{className:"w-full",children:s.jsx(Ws,{slot:"character-sidebar",className:"mb-6 w-full"})}),s.jsx("div",{className:"w-full",children:s.jsx(Et,{variant:"sidebar",category:"books"})})]})})]})]})}),s.jsx(ee,{value:"timeline",children:s.jsx(rc,{events:d})}),s.jsx(ee,{value:"related",children:u.length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:u.map(B=>s.jsx(ft,{id:B.id,name:B.name,title:B.title,years:B.years,birthYear:B.birthYear,deathYear:B.deathYear,portrait:B.portrait,dynasty:B.dynasty,role:B.role,description:B.description,variant:"default"},B.id))}):s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-600 mb-4",children:"Aucun personnage lié disponible."})})})]})})})]})}function Ys(){const e=Dh();da();const[t,n]=j.useState("biography"),r=j.useRef(null),l=typeof e=="function"?e("characters.title"):"Personnage";return s.jsx(jv,{type:"characters",fallbackTitle:l,fallbackDescription:"Découvrez ce personnage de l'histoire de France",children:a=>!a||!a.metadata||!a.biography?s.jsx("div",{children:"Chargement..."}):s.jsx(wv,{data:a,t:e,sidebarRef:r,activeTab:t,setActiveTab:n})})}const ll=[{id:"poitiers-732",name:"Bataille de Poitiers",date:"25 octobre 732",year:"732",location:"Poitiers",result:"victory",period:"early-middle-ages",commanders:["Charles Martel","Abd al-Rahman"]},{id:"hastings",name:"Bataille d'Hastings",date:"14 octobre 1066",year:"1066",location:"Hastings, Angleterre",result:"victory",period:"high-middle-ages",commanders:["Guillaume le Conquérant","Harold II"]},{id:"bouvines",name:"Bataille de Bouvines",date:"27 juillet 1214",year:"1214",location:"Bouvines",result:"victory",period:"high-middle-ages",commanders:["Philippe Auguste","Otton IV"]},{id:"crecy",name:"Bataille de Crécy",date:"26 août 1346",year:"1346",location:"Crécy-en-Ponthieu",result:"defeat",period:"late-middle-ages",commanders:["Philippe VI","Édouard III"]},{id:"azincourt",name:"Bataille d'Azincourt",date:"25 octobre 1415",year:"1415",location:"Azincourt",result:"defeat",period:"late-middle-ages",commanders:["Charles d'Albret","Henri V"]},{id:"orleans",name:"Siège d'Orléans",date:"12 octobre 1428 - 8 mai 1429",year:"1429",location:"Orléans",result:"victory",period:"late-middle-ages",commanders:["Jeanne d'Arc","William de la Pole"]},{id:"marignan",name:"Bataille de Marignan",date:"13-14 septembre 1515",year:"1515",location:"Marignan, Italie",result:"victory",period:"renaissance",commanders:["François Ier","Matthieu Schiner"]},{id:"rocroi",name:"Bataille de Rocroi",date:"19 mai 1643",year:"1643",location:"Rocroi",result:"victory",period:"classical",commanders:["Duc d'Enghien","Francisco de Melo"]},{id:"austerlitz",name:"Bataille d'Austerlitz",date:"2 décembre 1805",year:"1805",location:"Austerlitz, Moravie",result:"victory",period:"revolution-empire",commanders:["Napoléon Ier","Alexandre Ier"]},{id:"waterloo",name:"Bataille de Waterloo",date:"18 juin 1815",year:"1815",location:"Waterloo, Belgique",result:"defeat",period:"revolution-empire",commanders:["Napoléon Ier","Wellington"]},{id:"verdun",name:"Bataille de Verdun",date:"21 février - 18 décembre 1916",year:"1916",location:"Verdun",result:"victory",period:"contemporary",commanders:["Philippe Pétain","Erich von Falkenhayn"]}],tu=[{value:"early-middle-ages",label:"Haut Moyen Âge"},{value:"high-middle-ages",label:"Moyen Âge Central"},{value:"late-middle-ages",label:"Bas Moyen Âge"},{value:"renaissance",label:"Renaissance"},{value:"classical",label:"Époque Classique"},{value:"revolution-empire",label:"Révolution & Empire"},{value:"contemporary",label:"Époque Contemporaine"}];function Nv(){var m;const[e,t]=j.useState(""),[n,r]=j.useState("all"),[l,a]=j.useState("all"),[i,o]=j.useState("grid"),c=ll.filter(x=>{const f=x.name.toLowerCase().includes(e.toLowerCase())||x.location.toLowerCase().includes(e.toLowerCase()),v=n==="all"||x.result===n,w=l==="all"||x.period===l;return f&&v&&w}),d={total:ll.length,victories:ll.filter(x=>x.result==="victory").length,defeats:ll.filter(x=>x.result==="defeat").length},h=()=>{t(""),r("all"),a("all")},u=e||n!=="all"||l!=="all";return s.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-white to-[#f5f1e8]/30",children:[s.jsxs("section",{className:"bg-gradient-to-br from-red-900 to-red-800 py-16 lg:py-24 relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx(ce,{className:"absolute right-10 top-10 w-64 h-64 text-white rotate-45"})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:[s.jsx(Ie,{items:[{label:"Batailles"}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-white [&_span]:text-white"}),s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl bg-white/10 flex items-center justify-center",children:s.jsx(ce,{className:"w-8 h-8 text-white"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-white",children:"Les Batailles"}),s.jsxs("p",{className:"text-white/70 mt-1",children:[d.total," batailles historiques"]})]})]}),s.jsx("p",{className:"text-xl text-white/80 max-w-3xl mt-6",children:"De Poitiers à Verdun, découvrez les batailles qui ont façonné le destin de la France et marqué l'histoire militaire mondiale."}),s.jsxs("div",{className:"flex flex-wrap gap-6 mt-8",children:[s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl px-6 py-4",children:[s.jsx("p",{className:"text-3xl font-bold text-white",children:d.victories}),s.jsxs("p",{className:"text-sm text-white/70 flex items-center gap-1",children:[s.jsx(Yi,{className:"w-4 h-4 text-emerald-400"}),"Victoires"]})]}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl px-6 py-4",children:[s.jsx("p",{className:"text-3xl font-bold text-white",children:d.defeats}),s.jsxs("p",{className:"text-sm text-white/70 flex items-center gap-1",children:[s.jsx(pa,{className:"w-4 h-4 text-red-400"}),"Défaites"]})]}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl px-6 py-4",children:[s.jsxs("p",{className:"text-3xl font-bold text-white",children:[Math.round(d.victories/d.total*100),"%"]}),s.jsx("p",{className:"text-sm text-white/70",children:"Taux de victoire"})]})]})]})]}),s.jsx("section",{className:"py-8 bg-white border-b border-gray-100 sticky top-16 lg:top-20 z-30",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(_t,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx(Ns,{placeholder:"Rechercher une bataille...",value:e,onChange:x=>t(x.target.value),className:"pl-10 rounded-full border-gray-200"})]}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsxs(Ft,{value:n,onValueChange:r,children:[s.jsxs(Mt,{className:"w-36 rounded-full",children:[s.jsx(Yi,{className:"w-4 h-4 mr-2 text-gray-400"}),s.jsx(At,{placeholder:"Résultat"})]}),s.jsxs(Tt,{children:[s.jsx(be,{value:"all",children:"Tous résultats"}),s.jsx(be,{value:"victory",children:"Victoires"}),s.jsx(be,{value:"defeat",children:"Défaites"}),s.jsx(be,{value:"draw",children:"Indécis"})]})]}),s.jsxs(Ft,{value:l,onValueChange:a,children:[s.jsxs(Mt,{className:"w-44 rounded-full",children:[s.jsx(Zo,{className:"w-4 h-4 mr-2 text-gray-400"}),s.jsx(At,{placeholder:"Période"})]}),s.jsxs(Tt,{children:[s.jsx(be,{value:"all",children:"Toutes les périodes"}),tu.map(x=>s.jsx(be,{value:x.value,children:x.label},x.value))]})]}),s.jsxs("div",{className:"flex items-center gap-1 bg-gray-100 rounded-full p-1",children:[s.jsx(z,{variant:i==="grid"?"default":"ghost",size:"icon",className:"rounded-full h-8 w-8",onClick:()=>o("grid"),children:s.jsx(ma,{className:"w-4 h-4"})}),s.jsx(z,{variant:i==="list"?"default":"ghost",size:"icon",className:"rounded-full h-8 w-8",onClick:()=>o("list"),children:s.jsx(ha,{className:"w-4 h-4"})})]})]})]}),u&&s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-4",children:[s.jsx("span",{className:"text-sm text-gray-500",children:"Filtres actifs :"}),e&&s.jsxs($,{variant:"secondary",className:"rounded-full",children:["Recherche : ",e]}),n!=="all"&&s.jsx($,{variant:"secondary",className:"rounded-full",children:n==="victory"?"Victoires":n==="defeat"?"Défaites":"Indécis"}),l!=="all"&&s.jsx($,{variant:"secondary",className:"rounded-full",children:(m=tu.find(x=>x.value===l))==null?void 0:m.label}),s.jsx(z,{variant:"ghost",size:"sm",onClick:h,className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:"Effacer tout"})]})]})}),s.jsx("section",{className:"py-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:[c.length," bataille",c.length>1?"s":""," trouvée",c.length>1?"s":""]}),c.length>0?s.jsx("div",{className:i==="grid"?"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:c.map(x=>s.jsx(qs,{...x,variant:i==="list"?"compact":"default"},x.id))}):s.jsxs("div",{className:"text-center py-16",children:[s.jsx(ce,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-600 mb-2",children:"Aucune bataille trouvée"}),s.jsx("p",{className:"text-gray-500 mb-6",children:"Essayez de modifier vos critères de recherche"}),s.jsx(z,{onClick:h,variant:"outline",children:"Réinitialiser les filtres"})]})]})})]})}const su={bouvines:{id:"bouvines",name:"Bataille de Bouvines",date:"27 juillet 1214",year:"1214",location:"Bouvines, comté de Flandre",coordinates:{lat:50.5833,lng:3.1667},coverImage:"https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=1200&q=80",mapImage:"https://images.unsplash.com/photo-1524661135-423995f22d0b?w=800&q=80",result:"victory",period:{id:"high-middle-ages",name:"Moyen Âge Central"},belligerents:{french:{name:"Royaume de France",commanders:[{id:"philippe-auguste",name:"Philippe II Auguste",title:"Roi de France"},{id:"guerin",name:"Guérin de Senlis",title:"Évêque de Senlis"}],forces:"7 000 - 9 000 hommes",cavalry:"1 300 chevaliers",infantry:"5 000 - 7 000 sergents"},coalition:{name:"Coalition anglo-germanique",commanders:[{id:"otton-iv",name:"Otton IV",title:"Empereur germanique"},{id:"ferrand",name:"Ferrand de Flandre",title:"Comte de Flandre"},{id:"renaud",name:"Renaud de Dammartin",title:"Comte de Boulogne"}],forces:"9 000 - 12 000 hommes",cavalry:"1 500 chevaliers",infantry:"7 500 - 10 000 sergents"}},casualties:{french:"Environ 200 morts",coalition:"Environ 1 000 morts, 9 000 prisonniers"},summary:"La bataille de Bouvines est une victoire décisive de Philippe Auguste sur la coalition formée par Jean sans Terre, l'empereur Otton IV et le comte Ferrand de Flandre. Elle confirme la suprématie du royaume de France en Europe occidentale.",description:`La bataille de Bouvines, livrée le 27 juillet 1214, est l'une des batailles les plus importantes de l'histoire de France médiévale. Elle oppose l'armée du roi Philippe II Auguste à une coalition dirigée par l'empereur Otton IV du Saint-Empire, le comte Ferrand de Flandre et le comte Renaud de Dammartin.

**Contexte**
Jean sans Terre, roi d'Angleterre, cherche à reprendre les territoires continentaux perdus face à Philippe Auguste (Normandie, Anjou, Maine). Il forme une coalition avec l'empereur Otton IV et plusieurs seigneurs flamands et allemands.

**Le plan de la coalition**
La stratégie prévoit une attaque en tenaille : Jean attaque depuis le sud-ouest tandis qu'Otton et ses alliés attaquent par le nord. Cependant, Jean est défait à La Roche-aux-Moines le 2 juillet.

**La bataille**
Le 27 juillet, les deux armées s'affrontent près du pont de Bouvines. Malgré l'infériorité numérique française, la discipline et la coordination des chevaliers français, ainsi que le leadership de Philippe Auguste, permettent une victoire écrasante.

**Conséquences**
- Otton IV perd son trône au profit de Frédéric II
- Ferrand de Flandre est emprisonné jusqu'en 1227
- Jean sans Terre signe la Magna Carta en 1215
- La France devient la première puissance d'Europe occidentale`,consequences:["Affirmation de la puissance française en Europe","Chute d'Otton IV, remplacé par Frédéric II","Annexion de la Flandre wallonne","Renforcement du prestige royal de Philippe Auguste","Jean sans Terre contraint de signer la Magna Carta"],relatedBattles:[{id:"roche-moines",name:"Bataille de la Roche-aux-Moines",year:"1214"}],relatedPlaces:[{id:"bouvines-monument",name:"Monument de Bouvines",type:"monument",location:"Bouvines"}],sources:["Guillaume le Breton, La Philippide","Chronique de Rigord"]}};function bv(){const t=new URLSearchParams(window.location.search).get("id")||"bouvines",n=su[t]||su.bouvines,l={victory:{label:"Victoire française",color:"bg-emerald-500",icon:Yi},defeat:{label:"Défaite française",color:"bg-red-500",icon:or},draw:{label:"Bataille indécise",color:"bg-amber-500",icon:ws}}[n.result],a=l.icon;return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsxs("section",{className:"relative h-[60vh] min-h-[500px] overflow-hidden",children:[s.jsx("img",{src:n.coverImage,alt:n.name,className:"absolute inset-0 w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-red-900/90 via-red-900/50 to-red-900/30"}),s.jsxs("div",{className:"relative h-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col justify-end pb-12",children:[s.jsx(Ie,{items:[{label:"Batailles",pageName:"Battles"},{label:n.name}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-white [&_span]:text-white"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[s.jsxs($,{className:`${l.color} text-white text-sm px-4 py-1`,children:[s.jsx(a,{className:"w-4 h-4 mr-2"}),l.label]}),s.jsxs($,{variant:"outline",className:"border-white/30 text-white",children:[s.jsx(le,{className:"w-3 h-3 mr-1"}),n.date]}),s.jsx(C,{to:E("Period")+`?id=${n.period.id}`,children:s.jsx($,{variant:"outline",className:"border-white/30 text-white hover:bg-white/10",children:n.period.name})})]}),s.jsx("h1",{className:"text-4xl md:text-6xl font-bold text-white mb-4",children:n.name}),s.jsxs("p",{className:"text-xl text-white/80 max-w-3xl flex items-center gap-2",children:[s.jsx(ke,{className:"w-5 h-5"}),n.location]}),s.jsx("div",{className:"flex flex-wrap gap-3 mt-6",children:s.jsxs(z,{variant:"outline",size:"sm",className:"border-white/30 text-white hover:bg-white/10 rounded-full",children:[s.jsx(_r,{className:"w-4 h-4 mr-2"}),"Partager"]})})]})]}),s.jsx("section",{className:"py-12 bg-[#f5f1e8]",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsx("p",{className:"text-xl text-gray-700 leading-relaxed text-center max-w-4xl mx-auto",children:n.summary})})}),s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("h2",{className:"text-2xl font-bold text-[#1e3a5f] mb-8 text-center flex items-center justify-center gap-2",children:[s.jsx(ws,{className:"w-6 h-6 text-red-600"}),"Forces en présence"]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[s.jsxs("div",{className:"bg-blue-50 rounded-2xl p-8 border-2 border-blue-200",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-blue-600 flex items-center justify-center",children:s.jsx(or,{className:"w-6 h-6 text-white"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-bold text-blue-900",children:n.belligerents.french.name}),s.jsx("p",{className:"text-blue-600",children:n.belligerents.french.forces})]})]}),s.jsxs("div",{className:"space-y-4 mb-6",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-gray-600",children:"Cavalerie"}),s.jsx("span",{className:"font-semibold text-blue-900",children:n.belligerents.french.cavalry})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-gray-600",children:"Infanterie"}),s.jsx("span",{className:"font-semibold text-blue-900",children:n.belligerents.french.infantry})]})]}),s.jsx("h4",{className:"font-semibold text-blue-900 mb-3",children:"Commandants"}),s.jsx("div",{className:"space-y-2",children:n.belligerents.french.commanders.map(i=>s.jsxs(C,{to:E("Character")+`?id=${i.id}`,className:"flex items-center justify-between p-3 bg-white rounded-lg hover:shadow-md transition-shadow",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-blue-900",children:i.name}),s.jsx("p",{className:"text-sm text-gray-500",children:i.title})]}),s.jsx(te,{className:"w-4 h-4 text-blue-400"})]},i.id))}),s.jsx("div",{className:"mt-6 p-4 bg-blue-100 rounded-xl",children:s.jsxs("p",{className:"text-sm text-blue-800",children:[s.jsx("strong",{children:"Pertes :"})," ",n.casualties.french]})})]}),s.jsxs("div",{className:"bg-red-50 rounded-2xl p-8 border-2 border-red-200",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-red-600 flex items-center justify-center",children:s.jsx(or,{className:"w-6 h-6 text-white"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-bold text-red-900",children:n.belligerents.coalition.name}),s.jsx("p",{className:"text-red-600",children:n.belligerents.coalition.forces})]})]}),s.jsxs("div",{className:"space-y-4 mb-6",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-gray-600",children:"Cavalerie"}),s.jsx("span",{className:"font-semibold text-red-900",children:n.belligerents.coalition.cavalry})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-gray-600",children:"Infanterie"}),s.jsx("span",{className:"font-semibold text-red-900",children:n.belligerents.coalition.infantry})]})]}),s.jsx("h4",{className:"font-semibold text-red-900 mb-3",children:"Commandants"}),s.jsx("div",{className:"space-y-2",children:n.belligerents.coalition.commanders.map(i=>s.jsxs(C,{to:E("Character")+`?id=${i.id}`,className:"flex items-center justify-between p-3 bg-white rounded-lg hover:shadow-md transition-shadow",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-red-900",children:i.name}),s.jsx("p",{className:"text-sm text-gray-500",children:i.title})]}),s.jsx(te,{className:"w-4 h-4 text-red-400"})]},i.id))}),s.jsx("div",{className:"mt-6 p-4 bg-red-100 rounded-xl",children:s.jsxs("p",{className:"text-sm text-red-800",children:[s.jsx("strong",{children:"Pertes :"})," ",n.casualties.coalition]})})]})]})]})}),s.jsx("section",{className:"py-16 bg-[#f5f1e8]",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2",children:[s.jsxs("h2",{className:"text-2xl font-bold text-[#1e3a5f] mb-8 flex items-center gap-2",children:[s.jsx(xt,{className:"w-6 h-6 text-[#c9a227]"}),"Déroulement de la bataille"]}),s.jsx("div",{className:"prose prose-lg max-w-none whitespace-pre-line text-gray-700",children:n.description})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsx(Ws,{slot:"battle-sidebar"}),s.jsx(Et,{variant:"sidebar",category:"books"})]})]})})}),s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("h2",{className:"text-2xl font-bold text-[#1e3a5f] mb-8 flex items-center gap-2",children:[s.jsx(e0,{className:"w-6 h-6 text-[#c9a227]"}),"Conséquences"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.consequences.map((i,o)=>s.jsxs("div",{className:"bg-white rounded-xl p-6 border border-amber-100 shadow-sm",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-[#c9a227]/20 flex items-center justify-center mb-4",children:s.jsx("span",{className:"text-[#c9a227] font-bold",children:o+1})}),s.jsx("p",{className:"text-gray-700",children:i})]},o))})]})}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Event",name:n.name,startDate:n.year,location:{"@type":"Place",name:n.location,geo:n.coordinates?{"@type":"GeoCoordinates",latitude:n.coordinates.lat,longitude:n.coordinates.lng}:void 0},description:n.summary,image:n.coverImage})}})]})}const Qa=[{id:"versailles",name:"Château de Versailles",type:"palace",location:"Versailles",region:"Île-de-France",constructionYear:"1623-1710",builders:["Louis XIII","Louis XIV"]},{id:"chambord",name:"Château de Chambord",type:"castle",location:"Chambord",region:"Centre-Val de Loire",constructionYear:"1519-1547",builders:["François Ier"]},{id:"notre-dame",name:"Notre-Dame de Paris",type:"cathedral",location:"Paris",region:"Île-de-France",constructionYear:"1163-1345"},{id:"mont-saint-michel",name:"Mont-Saint-Michel",type:"abbey",location:"Mont-Saint-Michel",region:"Normandie",constructionYear:"966-1520"},{id:"louvre",name:"Château du Louvre",type:"palace",location:"Paris",region:"Île-de-France",constructionYear:"1190-1682"},{id:"carcassonne",name:"Cité de Carcassonne",type:"fortress",location:"Carcassonne",region:"Occitanie",constructionYear:"IIIe siècle"},{id:"chenonceau",name:"Château de Chenonceau",type:"castle",location:"Chenonceaux",region:"Centre-Val de Loire",constructionYear:"1514-1522"},{id:"reims",name:"Cathédrale de Reims",type:"cathedral",location:"Reims",region:"Grand Est",constructionYear:"1211-1516"},{id:"fontainebleau",name:"Château de Fontainebleau",type:"palace",location:"Fontainebleau",region:"Île-de-France",constructionYear:"XIIe siècle"},{id:"vincennes",name:"Château de Vincennes",type:"fortress",location:"Vincennes",region:"Île-de-France",constructionYear:"1337-1410"},{id:"saint-denis",name:"Basilique Saint-Denis",type:"abbey",location:"Saint-Denis",region:"Île-de-France",constructionYear:"1135-1281"},{id:"amboise",name:"Château d'Amboise",type:"castle",location:"Amboise",region:"Centre-Val de Loire",constructionYear:"XVe siècle"}],Ya=[{value:"castle",label:"Châteaux"},{value:"palace",label:"Palais"},{value:"cathedral",label:"Cathédrales"},{value:"abbey",label:"Abbayes"},{value:"fortress",label:"Forteresses"}],kv=["Île-de-France","Centre-Val de Loire","Normandie","Grand Est","Occitanie"];function Cv(){var u;const[e,t]=j.useState(""),[n,r]=j.useState("all"),[l,a]=j.useState("all"),[i,o]=j.useState("grid"),c=Qa.filter(m=>{const x=m.name.toLowerCase().includes(e.toLowerCase())||m.location.toLowerCase().includes(e.toLowerCase()),f=n==="all"||m.type===n,v=l==="all"||m.region===l;return x&&f&&v}),d=()=>{t(""),r("all"),a("all")},h=e||n!=="all"||l!=="all";return s.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-white to-[#f5f1e8]/30",children:[s.jsxs("section",{className:"bg-gradient-to-br from-emerald-900 to-emerald-800 py-16 lg:py-24 relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx(Fe,{className:"absolute right-10 top-10 w-64 h-64 text-white"})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:[s.jsx(Ie,{items:[{label:"Châteaux & Lieux"}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-white [&_span]:text-white"}),s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl bg-white/10 flex items-center justify-center",children:s.jsx(Fe,{className:"w-8 h-8 text-white"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-white",children:"Châteaux & Lieux"}),s.jsxs("p",{className:"text-white/70 mt-1",children:[Qa.length," lieux historiques"]})]})]}),s.jsx("p",{className:"text-xl text-white/80 max-w-3xl mt-6",children:"Des forteresses médiévales aux palais royaux, découvrez les monuments qui racontent l'histoire de France à travers leurs pierres."}),s.jsx("div",{className:"flex flex-wrap gap-4 mt-8",children:Ya.map(m=>{const x=Qa.filter(f=>f.type===m.value).length;return s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl px-4 py-3",children:[s.jsx("p",{className:"text-2xl font-bold text-white",children:x}),s.jsx("p",{className:"text-xs text-white/70",children:m.label})]},m.value)})})]})]}),s.jsx("section",{className:"py-8 bg-white border-b border-gray-100 sticky top-16 lg:top-20 z-30",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(_t,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx(Ns,{placeholder:"Rechercher un lieu...",value:e,onChange:m=>t(m.target.value),className:"pl-10 rounded-full border-gray-200"})]}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsxs(Ft,{value:n,onValueChange:r,children:[s.jsxs(Mt,{className:"w-36 rounded-full",children:[s.jsx(Fe,{className:"w-4 h-4 mr-2 text-gray-400"}),s.jsx(At,{placeholder:"Type"})]}),s.jsxs(Tt,{children:[s.jsx(be,{value:"all",children:"Tous les types"}),Ya.map(m=>s.jsx(be,{value:m.value,children:m.label},m.value))]})]}),s.jsxs(Ft,{value:l,onValueChange:a,children:[s.jsxs(Mt,{className:"w-44 rounded-full",children:[s.jsx(ke,{className:"w-4 h-4 mr-2 text-gray-400"}),s.jsx(At,{placeholder:"Région"})]}),s.jsxs(Tt,{children:[s.jsx(be,{value:"all",children:"Toutes les régions"}),kv.map(m=>s.jsx(be,{value:m,children:m},m))]})]}),s.jsxs(z,{variant:"outline",className:"rounded-full",children:[s.jsx(Ul,{className:"w-4 h-4 mr-2"}),"Carte"]}),s.jsxs("div",{className:"flex items-center gap-1 bg-gray-100 rounded-full p-1",children:[s.jsx(z,{variant:i==="grid"?"default":"ghost",size:"icon",className:"rounded-full h-8 w-8",onClick:()=>o("grid"),children:s.jsx(ma,{className:"w-4 h-4"})}),s.jsx(z,{variant:i==="list"?"default":"ghost",size:"icon",className:"rounded-full h-8 w-8",onClick:()=>o("list"),children:s.jsx(ha,{className:"w-4 h-4"})})]})]})]}),h&&s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-4",children:[s.jsx("span",{className:"text-sm text-gray-500",children:"Filtres actifs :"}),e&&s.jsxs($,{variant:"secondary",className:"rounded-full",children:["Recherche : ",e]}),n!=="all"&&s.jsx($,{variant:"secondary",className:"rounded-full",children:(u=Ya.find(m=>m.value===n))==null?void 0:u.label}),l!=="all"&&s.jsx($,{variant:"secondary",className:"rounded-full",children:l}),s.jsx(z,{variant:"ghost",size:"sm",onClick:d,className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:"Effacer tout"})]})]})}),s.jsx("section",{className:"py-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:[c.length," lieu",c.length>1?"x":""," trouvé",c.length>1?"s":""]}),c.length>0?s.jsx("div",{className:i==="grid"?"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6":"space-y-4",children:c.map(m=>s.jsx(Bs,{...m,variant:i==="list"?"compact":"default"},m.id))}):s.jsxs("div",{className:"text-center py-16",children:[s.jsx(Fe,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-600 mb-2",children:"Aucun lieu trouvé"}),s.jsx("p",{className:"text-gray-500 mb-6",children:"Essayez de modifier vos critères de recherche"}),s.jsx(z,{onClick:d,variant:"outline",children:"Réinitialiser les filtres"})]})]})})]})}const nu={versailles:{id:"versailles",name:"Château de Versailles",type:"palace",location:"Versailles",region:"Île-de-France",country:"France",coordinates:{lat:48.8048,lng:2.1203},constructionStart:"1623",constructionEnd:"1710",coverImage:"https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?w=1200&q=80",gallery:["https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?w=600&q=80","https://images.unsplash.com/photo-1551038247-3d9af20df552?w=600&q=80","https://images.unsplash.com/photo-1499856871958-5b9627545d1a?w=600&q=80"],summary:"Symbole absolu de la monarchie française, le château de Versailles fut la résidence principale des rois de France de Louis XIV à la Révolution. Chef-d'œuvre de l'art français, il incarne le rayonnement de la France au XVIIe siècle.",description:`Le château de Versailles est l'un des plus grands accomplissements de l'art français du XVIIe siècle. D'un simple pavillon de chasse construit par Louis XIII, Louis XIV en fit le plus grand palais d'Europe.

**Les origines**
En 1623, Louis XIII fait construire un modeste pavillon de chasse à Versailles. Son fils Louis XIV, fasciné par le lieu, décide d'en faire le cœur de son pouvoir.

**L'œuvre de Louis XIV**
À partir de 1661, Louis XIV engage les plus grands artistes de son temps : Le Vau puis Hardouin-Mansart pour l'architecture, Le Brun pour les décors, Le Nôtre pour les jardins. Le château s'agrandit progressivement : galerie des Glaces (1678-1684), Grand Trianon (1687), chapelle royale (1710).

**La vie de cour**
En 1682, Louis XIV installe définitivement la cour et le gouvernement à Versailles. Des milliers de courtisans y vivent selon un cérémonial strict dicté par l'étiquette. Le lever du roi, le coucher, les repas deviennent des spectacles ritualisés.

**Après la Révolution**
En 1789, la famille royale quitte Versailles pour Paris. Le château est pillé mais sauvé de la destruction. Au XIXe siècle, Louis-Philippe le transforme en musée de l'histoire de France.`,architects:["Louis Le Vau","Jules Hardouin-Mansart","André Le Nôtre"],builders:[{id:"louis-xiii",name:"Louis XIII",role:"Fondateur"},{id:"louis-xiv",name:"Louis XIV",role:"Bâtisseur principal"}],residents:[{id:"louis-xiv",name:"Louis XIV",years:"1682-1715"},{id:"louis-xv",name:"Louis XV",years:"1715-1774"},{id:"louis-xvi",name:"Louis XVI",years:"1774-1789"}],keyDates:[{year:"1623",event:"Construction du pavillon de chasse par Louis XIII"},{year:"1661",event:"Louis XIV décide l'agrandissement"},{year:"1682",event:"Installation de la cour"},{year:"1684",event:"Achèvement de la galerie des Glaces"},{year:"1789",event:"Départ de la famille royale"},{year:"1837",event:"Transformation en musée"},{year:"1979",event:"Inscription au patrimoine mondial UNESCO"}],visitInfo:{status:"Ouvert au public",website:"www.chateauversailles.fr",hours:"Mar-Dim 9h-18h30",tickets:"Billet Château : 18€",unesco:!0},stats:{surface:"63 154 m²",rooms:"2 300 pièces",gardens:"800 hectares",visitors:"8 millions/an"},period:{id:"classical",name:"Époque Classique"}}};function Sv(){const[e,t]=j.useState("overview"),[n,r]=j.useState(0),a=new URLSearchParams(window.location.search).get("id")||"versailles",i=nu[a]||nu.versailles,o={castle:"Château",palace:"Palais",cathedral:"Cathédrale",abbey:"Abbaye",fortress:"Forteresse",monument:"Monument"};return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsxs("section",{className:"relative h-[70vh] min-h-[500px] overflow-hidden",children:[s.jsx("img",{src:i.gallery[n]||i.coverImage,alt:i.name,className:"absolute inset-0 w-full h-full object-cover transition-opacity duration-500"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f]/90 via-transparent to-[#1e3a5f]/30"}),s.jsxs("div",{className:"absolute bottom-24 left-1/2 -translate-x-1/2 flex items-center gap-2",children:[i.gallery.map((c,d)=>s.jsx("button",{onClick:()=>r(d),className:`w-16 h-12 rounded-lg overflow-hidden border-2 transition-all ${n===d?"border-[#c9a227] scale-110":"border-white/50 opacity-70"}`,children:s.jsx("img",{src:c,alt:"",className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})},d)),s.jsxs("div",{className:"ml-2 px-3 py-1 rounded-full bg-black/50 text-white text-sm flex items-center gap-1",children:[s.jsx(Vh,{className:"w-4 h-4"}),i.gallery.length]})]}),s.jsxs("div",{className:"relative h-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col justify-end pb-32",children:[s.jsx(Ie,{items:[{label:"Lieux",pageName:"Places"},{label:i.region},{label:i.name}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[s.jsxs($,{className:"bg-emerald-600 text-white",children:[s.jsx(Fe,{className:"w-3 h-3 mr-1"}),o[i.type]||i.type]}),i.visitInfo.unesco&&s.jsx($,{className:"bg-blue-600 text-white",children:"UNESCO"}),s.jsx(C,{to:E("Period")+`?id=${i.period.id}`,children:s.jsx($,{variant:"outline",className:"border-white/30 text-white hover:bg-white/10",children:i.period.name})})]}),s.jsx("h1",{className:"text-4xl md:text-6xl font-bold text-white mb-4",children:i.name}),s.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-white/80",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ke,{className:"w-5 h-5"}),i.location,", ",i.region]}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(le,{className:"w-5 h-5"}),i.constructionStart,"-",i.constructionEnd]})]}),s.jsxs("div",{className:"flex flex-wrap gap-3 mt-6",children:[s.jsx("a",{href:`https://${i.visitInfo.website}`,target:"_blank",rel:"noopener noreferrer",children:s.jsxs(z,{className:"bg-[#c9a227] hover:bg-[#a88620] rounded-full",children:[s.jsx(yn,{className:"w-4 h-4 mr-2"}),"Visiter le site officiel"]})}),s.jsxs(z,{variant:"outline",className:"border-white/30 text-white hover:bg-white/10 rounded-full",children:[s.jsx(_r,{className:"w-4 h-4 mr-2"}),"Partager"]}),s.jsxs(z,{variant:"outline",className:"border-white/30 text-white hover:bg-white/10 rounded-full",children:[s.jsx(ec,{className:"w-4 h-4 mr-2"}),"Sauvegarder"]})]})]})]}),s.jsx("section",{className:"py-4 bg-emerald-600 text-white",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx($h,{className:"w-5 h-5"}),i.visitInfo.status]}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(fs,{className:"w-5 h-5"}),i.visitInfo.hours]}),s.jsx("span",{children:i.visitInfo.tickets})]})})}),s.jsx("section",{className:"py-12 bg-[#f5f1e8]",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"bg-white rounded-xl p-6 text-center",children:[s.jsx("p",{className:"text-3xl font-bold text-[#1e3a5f]",children:i.stats.surface}),s.jsx("p",{className:"text-gray-500 text-sm",children:"Surface"})]}),s.jsxs("div",{className:"bg-white rounded-xl p-6 text-center",children:[s.jsx("p",{className:"text-3xl font-bold text-[#1e3a5f]",children:i.stats.rooms}),s.jsx("p",{className:"text-gray-500 text-sm",children:"Pièces"})]}),s.jsxs("div",{className:"bg-white rounded-xl p-6 text-center",children:[s.jsx("p",{className:"text-3xl font-bold text-[#1e3a5f]",children:i.stats.gardens}),s.jsx("p",{className:"text-gray-500 text-sm",children:"Jardins"})]}),s.jsxs("div",{className:"bg-white rounded-xl p-6 text-center",children:[s.jsx("p",{className:"text-3xl font-bold text-[#c9a227]",children:i.stats.visitors}),s.jsx("p",{className:"text-gray-500 text-sm",children:"Visiteurs"})]})]})})}),s.jsx("section",{className:"py-12",children:s.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:s.jsx("p",{className:"text-xl text-gray-700 leading-relaxed",children:i.summary})})}),s.jsx(gs,{slot:"place-in-article",className:"max-w-4xl mx-auto px-4"}),s.jsx("section",{className:"py-16 bg-[#f5f1e8]",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs(Gs,{value:e,onValueChange:t,children:[s.jsxs(Xs,{className:"mb-8 bg-white p-1 rounded-xl",children:[s.jsx(Z,{value:"overview",className:"rounded-lg",children:"Histoire"}),s.jsx(Z,{value:"timeline",className:"rounded-lg",children:"Chronologie"}),s.jsx(Z,{value:"builders",className:"rounded-lg",children:"Bâtisseurs"}),s.jsx(Z,{value:"residents",className:"rounded-lg",children:"Résidents"})]}),s.jsx(ee,{value:"overview",children:s.jsx("div",{className:"bg-white rounded-2xl p-8 shadow-sm",children:s.jsx("div",{className:"prose prose-lg max-w-none whitespace-pre-line text-gray-700",children:i.description})})}),s.jsx(ee,{value:"timeline",children:s.jsx("div",{className:"bg-white rounded-2xl p-8 shadow-sm",children:s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute left-8 top-0 bottom-0 w-1 bg-gradient-to-b from-[#c9a227] to-emerald-500 rounded-full"}),s.jsx("div",{className:"space-y-6",children:i.keyDates.map((c,d)=>s.jsxs("div",{className:"relative flex items-center gap-6 ml-2",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-[#c9a227] flex items-center justify-center text-white font-bold shadow-lg z-10",children:s.jsx(le,{className:"w-5 h-5"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-[#c9a227] font-bold text-lg",children:c.year}),s.jsx("p",{className:"text-[#1e3a5f]",children:c.event})]})]},d))})]})})}),s.jsx(ee,{value:"builders",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm",children:[s.jsxs("h3",{className:"font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(ge,{className:"w-5 h-5 text-[#c9a227]"}),"Commanditaires"]}),s.jsx("div",{className:"space-y-3",children:i.builders.map(c=>s.jsx(ft,{id:c.id,name:c.name,title:c.role,variant:"compact"},c.id))})]}),s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm",children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mb-4",children:"Architectes"}),s.jsx("div",{className:"space-y-3",children:i.architects.map((c,d)=>s.jsx("div",{className:"p-4 bg-[#f5f1e8] rounded-lg",children:s.jsx("p",{className:"font-medium text-[#1e3a5f]",children:c})},d))})]})]})}),s.jsx(ee,{value:"residents",children:s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm",children:[s.jsxs("h3",{className:"font-semibold text-[#1e3a5f] mb-6 flex items-center gap-2",children:[s.jsx(Fe,{className:"w-5 h-5 text-[#c9a227]"}),"Résidents illustres"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:i.residents.map(c=>s.jsxs(C,{to:E("Character")+`?id=${c.id}`,className:"group p-4 border border-amber-100 rounded-xl hover:border-[#c9a227] hover:shadow-md transition-all",children:[s.jsx("p",{className:"font-bold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors",children:c.name}),s.jsx("p",{className:"text-sm text-gray-500",children:c.years})]},c.id))})]})})]})})}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"LandmarksOrHistoricalBuildings",name:i.name,description:i.summary,image:i.coverImage,address:{"@type":"PostalAddress",addressLocality:i.location,addressRegion:i.region,addressCountry:i.country},geo:i.coordinates?{"@type":"GeoCoordinates",latitude:i.coordinates.lat,longitude:i.coordinates.lng}:void 0,url:`https://${i.visitInfo.website}`})}})]})}function Ev({images:e,name:t=""}){const[n,r]=j.useState(null),[l,a]=j.useState(!1),i=e.map((m,x)=>typeof m=="string"?{url:m,alt:`${t} - Image ${x+1}`,caption:"",credit:""}:{url:m.url||m.src||"",alt:m.alt||`${t} - Image ${x+1}`,caption:m.caption||"",credit:m.credit||m.photographer||""}).filter(m=>m.url),o=m=>{r(m),a(!0),document.body.style.overflow="hidden"},c=()=>{a(!1),r(null),document.body.style.overflow="unset"},d=()=>{n!==null&&n>0?r(n-1):n===0&&r(i.length-1)},h=()=>{n!==null&&n<i.length-1?r(n+1):n===i.length-1&&r(0)};if(j.useEffect(()=>{if(!l)return;const m=x=>{x.key==="Escape"?c():x.key==="ArrowLeft"?d():x.key==="ArrowRight"&&h()};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[l,n]),i.length===0)return null;const u=n!==null?i[n]:null;return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:i.map((m,x)=>s.jsxs("div",{onClick:()=>o(x),className:"relative aspect-square rounded-lg overflow-hidden group cursor-pointer shadow-md hover:shadow-xl transition-all",children:[s.jsx("img",{src:m.url,alt:m.alt,className:"w-full h-full object-cover transition-transform group-hover:scale-110",loading:"lazy"}),(m.caption||m.credit)&&s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-3 text-white text-xs",children:[m.caption&&s.jsx("p",{className:"font-semibold mb-1",children:m.caption}),m.credit&&s.jsxs("p",{className:"opacity-90",children:["© ",m.credit]})]})})]},x))}),l&&u&&n!==null&&s.jsxs("div",{className:"fixed inset-0 z-50 bg-black/95 flex items-center justify-center p-4",onClick:c,children:[s.jsx("button",{onClick:c,className:"absolute top-4 right-4 z-10 p-2 bg-white/10 hover:bg-white/20 rounded-full text-white transition-colors","aria-label":"Fermer",children:s.jsx(pa,{className:"w-6 h-6"})}),i.length>1&&s.jsx("button",{onClick:m=>{m.stopPropagation(),d()},className:"absolute left-4 top-1/2 -translate-y-1/2 z-10 p-3 bg-white/10 hover:bg-white/20 rounded-full text-white transition-colors","aria-label":"Image précédente",children:s.jsx(qh,{className:"w-8 h-8"})}),i.length>1&&s.jsx("button",{onClick:m=>{m.stopPropagation(),h()},className:"absolute right-4 top-1/2 -translate-y-1/2 z-10 p-3 bg-white/10 hover:bg-white/20 rounded-full text-white transition-colors","aria-label":"Image suivante",children:s.jsx(Xt,{className:"w-8 h-8"})}),s.jsxs("div",{className:"relative max-w-7xl max-h-[90vh] w-full h-full flex flex-col items-center justify-center",onClick:m=>m.stopPropagation(),children:[s.jsx("img",{src:u.url,alt:u.alt,className:"max-w-full max-h-[80vh] object-contain"}),(u.caption||u.credit)&&s.jsxs("div",{className:"mt-4 text-white text-center max-w-2xl",children:[u.caption&&s.jsx("p",{className:"text-lg font-semibold mb-2",children:u.caption}),u.credit&&s.jsxs("p",{className:"text-sm opacity-80",children:["© ",u.credit]})]}),i.length>1&&s.jsxs("div",{className:"mt-4 text-white/70 text-sm",children:[n+1," / ",i.length]})]})]})]})}function Lv({data:e,t,sidebarRef:n}){var b,L,M,A,N,F,R,G,D,we;const{metadata:r,overview:l,images:a,lang:i}=e,[o,c]=j.useState([]),[d,h]=j.useState([]),u=((b=l==null?void 0:l.name)==null?void 0:b[i])||((L=l==null?void 0:l.name)==null?void 0:L.fr)||((M=r==null?void 0:r.name)==null?void 0:M.fr)||(r==null?void 0:r.id)||"",m=(l==null?void 0:l.shortDescription)||"",x=((A=a==null?void 0:a.cover)==null?void 0:A.url)||((F=(N=a==null?void 0:a.cover)==null?void 0:N.sizes)==null?void 0:F.medium)||(a==null?void 0:a.cover)||"https://images.unsplash.com/photo-1564399579883-451a5d44ec08?w=1200&q=80",f=(a==null?void 0:a.gallery)||((R=a==null?void 0:a.images)==null?void 0:R.gallery)||[],v=(r==null?void 0:r.location)||{},w=(v==null?void 0:v.city)||"",g=(v==null?void 0:v.region)||"",p=(v==null?void 0:v.coordinates)||{};j.useEffect(()=>{async function O(){var X;const K=((X=r==null?void 0:r.connections)==null?void 0:X.events)||[];if(K.length===0){c([]);return}try{const ae=await wt("events"),I=(await Promise.all(K.map(async T=>{var Re,B,se,pe;const V=ae[T.id];if(!V)return null;const H=await bt("events",T.id,i,"overview"),De=(H==null?void 0:H.shortDescription)||((Re=H==null?void 0:H.description)==null?void 0:Re[i])||((B=H==null?void 0:H.description)==null?void 0:B.fr)||"";return{id:T.id,title:((se=V.name)==null?void 0:se[i])||((pe=V.name)==null?void 0:pe.fr)||T.id,description:De,year:T.year||parseInt(V.date)||0,type:T.type||V.type||"cultural",href:Nt("events",T.id,i),pageName:"Event"}}))).filter(Boolean);I.sort((T,V)=>T.year-V.year),c(I)}catch(ae){console.error("Error loading timeline events:",ae),c([])}}O()},[(G=r==null?void 0:r.connections)==null?void 0:G.events,i]),j.useEffect(()=>{async function O(){var X;const K=((X=r==null?void 0:r.connections)==null?void 0:X.places)||[];if(K.length===0){h([]);return}try{const ae=await wt("places"),I=(await Promise.all(K.map(async T=>{var De,Re;const V=ae[T.id];if(!V)return null;const H=await bt("places",T.id,i,"overview");return{id:T.id,name:((De=V.name)==null?void 0:De[i])||((Re=V.name)==null?void 0:Re.fr)||T.id,description:(H==null?void 0:H.shortDescription)||"",type:V.type||"archaeological-site",period:V.period}}))).filter(Boolean);h(I)}catch(ae){console.error("Error loading related places:",ae),h([])}}O()},[(D=r==null?void 0:r.connections)==null?void 0:D.places,i]),j.useEffect(()=>{if(!l)return;const O=()=>{if(!n.current)return;const P=n.current,I=document.querySelector("footer");if(!I)return;const T=P.getBoundingClientRect(),V=I.getBoundingClientRect(),H=V.top-T.top;if(V.top<=window.innerHeight){const De=Math.max(200,H-20);P.style.maxHeight=`${De}px`,P.style.overflowY="auto"}else P.style.maxHeight="calc(100vh - 8rem)",P.style.overflowY="visible"};let K;const X=()=>{K&&cancelAnimationFrame(K),K=requestAnimationFrame(O)};window.addEventListener("scroll",X,{passive:!0}),window.addEventListener("resize",X);const ae=setTimeout(()=>{O()},200);return()=>{K&&cancelAnimationFrame(K),clearTimeout(ae),window.removeEventListener("scroll",X),window.removeEventListener("resize",X)}},[l,n]);const y=l!=null&&l.sections?[...l.sections].sort((O,K)=>(O.order||0)-(K.order||0)):[];return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsxs("section",{className:"relative h-[60vh] min-h-[500px] overflow-hidden bg-gradient-to-br from-[#1e3a5f] to-[#2d4a6b]",children:[s.jsx("img",{src:x,alt:u,className:"absolute inset-0 w-full h-full object-cover opacity-40"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f]/95 via-[#1e3a5f]/80 to-[#1e3a5f]/40"}),s.jsxs("div",{className:"relative h-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col justify-end pb-12",children:[s.jsx("div",{className:"mb-6",children:s.jsx(Ie,{items:[{label:typeof t=="function"?t("places.title"):"Lieux",pageName:"Places"},{label:u}],className:"text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"})}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[s.jsxs($,{className:"bg-emerald-600 text-white",children:[s.jsx(ke,{className:"w-3 h-3 mr-1"}),(r==null?void 0:r.type)==="archaeological-site"?"Site archéologique":(r==null?void 0:r.type)==="palace"?"Palais":(r==null?void 0:r.type)==="castle"?"Château":"Lieu"]}),(r==null?void 0:r.period)&&s.jsx($,{variant:"outline",className:"border-white/30 text-white",children:r.period})]}),s.jsx("h1",{className:"text-4xl md:text-6xl font-bold text-white mb-4",children:u}),s.jsx("div",{className:"flex flex-wrap items-center gap-4 text-white/80 mb-6",children:w&&s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ke,{className:"w-5 h-5"}),w,g&&`, ${g}`]})}),m&&s.jsx("p",{className:"text-lg text-white/90 max-w-3xl mb-6",children:m})]})]}),f&&f.length>0&&s.jsx("section",{className:"py-12 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx("h2",{className:"text-3xl font-bold text-[#1e3a5f] mb-8 text-center",children:"Galerie"}),s.jsx(Ev,{images:f,name:u})]})}),(p==null?void 0:p.lat)&&(p==null?void 0:p.lng)&&s.jsx("section",{className:"py-16 bg-[#f5f1e8]",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx("h2",{className:"text-3xl font-bold text-[#1e3a5f] mb-8 text-center",children:"Localisation"}),s.jsxs("div",{className:"bg-white rounded-2xl shadow-lg overflow-hidden border border-amber-100",children:[s.jsx("div",{className:"relative w-full h-[500px]",children:s.jsx("iframe",{width:"100%",height:"100%",frameBorder:"0",style:{border:0},src:`https://www.openstreetmap.org/export/embed.html?bbox=${p.lng-.01},${p.lat-.01},${p.lng+.01},${p.lat+.01}&layer=mapnik&marker=${p.lat},${p.lng}`,allowFullScreen:!0,loading:"lazy"})}),s.jsx("div",{className:"p-6 bg-[#f5f1e8]",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-4",children:[s.jsx(ke,{className:"w-6 h-6 text-[#c9a227] flex-shrink-0"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"font-semibold text-[#1e3a5f]",children:u}),s.jsxs("p",{className:"text-gray-600 text-sm",children:[w,g&&`, ${g}`,p.lat&&p.lng&&s.jsxs("span",{className:"ml-2 text-gray-400",children:["(",p.lat.toFixed(4),", ",p.lng.toFixed(4),")"]})]})]}),s.jsxs("a",{href:`https://www.google.com/maps/search/?api=1&query=${p.lat},${p.lng}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 bg-[#c9a227] text-white rounded-lg hover:bg-[#a88620] transition-colors whitespace-nowrap",children:[s.jsx(yn,{className:"w-4 h-4"}),"Ouvrir dans Google Maps"]})]})})]})]})}),s.jsx("section",{className:"py-16 bg-[#f5f1e8]",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsx("div",{className:"lg:col-span-2",children:s.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-sm",children:[s.jsx(gs,{slot:"place-in-article-top",className:"mb-8"}),((we=l==null?void 0:l.introduction)==null?void 0:we.paragraphs)&&s.jsx("div",{className:"mb-8",children:l.introduction.paragraphs.map((O,K)=>{const X=typeof O=="object"&&O!==null?O[i]||O.fr||O.text||"":O;return s.jsx("p",{className:"text-gray-700 leading-relaxed mb-4 text-lg",children:vs(X,i)},K)})}),y.map((O,K)=>{var X,ae,P;return s.jsxs(Qt.Fragment,{children:[K>0&&K%2===0&&s.jsx(gs,{slot:`place-in-article-${K}`,className:"my-8"}),s.jsxs("div",{id:O.id,className:"mb-12 scroll-mt-24",children:[s.jsx("h2",{className:"text-3xl font-bold text-[#1e3a5f] mb-6 pb-3 border-b-2 border-[#c9a227]",children:typeof O.title=="object"&&O.title!==null?O.title[i]||O.title.fr||"":O.title}),(ae=(X=O.content)==null?void 0:X.paragraphs)==null?void 0:ae.map((I,T)=>{const V=typeof I=="object"&&I!==null?I[i]||I.fr||I.text||"":I;return s.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:vs(V,i)},T)}),((P=O.content)==null?void 0:P.subsections)&&O.content.subsections.length>0&&s.jsx("div",{className:"mt-8 space-y-8",children:O.content.subsections.map(I=>{var T,V;return s.jsxs("div",{className:"pl-6 border-l-4 border-[#c9a227]/30",children:[s.jsx("h3",{className:"text-xl font-semibold text-[#1e3a5f] mb-4",children:typeof I.title=="object"&&I.title!==null?I.title[i]||I.title.fr||"":I.title}),(V=(T=I.content)==null?void 0:T.paragraphs)==null?void 0:V.map((H,De)=>{const Re=typeof H=="object"&&H!==null?H[i]||H.fr||H.text||"":H;return s.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:vs(Re,i)},De)})]},I.id)})})]})]},O.id)}),s.jsx(gs,{slot:"place-in-article-bottom",className:"mt-8"}),s.jsx("div",{className:"mt-12 pt-8 border-t border-amber-100",children:s.jsx(Et,{variant:"inline",category:"all"})})]})}),s.jsx("div",{className:"lg:col-span-1",children:s.jsx("div",{className:"sticky top-24 self-start",style:{alignSelf:"flex-start"},children:s.jsxs("div",{className:"space-y-6",children:[y.length>0&&s.jsxs("div",{className:"bg-white rounded-2xl border border-amber-100 p-6 w-full",children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mb-4",children:"Sommaire"}),s.jsx("div",{className:"space-y-2",children:y.map(O=>s.jsx("a",{href:`#${O.id}`,className:"block p-2 rounded-lg hover:bg-[#f5f1e8] transition-colors text-sm text-gray-700 hover:text-[#c9a227]",children:typeof O.title=="object"&&O.title!==null?O.title[i]||O.title.fr||"":O.title},O.id))})]}),s.jsx("div",{className:"w-full",children:s.jsx(Ws,{slot:"place-sidebar",className:"mb-6 w-full"})}),s.jsx("div",{className:"w-full",children:s.jsx(Et,{variant:"sidebar",category:"books"})})]})})})]})})})]})}function Js(){const e=da(),{t}=Dh(),{language:n}=Ze(),r=j.useRef(null),[l,a]=j.useState(null),[i,o]=j.useState(!0);return j.useEffect(()=>{async function c(){if(e.id){o(!0);try{const[d,h,u]=await Promise.all([Zh("places",e.id),bt("places",e.id,n,"overview"),ep("places",e.id).catch(()=>null)]);if(!d||!h){a(null);return}a({metadata:d,overview:h,images:u||{cover:{url:"https://images.unsplash.com/photo-1564399579883-451a5d44ec08?w=1200&q=80",sizes:{medium:"https://images.unsplash.com/photo-1564399579883-451a5d44ec08?w=1200&q=80"}},gallery:["https://images.unsplash.com/photo-1564399579883-451a5d44ec08?w=800&q=80","https://images.unsplash.com/photo-1518837695005-2083093ee35b?w=800&q=80","https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&q=80"]},seo:null,lang:n})}catch(d){console.error("Error loading place data:",d),a(null)}finally{o(!1)}}}c()},[e.id,n]),i?s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsx("div",{className:"text-center",children:s.jsx("p",{className:"text-gray-600",children:"Chargement..."})})}):l?s.jsx(Lv,{data:l,t,sidebarRef:r}):s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-gray-600 mb-4",children:"Lieu non trouvé"}),s.jsx(z,{onClick:()=>window.history.back(),children:"Retour"})]})})}const Ks=[{id:"merovingiens",name:"Mérovingiens",years:"481 - 751",description:`Première dynastie royale des Francs, fondée par Clovis. Marquée par les "rois fainéants" et l'ascension des maires du palais.`,rulerCount:18,motto:"Par le baptême, la France",origin:"Francs saliens",keyRulers:["Clovis Ier","Dagobert Ier","Childéric III"]},{id:"carolingiens",name:"Carolingiens",years:"751 - 987",description:"Dynastie de Charlemagne, qui reconstitua l'empire d'Occident. Apogée de la civilisation carolingienne avant le morcellement féodal.",rulerCount:12,motto:"Renovatio Imperii",origin:"Austrasie",keyRulers:["Pépin le Bref","Charlemagne","Louis le Pieux"]},{id:"capetiens",name:"Capétiens directs",years:"987 - 1328",description:"De Hugues Capet à Charles IV, ils construisirent méthodiquement le royaume de France et le pouvoir royal face aux grands féodaux.",rulerCount:15,motto:"Montjoie Saint Denis !",origin:"Île-de-France",keyRulers:["Hugues Capet","Philippe Auguste","Saint Louis"]},{id:"valois",name:"Valois",years:"1328 - 1589",description:"La guerre de Cent Ans, Jeanne d'Arc, la Renaissance. Une dynastie marquée par les conflits mais aussi par l'épanouissement culturel.",rulerCount:13,motto:"Le roi ne meurt jamais",origin:"Valois",keyRulers:["Philippe VI","Charles VII","François Ier"]},{id:"bourbons",name:"Bourbons",years:"1589 - 1792",description:"D'Henri IV à Louis XVI, les Bourbons portèrent la France à son apogée avec Louis XIV avant la chute révolutionnaire.",rulerCount:7,motto:"Dieu et mon droit",origin:"Bourbonnais",keyRulers:["Henri IV","Louis XIV","Louis XVI"]},{id:"napoleonides",name:"Napoléonides",years:"1804 - 1870",description:"Napoléon Ier puis Napoléon III. Empire, gloire militaire, modernisation de la France, puis défaite face à la Prusse.",rulerCount:2,motto:"L'Aigle impérial",origin:"Corse",keyRulers:["Napoléon Ier","Napoléon III"]}];function Pv(){const t=Ks.reduce((n,r)=>n+r.rulerCount,0);return s.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-white to-[#f5f1e8]/30",children:[s.jsxs("section",{className:"bg-gradient-to-br from-[#1e3a5f] to-[#2d5a87] py-16 lg:py-24 relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx(U,{className:"absolute right-10 top-10 w-64 h-64 text-white"})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:[s.jsx(Ie,{items:[{label:"Dynasties"}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"}),s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl bg-[#c9a227]/20 flex items-center justify-center",children:s.jsx(U,{className:"w-8 h-8 text-[#c9a227]"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-white",children:"Les Dynasties"}),s.jsxs("p",{className:"text-white/70 mt-1",children:[Ks.length," dynasties royales"]})]})]}),s.jsx("p",{className:"text-xl text-white/80 max-w-3xl mt-6",children:"Des Mérovingiens aux Napoléonides, découvrez les grandes familles qui ont régné sur la France pendant près de 1400 ans."}),s.jsxs("div",{className:"flex flex-wrap gap-6 mt-8",children:[s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl px-6 py-4",children:[s.jsx("p",{className:"text-3xl font-bold text-white",children:1389}),s.jsxs("p",{className:"text-sm text-white/70 flex items-center gap-1",children:[s.jsx(le,{className:"w-4 h-4 text-[#c9a227]"}),"Années d'histoire"]})]}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl px-6 py-4",children:[s.jsx("p",{className:"text-3xl font-bold text-white",children:t}),s.jsxs("p",{className:"text-sm text-white/70 flex items-center gap-1",children:[s.jsx(ge,{className:"w-4 h-4 text-[#c9a227]"}),"Souverains"]})]}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl px-6 py-4",children:[s.jsx("p",{className:"text-3xl font-bold text-white",children:Ks.length}),s.jsxs("p",{className:"text-sm text-white/70 flex items-center gap-1",children:[s.jsx(U,{className:"w-4 h-4 text-[#c9a227]"}),"Dynasties"]})]})]})]})]}),s.jsx("section",{className:"py-12 bg-[#f5f1e8]",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx("h2",{className:"text-xl font-bold text-[#1e3a5f] mb-8 text-center",children:"Chronologie des Dynasties"}),s.jsx("div",{className:"overflow-x-auto pb-4",children:s.jsx("div",{className:"flex items-center min-w-max px-8 gap-4",children:Ks.map((n,r)=>s.jsxs(Qt.Fragment,{children:[s.jsx(C,{to:E("Dynasty")+`?id=${n.id}`,className:"group relative",children:s.jsxs("div",{className:"w-32 h-32 rounded-2xl bg-[#1e3a5f] flex flex-col items-center justify-center group-hover:bg-[#c9a227] transition-colors shadow-lg p-4",children:[s.jsx(U,{className:"w-8 h-8 text-[#c9a227] group-hover:text-white transition-colors mb-2"}),s.jsx("p",{className:"text-xs font-semibold text-white text-center leading-tight",children:n.name}),s.jsx("p",{className:"text-[10px] text-white/70 mt-1",children:n.years})]})}),r<Ks.length-1&&s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"w-8 h-0.5 bg-[#c9a227]"}),s.jsx(te,{className:"w-5 h-5 text-[#c9a227] -ml-1"})]})]},n.id))})})]})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:Ks.map(n=>s.jsx(Pr,{...n},n.id))})})}),s.jsx("section",{className:"py-16 bg-[#1e3a5f]",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[s.jsx(Vs,{className:"w-12 h-12 text-[#c9a227] mx-auto mb-6"}),s.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:"Explorez les arbres généalogiques"}),s.jsx("p",{className:"text-white/70 mb-8",children:"Visualisez les liens de parenté entre les souverains et comprenez les successions dynastiques à travers les siècles."}),s.jsx(C,{to:E("FamilyTrees"),children:s.jsxs(z,{size:"lg",className:"bg-[#c9a227] hover:bg-[#a88620] rounded-full px-8",children:[s.jsx(Vs,{className:"w-5 h-5 mr-2"}),"Voir les arbres généalogiques"]})})]})})]})}const ru={capetiens:{id:"capetiens",name:"Capétiens directs",fullName:"Maison capétienne",years:"987 - 1328",startYear:"987",endYear:"1328",motto:"Montjoie Saint Denis !",origin:"Île-de-France",seat:"Paris",coat_of_arms:null,coverImage:"https://images.unsplash.com/photo-1569587112025-0d460e81a126?w=1200&q=80",summary:"Les Capétiens directs ont régné sur la France pendant 341 ans, de l'élection d'Hugues Capet en 987 à la mort de Charles IV en 1328. Ils ont transformé un petit royaume féodal en la première puissance d'Europe.",description:`La dynastie capétienne tire son nom de Hugues Capet, élu roi des Francs en 987. Issue des Robertiens, elle succède aux Carolingiens et pose les fondements du royaume de France moderne.

**Les origines**
Les Capétiens descendent de Robert le Fort, comte de Paris. Avant 987, ils alternent plusieurs fois sur le trône avec les Carolingiens. L'élection d'Hugues Capet marque cependant le début d'une succession ininterrompue de père en fils.

**L'affirmation du pouvoir royal**
Les premiers Capétiens ne contrôlent directement que l'Île-de-France. Progressivement, par les mariages, les héritages, les conquêtes et une politique habile, ils étendent le domaine royal jusqu'à en faire le plus vaste royaume d'Occident.

**L'apogée**
Sous Philippe Auguste (1180-1223) et Louis IX (1226-1270), le royaume atteint son apogée médiéval. La victoire de Bouvines (1214), les croisades de Saint Louis, le rayonnement culturel de Paris font de la France la première puissance européenne.

**La fin de la branche directe**
En 1328, Charles IV meurt sans héritier mâle. La couronne passe aux Valois, branche cadette des Capétiens. Mais toutes les dynasties qui régneront ensuite (Valois, Bourbons) descendent d'Hugues Capet.`,rulers:[{id:"hugues-capet",name:"Hugues Capet",years:"987-996",title:"Roi de France"},{id:"robert-ii",name:"Robert II le Pieux",years:"996-1031",title:"Roi de France"},{id:"henri-i",name:"Henri Ier",years:"1031-1060",title:"Roi de France"},{id:"philippe-i",name:"Philippe Ier",years:"1060-1108",title:"Roi de France"},{id:"louis-vi",name:"Louis VI le Gros",years:"1108-1137",title:"Roi de France"},{id:"louis-vii",name:"Louis VII",years:"1137-1180",title:"Roi de France"},{id:"philippe-auguste",name:"Philippe II Auguste",years:"1180-1223",title:"Roi de France"},{id:"louis-viii",name:"Louis VIII le Lion",years:"1223-1226",title:"Roi de France"},{id:"louis-ix",name:"Louis IX (Saint Louis)",years:"1226-1270",title:"Roi de France"},{id:"philippe-iii",name:"Philippe III le Hardi",years:"1270-1285",title:"Roi de France"},{id:"philippe-iv",name:"Philippe IV le Bel",years:"1285-1314",title:"Roi de France"},{id:"louis-x",name:"Louis X le Hutin",years:"1314-1316",title:"Roi de France"},{id:"jean-i",name:"Jean Ier le Posthume",years:"1316",title:"Roi de France"},{id:"philippe-v",name:"Philippe V le Long",years:"1316-1322",title:"Roi de France"},{id:"charles-iv",name:"Charles IV le Bel",years:"1322-1328",title:"Roi de France"}],keyEvents:[{year:"987",event:"Élection d'Hugues Capet"},{year:"1066",event:"Conquête de l'Angleterre par Guillaume"},{year:"1095",event:"Appel à la première croisade"},{year:"1163",event:"Début construction Notre-Dame"},{year:"1214",event:"Victoire de Bouvines"},{year:"1226-1270",event:"Règne de Saint Louis"},{year:"1285",event:"Avènement de Philippe le Bel"},{year:"1328",event:"Fin des Capétiens directs"}],battles:[{id:"bouvines",name:"Bataille de Bouvines",year:"1214",result:"victory"},{id:"mansourah",name:"Bataille de la Mansourah",year:"1250",result:"defeat"}],places:[{id:"saint-denis",name:"Basilique Saint-Denis",type:"abbey",location:"Saint-Denis"},{id:"reims",name:"Cathédrale de Reims",type:"cathedral",location:"Reims"},{id:"notre-dame",name:"Notre-Dame de Paris",type:"cathedral",location:"Paris"}],relatedDynasties:[{id:"carolingiens",name:"Carolingiens",relation:"Prédécesseurs"},{id:"valois",name:"Valois",relation:"Successeurs"}],stats:{duration:341,rulers:15,battles:45,territories:"France, parties de l'Espagne, de l'Italie"}}};function Iv(){const[e,t]=j.useState("overview"),r=new URLSearchParams(window.location.search).get("id")||"capetiens",l=ru[r]||ru.capetiens;return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsxs("section",{className:"relative py-24 lg:py-32 bg-gradient-to-br from-[#1e3a5f] to-[#2d5a87] overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`}})}),s.jsxs("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx(Ie,{items:[{label:"Dynasties",pageName:"Dynasties"},{label:l.name}],className:"mb-8 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"}),s.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-12",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx("div",{className:"w-48 h-48 lg:w-64 lg:h-64 rounded-2xl bg-[#c9a227]/20 flex items-center justify-center border-4 border-[#c9a227]/30",children:l.coat_of_arms?s.jsx("img",{src:l.coat_of_arms,alt:l.name,className:"w-full h-full object-contain p-4"}):s.jsx(U,{className:"w-24 h-24 text-[#c9a227]"})})}),s.jsxs("div",{className:"text-center lg:text-left",children:[s.jsxs("div",{className:"flex flex-wrap justify-center lg:justify-start gap-3 mb-4",children:[s.jsxs($,{className:"bg-[#c9a227] text-white",children:[s.jsx(le,{className:"w-3 h-3 mr-1"}),l.years]}),s.jsxs($,{variant:"outline",className:"border-white/30 text-white",children:[s.jsx(ke,{className:"w-3 h-3 mr-1"}),l.origin]}),s.jsxs($,{variant:"outline",className:"border-white/30 text-white",children:[s.jsx(ge,{className:"w-3 h-3 mr-1"}),l.stats.rulers," souverains"]})]}),s.jsx("h1",{className:"text-4xl lg:text-6xl font-bold text-white mb-4",children:l.name}),s.jsx("p",{className:"text-xl text-white/80 mb-6",children:l.fullName}),l.motto&&s.jsxs("div",{className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[#c9a227]/20 border border-[#c9a227]/30",children:[s.jsx(Ln,{className:"w-5 h-5 text-[#c9a227]"}),s.jsxs("span",{className:"text-[#c9a227] italic font-medium",children:["« ",l.motto," »"]})]}),s.jsxs("div",{className:"flex flex-wrap justify-center lg:justify-start gap-3 mt-8",children:[s.jsx(C,{to:E("FamilyTrees")+`?dynasty=${r}`,children:s.jsxs(z,{className:"bg-[#c9a227] hover:bg-[#a88620] rounded-full",children:[s.jsx(Vs,{className:"w-4 h-4 mr-2"}),"Arbre généalogique"]})}),s.jsxs(z,{variant:"outline",className:"border-white/30 text-white hover:bg-white/10 rounded-full",children:[s.jsx(_r,{className:"w-4 h-4 mr-2"}),"Partager"]})]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mt-16",children:[s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl p-6 text-center",children:[s.jsx("p",{className:"text-4xl font-bold text-white",children:l.stats.duration}),s.jsx("p",{className:"text-white/70 text-sm mt-1",children:"Années de règne"})]}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl p-6 text-center",children:[s.jsx("p",{className:"text-4xl font-bold text-white",children:l.stats.rulers}),s.jsx("p",{className:"text-white/70 text-sm mt-1",children:"Souverains"})]}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl p-6 text-center",children:[s.jsx("p",{className:"text-4xl font-bold text-white",children:l.stats.battles}),s.jsx("p",{className:"text-white/70 text-sm mt-1",children:"Batailles"})]}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl p-6 text-center",children:[s.jsx("p",{className:"text-4xl font-bold text-[#c9a227]",children:"341"}),s.jsx("p",{className:"text-white/70 text-sm mt-1",children:"Ans d'histoire"})]})]})]})]}),s.jsx("section",{className:"py-12 bg-[#f5f1e8]",children:s.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:s.jsx("p",{className:"text-xl text-gray-700 leading-relaxed",children:l.summary})})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs(Gs,{value:e,onValueChange:t,children:[s.jsxs(Xs,{className:"mb-8 bg-[#f5f1e8] p-1 rounded-xl",children:[s.jsx(Z,{value:"overview",className:"rounded-lg",children:"Vue d'ensemble"}),s.jsx(Z,{value:"rulers",className:"rounded-lg",children:"Souverains"}),s.jsx(Z,{value:"events",className:"rounded-lg",children:"Événements"}),s.jsx(Z,{value:"battles",className:"rounded-lg",children:"Batailles"}),s.jsx(Z,{value:"places",className:"rounded-lg",children:"Lieux"})]}),s.jsx(ee,{value:"overview",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsx("div",{className:"lg:col-span-2",children:s.jsx("div",{className:"prose prose-lg max-w-none whitespace-pre-line",children:l.description})}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-[#f5f1e8] rounded-2xl p-6",children:[s.jsxs("h3",{className:"font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(U,{className:"w-5 h-5 text-[#c9a227]"}),"Dynasties liées"]}),s.jsx("div",{className:"space-y-3",children:l.relatedDynasties.map(a=>s.jsxs(C,{to:E("Dynasty")+`?id=${a.id}`,className:"flex items-center justify-between p-3 bg-white rounded-lg hover:shadow-md transition-shadow",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-[#1e3a5f]",children:a.name}),s.jsx("p",{className:"text-sm text-gray-500",children:a.relation})]}),s.jsx(te,{className:"w-4 h-4 text-gray-400"})]},a.id))})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-amber-100 p-6",children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mb-4",children:"Souverains marquants"}),s.jsx("div",{className:"space-y-2",children:l.rulers.slice(0,4).map(a=>s.jsx(ft,{id:a.id,name:a.name,years:a.years,variant:"mini"},a.id))}),s.jsxs(z,{variant:"ghost",className:"w-full mt-4",onClick:()=>t("rulers"),children:["Voir tous les souverains",s.jsx(te,{className:"w-4 h-4 ml-2"})]})]})]})]})}),s.jsx(ee,{value:"rulers",children:s.jsx("div",{className:"space-y-4",children:l.rulers.map((a,i)=>s.jsxs(C,{to:E("Character")+`?id=${a.id}`,className:"group flex items-center gap-6 p-6 bg-white rounded-2xl border border-amber-100 hover:shadow-lg hover:border-[#c9a227] transition-all",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-[#1e3a5f] flex items-center justify-center text-white font-bold",children:i+1}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"text-xl font-bold text-[#1e3a5f] group-hover:text-[#c9a227] transition-colors",children:a.name}),s.jsx("p",{className:"text-gray-500",children:a.title})]}),s.jsx("div",{className:"text-right",children:s.jsx("p",{className:"text-[#c9a227] font-semibold",children:a.years})}),s.jsx(te,{className:"w-5 h-5 text-gray-300 group-hover:text-[#c9a227] transition-colors"})]},a.id))})}),s.jsx(ee,{value:"events",children:s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute left-8 top-0 bottom-0 w-1 bg-gradient-to-b from-[#c9a227] to-[#1e3a5f] rounded-full"}),s.jsx("div",{className:"space-y-6",children:l.keyEvents.map((a,i)=>s.jsxs("div",{className:"relative flex items-center gap-6 ml-2",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-[#c9a227] flex items-center justify-center text-white font-bold shadow-lg z-10",children:s.jsx(le,{className:"w-5 h-5"})}),s.jsxs("div",{className:"flex-1 bg-white rounded-xl p-6 border border-amber-100 shadow-sm",children:[s.jsx("p",{className:"text-[#c9a227] font-bold text-lg",children:a.year}),s.jsx("p",{className:"text-[#1e3a5f] font-medium mt-1",children:a.event})]})]},i))})]})}),s.jsx(ee,{value:"battles",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:l.battles.map(a=>s.jsx(qs,{...a,variant:"compact"},a.id))})}),s.jsx(ee,{value:"places",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:l.places.map(a=>s.jsxs(C,{to:E("Place")+`?id=${a.id}`,className:"group bg-white rounded-2xl border border-amber-100 p-6 hover:shadow-lg hover:border-emerald-300 transition-all",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-emerald-100 flex items-center justify-center mb-4",children:s.jsx(ke,{className:"w-6 h-6 text-emerald-600"})}),s.jsx("h3",{className:"font-bold text-[#1e3a5f] group-hover:text-emerald-600 transition-colors",children:a.name}),s.jsx("p",{className:"text-gray-500 text-sm",children:a.location})]},a.id))})})]})})}),s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Organization",name:l.name,alternateName:l.fullName,description:l.summary,foundingDate:l.startYear,dissolutionDate:l.endYear})}})]})}const al=[{id:"concile-clermont",name:"Concile de Clermont",date:"18-28 novembre 1095",year:1095,location:"Clermont",type:"religious",period:"high-middle-ages",summary:"Le pape Urbain II lance l'appel à la première croisade.",image:"https://images.unsplash.com/photo-1548013146-72479768bada?w=400&q=80"},{id:"sacre-charlemagne",name:"Sacre de Charlemagne",date:"25 décembre 800",year:800,location:"Rome",type:"political",period:"early-middle-ages",summary:"Charlemagne est couronné empereur par le pape Léon III.",image:"https://images.unsplash.com/photo-1564769610726-59cead6a6f8f?w=400&q=80"},{id:"traite-verdun",name:"Traité de Verdun",date:"Août 843",year:843,location:"Verdun",type:"political",period:"early-middle-ages",summary:"Partage de l'Empire carolingien entre les trois fils de Louis le Pieux.",image:"https://images.unsplash.com/photo-1461360370896-922624d12a74?w=400&q=80"},{id:"couronnement-hugues-capet",name:"Couronnement d'Hugues Capet",date:"3 juillet 987",year:987,location:"Senlis",type:"political",period:"early-middle-ages",summary:"Début de la dynastie capétienne qui règnera sur la France pendant plus de 800 ans.",image:"https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=400&q=80"},{id:"construction-notre-dame",name:"Construction de Notre-Dame de Paris",date:"1163",year:1163,location:"Paris",type:"building",period:"high-middle-ages",summary:"Début de la construction de la cathédrale Notre-Dame de Paris.",image:"https://images.unsplash.com/photo-1478391679764-b2d8b3cd1e94?w=400&q=80"},{id:"etats-generaux-1789",name:"États généraux de 1789",date:"5 mai 1789",year:1789,location:"Versailles",type:"political",period:"revolution-empire",summary:"Ouverture des États généraux, prélude à la Révolution française.",image:"https://images.unsplash.com/photo-1564769610726-59cead6a6f8f?w=400&q=80"},{id:"prise-bastille",name:"Prise de la Bastille",date:"14 juillet 1789",year:1789,location:"Paris",type:"revolution",period:"revolution-empire",summary:"Symbole de la Révolution française, la Bastille est prise par le peuple.",image:"https://images.unsplash.com/photo-1502602898657-3e91760cbb34?w=400&q=80"},{id:"edit-nantes",name:"Édit de Nantes",date:"13 avril 1598",year:1598,location:"Nantes",type:"political",period:"renaissance",summary:"Henri IV accorde la liberté de culte aux protestants, mettant fin aux guerres de Religion.",image:"https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400&q=80"}],lu=[{value:"political",label:"Politique"},{value:"religious",label:"Religieux"},{value:"building",label:"Construction"},{value:"revolution",label:"Révolution"},{value:"cultural",label:"Culturel"}],au=[{value:"early-middle-ages",label:"Haut Moyen Âge"},{value:"high-middle-ages",label:"Moyen Âge Central"},{value:"late-middle-ages",label:"Bas Moyen Âge"},{value:"renaissance",label:"Renaissance"},{value:"classical",label:"Époque Classique"},{value:"revolution-empire",label:"Révolution & Empire"},{value:"contemporary",label:"Époque Contemporaine"}];function Rv(){var m,x;const[e,t]=j.useState(""),[n,r]=j.useState("all"),[l,a]=j.useState("all"),[i,o]=j.useState("grid"),c=al.filter(f=>{const v=f.name.toLowerCase().includes(e.toLowerCase())||f.summary.toLowerCase().includes(e.toLowerCase()),w=n==="all"||f.type===n,g=l==="all"||f.period===l;return v&&w&&g}).sort((f,v)=>f.year-v.year),d={total:al.length,political:al.filter(f=>f.type==="political").length,religious:al.filter(f=>f.type==="religious").length},h=()=>{t(""),r("all"),a("all")},u=e||n!=="all"||l!=="all";return s.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-white to-[#f5f1e8]/30",children:[s.jsxs("section",{className:"bg-gradient-to-br from-[#1e3a5f] to-[#2d5a87] py-16 lg:py-24 relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx(mn,{className:"absolute right-10 top-10 w-64 h-64 text-white rotate-12"})}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:[s.jsx(Ie,{items:[{label:"Événements"}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-white [&_span]:text-white"}),s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl bg-white/10 flex items-center justify-center",children:s.jsx(mn,{className:"w-8 h-8 text-white"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-white",children:"Les Événements"}),s.jsxs("p",{className:"text-white/70 mt-1",children:[d.total," événements historiques"]})]})]}),s.jsx("p",{className:"text-xl text-white/80 max-w-3xl mt-6",children:"Du sacre de Charlemagne à la Révolution française, découvrez les événements majeurs qui ont façonné l'histoire de France."}),s.jsxs("div",{className:"flex flex-wrap gap-6 mt-8",children:[s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl px-6 py-4",children:[s.jsx("p",{className:"text-3xl font-bold text-white",children:d.political}),s.jsxs("p",{className:"text-sm text-white/70 flex items-center gap-1",children:[s.jsx(fs,{className:"w-4 h-4 text-blue-400"}),"Politiques"]})]}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl px-6 py-4",children:[s.jsx("p",{className:"text-3xl font-bold text-white",children:d.religious}),s.jsxs("p",{className:"text-sm text-white/70 flex items-center gap-1",children:[s.jsx(fs,{className:"w-4 h-4 text-purple-400"}),"Religieux"]})]}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl px-6 py-4",children:[s.jsx("p",{className:"text-3xl font-bold text-white",children:"1200+"}),s.jsx("p",{className:"text-sm text-white/70",children:"Années d'histoire"})]})]})]})]}),s.jsx("section",{className:"py-8 bg-white border-b border-gray-100 sticky top-16 lg:top-20 z-30",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(_t,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx(Ns,{placeholder:"Rechercher un événement...",value:e,onChange:f=>t(f.target.value),className:"pl-10 rounded-full border-gray-200"})]}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsxs(Ft,{value:n,onValueChange:r,children:[s.jsxs(Mt,{className:"w-36 rounded-full",children:[s.jsx(mn,{className:"w-4 h-4 mr-2 text-gray-400"}),s.jsx(At,{placeholder:"Type"})]}),s.jsxs(Tt,{children:[s.jsx(be,{value:"all",children:"Tous les types"}),lu.map(f=>s.jsx(be,{value:f.value,children:f.label},f.value))]})]}),s.jsxs(Ft,{value:l,onValueChange:a,children:[s.jsxs(Mt,{className:"w-44 rounded-full",children:[s.jsx(Zo,{className:"w-4 h-4 mr-2 text-gray-400"}),s.jsx(At,{placeholder:"Période"})]}),s.jsxs(Tt,{children:[s.jsx(be,{value:"all",children:"Toutes les périodes"}),au.map(f=>s.jsx(be,{value:f.value,children:f.label},f.value))]})]}),s.jsxs("div",{className:"flex items-center gap-1 bg-gray-100 rounded-full p-1",children:[s.jsx(z,{variant:i==="grid"?"default":"ghost",size:"icon",className:"rounded-full h-8 w-8",onClick:()=>o("grid"),children:s.jsx(ma,{className:"w-4 h-4"})}),s.jsx(z,{variant:i==="list"?"default":"ghost",size:"icon",className:"rounded-full h-8 w-8",onClick:()=>o("list"),children:s.jsx(ha,{className:"w-4 h-4"})})]})]})]}),u&&s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-4",children:[s.jsx("span",{className:"text-sm text-gray-500",children:"Filtres actifs :"}),e&&s.jsxs($,{variant:"secondary",className:"rounded-full",children:["Recherche : ",e]}),n!=="all"&&s.jsx($,{variant:"secondary",className:"rounded-full",children:(m=lu.find(f=>f.value===n))==null?void 0:m.label}),l!=="all"&&s.jsx($,{variant:"secondary",className:"rounded-full",children:(x=au.find(f=>f.value===l))==null?void 0:x.label}),s.jsx(z,{variant:"ghost",size:"sm",onClick:h,className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:"Effacer tout"})]})]})}),s.jsx("section",{className:"py-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:[c.length," événement",c.length>1?"s":""," trouvé",c.length>1?"s":""]}),c.length>0?s.jsx("div",{className:i==="grid"?"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:c.map(f=>s.jsx(sp,{...f,variant:i==="list"?"compact":"default"},f.id))}):s.jsxs("div",{className:"text-center py-16",children:[s.jsx(mn,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-600 mb-2",children:"Aucun événement trouvé"}),s.jsx("p",{className:"text-gray-500 mb-6",children:"Essayez de modifier vos critères de recherche"}),s.jsx(z,{onClick:h,variant:"outline",children:"Réinitialiser les filtres"})]})]})})]})}const iu={"concile-clermont":{id:"concile-clermont",name:"Concile de Clermont",date:"27 novembre 1095",year:"1095",type:"religious",location:"Clermont-Ferrand, Auvergne",image:"https://images.unsplash.com/photo-1569587112025-0d460e81a126?w=1200&q=80",period:{id:"high-middle-ages",name:"Moyen Âge Central"},summary:"Le pape Urbain II lance un appel à la croisade pour libérer Jérusalem.",description:`Le concile de Clermont est un concile de l'Église catholique qui se tint à Clermont du 18 au 28 novembre 1095. Il est célèbre pour l'appel à la première croisade lancé par le pape Urbain II.

**Le discours d'Urbain II**
Le 27 novembre 1095, devant une foule immense, le pape prononce un discours appelant les chrétiens à partir délivrer les Lieux saints.

**"Dieu le veut !"**
L'assemblée répond par le cri "Deus lo volt!" (Dieu le veut!). Les participants cousent une croix sur leur vêtement.`,significance:["Première croisade et prise de Jérusalem (1099)","Création des États latins d'Orient","Renforcement du pouvoir papal"],keyFigures:[{id:"urbain-ii",name:"Urbain II",title:"Pape",years:"1088-1099",role:"religious"}],relatedPlaces:[{id:"clermont",name:"Cathédrale de Clermont",type:"cathedral",location:"Clermont-Ferrand"}],relatedEvents:[{id:"prise-jerusalem",name:"Prise de Jérusalem",year:"1099"}],sources:["Foucher de Chartres, Historia Hierosolymitana"]}},ou={reign:{icon:U,color:"bg-[#c9a227]",label:"Règne"},religious:{icon:Td,color:"bg-indigo-600",label:"Religieux"},building:{icon:Td,color:"bg-emerald-600",label:"Construction"},event:{icon:Pn,color:"bg-blue-600",label:"Événement"},battle:{icon:Pn,color:"bg-red-600",label:"Bataille"}};function zv(){var a,i;const t=new URLSearchParams(window.location.search).get("id")||"concile-clermont",n=iu[t]||iu["concile-clermont"],r=ou[n.type]||ou.event,l=r.icon;return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsxs("section",{className:"relative h-[50vh] min-h-[400px] overflow-hidden",children:[s.jsx("img",{src:n.image,alt:n.name,className:"absolute inset-0 w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] via-[#1e3a5f]/60 to-[#1e3a5f]/20"}),s.jsxs("div",{className:"relative h-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col justify-end pb-12",children:[s.jsx(Ie,{items:[{label:"Chronologie",pageName:"Timeline"},{label:n.period.name,pageName:"Period",href:E("Period")+`?id=${n.period.id}`},{label:n.name}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"}),s.jsxs("div",{className:"flex flex-wrap gap-3 mb-4",children:[s.jsxs($,{className:`${r.color} text-white`,children:[s.jsx(l,{className:"w-3 h-3 mr-1"}),r.label]}),s.jsxs($,{variant:"outline",className:"border-white/30 text-white",children:[s.jsx(le,{className:"w-3 h-3 mr-1"}),n.date]}),s.jsxs($,{variant:"outline",className:"border-white/30 text-white",children:[s.jsx(ke,{className:"w-3 h-3 mr-1"}),n.location]})]}),s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-white mb-4",children:n.name})]})]}),s.jsx("section",{className:"py-12 bg-[#f5f1e8]",children:s.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:s.jsx("p",{className:"text-xl text-gray-700 leading-relaxed",children:n.summary})})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2",children:[s.jsxs("h2",{className:"text-2xl font-bold text-[#1e3a5f] mb-6 flex items-center gap-2",children:[s.jsx(xt,{className:"w-6 h-6 text-[#c9a227]"}),"Description"]}),s.jsx("div",{className:"prose prose-lg max-w-none whitespace-pre-line text-gray-700 mb-12",children:n.description}),s.jsxs("h2",{className:"text-2xl font-bold text-[#1e3a5f] mb-6 flex items-center gap-2",children:[s.jsx(Pn,{className:"w-6 h-6 text-[#c9a227]"}),"Importance historique"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-12",children:n.significance.map((o,c)=>s.jsxs("div",{className:"flex items-start gap-3 p-4 bg-[#f5f1e8] rounded-xl",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-[#c9a227]/20 flex items-center justify-center flex-shrink-0",children:s.jsx("span",{className:"text-[#c9a227] font-bold text-sm",children:c+1})}),s.jsx("p",{className:"text-gray-700",children:o})]},c))}),((a=n.keyFigures)==null?void 0:a.length)>0&&s.jsxs(s.Fragment,{children:[s.jsxs("h2",{className:"text-2xl font-bold text-[#1e3a5f] mb-6 flex items-center gap-2",children:[s.jsx(ge,{className:"w-6 h-6 text-[#c9a227]"}),"Personnages clés"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-12",children:n.keyFigures.map(o=>s.jsx(ft,{...o,variant:"compact"},o.id))})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-[#f5f1e8] rounded-2xl p-6",children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mb-4",children:"Informations"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wider",children:"Date"}),s.jsx("p",{className:"font-medium text-[#1e3a5f]",children:n.date})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wider",children:"Lieu"}),s.jsx("p",{className:"font-medium text-[#1e3a5f]",children:n.location})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wider",children:"Période"}),s.jsx(C,{to:E("Period")+`?id=${n.period.id}`,className:"font-medium text-[#1e3a5f] hover:text-[#c9a227]",children:n.period.name})]})]})]}),((i=n.sources)==null?void 0:i.length)>0&&s.jsxs("div",{className:"bg-white rounded-2xl border border-amber-100 p-6",children:[s.jsxs("h3",{className:"font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(Kg,{className:"w-4 h-4 text-[#c9a227]"}),"Sources"]}),s.jsx("ul",{className:"space-y-2 text-sm text-gray-600",children:n.sources.map((o,c)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-[#c9a227]",children:"•"}),o]},c))})]}),s.jsx(Ws,{slot:"event-sidebar",className:"mb-6"}),s.jsx(Et,{variant:"sidebar",category:"books"})]})]})})}),s.jsx("section",{className:"py-8 bg-[#f5f1e8]",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:s.jsx(C,{to:E("Timeline"),children:s.jsxs(z,{variant:"outline",className:"rounded-full",children:[s.jsx(Oh,{className:"w-4 h-4 mr-2"}),"Retour à la chronologie"]})})})})]})}const cu=[{id:"all",name:"Toutes les époques",year:null},{id:"481",name:"Royaume des Francs (481)",year:481},{id:"843",name:"Traité de Verdun (843)",year:843},{id:"987",name:"Avènement Capétiens (987)",year:987},{id:"1180",name:"Règne Philippe Auguste (1180)",year:1180},{id:"1223",name:"Après Bouvines (1223)",year:1223},{id:"1453",name:"Fin Guerre Cent Ans (1453)",year:1453},{id:"1610",name:"Mort Henri IV (1610)",year:1610},{id:"1715",name:"Mort Louis XIV (1715)",year:1715},{id:"1789",name:"Révolution (1789)",year:1789},{id:"1812",name:"Empire Napoléonien (1812)",year:1812}],du=[{id:"places",name:"Châteaux & Lieux",icon:Fe,color:"bg-emerald-500"},{id:"battles",name:"Batailles",icon:ce,color:"bg-red-500"},{id:"capitals",name:"Capitales",icon:U,color:"bg-[#c9a227]"}],Fv=[{id:"paris",name:"Paris",type:"capital",x:48,y:34,period:"all"},{id:"versailles",name:"Versailles",type:"places",x:46,y:35,period:"1610"},{id:"reims",name:"Reims",type:"places",x:54,y:30,period:"all"},{id:"orleans",name:"Orléans",type:"places",x:42,y:42,period:"all"},{id:"chambord",name:"Chambord",type:"places",x:40,y:44,period:"1453"},{id:"carcassonne",name:"Carcassonne",type:"places",x:45,y:74,period:"all"},{id:"mont-saint-michel",name:"Mont-Saint-Michel",type:"places",x:26,y:40,period:"all"},{id:"bouvines",name:"Bouvines",type:"battles",x:52,y:24,period:"1180"},{id:"azincourt",name:"Azincourt",type:"battles",x:44,y:24,period:"1223"},{id:"crecy",name:"Crécy",type:"battles",x:44,y:28,period:"1223"},{id:"poitiers",name:"Poitiers",type:"battles",x:34,y:54,period:"481"},{id:"austerlitz",name:"Austerlitz",type:"battles",x:82,y:32,period:"1789"},{id:"waterloo",name:"Waterloo",type:"battles",x:54,y:18,period:"1789"},{id:"aix-la-chapelle",name:"Aix-la-Chapelle",type:"capitals",x:68,y:22,period:"843"},{id:"lyon",name:"Lyon",type:"places",x:58,y:54,period:"all"},{id:"avignon",name:"Avignon",type:"places",x:58,y:66,period:"987"},{id:"bordeaux",name:"Bordeaux",type:"places",x:30,y:62,period:"all"},{id:"marseille",name:"Marseille",type:"places",x:62,y:72,period:"all"},{id:"strasbourg",name:"Strasbourg",type:"places",x:70,y:36,period:"1610"},{id:"toulouse",name:"Toulouse",type:"places",x:40,y:72,period:"all"},{id:"nantes",name:"Nantes",type:"places",x:24,y:50,period:"all"},{id:"rouen",name:"Rouen",type:"places",x:40,y:30,period:"all"}],uu=[{id:"ile-de-france",name:"Île-de-France",x:48,y:36,count:45},{id:"normandie",name:"Normandie",x:34,y:32,count:28},{id:"bretagne",name:"Bretagne",x:22,y:42,count:22},{id:"loire",name:"Val de Loire",x:38,y:48,count:38},{id:"bourgogne",name:"Bourgogne",x:58,y:48,count:19},{id:"provence",name:"Provence",x:62,y:70,count:24},{id:"aquitaine",name:"Aquitaine",x:30,y:62,count:31},{id:"occitanie",name:"Occitanie",x:46,y:72,count:26},{id:"alsace",name:"Alsace",x:70,y:38,count:15},{id:"champagne",name:"Champagne",x:56,y:34,count:18}];function Mv(){var m;const[e,t]=j.useState("all"),[n,r]=j.useState(["places","battles","capitals"]),[l,a]=j.useState(null),[i,o]=j.useState(1),c=x=>{r(f=>f.includes(x)?f.filter(v=>v!==x):[...f,x])},d=Fv.filter(x=>{const f=e==="all"||x.period==="all"||x.period===e,v=n.includes(x.type);return f&&v}),h=x=>{switch(x){case"battles":return ce;case"capitals":return U;default:return Fe}},u=x=>{switch(x){case"battles":return"bg-red-500";case"capitals":return"bg-[#c9a227]";default:return"bg-emerald-500"}};return s.jsxs("div",{className:"min-h-screen bg-[#f5f1e8]",children:[s.jsx("section",{className:"bg-[#1e3a5f] py-12 lg:py-16",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx(Ie,{items:[{label:"Cartes interactives"}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"}),s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#c9a227]/20 flex items-center justify-center",children:s.jsx(Ul,{className:"w-7 h-7 text-[#c9a227]"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl lg:text-4xl font-bold text-white",children:"Cartes Interactives"}),s.jsx("p",{className:"text-white/70 mt-1",children:"Explorez l'histoire de France à travers les cartes"})]})]})]})}),s.jsx("section",{className:"py-8",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[s.jsxs("div",{className:"lg:col-span-1 space-y-6",children:[s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm",children:[s.jsxs("h3",{className:"font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(le,{className:"w-5 h-5 text-[#c9a227]"}),"Période historique"]}),s.jsxs(Ft,{value:e,onValueChange:t,children:[s.jsx(Mt,{className:"w-full",children:s.jsx(At,{placeholder:"Choisir une époque"})}),s.jsx(Tt,{children:cu.map(x=>s.jsx(be,{value:x.id,children:x.name},x.id))})]}),e!=="all"&&s.jsxs("p",{className:"text-sm text-gray-500 mt-3",children:["Affichage des frontières et lieux pour l'année ",(m=cu.find(x=>x.id===e))==null?void 0:m.year]})]}),s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm",children:[s.jsxs("h3",{className:"font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(Qi,{className:"w-5 h-5 text-[#c9a227]"}),"Calques"]}),s.jsx("div",{className:"space-y-3",children:du.map(x=>{const f=x.icon,v=n.includes(x.id);return s.jsxs("button",{onClick:()=>c(x.id),className:k("w-full flex items-center gap-3 p-3 rounded-xl transition-all",v?"bg-[#f5f1e8] border-2 border-[#c9a227]":"bg-gray-50 border-2 border-transparent hover:bg-gray-100"),children:[s.jsx("div",{className:k("w-8 h-8 rounded-lg flex items-center justify-center",x.color),children:s.jsx(f,{className:"w-4 h-4 text-white"})}),s.jsx("span",{className:k("font-medium",v?"text-[#1e3a5f]":"text-gray-500"),children:x.name}),v&&s.jsx($,{className:"ml-auto bg-[#c9a227] text-white",children:d.filter(w=>w.type===x.id).length})]},x.id)})})]}),s.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm",children:[s.jsxs("h3",{className:"font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(ke,{className:"w-5 h-5 text-[#c9a227]"}),"Explorer par région"]}),s.jsx("div",{className:"space-y-2",children:uu.slice(0,5).map(x=>s.jsxs(C,{to:E("Places")+`?region=${x.name}`,className:"flex items-center justify-between p-3 rounded-lg hover:bg-[#f5f1e8] transition-colors group",children:[s.jsx("span",{className:"text-sm text-[#1e3a5f] group-hover:text-[#c9a227]",children:x.name}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-gray-500",children:[x.count," lieux"]}),s.jsx(Xt,{className:"w-4 h-4 text-gray-300 group-hover:text-[#c9a227]"})]})]},x.id))})]})]}),s.jsxs("div",{className:"lg:col-span-3",children:[s.jsxs("div",{className:"bg-white rounded-2xl shadow-sm overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-100",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(z,{variant:"outline",size:"icon",onClick:()=>o(Math.min(i+.2,2)),className:"rounded-lg",children:s.jsx(Hh,{className:"w-4 h-4"})}),s.jsx(z,{variant:"outline",size:"icon",onClick:()=>o(Math.max(i-.2,.6)),className:"rounded-lg",children:s.jsx(Uh,{className:"w-4 h-4"})}),s.jsxs("span",{className:"text-sm text-gray-500 ml-2",children:[Math.round(i*100),"%"]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[s.jsx($h,{className:"w-4 h-4"}),"Cliquez sur un marqueur pour plus de détails"]})]}),s.jsxs("div",{className:"relative aspect-[4/3] bg-gradient-to-br from-[#e8f4f8] to-[#d4e8f0] overflow-hidden",style:{transform:`scale(${i})`,transformOrigin:"center center"},children:[s.jsxs("svg",{viewBox:"0 0 100 100",className:"absolute inset-0 w-full h-full",preserveAspectRatio:"xMidYMid meet",children:[s.jsx("path",{d:"M42.5,8 L44,8.5 L46,9 L48,8.5 L50,9 L52,10 L54,11 L56,11.5 L58,12 L60,13 L62,14 L64,15 L66,16 L67,17.5 L68,19 L69,21 L70,23 L70.5,25 L71,27 L71.5,29 L72,31 L72,33 L71.5,35 L71,37 L70.5,38.5 L70,40 L70.5,42 L71,44 L72,46 L73,48 L74,50 L75,52 L75.5,54 L76,56 L76,58 L75.5,60 L75,62 L74,64 L73,66 L72,67.5 L70,69 L68,70 L66,71 L64,72 L62,73 L60,74 L58,74.5 L56,75 L54,76 L52,77 L50,78 L48,78.5 L46,79 L44,79 L42,78.5 L40,78 L38,78.5 L36,79 L34,80 L32,80.5 L30,80 L28,79 L26,78 L24.5,76 L24,74 L23.5,72 L23,70 L22,68 L21,66 L20,64 L19,62 L18.5,60 L18,58 L17.5,56 L17,54 L16.5,52 L16,50 L15.5,48 L15,46 L15,44 L15.5,42 L16,40 L17,38 L18,36 L19,34 L20,33 L21,32 L22,30 L21,28 L20,26 L19.5,24 L20,22 L21,20 L22,19 L24,18 L26,17 L28,16 L29,14.5 L30,13 L32,12 L34,11 L35,10 L36,9 L38,8.5 L40,8 L42.5,8 Z",fill:"#f5f1e8",stroke:"#1e3a5f",strokeWidth:"0.5",className:"drop-shadow-md"}),s.jsx("path",{d:"M78,75 L79,76 L80,78 L80.5,80 L81,82 L81,84 L80.5,86 L80,87 L79,88 L78,88.5 L77,88 L76.5,86 L76,84 L76,82 L76.5,80 L77,78 L77.5,76 L78,75 Z",fill:"#f5f1e8",stroke:"#1e3a5f",strokeWidth:"0.4",className:"drop-shadow-md"}),s.jsx("path",{d:"M30,35 Q35,34 40,35 Q44,36 48,34 Q50,33 52,34",fill:"none",stroke:"#60a5fa",strokeWidth:"0.6",strokeLinecap:"round"}),s.jsx("path",{d:"M18,48 Q25,46 32,47 Q40,48 48,46 Q52,45 56,46",fill:"none",stroke:"#60a5fa",strokeWidth:"0.7",strokeLinecap:"round"}),s.jsx("path",{d:"M28,78 Q32,74 36,70 Q40,66 44,64",fill:"none",stroke:"#60a5fa",strokeWidth:"0.5",strokeLinecap:"round"}),s.jsx("path",{d:"M58,46 Q60,50 62,54 Q64,60 66,66 Q68,70 70,74",fill:"none",stroke:"#60a5fa",strokeWidth:"0.6",strokeLinecap:"round"}),s.jsx("path",{d:"M72,28 Q71,32 70,36 Q70,40 71,44",fill:"none",stroke:"#60a5fa",strokeWidth:"0.5",strokeLinecap:"round"}),uu.map(x=>s.jsxs("g",{children:[s.jsx("circle",{cx:x.x,cy:x.y,r:"1.5",fill:"#c9a227",fillOpacity:"0.3"}),s.jsx("text",{x:x.x,y:x.y+4,textAnchor:"middle",className:"text-[2.5px] fill-gray-500 font-medium",children:x.name})]},x.id))]}),d.map(x=>{const f=h(x.type),v=u(x.type),w=(l==null?void 0:l.id)===x.id;return s.jsxs("button",{onClick:()=>a(w?null:x),className:k("absolute transform -translate-x-1/2 -translate-y-1/2 transition-all duration-200 z-10",w&&"z-20 scale-125"),style:{left:`${x.x}%`,top:`${x.y}%`},children:[s.jsx("div",{className:k("w-8 h-8 rounded-full flex items-center justify-center shadow-lg border-2 border-white",v,"hover:scale-110 transition-transform"),children:s.jsx(f,{className:"w-4 h-4 text-white"})}),s.jsxs("div",{className:k("absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-3 py-2 bg-[#1e3a5f] text-white text-xs rounded-lg whitespace-nowrap transition-all",w?"opacity-100 visible":"opacity-0 invisible"),children:[x.name,s.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 border-4 border-transparent border-t-[#1e3a5f]"})]})]},x.id)})]}),l&&s.jsx("div",{className:"p-6 border-t border-gray-100 bg-[#f5f1e8]",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:k("w-12 h-12 rounded-xl flex items-center justify-center",u(l.type)),children:Qt.createElement(h(l.type),{className:"w-6 h-6 text-white"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-bold text-[#1e3a5f]",children:l.name}),s.jsx("p",{className:"text-sm text-gray-500",children:l.type==="battles"?"Bataille":l.type==="capitals"?"Capitale":"Lieu historique"})]})]}),s.jsx(C,{to:E(l.type==="battles"?"Battle":"Place")+`?id=${l.id}`,children:s.jsxs(z,{className:"bg-[#1e3a5f] hover:bg-[#2d5a87] rounded-full",children:["Voir les détails",s.jsx(Xt,{className:"w-4 h-4 ml-2"})]})})]})})]}),s.jsxs("div",{className:"mt-6 bg-white rounded-2xl p-6 shadow-sm",children:[s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mb-4",children:"Légende"}),s.jsxs("div",{className:"flex flex-wrap gap-6",children:[du.map(x=>{const f=x.icon;return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:k("w-6 h-6 rounded-full flex items-center justify-center",x.color),children:s.jsx(f,{className:"w-3 h-3 text-white"})}),s.jsx("span",{className:"text-sm text-gray-600",children:x.name})]},x.id)}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-6 h-1 bg-[#93c5fd] rounded-full"}),s.jsx("span",{className:"text-sm text-gray-600",children:"Fleuves"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-6 h-6 rounded bg-[#f5f1e8] border border-[#1e3a5f]"}),s.jsx("span",{className:"text-sm text-gray-600",children:"Territoire français"})]})]})]})]})]})})}),s.jsx("section",{className:"py-16 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("h2",{className:"text-2xl font-bold text-[#1e3a5f] mb-8 flex items-center gap-2",children:[s.jsx(Ul,{className:"w-6 h-6 text-[#c9a227]"}),"Cartes historiques"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[{title:"La Gaule romaine",year:"50 av. J.-C.",image:"https://images.unsplash.com/photo-1524661135-423995f22d0b?w=400&q=80"},{title:"Le Royaume des Francs",year:"481",image:"https://images.unsplash.com/photo-1569587112025-0d460e81a126?w=400&q=80"},{title:"L'Empire carolingien",year:"814",image:"https://images.unsplash.com/photo-1590674899484-d5640e854abe?w=400&q=80"},{title:"La France de Philippe Auguste",year:"1223",image:"https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400&q=80"},{title:"La France de Louis XIV",year:"1715",image:"https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?w=400&q=80"},{title:"L'Empire napoléonien",year:"1812",image:"https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=400&q=80"}].map((x,f)=>s.jsxs("div",{className:"group relative aspect-[4/3] rounded-2xl overflow-hidden shadow-lg cursor-pointer",children:[s.jsx("img",{src:x.image,alt:x.title,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] via-transparent to-transparent"}),s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-6",children:[s.jsx($,{className:"bg-[#c9a227] text-white mb-2",children:x.year}),s.jsx("h3",{className:"text-lg font-bold text-white group-hover:text-[#c9a227] transition-colors",children:x.title})]})]},f))})]})})]})}const il={characters:[{id:"charlemagne",name:"Charlemagne",title:"Empereur d'Occident",years:"742-814",dynasty:"Carolingiens",role:"king"},{id:"philippe-auguste",name:"Philippe II Auguste",title:"Roi de France",years:"1165-1223",dynasty:"Capétiens",role:"king"},{id:"louis-xiv",name:"Louis XIV",title:"Le Roi Soleil",years:"1638-1715",dynasty:"Bourbons",role:"king"},{id:"napoleon",name:"Napoléon Ier",title:"Empereur des Français",years:"1769-1821",dynasty:"Napoléonides",role:"military"},{id:"jeanne-darc",name:"Jeanne d'Arc",title:"La Pucelle d'Orléans",years:"1412-1431",role:"military"},{id:"clovis",name:"Clovis Ier",title:"Roi des Francs",years:"466-511",dynasty:"Mérovingiens",role:"king"}],battles:[{id:"bouvines",name:"Bataille de Bouvines",date:"1214",location:"Bouvines",result:"victory"},{id:"austerlitz",name:"Bataille d'Austerlitz",date:"1805",location:"Austerlitz",result:"victory"},{id:"azincourt",name:"Bataille d'Azincourt",date:"1415",location:"Azincourt",result:"defeat"},{id:"marignan",name:"Bataille de Marignan",date:"1515",location:"Marignan",result:"victory"}],places:[{id:"versailles",name:"Château de Versailles",type:"palace",location:"Versailles",region:"Île-de-France"},{id:"chambord",name:"Château de Chambord",type:"castle",location:"Chambord",region:"Centre-Val de Loire"},{id:"notre-dame",name:"Notre-Dame de Paris",type:"cathedral",location:"Paris",region:"Île-de-France"},{id:"mont-saint-michel",name:"Mont-Saint-Michel",type:"abbey",location:"Mont-Saint-Michel",region:"Normandie"}],dynasties:[{id:"capetiens",name:"Capétiens",years:"987 - 1328",rulerCount:15},{id:"bourbons",name:"Bourbons",years:"1589 - 1792",rulerCount:7},{id:"carolingiens",name:"Carolingiens",years:"751 - 987",rulerCount:12}]},Av=["Louis XIV","Napoléon","Versailles","Bouvines","Jeanne d'Arc","Charlemagne","Révolution","Capétiens"];function Tv(){const[e,t]=j.useState(""),[n,r]=j.useState("all"),[l,a]=j.useState(!1);Qt.useEffect(()=>{const m=new URLSearchParams(window.location.search).get("q");m&&(t(m),a(!0))},[]);const i=u=>{const m=u||e;m.trim()&&(t(m),a(!0),window.history.replaceState({},"",`${window.location.pathname}?q=${encodeURIComponent(m)}`))},o=()=>{t(""),a(!1),window.history.replaceState({},"",window.location.pathname)},c=(u,m)=>{if(!e.trim())return u;const x=e.toLowerCase();return u.filter(f=>m.some(v=>{var w;return(w=f[v])==null?void 0:w.toLowerCase().includes(x)}))},d={characters:c(il.characters,["name","title","dynasty"]),battles:c(il.battles,["name","location"]),places:c(il.places,["name","location","region"]),dynasties:c(il.dynasties,["name"])},h=d.characters.length+d.battles.length+d.places.length+d.dynasties.length;return s.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-[#f5f1e8] to-white",children:[s.jsx("section",{className:"bg-[#1e3a5f] py-16 lg:py-24",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx(Ie,{items:[{label:"Recherche"}],className:"mb-8 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-3xl lg:text-4xl font-bold text-white mb-4",children:"Rechercher dans l'Histoire de France"}),s.jsx("p",{className:"text-white/70",children:"Personnages, batailles, lieux, dynasties, événements..."})]}),s.jsxs("div",{className:"relative",children:[s.jsx(_t,{className:"absolute left-5 top-1/2 -translate-y-1/2 w-6 h-6 text-gray-400"}),s.jsx(Ns,{type:"text",placeholder:"Rechercher un personnage, une bataille, un lieu...",value:e,onChange:u=>t(u.target.value),onKeyDown:u=>u.key==="Enter"&&i(),className:"w-full h-16 pl-14 pr-32 text-lg rounded-2xl border-0 shadow-2xl focus-visible:ring-[#c9a227]"}),e&&s.jsx("button",{onClick:o,className:"absolute right-28 top-1/2 -translate-y-1/2 p-2 hover:bg-gray-100 rounded-full",children:s.jsx(pa,{className:"w-5 h-5 text-gray-400"})}),s.jsx(z,{onClick:()=>i(),className:"absolute right-2 top-1/2 -translate-y-1/2 h-12 px-6 bg-[#c9a227] hover:bg-[#a88620] rounded-xl",children:"Rechercher"})]}),!l&&s.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[s.jsx("span",{className:"text-white/50 text-sm",children:"Recherches populaires :"}),Av.map(u=>s.jsx("button",{onClick:()=>i(u),className:"px-3 py-1 rounded-full bg-white/10 text-white/80 text-sm hover:bg-white/20 transition-colors",children:u},u))]})]})}),s.jsx("section",{className:"py-12",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:l?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-8",children:s.jsxs("p",{className:"text-gray-600",children:[s.jsx("span",{className:"font-semibold text-[#1e3a5f]",children:h})," résultat",h>1?"s":""," pour",s.jsxs("span",{className:"font-semibold text-[#c9a227]",children:[' "',e,'"']})]})}),h>0?s.jsxs(Gs,{value:n,onValueChange:r,children:[s.jsxs(Xs,{className:"mb-8 bg-white p-1 rounded-xl shadow-sm",children:[s.jsxs(Z,{value:"all",className:"rounded-lg",children:["Tout (",h,")"]}),s.jsxs(Z,{value:"characters",className:"rounded-lg",children:[s.jsx(ge,{className:"w-4 h-4 mr-2"}),"Personnages (",d.characters.length,")"]}),s.jsxs(Z,{value:"battles",className:"rounded-lg",children:[s.jsx(ce,{className:"w-4 h-4 mr-2"}),"Batailles (",d.battles.length,")"]}),s.jsxs(Z,{value:"places",className:"rounded-lg",children:[s.jsx(Fe,{className:"w-4 h-4 mr-2"}),"Lieux (",d.places.length,")"]}),s.jsxs(Z,{value:"dynasties",className:"rounded-lg",children:[s.jsx(U,{className:"w-4 h-4 mr-2"}),"Dynasties (",d.dynasties.length,")"]})]}),s.jsxs(ee,{value:"all",className:"space-y-8",children:[d.characters.length>0&&s.jsxs("div",{children:[s.jsxs("h3",{className:"text-lg font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(ge,{className:"w-5 h-5 text-[#c9a227]"}),"Personnages"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.characters.slice(0,3).map(u=>s.jsx(ft,{...u,variant:"compact"},u.id))}),d.characters.length>3&&s.jsxs(z,{variant:"ghost",className:"mt-4",onClick:()=>r("characters"),children:["Voir tous les personnages (",d.characters.length,")",s.jsx(te,{className:"w-4 h-4 ml-2"})]})]}),d.battles.length>0&&s.jsxs("div",{children:[s.jsxs("h3",{className:"text-lg font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(ce,{className:"w-5 h-5 text-red-600"}),"Batailles"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:d.battles.slice(0,2).map(u=>s.jsx(qs,{...u,variant:"compact"},u.id))})]}),d.places.length>0&&s.jsxs("div",{children:[s.jsxs("h3",{className:"text-lg font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(Fe,{className:"w-5 h-5 text-emerald-600"}),"Lieux"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:d.places.slice(0,2).map(u=>s.jsx(Bs,{...u,variant:"compact"},u.id))})]}),d.dynasties.length>0&&s.jsxs("div",{children:[s.jsxs("h3",{className:"text-lg font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(U,{className:"w-5 h-5 text-[#c9a227]"}),"Dynasties"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:d.dynasties.map(u=>s.jsx(Pr,{...u,variant:"compact"},u.id))})]})]}),s.jsx(ee,{value:"characters",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:d.characters.map(u=>s.jsx(ft,{...u},u.id))})}),s.jsx(ee,{value:"battles",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:d.battles.map(u=>s.jsx(qs,{...u},u.id))})}),s.jsx(ee,{value:"places",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:d.places.map(u=>s.jsx(Bs,{...u},u.id))})}),s.jsx(ee,{value:"dynasties",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:d.dynasties.map(u=>s.jsx(Pr,{...u},u.id))})})]}):s.jsxs("div",{className:"text-center py-16",children:[s.jsx(_t,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-600 mb-2",children:"Aucun résultat trouvé"}),s.jsx("p",{className:"text-gray-500 mb-6",children:"Essayez avec d'autres termes de recherche"}),s.jsx(z,{onClick:o,variant:"outline",children:"Nouvelle recherche"})]})]}):s.jsxs("div",{className:"text-center py-8",children:[s.jsx(Ln,{className:"w-12 h-12 text-[#c9a227] mx-auto mb-4"}),s.jsx("h2",{className:"text-2xl font-bold text-[#1e3a5f] mb-4",children:"Explorer par catégorie"}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 max-w-2xl mx-auto",children:[{label:"Personnages",icon:ge,page:"Characters",count:"500+"},{label:"Batailles",icon:ce,page:"Battles",count:"200+"},{label:"Lieux",icon:Fe,page:"Places",count:"150+"},{label:"Dynasties",icon:U,page:"Dynasties",count:"6"}].map(u=>{const m=u.icon;return s.jsxs(C,{to:E(u.page),className:"group p-6 bg-white rounded-2xl shadow-sm hover:shadow-lg transition-all border border-amber-100 hover:border-[#c9a227]",children:[s.jsx(m,{className:"w-8 h-8 text-[#c9a227] mx-auto mb-3"}),s.jsx("p",{className:"font-semibold text-[#1e3a5f] group-hover:text-[#c9a227]",children:u.label}),s.jsx("p",{className:"text-sm text-gray-500",children:u.count})]},u.page)})})]})})})]})}const _v=[{id:"all",name:"Tout",icon:Lr},{id:"books",name:"Livres",icon:xt},{id:"replicas",name:"Répliques",icon:ce},{id:"maps",name:"Cartes",icon:ke},{id:"decorations",name:"Décoration",icon:U}],Ja=[{id:1,category:"books",title:"Histoire de France",author:"Jules Michelet",price:24.9,originalPrice:29.9,rating:4.8,reviews:342,image:"https://images.unsplash.com/photo-1544947950-fa07a98d237f?w=400&q=80",badge:"Bestseller",period:"Général"},{id:2,category:"books",title:"Les Rois de France",author:"Georges Bordonove",price:19.9,rating:4.6,reviews:189,image:"https://images.unsplash.com/photo-1512820790803-83ca734da794?w=400&q=80",period:"Moyen Âge"},{id:3,category:"books",title:"La Révolution française",author:"François Furet",price:29.9,rating:4.9,reviews:456,image:"https://images.unsplash.com/photo-1543002588-bfa74002ed7e?w=400&q=80",badge:"Recommandé",period:"Révolution"},{id:4,category:"books",title:"Napoléon Bonaparte",author:"Jean Tulard",price:32,rating:4.7,reviews:278,image:"https://images.unsplash.com/photo-1589829085413-56de8ae18c73?w=400&q=80",period:"Empire"},{id:5,category:"books",title:"Saint Louis",author:"Jacques Le Goff",price:26.5,rating:4.8,reviews:167,image:"https://images.unsplash.com/photo-1476275466078-4007374efbbe?w=400&q=80",period:"Moyen Âge"},{id:6,category:"books",title:"Les Capétiens",author:"Ivan Gobry",price:35,rating:4.5,reviews:98,image:"https://images.unsplash.com/photo-1497633762265-9d179a990aa6?w=400&q=80",period:"Moyen Âge"},{id:7,category:"replicas",title:"Épée médiévale décorative",price:89,rating:4.7,reviews:156,image:"https://images.unsplash.com/photo-1599508704512-2f19efd1e35f?w=400&q=80",badge:"Populaire",period:"Moyen Âge"},{id:8,category:"replicas",title:"Casque de chevalier",price:145,rating:4.6,reviews:89,image:"https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=400&q=80",period:"Moyen Âge"},{id:9,category:"replicas",title:"Bouclier fleur de lys",price:120,rating:4.8,reviews:67,image:"https://images.unsplash.com/photo-1569587112025-0d460e81a126?w=400&q=80",period:"Moyen Âge"},{id:10,category:"replicas",title:"Bicorne napoléonien",price:75,rating:4.4,reviews:45,image:"https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?w=400&q=80",period:"Empire"},{id:11,category:"maps",title:"Carte ancienne de France 1780",price:45,rating:4.5,reviews:234,image:"https://images.unsplash.com/photo-1524661135-423995f22d0b?w=400&q=80",period:"Ancien Régime"},{id:12,category:"maps",title:"Plan de Paris médiéval",price:35,rating:4.7,reviews:178,image:"https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=400&q=80",period:"Moyen Âge"},{id:13,category:"maps",title:"Carte Empire napoléonien",price:55,rating:4.6,reviews:123,image:"https://images.unsplash.com/photo-1590674899484-d5640e854abe?w=400&q=80",badge:"Nouveau",period:"Empire"},{id:14,category:"decorations",title:"Tapisserie médiévale reproduction",price:189,originalPrice:229,rating:4.9,reviews:87,image:"https://images.unsplash.com/photo-1513519245088-0e12902e5a38?w=400&q=80",badge:"-17%",period:"Moyen Âge"},{id:15,category:"decorations",title:"Blason héraldique personnalisé",price:79,rating:4.8,reviews:156,image:"https://images.unsplash.com/photo-1578301978693-85fa9c0320b9?w=400&q=80",period:"Général"},{id:16,category:"decorations",title:"Statue Louis XIV miniature",price:65,rating:4.5,reviews:98,image:"https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?w=400&q=80",period:"Ancien Régime"}],Dv=[{id:"middle-ages",name:"Collection Moyen Âge",count:45,image:"https://images.unsplash.com/photo-1569587112025-0d460e81a126?w=600&q=80"},{id:"revolution",name:"Collection Révolution",count:28,image:"https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=600&q=80"},{id:"napoleon",name:"Collection Napoléon",count:32,image:"https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?w=600&q=80"}];function Ov(){const[e,t]=j.useState(""),[n,r]=j.useState("all"),[l,a]=j.useState([]),i=Ja.filter(d=>{const h=d.title.toLowerCase().includes(e.toLowerCase())||d.author&&d.author.toLowerCase().includes(e.toLowerCase()),u=n==="all"||d.category===n;return h&&u}),o=d=>{a(h=>h.includes(d)?h.filter(u=>u!==d):[...h,d])},c=d=>d!=null&&d.includes("%")?"bg-red-500":d==="Bestseller"?"bg-[#c9a227]":d==="Nouveau"?"bg-emerald-500":"bg-[#1e3a5f]";return s.jsxs("div",{className:"min-h-screen bg-[#f5f1e8]",children:[s.jsxs("section",{className:"bg-gradient-to-br from-[#1e3a5f] to-[#2d5a87] py-16 lg:py-24 relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 opacity-10",children:s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`}})}),s.jsxs("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx(Ie,{items:[{label:"Boutique"}],className:"mb-8 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"}),s.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-[#c9a227]/20 rounded-full text-[#c9a227] font-medium mb-6",children:[s.jsx(Lr,{className:"w-5 h-5"}),"Boutique Histoire de France"]}),s.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-white mb-4",children:"Livres, Objets & Reproductions"}),s.jsx("p",{className:"text-xl text-white/70 mb-8",children:"Découvrez notre sélection de produits pour les passionnés d'histoire"}),s.jsxs("div",{className:"relative max-w-xl mx-auto",children:[s.jsx(_t,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx(Ns,{type:"text",placeholder:"Rechercher un livre, un auteur, un produit...",value:e,onChange:d=>t(d.target.value),className:"pl-12 pr-4 py-6 text-lg rounded-full border-0 shadow-lg"})]})]}),s.jsx("div",{className:"flex flex-wrap justify-center gap-8 mt-12",children:[{icon:s0,text:"Livraison gratuite dès 50€"},{icon:ws,text:"Paiement sécurisé"},{icon:Hg,text:"Emballage cadeau disponible"}].map((d,h)=>{const u=d.icon;return s.jsxs("div",{className:"flex items-center gap-2 text-white/70",children:[s.jsx(u,{className:"w-5 h-5 text-[#c9a227]"}),s.jsx("span",{className:"text-sm",children:d.text})]},h)})})]})]}),s.jsx("section",{className:"py-12 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("h2",{className:"text-2xl font-bold text-[#1e3a5f] mb-6 flex items-center gap-2",children:[s.jsx(t0,{className:"w-6 h-6 text-[#c9a227]"}),"Collections à la une"]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:Dv.map(d=>s.jsxs("button",{className:"group relative aspect-[2/1] rounded-2xl overflow-hidden",children:[s.jsx("img",{src:d.image,alt:d.name,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1e3a5f] via-[#1e3a5f]/50 to-transparent"}),s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-6",children:[s.jsx("h3",{className:"text-xl font-bold text-white group-hover:text-[#c9a227] transition-colors",children:d.name}),s.jsxs("p",{className:"text-white/70 text-sm",children:[d.count," produits"]})]})]},d.id))})]})}),s.jsx("section",{className:"py-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx("div",{className:"flex flex-wrap gap-3 mb-8",children:_v.map(d=>{const h=d.icon,u=n===d.id,m=d.id==="all"?Ja.length:Ja.filter(x=>x.category===d.id).length;return s.jsxs("button",{onClick:()=>r(d.id),className:k("flex items-center gap-2 px-4 py-2.5 rounded-full font-medium transition-all",u?"bg-[#1e3a5f] text-white":"bg-white text-gray-600 hover:bg-gray-100"),children:[s.jsx(h,{className:"w-4 h-4"}),d.name,s.jsx("span",{className:k("text-xs px-2 py-0.5 rounded-full",u?"bg-white/20":"bg-gray-100"),children:m})]},d.id)})}),s.jsxs("p",{className:"text-gray-500 mb-6",children:[i.length," produit",i.length>1?"s":""," trouvé",i.length>1?"s":""]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:i.map(d=>s.jsxs("div",{className:"group bg-white rounded-2xl overflow-hidden shadow-sm hover:shadow-xl transition-all duration-300",children:[s.jsxs("div",{className:"relative aspect-[3/4] overflow-hidden bg-gray-100",children:[s.jsx("img",{src:d.image,alt:d.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),d.badge&&s.jsx($,{className:k("absolute top-3 left-3",c(d.badge)),children:d.badge}),s.jsx("button",{onClick:()=>o(d.id),className:k("absolute top-3 right-3 w-10 h-10 rounded-full flex items-center justify-center transition-all",l.includes(d.id)?"bg-red-500 text-white":"bg-white/80 text-gray-400 hover:bg-white hover:text-red-500"),children:s.jsx(ec,{className:k("w-5 h-5",l.includes(d.id)&&"fill-current")})}),s.jsx("div",{className:"absolute inset-x-0 bottom-0 p-4 bg-gradient-to-t from-black/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsxs("a",{href:"#",target:"_blank",rel:"noopener noreferrer sponsored",className:"flex items-center justify-center gap-2 w-full py-2.5 bg-[#c9a227] hover:bg-[#a88620] text-white font-medium rounded-lg transition-colors",children:["Voir sur Amazon",s.jsx(yn,{className:"w-4 h-4"})]})})]}),s.jsxs("div",{className:"p-4",children:[s.jsx("span",{className:"text-xs text-[#c9a227] font-medium",children:d.period}),s.jsx("h3",{className:"font-semibold text-[#1e3a5f] mt-1 line-clamp-2 group-hover:text-[#c9a227] transition-colors",children:d.title}),d.author&&s.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:d.author}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Pn,{className:"w-4 h-4 fill-amber-400 text-amber-400"}),s.jsx("span",{className:"font-medium text-sm",children:d.rating})]}),s.jsxs("span",{className:"text-xs text-gray-400",children:["(",d.reviews," avis)"]})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[s.jsxs("span",{className:"text-xl font-bold text-[#1e3a5f]",children:[d.price.toFixed(2).replace(".",",")," €"]}),d.originalPrice&&s.jsxs("span",{className:"text-sm text-gray-400 line-through",children:[d.originalPrice.toFixed(2).replace(".",",")," €"]})]})]})]},d.id))}),i.length===0&&s.jsxs("div",{className:"text-center py-16",children:[s.jsx(Lr,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-[#1e3a5f] mb-2",children:"Aucun produit trouvé"}),s.jsx("p",{className:"text-gray-500 mb-4",children:"Essayez de modifier vos critères de recherche"}),s.jsx(z,{variant:"outline",onClick:()=>{t(""),r("all")},children:"Réinitialiser les filtres"})]})]})}),s.jsx("section",{className:"py-8 bg-white border-t border-gray-100",children:s.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:s.jsxs("p",{className:"text-sm text-gray-500",children:[s.jsx("strong",{children:"Divulgation d'affiliation :"})," En tant que Partenaire Amazon, nous réalisons un bénéfice sur les achats remplissant les conditions requises. Les prix affichés sont indicatifs et peuvent varier."]})})}),s.jsx("section",{className:"py-16 bg-[#1e3a5f]",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-white mb-4",children:"Recevez nos recommandations"}),s.jsx("p",{className:"text-white/70 mb-6",children:"Inscrivez-vous pour recevoir nos meilleures sélections de livres et d'objets historiques"}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 max-w-md mx-auto",children:[s.jsx(Ns,{type:"email",placeholder:"Votre email",className:"flex-1 rounded-full"}),s.jsxs(z,{className:"bg-[#c9a227] hover:bg-[#a88620] rounded-full px-8",children:["S'inscrire",s.jsx(te,{className:"w-4 h-4 ml-2"})]})]})]})})]})}const Ka=[{id:"merovingiens",name:"Mérovingiens",years:"481 - 751",color:"bg-purple-500"},{id:"carolingiens",name:"Carolingiens",years:"751 - 987",color:"bg-amber-500"},{id:"capetiens",name:"Capétiens directs",years:"987 - 1328",color:"bg-blue-500"},{id:"valois",name:"Valois",years:"1328 - 1589",color:"bg-red-500"},{id:"bourbons",name:"Bourbons",years:"1589 - 1792",color:"bg-emerald-500"}],mu={merovingiens:{name:"Mérovingiens",members:[{id:"clovis",name:"Clovis Ier",years:"466-511",reign:"481-511",title:"Roi des Francs",type:"king",level:0,position:0},{id:"clotilde",name:"Clotilde",years:"475-545",title:"Reine des Francs",type:"queen",level:0,position:1,spouse:"clovis"},{id:"thierry-i",name:"Thierry Ier",years:"485-534",reign:"511-534",title:"Roi de Reims",type:"king",level:1,position:0},{id:"clodomir",name:"Clodomir",years:"495-524",reign:"511-524",title:"Roi d'Orléans",type:"king",level:1,position:1},{id:"childebert-i",name:"Childebert Ier",years:"497-558",reign:"511-558",title:"Roi de Paris",type:"king",level:1,position:2},{id:"clotaire-i",name:"Clotaire Ier",years:"498-561",reign:"511-561",title:"Roi de Soissons",type:"king",level:1,position:3},{id:"theodebert-i",name:"Théodebert Ier",years:"504-548",reign:"534-548",title:"Roi de Reims",type:"king",level:2,position:0},{id:"chilperic-i",name:"Chilpéric Ier",years:"539-584",reign:"561-584",title:"Roi de Neustrie",type:"king",level:2,position:1},{id:"fredegonde",name:"Frédégonde",years:"545-597",title:"Reine de Neustrie",type:"queen",level:2,position:2,spouse:"chilperic-i"},{id:"sigebert-i",name:"Sigebert Ier",years:"535-575",reign:"561-575",title:"Roi d'Austrasie",type:"king",level:2,position:3},{id:"brunehaut",name:"Brunehaut",years:"547-613",title:"Reine d'Austrasie",type:"queen",level:2,position:4,spouse:"sigebert-i"},{id:"clotaire-ii",name:"Clotaire II",years:"584-629",reign:"584-629",title:"Roi des Francs",type:"king",level:3,position:0},{id:"dagobert-i",name:"Dagobert Ier",years:"603-639",reign:"629-639",title:"Roi des Francs",type:"king",level:4,position:0}]},carolingiens:{name:"Carolingiens",members:[{id:"pepin-bref",name:"Pépin le Bref",years:"714-768",reign:"751-768",title:"Roi des Francs",type:"king",level:0,position:0},{id:"bertrade",name:"Bertrade de Laon",years:"720-783",title:"Reine des Francs",type:"queen",level:0,position:1,spouse:"pepin-bref"},{id:"charlemagne",name:"Charlemagne",years:"742-814",reign:"768-814",title:"Empereur d'Occident",type:"emperor",level:1,position:0},{id:"carloman-i",name:"Carloman Ier",years:"751-771",reign:"768-771",title:"Roi des Francs",type:"king",level:1,position:1},{id:"hildegarde",name:"Hildegarde",years:"758-783",title:"Reine des Francs",type:"queen",level:1,position:2,spouse:"charlemagne"},{id:"pepin-italie",name:"Pépin d'Italie",years:"773-810",reign:"781-810",title:"Roi d'Italie",type:"king",level:2,position:0},{id:"louis-pieux",name:"Louis le Pieux",years:"778-840",reign:"814-840",title:"Empereur d'Occident",type:"emperor",level:2,position:1},{id:"charles-jeune",name:"Charles le Jeune",years:"772-811",title:"Roi de Neustrie",type:"king",level:2,position:2},{id:"lothaire-i",name:"Lothaire Ier",years:"795-855",reign:"840-855",title:"Empereur d'Occident",type:"emperor",level:3,position:0},{id:"louis-germanique",name:"Louis le Germanique",years:"806-876",reign:"843-876",title:"Roi de Francie orientale",type:"king",level:3,position:1},{id:"charles-chauve",name:"Charles le Chauve",years:"823-877",reign:"843-877",title:"Roi de Francie occidentale",type:"emperor",level:3,position:2},{id:"louis-ii-begue",name:"Louis II le Bègue",years:"846-879",reign:"877-879",title:"Roi de France",type:"king",level:4,position:0},{id:"charles-gros",name:"Charles le Gros",years:"839-888",reign:"884-888",title:"Empereur d'Occident",type:"emperor",level:4,position:1}]},capetiens:{name:"Capétiens directs",members:[{id:"hugues-capet",name:"Hugues Capet",years:"939-996",reign:"987-996",title:"Roi de France",type:"king",level:0,position:0},{id:"adelaide-aquitaine",name:"Adélaïde d'Aquitaine",years:"945-1004",title:"Reine de France",type:"queen",level:0,position:1,spouse:"hugues-capet"},{id:"robert-ii",name:"Robert II le Pieux",years:"972-1031",reign:"996-1031",title:"Roi de France",type:"king",level:1,position:0},{id:"constance-arles",name:"Constance d'Arles",years:"986-1032",title:"Reine de France",type:"queen",level:1,position:1,spouse:"robert-ii"},{id:"henri-i",name:"Henri Ier",years:"1008-1060",reign:"1031-1060",title:"Roi de France",type:"king",level:2,position:0},{id:"robert-bourgogne",name:"Robert Ier de Bourgogne",years:"1011-1076",title:"Duc de Bourgogne",type:"noble",level:2,position:1},{id:"anne-kiev",name:"Anne de Kiev",years:"1030-1075",title:"Reine de France",type:"queen",level:2,position:2,spouse:"henri-i"},{id:"philippe-i",name:"Philippe Ier",years:"1052-1108",reign:"1060-1108",title:"Roi de France",type:"king",level:3,position:0},{id:"hugues-vermandois",name:"Hugues de Vermandois",years:"1057-1102",title:"Comte de Vermandois",type:"noble",level:3,position:1},{id:"louis-vi",name:"Louis VI le Gros",years:"1081-1137",reign:"1108-1137",title:"Roi de France",type:"king",level:4,position:0},{id:"adelaide-savoie",name:"Adélaïde de Savoie",years:"1092-1154",title:"Reine de France",type:"queen",level:4,position:1,spouse:"louis-vi"},{id:"louis-vii",name:"Louis VII le Jeune",years:"1120-1180",reign:"1137-1180",title:"Roi de France",type:"king",level:5,position:0},{id:"alienor-aquitaine",name:"Aliénor d'Aquitaine",years:"1122-1204",title:"Reine de France",type:"queen",level:5,position:1,spouse:"louis-vii",note:"Divorce 1152"},{id:"adele-champagne",name:"Adèle de Champagne",years:"1140-1206",title:"Reine de France",type:"queen",level:5,position:2,spouse:"louis-vii"},{id:"philippe-auguste",name:"Philippe II Auguste",years:"1165-1223",reign:"1180-1223",title:"Roi de France",type:"king",level:6,position:0},{id:"isabelle-hainaut",name:"Isabelle de Hainaut",years:"1170-1190",title:"Reine de France",type:"queen",level:6,position:1,spouse:"philippe-auguste"},{id:"louis-viii",name:"Louis VIII le Lion",years:"1187-1226",reign:"1223-1226",title:"Roi de France",type:"king",level:7,position:0},{id:"blanche-castille",name:"Blanche de Castille",years:"1188-1252",title:"Reine de France",type:"queen",level:7,position:1,spouse:"louis-viii"},{id:"louis-ix",name:"Louis IX (Saint Louis)",years:"1214-1270",reign:"1226-1270",title:"Roi de France",type:"king",level:8,position:0},{id:"marguerite-provence",name:"Marguerite de Provence",years:"1221-1295",title:"Reine de France",type:"queen",level:8,position:1,spouse:"louis-ix"},{id:"robert-artois",name:"Robert Ier d'Artois",years:"1216-1250",title:"Comte d'Artois",type:"noble",level:8,position:2},{id:"charles-anjou",name:"Charles d'Anjou",years:"1227-1285",title:"Roi de Sicile",type:"king",level:8,position:3},{id:"philippe-iii",name:"Philippe III le Hardi",years:"1245-1285",reign:"1270-1285",title:"Roi de France",type:"king",level:9,position:0},{id:"philippe-iv",name:"Philippe IV le Bel",years:"1268-1314",reign:"1285-1314",title:"Roi de France",type:"king",level:10,position:0},{id:"jeanne-navarre",name:"Jeanne Ière de Navarre",years:"1273-1305",title:"Reine de Navarre et de France",type:"queen",level:10,position:1,spouse:"philippe-iv"},{id:"charles-valois",name:"Charles de Valois",years:"1270-1325",title:"Comte de Valois",type:"noble",level:10,position:2},{id:"louis-x",name:"Louis X le Hutin",years:"1289-1316",reign:"1314-1316",title:"Roi de France",type:"king",level:11,position:0},{id:"philippe-v",name:"Philippe V le Long",years:"1293-1322",reign:"1316-1322",title:"Roi de France",type:"king",level:11,position:1},{id:"charles-iv",name:"Charles IV le Bel",years:"1294-1328",reign:"1322-1328",title:"Roi de France",type:"king",level:11,position:2},{id:"isabelle-france",name:"Isabelle de France",years:"1295-1358",title:"Reine d'Angleterre",type:"queen",level:11,position:3}]},valois:{name:"Valois",members:[{id:"philippe-vi",name:"Philippe VI",years:"1293-1350",reign:"1328-1350",title:"Roi de France",type:"king",level:0,position:0},{id:"jeanne-bourgogne",name:"Jeanne de Bourgogne",years:"1293-1349",title:"Reine de France",type:"queen",level:0,position:1,spouse:"philippe-vi"},{id:"jean-ii",name:"Jean II le Bon",years:"1319-1364",reign:"1350-1364",title:"Roi de France",type:"king",level:1,position:0},{id:"bonne-luxembourg",name:"Bonne de Luxembourg",years:"1315-1349",title:"Duchesse de Normandie",type:"queen",level:1,position:1,spouse:"jean-ii"},{id:"charles-v",name:"Charles V le Sage",years:"1338-1380",reign:"1364-1380",title:"Roi de France",type:"king",level:2,position:0},{id:"louis-anjou",name:"Louis Ier d'Anjou",years:"1339-1384",title:"Duc d'Anjou",type:"noble",level:2,position:1},{id:"jean-berry",name:"Jean de Berry",years:"1340-1416",title:"Duc de Berry",type:"noble",level:2,position:2},{id:"philippe-bourgogne",name:"Philippe le Hardi",years:"1342-1404",title:"Duc de Bourgogne",type:"noble",level:2,position:3},{id:"charles-vi",name:"Charles VI le Fol",years:"1368-1422",reign:"1380-1422",title:"Roi de France",type:"king",level:3,position:0},{id:"isabeau-baviere",name:"Isabeau de Bavière",years:"1371-1435",title:"Reine de France",type:"queen",level:3,position:1,spouse:"charles-vi"},{id:"louis-orleans",name:"Louis d'Orléans",years:"1372-1407",title:"Duc d'Orléans",type:"noble",level:3,position:2},{id:"charles-vii",name:"Charles VII le Victorieux",years:"1403-1461",reign:"1422-1461",title:"Roi de France",type:"king",level:4,position:0},{id:"marie-anjou",name:"Marie d'Anjou",years:"1404-1463",title:"Reine de France",type:"queen",level:4,position:1,spouse:"charles-vii"},{id:"catherine-france",name:"Catherine de France",years:"1401-1437",title:"Reine d'Angleterre",type:"queen",level:4,position:2},{id:"louis-xi",name:"Louis XI l'Universelle Aragne",years:"1423-1483",reign:"1461-1483",title:"Roi de France",type:"king",level:5,position:0},{id:"charles-viii",name:"Charles VIII l'Affable",years:"1470-1498",reign:"1483-1498",title:"Roi de France",type:"king",level:6,position:0},{id:"anne-bretagne",name:"Anne de Bretagne",years:"1477-1514",title:"Reine de France",type:"queen",level:6,position:1,spouse:"charles-viii"}]},bourbons:{name:"Bourbons",members:[{id:"henri-iv",name:"Henri IV",years:"1553-1610",reign:"1589-1610",title:"Roi de France et de Navarre",type:"king",level:0,position:0},{id:"marguerite-valois",name:"Marguerite de Valois",years:"1553-1615",title:"Reine de France",type:"queen",level:0,position:1,spouse:"henri-iv",note:"Annulé 1599"},{id:"marie-medicis",name:"Marie de Médicis",years:"1575-1642",title:"Reine de France",type:"queen",level:0,position:2,spouse:"henri-iv"},{id:"louis-xiii",name:"Louis XIII le Juste",years:"1601-1643",reign:"1610-1643",title:"Roi de France",type:"king",level:1,position:0},{id:"anne-autriche",name:"Anne d'Autriche",years:"1601-1666",title:"Reine de France",type:"queen",level:1,position:1,spouse:"louis-xiii"},{id:"gaston-orleans",name:"Gaston d'Orléans",years:"1608-1660",title:"Duc d'Orléans",type:"noble",level:1,position:2},{id:"henriette-france",name:"Henriette de France",years:"1609-1669",title:"Reine d'Angleterre",type:"queen",level:1,position:3},{id:"louis-xiv",name:"Louis XIV le Roi Soleil",years:"1638-1715",reign:"1643-1715",title:"Roi de France",type:"king",level:2,position:0},{id:"marie-therese",name:"Marie-Thérèse d'Autriche",years:"1638-1683",title:"Reine de France",type:"queen",level:2,position:1,spouse:"louis-xiv"},{id:"philippe-orleans",name:"Philippe d'Orléans",years:"1640-1701",title:"Duc d'Orléans",type:"noble",level:2,position:2},{id:"grand-dauphin",name:"Louis de France (Grand Dauphin)",years:"1661-1711",title:"Dauphin de France",type:"noble",level:3,position:0},{id:"duc-bourgogne",name:"Louis, duc de Bourgogne",years:"1682-1712",title:"Duc de Bourgogne",type:"noble",level:4,position:0},{id:"philippe-v-espagne",name:"Philippe V d'Espagne",years:"1683-1746",reign:"1700-1746",title:"Roi d'Espagne",type:"king",level:4,position:1},{id:"louis-xv",name:"Louis XV le Bien-Aimé",years:"1710-1774",reign:"1715-1774",title:"Roi de France",type:"king",level:5,position:0},{id:"marie-leszczynska",name:"Marie Leszczyńska",years:"1703-1768",title:"Reine de France",type:"queen",level:5,position:1,spouse:"louis-xv"},{id:"louis-dauphin",name:"Louis de France (Dauphin)",years:"1729-1765",title:"Dauphin de France",type:"noble",level:6,position:0},{id:"louis-xvi",name:"Louis XVI",years:"1754-1793",reign:"1774-1792",title:"Roi de France",type:"king",level:7,position:0},{id:"marie-antoinette",name:"Marie-Antoinette",years:"1755-1793",title:"Reine de France",type:"queen",level:7,position:1,spouse:"louis-xvi"},{id:"louis-xviii",name:"Louis XVIII",years:"1755-1824",reign:"1814-1824",title:"Roi de France",type:"king",level:7,position:2},{id:"charles-x",name:"Charles X",years:"1757-1836",reign:"1824-1830",title:"Roi de France",type:"king",level:7,position:3},{id:"louis-xvii",name:"Louis XVII",years:"1785-1795",title:"Roi titulaire",type:"noble",level:8,position:0},{id:"marie-therese-fille",name:"Marie-Thérèse de France",years:"1778-1851",title:"Duchesse d'Angoulême",type:"noble",level:8,position:1}]}},hu={king:{icon:U,bg:"bg-[#1e3a5f]",iconColor:"text-[#c9a227]",label:"Roi"},emperor:{icon:U,bg:"bg-purple-700",iconColor:"text-yellow-300",label:"Empereur"},queen:{icon:U,bg:"bg-pink-600",iconColor:"text-white",label:"Reine"},noble:{icon:ge,bg:"bg-emerald-600",iconColor:"text-white",label:"Noble"}};function eo({member:e,isSelected:t,onClick:n}){const r=hu[e.type]||hu.king,l=r.icon;return s.jsxs("button",{onClick:n,className:k("flex flex-col items-center p-3 rounded-xl border-2 transition-all w-[140px] h-[130px]",t?"border-[#c9a227] bg-[#c9a227]/10 shadow-lg scale-105":"border-amber-100 bg-white hover:border-[#c9a227]/50 hover:shadow-md",e.type==="queen"&&"border-pink-200",e.type==="noble"&&"border-emerald-200"),children:[s.jsx("div",{className:k("w-10 h-10 rounded-full flex items-center justify-center mb-2",r.bg),children:s.jsx(l,{className:k("w-5 h-5",r.iconColor)})}),s.jsx("h4",{className:"font-semibold text-[#1e3a5f] text-center text-xs leading-tight",children:e.name}),s.jsx("p",{className:"text-[10px] text-gray-500 mt-1",children:e.years}),e.reign&&s.jsx($,{className:"mt-1.5 text-[10px] bg-[#c9a227]/10 text-[#c9a227] hover:bg-[#c9a227]/20",children:e.reign}),e.note&&s.jsx("span",{className:"text-[9px] text-red-500 mt-1",children:e.note})]})}function Vv({king:e,queen:t,isSelected:n,onSelectKing:r,onSelectQueen:l,showTopConnector:a=!1}){return s.jsxs("div",{className:"flex flex-col items-center",children:[a&&s.jsx("div",{className:"w-0.5 h-6 bg-[#c9a227]"}),s.jsxs("div",{className:"relative flex items-start",children:[s.jsx(eo,{member:e,isSelected:n===e.id,onClick:r}),s.jsx("div",{className:"flex flex-col items-center justify-center self-center mx-1",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"w-3 h-0.5 bg-pink-400"}),s.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-pink-400 bg-pink-50 flex items-center justify-center",children:s.jsx("span",{className:"text-[10px] text-pink-500",children:"♥"})}),s.jsx("div",{className:"w-3 h-0.5 bg-pink-400"})]})}),s.jsx(eo,{member:t,isSelected:n===t.id,onClick:l})]}),s.jsx("div",{className:"w-0.5 h-6 bg-[#c9a227]"})]})}function qv({member:e,isSelected:t,onClick:n,showTopConnector:r=!1,showBottomConnector:l=!1}){return s.jsxs("div",{className:"flex flex-col items-center",children:[r&&s.jsx("div",{className:"w-0.5 h-6 bg-[#c9a227]"}),s.jsx(eo,{member:e,isSelected:t,onClick:n}),l&&s.jsx("div",{className:"w-0.5 h-6 bg-[#c9a227]"})]})}function Bv(){const t=new URLSearchParams(window.location.search).get("dynasty")||"capetiens",[n,r]=j.useState(t),[l,a]=j.useState(null),[i,o]=j.useState(100),c=Ka.find(x=>x.id===n)||Ka[2],h=(mu[n]||mu.capetiens).members.reduce((x,f)=>(x[f.level]||(x[f.level]=[]),x[f.level].push(f),x),{}),u=x=>{const f=[],v=new Set;return x.forEach(w=>{if(v.has(w.id))return;const g=x.find(p=>p.spouse===w.id);g?(f.push({type:"marriage",king:w,queen:g}),v.add(w.id),v.add(g.id)):w.spouse||(f.push({type:"single",member:w}),v.add(w.id))}),f},m=Object.keys(h).sort((x,f)=>x-f);return s.jsxs("div",{className:"min-h-screen bg-[#f5f1e8]",children:[s.jsx("section",{className:"bg-gradient-to-br from-[#1e3a5f] to-[#2d5a87] py-16",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx(Ie,{items:[{label:"Dynasties",pageName:"Dynasties"},{label:"Arbres généalogiques"}],className:"mb-6 text-white/70 [&_a]:text-white/70 [&_a:hover]:text-[#c9a227] [&_span]:text-white"}),s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl bg-[#c9a227]/20 flex items-center justify-center",children:s.jsx(Vs,{className:"w-8 h-8 text-[#c9a227]"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-white",children:"Arbres Généalogiques"}),s.jsx("p",{className:"text-white/70",children:"Explorez les lignées royales de France"})]})]})]})}),s.jsx("section",{className:"sticky top-16 z-30 bg-white border-b border-gray-200 shadow-sm",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex items-center justify-between py-4",children:[s.jsx("div",{className:"flex items-center gap-2 overflow-x-auto pb-2",children:Ka.map(x=>s.jsxs("button",{onClick:()=>r(x.id),className:k("flex items-center gap-2 px-4 py-2 rounded-full text-sm font-medium whitespace-nowrap transition-all",n===x.id?"bg-[#1e3a5f] text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"),children:[s.jsx("div",{className:k("w-3 h-3 rounded-full",x.color)}),x.name]},x.id))}),s.jsxs("div",{className:"hidden md:flex items-center gap-2 ml-4",children:[s.jsx(z,{variant:"outline",size:"icon",onClick:()=>o(Math.max(50,i-10)),disabled:i<=50,children:s.jsx(Uh,{className:"w-4 h-4"})}),s.jsxs("span",{className:"text-sm text-gray-500 w-12 text-center",children:[i,"%"]}),s.jsx(z,{variant:"outline",size:"icon",onClick:()=>o(Math.min(150,i+10)),disabled:i>=150,children:s.jsx(Hh,{className:"w-4 h-4"})})]})]})})}),s.jsx("section",{className:"py-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx("div",{className:"bg-white rounded-2xl p-6 mb-8 border border-amber-100",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-[#1e3a5f]",children:c.name}),s.jsx("p",{className:"text-[#c9a227] font-medium",children:c.years})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(C,{to:E("Dynasty")+`?id=${n}`,children:s.jsxs(z,{variant:"outline",className:"rounded-full",children:[s.jsx(U,{className:"w-4 h-4 mr-2"}),"Voir la dynastie"]})}),s.jsx(z,{variant:"outline",size:"icon",className:"rounded-full",children:s.jsx(_r,{className:"w-4 h-4"})})]})]})}),s.jsx("div",{className:"bg-white rounded-2xl border border-amber-100 p-8 overflow-x-auto overflow-y-auto max-h-[70vh]",children:s.jsx("div",{className:"flex flex-col items-center min-w-max",style:{transform:`scale(${i/100})`,transformOrigin:"top center"},children:m.map((x,f)=>{const v=u(h[x]),w=v.length;m.length-1;const g=f<m.length-1;return s.jsxs(Qt.Fragment,{children:[f>0&&w>1&&s.jsx("div",{className:"relative flex items-center justify-center mb-0",children:s.jsx("div",{className:"h-0.5 bg-[#c9a227]",style:{width:`${(w-1)*280+40}px`}})}),s.jsx("div",{className:"flex items-start gap-8 justify-center",children:v.map((p,y)=>{const b=f>0;return s.jsx("div",{className:"flex flex-col items-center",children:p.type==="marriage"?s.jsx(Vv,{king:p.king,queen:p.queen,isSelected:l==null?void 0:l.id,onSelectKing:()=>a(p.king),onSelectQueen:()=>a(p.queen),showTopConnector:b}):s.jsx(qv,{member:p.member,isSelected:(l==null?void 0:l.id)===p.member.id,onClick:()=>a(p.member),showTopConnector:b,showBottomConnector:g&&y===0})},y)})})]},x)})})}),l&&s.jsx("div",{className:"mt-8 bg-white rounded-2xl border border-amber-100 p-6",children:s.jsxs("div",{className:"flex items-start gap-6",children:[s.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[#1e3a5f] flex items-center justify-center",children:s.jsx(U,{className:"w-10 h-10 text-[#c9a227]"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"text-2xl font-bold text-[#1e3a5f]",children:l.name}),s.jsx("p",{className:"text-gray-600",children:l.title}),s.jsxs("div",{className:"flex items-center gap-4 mt-3",children:[s.jsxs($,{variant:"outline",children:["Vie : ",l.years]}),s.jsxs($,{className:"bg-[#c9a227] text-white",children:["Règne : ",l.reign]})]})]}),s.jsx(C,{to:E("Character")+`?id=${l.id}`,children:s.jsxs(z,{className:"bg-[#1e3a5f] hover:bg-[#2d5a87] rounded-full",children:["Voir la biographie",s.jsx(Xt,{className:"w-4 h-4 ml-2"})]})})]})})]})}),s.jsx("section",{className:"pb-12",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"bg-[#1e3a5f]/5 rounded-2xl p-6",children:[s.jsxs("h3",{className:"font-semibold text-[#1e3a5f] mb-4 flex items-center gap-2",children:[s.jsx(ge,{className:"w-5 h-5"}),"Légende"]}),s.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-[#1e3a5f] flex items-center justify-center",children:s.jsx(U,{className:"w-4 h-4 text-[#c9a227]"})}),s.jsx("span",{className:"text-gray-600",children:"Roi"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-purple-700 flex items-center justify-center",children:s.jsx(U,{className:"w-4 h-4 text-yellow-300"})}),s.jsx("span",{className:"text-gray-600",children:"Empereur"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-pink-600 flex items-center justify-center",children:s.jsx(U,{className:"w-4 h-4 text-white"})}),s.jsx("span",{className:"text-gray-600",children:"Reine"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-emerald-600 flex items-center justify-center",children:s.jsx(ge,{className:"w-4 h-4 text-white"})}),s.jsx("span",{className:"text-gray-600",children:"Noble / Prince"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-6 h-0.5 bg-[#c9a227]"}),s.jsx("span",{className:"text-gray-600",children:"Filiation"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"w-3 h-0.5 bg-pink-400"}),s.jsx("div",{className:"w-3 h-3 rounded-full border border-pink-400 flex items-center justify-center",children:s.jsx("span",{className:"text-[8px] text-pink-500",children:"♥"})}),s.jsx("div",{className:"w-3 h-0.5 bg-pink-400"})]}),s.jsx("span",{className:"text-gray-600",children:"Mariage"})]})]})]})})})]})}function $v(){const e=Tr(),n=(r=>{const l=r.replace(/^\/(fr|en|es|de|it|pt)/,"")||r;if(l==="/"||l==="")return"Home";const a=l.split("/")[1];return a?a.charAt(0).toUpperCase()+a.slice(1):"Home"})(e.pathname);return s.jsx(K0,{currentPageName:n,children:s.jsxs(Cg,{children:[s.jsx(Y,{path:"/",element:s.jsx(Gd,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?",element:s.jsx(Gd,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/personnages/:id",element:s.jsx(Ys,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/characters/:id",element:s.jsx(Ys,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/personajes/:id",element:s.jsx(Ys,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/personen/:id",element:s.jsx(Ys,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/personaggi/:id",element:s.jsx(Ys,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/personagens/:id",element:s.jsx(Ys,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/lieux/:id",element:s.jsx(Js,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/places/:id",element:s.jsx(Js,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/lugares/:id",element:s.jsx(Js,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/orte/:id",element:s.jsx(Js,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/luoghi/:id",element:s.jsx(Js,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/lugares/:id",element:s.jsx(Js,{})}),s.jsx(Y,{path:"/period/:id",element:s.jsx(rl,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/period/:id",element:s.jsx(rl,{})}),s.jsx(Y,{path:"/:lang(fr|en|es|de|it|pt)?/periode/:id",element:s.jsx(rl,{})}),s.jsx(Y,{path:"/timeline",element:s.jsx(mv,{})}),s.jsx(Y,{path:"/period",element:s.jsx(rl,{})}),s.jsx(Y,{path:"/sub-period",element:s.jsx(pv,{})}),s.jsx(Y,{path:"/characters",element:s.jsx(fv,{})}),s.jsx(Y,{path:"/character",element:s.jsx(gv,{})}),s.jsx(Y,{path:"/battles",element:s.jsx(Nv,{})}),s.jsx(Y,{path:"/battle",element:s.jsx(bv,{})}),s.jsx(Y,{path:"/places",element:s.jsx(Cv,{})}),s.jsx(Y,{path:"/place",element:s.jsx(Sv,{})}),s.jsx(Y,{path:"/dynasties",element:s.jsx(Pv,{})}),s.jsx(Y,{path:"/dynasty",element:s.jsx(Iv,{})}),s.jsx(Y,{path:"/events",element:s.jsx(Rv,{})}),s.jsx(Y,{path:"/event",element:s.jsx(zv,{})}),s.jsx(Y,{path:"/maps",element:s.jsx(Mv,{})}),s.jsx(Y,{path:"/search",element:s.jsx(Tv,{})}),s.jsx(Y,{path:"/shop",element:s.jsx(Ov,{})}),s.jsx(Y,{path:"/family-trees",element:s.jsx(Bv,{})})]})})}function Hv(){const{language:e}=Ze();return j.useEffect(()=>{document.documentElement.setAttribute("lang",e)},[e]),null}Za.createRoot(document.getElementById("root")).render(s.jsx(Qt.StrictMode,{children:s.jsx(zg,{children:s.jsxs(Og,{children:[s.jsx(Hv,{}),s.jsx($v,{})]})})}));