const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AdminDashboard-B17twlKM.js","assets/ui-vendor-DY1Nl8_k.js","assets/react-vendor-DLeeiYj8.js","assets/AdminHeader-CRQniN8f.js","assets/DataTable-CHsl8nbN.js","assets/table-mhmVhawf.js","assets/input-CjM1dJ08.js","assets/badge-BWgkp-eY.js","assets/useStaffGuard-BV9XHXVd.js","assets/supabase-vendor-D4bxM2wB.js","assets/charts-vendor-D9ZL-K3s.js","assets/AdminReservations-Stc1Kww7.js","assets/TableSkeleton-DXf7P5kP.js","assets/sheet-BDiRX9nE.js","assets/index-BImLnMjf.js","assets/dialog-DZfrE9Ml.js","assets/alert-dialog-DMyd0E0D.js","assets/types-CZpmKRGo.js","assets/popover-VJBW0mJy.js","assets/form-Bo67v2_1.js","assets/textarea-Dy6_q5Cd.js","assets/checkbox-Dy041__o.js","assets/emailTemplates-D9yCoGR1.js","assets/usePermissions-Be_3-2EU.js","assets/AdminClients-CLLwrVkK.js","assets/AdminVehicles-DBN6ohPp.js","assets/uploader-DAAafxWv.js","assets/LangTabs-CFUfRYct.js","assets/AdminEquipments-DKK_qQiF.js","assets/AdminPricing-Cs-MuPV9.js","assets/tabs-Dg6x_eWj.js","assets/WhatsAppDashboard-B69j_iOY.js","assets/scroll-area-I5kpAilo.js","assets/AdminLogs-JO9Khur5.js","assets/useAdminGuard-1jtAF3TX.js","assets/AdminUsers-DQXtZqoJ.js","assets/BlogAdmin-CqRjgm9G.js","assets/bilingual-0dhBFo-a.js","assets/sortable.esm-D3Q3zq-Q.js","assets/ArticleRenderer-AUIKUcla.js","assets/flags-CrUwu3YP.js","assets/logger-Cc0LavB7.js","assets/switch-CdsapuuH.js","assets/accordion-DPVNEZ8r.js","assets/Policies-CEZSO6U3.js","assets/Locations-BA3y9V4-.js","assets/Seasons-Bmk7ZY7s.js","assets/Config-ono1pudU.js","assets/featureIcons-0Q4l_G9n.js","assets/Home-U4aC_KKz.js","assets/FadeInStagger-CWjakM_A.js","assets/SectionBadge-mSH5xY3c.js","assets/Search-BizUPdR9.js","assets/CurrencyDisclaimer-Bfyoxezs.js","assets/StepIndicator-DHthAEb_.js","assets/Extras-B9I71Qpl.js","assets/publicClient-CMXD4YW3.js","assets/Payment-Da8uBGCg.js","assets/Confirmation-DC80u5Jx.js","assets/NotFound-ClgH_5qK.js","assets/MyReservations-DYco5d49.js","assets/MyReservationDetail-BocDftoM.js","assets/StaticPage-Csg_IvQ_.js","assets/FAQ-C3LZ59AW.js","assets/PageHero-BNwM6J1U.js","assets/AboutPage-DlmTeDMS.js","assets/renderContent-CXCMTpEr.js","assets/ConditionsPage-BUZFNIWc.js","assets/PrivacyPage-Bxdj33En.js","assets/ContactPage-BgAkCu65.js","assets/usePinnedFAQs-BVrClzH0.js","assets/LoginAdmin-DRu1k9uP.js","assets/AuthLayout-CLtfTnkT.js","assets/LoginSuperviseur-CL2WG4kK.js","assets/LoginAgent-Cq3OH--F.js","assets/Unauthorized-BTr2SQ9N.js","assets/Taghazout-DI9sjuhV.js","assets/SurfTips-AINyQ_zH.js","assets/maps-vendor-COEXmDe0.js","assets/Taghazout-Dgihpmma.css","assets/Essaouira-FtwwkITg.js","assets/DestinationPlaceCards-CFPiadTL.js","assets/Agadir-4xcO2_JM.js","assets/AeroportAgadir-DTe6bDas.js","assets/Marrakech-CEBu98Of.js","assets/Tiznit-C_BG0T1d.js","assets/Ouarzazate-BEz9qhvA.js","assets/Tafraout-CNVw0EsB.js","assets/Mirleft-CG1o8X_r.js","assets/Dakhla-DZJjq7Nd.js","assets/VehiclesList-jGjzr0iW.js","assets/VehicleDetail-Cop2ZVm7.js","assets/ReservationsMobile-CIWiqLWa.js","assets/FloatingActionBar-m4sbt8mt.js","assets/Clients-C2A75pyF.js","assets/Blog-oYhMgx2p.js","assets/BlogPost-g-0bOiYA.js","assets/PharmacieGardeAgadir-C36BqxPF.js","assets/CalculateurRoadTrip-DTLl3djJ.js","assets/DashRedirect-Cl62_AB_.js","assets/PinnedFAQSection-DFuNmw9l.js"])))=>i.map(i=>d[i]); var _m=Object.defineProperty;var Zi=e=>{throw TypeError(e)};var ym=(e,t,n)=>t in e?_m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Tt=(e,t,n)=>ym(e,typeof t!="symbol"?t+"":t,n),bo=(e,t,n)=>t.has(e)||Zi("Cannot "+n);var k=(e,t,n)=>(bo(e,t,"read from private field"),n?n.call(e):t.get(e)),X=(e,t,n)=>t.has(e)?Zi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),V=(e,t,n,r)=>(bo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ae=(e,t,n)=>(bo(e,t,"access private method"),n);var fa=(e,t,n,r)=>({set _(a){V(e,t,a,n)},get _(){return k(e,t,r)}});import{j as s,X as Ya,C as cr,M as Qr,B as bm,a as xm,I as wm,b as Tl,c as Cm,d as Gs,e as km,f as Xr,L as Tm,T as Sm,Y as Pm,S as Em,P as Am,m as Ia,g as jm,h as Nm,i as Sl,k as Mm,l as Pl,A as Rm,n as El,o as Ka,p as Ys,q as Jr,U as Ks,W as Al,E as jl,r as Nl,s as Ml,F as ts,t as Rl,u as Dl,v as Qs,w as Oa,H as Dm,x as Im,y as Om,z as zm,D as Lm,G as Fm}from"./ui-vendor-DY1Nl8_k.js";import{b as gr,r as d,R as I,v as Il,d as Ol,u as xe,e as Je,L as Qe,a as Qa,N as Jt,c as Wm,O as zl,f as Nt,B as qm,h as Bm,i as Z}from"./react-vendor-DLeeiYj8.js";import{c as $m,_ as B}from"./supabase-vendor-D4bxM2wB.js";import{c as Ll}from"./charts-vendor-D9ZL-K3s.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();var Fl,ec=gr;Fl=ec.createRoot,ec.hydrateRoot;const Vm=1,Um=1e6;let xo=0;function Hm(){return xo=(xo+1)%Number.MAX_SAFE_INTEGER,xo.toString()}const wo=new Map,tc=e=>{if(wo.has(e))return;const t=setTimeout(()=>{wo.delete(e),Or({type:"REMOVE_TOAST",toastId:e})},Um);wo.set(e,t)},Gm=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Vm)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?tc(n):e.toasts.forEach(r=>{tc(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Sa=[];let Pa={toasts:[]};function Or(e){Pa=Gm(Pa,e),Sa.forEach(t=>{t(Pa)})}function Ym({...e}){const t=Hm(),n=a=>Or({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>Or({type:"DISMISS_TOAST",toastId:t});return Or({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}}function Xa(){const[e,t]=d.useState(Pa);return d.useEffect(()=>(Sa.push(t),()=>{const n=Sa.indexOf(t);n>-1&&Sa.splice(n,1)}),[e]),{...e,toast:Ym,dismiss:n=>Or({type:"DISMISS_TOAST",toastId:n})}}function q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function nc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ja(...e){return t=>{let n=!1;const r=e.map(a=>{const o=nc(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a{const{children:i,...c}=o,l=d.useMemo(()=>c,Object.values(c));return s.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function a(o){const i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function Dt(e,t=[]){let n=[];function r(o,i){const c=d.createContext(i),l=n.length;n=[...n,i];const u=m=>{var x;const{scope:g,children:f,..._}=m,h=((x=g==null?void 0:g[e])==null?void 0:x[l])||c,v=d.useMemo(()=>_,Object.values(_));return s.jsx(h.Provider,{value:v,children:f})};u.displayName=o+"Provider";function p(m,g){var h;const f=((h=g==null?void 0:g[e])==null?void 0:h[l])||c,_=d.useContext(f);if(_)return _;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[u,p]}const a=()=>{const o=n.map(i=>d.createContext(i));return function(c){const l=(c==null?void 0:c[e])||o;return d.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return a.scopeName=e,[r,Km(a,...t)]}function Km(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const i=r.reduce((c,{useScope:l,scopeName:u})=>{const m=l(o)[`__scope${u}`];return{...c,...m}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function lr(e){const t=Xm(e),n=d.forwardRef((r,a)=>{const{children:o,...i}=r,c=d.Children.toArray(o),l=c.find(Zm);if(l){const u=l.props.children,p=c.map(m=>m===l?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:m);return s.jsx(t,{...i,ref:a,children:d.isValidElement(u)?d.cloneElement(u,void 0,p):null})}return s.jsx(t,{...i,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var Qm=lr("Slot");function Xm(e){const t=d.forwardRef((n,r)=>{const{children:a,...o}=n;if(d.isValidElement(a)){const i=th(a),c=eh(o,a.props);return a.type!==d.Fragment&&(c.ref=r?Ja(r,i):i),d.cloneElement(a,c)}return d.Children.count(a)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wl=Symbol("radix.slottable");function Jm(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Wl,t}function Zm(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wl}function eh(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...c)=>{const l=o(...c);return a(...c),l}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function th(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Za(e){const t=e+"CollectionProvider",[n,r]=Dt(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:v,children:x}=h,y=I.useRef(null),b=I.useRef(new Map).current;return s.jsx(a,{scope:v,itemMap:b,collectionRef:y,children:x})};i.displayName=t;const c=e+"CollectionSlot",l=lr(c),u=I.forwardRef((h,v)=>{const{scope:x,children:y}=h,b=o(c,x),w=he(v,b.collectionRef);return s.jsx(l,{ref:w,children:y})});u.displayName=c;const p=e+"CollectionItemSlot",m="data-radix-collection-item",g=lr(p),f=I.forwardRef((h,v)=>{const{scope:x,children:y,...b}=h,w=I.useRef(null),C=he(v,w),S=o(p,x);return I.useEffect(()=>(S.itemMap.set(w,{ref:w,...b}),()=>void S.itemMap.delete(w))),s.jsx(g,{[m]:"",ref:C,children:y})});f.displayName=p;function _(h){const v=o(e+"CollectionConsumer",h);return I.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((S,P)=>b.indexOf(S.ref.current)-b.indexOf(P.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:f},_,r]}var nh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],re=nh.reduce((e,t)=>{const n=lr(`Primitive.${t}`),r=d.forwardRef((a,o)=>{const{asChild:i,...c}=a,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(l,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Xs(e,t){e&&gr.flushSync(()=>e.dispatchEvent(t))}function Ie(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function rh(e,t=globalThis==null?void 0:globalThis.document){const n=Ie(e);d.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ah="DismissableLayer",ns="dismissableLayer.update",oh="dismissableLayer.pointerDownOutside",sh="dismissableLayer.focusOutside",rc,ql=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:c,...l}=e,u=d.useContext(ql),[p,m]=d.useState(null),g=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=d.useState({}),_=he(t,P=>m(P)),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=h.indexOf(v),y=p?h.indexOf(p):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,w=y>=x,C=ch(P=>{const T=P.target,E=[...u.branches].some(M=>M.contains(T));!w||E||(a==null||a(P),i==null||i(P),P.defaultPrevented||c==null||c())},g),S=lh(P=>{const T=P.target;[...u.branches].some(M=>M.contains(T))||(o==null||o(P),i==null||i(P),P.defaultPrevented||c==null||c())},g);return rh(P=>{y===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))},g),d.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(rc=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),ac(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=rc)}},[p,g,n,u]),d.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),ac())},[p,u]),d.useEffect(()=>{const P=()=>f({});return document.addEventListener(ns,P),()=>document.removeEventListener(ns,P)},[]),s.jsx(re.div,{...l,ref:_,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:q(e.onFocusCapture,S.onFocusCapture),onBlurCapture:q(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:q(e.onPointerDownCapture,C.onPointerDownCapture)})});Zr.displayName=ah;var ih="DismissableLayerBranch",Bl=d.forwardRef((e,t)=>{const n=d.useContext(ql),r=d.useRef(null),a=he(t,r);return d.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),s.jsx(re.div,{...e,ref:a})});Bl.displayName=ih;function ch(e,t=globalThis==null?void 0:globalThis.document){const n=Ie(e),r=d.useRef(!1),a=d.useRef(()=>{});return d.useEffect(()=>{const o=c=>{if(c.target&&!r.current){let l=function(){$l(oh,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=l,t.addEventListener("click",a.current,{once:!0})):l()}else t.removeEventListener("click",a.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function lh(e,t=globalThis==null?void 0:globalThis.document){const n=Ie(e),r=d.useRef(!1);return d.useEffect(()=>{const a=o=>{o.target&&!r.current&&$l(sh,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ac(){const e=new CustomEvent(ns);document.dispatchEvent(e)}function $l(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Xs(a,o):a.dispatchEvent(o)}var uh=Zr,dh=Bl,Ce=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},fh="Portal",eo=d.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[a,o]=d.useState(!1);Ce(()=>o(!0),[]);const i=n||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?Il.createPortal(s.jsx(re.div,{...r,ref:t}),i):null});eo.displayName=fh;function ph(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var En=e=>{const{present:t,children:n}=e,r=mh(t),a=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),o=he(r.ref,hh(a));return typeof n=="function"||r.isPresent?d.cloneElement(a,{ref:o}):null};En.displayName="Presence";function mh(e){const[t,n]=d.useState(),r=d.useRef(null),a=d.useRef(e),o=d.useRef("none"),i=e?"mounted":"unmounted",[c,l]=ph(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=pa(r.current);o.current=c==="mounted"?u:"none"},[c]),Ce(()=>{const u=r.current,p=a.current;if(p!==e){const g=o.current,f=pa(u);e?l("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(p&&g!==f?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),Ce(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,m=f=>{const h=pa(r.current).includes(f.animationName);if(f.target===t&&h&&(l("ANIMATION_END"),!a.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},g=f=>{f.target===t&&(o.current=pa(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:d.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function pa(e){return(e==null?void 0:e.animationName)||"none"}function hh(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var gh=Ol[" useInsertionEffect ".trim().toString()]||Ce;function zr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,i]=vh({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:a;{const p=d.useRef(e!==void 0);d.useEffect(()=>{const m=p.current;m!==c&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const u=d.useCallback(p=>{var m;if(c){const g=_h(p)?p(e):p;g!==e&&((m=i.current)==null||m.call(i,g))}else o(p)},[c,e,o,i]);return[l,u]}function vh({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),a=d.useRef(n),o=d.useRef(t);return gh(()=>{o.current=t},[t]),d.useEffect(()=>{var i;a.current!==n&&((i=o.current)==null||i.call(o,n),a.current=n)},[n,a]),[n,r,o]}function _h(e){return typeof e=="function"}var Vl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),yh="VisuallyHidden",to=d.forwardRef((e,t)=>s.jsx(re.span,{...e,ref:t,style:{...Vl,...e.style}}));to.displayName=yh;var bh=to,Js="ToastProvider",[Zs,xh,wh]=Za("Toast"),[Ul,LS]=Dt("Toast",[wh]),[Ch,no]=Ul(Js),Hl=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:i}=e,[c,l]=d.useState(null),[u,p]=d.useState(0),m=d.useRef(!1),g=d.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Js}\`. Expected non-empty \`string\`.`),s.jsx(Zs.Provider,{scope:t,children:s.jsx(Ch,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:o,toastCount:u,viewport:c,onViewportChange:l,onToastAdd:d.useCallback(()=>p(f=>f+1),[]),onToastRemove:d.useCallback(()=>p(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:g,children:i})})};Hl.displayName=Js;var Gl="ToastViewport",kh=["F8"],rs="toast.viewportPause",as="toast.viewportResume",Yl=d.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=kh,label:a="Notifications ({hotkey})",...o}=e,i=no(Gl,n),c=xh(n),l=d.useRef(null),u=d.useRef(null),p=d.useRef(null),m=d.useRef(null),g=he(t,m,i.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=i.toastCount>0;d.useEffect(()=>{const v=x=>{var b;r.length!==0&&r.every(w=>x[w]||x.code===w)&&((b=m.current)==null||b.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),d.useEffect(()=>{const v=l.current,x=m.current;if(_&&v&&x){const y=()=>{if(!i.isClosePausedRef.current){const S=new CustomEvent(rs);x.dispatchEvent(S),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){const S=new CustomEvent(as);x.dispatchEvent(S),i.isClosePausedRef.current=!1}},w=S=>{!v.contains(S.relatedTarget)&&b()},C=()=>{v.contains(document.activeElement)||b()};return v.addEventListener("focusin",y),v.addEventListener("focusout",w),v.addEventListener("pointermove",y),v.addEventListener("pointerleave",C),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{v.removeEventListener("focusin",y),v.removeEventListener("focusout",w),v.removeEventListener("pointermove",y),v.removeEventListener("pointerleave",C),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[_,i.isClosePausedRef]);const h=d.useCallback(({tabbingDirection:v})=>{const y=c().map(b=>{const w=b.ref.current,C=[w,...zh(w)];return v==="forwards"?C:C.reverse()});return(v==="forwards"?y.reverse():y).flat()},[c]);return d.useEffect(()=>{const v=m.current;if(v){const x=y=>{var C,S,P;const b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){const T=document.activeElement,E=y.shiftKey;if(y.target===v&&E){(C=u.current)==null||C.focus();return}const N=h({tabbingDirection:E?"backwards":"forwards"}),L=N.findIndex(O=>O===T);Co(N.slice(L+1))?y.preventDefault():E?(S=u.current)==null||S.focus():(P=p.current)==null||P.focus()}};return v.addEventListener("keydown",x),()=>v.removeEventListener("keydown",x)}},[c,h]),s.jsxs(dh,{ref:l,role:"region","aria-label":a.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&s.jsx(os,{ref:u,onFocusFromOutsideViewport:()=>{const v=h({tabbingDirection:"forwards"});Co(v)}}),s.jsx(Zs.Slot,{scope:n,children:s.jsx(re.ol,{tabIndex:-1,...o,ref:g})}),_&&s.jsx(os,{ref:p,onFocusFromOutsideViewport:()=>{const v=h({tabbingDirection:"backwards"});Co(v)}})]})});Yl.displayName=Gl;var Kl="ToastFocusProxy",os=d.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,o=no(Kl,n);return s.jsx(to,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const c=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(c))&&r()}})});os.displayName=Kl;var ea="Toast",Th="toast.swipeStart",Sh="toast.swipeMove",Ph="toast.swipeCancel",Eh="toast.swipeEnd",Ql=d.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:o,...i}=e,[c,l]=zr({prop:r,defaultProp:a??!0,onChange:o,caller:ea});return s.jsx(En,{present:n||c,children:s.jsx(Nh,{open:c,...i,ref:t,onClose:()=>l(!1),onPause:Ie(e.onPause),onResume:Ie(e.onResume),onSwipeStart:q(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:q(e.onSwipeMove,u=>{const{x:p,y:m}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:q(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:q(e.onSwipeEnd,u=>{const{x:p,y:m}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),l(!1)})})})});Ql.displayName=ea;var[Ah,jh]=Ul(ea,{onClose(){}}),Nh=d.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:o,onClose:i,onEscapeKeyDown:c,onPause:l,onResume:u,onSwipeStart:p,onSwipeMove:m,onSwipeCancel:g,onSwipeEnd:f,..._}=e,h=no(ea,n),[v,x]=d.useState(null),y=he(t,O=>x(O)),b=d.useRef(null),w=d.useRef(null),C=a||h.duration,S=d.useRef(0),P=d.useRef(C),T=d.useRef(0),{onToastAdd:E,onToastRemove:M}=h,R=Ie(()=>{var Y;(v==null?void 0:v.contains(document.activeElement))&&((Y=h.viewport)==null||Y.focus()),i()}),N=d.useCallback(O=>{!O||O===1/0||(window.clearTimeout(T.current),S.current=new Date().getTime(),T.current=window.setTimeout(R,O))},[R]);d.useEffect(()=>{const O=h.viewport;if(O){const Y=()=>{N(P.current),u==null||u()},F=()=>{const D=new Date().getTime()-S.current;P.current=P.current-D,window.clearTimeout(T.current),l==null||l()};return O.addEventListener(rs,F),O.addEventListener(as,Y),()=>{O.removeEventListener(rs,F),O.removeEventListener(as,Y)}}},[h.viewport,C,l,u,N]),d.useEffect(()=>{o&&!h.isClosePausedRef.current&&N(C)},[o,C,h.isClosePausedRef,N]),d.useEffect(()=>(E(),()=>M()),[E,M]);const L=d.useMemo(()=>v?ru(v):null,[v]);return h.viewport?s.jsxs(s.Fragment,{children:[L&&s.jsx(Mh,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),s.jsx(Ah,{scope:n,onClose:R,children:gr.createPortal(s.jsx(Zs.ItemSlot,{scope:n,children:s.jsx(uh,{asChild:!0,onEscapeKeyDown:q(c,()=>{h.isFocusedToastEscapeKeyDownRef.current||R(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(re.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":h.swipeDirection,..._,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:q(e.onKeyDown,O=>{O.key==="Escape"&&(c==null||c(O.nativeEvent),O.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:q(e.onPointerDown,O=>{O.button===0&&(b.current={x:O.clientX,y:O.clientY})}),onPointerMove:q(e.onPointerMove,O=>{if(!b.current)return;const Y=O.clientX-b.current.x,F=O.clientY-b.current.y,D=!!w.current,A=["left","right"].includes(h.swipeDirection),j=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,W=A?j(0,Y):0,G=A?0:j(0,F),Q=O.pointerType==="touch"?10:2,K={x:W,y:G},te={originalEvent:O,delta:K};D?(w.current=K,ma(Sh,m,te,{discrete:!1})):oc(K,h.swipeDirection,Q)?(w.current=K,ma(Th,p,te,{discrete:!1}),O.target.setPointerCapture(O.pointerId)):(Math.abs(Y)>Q||Math.abs(F)>Q)&&(b.current=null)}),onPointerUp:q(e.onPointerUp,O=>{const Y=w.current,F=O.target;if(F.hasPointerCapture(O.pointerId)&&F.releasePointerCapture(O.pointerId),w.current=null,b.current=null,Y){const D=O.currentTarget,A={originalEvent:O,delta:Y};oc(Y,h.swipeDirection,h.swipeThreshold)?ma(Eh,f,A,{discrete:!0}):ma(Ph,g,A,{discrete:!0}),D.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Mh=e=>{const{__scopeToast:t,children:n,...r}=e,a=no(ea,t),[o,i]=d.useState(!1),[c,l]=d.useState(!1);return Ih(()=>i(!0)),d.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),c?null:s.jsx(eo,{asChild:!0,children:s.jsx(to,{...r,children:o&&s.jsxs(s.Fragment,{children:[a.label," ",n]})})})},Rh="ToastTitle",Xl=d.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(re.div,{...r,ref:t})});Xl.displayName=Rh;var Dh="ToastDescription",Jl=d.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(re.div,{...r,ref:t})});Jl.displayName=Dh;var Zl="ToastAction",eu=d.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?s.jsx(nu,{altText:n,asChild:!0,children:s.jsx(ei,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Zl}\`. Expected non-empty \`string\`.`),null)});eu.displayName=Zl;var tu="ToastClose",ei=d.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=jh(tu,n);return s.jsx(nu,{asChild:!0,children:s.jsx(re.button,{type:"button",...r,ref:t,onClick:q(e.onClick,a.onClose)})})});ei.displayName=tu;var nu=d.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return s.jsx(re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function ru(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Oh(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!a)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...ru(r))}}),t}function ma(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Xs(a,o):a.dispatchEvent(o)}var oc=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),o=r>a;return t==="left"||t==="right"?o&&r>n:!o&&a>n};function Ih(e=()=>{}){const t=Ie(e);Ce(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Oh(e){return e.nodeType===e.ELEMENT_NODE}function zh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Co(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Lh=Hl,au=Yl,ou=Ql,su=Xl,iu=Jl,cu=eu,lu=ei;const sc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ic=Ll,ti=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ic(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(u=>{const p=n==null?void 0:n[u],m=o==null?void 0:o[u];if(p===null)return null;const g=sc(p)||sc(m);return a[u][g]}),c=n&&Object.entries(n).reduce((u,p)=>{let[m,g]=p;return g===void 0||(u[m]=g),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:m,className:g,...f}=p;return Object.entries(f).every(_=>{let[h,v]=_;return Array.isArray(v)?v.includes({...o,...c}[h]):{...o,...c}[h]===v})?[...u,m,g]:u},[]);return ic(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},ni="-",Fh=e=>{const t=qh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const c=i.split(ni);return c[0]===""&&c.length!==1&&c.shift(),uu(c,t)||Wh(i)},getConflictingClassGroupIds:(i,c)=>{const l=n[i]||[];return c&&r[i]?[...l,...r[i]]:l}}},uu=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?uu(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(ni);return(i=t.validators.find(({validator:c})=>c(o)))==null?void 0:i.classGroupId},cc=/^\[(.+)\]$/,Wh=e=>{if(cc.test(e)){const t=cc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},qh=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return $h(Object.entries(e.classGroups),n).forEach(([o,i])=>{ss(i,r,o,t)}),r},ss=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:lc(t,a);o.classGroupId=n;return}if(typeof a=="function"){if(Bh(a)){ss(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,i])=>{ss(i,lc(t,o),n,r)})})},lc=(e,t)=>{let n=e;return t.split(ni).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Bh=e=>e.isThemeGetter,$h=(e,t)=>t?e.map(([n,r])=>{const a=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,c])=>[t+i,c])):o);return[n,a]}):e,Vh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return a(o,i),i},set(o,i){n.has(o)?n.set(o,i):a(o,i)}}},du="!",Uh=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],o=t.length,i=c=>{const l=[];let u=0,p=0,m;for(let v=0;vp?m-p:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:_,maybePostfixModifierPosition:h}};return n?c=>n({className:c,parseClassName:i}):i},Hh=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},Gh=e=>({cache:Vh(e.cacheSize),parseClassName:Uh(e),...Fh(e)}),Yh=/\s+/,Kh=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,o=[],i=e.trim().split(Yh);let c="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:f}=n(u);let _=!!f,h=r(_?g.substring(0,f):g);if(!h){if(!_){c=u+(c.length>0?" "+c:c);continue}if(h=r(g),!h){c=u+(c.length>0?" "+c:c);continue}_=!1}const v=Hh(p).join(":"),x=m?v+du:v,y=x+h;if(o.includes(y))continue;o.push(y);const b=a(h,_);for(let w=0;w0?" "+c:c)}return c};function Qh(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rm(p),e());return n=Gh(u),r=n.cache.get,a=n.cache.set,o=c,c(l)}function c(l){const u=r(l);if(u)return u;const p=Kh(l,n);return a(l,p),p}return function(){return o(Qh.apply(null,arguments))}}const _e=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},pu=/^\[(?:([a-z-]+):)?(.+)\]$/i,Jh=/^\d+\/\d+$/,Zh=new Set(["px","full","screen"]),eg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tg=/\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$/,ng=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ag=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,St=e=>Vn(e)||Zh.has(e)||Jh.test(e),Ft=e=>vr(e,"length",fg),Vn=e=>!!e&&!Number.isNaN(Number(e)),ko=e=>vr(e,"number",Vn),Sr=e=>!!e&&Number.isInteger(Number(e)),og=e=>e.endsWith("%")&&Vn(e.slice(0,-1)),ne=e=>pu.test(e),Wt=e=>eg.test(e),sg=new Set(["length","size","percentage"]),ig=e=>vr(e,sg,mu),cg=e=>vr(e,"position",mu),lg=new Set(["image","url"]),ug=e=>vr(e,lg,mg),dg=e=>vr(e,"",pg),Pr=()=>!0,vr=(e,t,n)=>{const r=pu.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},fg=e=>tg.test(e)&&!ng.test(e),mu=()=>!1,pg=e=>rg.test(e),mg=e=>ag.test(e),hg=()=>{const e=_e("colors"),t=_e("spacing"),n=_e("blur"),r=_e("brightness"),a=_e("borderColor"),o=_e("borderRadius"),i=_e("borderSpacing"),c=_e("borderWidth"),l=_e("contrast"),u=_e("grayscale"),p=_e("hueRotate"),m=_e("invert"),g=_e("gap"),f=_e("gradientColorStops"),_=_e("gradientColorStopPositions"),h=_e("inset"),v=_e("margin"),x=_e("opacity"),y=_e("padding"),b=_e("saturate"),w=_e("scale"),C=_e("sepia"),S=_e("skew"),P=_e("space"),T=_e("translate"),E=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",ne,t],N=()=>[ne,t],L=()=>["",St,Ft],O=()=>["auto",Vn,ne],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",ne],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[Vn,ne];return{cacheSize:500,separator:":",theme:{colors:[Pr],spacing:[St,Ft],blur:["none","",Wt,ne],brightness:G(),borderColor:[e],borderRadius:["none","","full",Wt,ne],borderSpacing:N(),borderWidth:L(),contrast:G(),grayscale:j(),hueRotate:G(),invert:j(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[og,Ft],inset:R(),margin:R(),opacity:G(),padding:N(),saturate:G(),scale:G(),sepia:j(),skew:G(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",ne]}],container:["container"],columns:[{columns:[Wt]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"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:[...Y(),ne]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sr,ne]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ne]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Sr,ne]}],"grid-cols":[{"grid-cols":[Pr]}],"col-start-end":[{col:["auto",{span:["full",Sr,ne]},ne]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[Pr]}],"row-start-end":[{row:["auto",{span:[Sr,ne]},ne]}],"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",ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ne]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ne,t]}],"min-w":[{"min-w":[ne,t,"min","max","fit"]}],"max-w":[{"max-w":[ne,t,"none","full","min","max","fit","prose",{screen:[Wt]},Wt]}],h:[{h:[ne,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ne,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Wt,Ft]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ko]}],"font-family":[{font:[Pr]}],"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",ne]}],"line-clamp":[{"line-clamp":["none",Vn,ko]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",St,ne]}],"list-image":[{"list-image":["none",ne]}],"list-style-type":[{list:["none","disc","decimal",ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",St,Ft]}],"underline-offset":[{"underline-offset":["auto",St,ne]}],"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:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne]}],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",ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),cg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ig]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ug]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:F()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[St,ne]}],"outline-w":[{outline:[St,Ft]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[St,Ft]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wt,dg]}],"shadow-color":[{shadow:[Pr]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Wt,ne]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[b]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"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",ne]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",ne]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Sr,ne]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ne]}],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",ne]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",ne]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[St,Ft,ko]}],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"]}}},gg=Xh(hg);function U(...e){return gg(Ll(e))}const vg=Lh,hu=d.forwardRef(({className:e,...t},n)=>s.jsx(au,{ref:n,className:U("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));hu.displayName=au.displayName;const _g=ti("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),gu=d.forwardRef(({className:e,variant:t,...n},r)=>s.jsx(ou,{ref:r,className:U(_g({variant:t}),e),...n}));gu.displayName=ou.displayName;const yg=d.forwardRef(({className:e,...t},n)=>s.jsx(cu,{ref:n,className:U("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));yg.displayName=cu.displayName;const vu=d.forwardRef(({className:e,...t},n)=>s.jsx(lu,{ref:n,className:U("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(Ya,{className:"h-4 w-4"})}));vu.displayName=lu.displayName;const _u=d.forwardRef(({className:e,...t},n)=>s.jsx(su,{ref:n,className:U("text-sm font-semibold",e),...t}));_u.displayName=su.displayName;const yu=d.forwardRef(({className:e,...t},n)=>s.jsx(iu,{ref:n,className:U("text-sm opacity-90",e),...t}));yu.displayName=iu.displayName;function bg(){const{toasts:e}=Xa();return s.jsxs(vg,{children:[e.map(function({id:t,title:n,description:r,action:a,...o}){return s.jsxs(gu,{...o,children:[s.jsxs("div",{className:"grid gap-1",children:[n&&s.jsx(_u,{children:n}),r&&s.jsx(yu,{children:r})]}),a,s.jsx(vu,{})]},t)}),s.jsx(hu,{})]})}var uc=["light","dark"],xg="(prefers-color-scheme: dark)",wg=d.createContext(void 0),Cg={setTheme:e=>{},themes:[]},kg=()=>{var e;return(e=d.useContext(wg))!=null?e:Cg};d.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:o,value:i,attrs:c,nonce:l})=>{let u=o==="system",p=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${c.map(_=>`'${_}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,m=a?uc.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",g=(_,h=!1,v=!0)=>{let x=i?i[_]:_,y=h?_+"|| ''":`'${x}'`,b="";return a&&v&&!h&&uc.includes(_)&&(b+=`d.style.colorScheme = '${_}';`),n==="class"?h||x?b+=`c.add(${y})`:b+="null":x&&(b+=`d[s](n,${y})`),b},f=e?`!function(){${p}${g(e)}}()`:r?`!function(){try{${p}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${xg}',m=window.matchMedia(t);if(m.media!==t||m.matches){${g("dark")}}else{${g("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${g(i?"x[e]":"e",!0)}}${u?"":"else{"+g(o,!1,!1)+"}"}${m}}catch(e){}}()`:`!function(){try{${p}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${g(i?"x[e]":"e",!0)}}else{${g(o,!1,!1)};}${m}}catch(t){}}();`;return d.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var Tg=e=>{switch(e){case"success":return Eg;case"info":return jg;case"warning":return Ag;case"error":return Ng;default:return null}},Sg=Array(12).fill(0),Pg=({visible:e,className:t})=>I.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},Sg.map((n,r)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Eg=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Ag=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),jg=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Ng=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Mg=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Rg=()=>{let[e,t]=I.useState(document.hidden);return I.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},is=1,Dg=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,a=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:is++,o=this.toasts.find(c=>c.id===a),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),o?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...e,id:a,title:n}),{...c,...e,id:a,dismissible:i,title:n}):c):this.addToast({title:n,...r,dismissible:i,id:a}),a},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),a=n!==void 0,o,i=r.then(async l=>{if(o=["resolve",l],I.isValidElement(l))a=!1,this.create({id:n,type:"default",message:l});else if(Og(l)&&!l.ok){a=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:u,description:p})}else if(t.success!==void 0){a=!1;let u=typeof t.success=="function"?await t.success(l):t.success,p=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:u,description:p})}}).catch(async l=>{if(o=["reject",l],t.error!==void 0){a=!1;let u=typeof t.error=="function"?await t.error(l):t.error,p=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:u,description:p})}}).finally(()=>{var l;a&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),c=()=>new Promise((l,u)=>i.then(()=>o[0]==="reject"?u(o[1]):l(o[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||is++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Le=new Dg,Ig=(e,t)=>{let n=(t==null?void 0:t.id)||is++;return Le.addToast({title:e,...t,id:n}),n},Og=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",zg=Ig,Lg=()=>Le.toasts,Fg=()=>Le.getActiveToasts(),FS=Object.assign(zg,{success:Le.success,info:Le.info,warning:Le.warning,error:Le.error,custom:Le.custom,message:Le.message,promise:Le.promise,dismiss:Le.dismiss,loading:Le.loading},{getHistory:Lg,getToasts:Fg});function Wg(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Wg(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} `);function ha(e){return e.label!==void 0}var qg=3,Bg="32px",$g="16px",dc=4e3,Vg=356,Ug=14,Hg=20,Gg=200;function nt(...e){return e.filter(Boolean).join(" ")}function Yg(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var Kg=e=>{var t,n,r,a,o,i,c,l,u,p,m;let{invert:g,toast:f,unstyled:_,interacting:h,setHeights:v,visibleToasts:x,heights:y,index:b,toasts:w,expanded:C,removeToast:S,defaultRichColors:P,closeButton:T,style:E,cancelButtonStyle:M,actionButtonStyle:R,className:N="",descriptionClassName:L="",duration:O,position:Y,gap:F,loadingIcon:D,expandByDefault:A,classNames:j,icons:W,closeButtonAriaLabel:G="Close toast",pauseWhenPageIsHidden:Q}=e,[K,te]=I.useState(null),[ge,ye]=I.useState(null),[z,le]=I.useState(!1),[ue,se]=I.useState(!1),[ie,de]=I.useState(!1),[je,Ue]=I.useState(!1),[sn,It]=I.useState(!1),[cn,kr]=I.useState(0),[Mn,Gi]=I.useState(0),Tr=I.useRef(f.duration||O||dc),Yi=I.useRef(null),ln=I.useRef(null),lm=b===0,um=b+1<=x,He=f.type,Rn=f.dismissible!==!1,dm=f.className||"",fm=f.descriptionClassName||"",da=I.useMemo(()=>y.findIndex(ee=>ee.toastId===f.id)||0,[y,f.id]),pm=I.useMemo(()=>{var ee;return(ee=f.closeButton)!=null?ee:T},[f.closeButton,T]),Ki=I.useMemo(()=>f.duration||O||dc,[f.duration,O]),_o=I.useRef(0),Dn=I.useRef(0),Qi=I.useRef(0),In=I.useRef(null),[mm,hm]=Y.split("-"),Xi=I.useMemo(()=>y.reduce((ee,me,be)=>be>=da?ee:ee+me.height,0),[y,da]),Ji=Rg(),gm=f.invert||g,yo=He==="loading";Dn.current=I.useMemo(()=>da*F+Xi,[da,Xi]),I.useEffect(()=>{Tr.current=Ki},[Ki]),I.useEffect(()=>{le(!0)},[]),I.useEffect(()=>{let ee=ln.current;if(ee){let me=ee.getBoundingClientRect().height;return Gi(me),v(be=>[{toastId:f.id,height:me,position:f.position},...be]),()=>v(be=>be.filter(Ze=>Ze.toastId!==f.id))}},[v,f.id]),I.useLayoutEffect(()=>{if(!z)return;let ee=ln.current,me=ee.style.height;ee.style.height="auto";let be=ee.getBoundingClientRect().height;ee.style.height=me,Gi(be),v(Ze=>Ze.find(et=>et.toastId===f.id)?Ze.map(et=>et.toastId===f.id?{...et,height:be}:et):[{toastId:f.id,height:be,position:f.position},...Ze])},[z,f.title,f.description,v,f.id]);let Ot=I.useCallback(()=>{se(!0),kr(Dn.current),v(ee=>ee.filter(me=>me.toastId!==f.id)),setTimeout(()=>{S(f)},Gg)},[f,S,v,Dn]);I.useEffect(()=>{if(f.promise&&He==="loading"||f.duration===1/0||f.type==="loading")return;let ee;return C||h||Q&&Ji?(()=>{if(Qi.current<_o.current){let me=new Date().getTime()-_o.current;Tr.current=Tr.current-me}Qi.current=new Date().getTime()})():Tr.current!==1/0&&(_o.current=new Date().getTime(),ee=setTimeout(()=>{var me;(me=f.onAutoClose)==null||me.call(f,f),Ot()},Tr.current)),()=>clearTimeout(ee)},[C,h,f,He,Q,Ji,Ot]),I.useEffect(()=>{f.delete&&Ot()},[Ot,f.delete]);function vm(){var ee,me,be;return W!=null&&W.loading?I.createElement("div",{className:nt(j==null?void 0:j.loader,(ee=f==null?void 0:f.classNames)==null?void 0:ee.loader,"sonner-loader"),"data-visible":He==="loading"},W.loading):D?I.createElement("div",{className:nt(j==null?void 0:j.loader,(me=f==null?void 0:f.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":He==="loading"},D):I.createElement(Pg,{className:nt(j==null?void 0:j.loader,(be=f==null?void 0:f.classNames)==null?void 0:be.loader),visible:He==="loading"})}return I.createElement("li",{tabIndex:0,ref:ln,className:nt(N,dm,j==null?void 0:j.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,j==null?void 0:j.default,j==null?void 0:j[He],(n=f==null?void 0:f.classNames)==null?void 0:n[He]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:P,"data-styled":!(f.jsx||f.unstyled||_),"data-mounted":z,"data-promise":!!f.promise,"data-swiped":sn,"data-removed":ue,"data-visible":um,"data-y-position":mm,"data-x-position":hm,"data-index":b,"data-front":lm,"data-swiping":ie,"data-dismissible":Rn,"data-type":He,"data-invert":gm,"data-swipe-out":je,"data-swipe-direction":ge,"data-expanded":!!(C||A&&z),style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${ue?cn:Dn.current}px`,"--initial-height":A?"auto":`${Mn}px`,...E,...f.style},onDragEnd:()=>{de(!1),te(null),In.current=null},onPointerDown:ee=>{yo||!Rn||(Yi.current=new Date,kr(Dn.current),ee.target.setPointerCapture(ee.pointerId),ee.target.tagName!=="BUTTON"&&(de(!0),In.current={x:ee.clientX,y:ee.clientY}))},onPointerUp:()=>{var ee,me,be,Ze;if(je||!Rn)return;In.current=null;let et=Number(((ee=ln.current)==null?void 0:ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),zt=Number(((me=ln.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),un=new Date().getTime()-((be=Yi.current)==null?void 0:be.getTime()),tt=K==="x"?et:zt,Lt=Math.abs(tt)/un;if(Math.abs(tt)>=Hg||Lt>.11){kr(Dn.current),(Ze=f.onDismiss)==null||Ze.call(f,f),ye(K==="x"?et>0?"right":"left":zt>0?"down":"up"),Ot(),Ue(!0),It(!1);return}de(!1),te(null)},onPointerMove:ee=>{var me,be,Ze,et;if(!In.current||!Rn||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;let zt=ee.clientY-In.current.y,un=ee.clientX-In.current.x,tt=(be=e.swipeDirections)!=null?be:Yg(Y);!K&&(Math.abs(un)>1||Math.abs(zt)>1)&&te(Math.abs(un)>Math.abs(zt)?"x":"y");let Lt={x:0,y:0};K==="y"?(tt.includes("top")||tt.includes("bottom"))&&(tt.includes("top")&&zt<0||tt.includes("bottom")&&zt>0)&&(Lt.y=zt):K==="x"&&(tt.includes("left")||tt.includes("right"))&&(tt.includes("left")&&un<0||tt.includes("right")&&un>0)&&(Lt.x=un),(Math.abs(Lt.x)>0||Math.abs(Lt.y)>0)&&It(!0),(Ze=ln.current)==null||Ze.style.setProperty("--swipe-amount-x",`${Lt.x}px`),(et=ln.current)==null||et.style.setProperty("--swipe-amount-y",`${Lt.y}px`)}},pm&&!f.jsx?I.createElement("button",{"aria-label":G,"data-disabled":yo,"data-close-button":!0,onClick:yo||!Rn?()=>{}:()=>{var ee;Ot(),(ee=f.onDismiss)==null||ee.call(f,f)},className:nt(j==null?void 0:j.closeButton,(a=f==null?void 0:f.classNames)==null?void 0:a.closeButton)},(o=W==null?void 0:W.close)!=null?o:Mg):null,f.jsx||d.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:I.createElement(I.Fragment,null,He||f.icon||f.promise?I.createElement("div",{"data-icon":"",className:nt(j==null?void 0:j.icon,(i=f==null?void 0:f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||vm():null,f.type!=="loading"?f.icon||(W==null?void 0:W[He])||Tg(He):null):null,I.createElement("div",{"data-content":"",className:nt(j==null?void 0:j.content,(c=f==null?void 0:f.classNames)==null?void 0:c.content)},I.createElement("div",{"data-title":"",className:nt(j==null?void 0:j.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?I.createElement("div",{"data-description":"",className:nt(L,fm,j==null?void 0:j.description,(u=f==null?void 0:f.classNames)==null?void 0:u.description)},typeof f.description=="function"?f.description():f.description):null),d.isValidElement(f.cancel)?f.cancel:f.cancel&&ha(f.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||M,onClick:ee=>{var me,be;ha(f.cancel)&&Rn&&((be=(me=f.cancel).onClick)==null||be.call(me,ee),Ot())},className:nt(j==null?void 0:j.cancelButton,(p=f==null?void 0:f.classNames)==null?void 0:p.cancelButton)},f.cancel.label):null,d.isValidElement(f.action)?f.action:f.action&&ha(f.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||R,onClick:ee=>{var me,be;ha(f.action)&&((be=(me=f.action).onClick)==null||be.call(me,ee),!ee.defaultPrevented&&Ot())},className:nt(j==null?void 0:j.actionButton,(m=f==null?void 0:f.classNames)==null?void 0:m.actionButton)},f.action.label):null))};function fc(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Qg(e,t){let n={};return[e,t].forEach((r,a)=>{let o=a===1,i=o?"--mobile-offset":"--offset",c=o?$g:Bg;function l(u){["top","right","bottom","left"].forEach(p=>{n[`${i}-${p}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=c:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(c)}),n}var Xg=d.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:i,className:c,offset:l,mobileOffset:u,theme:p="light",richColors:m,duration:g,style:f,visibleToasts:_=qg,toastOptions:h,dir:v=fc(),gap:x=Ug,loadingIcon:y,icons:b,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:C}=e,[S,P]=I.useState([]),T=I.useMemo(()=>Array.from(new Set([r].concat(S.filter(Q=>Q.position).map(Q=>Q.position)))),[S,r]),[E,M]=I.useState([]),[R,N]=I.useState(!1),[L,O]=I.useState(!1),[Y,F]=I.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=I.useRef(null),A=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=I.useRef(null),W=I.useRef(!1),G=I.useCallback(Q=>{P(K=>{var te;return(te=K.find(ge=>ge.id===Q.id))!=null&&te.delete||Le.dismiss(Q.id),K.filter(({id:ge})=>ge!==Q.id)})},[]);return I.useEffect(()=>Le.subscribe(Q=>{if(Q.dismiss){P(K=>K.map(te=>te.id===Q.id?{...te,delete:!0}:te));return}setTimeout(()=>{Il.flushSync(()=>{P(K=>{let te=K.findIndex(ge=>ge.id===Q.id);return te!==-1?[...K.slice(0,te),{...K[te],...Q},...K.slice(te+1)]:[Q,...K]})})})}),[]),I.useEffect(()=>{if(p!=="system"){F(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:K})=>{F(K?"dark":"light")})}catch{Q.addListener(({matches:te})=>{try{F(te?"dark":"light")}catch(ge){console.error(ge)}})}},[p]),I.useEffect(()=>{S.length<=1&&N(!1)},[S]),I.useEffect(()=>{let Q=K=>{var te,ge;a.every(ye=>K[ye]||K.code===ye)&&(N(!0),(te=D.current)==null||te.focus()),K.code==="Escape"&&(document.activeElement===D.current||(ge=D.current)!=null&&ge.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[a]),I.useEffect(()=>{if(D.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,W.current=!1)}},[D.current]),I.createElement("section",{ref:t,"aria-label":`${w} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((Q,K)=>{var te;let[ge,ye]=Q.split("-");return S.length?I.createElement("ol",{key:Q,dir:v==="auto"?fc():v,tabIndex:-1,ref:D,className:c,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":ge,"data-lifted":R&&S.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((te=E[0])==null?void 0:te.height)||0}px`,"--width":`${Vg}px`,"--gap":`${x}px`,...f,...Qg(l,u)},onBlur:z=>{W.current&&!z.currentTarget.contains(z.relatedTarget)&&(W.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||W.current||(W.current=!0,j.current=z.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{L||N(!1)},onDragEnd:()=>N(!1),onPointerDown:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||O(!0)},onPointerUp:()=>O(!1)},S.filter(z=>!z.position&&K===0||z.position===Q).map((z,le)=>{var ue,se;return I.createElement(Kg,{key:z.id,icons:b,index:le,toast:z,defaultRichColors:m,duration:(ue=h==null?void 0:h.duration)!=null?ue:g,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:n,visibleToasts:_,closeButton:(se=h==null?void 0:h.closeButton)!=null?se:i,interacting:L,position:Q,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:G,toasts:S.filter(ie=>ie.position==z.position),heights:E.filter(ie=>ie.position==z.position),setHeights:M,expandByDefault:o,gap:x,loadingIcon:y,expanded:R,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const Jg=({...e})=>{const{theme:t="system"}=kg();return s.jsx(Xg,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var Zg=Ol[" useId ".trim().toString()]||(()=>{}),ev=0;function ur(e){const[t,n]=d.useState(Zg());return Ce(()=>{n(r=>r??String(ev++))},[e]),t?`radix-${t}`:""}const tv=["top","right","bottom","left"],tn=Math.min,Be=Math.max,za=Math.round,ga=Math.floor,xt=e=>({x:e,y:e}),nv={left:"right",right:"left",bottom:"top",top:"bottom"},rv={start:"end",end:"start"};function cs(e,t,n){return Be(e,tn(t,n))}function Mt(e,t){return typeof e=="function"?e(t):e}function Rt(e){return e.split("-")[0]}function _r(e){return e.split("-")[1]}function ri(e){return e==="x"?"y":"x"}function ai(e){return e==="y"?"height":"width"}const av=new Set(["top","bottom"]);function yt(e){return av.has(Rt(e))?"y":"x"}function oi(e){return ri(yt(e))}function ov(e,t,n){n===void 0&&(n=!1);const r=_r(e),a=oi(e),o=ai(a);let i=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=La(i)),[i,La(i)]}function sv(e){const t=La(e);return[ls(e),t,ls(t)]}function ls(e){return e.replace(/start|end/g,t=>rv[t])}const pc=["left","right"],mc=["right","left"],iv=["top","bottom"],cv=["bottom","top"];function lv(e,t,n){switch(e){case"top":case"bottom":return n?t?mc:pc:t?pc:mc;case"left":case"right":return t?iv:cv;default:return[]}}function uv(e,t,n,r){const a=_r(e);let o=lv(Rt(e),n==="start",r);return a&&(o=o.map(i=>i+"-"+a),t&&(o=o.concat(o.map(ls)))),o}function La(e){return e.replace(/left|right|bottom|top/g,t=>nv[t])}function dv(e){return{top:0,right:0,bottom:0,left:0,...e}}function bu(e){return typeof e!="number"?dv(e):{top:e,right:e,bottom:e,left:e}}function Fa(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function hc(e,t,n){let{reference:r,floating:a}=e;const o=yt(t),i=oi(t),c=ai(i),l=Rt(t),u=o==="y",p=r.x+r.width/2-a.width/2,m=r.y+r.height/2-a.height/2,g=r[c]/2-a[c]/2;let f;switch(l){case"top":f={x:p,y:r.y-a.height};break;case"bottom":f={x:p,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:m};break;case"left":f={x:r.x-a.width,y:m};break;default:f={x:r.x,y:r.y}}switch(_r(t)){case"start":f[i]-=g*(n&&u?-1:1);break;case"end":f[i]+=g*(n&&u?-1:1);break}return f}const fv=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,c=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:m}=hc(u,r,l),g=r,f={},_=0;for(let h=0;h({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:c,middlewareData:l}=t,{element:u,padding:p=0}=Mt(e,t)||{};if(u==null)return{};const m=bu(p),g={x:n,y:r},f=oi(a),_=ai(f),h=await i.getDimensions(u),v=f==="y",x=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=o.reference[_]+o.reference[f]-g[f]-o.floating[_],C=g[f]-o.reference[f],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let P=S?S[b]:0;(!P||!await(i.isElement==null?void 0:i.isElement(S)))&&(P=c.floating[b]||o.floating[_]);const T=w/2-C/2,E=P/2-h[_]/2-1,M=tn(m[x],E),R=tn(m[y],E),N=M,L=P-h[_]-R,O=P/2-h[_]/2+T,Y=cs(N,O,L),F=!l.arrow&&_r(a)!=null&&O!==Y&&o.reference[_]/2-(OO<=0)){var R,N;const O=(((R=o.flip)==null?void 0:R.index)||0)+1,Y=P[O];if(Y&&(!(m==="alignment"?y!==yt(Y):!1)||M.every(A=>A.overflows[0]>0&&yt(A.placement)===y)))return{data:{index:O,overflows:M},reset:{placement:Y}};let F=(N=M.filter(D=>D.overflows[0]<=0).sort((D,A)=>D.overflows[1]-A.overflows[1])[0])==null?void 0:N.placement;if(!F)switch(f){case"bestFit":{var L;const D=(L=M.filter(A=>{if(S){const j=yt(A.placement);return j===y||j==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(j=>j>0).reduce((j,W)=>j+W,0)]).sort((A,j)=>A[1]-j[1])[0])==null?void 0:L[0];D&&(F=D);break}case"initialPlacement":F=c;break}if(a!==F)return{reset:{placement:F}}}return{}}}};function gc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vc(e){return tv.some(t=>e[t]>=0)}const hv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=Mt(e,t);switch(r){case"referenceHidden":{const o=await Lr(t,{...a,elementContext:"reference"}),i=gc(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:vc(i)}}}case"escaped":{const o=await Lr(t,{...a,altBoundary:!0}),i=gc(o,n.floating);return{data:{escapedOffsets:i,escaped:vc(i)}}}default:return{}}}}},xu=new Set(["left","top"]);async function gv(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),i=Rt(n),c=_r(n),l=yt(n)==="y",u=xu.has(i)?-1:1,p=o&&l?-1:1,m=Mt(t,e);let{mainAxis:g,crossAxis:f,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(f=c==="end"?_*-1:_),l?{x:f*p,y:g*u}:{x:g*u,y:f*p}}const vv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:c}=t,l=await gv(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},_v=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:c={fn:v=>{let{x,y}=v;return{x,y}}},...l}=Mt(e,t),u={x:n,y:r},p=await Lr(t,l),m=yt(Rt(a)),g=ri(m);let f=u[g],_=u[m];if(o){const v=g==="y"?"top":"left",x=g==="y"?"bottom":"right",y=f+p[v],b=f-p[x];f=cs(y,f,b)}if(i){const v=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=_+p[v],b=_-p[x];_=cs(y,_,b)}const h=c.fn({...t,[g]:f,[m]:_});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[g]:o,[m]:i}}}}}},yv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Mt(e,t),p={x:n,y:r},m=yt(a),g=ri(m);let f=p[g],_=p[m];const h=Mt(c,t),v=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const b=g==="y"?"height":"width",w=o.reference[g]-o.floating[b]+v.mainAxis,C=o.reference[g]+o.reference[b]-v.mainAxis;fC&&(f=C)}if(u){var x,y;const b=g==="y"?"width":"height",w=xu.has(Rt(a)),C=o.reference[m]-o.floating[b]+(w&&((x=i.offset)==null?void 0:x[m])||0)+(w?0:v.crossAxis),S=o.reference[m]+o.reference[b]+(w?0:((y=i.offset)==null?void 0:y[m])||0)-(w?v.crossAxis:0);_S&&(_=S)}return{[g]:f,[m]:_}}}},bv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:c}=t,{apply:l=()=>{},...u}=Mt(e,t),p=await Lr(t,u),m=Rt(a),g=_r(a),f=yt(a)==="y",{width:_,height:h}=o.floating;let v,x;m==="top"||m==="bottom"?(v=m,x=g===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(x=m,v=g==="end"?"top":"bottom");const y=h-p.top-p.bottom,b=_-p.left-p.right,w=tn(h-p[v],y),C=tn(_-p[x],b),S=!t.middlewareData.shift;let P=w,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=y),S&&!g){const M=Be(p.left,0),R=Be(p.right,0),N=Be(p.top,0),L=Be(p.bottom,0);f?T=_-2*(M!==0||R!==0?M+R:Be(p.left,p.right)):P=h-2*(N!==0||L!==0?N+L:Be(p.top,p.bottom))}await l({...t,availableWidth:T,availableHeight:P});const E=await i.getDimensions(c.floating);return _!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function ro(){return typeof window<"u"}function yr(e){return wu(e)?(e.nodeName||"").toLowerCase():"#document"}function $e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kt(e){var t;return(t=(wu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wu(e){return ro()?e instanceof Node||e instanceof $e(e).Node:!1}function it(e){return ro()?e instanceof Element||e instanceof $e(e).Element:!1}function wt(e){return ro()?e instanceof HTMLElement||e instanceof $e(e).HTMLElement:!1}function _c(e){return!ro()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $e(e).ShadowRoot}const xv=new Set(["inline","contents"]);function ta(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!xv.has(a)}const wv=new Set(["table","td","th"]);function Cv(e){return wv.has(yr(e))}const kv=[":popover-open",":modal"];function ao(e){return kv.some(t=>{try{return e.matches(t)}catch{return!1}})}const Tv=["transform","translate","scale","rotate","perspective"],Sv=["transform","translate","scale","rotate","perspective","filter"],Pv=["paint","layout","strict","content"];function si(e){const t=ii(),n=it(e)?ct(e):e;return Tv.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Sv.some(r=>(n.willChange||"").includes(r))||Pv.some(r=>(n.contain||"").includes(r))}function Ev(e){let t=nn(e);for(;wt(t)&&!dr(t);){if(si(t))return t;if(ao(t))return null;t=nn(t)}return null}function ii(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Av=new Set(["html","body","#document"]);function dr(e){return Av.has(yr(e))}function ct(e){return $e(e).getComputedStyle(e)}function oo(e){return it(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nn(e){if(yr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_c(e)&&e.host||kt(e);return _c(t)?t.host:t}function Cu(e){const t=nn(e);return dr(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&ta(t)?t:Cu(t)}function Fr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=Cu(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),i=$e(a);if(o){const c=us(i);return t.concat(i,i.visualViewport||[],ta(a)?a:[],c&&n?Fr(c):[])}return t.concat(a,Fr(a,[],n))}function us(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ku(e){const t=ct(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=wt(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,c=za(n)!==o||za(r)!==i;return c&&(n=o,r=i),{width:n,height:r,$:c}}function ci(e){return it(e)?e:e.contextElement}function Un(e){const t=ci(e);if(!wt(t))return xt(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=ku(t);let i=(o?za(n.width):n.width)/r,c=(o?za(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const jv=xt(0);function Tu(e){const t=$e(e);return!ii()||!t.visualViewport?jv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Nv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$e(e)?!1:t}function wn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=ci(e);let i=xt(1);t&&(r?it(r)&&(i=Un(r)):i=Un(e));const c=Nv(o,n,r)?Tu(o):xt(0);let l=(a.left+c.x)/i.x,u=(a.top+c.y)/i.y,p=a.width/i.x,m=a.height/i.y;if(o){const g=$e(o),f=r&&it(r)?$e(r):r;let _=g,h=us(_);for(;h&&r&&f!==_;){const v=Un(h),x=h.getBoundingClientRect(),y=ct(h),b=x.left+(h.clientLeft+parseFloat(y.paddingLeft))*v.x,w=x.top+(h.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,m*=v.y,l+=b,u+=w,_=$e(h),h=us(_)}}return Fa({width:p,height:m,x:l,y:u})}function li(e,t){const n=oo(e).scrollLeft;return t?t.left+n:wn(kt(e)).left+n}function Su(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:li(e,r)),o=r.top+t.scrollTop;return{x:a,y:o}}function Mv(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",i=kt(r),c=t?ao(t.floating):!1;if(r===i||c&&o)return n;let l={scrollLeft:0,scrollTop:0},u=xt(1);const p=xt(0),m=wt(r);if((m||!m&&!o)&&((yr(r)!=="body"||ta(i))&&(l=oo(r)),wt(r))){const f=wn(r);u=Un(r),p.x=f.x+r.clientLeft,p.y=f.y+r.clientTop}const g=i&&!m&&!o?Su(i,l,!0):xt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+g.x,y:n.y*u.y-l.scrollTop*u.y+p.y+g.y}}function Rv(e){return Array.from(e.getClientRects())}function Dv(e){const t=kt(e),n=oo(e),r=e.ownerDocument.body,a=Be(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Be(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+li(e);const c=-n.scrollTop;return ct(r).direction==="rtl"&&(i+=Be(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:c}}function Iv(e,t){const n=$e(e),r=kt(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,c=0,l=0;if(a){o=a.width,i=a.height;const u=ii();(!u||u&&t==="fixed")&&(c=a.offsetLeft,l=a.offsetTop)}return{width:o,height:i,x:c,y:l}}const Ov=new Set(["absolute","fixed"]);function zv(e,t){const n=wn(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=wt(e)?Un(e):xt(1),i=e.clientWidth*o.x,c=e.clientHeight*o.y,l=a*o.x,u=r*o.y;return{width:i,height:c,x:l,y:u}}function yc(e,t,n){let r;if(t==="viewport")r=Iv(e,n);else if(t==="document")r=Dv(kt(e));else if(it(t))r=zv(t,n);else{const a=Tu(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Fa(r)}function Pu(e,t){const n=nn(e);return n===t||!it(n)||dr(n)?!1:ct(n).position==="fixed"||Pu(n,t)}function Lv(e,t){const n=t.get(e);if(n)return n;let r=Fr(e,[],!1).filter(c=>it(c)&&yr(c)!=="body"),a=null;const o=ct(e).position==="fixed";let i=o?nn(e):e;for(;it(i)&&!dr(i);){const c=ct(i),l=si(i);!l&&c.position==="fixed"&&(a=null),(o?!l&&!a:!l&&c.position==="static"&&!!a&&Ov.has(a.position)||ta(i)&&!l&&Pu(e,i))?r=r.filter(p=>p!==i):a=c,i=nn(i)}return t.set(e,r),r}function Fv(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const i=[...n==="clippingAncestors"?ao(t)?[]:Lv(t,this._c):[].concat(n),r],c=i[0],l=i.reduce((u,p)=>{const m=yc(t,p,a);return u.top=Be(m.top,u.top),u.right=tn(m.right,u.right),u.bottom=tn(m.bottom,u.bottom),u.left=Be(m.left,u.left),u},yc(t,c,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Wv(e){const{width:t,height:n}=ku(e);return{width:t,height:n}}function qv(e,t,n){const r=wt(t),a=kt(t),o=n==="fixed",i=wn(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const l=xt(0);function u(){l.x=li(a)}if(r||!r&&!o)if((yr(t)!=="body"||ta(a))&&(c=oo(t)),r){const f=wn(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else a&&u();o&&!r&&a&&u();const p=a&&!r&&!o?Su(a,c):xt(0),m=i.left+c.scrollLeft-l.x-p.x,g=i.top+c.scrollTop-l.y-p.y;return{x:m,y:g,width:i.width,height:i.height}}function To(e){return ct(e).position==="static"}function bc(e,t){if(!wt(e)||ct(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return kt(e)===n&&(n=n.ownerDocument.body),n}function Eu(e,t){const n=$e(e);if(ao(e))return n;if(!wt(e)){let a=nn(e);for(;a&&!dr(a);){if(it(a)&&!To(a))return a;a=nn(a)}return n}let r=bc(e,t);for(;r&&Cv(r)&&To(r);)r=bc(r,t);return r&&dr(r)&&To(r)&&!si(r)?n:r||Ev(e)||n}const Bv=async function(e){const t=this.getOffsetParent||Eu,n=this.getDimensions,r=await n(e.floating);return{reference:qv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $v(e){return ct(e).direction==="rtl"}const Vv={convertOffsetParentRelativeRectToViewportRelativeRect:Mv,getDocumentElement:kt,getClippingRect:Fv,getOffsetParent:Eu,getElementRects:Bv,getClientRects:Rv,getDimensions:Wv,getScale:Un,isElement:it,isRTL:$v};function Au(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Uv(e,t){let n=null,r;const a=kt(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:p,top:m,width:g,height:f}=u;if(c||t(),!g||!f)return;const _=ga(m),h=ga(a.clientWidth-(p+g)),v=ga(a.clientHeight-(m+f)),x=ga(p),b={rootMargin:-_+"px "+-h+"px "+-v+"px "+-x+"px",threshold:Be(0,tn(1,l))||1};let w=!0;function C(S){const P=S[0].intersectionRatio;if(P!==l){if(!w)return i();P?i(!1,P):r=setTimeout(()=>{i(!1,1e-7)},1e3)}P===1&&!Au(u,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(C,{...b,root:a.ownerDocument})}catch{n=new IntersectionObserver(C,b)}n.observe(e)}return i(!0),o}function Hv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=ci(e),p=a||o?[...u?Fr(u):[],...Fr(t)]:[];p.forEach(x=>{a&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const m=u&&c?Uv(u,n):null;let g=-1,f=null;i&&(f=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),u&&!l&&f.observe(u),f.observe(t));let _,h=l?wn(e):null;l&&v();function v(){const x=wn(e);h&&!Au(h,x)&&n(),h=x,_=requestAnimationFrame(v)}return n(),()=>{var x;p.forEach(y=>{a&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),m==null||m(),(x=f)==null||x.disconnect(),f=null,l&&cancelAnimationFrame(_)}}const Gv=vv,Yv=_v,Kv=mv,Qv=bv,Xv=hv,xc=pv,Jv=yv,Zv=(e,t,n)=>{const r=new Map,a={platform:Vv,...n},o={...a.platform,_c:r};return fv(e,t,{...a,platform:o})};var e_=typeof document<"u",t_=function(){},Ea=e_?d.useLayoutEffect:t_;function Wa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Wa(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const o=a[r];if(!(o==="_owner"&&e.$$typeof)&&!Wa(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function ju(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wc(e,t){const n=ju(e);return Math.round(t*n)/n}function So(e){const t=d.useRef(e);return Ea(()=>{t.current=e}),t}function n_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[p,m]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,f]=d.useState(r);Wa(g,r)||f(r);const[_,h]=d.useState(null),[v,x]=d.useState(null),y=d.useCallback(A=>{A!==S.current&&(S.current=A,h(A))},[]),b=d.useCallback(A=>{A!==P.current&&(P.current=A,x(A))},[]),w=o||_,C=i||v,S=d.useRef(null),P=d.useRef(null),T=d.useRef(p),E=l!=null,M=So(l),R=So(a),N=So(u),L=d.useCallback(()=>{if(!S.current||!P.current)return;const A={placement:t,strategy:n,middleware:g};R.current&&(A.platform=R.current),Zv(S.current,P.current,A).then(j=>{const W={...j,isPositioned:N.current!==!1};O.current&&!Wa(T.current,W)&&(T.current=W,gr.flushSync(()=>{m(W)}))})},[g,t,n,R,N]);Ea(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,m(A=>({...A,isPositioned:!1})))},[u]);const O=d.useRef(!1);Ea(()=>(O.current=!0,()=>{O.current=!1}),[]),Ea(()=>{if(w&&(S.current=w),C&&(P.current=C),w&&C){if(M.current)return M.current(w,C,L);L()}},[w,C,L,M,E]);const Y=d.useMemo(()=>({reference:S,floating:P,setReference:y,setFloating:b}),[y,b]),F=d.useMemo(()=>({reference:w,floating:C}),[w,C]),D=d.useMemo(()=>{const A={position:n,left:0,top:0};if(!F.floating)return A;const j=wc(F.floating,p.x),W=wc(F.floating,p.y);return c?{...A,transform:"translate("+j+"px, "+W+"px)",...ju(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:W}},[n,c,F.floating,p.x,p.y]);return d.useMemo(()=>({...p,update:L,refs:Y,elements:F,floatingStyles:D}),[p,L,Y,F,D])}const r_=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?xc({element:r.current,padding:a}).fn(n):{}:r?xc({element:r,padding:a}).fn(n):{}}}},a_=(e,t)=>({...Gv(e),options:[e,t]}),o_=(e,t)=>({...Yv(e),options:[e,t]}),s_=(e,t)=>({...Jv(e),options:[e,t]}),i_=(e,t)=>({...Kv(e),options:[e,t]}),c_=(e,t)=>({...Qv(e),options:[e,t]}),l_=(e,t)=>({...Xv(e),options:[e,t]}),u_=(e,t)=>({...r_(e),options:[e,t]});var d_="Arrow",Nu=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return s.jsx(re.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Nu.displayName=d_;var f_=Nu;function p_(e){const[t,n]=d.useState(void 0);return Ce(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let i,c;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,c=u.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ui="Popper",[Mu,br]=Dt(ui),[m_,Ru]=Mu(ui),Du=e=>{const{__scopePopper:t,children:n}=e,[r,a]=d.useState(null);return s.jsx(m_,{scope:t,anchor:r,onAnchorChange:a,children:n})};Du.displayName=ui;var Iu="PopperAnchor",Ou=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=Ru(Iu,n),i=d.useRef(null),c=he(t,i);return d.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:s.jsx(re.div,{...a,ref:c})});Ou.displayName=Iu;var di="PopperContent",[h_,g_]=Mu(di),zu=d.forwardRef((e,t)=>{var z,le,ue,se,ie,de;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:f="optimized",onPlaced:_,...h}=e,v=Ru(di,n),[x,y]=d.useState(null),b=he(t,je=>y(je)),[w,C]=d.useState(null),S=p_(w),P=(S==null?void 0:S.width)??0,T=(S==null?void 0:S.height)??0,E=r+(o!=="center"?"-"+o:""),M=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},R=Array.isArray(u)?u:[u],N=R.length>0,L={padding:M,boundary:R.filter(__),altBoundary:N},{refs:O,floatingStyles:Y,placement:F,isPositioned:D,middlewareData:A}=n_({strategy:"fixed",placement:E,whileElementsMounted:(...je)=>Hv(...je,{animationFrame:f==="always"}),elements:{reference:v.anchor},middleware:[a_({mainAxis:a+T,alignmentAxis:i}),l&&o_({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?s_():void 0,...L}),l&&i_({...L}),c_({...L,apply:({elements:je,rects:Ue,availableWidth:sn,availableHeight:It})=>{const{width:cn,height:kr}=Ue.reference,Mn=je.floating.style;Mn.setProperty("--radix-popper-available-width",`${sn}px`),Mn.setProperty("--radix-popper-available-height",`${It}px`),Mn.setProperty("--radix-popper-anchor-width",`${cn}px`),Mn.setProperty("--radix-popper-anchor-height",`${kr}px`)}}),w&&u_({element:w,padding:c}),y_({arrowWidth:P,arrowHeight:T}),g&&l_({strategy:"referenceHidden",...L})]}),[j,W]=Wu(F),G=Ie(_);Ce(()=>{D&&(G==null||G())},[D,G]);const Q=(z=A.arrow)==null?void 0:z.x,K=(le=A.arrow)==null?void 0:le.y,te=((ue=A.arrow)==null?void 0:ue.centerOffset)!==0,[ge,ye]=d.useState();return Ce(()=>{x&&ye(window.getComputedStyle(x).zIndex)},[x]),s.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:D?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(se=A.transformOrigin)==null?void 0:se.x,(ie=A.transformOrigin)==null?void 0:ie.y].join(" "),...((de=A.hide)==null?void 0:de.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(h_,{scope:n,placedSide:j,onArrowChange:C,arrowX:Q,arrowY:K,shouldHideArrow:te,children:s.jsx(re.div,{"data-side":j,"data-align":W,...h,ref:b,style:{...h.style,animation:D?void 0:"none"}})})})});zu.displayName=di;var Lu="PopperArrow",v_={top:"bottom",right:"left",bottom:"top",left:"right"},Fu=d.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=g_(Lu,r),i=v_[o.placedSide];return s.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:s.jsx(f_,{...a,ref:n,style:{...a.style,display:"block"}})})});Fu.displayName=Lu;function __(e){return e!==null}var y_=e=>({name:"transformOrigin",options:e,fn(t){var v,x,y;const{placement:n,rects:r,middlewareData:a}=t,i=((v=a.arrow)==null?void 0:v.centerOffset)!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,p]=Wu(n),m={start:"0%",center:"50%",end:"100%"}[p],g=(((x=a.arrow)==null?void 0:x.x)??0)+c/2,f=(((y=a.arrow)==null?void 0:y.y)??0)+l/2;let _="",h="";return u==="bottom"?(_=i?m:`${g}px`,h=`${-l}px`):u==="top"?(_=i?m:`${g}px`,h=`${r.floating.height+l}px`):u==="right"?(_=`${-l}px`,h=i?m:`${f}px`):u==="left"&&(_=`${r.floating.width+l}px`,h=i?m:`${f}px`),{data:{x:_,y:h}}}});function Wu(e){const[t,n="center"]=e.split("-");return[t,n]}var qu=Du,fi=Ou,pi=zu,mi=Fu,[so,WS]=Dt("Tooltip",[br]),hi=br(),Bu="TooltipProvider",b_=700,Cc="tooltip.open",[x_,$u]=so(Bu),Vu=e=>{const{__scopeTooltip:t,delayDuration:n=b_,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,i=d.useRef(!0),c=d.useRef(!1),l=d.useRef(0);return d.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),s.jsx(x_,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:d.useCallback(u=>{c.current=u},[]),disableHoverableContent:a,children:o})};Vu.displayName=Bu;var Uu="Tooltip",[qS,io]=so(Uu),ds="TooltipTrigger",w_=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=io(ds,n),o=$u(ds,n),i=hi(n),c=d.useRef(null),l=he(t,c,a.onTriggerChange),u=d.useRef(!1),p=d.useRef(!1),m=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),s.jsx(fi,{asChild:!0,...i,children:s.jsx(re.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:l,onPointerMove:q(e.onPointerMove,g=>{g.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),p.current=!0)}),onPointerLeave:q(e.onPointerLeave,()=>{a.onTriggerLeave(),p.current=!1}),onPointerDown:q(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:q(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:q(e.onBlur,a.onClose),onClick:q(e.onClick,a.onClose)})})});w_.displayName=ds;var C_="TooltipPortal",[BS,k_]=so(C_,{forceMount:void 0}),fr="TooltipContent",Hu=d.forwardRef((e,t)=>{const n=k_(fr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=io(fr,e.__scopeTooltip);return s.jsx(En,{present:r||i.open,children:i.disableHoverableContent?s.jsx(Gu,{side:a,...o,ref:t}):s.jsx(T_,{side:a,...o,ref:t})})}),T_=d.forwardRef((e,t)=>{const n=io(fr,e.__scopeTooltip),r=$u(fr,e.__scopeTooltip),a=d.useRef(null),o=he(t,a),[i,c]=d.useState(null),{trigger:l,onClose:u}=n,p=a.current,{onPointerInTransitChange:m}=r,g=d.useCallback(()=>{c(null),m(!1)},[m]),f=d.useCallback((_,h)=>{const v=_.currentTarget,x={x:_.clientX,y:_.clientY},y=j_(x,v.getBoundingClientRect()),b=N_(x,y),w=M_(h.getBoundingClientRect()),C=D_([...b,...w]);c(C),m(!0)},[m]);return d.useEffect(()=>()=>g(),[g]),d.useEffect(()=>{if(l&&p){const _=v=>f(v,p),h=v=>f(v,l);return l.addEventListener("pointerleave",_),p.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",_),p.removeEventListener("pointerleave",h)}}},[l,p,f,g]),d.useEffect(()=>{if(i){const _=h=>{const v=h.target,x={x:h.clientX,y:h.clientY},y=(l==null?void 0:l.contains(v))||(p==null?void 0:p.contains(v)),b=!R_(x,i);y?g():b&&(g(),u())};return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[l,p,i,u,g]),s.jsx(Gu,{...e,ref:o})}),[S_,P_]=so(Uu,{isInside:!1}),E_=Jm("TooltipContent"),Gu=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...c}=e,l=io(fr,n),u=hi(n),{onClose:p}=l;return d.useEffect(()=>(document.addEventListener(Cc,p),()=>document.removeEventListener(Cc,p)),[p]),d.useEffect(()=>{if(l.trigger){const m=g=>{const f=g.target;f!=null&&f.contains(l.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[l.trigger,p]),s.jsx(Zr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:s.jsxs(pi,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(E_,{children:r}),s.jsx(S_,{scope:n,isInside:!0,children:s.jsx(bh,{id:l.contentId,role:"tooltip",children:a||r})})]})})});Hu.displayName=fr;var Yu="TooltipArrow",A_=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=hi(n);return P_(Yu,n).isInside?null:s.jsx(mi,{...a,...r,ref:t})});A_.displayName=Yu;function j_(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function N_(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function M_(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function R_(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;or!=g>r&&n<(m-u)*(r-p)/(g-p)+u&&(a=!a)}return a}function D_(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),I_(t)}function I_(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(a.y-i.y)>=(o.y-i.y)*(a.x-i.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(a.y-i.y)>=(o.y-i.y)*(a.x-i.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var O_=Vu,Ku=Hu;const z_=O_,L_=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(Ku,{ref:r,sideOffset:t,className:U("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));L_.displayName=Ku.displayName;var na=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Cn=typeof window>"u"||"Deno"in globalThis;function Fe(){}function F_(e,t){return typeof e=="function"?e(t):e}function fs(e){return typeof e=="number"&&e>=0&&e!==1/0}function Qu(e,t){return Math.max(e+(t||0)-Date.now(),0)}function en(e,t){return typeof e=="function"?e(t):e}function Ke(e,t){return typeof e=="function"?e(t):e}function kc(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:o,queryKey:i,stale:c}=e;if(i){if(r){if(t.queryHash!==gi(i,t.options))return!1}else if(!qr(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||a&&a!==t.state.fetchStatus||o&&!o(t))}function Tc(e,t){const{exact:n,status:r,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Wr(t.options.mutationKey)!==Wr(o))return!1}else if(!qr(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function gi(e,t){return((t==null?void 0:t.queryKeyHashFn)||Wr)(e)}function Wr(e){return JSON.stringify(e,(t,n)=>ms(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function qr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>qr(e[n],t[n])):!1}function Xu(e,t){if(e===t)return e;const n=Sc(e)&&Sc(t);if(n||ms(e)&&ms(t)){const r=n?e:Object.keys(e),a=r.length,o=n?t:Object.keys(t),i=o.length,c=n?[]:{},l=new Set(r);let u=0;for(let p=0;p{setTimeout(t,e)})}function hs(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Xu(e,t):t}function q_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function B_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var vi=Symbol();function Ju(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===vi?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $_(e,t){return typeof e=="function"?e(...t):!!e}var fn,Vt,Qn,gl,V_=(gl=class extends na{constructor(){super();X(this,fn);X(this,Vt);X(this,Qn);V(this,Qn,t=>{if(!Cn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){k(this,Vt)||this.setEventListener(k(this,Qn))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Vt))==null||t.call(this),V(this,Vt,void 0))}setEventListener(t){var n;V(this,Qn,t),(n=k(this,Vt))==null||n.call(this),V(this,Vt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){k(this,fn)!==t&&(V(this,fn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof k(this,fn)=="boolean"?k(this,fn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},fn=new WeakMap,Vt=new WeakMap,Qn=new WeakMap,gl),_i=new V_,Xn,Ut,Jn,vl,U_=(vl=class extends na{constructor(){super();X(this,Xn,!0);X(this,Ut);X(this,Jn);V(this,Jn,t=>{if(!Cn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){k(this,Ut)||this.setEventListener(k(this,Jn))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Ut))==null||t.call(this),V(this,Ut,void 0))}setEventListener(t){var n;V(this,Jn,t),(n=k(this,Ut))==null||n.call(this),V(this,Ut,t(this.setOnline.bind(this)))}setOnline(t){k(this,Xn)!==t&&(V(this,Xn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return k(this,Xn)}},Xn=new WeakMap,Ut=new WeakMap,Jn=new WeakMap,vl),qa=new U_;function gs(){let e,t;const n=new Promise((a,o)=>{e=a,t=o});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}function H_(e){return Math.min(1e3*2**e,3e4)}function Zu(e){return(e??"online")==="online"?qa.isOnline():!0}var ed=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Po(e){return e instanceof ed}function td(e){let t=!1,n=0,r=!1,a;const o=gs(),i=h=>{var v;r||(g(new ed(h)),(v=e.abort)==null||v.call(e))},c=()=>{t=!0},l=()=>{t=!1},u=()=>_i.isFocused()&&(e.networkMode==="always"||qa.isOnline())&&e.canRun(),p=()=>Zu(e.networkMode)&&e.canRun(),m=h=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,h),a==null||a(),o.resolve(h))},g=h=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,h),a==null||a(),o.reject(h))},f=()=>new Promise(h=>{var v;a=x=>{(r||u())&&h(x)},(v=e.onPause)==null||v.call(e)}).then(()=>{var h;a=void 0,r||(h=e.onContinue)==null||h.call(e)}),_=()=>{if(r)return;let h;const v=n===0?e.initialPromise:void 0;try{h=v??e.fn()}catch(x){h=Promise.reject(x)}Promise.resolve(h).then(m).catch(x=>{var S;if(r)return;const y=e.retry??(Cn?0:3),b=e.retryDelay??H_,w=typeof b=="function"?b(n,x):b,C=y===!0||typeof y=="number"&&nu()?void 0:f()).then(()=>{t?g(x):_()})})};return{promise:o,cancel:i,continue:()=>(a==null||a(),o),cancelRetry:c,continueRetry:l,canStart:p,start:()=>(p()?_():f().then(_),o)}}var G_=e=>setTimeout(e,0);function Y_(){let e=[],t=0,n=c=>{c()},r=c=>{c()},a=G_;const o=c=>{t?e.push(c):a(()=>{n(c)})},i=()=>{const c=e;e=[],c.length&&a(()=>{r(()=>{c.forEach(l=>{n(l)})})})};return{batch:c=>{let l;t++;try{l=c()}finally{t--,t||i()}return l},batchCalls:c=>(...l)=>{o(()=>{c(...l)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{a=c}}}var Ee=Y_(),pn,_l,nd=(_l=class{constructor(){X(this,pn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fs(this.gcTime)&&V(this,pn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cn?1/0:5*60*1e3))}clearGcTimeout(){k(this,pn)&&(clearTimeout(k(this,pn)),V(this,pn,void 0))}},pn=new WeakMap,_l),Zn,mn,Ye,hn,Ne,Hr,gn,at,Et,yl,K_=(yl=class extends nd{constructor(t){super();X(this,at);X(this,Zn);X(this,mn);X(this,Ye);X(this,hn);X(this,Ne);X(this,Hr);X(this,gn);V(this,gn,!1),V(this,Hr,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,hn,t.client),V(this,Ye,k(this,hn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,Zn,Q_(this.options)),this.state=t.state??k(this,Zn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,Ne))==null?void 0:t.promise}setOptions(t){this.options={...k(this,Hr),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Ye).remove(this)}setData(t,n){const r=hs(this.state.data,t,this.options);return ae(this,at,Et).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ae(this,at,Et).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=k(this,Ne))==null?void 0:r.promise;return(a=k(this,Ne))==null||a.cancel(t),n?n.then(Fe).catch(Fe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,Zn))}isActive(){return this.observers.some(t=>Ke(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===vi||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>en(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Qu(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,Ne))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,Ne))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Ye).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(k(this,Ne)&&(k(this,gn)?k(this,Ne).cancel({revert:!0}):k(this,Ne).cancelRetry()),this.scheduleGc()),k(this,Ye).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ae(this,at,Et).call(this,{type:"invalidate"})}fetch(t,n){var u,p,m;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(k(this,Ne))return k(this,Ne).continueRetry(),k(this,Ne).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(f=>f.options.queryFn);g&&this.setOptions(g.options)}const r=new AbortController,a=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(V(this,gn,!0),r.signal)})},o=()=>{const g=Ju(this.options,n),_=(()=>{const h={client:k(this,hn),queryKey:this.queryKey,meta:this.meta};return a(h),h})();return V(this,gn,!1),this.options.persister?this.options.persister(g,_,this):g(_)},c=(()=>{const g={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:k(this,hn),state:this.state,fetchFn:o};return a(g),g})();(u=this.options.behavior)==null||u.onFetch(c,this),V(this,mn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=c.fetchOptions)==null?void 0:p.meta))&&ae(this,at,Et).call(this,{type:"fetch",meta:(m=c.fetchOptions)==null?void 0:m.meta});const l=g=>{var f,_,h,v;Po(g)&&g.silent||ae(this,at,Et).call(this,{type:"error",error:g}),Po(g)||((_=(f=k(this,Ye).config).onError)==null||_.call(f,g,this),(v=(h=k(this,Ye).config).onSettled)==null||v.call(h,this.state.data,g,this)),this.scheduleGc()};return V(this,Ne,td({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var f,_,h,v;if(g===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(g)}catch(x){l(x);return}(_=(f=k(this,Ye).config).onSuccess)==null||_.call(f,g,this),(v=(h=k(this,Ye).config).onSettled)==null||v.call(h,g,this.state.error,this),this.scheduleGc()},onError:l,onFail:(g,f)=>{ae(this,at,Et).call(this,{type:"failed",failureCount:g,error:f})},onPause:()=>{ae(this,at,Et).call(this,{type:"pause"})},onContinue:()=>{ae(this,at,Et).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0})),k(this,Ne).start()}},Zn=new WeakMap,mn=new WeakMap,Ye=new WeakMap,hn=new WeakMap,Ne=new WeakMap,Hr=new WeakMap,gn=new WeakMap,at=new WeakSet,Et=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...rd(r.data,this.options),fetchMeta:t.meta??null};case"success":return V(this,mn,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return Po(a)&&a.revert&&k(this,mn)?{...k(this,mn),fetchStatus:"idle"}:{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ee.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,Ye).notify({query:this,type:"updated",action:t})})},yl);function rd(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Zu(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Q_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var pt,bl,X_=(bl=class extends na{constructor(t={}){super();X(this,pt);this.config=t,V(this,pt,new Map)}build(t,n,r){const a=n.queryKey,o=n.queryHash??gi(a,n);let i=this.get(o);return i||(i=new K_({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(i)),i}add(t){k(this,pt).has(t.queryHash)||(k(this,pt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=k(this,pt).get(t.queryHash);n&&(t.destroy(),n===t&&k(this,pt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ee.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,pt).get(t)}getAll(){return[...k(this,pt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>kc(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>kc(t,r)):n}notify(t){Ee.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ee.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ee.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},pt=new WeakMap,bl),mt,Me,vn,ht,Bt,xl,J_=(xl=class extends nd{constructor(t){super();X(this,ht);X(this,mt);X(this,Me);X(this,vn);this.mutationId=t.mutationId,V(this,Me,t.mutationCache),V(this,mt,[]),this.state=t.state||Z_(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,mt).includes(t)||(k(this,mt).push(t),this.clearGcTimeout(),k(this,Me).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,mt,k(this,mt).filter(n=>n!==t)),this.scheduleGc(),k(this,Me).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,mt).length||(this.state.status==="pending"?this.scheduleGc():k(this,Me).remove(this))}continue(){var t;return((t=k(this,vn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,c,l,u,p,m,g,f,_,h,v,x,y,b,w,C,S,P,T;const n=()=>{ae(this,ht,Bt).call(this,{type:"continue"})};V(this,vn,td({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(E,M)=>{ae(this,ht,Bt).call(this,{type:"failed",failureCount:E,error:M})},onPause:()=>{ae(this,ht,Bt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,Me).canRun(this)}));const r=this.state.status==="pending",a=!k(this,vn).canStart();try{if(r)n();else{ae(this,ht,Bt).call(this,{type:"pending",variables:t,isPaused:a}),await((i=(o=k(this,Me).config).onMutate)==null?void 0:i.call(o,t,this));const M=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t));M!==this.state.context&&ae(this,ht,Bt).call(this,{type:"pending",context:M,variables:t,isPaused:a})}const E=await k(this,vn).start();return await((p=(u=k(this,Me).config).onSuccess)==null?void 0:p.call(u,E,t,this.state.context,this)),await((g=(m=this.options).onSuccess)==null?void 0:g.call(m,E,t,this.state.context)),await((_=(f=k(this,Me).config).onSettled)==null?void 0:_.call(f,E,null,this.state.variables,this.state.context,this)),await((v=(h=this.options).onSettled)==null?void 0:v.call(h,E,null,t,this.state.context)),ae(this,ht,Bt).call(this,{type:"success",data:E}),E}catch(E){try{throw await((y=(x=k(this,Me).config).onError)==null?void 0:y.call(x,E,t,this.state.context,this)),await((w=(b=this.options).onError)==null?void 0:w.call(b,E,t,this.state.context)),await((S=(C=k(this,Me).config).onSettled)==null?void 0:S.call(C,void 0,E,this.state.variables,this.state.context,this)),await((T=(P=this.options).onSettled)==null?void 0:T.call(P,void 0,E,t,this.state.context)),E}finally{ae(this,ht,Bt).call(this,{type:"error",error:E})}}finally{k(this,Me).runNext(this)}}},mt=new WeakMap,Me=new WeakMap,vn=new WeakMap,ht=new WeakSet,Bt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ee.batch(()=>{k(this,mt).forEach(r=>{r.onMutationUpdate(t)}),k(this,Me).notify({mutation:this,type:"updated",action:t})})},xl);function Z_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jt,ot,Gr,wl,ey=(wl=class extends na{constructor(t={}){super();X(this,jt);X(this,ot);X(this,Gr);this.config=t,V(this,jt,new Set),V(this,ot,new Map),V(this,Gr,0)}build(t,n,r){const a=new J_({mutationCache:this,mutationId:++fa(this,Gr)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){k(this,jt).add(t);const n=va(t);if(typeof n=="string"){const r=k(this,ot).get(n);r?r.push(t):k(this,ot).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,jt).delete(t)){const n=va(t);if(typeof n=="string"){const r=k(this,ot).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&k(this,ot).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=va(t);if(typeof n=="string"){const r=k(this,ot).get(n),a=r==null?void 0:r.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=va(t);if(typeof n=="string"){const a=(r=k(this,ot).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ee.batch(()=>{k(this,jt).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,jt).clear(),k(this,ot).clear()})}getAll(){return Array.from(k(this,jt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Tc(n,r))}findAll(t={}){return this.getAll().filter(n=>Tc(t,n))}notify(t){Ee.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ee.batch(()=>Promise.all(t.map(n=>n.continue().catch(Fe))))}},jt=new WeakMap,ot=new WeakMap,Gr=new WeakMap,wl);function va(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ec(e){return{onFetch:(t,n)=>{var p,m,g,f,_;const r=t.options,a=(g=(m=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:g.direction,o=((f=t.state.data)==null?void 0:f.pages)||[],i=((_=t.state.data)==null?void 0:_.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const u=async()=>{let h=!1;const v=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},x=Ju(t.options,t.fetchOptions),y=async(b,w,C)=>{if(h)return Promise.reject();if(w==null&&b.pages.length)return Promise.resolve(b);const P=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:w,direction:C?"backward":"forward",meta:t.options.meta};return v(R),R})(),T=await x(P),{maxPages:E}=t.options,M=C?B_:q_;return{pages:M(b.pages,T,E),pageParams:M(b.pageParams,w,E)}};if(a&&o.length){const b=a==="backward",w=b?ty:Ac,C={pages:o,pageParams:i},S=w(r,C);c=await y(C,S,b)}else{const b=e??o.length;do{const w=l===0?i[0]??r.initialPageParam:Ac(r,c);if(l>0&&w==null)break;c=await y(c,w),l++}while(l{var h,v;return(v=(h=t.options).persister)==null?void 0:v.call(h,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Ac(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ty(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var we,Ht,Gt,er,tr,Yt,nr,rr,Cl,ny=(Cl=class{constructor(e={}){X(this,we);X(this,Ht);X(this,Gt);X(this,er);X(this,tr);X(this,Yt);X(this,nr);X(this,rr);V(this,we,e.queryCache||new X_),V(this,Ht,e.mutationCache||new ey),V(this,Gt,e.defaultOptions||{}),V(this,er,new Map),V(this,tr,new Map),V(this,Yt,0)}mount(){fa(this,Yt)._++,k(this,Yt)===1&&(V(this,nr,_i.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,we).onFocus())})),V(this,rr,qa.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,we).onOnline())})))}unmount(){var e,t;fa(this,Yt)._--,k(this,Yt)===0&&((e=k(this,nr))==null||e.call(this),V(this,nr,void 0),(t=k(this,rr))==null||t.call(this),V(this,rr,void 0))}isFetching(e){return k(this,we).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,Ht).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,we).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=k(this,we).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(en(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return k(this,we).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=k(this,we).get(r.queryHash),o=a==null?void 0:a.state.data,i=F_(t,o);if(i!==void 0)return k(this,we).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Ee.batch(()=>k(this,we).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,we).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=k(this,we);Ee.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=k(this,we);return Ee.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ee.batch(()=>k(this,we).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Fe).catch(Fe)}invalidateQueries(e,t={}){return Ee.batch(()=>(k(this,we).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ee.batch(()=>k(this,we).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,n);return n.throwOnError||(o=o.catch(Fe)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Fe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=k(this,we).build(this,t);return n.isStaleByTime(en(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Fe).catch(Fe)}fetchInfiniteQuery(e){return e.behavior=Ec(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Fe).catch(Fe)}ensureInfiniteQueryData(e){return e.behavior=Ec(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return qa.isOnline()?k(this,Ht).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,we)}getMutationCache(){return k(this,Ht)}getDefaultOptions(){return k(this,Gt)}setDefaultOptions(e){V(this,Gt,e)}setQueryDefaults(e,t){k(this,er).set(Wr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,er).values()],n={};return t.forEach(r=>{qr(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){k(this,tr).set(Wr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,tr).values()],n={};return t.forEach(r=>{qr(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,Gt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=gi(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===vi&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,Gt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,we).clear(),k(this,Ht).clear()}},we=new WeakMap,Ht=new WeakMap,Gt=new WeakMap,er=new WeakMap,tr=new WeakMap,Yt=new WeakMap,nr=new WeakMap,rr=new WeakMap,Cl),ze,oe,Yr,Re,_n,ar,Kt,Qt,Kr,or,sr,yn,bn,Xt,ir,fe,jr,vs,_s,ys,bs,xs,ws,Cs,ad,kl,ry=(kl=class extends na{constructor(t,n){super();X(this,fe);X(this,ze);X(this,oe);X(this,Yr);X(this,Re);X(this,_n);X(this,ar);X(this,Kt);X(this,Qt);X(this,Kr);X(this,or);X(this,sr);X(this,yn);X(this,bn);X(this,Xt);X(this,ir,new Set);this.options=n,V(this,ze,t),V(this,Qt,null),V(this,Kt,gs()),this.options.experimental_prefetchInRender||k(this,Kt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,oe).addObserver(this),jc(k(this,oe),this.options)?ae(this,fe,jr).call(this):this.updateResult(),ae(this,fe,bs).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ks(k(this,oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ks(k(this,oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ae(this,fe,xs).call(this),ae(this,fe,ws).call(this),k(this,oe).removeObserver(this)}setOptions(t){const n=this.options,r=k(this,oe);if(this.options=k(this,ze).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ke(this.options.enabled,k(this,oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ae(this,fe,Cs).call(this),k(this,oe).setOptions(this.options),n._defaulted&&!ps(this.options,n)&&k(this,ze).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,oe),observer:this});const a=this.hasListeners();a&&Nc(k(this,oe),r,this.options,n)&&ae(this,fe,jr).call(this),this.updateResult(),a&&(k(this,oe)!==r||Ke(this.options.enabled,k(this,oe))!==Ke(n.enabled,k(this,oe))||en(this.options.staleTime,k(this,oe))!==en(n.staleTime,k(this,oe)))&&ae(this,fe,vs).call(this);const o=ae(this,fe,_s).call(this);a&&(k(this,oe)!==r||Ke(this.options.enabled,k(this,oe))!==Ke(n.enabled,k(this,oe))||o!==k(this,Xt))&&ae(this,fe,ys).call(this,o)}getOptimisticResult(t){const n=k(this,ze).getQueryCache().build(k(this,ze),t),r=this.createResult(n,t);return oy(this,r)&&(V(this,Re,r),V(this,ar,this.options),V(this,_n,k(this,oe).state)),r}getCurrentResult(){return k(this,Re)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),Reflect.get(r,a))})}trackProp(t){k(this,ir).add(t)}getCurrentQuery(){return k(this,oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=k(this,ze).defaultQueryOptions(t),r=k(this,ze).getQueryCache().build(k(this,ze),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ae(this,fe,jr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,Re)))}createResult(t,n){var E;const r=k(this,oe),a=this.options,o=k(this,Re),i=k(this,_n),c=k(this,ar),u=t!==r?t.state:k(this,Yr),{state:p}=t;let m={...p},g=!1,f;if(n._optimisticResults){const M=this.hasListeners(),R=!M&&jc(t,n),N=M&&Nc(t,r,n,a);(R||N)&&(m={...m,...rd(p.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:_,errorUpdatedAt:h,status:v}=m;f=m.data;let x=!1;if(n.placeholderData!==void 0&&f===void 0&&v==="pending"){let M;o!=null&&o.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(M=o.data,x=!0):M=typeof n.placeholderData=="function"?n.placeholderData((E=k(this,sr))==null?void 0:E.state.data,k(this,sr)):n.placeholderData,M!==void 0&&(v="success",f=hs(o==null?void 0:o.data,M,n),g=!0)}if(n.select&&f!==void 0&&!x)if(o&&f===(i==null?void 0:i.data)&&n.select===k(this,Kr))f=k(this,or);else try{V(this,Kr,n.select),f=n.select(f),f=hs(o==null?void 0:o.data,f,n),V(this,or,f),V(this,Qt,null)}catch(M){V(this,Qt,M)}k(this,Qt)&&(_=k(this,Qt),f=k(this,or),h=Date.now(),v="error");const y=m.fetchStatus==="fetching",b=v==="pending",w=v==="error",C=b&&y,S=f!==void 0,T={status:v,fetchStatus:m.fetchStatus,isPending:b,isSuccess:v==="success",isError:w,isInitialLoading:C,isLoading:C,data:f,dataUpdatedAt:m.dataUpdatedAt,error:_,errorUpdatedAt:h,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>u.dataUpdateCount||m.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:w&&!S,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:w&&S,isStale:yi(t,n),refetch:this.refetch,promise:k(this,Kt),isEnabled:Ke(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const M=L=>{T.status==="error"?L.reject(T.error):T.data!==void 0&&L.resolve(T.data)},R=()=>{const L=V(this,Kt,T.promise=gs());M(L)},N=k(this,Kt);switch(N.status){case"pending":t.queryHash===r.queryHash&&M(N);break;case"fulfilled":(T.status==="error"||T.data!==N.value)&&R();break;case"rejected":(T.status!=="error"||T.error!==N.reason)&&R();break}}return T}updateResult(){const t=k(this,Re),n=this.createResult(k(this,oe),this.options);if(V(this,_n,k(this,oe).state),V(this,ar,this.options),k(this,_n).data!==void 0&&V(this,sr,k(this,oe)),ps(n,t))return;V(this,Re,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!k(this,ir).size)return!0;const i=new Set(o??k(this,ir));return this.options.throwOnError&&i.add("error"),Object.keys(k(this,Re)).some(c=>{const l=c;return k(this,Re)[l]!==t[l]&&i.has(l)})};ae(this,fe,ad).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ae(this,fe,bs).call(this)}},ze=new WeakMap,oe=new WeakMap,Yr=new WeakMap,Re=new WeakMap,_n=new WeakMap,ar=new WeakMap,Kt=new WeakMap,Qt=new WeakMap,Kr=new WeakMap,or=new WeakMap,sr=new WeakMap,yn=new WeakMap,bn=new WeakMap,Xt=new WeakMap,ir=new WeakMap,fe=new WeakSet,jr=function(t){ae(this,fe,Cs).call(this);let n=k(this,oe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Fe)),n},vs=function(){ae(this,fe,xs).call(this);const t=en(this.options.staleTime,k(this,oe));if(Cn||k(this,Re).isStale||!fs(t))return;const r=Qu(k(this,Re).dataUpdatedAt,t)+1;V(this,yn,setTimeout(()=>{k(this,Re).isStale||this.updateResult()},r))},_s=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,oe)):this.options.refetchInterval)??!1},ys=function(t){ae(this,fe,ws).call(this),V(this,Xt,t),!(Cn||Ke(this.options.enabled,k(this,oe))===!1||!fs(k(this,Xt))||k(this,Xt)===0)&&V(this,bn,setInterval(()=>{(this.options.refetchIntervalInBackground||_i.isFocused())&&ae(this,fe,jr).call(this)},k(this,Xt)))},bs=function(){ae(this,fe,vs).call(this),ae(this,fe,ys).call(this,ae(this,fe,_s).call(this))},xs=function(){k(this,yn)&&(clearTimeout(k(this,yn)),V(this,yn,void 0))},ws=function(){k(this,bn)&&(clearInterval(k(this,bn)),V(this,bn,void 0))},Cs=function(){const t=k(this,ze).getQueryCache().build(k(this,ze),this.options);if(t===k(this,oe))return;const n=k(this,oe);V(this,oe,t),V(this,Yr,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ad=function(t){Ee.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(k(this,Re))}),k(this,ze).getQueryCache().notify({query:k(this,oe),type:"observerResultsUpdated"})})},kl);function ay(e,t){return Ke(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function jc(e,t){return ay(e,t)||e.state.data!==void 0&&ks(e,t,t.refetchOnMount)}function ks(e,t,n){if(Ke(t.enabled,e)!==!1&&en(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&yi(e,t)}return!1}function Nc(e,t,n,r){return(e!==t||Ke(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&yi(e,n)}function yi(e,t){return Ke(t.enabled,e)!==!1&&e.isStaleByTime(en(t.staleTime,e))}function oy(e,t){return!ps(e.getCurrentResult(),t)}var od=d.createContext(void 0),sy=e=>{const t=d.useContext(od);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},iy=({client:e,children:t})=>(d.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(od.Provider,{value:e,children:t})),sd=d.createContext(!1),cy=()=>d.useContext(sd);sd.Provider;function ly(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var uy=d.createContext(ly()),dy=()=>d.useContext(uy),fy=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},py=e=>{d.useEffect(()=>{e.clearReset()},[e])},my=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||$_(n,[e.error,r])),hy=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},gy=(e,t)=>e.isLoading&&e.isFetching&&!t,vy=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Mc=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function _y(e,t,n){var m,g,f,_,h;const r=cy(),a=dy(),o=sy(),i=o.defaultQueryOptions(e);(g=(m=o.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||g.call(m,i),i._optimisticResults=r?"isRestoring":"optimistic",hy(i),fy(i,a),py(a);const c=!o.getQueryCache().get(i.queryHash),[l]=d.useState(()=>new t(o,i)),u=l.getOptimisticResult(i),p=!r&&e.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(v=>{const x=p?l.subscribe(Ee.batchCalls(v)):Fe;return l.updateResult(),x},[l,p]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),d.useEffect(()=>{l.setOptions(i)},[i,l]),vy(i,u))throw Mc(i,l,a);if(my({result:u,errorResetBoundary:a,throwOnError:i.throwOnError,query:o.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((_=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||_.call(f,i,u),i.experimental_prefetchInRender&&!Cn&&gy(u,r)){const v=c?Mc(i,l,a):(h=o.getQueryCache().get(i.queryHash))==null?void 0:h.promise;v==null||v.catch(Fe).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function id(e,t){return _y(e,ry)}const Ts=ti("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-all duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 shadow-md hover:shadow-lg active:scale-[.98] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary-hover",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary-hover",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",cta:"bg-orange-500 hover:bg-orange-600 text-white shadow-lg hover:shadow-xl transition-all"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Te=d.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},o)=>{const i=r?Qm:"button";return s.jsx(i,{className:U(Ts({variant:t,size:n,className:e})),ref:o,...a})});Te.displayName="Button";const Rc=e=>{let t;const n=new Set,r=(u,p)=>{const m=typeof u=="function"?u(t):u;if(!Object.is(m,t)){const g=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(f=>f(t,g))}},a=()=>t,c={setState:r,getState:a,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,a,c);return c},yy=e=>e?Rc(e):Rc,by=e=>e;function xy(e,t=by){const n=I.useSyncExternalStore(e.subscribe,I.useCallback(()=>t(e.getState()),[e,t]),I.useCallback(()=>t(e.getInitialState()),[e,t]));return I.useDebugValue(n),n}const Dc=e=>{const t=yy(e),n=r=>xy(t,r);return Object.assign(n,t),n},cd=e=>e?Dc(e):Dc,wy=["/dash","/admin","/agent","/login-","/unauthorized","/superviseur"];function dt(e){return e==="/en"||e.startsWith("/en/")?"en":e==="/es"||e.startsWith("/es/")?"es":"fr"}function pr(e){return e==="/en"||e==="/es"?"/":e.startsWith("/en/")||e.startsWith("/es/")?e.slice(3):e}function ke(e,t){const n=e.indexOf("?"),r=e.indexOf("#"),a=n>=0?n:r>=0?r:-1,o=a>=0?e.slice(0,a):e,i=a>=0?e.slice(a):"";if(wy.some(l=>o.startsWith(l)))return e;let c=o;return c.startsWith("/en/")?c=c.slice(3):c==="/en"?c="/":c.startsWith("/es/")?c=c.slice(3):c==="/es"&&(c="/"),t==="fr"?c+i:(c==="/"?`/${t}`:`/${t}${c}`)+i}function $S(){const e=xe(),t=Je(),n=dt(e.pathname),r=d.useCallback(o=>{if(o===n)return;const i=pr(e.pathname),c=o==="fr"?i:i==="/"?`/${o}`:`/${o}${i}`;t(c+e.search+e.hash,{replace:!0})},[n,e,t]),a=d.useCallback(o=>ke(o,n),[n]);return{lang:n,setLang:r,localizedPath:a}}const ra=cd((e,t)=>({currentStep:"search",searchParams:null,selectedCar:null,selectedExtras:[],extrasCatalog:{},paymentMethod:"agency",customer:null,customerId:null,isAdmin:!1,setCurrentStep:n=>e({currentStep:n}),setSearchParams:n=>e({searchParams:n}),setSelectedCar:n=>e({selectedCar:n}),addExtra:(n,r=1)=>e(a=>a.selectedExtras.find(i=>i.extraId===n)?{selectedExtras:a.selectedExtras.map(i=>i.extraId===n?{...i,quantity:r}:i)}:{selectedExtras:[...a.selectedExtras,{extraId:n,quantity:r}]}),removeExtra:n=>e(r=>({selectedExtras:r.selectedExtras.filter(a=>a.extraId!==n)})),setExtrasCatalog:n=>e(()=>({extrasCatalog:n.reduce((r,a)=>(r[a.id]={price:a.price,priceType:a.priceType},r),{})})),setPaymentMethod:n=>e({paymentMethod:n}),setCustomer:n=>e({customer:n}),setCustomerId:n=>e({customerId:n}),setAdminMode:n=>e({isAdmin:n}),resetReservation:()=>e({currentStep:"search",searchParams:null,selectedCar:null,selectedExtras:[],extrasCatalog:{},paymentMethod:"agency",customer:null,customerId:null}),navigateToStep:n=>{const r={search:"/",selection:"/recherche",extras:"/extras",payment:"/paiement",confirmation:"/confirmation"};e({currentStep:n});const a=dt(window.location.pathname);window.history.pushState({},"",ke(r[n],a)),window.dispatchEvent(new PopStateEvent("popstate")),requestAnimationFrame(()=>{window.scrollTo({top:0,left:0,behavior:"auto"})})},getTotalDays:()=>{const{searchParams:n}=t();if(!n)return 0;const r=n.returnDate.getTime()-n.pickupDate.getTime();return Math.ceil(r/(1e3*60*60*24))},getCarPrice:()=>{var l,u;const{selectedCar:n,paymentMethod:r}=t(),a=t().getTotalDays();if(!n||a===0)return 0;let o=r==="online"?n.pricePerDayAdvance:n.pricePerDay;const i=((l=window==null?void 0:window.featureFlags)==null?void 0:l.seasonal_pricing_enabled)??!0,c=((u=t().searchParams)==null?void 0:u.seasonCoefficient)??1;return i&&typeof c=="number"&&c>0&&(o=o*c),o*a},getExtrasPrice:()=>{const{selectedExtras:n,extrasCatalog:r}=t(),a=t().getTotalDays();return n.reduce((o,i)=>{const c=r[i.extraId];if(!c)return o;const{price:l,priceType:u}=c;return u==="per_day"?o+l*i.quantity*a:o+l*i.quantity},0)},getTotalPrice:()=>{var o,i;const n=t().getCarPrice()+t().getExtrasPrice(),r=((o=t().searchParams)==null?void 0:o.pickupFee)||0,a=((i=t().searchParams)==null?void 0:i.returnPickupFee)||0;return n+r+a},getSavings:()=>{var c;const{selectedCar:n}=t(),r=t().getTotalDays();if(!n||r===0)return 0;const a=((c=t().searchParams)==null?void 0:c.seasonCoefficient)??1,o=n.pricePerDay*a*r,i=n.pricePerDayAdvance*a*r;return o-i}})),Cy="https://jwnbjkmwvydltaihrsdi.supabase.co",ky="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imp3bmJqa213dnlkbHRhaWhyc2RpIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTYyMTkzNjcsImV4cCI6MjA3MTc5NTM2N30.P3ouZDi3aWIpdJSU6Y9ABJVVbUYeOPRFm6bep3CwIes",Ae=$m(Cy,ky,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0},realtime:{params:{eventsPerSecond:10}},global:{headers:{"X-Client-Info":"driveaway-ui"}}}),ld=d.createContext(null),ud="feature_flags_cache_v1",dd=5*60*1e3,Ba={show_or_similar_badge:!0};function Ss(){try{const e=localStorage.getItem(ud);return e?JSON.parse(e):null}catch{return null}}function Ps(e){const t={timestamp:Date.now(),flags:e};try{localStorage.setItem(ud,JSON.stringify(t))}catch{}}async function Es(){const{data:e,error:t}=await Ae.from("feature_flags").select("name, enabled");if(t)return{};const n={};for(const r of e??[])n[r.name]=!!r.enabled;return n}function Ty({children:e}){const[t,n]=d.useState(new Map),r=d.useRef(!1),a=d.useCallback(async()=>{if(!r.current){r.current=!0;try{const l=Ss();if(l&&Date.now()-l.timestamp{a()},[a]);const o=d.useCallback(l=>{if(!l)return;if(t.has(l))return t.get(l);const u=Ss();if(u&&u.flags.hasOwnProperty(l))return u.flags[l];if(Object.prototype.hasOwnProperty.call(Ba,l))return Ba[l]},[t]),i=d.useCallback(async()=>{const l=await Es();Ps(l),n(new Map(Object.entries(l)))},[]),c=d.useMemo(()=>({isEnabled:o,refresh:i}),[o,i]);return s.jsx(ld.Provider,{value:c,children:e})}function fd(){const e=d.useContext(ld);return e||{isEnabled:n=>{const r=Ss();if(r&&Date.now()-r.timestamp{const n=await Es();Ps(n)}}}const pd="site_settings_cache_v1",Sy=5*60*1e3;function Py(){try{const e=localStorage.getItem(pd);if(!e)return null;const t=JSON.parse(e);return!(t!=null&&t.data)||!(t!=null&&t.timestamp)||Date.now()-t.timestamp>Sy?null:t.data}catch{return null}}function Ey(e){try{localStorage.setItem(pd,JSON.stringify({timestamp:Date.now(),data:e}))}catch{}}function xr(e={}){const t=!!e.defer,n=d.useRef(!1),r=id({queryKey:["site_settings"],queryFn:async()=>{const{data:o,error:i}=await Ae.from("site_settings").select("*").single();if(i)throw i;return typeof window<"u"&&o&&Ey(o),o},staleTime:6e4,refetchOnWindowFocus:!1,enabled:!t,initialData:()=>typeof window<"u"?Py():void 0}),a=d.useMemo(()=>{const o=r.data||null;if(!o)return null;const i={showHero:!0,showWhySection:!0,showExperiencesSection:!0,showReassuranceBar:!1,showStatsSection:!1,showFeature1:!0,showFeature2:!0,showFeature3:!0,show_footer:!0},c=o.static_pages||{},l=Array.isArray(c)?c.reduce((u,p)=>(p!=null&&p.slug&&(u[p.slug]={titre:p.titre,contenu:p.contenu}),u),{}):c;return{...o,flags:{...i,...o.flags||{}},features:Array.isArray(o.features)?o.features:[],experiences_cards:Array.isArray(o.experiences_cards)?o.experiences_cards:[],stats_items:Array.isArray(o.stats_items)?o.stats_items:[],contact_delivery_areas:Array.isArray(o.contact_delivery_areas)?o.contact_delivery_areas:[],static_pages:l}},[r.data]);return d.useEffect(()=>{typeof window<"u"&&(a!=null&&a.logo_url)&&(window.siteLogoUrl=a.logo_url)},[a==null?void 0:a.logo_url]),d.useEffect(()=>{if(!t||typeof window>"u"||n.current)return;n.current=!0;const o=()=>{r.refetch()};if("requestIdleCallback"in window){const c=window.requestIdleCallback(o,{timeout:1500});return()=>{var l;return(l=window.cancelIdleCallback)==null?void 0:l.call(window,c)}}const i=window.setTimeout(o,1);return()=>window.clearTimeout(i)},[t,r.refetch]),{...r,data:a}}function H(e,t="fr"){const n=r=>{const a=typeof r.fr=="string"?r.fr:"",o=typeof r.en=="string"?r.en:"",i=typeof r.es=="string"?r.es:"";return t==="es"?i||a||o||"":t==="en"?o||a||"":a||o||""};if(typeof e=="string"){const r=e.trim();if(!(r.startsWith("{")&&r.endsWith("}")&&/"(fr|en|es)"\s*:/.test(r)))return e;try{const o=JSON.parse(r);return!o||typeof o!="object"?e:n(o)||e}catch{return e}}return e&&typeof e=="object"?n(e):""}const Ic={fr:{back:"Retour",continue:"Continuer",next:"Suivant",loading:"Chargement…",loading_dots:"Chargement...",search:"Recherche",filters:"Filtres",modify_search:"Modifier la recherche",total:"Total",day:"jour",days:"jours",admin:"Admin",or_similar:"Ou similaire",close:"Fermer",edit:"Modifier",location:"Lieu",summary:"Résumé",return_prefix:"Retour:",step_search:"Recherche",step_selection:"Sélection",step_details:"Détails",step_extras:"Options",step_payment:"Paiement",step_confirmation:"Confirmation",feature_icon_car:"Flotte / Voiture",feature_icon_credit_card:"Paiement / Carte",feature_icon_wrench:"Maintenance / Réparation",feature_icon_headset:"Support / Assistance",feature_icon_shield_check:"Sécurité / Assurance",feature_icon_clock:"Disponibilité / 24h",feature_icon_map_pin:"Localisation / Pickup",feature_icon_plane:"Aéroport / Transport",feature_icon_calendar_check:"Réservation facile",my_reservations:"Mes réservations",manage_my_reservations:"Gérer mes réservations",nav_vehicles:"Véhicules",nav_destinations:"Destinations",nav_blog:"Blog",nav_faq:"FAQ",nav_about:"À propos",nav_contact:"Contact",nav_book_now:"Réserver",nav_open_menu:"Ouvrir le menu",nav_close_menu:"Fermer le menu",footer_links_title:"Liens utiles",footer_contact_title:"Contact",footer_follow_title:"Suivez-nous",footer_rights_reserved:". Tous droits réservés.",footer_privacy:"Confidentialité",footer_terms:"Conditions",footer_link_vehicles:"Nos véhicules",footer_link_about:"À propos",footer_link_faq:"FAQ",footer_link_terms:"Conditions",footer_link_privacy:"Confidentialité",footer_link_contact:"Contact",label_email:"Email:",label_phone:"Téléphone:",hero_city_label:"Ville de départ",hero_city_placeholder:"Choisir une ville",hero_cta_search_vehicles:"Rechercher des véhicules",home_badge_excellence:"Excellence & sérénité",advantage:"Avantage",go_to_advantage:"Aller à l’avantage",go_to_card:"Aller à la carte",hero_title_fallback_desktop:"Louez votre voiture avec",hero_subtitle_fallback:"confiance et simplicité",hero_title_fallback_mobile:"Louez votre voiture",hero_subtitle_prefix:"avec",hero_subtitle_highlight:"confiance et",hero_subtitle_fallback_line:"simplicité",hero_description_fallback:"Service premium, véhicules récents, assistance dédiée 24/7, Votre confort est notre priorité.",hero_description_fallback_desktop:"Service premium, véhicules récents, assistance dédiée 24/7. Votre confort est notre priorité.",why_title_fallback_home_desktop:"Pourquoi louer votre voiture à Agadir avec GadiWaze",why_title_fallback_home_mobile:"Pourquoi louer votre voiture à Agadir avec GadiWaze",feature_title_fleet:"Flotte Premium",feature_title_pricing:"Tarifs Transparents",feature_title_support:"Support 24/7",feature_desc_fleet:"Véhicules récents et bien entretenus de toutes catégories",feature_desc_pricing:"Aucun frais caché, économies garanties avec le paiement en ligne",feature_desc_support:"Assistance dédiée à tout moment pendant votre location",desktop_searchbar_aria:"Barre de recherche (desktop)",departure_city_short:"Ville départ",departure_city_title:"Ville de départ",pickup_point_optional_short:"Point retrait (optionnel)",pickup_point_optional_title:"Point de retrait (optionnel)",return_title:"Retour",return_optional_short:"Retour (optionnel)",return_optional_city:"Ville de retour (optionnel)",choose_return_city:"Choisir ville retour",return_same_city_hint:"Retour: même ville que le départ.",return_keep_same_hint:"Si vide, le retour restera “Même que départ”.",same_return_place:"Même lieu de retour",different_return_place:"Lieu de retour différent",dates:"Dates",times:"Heures",ready:"Prêt",step_label:"Étape",choose_city_then_check_dates:"Choisissez une ville puis vérifiez vos dates/heures.",select_valid_city_dates_hours:"Veuillez sélectionner une ville, des dates et des heures valides.",optional_leave_blank:"Optionnel — vous pouvez laisser vide.",view_vehicles:"Voir les véhicules",departure_label:"Départ",return_label:"Retour",hours_title:"Heures",pickup_date:"Date de prise en charge",pickup_time:"Heure de prise en charge",return_date:"Date de retour",return_time:"Heure de retour",wizard_pickup_time:"Heure de départ",wizard_return_time:"Heure de retour",optional_return_location:"Lieu de retour (optionnel)",same_as_departure:"Même que départ",return_point_optional_title:"Point de retour (optionnel)",choose_return_point:"Choisir un point de retour",choose_pickup_point:"Choisir un point",select_date:"Sélectionner une date",airport:"Aéroport",agency:"Agence",in_city:"En ville",in_city_prefix:"Dans",choose_city_to_start:"Choisissez une ville pour lancer la recherche",choose_city_and_dates_hint:"Choisissez une ville, puis vos dates.",edit_city_and_dates_hint:"Modifiez votre ville et vos dates.",select_city_and_dates_hint:"Sélectionnez une ville et des dates pour afficher les véhicules.",back_to_home:"Retour à l’accueil",search_empty_help_prefix:"Vous pouvez revenir à l’accueil pour sélectionner une ville, ou ajouter un paramètre à l’URL (ex:",search_empty_help_suffix:").",edit_search_title:"Modifier la recherche",category:"Catégorie",all_categories:"Toutes catégories",category_economy:"Économique",category_compact:"Compacte",category_luxury:"Luxe",category_suv:"SUV",category_van:"Utilitaire",category_fullsize:"Berline",sort_by:"Trier par",sort_brand:"Marque",sort_price_asc:"Prix croissant",sort_price_desc:"Prix décroissant",sort_rating:"Évaluation",price_per_day:"Prix par jour:",results:"résultat",vehicles:"véhicule",available:"disponible",no_vehicle_found:"Aucun véhicule trouvé",try_change_filters:"Essayez de modifier vos critères de recherche",reset_filters:"Réinitialiser les filtres",swipe_hint:"Balayez vers la droite pour voir d’autres véhicules →",view_specs:"Voir les spécifications",economy:"Économique",midsize:"Intermédiaire",economy_of:"Économie de",no_payment_option_admin:"Aucune option de paiement disponible (admin).",faq_title:"FAQ",faq_writing:"FAQ en cours de rédaction.",content_coming:"Contenu à venir.",page_about:"À propos",page_contact:"Contact",page_terms:"Conditions générales",page_privacy_policy:"Politique de confidentialité",page_generic:"Page",not_found_message:"Désolé, la page que vous recherchez n'existe pas ou a été déplacée.",requested_url:"URL demandée:",home:"Accueil",experience:"Expérience",why:"Pourquoi",why_this_experience:"Pourquoi cette expérience",experience_hint:"Choisissez vos dates et découvrez les voitures disponibles en quelques secondes.",highlights_label:"Highlights",highlights_title:"Les incontournables",learn_more:"En savoir plus",taghazout_cta_title:"Prêt à explorer la région ?",taghazout_cta_label:"Voir les voitures disponibles",taghazout_title_fallback:"Taghazout, Surf & Freedom",taghazout_subtitle_fallback:"Une parenthèse océan, route côtière et vibes locales.",taghazout_why_text:"Taghazout est un point de départ parfait pour explorer la côte, surfer au lever du soleil et découvrir des spots authentiques — le tout à votre rythme.",taghazout_hi1_title:"Spots de surf mythiques",taghazout_hi1_desc:"Des vagues accessibles et des points de vue spectaculaires tout au long de la côte.",taghazout_hi2_title:"Route côtière Anza → Imsouane",taghazout_hi2_desc:"Une des plus belles routes panoramiques de la région, idéale en fin d’après-midi.",taghazout_hi3_title:"Vallée du Paradis",taghazout_hi3_desc:"Fraîcheur, nature et paysages uniques pour une pause hors du temps.",taghazout_qi_surfers:"Surf",taghazout_qi_roadtrip:"Road trip",taghazout_qi_route:"Taghazout → Imsouane",taghazout_qi_paradise:"Vallée du Paradis",taghazout_spots_badge:"Les spots",taghazout_spots_title:"Les meilleurs spots de surf autour de Taghazout",taghazout_spots_subtitle:"Du débutant à l'expert, trouvez votre vague idéale",taghazout_filter_beginner:"Débutant",taghazout_filter_intermediate:"Intermédiaire",taghazout_filter_expert:"Expert",taghazout_filter_all:"Tous niveaux",taghazout_spot1_name:"Anchor Point",taghazout_spot1_level:"expert",taghazout_spot1_distance:"5 min",taghazout_spot1_type:"Reef break - Droite",taghazout_spot1_season:"Oct - Avril",taghazout_spot1_desc:"La vague la plus longue du Maroc, peut dérouler sur 300m. Point break de classe mondiale réservé aux surfeurs expérimentés. Magnifique vue depuis la falaise.",taghazout_spot2_name:"Hash Point",taghazout_spot2_level:"expert",taghazout_spot2_distance:"3 min",taghazout_spot2_type:"Reef break - Droite",taghazout_spot2_season:"Nov - Mars",taghazout_spot2_desc:"Point break puissant et technique. Vague rapide qui casse sur un récif peu profond. Nécessite une bonne maîtrise et connaissance des marées.",taghazout_spot3_name:"Killer Point",taghazout_spot3_level:"intermediate",taghazout_spot3_distance:"2 min",taghazout_spot3_type:"Reef break - Droite",taghazout_spot3_season:"Oct - Avril",taghazout_spot3_desc:"Vague accessible et fun, parfaite pour progresser. Longue droite sur récif avec plusieurs sections. Très populaire et souvent bondé.",taghazout_spot4_name:"La Source",taghazout_spot4_level:"beginner",taghazout_spot4_distance:"1 min",taghazout_spot4_type:"Beach break",taghazout_spot4_season:"Toute l'année",taghazout_spot4_desc:"Idéal pour débuter, fond de sable et vagues douces. Beach break accessible avec plusieurs pics. Parfait pour les cours de surf.",taghazout_spot5_name:"Boilers",taghazout_spot5_level:"expert",taghazout_spot5_distance:"7 min",taghazout_spot5_type:"Reef break - Gauche",taghazout_spot5_season:"Oct - Mars",taghazout_spot5_desc:"Big wave spot réservé aux experts. Vague puissante qui casse sur un récif exposé. Nécessite une grosse houle et des conditions parfaites.",taghazout_spot6_name:"Mysteries",taghazout_spot6_level:"expert",taghazout_spot6_distance:"4 min",taghazout_spot6_type:"Reef break - Droite",taghazout_spot6_season:"Nov - Avril",taghazout_spot6_desc:"Reef break technique avec des sections creuses. Vague exigeante qui demande de l'expérience. Moins fréquenté que les autres spots.",taghazout_spot7_name:"Banana Beach",taghazout_spot7_level:"intermediate",taghazout_spot7_distance:"15 min",taghazout_spot7_type:"Beach break",taghazout_spot7_season:"Toute l'année",taghazout_spot7_desc:"Longue plage de sable avec plusieurs pics. Vagues accessibles pour intermédiaires. Atmosphère familiale et village d'Aourir à proximité.",taghazout_spot8_name:"Tamraght",taghazout_spot8_level:"intermediate",taghazout_spot8_distance:"10 min",taghazout_spot8_type:"Beach/Reef break",taghazout_spot8_season:"Oct - Avril",taghazout_spot8_desc:"Village de surfeurs authentique avec plusieurs spots. Mix de beach break et reef break pour tous niveaux. Moins touristique que Taghazout.",taghazout_spot9_name:"Tamri",taghazout_spot9_level:"intermediate",taghazout_spot9_distance:"30 min",taghazout_spot9_type:"Beach break",taghazout_spot9_season:"Toute l'année",taghazout_spot9_desc:"Longue plage de sable noir avec vagues constantes. Plusieurs kilomètres de beach break. Parfait pour éviter la foule et profiter d'espace.",taghazout_spot10_name:"Imsouane",taghazout_spot10_level:"beginner",taghazout_spot10_distance:"1h20",taghazout_spot10_type:"Point break - Droite",taghazout_spot10_season:"Oct - Avril",taghazout_spot10_desc:"Une des plus longues vagues d'Afrique (800m+). Vague douce et accessible, idéale pour débuter ou se perfectionner. Village de pêcheurs tranquille.",taghazout_tips_badge:"Infos pratiques",taghazout_tips_title:"Conseils pour surfer à Taghazout",taghazout_tip1_title:"Meilleure saison",taghazout_tip1_desc:`Oct - Avril Houle Nord-Ouest Eau 15-18°C Combinaison 3/2mm`,taghazout_tip2_title:"Location planches",taghazout_tip2_desc:`Nombreux shops dans le village 100-150 MAD/jour Tous types de planches Wetsuits disponibles`,taghazout_tip3_title:"Parking & accès",taghazout_tip3_desc:`Parking gratuit devant la plupart des spots Accès facile en voiture Certains spots nécessitent une courte marche`,taghazout_tip4_title:"Écoles de surf",taghazout_tip4_desc:`10+ écoles certifiées Cours collectifs/privés 250-400 MAD/cours Matériel inclus`,taghazout_tip5_title:"Forecast surf",taghazout_tip5_desc:`Windguru Magicseaweed Surfline Prévisions 7 jours`,taghazout_tip6_title:"Location voiture",taghazout_tip6_desc:`Indispensable pour accéder aux spots GadiWaze : livraison gratuite Kilométrage illimité Réservez en ligne`,extras_title:"Options et extras",extras_subtitle:"Personnalisez votre location avec nos options additionnelles",no_option_selected:"Aucune option sélectionnée",add_options_hint:"Ajoutez des options pour personnaliser votre location",reservation_summary:"Récapitulatif de réservation",selected_options:"Options sélectionnées",options_subtotal:"Sous-total options",vehicle_label:"Véhicule",continue_to_payment:"Continuer vers le paiement",continue_edit:"Continuer la modification",online_payment_selected:"Paiement en ligne sélectionné",options_edit_later_hint:"Vous pourrez modifier vos options avant la confirmation finale",admin_mode_edit_allowed:"Mode Admin - Modification autorisée",reservation_summary_title:"Récapitulatif",total_for_prefix:"Total pour",reserve_vehicle:"Réserver ce véhicule",edit_booking:"Modifier la réservation",secure_online_payment:"Paiement sécurisé en ligne",no_prepayment_required:"Aucun prépaiement requis",admin_mode_extras:"Mode Admin - Modification des options",ff_extras_step_disabled_redirect_payment:"Étape Options désactivée — redirection vers paiement",extras_category_navigation:"Navigation & GPS",extras_category_safety:"Sécurité & Enfants",extras_category_comfort:"Confort & Accessoires",extras_category_insurance:"Assurances & Protection",payment_finalize:"Finalisation de la réservation",payment_fill_info:"Renseignez vos informations pour confirmer votre réservation",payment_conditions:"Conditions et acceptation",payment_summary:"Récapitulatif final",confirm_reservation:"Confirmer la réservation",payment_secure_ssl:"Paiement sécurisé par SSL. Vos données sont protégées.",payment_personal_info:"Informations personnelles",first_name:"Prénom",last_name:"Nom",email_label:"Email",phone:"Téléphone",driver_license_number:"Numéro de permis",payment_info_title:"Informations de paiement",cardholder_name:"Nom sur la carte",card_number:"Numéro de carte",expiry_date:"Date d'expiration",expiry_placeholder:"MM/AA",cvv:"CVV",accept_terms:"J'accepte les conditions générales de vente",accept_terms_hint:"Vous acceptez nos conditions d'utilisation et de location.",accept_privacy:"J'accepte la politique de confidentialité",accept_privacy_hint:"Vous acceptez le traitement de vos données personnelles.",secure_info_footer:"Vos informations sont transmises de manière sécurisée et restent strictement confidentielles.",economy_included:"Économie incluse",pay_at_agency:"Paiement en agence",pay_online:"Paiement en ligne",pay_now:"Payer maintenant",pay_later:"Payer en agence",seats:"places",doors:"portes",automatic:"Auto",manual:"Manuelle",automatic_long:"Automatique",manual_long:"Manuelle",per_day_suffix:"/jour",included_equipment:"Équipements inclus",pay_at_pickup:"Paiement à la prise en charge",technical_specs:"Spécifications techniques",terms_and_deductibles:"Conditions et franchises",spec_engine:"Moteur:",spec_power:"Puissance:",spec_consumption:"Consommation:",spec_emissions:"Émissions CO2:",spec_acceleration:"0-100 km/h:",spec_max_speed:"Vitesse max:",spec_trunk:"Coffre:",included_in_price:"Inclus dans le prix:",deductibles:"Franchises:",terms:"Conditions:",insurance_options:"Options d'assurance",insurance_standard_included:"Assurance Standard (Incluse)",insurance_premium:"Assurance Premium",no_car_selected:"Aucune voiture sélectionnée",total_options:"Total options",total_to_pay_prefix:"Total à",pay_now_lower:"payer maintenant",pay_at_agency_lower:"payer en agence",confirm_changes:"Confirmer les modifications",confirm_booking:"Confirmer la réservation",card_charged_now:"Votre carte sera débitée immédiatement",no_prepayment_pay_at_pickup:"Aucun prépaiement. Vous paierez lors de la prise en charge.",error_title:"Erreur",save_customer_failed:"Impossible d’enregistrer vos informations client.",save_customer_unexpected:"Une erreur inattendue est survenue lors de la sauvegarde du client.",ff_pay_now_disabled_redirect_agency:"Paiement en ligne désactivé — redirection vers paiement en agence",ff_pay_later_disabled_back:"Paiement en agence désactivé — retour à l’étape précédente",admin_mode_payment:"Mode Admin - Finalisation de la réservation",reservation_saved:"Votre demande de réservation a bien été enregistrée",reservation_created_success:"Réservation créée avec succès !",confirmed:"Confirmée",reservation_pending_badge:"En attente de confirmation",booking_details:"Détails de votre réservation",pickup_location:"Lieu de prise en charge",rental_dates:"Dates de location",start_label:"Départ:",end_label:"Retour:",duration:"Durée:",main_driver_info:"Informations du conducteur principal",name_label:"Nom:",payment_method:"Mode de paiement",payment_done_online:"Paiement en ligne effectué",payment_at_agency:"Paiement en agence",payment_at_pickup_hint:"Le paiement sera effectué lors de la prise en charge du véhicule",selected_extras:"Options sélectionnées",important_information:"Informations importantes",bring_to_pickup:"À apporter lors de la prise en charge",bring_license:"• Permis de conduire en cours de validité",bring_id:"• Pièce d'identité (carte d'identité ou passeport)",bring_credit_card:"• Carte de crédit au nom du conducteur principal",bring_payment_method:"• Moyen de paiement pour le montant total",cancellation_conditions:"Conditions d'annulation",cancellation_policy:"Annulation gratuite jusqu'à 24h avant la prise en charge. Au-delà, des frais peuvent s'appliquer selon nos conditions générales.",what_happens_next:"Ce qui va se passer maintenant",step_received:"• Nous avons bien reçu votre demande.",step_agent_check:"• Un agent vérifiera la disponibilité du véhicule.",step_email_or_call:"• Vous recevrez un email de confirmation ou un appel.",step_show_email:"• Présentez cet email lors de la prise du véhicule.",financial_summary:"Récapitulatif financier",paid:"Payé",to_pay_at_agency:"À payer en agence",download_failed_title:"Téléchargement impossible",pdf_generate_failed_prefix:"Impossible de générer le PDF",detail_prefix:"Détail",pdf_generate_generic_error:"Une erreur est survenue lors de la génération du PDF.",missing_reservation_info:"Informations de réservation manquantes",reassurance_cancel_24h:"Annulation gratuite jusqu'à 24h",reassurance_no_hidden_fees:"Pas de frais cachés",reassurance_support_24_7:"Assistance 24/7",reassurance_secure_agency_payment:"Paiement sécurisé en agence",email_sent_to:"Un email de confirmation a été envoyé à",keep_document_hint:"Gardez ce document : il contient toutes les informations nécessaires à votre prise en charge.",request_number:"Numéro de demande :",reservation_number:"Numéro de réservation :",download_confirmation:"Télécharger la confirmation",new_reservation:"Nouvelle réservation",reservation_lookup_title:"Gérer mes réservations",reservation_number_label:"Numéro de réservation",email_field_label:"Email",reservation_placeholder:"Ex: CR12345678",email_placeholder:"exemple@domaine.com",lookup_loading:"Recherche...",lookup_next:"Suivant",lookup_missing_fields:"Veuillez renseigner le numéro de réservation et votre email.",lookup_none_found:"Aucune réservation trouvée.",lookup_error:"Erreur lors de la recherche.",myres_loading:"Chargement...",myres_none:"Aucune réservation",myres_pickup_city:"Ville de retrait :",myres_start:"Début :",myres_return_location:"Lieu de retour :",myres_payment:"Paiement :",myres_need_lookup:'Veuillez repasser par la page "Mes réservations" pour retrouver votre réservation.',myres_not_found:"Réservation introuvable.",myres_load_error:"Erreur de chargement",myres_title_pending:"Votre demande de réservation est en attente",myres_title_confirmed:"Réservation confirmée !",myres_title_cancelled:"Réservation annulée",myres_title_prefix:"Réservation",myres_request_number:"Numéro de demande",myres_reservation_number:"Numéro de réservation",myres_badge_pending:"En attente de confirmation",myres_badge_confirmed:"Réservation confirmée",myres_badge_cancelled:"Réservation annulée",myres_status_unknown:"Statut inconnu",myres_expl_pending:"Votre demande de réservation a bien été reçue et est en cours de validation par notre équipe.",myres_expl_confirmed:"Votre réservation est confirmée. Vous trouverez ci-dessous le récapitulatif complet.",myres_expl_cancelled:"Votre réservation a été annulée. Si vous avez la moindre question, n'hésitez pas à nous contacter.",myres_end:"Fin :",myres_status:"Statut :",myres_total:"Total :",about_badge:"À PROPOS",about_subtitle:"Location de voiture premium à Agadir, par des locaux",about_who_title:"Qui sommes-nous ?",about_who_text:"GadiWaze est née d'un constat simple : louer une voiture au Maroc ne devrait pas être une source de stress. Basés à Agadir, nous proposons un service transparent, sans mauvaise surprise, avec des véhicules récents et une équipe réactive disponible par WhatsApp.",about_val_transparency:"Transparence totale",about_val_transparency_desc:"Prix final garanti, assurance et dépôt expliqués avant réservation. Pas de frais cachés.",about_val_local:"Expertise locale",about_val_local_desc:"Basés à Agadir, nous connaissons chaque route, chaque spot. Nos conseils sont ceux d'un ami sur place.",about_val_simplicity:"Simplicité",about_val_simplicity_desc:"Réservation en 2 minutes, livraison à l'aéroport ou à votre hôtel, assistance WhatsApp 7j/7.",about_cta:"Prêt à découvrir Agadir ?",faq_badge:"FAQ",faq_subtitle:"Tout ce que vous devez savoir avant de réserver",faq_search:"Rechercher une question...",faq_all:"Toutes",faq_reservation:"Réservation",faq_paiement:"Paiement",faq_assurance:"Assurance",faq_assistance:"Assistance",faq_no_results:"Aucun résultat trouvé",faq_cta_title:"Vous n'avez pas trouvé votre réponse ?",faq_cta_text:"Notre équipe est disponible pour répondre à toutes vos questions.",conditions_badge:"CONDITIONS",page_conditions:"Conditions générales de location",conditions_subtitle:"Les règles du jeu, en toute transparence",conditions_updated:"Dernière mise à jour",conditions_cta:"Des questions sur nos conditions ?",privacy_badge:"CONFIDENTIALITÉ",page_privacy:"Politique de confidentialité",privacy_subtitle:"Vos données sont protégées, point final",privacy_pill_no_sale:"Aucune revente de données",privacy_pill_cookies:"Cookies essentiels uniquement",privacy_pill_rgpd:"Conforme RGPD",privacy_dpo_title:"Exercer vos droits",privacy_dpo_text:"Pour toute question relative à vos données personnelles, contactez notre délégué à la protection des données.",contact_badge:"CONTACT",contact_subtitle:"Une question ? On est là pour vous.",contact_hours:"24h/24, 7j/7",contact_delivery_title:"Zones de livraison",contact_cta_question:"Questions fréquentes",contact_whatsapp:"Discuter sur WhatsApp",cta_book:"Réserver maintenant",btn_contact:"Nous contacter",seo_title_default:"GadiWaze - Location de voitures premium au Maroc",seo_description_default:"Réservez votre voiture au meilleur prix au Maroc. Paiement en agence, réservation instantanée, assistance 24/7.",og_title_default:"GadiWaze - Location de voitures premium",og_description_default:"Des voitures fiables, un service premium, des prix clairs. Réserver n'a jamais été aussi simple.",destinationExploreBadge:"À explorer",destinationPlacesCount:"lieux à découvrir",destinationPlacesAllAccessible:"Tous accessibles en voiture depuis Agadir",destinationTipsBadge:"Infos pratiques",destinationCtaTitleFallback:"Réservez votre voiture",destinationCtaLabelFallback:"Réserver une voiture",aeroportDestinationsBadge:"Destinations",aeroportDestinationsCount:"destinations depuis l'aéroport",aeroportDestinationsAccessible:"Accessibles avec votre voiture GadiWaze",aeroportTipsBadge:"Infos aéroport",aeroportTipsTitle:"Tout savoir à l'arrivée",taghazoutSpotsCount:"spots",taghazoutSpotsExploreTitle:"Explorer chaque spot",taghazoutSpotsExploreSubtitle:"Swipez pour découvrir les meilleurs spots de surf",pinnedFaqDefaultTitle:"Questions fréquentes",pinnedFaqDefaultSubtitle:"Tout ce que vous devez savoir avant de réserver",pinnedFaqSeeAll:"Voir toutes les questions",marrakechBannerText:"La ville ocre vous attend — partez à votre rythme",marrakechTipsTitle:"Conseils pour votre excursion à Marrakech",essaouiraBannerText:"L'Atlantique, le vent, la liberté",essaouiraTipsTitle:"Conseils pour votre excursion à Essaouira",agadirBannerText:"Le sud marocain vous attend",agadirTipsTitle:"Conseils pour conduire à Agadir",aeroportBannerText:"Atterrissez. Roulez. Explorez.",ouarzazateBannerText:"Le désert commence ici — partez l'explorer",ouarzazateTipsTitle:"Conseils pour votre excursion à Ouarzazate",tafraoutBannerText:"L'Anti-Atlas, sauvage et authentique",tafraoutTipsTitle:"Conseils pour votre excursion à Tafraout",dakhlaBannerText:"1100 km d'Atlantique, une aventure unique",dakhlaTipsTitle:"Conseils pour votre road trip vers Dakhla",mirleftBannerText:"L'Atlantique sauvage, rien que pour vous",mirleftTipsTitle:"Conseils pour votre excursion à Mirleft",tiznitBannerText:"L'argent berbère, l'authenticité du Sud",tiznitTipsTitle:"Conseils pour votre excursion à Tiznit",taghazoutBannerText:"Votre aventure surf commence ici",breadcrumbMarrakech:"Marrakech depuis Agadir",breadcrumbEssaouira:"Essaouira depuis Agadir",breadcrumbAgadir:"Location voiture Agadir",breadcrumbAeroport:"Location voiture Aéroport Agadir",breadcrumbTaghazout:"Spots de surf Taghazout",breadcrumbOuarzazate:"Ouarzazate depuis Agadir",breadcrumbTafraout:"Tafraout depuis Agadir",breadcrumbDakhla:"Dakhla depuis Agadir",breadcrumbMirleft:"Mirleft depuis Agadir",breadcrumbTiznit:"Tiznit depuis Agadir"},en:{back:"Back",continue:"Continue",next:"Next",loading:"Loading…",loading_dots:"Loading...",search:"Search",filters:"Filters",modify_search:"Edit search",total:"Total",day:"day",days:"days",admin:"Admin",or_similar:"Or similar",close:"Close",edit:"Edit",location:"Location",summary:"Summary",return_prefix:"Return:",step_search:"Search",step_selection:"Selection",step_details:"Details",step_extras:"Options",step_payment:"Payment",step_confirmation:"Confirmation",feature_icon_car:"Fleet / Car",feature_icon_credit_card:"Payment / Card",feature_icon_wrench:"Maintenance / Repair",feature_icon_headset:"Support / Assistance",feature_icon_shield_check:"Safety / Insurance",feature_icon_clock:"Availability / 24h",feature_icon_map_pin:"Location / Pickup",feature_icon_plane:"Airport / Transport",feature_icon_calendar_check:"Easy booking",my_reservations:"My reservations",manage_my_reservations:"Manage my reservations",nav_vehicles:"Vehicles",nav_destinations:"Destinations",nav_blog:"Blog",nav_faq:"FAQ",nav_about:"About",nav_contact:"Contact",nav_book_now:"Book now",nav_open_menu:"Open menu",nav_close_menu:"Close menu",footer_links_title:"Useful links",footer_contact_title:"Contact",footer_follow_title:"Follow us",footer_rights_reserved:". All rights reserved.",footer_privacy:"Privacy",footer_terms:"Terms",footer_link_vehicles:"Our vehicles",footer_link_about:"About",footer_link_faq:"FAQ",footer_link_terms:"Terms",footer_link_privacy:"Privacy",footer_link_contact:"Contact",label_email:"Email:",label_phone:"Phone:",hero_city_label:"Pickup city",hero_city_placeholder:"Choose a city",hero_cta_search_vehicles:"Search vehicles",home_badge_excellence:"Excellence & peace of mind",advantage:"Benefit",go_to_advantage:"Go to benefit",go_to_card:"Go to card",hero_title_fallback_desktop:"Rent your car with",hero_subtitle_fallback:"confidence and simplicity",hero_title_fallback_mobile:"Rent your car",hero_subtitle_prefix:"with",hero_subtitle_highlight:"confidence and",hero_subtitle_fallback_line:"simplicity",hero_description_fallback:"Premium service, recent vehicles, dedicated 24/7 support—your comfort is our priority.",hero_description_fallback_desktop:"Premium service, recent vehicles, dedicated 24/7 support—your comfort is our priority.",why_title_fallback_home_desktop:"Why rent your car in Agadir with GadiWaze",why_title_fallback_home_mobile:"Why rent your car in Agadir with GadiWaze",feature_title_fleet:"Premium fleet",feature_title_pricing:"Transparent pricing",feature_title_support:"24/7 support",feature_desc_fleet:"Recent, well-maintained vehicles in all categories",feature_desc_pricing:"No hidden fees—guaranteed savings with online payment",feature_desc_support:"Dedicated assistance anytime during your rental",desktop_searchbar_aria:"Search bar (desktop)",departure_city_short:"Pickup city",departure_city_title:"Pickup city",pickup_point_optional_short:"Pickup point (optional)",pickup_point_optional_title:"Pickup point (optional)",return_title:"Return",return_optional_short:"Return (optional)",return_optional_city:"Return city (optional)",choose_return_city:"Choose return city",return_same_city_hint:"Return: same city as pickup.",return_keep_same_hint:"If empty, it will remain “Same as pickup”.",same_return_place:"Same return place",different_return_place:"Different return place",dates:"Dates",times:"Times",ready:"Ready",step_label:"Step",choose_city_then_check_dates:"Choose a city, then check your dates/times.",select_valid_city_dates_hours:"Please select a city, valid dates and valid times.",optional_leave_blank:"Optional — you can leave it empty.",view_vehicles:"View vehicles",departure_label:"Start",return_label:"End",hours_title:"Times",pickup_date:"Pickup date",pickup_time:"Pickup time",return_date:"Return date",return_time:"Return time",wizard_pickup_time:"Pickup time",wizard_return_time:"Return time",optional_return_location:"Return location (optional)",same_as_departure:"Same as pickup",return_point_optional_title:"Return point (optional)",choose_return_point:"Choose a return point",choose_pickup_point:"Choose a pickup point",select_date:"Select a date",airport:"Airport",agency:"Agency",in_city:"In the city",in_city_prefix:"In",choose_city_to_start:"Choose a city to start searching",choose_city_and_dates_hint:"Choose a city, then your dates.",edit_city_and_dates_hint:"Edit your city and dates.",select_city_and_dates_hint:"Select a city and dates to view vehicles.",back_to_home:"Back to home",search_empty_help_prefix:"You can go back to home to select a city, or add a URL parameter (e.g.",search_empty_help_suffix:").",edit_search_title:"Edit search",category:"Category",all_categories:"All categories",category_economy:"Economy",category_compact:"Compact",category_luxury:"Luxury",category_suv:"SUV",category_van:"Van",category_fullsize:"Sedan",sort_by:"Sort by",sort_brand:"Brand",sort_price_asc:"Price: low to high",sort_price_desc:"Price: high to low",sort_rating:"Rating",price_per_day:"Price per day:",results:"result",vehicles:"vehicle",available:"available",no_vehicle_found:"No vehicle found",try_change_filters:"Try adjusting your search criteria",reset_filters:"Reset filters",swipe_hint:"Swipe right to see more vehicles →",view_specs:"View specs",economy:"Economy",midsize:"Midsize",economy_of:"Save",no_payment_option_admin:"No payment option available (admin).",faq_title:"FAQ",faq_writing:"FAQ is being written.",content_coming:"Content coming soon.",page_about:"About",page_contact:"Contact",page_terms:"Terms & conditions",page_privacy_policy:"Privacy policy",page_generic:"Page",not_found_message:"Sorry, the page you are looking for does not exist or has been moved.",requested_url:"Requested URL:",home:"Home",experience:"Experience",why:"Why",why_this_experience:"Why this experience",experience_hint:"Choose your dates and discover available cars in seconds.",highlights_label:"Highlights",highlights_title:"Must-sees",learn_more:"Learn more",taghazout_cta_title:"Ready to explore the area?",taghazout_cta_label:"View available cars",taghazout_title_fallback:"Taghazout, Surf & Freedom",taghazout_subtitle_fallback:"A seaside escape, coastal roads and local vibes.",taghazout_why_text:"Taghazout is a perfect base to explore the coast, surf at sunrise and discover authentic spots — at your own pace.",taghazout_hi1_title:"Legendary surf spots",taghazout_hi1_desc:"Accessible waves and stunning viewpoints along the coast.",taghazout_hi2_title:"Coastal road Anza → Imsouane",taghazout_hi2_desc:"One of the region’s most scenic routes—perfect in the late afternoon.",taghazout_hi3_title:"Paradise Valley",taghazout_hi3_desc:"Fresh air, nature and unique landscapes for a timeless break.",taghazout_qi_surfers:"Surf",taghazout_qi_roadtrip:"Road trip",taghazout_qi_route:"Taghazout → Imsouane",taghazout_qi_paradise:"Paradise Valley",taghazout_spots_badge:"The Spots",taghazout_spots_title:"The Best Surf Spots Around Taghazout",taghazout_spots_subtitle:"From beginner to expert, find your perfect wave",taghazout_filter_beginner:"Beginner",taghazout_filter_intermediate:"Intermediate",taghazout_filter_expert:"Expert",taghazout_filter_all:"All levels",taghazout_spot1_name:"Anchor Point",taghazout_spot1_level:"expert",taghazout_spot1_distance:"5 min",taghazout_spot1_type:"Reef break - Right",taghazout_spot1_season:"Oct - April",taghazout_spot1_desc:"Morocco's longest wave, can peel for 300m. World-class point break reserved for experienced surfers. Beautiful cliff views.",taghazout_spot2_name:"Hash Point",taghazout_spot2_level:"expert",taghazout_spot2_distance:"3 min",taghazout_spot2_type:"Reef break - Right",taghazout_spot2_season:"Nov - March",taghazout_spot2_desc:"Powerful and technical point break. Fast wave breaking over shallow reef. Requires good mastery and tide knowledge.",taghazout_spot3_name:"Killer Point",taghazout_spot3_level:"intermediate",taghazout_spot3_distance:"2 min",taghazout_spot3_type:"Reef break - Right",taghazout_spot3_season:"Oct - April",taghazout_spot3_desc:"Accessible and fun wave, perfect for progression. Long right over reef with multiple sections. Very popular and often crowded.",taghazout_spot4_name:"La Source",taghazout_spot4_level:"beginner",taghazout_spot4_distance:"1 min",taghazout_spot4_type:"Beach break",taghazout_spot4_season:"Year-round",taghazout_spot4_desc:"Ideal for beginners, sandy bottom and gentle waves. Accessible beach break with multiple peaks. Perfect for surf lessons.",taghazout_spot5_name:"Boilers",taghazout_spot5_level:"expert",taghazout_spot5_distance:"7 min",taghazout_spot5_type:"Reef break - Left",taghazout_spot5_season:"Oct - March",taghazout_spot5_desc:"Big wave spot reserved for experts. Powerful wave breaking on exposed reef. Requires big swell and perfect conditions.",taghazout_spot6_name:"Mysteries",taghazout_spot6_level:"expert",taghazout_spot6_distance:"4 min",taghazout_spot6_type:"Reef break - Right",taghazout_spot6_season:"Nov - April",taghazout_spot6_desc:"Technical reef break with hollow sections. Demanding wave requiring experience. Less crowded than other spots.",taghazout_spot7_name:"Banana Beach",taghazout_spot7_level:"intermediate",taghazout_spot7_distance:"15 min",taghazout_spot7_type:"Beach break",taghazout_spot7_season:"Year-round",taghazout_spot7_desc:"Long sandy beach with multiple peaks. Accessible waves for intermediates. Family atmosphere and Aourir village nearby.",taghazout_spot8_name:"Tamraght",taghazout_spot8_level:"intermediate",taghazout_spot8_distance:"10 min",taghazout_spot8_type:"Beach/Reef break",taghazout_spot8_season:"Oct - April",taghazout_spot8_desc:"Authentic surf village with multiple spots. Mix of beach and reef breaks for all levels. Less touristy than Taghazout.",taghazout_spot9_name:"Tamri",taghazout_spot9_level:"intermediate",taghazout_spot9_distance:"30 min",taghazout_spot9_type:"Beach break",taghazout_spot9_season:"Year-round",taghazout_spot9_desc:"Long black sand beach with consistent waves. Several kilometers of beach break. Perfect to avoid crowds and enjoy space.",taghazout_spot10_name:"Imsouane",taghazout_spot10_level:"beginner",taghazout_spot10_distance:"1h20",taghazout_spot10_type:"Point break - Right",taghazout_spot10_season:"Oct - April",taghazout_spot10_desc:"One of Africa's longest waves (800m+). Gentle and accessible wave, ideal for beginners or progression. Quiet fishing village.",taghazout_tips_badge:"Practical Info",taghazout_tips_title:"Tips for Surfing in Taghazout",taghazout_tip1_title:"Best Season",taghazout_tip1_desc:`Oct - April North-West swell Water 15-18°C 3/2mm wetsuit`,taghazout_tip2_title:"Board Rental",taghazout_tip2_desc:`Many shops in the village 100-150 MAD/day All board types Wetsuits available`,taghazout_tip3_title:"Parking & Access",taghazout_tip3_desc:`Free parking at most spots Easy car access Some spots require short walk`,taghazout_tip4_title:"Surf Schools",taghazout_tip4_desc:`10+ certified schools Group/private lessons 250-400 MAD/lesson Equipment included`,taghazout_tip5_title:"Surf Forecast",taghazout_tip5_desc:`Windguru Magicseaweed Surfline 7-day forecasts`,taghazout_tip6_title:"Car Rental",taghazout_tip6_desc:`Essential to access spots GadiWaze: free delivery Unlimited mileage Book online`,extras_title:"Options & extras",extras_subtitle:"Customize your rental with additional options",no_option_selected:"No options selected",add_options_hint:"Add options to customize your rental",reservation_summary:"Booking summary",selected_options:"Selected options",options_subtotal:"Options subtotal",vehicle_label:"Vehicle",continue_to_payment:"Continue to payment",continue_edit:"Continue editing",online_payment_selected:"Online payment selected",options_edit_later_hint:"You can edit your options before the final confirmation",admin_mode_edit_allowed:"Admin mode - Editing allowed",reservation_summary_title:"Summary",total_for_prefix:"Total for",reserve_vehicle:"Reserve this car",edit_booking:"Edit booking",secure_online_payment:"Secure online payment",no_prepayment_required:"No prepayment required",admin_mode_extras:"Admin mode - Edit options",ff_extras_step_disabled_redirect_payment:"Extras step disabled — redirecting to payment",extras_category_navigation:"Navigation & GPS",extras_category_safety:"Safety & kids",extras_category_comfort:"Comfort & accessories",extras_category_insurance:"Insurance & protection",payment_finalize:"Finalize your booking",payment_fill_info:"Enter your details to confirm your booking",payment_conditions:"Terms & acceptance",payment_summary:"Final summary",confirm_reservation:"Confirm booking",payment_secure_ssl:"Secure payment via SSL. Your data is protected.",payment_personal_info:"Personal information",first_name:"First name",last_name:"Last name",email_label:"Email",phone:"Phone",driver_license_number:"Driver license number",payment_info_title:"Payment information",cardholder_name:"Name on card",card_number:"Card number",expiry_date:"Expiry date",expiry_placeholder:"MM/YY",cvv:"CVV",accept_terms:"I accept the terms and conditions",accept_terms_hint:"You accept our rental terms and conditions.",accept_privacy:"I accept the privacy policy",accept_privacy_hint:"You accept the processing of your personal data.",secure_info_footer:"Your information is transmitted securely and remains strictly confidential.",economy_included:"Savings included",pay_at_agency:"Pay at agency",pay_online:"Pay online",pay_now:"Pay now",pay_later:"Pay at agency",seats:"seats",doors:"doors",automatic:"Auto",manual:"Manual",automatic_long:"Automatic",manual_long:"Manual",per_day_suffix:"/day",included_equipment:"Included equipment",pay_at_pickup:"Pay at pickup",technical_specs:"Technical specifications",terms_and_deductibles:"Terms and deductibles",spec_engine:"Engine:",spec_power:"Power:",spec_consumption:"Consumption:",spec_emissions:"CO2 emissions:",spec_acceleration:"0-100 km/h:",spec_max_speed:"Top speed:",spec_trunk:"Trunk:",included_in_price:"Included in price:",deductibles:"Deductibles:",terms:"Terms:",insurance_options:"Insurance options",insurance_standard_included:"Standard insurance (included)",insurance_premium:"Premium insurance",no_car_selected:"No car selected",total_options:"Options total",total_to_pay_prefix:"Total to",pay_now_lower:"pay now",pay_at_agency_lower:"pay at agency",confirm_changes:"Confirm changes",confirm_booking:"Confirm booking",card_charged_now:"Your card will be charged immediately",no_prepayment_pay_at_pickup:"No prepayment. You will pay when picking up the car.",error_title:"Error",save_customer_failed:"Unable to save your customer information.",save_customer_unexpected:"An unexpected error occurred while saving the customer.",ff_pay_now_disabled_redirect_agency:"Online payment disabled — redirecting to agency payment",ff_pay_later_disabled_back:"Pay at agency disabled — going back to previous step",admin_mode_payment:"Admin mode - Finalize booking",reservation_saved:"Your booking request has been recorded",reservation_created_success:"Booking created successfully!",confirmed:"Confirmed",reservation_pending_badge:"Pending confirmation",booking_details:"Booking details",pickup_location:"Pickup location",rental_dates:"Rental dates",start_label:"Start:",end_label:"End:",duration:"Duration:",main_driver_info:"Main driver information",name_label:"Name:",payment_method:"Payment method",payment_done_online:"Online payment completed",payment_at_agency:"Pay at agency",payment_at_pickup_hint:"Payment will be made when picking up the vehicle",selected_extras:"Selected options",important_information:"Important information",bring_to_pickup:"Bring at pickup",bring_license:"• Valid driver license",bring_id:"• ID document (ID card or passport)",bring_credit_card:"• Credit card in the main driver's name",bring_payment_method:"• Payment method for the total amount",cancellation_conditions:"Cancellation policy",cancellation_policy:"Free cancellation up to 24 hours before pickup. After that, fees may apply according to our terms.",what_happens_next:"What happens next",step_received:"• We have received your request.",step_agent_check:"• An agent will check vehicle availability.",step_email_or_call:"• You will receive a confirmation email or a call.",step_show_email:"• Show this email when picking up the vehicle.",financial_summary:"Financial summary",paid:"Paid",to_pay_at_agency:"To pay at agency",download_failed_title:"Download failed",pdf_generate_failed_prefix:"Unable to generate PDF",detail_prefix:"Details",pdf_generate_generic_error:"An error occurred while generating the PDF.",missing_reservation_info:"Missing booking information",reassurance_cancel_24h:"Free cancellation up to 24h",reassurance_no_hidden_fees:"No hidden fees",reassurance_support_24_7:"24/7 support",reassurance_secure_agency_payment:"Secure agency payment",email_sent_to:"A confirmation email was sent to",keep_document_hint:"Keep this document: it contains everything needed for pickup.",request_number:"Request number:",reservation_number:"Reservation number:",download_confirmation:"Download confirmation",new_reservation:"New booking",reservation_lookup_title:"Manage my reservations",reservation_number_label:"Reservation number",email_field_label:"Email",reservation_placeholder:"e.g. CR12345678",email_placeholder:"example@domain.com",lookup_loading:"Searching...",lookup_next:"Next",lookup_missing_fields:"Please enter your reservation number and your email.",lookup_none_found:"No reservation found.",lookup_error:"Search error.",myres_loading:"Loading...",myres_none:"No reservation",myres_pickup_city:"Pickup city:",myres_start:"Start:",myres_return_location:"Return location:",myres_payment:"Payment:",myres_need_lookup:'Please go back to "My reservations" to find your booking.',myres_not_found:"Booking not found.",myres_load_error:"Loading error",myres_title_pending:"Your booking request is pending",myres_title_confirmed:"Booking confirmed!",myres_title_cancelled:"Booking cancelled",myres_title_prefix:"Booking",myres_request_number:"Request number",myres_reservation_number:"Reservation number",myres_badge_pending:"Pending confirmation",myres_badge_confirmed:"Booking confirmed",myres_badge_cancelled:"Booking cancelled",myres_status_unknown:"Unknown status",myres_expl_pending:"We received your booking request and our team is reviewing it.",myres_expl_confirmed:"Your booking is confirmed. You’ll find the full summary below.",myres_expl_cancelled:"Your booking was cancelled. If you have any questions, feel free to contact us.",myres_end:"End:",myres_status:"Status:",myres_total:"Total:",about_badge:"ABOUT",about_subtitle:"Premium car rental in Agadir, by locals",about_who_title:"Who are we?",about_who_text:"GadiWaze was born from a simple observation: renting a car in Morocco shouldn't be stressful. Based in Agadir, we offer a transparent service, with no bad surprises, recent vehicles and a responsive team available on WhatsApp.",about_val_transparency:"Total transparency",about_val_transparency_desc:"Guaranteed final price, insurance and deposit explained before booking. No hidden fees.",about_val_local:"Local expertise",about_val_local_desc:"Based in Agadir, we know every road, every spot. Our advice is that of a friend on the ground.",about_val_simplicity:"Simplicity",about_val_simplicity_desc:"Book in 2 minutes, delivery to the airport or your hotel, WhatsApp support 7 days a week.",about_cta:"Ready to discover Agadir?",faq_badge:"FAQ",faq_subtitle:"Everything you need to know before booking",faq_search:"Search a question...",faq_all:"All",faq_reservation:"Booking",faq_paiement:"Payment",faq_assurance:"Insurance",faq_assistance:"Support",faq_no_results:"No results found",faq_cta_title:"Didn't find your answer?",faq_cta_text:"Our team is available to answer all your questions.",conditions_badge:"TERMS",page_conditions:"Rental terms and conditions",conditions_subtitle:"The rules of the game, in full transparency",conditions_updated:"Last updated",conditions_cta:"Questions about our terms?",privacy_badge:"PRIVACY",page_privacy:"Privacy policy",privacy_subtitle:"Your data is protected, period",privacy_pill_no_sale:"No data resale",privacy_pill_cookies:"Essential cookies only",privacy_pill_rgpd:"GDPR compliant",privacy_dpo_title:"Exercise your rights",privacy_dpo_text:"For any question regarding your personal data, contact our data protection officer.",contact_badge:"CONTACT",contact_subtitle:"Got a question? We're here for you.",contact_hours:"24/7",contact_delivery_title:"Delivery areas",contact_cta_question:"Frequently asked questions",contact_whatsapp:"Chat on WhatsApp",cta_book:"Book now",btn_contact:"Contact us",seo_title_default:"GadiWaze - Premium car rental in Morocco",seo_description_default:"Book your car at the best price in Morocco. Pay at agency, instant booking, 24/7 assistance.",og_title_default:"GadiWaze - Premium car rental",og_description_default:"Reliable cars, premium service, clear pricing. Booking has never been easier.",destinationExploreBadge:"Explore",destinationPlacesCount:"Places to Discover",destinationPlacesAllAccessible:"All accessible by car from Agadir",destinationTipsBadge:"Practical Info",destinationCtaTitleFallback:"Book your car",destinationCtaLabelFallback:"Book a car",aeroportDestinationsBadge:"Destinations",aeroportDestinationsCount:"Destinations from the Airport",aeroportDestinationsAccessible:"All reachable with your GadiWaze car",aeroportTipsBadge:"Airport Tips",aeroportTipsTitle:"Everything You Need at Arrival",taghazoutSpotsCount:"spots",taghazoutSpotsExploreTitle:"Explore each spot",taghazoutSpotsExploreSubtitle:"Swipe to discover the best surf spots",pinnedFaqDefaultTitle:"Frequently asked questions",pinnedFaqDefaultSubtitle:"Everything you need to know before booking",pinnedFaqSeeAll:"See all questions",marrakechBannerText:"The ochre city awaits — explore at your own pace",marrakechTipsTitle:"Tips for Your Marrakech Road Trip",essaouiraBannerText:"The Atlantic, the wind, freedom",essaouiraTipsTitle:"Tips for Your Essaouira Road Trip",agadirBannerText:"Southern Morocco awaits",agadirTipsTitle:"Tips for Driving in Agadir",aeroportBannerText:"Land. Drive. Explore.",ouarzazateBannerText:"The desert starts here — go explore it",ouarzazateTipsTitle:"Tips for Your Ouarzazate Road Trip",tafraoutBannerText:"The Anti-Atlas, wild and authentic",tafraoutTipsTitle:"Tips for Your Tafraout Road Trip",dakhlaBannerText:"1100 km of Atlantic, a unique adventure",dakhlaTipsTitle:"Tips for Your Dakhla Road Trip",mirleftBannerText:"The wild Atlantic, all for yourself",mirleftTipsTitle:"Tips for Your Mirleft Road Trip",tiznitBannerText:"Berber silver, the authenticity of the South",tiznitTipsTitle:"Tips for Your Tiznit Road Trip",taghazoutBannerText:"Your surf adventure starts here",breadcrumbMarrakech:"Marrakech from Agadir",breadcrumbEssaouira:"Essaouira from Agadir",breadcrumbAgadir:"Car Rental Agadir",breadcrumbAeroport:"Agadir Airport Car Rental",breadcrumbTaghazout:"Taghazout Surf Spots",breadcrumbOuarzazate:"Ouarzazate from Agadir",breadcrumbTafraout:"Tafraout from Agadir",breadcrumbDakhla:"Dakhla from Agadir",breadcrumbMirleft:"Mirleft from Agadir",breadcrumbTiznit:"Tiznit from Agadir"},es:{back:"Volver",continue:"Continuar",next:"Siguiente",loading:"Cargando…",loading_dots:"Cargando...",search:"Búsqueda",filters:"Filtros",modify_search:"Modificar la búsqueda",total:"Total",day:"día",days:"días",admin:"Admin",or_similar:"O similar",close:"Cerrar",edit:"Modificar",location:"Lugar",summary:"Resumen",return_prefix:"Devolución:",step_search:"Búsqueda",step_selection:"Selección",step_details:"Detalles",step_extras:"Opciones",step_payment:"Pago",step_confirmation:"Confirmación",feature_icon_car:"Flota / Vehículo",feature_icon_credit_card:"Pago / Tarjeta",feature_icon_wrench:"Mantenimiento / Reparación",feature_icon_headset:"Soporte / Asistencia",feature_icon_shield_check:"Seguridad / Seguro",feature_icon_clock:"Disponibilidad / 24 h",feature_icon_map_pin:"Localización / Recogida",feature_icon_plane:"Aeropuerto / Transporte",feature_icon_calendar_check:"Reserva fácil",my_reservations:"Mis reservas",manage_my_reservations:"Gestionar mis reservas",nav_vehicles:"Vehículos",nav_destinations:"Destinos",nav_blog:"Blog",nav_faq:"FAQ",nav_about:"Acerca de",nav_contact:"Contacto",nav_book_now:"Reservar",nav_open_menu:"Abrir el menú",nav_close_menu:"Cerrar el menú",footer_links_title:"Información útil",footer_contact_title:"Contacto",footer_follow_title:"Síguenos",footer_rights_reserved:". Todos los derechos reservados.",footer_privacy:"Privacidad",footer_terms:"Condiciones",footer_link_vehicles:"Nuestros vehículos",footer_link_about:"Acerca de",footer_link_faq:"FAQ",footer_link_terms:"Condiciones",footer_link_privacy:"Privacidad",footer_link_contact:"Contacto",label_email:"Email:",label_phone:"Teléfono:",hero_city_label:"Ciudad de recogida",hero_city_placeholder:"Elegir una ciudad",hero_cta_search_vehicles:"Buscar vehículos",home_badge_excellence:"Excelencia & tranquilidad",advantage:"Ventaja",go_to_advantage:"Ver la ventaja",go_to_card:"Ver la tarjeta",hero_title_fallback_desktop:"Alquile su coche con",hero_subtitle_fallback:"confianza y facilidad",hero_title_fallback_mobile:"Alquile su coche",hero_subtitle_prefix:"con",hero_subtitle_highlight:"confianza y",hero_subtitle_fallback_line:"facilidad",hero_description_fallback:"Servicio premium, vehículos recientes, asistencia dedicada 24/7. Su comodidad es nuestra prioridad.",hero_description_fallback_desktop:"Servicio premium, vehículos recientes, asistencia dedicada 24/7. Su comodidad es nuestra prioridad.",why_title_fallback_home_desktop:"¿Por qué alquilar su coche en Agadir con GadiWaze?",why_title_fallback_home_mobile:"¿Por qué alquilar su coche en Agadir con GadiWaze?",feature_title_fleet:"Flota Premium",feature_title_pricing:"Precios Transparentes",feature_title_support:"Soporte 24/7",feature_desc_fleet:"Vehículos recientes y bien mantenidos de todas las categorías",feature_desc_pricing:"Sin cargos ocultos, ahorro garantizado con el pago en línea",feature_desc_support:"Asistencia dedicada en todo momento durante su alquiler",desktop_searchbar_aria:"Barra de búsqueda (escritorio)",departure_city_short:"Ciudad de recogida",departure_city_title:"Ciudad de recogida",pickup_point_optional_short:"Punto de recogida (opcional)",pickup_point_optional_title:"Punto de recogida (opcional)",return_title:"Devolución",return_optional_short:"Devolución (opcional)",return_optional_city:"Ciudad de devolución (opcional)",choose_return_city:"Elegir ciudad de devolución",return_same_city_hint:"Devolución: misma ciudad que la recogida.",return_keep_same_hint:"Si se deja vacío, la devolución será «Igual que la recogida».",same_return_place:"Mismo lugar de devolución",different_return_place:"Lugar de devolución diferente",dates:"Fechas",times:"Horas",ready:"Listo",step_label:"Paso",choose_city_then_check_dates:"Elija una ciudad y verifique sus fechas y horas.",select_valid_city_dates_hours:"Seleccione una ciudad, fechas y horas válidas.",optional_leave_blank:"Opcional — puede dejarlo en blanco.",view_vehicles:"Ver los vehículos",departure_label:"Recogida",return_label:"Devolución",hours_title:"Horas",pickup_date:"Fecha de recogida",pickup_time:"Hora de recogida",return_date:"Fecha de devolución",return_time:"Hora de devolución",wizard_pickup_time:"Hora de recogida",wizard_return_time:"Hora de devolución",optional_return_location:"Lugar de devolución (opcional)",same_as_departure:"Igual que la recogida",return_point_optional_title:"Punto de devolución (opcional)",choose_return_point:"Elegir un punto de devolución",choose_pickup_point:"Elegir un punto de recogida",select_date:"Seleccionar una fecha",airport:"Aeropuerto",agency:"Agencia",in_city:"En la ciudad",in_city_prefix:"En",choose_city_to_start:"Elija una ciudad para iniciar la búsqueda",choose_city_and_dates_hint:"Elija una ciudad y sus fechas.",edit_city_and_dates_hint:"Modifique su ciudad y sus fechas.",select_city_and_dates_hint:"Seleccione una ciudad y fechas para ver los vehículos disponibles.",back_to_home:"Volver al inicio",search_empty_help_prefix:"Puede volver al inicio para seleccionar una ciudad, o añadir un parámetro a la URL (ej:",search_empty_help_suffix:").",edit_search_title:"Modificar la búsqueda",category:"Categoría",all_categories:"Todas las categorías",category_economy:"Económico",category_compact:"Compacto",category_luxury:"Lujo",category_suv:"SUV",category_van:"Furgoneta",category_fullsize:"Berlina",sort_by:"Ordenar por",sort_brand:"Marca",sort_price_asc:"Precio ascendente",sort_price_desc:"Precio descendente",sort_rating:"Valoración",price_per_day:"Precio por día:",results:"resultado",vehicles:"vehículo",available:"disponible",no_vehicle_found:"Ningún vehículo encontrado",try_change_filters:"Pruebe a modificar sus criterios de búsqueda",reset_filters:"Restablecer los filtros",swipe_hint:"Deslice hacia la derecha para ver más vehículos →",view_specs:"Ver las especificaciones",economy:"Económico",midsize:"Mediano",economy_of:"Ahorro de",no_payment_option_admin:"Ninguna opción de pago disponible (admin).",faq_title:"FAQ",faq_writing:"FAQ en elaboración.",content_coming:"Contenido próximamente.",page_about:"Acerca de",page_contact:"Contacto",page_terms:"Condiciones generales",page_privacy_policy:"Política de privacidad",page_generic:"Página",not_found_message:"Lo sentimos, la página que busca no existe o ha sido trasladada.",requested_url:"URL solicitada:",home:"Inicio",experience:"Experiencia",why:"Por qué",why_this_experience:"Por qué esta experiencia",experience_hint:"Elija sus fechas y descubra los coches disponibles en pocos segundos.",highlights_label:"Highlights",highlights_title:"Lo imprescindible",learn_more:"Más información",taghazout_cta_title:"¿Listo para explorar la región?",taghazout_cta_label:"Ver los coches disponibles",taghazout_title_fallback:"Taghazout, Surf & Freedom",taghazout_subtitle_fallback:"Un paréntesis de océano, carretera costera y ambiente local.",taghazout_why_text:"Taghazout es el punto de partida perfecto para explorar la costa, surfear al amanecer y descubrir rincones auténticos — todo a su ritmo.",taghazout_hi1_title:"Spots de surf míticos",taghazout_hi1_desc:"Olas accesibles y vistas espectaculares a lo largo de toda la costa.",taghazout_hi2_title:"Carretera costera Anza → Imsouane",taghazout_hi2_desc:"Una de las rutas panorámicas más bellas de la región, ideal al atardecer.",taghazout_hi3_title:"Valle del Paraíso",taghazout_hi3_desc:"Frescura, naturaleza y paisajes únicos para una pausa fuera del tiempo.",taghazout_qi_surfers:"Surf",taghazout_qi_roadtrip:"Road trip",taghazout_qi_route:"Taghazout → Imsouane",taghazout_qi_paradise:"Valle del Paraíso",taghazout_spots_badge:"Los spots",taghazout_spots_title:"Los mejores spots de surf alrededor de Taghazout",taghazout_spots_subtitle:"Del principiante al experto, encuentre su ola ideal",taghazout_filter_beginner:"Principiante",taghazout_filter_intermediate:"Intermedio",taghazout_filter_expert:"Experto",taghazout_filter_all:"Todos los niveles",taghazout_spot1_name:"Anchor Point",taghazout_spot1_level:"expert",taghazout_spot1_distance:"5 min",taghazout_spot1_type:"Reef break - Derecha",taghazout_spot1_season:"Oct - Abril",taghazout_spot1_desc:"La ola más larga de Marruecos, puede extenderse 300 m. Point break de clase mundial reservado a surfistas experimentados. Magníficas vistas desde el acantilado.",taghazout_spot2_name:"Hash Point",taghazout_spot2_level:"expert",taghazout_spot2_distance:"3 min",taghazout_spot2_type:"Reef break - Derecha",taghazout_spot2_season:"Nov - Marzo",taghazout_spot2_desc:"Point break potente y técnico. Ola rápida que rompe sobre un arrecife poco profundo. Requiere buen dominio y conocimiento de las mareas.",taghazout_spot3_name:"Killer Point",taghazout_spot3_level:"intermediate",taghazout_spot3_distance:"2 min",taghazout_spot3_type:"Reef break - Derecha",taghazout_spot3_season:"Oct - Abril",taghazout_spot3_desc:"Ola accesible y divertida, perfecta para progresar. Larga derecha sobre arrecife con varias secciones. Muy popular y a menudo concurrido.",taghazout_spot4_name:"La Source",taghazout_spot4_level:"beginner",taghazout_spot4_distance:"1 min",taghazout_spot4_type:"Beach break",taghazout_spot4_season:"Todo el año",taghazout_spot4_desc:"Ideal para principiantes, fondo de arena y olas suaves. Beach break accesible con varios picos. Perfecto para clases de surf.",taghazout_spot5_name:"Boilers",taghazout_spot5_level:"expert",taghazout_spot5_distance:"7 min",taghazout_spot5_type:"Reef break - Izquierda",taghazout_spot5_season:"Oct - Marzo",taghazout_spot5_desc:"Spot de big wave reservado a expertos. Ola potente que rompe sobre un arrecife expuesto. Requiere una gran marejada y condiciones perfectas.",taghazout_spot6_name:"Mysteries",taghazout_spot6_level:"expert",taghazout_spot6_distance:"4 min",taghazout_spot6_type:"Reef break - Derecha",taghazout_spot6_season:"Nov - Abril",taghazout_spot6_desc:"Reef break técnico con secciones huecas. Ola exigente que requiere experiencia. Menos concurrido que los otros spots.",taghazout_spot7_name:"Banana Beach",taghazout_spot7_level:"intermediate",taghazout_spot7_distance:"15 min",taghazout_spot7_type:"Beach break",taghazout_spot7_season:"Todo el año",taghazout_spot7_desc:"Larga playa de arena con varios picos. Olas accesibles para intermedios. Ambiente familiar y el pueblo de Aourir a escasa distancia.",taghazout_spot8_name:"Tamraght",taghazout_spot8_level:"intermediate",taghazout_spot8_distance:"10 min",taghazout_spot8_type:"Beach/Reef break",taghazout_spot8_season:"Oct - Abril",taghazout_spot8_desc:"Pueblo de surfistas auténtico con varios spots. Combinación de beach break y reef break para todos los niveles. Menos turístico que Taghazout.",taghazout_spot9_name:"Tamri",taghazout_spot9_level:"intermediate",taghazout_spot9_distance:"30 min",taghazout_spot9_type:"Beach break",taghazout_spot9_season:"Todo el año",taghazout_spot9_desc:"Larga playa de arena negra con olas constantes. Varios kilómetros de beach break. Perfecto para escapar de la multitud y disfrutar de más espacio.",taghazout_spot10_name:"Imsouane",taghazout_spot10_level:"beginner",taghazout_spot10_distance:"1 h 20",taghazout_spot10_type:"Point break - Derecha",taghazout_spot10_season:"Oct - Abril",taghazout_spot10_desc:"Una de las olas más largas de África (800 m+). Ola suave y accesible, ideal para principiantes o para mejorar. Tranquilo pueblo de pescadores.",taghazout_tips_badge:"Información práctica",taghazout_tips_title:"Consejos para surfear en Taghazout",taghazout_tip1_title:"Mejor temporada",taghazout_tip1_desc:`Oct - Abril Marejada del Noroeste Agua 15-18 °C Neopreno 3/2 mm`,taghazout_tip2_title:"Alquiler de tablas",taghazout_tip2_desc:`Numerosas tiendas en el pueblo 100-150 MAD/día Todos los tipos de tablas Neoprenos disponibles`,taghazout_tip3_title:"Aparcamiento y acceso",taghazout_tip3_desc:`Aparcamiento gratuito frente a la mayoría de los spots Fácil acceso en coche Algunos spots requieren un corto paseo`,taghazout_tip4_title:"Escuelas de surf",taghazout_tip4_desc:`Más de 10 escuelas certificadas Clases colectivas/privadas 250-400 MAD/clase Material incluido`,taghazout_tip5_title:"Previsión de surf",taghazout_tip5_desc:`Windguru Magicseaweed Surfline Previsiones 7 días`,taghazout_tip6_title:"Alquiler de coches",taghazout_tip6_desc:`Imprescindible para acceder a los spots GadiWaze: entrega gratuita Kilometraje ilimitado Reserve en línea`,extras_title:"Opciones y extras",extras_subtitle:"Personalice su alquiler con nuestras opciones adicionales",no_option_selected:"Ninguna opción seleccionada",add_options_hint:"Añada opciones para personalizar su alquiler",reservation_summary:"Resumen de la reserva",selected_options:"Opciones seleccionadas",options_subtotal:"Subtotal opciones",vehicle_label:"Vehículo",continue_to_payment:"Continuar hacia el pago",continue_edit:"Continuar la modificación",online_payment_selected:"Pago en línea seleccionado",options_edit_later_hint:"Podrá modificar sus opciones antes de la confirmación final",admin_mode_edit_allowed:"Modo Admin - Modificación autorizada",reservation_summary_title:"Resumen",total_for_prefix:"Total para",reserve_vehicle:"Reservar este vehículo",edit_booking:"Modificar la reserva",secure_online_payment:"Pago seguro en línea",no_prepayment_required:"Sin prepago requerido",admin_mode_extras:"Modo Admin - Modificación de opciones",ff_extras_step_disabled_redirect_payment:"Etapa Opciones desactivada — redirección hacia pago",extras_category_navigation:"Navegación & GPS",extras_category_safety:"Seguridad & Niños",extras_category_comfort:"Confort & Accesorios",extras_category_insurance:"Seguros & Protección",payment_finalize:"Finalización de la reserva",payment_fill_info:"Complete su información para confirmar su reserva",payment_conditions:"Condiciones y aceptación",payment_summary:"Resumen final",confirm_reservation:"Confirmar la reserva",payment_secure_ssl:"Pago seguro mediante SSL. Sus datos están protegidos.",payment_personal_info:"Información personal",first_name:"Nombre",last_name:"Apellidos",email_label:"Email",phone:"Teléfono",driver_license_number:"Número de carné de conducir",payment_info_title:"Información de pago",cardholder_name:"Nombre en la tarjeta",card_number:"Número de tarjeta",expiry_date:"Fecha de caducidad",expiry_placeholder:"MM/AA",cvv:"CVV",accept_terms:"Acepto las condiciones generales de venta",accept_terms_hint:"Acepta nuestras condiciones de uso y de alquiler.",accept_privacy:"Acepto la política de privacidad",accept_privacy_hint:"Acepta el tratamiento de sus datos personales.",secure_info_footer:"Su información se transmite de forma segura y permanece estrictamente confidencial.",economy_included:"Ahorro incluido",pay_at_agency:"Pago en agencia",pay_online:"Pago en línea",pay_now:"Pagar ahora",pay_later:"Pagar en agencia",seats:"plazas",doors:"puertas",automatic:"Auto",manual:"Manual",automatic_long:"Automático",manual_long:"Manual",per_day_suffix:"/día",included_equipment:"Equipamiento incluido",pay_at_pickup:"Pago en la recogida",technical_specs:"Especificaciones técnicas",terms_and_deductibles:"Condiciones y franquicias",spec_engine:"Motor:",spec_power:"Potencia:",spec_consumption:"Consumo:",spec_emissions:"Emisiones CO2:",spec_acceleration:"0-100 km/h:",spec_max_speed:"Velocidad máx.:",spec_trunk:"Maletero:",included_in_price:"Incluido en el precio:",deductibles:"Franquicias:",terms:"Condiciones:",insurance_options:"Opciones de seguro",insurance_standard_included:"Seguro Estándar (Incluido)",insurance_premium:"Seguro Premium",no_car_selected:"Ningún coche seleccionado",total_options:"Total opciones",total_to_pay_prefix:"Total a",pay_now_lower:"pagar ahora",pay_at_agency_lower:"pagar en agencia",confirm_changes:"Confirmar las modificaciones",confirm_booking:"Confirmar la reserva",card_charged_now:"Su tarjeta será cobrada inmediatamente",no_prepayment_pay_at_pickup:"Sin prepago. Pagará en el momento de la recogida.",error_title:"Error",save_customer_failed:"No se pudieron guardar sus datos de cliente.",save_customer_unexpected:"Se produjo un error inesperado al guardar los datos del cliente.",ff_pay_now_disabled_redirect_agency:"Pago en línea desactivado — redirección hacia pago en agencia",ff_pay_later_disabled_back:"Pago en agencia desactivado — volver al paso anterior",admin_mode_payment:"Modo Admin - Finalización de la reserva",reservation_saved:"Su solicitud de reserva ha sido registrada correctamente",reservation_created_success:"¡Reserva creada con éxito!",confirmed:"Confirmada",reservation_pending_badge:"Pendiente de confirmación",booking_details:"Detalles de su reserva",pickup_location:"Lugar de recogida",rental_dates:"Fechas de alquiler",start_label:"Recogida:",end_label:"Devolución:",duration:"Duración:",main_driver_info:"Información del conductor principal",name_label:"Nombre:",payment_method:"Método de pago",payment_done_online:"Pago en línea efectuado",payment_at_agency:"Pago en agencia",payment_at_pickup_hint:"El pago se realizará en el momento de la recogida del vehículo",selected_extras:"Opciones seleccionadas",important_information:"Información importante",bring_to_pickup:"Qué traer en la recogida",bring_license:"• Carné de conducir en vigor",bring_id:"• Documento de identidad (DNI o pasaporte)",bring_credit_card:"• Tarjeta de crédito a nombre del conductor principal",bring_payment_method:"• Medio de pago para el importe total",cancellation_conditions:"Condiciones de cancelación",cancellation_policy:"Cancelación gratuita hasta 24 h antes de la recogida. Pasado ese plazo, podrán aplicarse cargos según nuestras condiciones generales.",what_happens_next:"Qué ocurrirá a continuación",step_received:"• Hemos recibido su solicitud correctamente.",step_agent_check:"• Un agente verificará la disponibilidad del vehículo.",step_email_or_call:"• Recibirá un email de confirmación o una llamada.",step_show_email:"• Presente este email en el momento de la recogida.",financial_summary:"Resumen financiero",paid:"Pagado",to_pay_at_agency:"A pagar en agencia",download_failed_title:"Descarga imposible",pdf_generate_failed_prefix:"No se pudo generar el PDF",detail_prefix:"Detalle",pdf_generate_generic_error:"Se produjo un error al generar el PDF.",missing_reservation_info:"Información de reserva incompleta",reassurance_cancel_24h:"Cancelación gratuita hasta 24 h",reassurance_no_hidden_fees:"Sin cargos ocultos",reassurance_support_24_7:"Asistencia 24/7",reassurance_secure_agency_payment:"Pago seguro en agencia",email_sent_to:"Se ha enviado un email de confirmación a",keep_document_hint:"Conserve este documento: contiene toda la información necesaria para su recogida.",request_number:"Número de solicitud:",reservation_number:"Número de reserva:",download_confirmation:"Descargar la confirmación",new_reservation:"Nueva reserva",reservation_lookup_title:"Gestionar mis reservas",reservation_number_label:"Número de reserva",email_field_label:"Email",reservation_placeholder:"Ej: CR12345678",email_placeholder:"ejemplo@dominio.com",lookup_loading:"Buscando...",lookup_next:"Siguiente",lookup_missing_fields:"Por favor, introduzca el número de reserva y su email.",lookup_none_found:"No se encontró ninguna reserva.",lookup_error:"Error durante la búsqueda.",myres_loading:"Cargando...",myres_none:"Ninguna reserva",myres_pickup_city:"Ciudad de recogida:",myres_start:"Inicio:",myres_return_location:"Lugar de devolución:",myres_payment:"Pago:",myres_need_lookup:"Acceda a la página «Mis reservas» para encontrar su reserva.",myres_not_found:"Reserva no encontrada.",myres_load_error:"Error de carga",myres_title_pending:"Su solicitud de reserva está pendiente",myres_title_confirmed:"¡Reserva confirmada!",myres_title_cancelled:"Reserva cancelada",myres_title_prefix:"Reserva",myres_request_number:"Número de solicitud",myres_reservation_number:"Número de reserva",myres_badge_pending:"Pendiente de confirmación",myres_badge_confirmed:"Reserva confirmada",myres_badge_cancelled:"Reserva cancelada",myres_status_unknown:"Estado desconocido",myres_expl_pending:"Su solicitud de reserva ha sido recibida correctamente y está siendo validada por nuestro equipo.",myres_expl_confirmed:"Su reserva está confirmada. A continuación encontrará el resumen completo.",myres_expl_cancelled:"Su reserva ha sido cancelada. Si tiene alguna pregunta, no dude en contactarnos.",myres_end:"Fin:",myres_status:"Estado:",myres_total:"Total:",about_badge:"ACERCA DE",about_subtitle:"Alquiler de coches premium en Agadir, por locales",about_who_title:"¿Quiénes somos?",about_who_text:"GadiWaze nació de una constatación sencilla: alquilar un coche en Marruecos no debería ser fuente de estrés. Ubicados en Agadir, ofrecemos un servicio transparente, sin sorpresas desagradables, con vehículos recientes y un equipo reactivo disponible por WhatsApp.",about_val_transparency:"Transparencia total",about_val_transparency_desc:"Precio final garantizado, seguro y fianza explicados antes de la reserva. Sin cargos ocultos.",about_val_local:"Experiencia local",about_val_local_desc:"Ubicados en Agadir, conocemos cada carretera y cada rincón. Nuestros consejos son los de un amigo sobre el terreno.",about_val_simplicity:"Simplicidad",about_val_simplicity_desc:"Reserva en 2 minutos, entrega en el aeropuerto o en su hotel, asistencia WhatsApp 7 días a la semana.",about_cta:"¿Listo para descubrir Agadir?",faq_badge:"FAQ",faq_subtitle:"Todo lo que necesita saber antes de reservar",faq_search:"Buscar una pregunta...",faq_all:"Todas",faq_reservation:"Reserva",faq_paiement:"Pago",faq_assurance:"Seguro",faq_assistance:"Asistencia",faq_no_results:"No se encontraron resultados",faq_cta_title:"¿No ha encontrado su respuesta?",faq_cta_text:"Nuestro equipo está disponible para responder a todas sus preguntas.",conditions_badge:"CONDICIONES",page_conditions:"Condiciones generales de alquiler",conditions_subtitle:"Las reglas del juego, con total transparencia",conditions_updated:"Última actualización",conditions_cta:"¿Preguntas sobre nuestras condiciones?",privacy_badge:"PRIVACIDAD",page_privacy:"Política de privacidad",privacy_subtitle:"Sus datos están protegidos, sin más",privacy_pill_no_sale:"Sin venta de datos",privacy_pill_cookies:"Solo cookies esenciales",privacy_pill_rgpd:"Conforme al RGPD",privacy_dpo_title:"Ejercer sus derechos",privacy_dpo_text:"Para cualquier consulta relativa a sus datos personales, contacte con nuestro delegado de protección de datos.",contact_badge:"CONTACTO",contact_subtitle:"¿Una pregunta? Estamos a su disposición.",contact_hours:"24 h/24, 7 días/7",contact_delivery_title:"Zonas de entrega",contact_cta_question:"Preguntas frecuentes",contact_whatsapp:"Chatear en WhatsApp",cta_book:"Reservar ahora",btn_contact:"Contáctenos",seo_title_default:"GadiWaze - Alquiler de coches premium en Marruecos",seo_description_default:"Reserve su coche al mejor precio en Marruecos. Pago en agencia, reserva instantánea, asistencia 24/7.",og_title_default:"GadiWaze - Alquiler de coches premium",og_description_default:"Coches fiables, servicio premium, precios claros. Reservar nunca ha sido tan sencillo.",destinationExploreBadge:"Para explorar",destinationPlacesCount:"lugares por descubrir",destinationPlacesAllAccessible:"Todos accesibles en coche desde Agadir",destinationTipsBadge:"Información práctica",destinationCtaTitleFallback:"Reserve su coche",destinationCtaLabelFallback:"Reservar un coche",aeroportDestinationsBadge:"Destinos",aeroportDestinationsCount:"destinos desde el aeropuerto",aeroportDestinationsAccessible:"Todos accesibles con su coche GadiWaze",aeroportTipsBadge:"Información del aeropuerto",aeroportTipsTitle:"Todo lo que necesita saber a su llegada",taghazoutSpotsCount:"spots",taghazoutSpotsExploreTitle:"Explorar cada spot",taghazoutSpotsExploreSubtitle:"Deslice para descubrir los mejores spots de surf",pinnedFaqDefaultTitle:"Preguntas frecuentes",pinnedFaqDefaultSubtitle:"Todo lo que debe saber antes de reservar",pinnedFaqSeeAll:"Ver todas las preguntas",marrakechBannerText:"La ciudad ocre le espera — descubra a su ritmo",marrakechTipsTitle:"Consejos para su excursión a Marrakech",essaouiraBannerText:"El Atlántico, el viento, la libertad",essaouiraTipsTitle:"Consejos para su excursión a Essaouira",agadirBannerText:"El sur de Marruecos le espera",agadirTipsTitle:"Consejos para conducir en Agadir",aeroportBannerText:"Aterrice. Conduzca. Explore.",ouarzazateBannerText:"El desierto comienza aquí — váyalo a explorar",ouarzazateTipsTitle:"Consejos para su excursión a Ouarzazate",tafraoutBannerText:"El Anti-Atlas, salvaje y auténtico",tafraoutTipsTitle:"Consejos para su excursión a Tafraout",dakhlaBannerText:"1100 km de Atlántico, una aventura única",dakhlaTipsTitle:"Consejos para su road trip hacia Dakhla",mirleftBannerText:"El Atlántico salvaje, solo para usted",mirleftTipsTitle:"Consejos para su excursión a Mirleft",tiznitBannerText:"La plata bereber, la autenticidad del Sur",tiznitTipsTitle:"Consejos para su excursión a Tiznit",taghazoutBannerText:"Su aventura de surf empieza aquí",breadcrumbMarrakech:"Marrakech desde Agadir",breadcrumbEssaouira:"Essaouira desde Agadir",breadcrumbAgadir:"Alquiler de coches Agadir",breadcrumbAeroport:"Alquiler de coches Aeropuerto Agadir",breadcrumbTaghazout:"Spots de surf Taghazout",breadcrumbOuarzazate:"Ouarzazate desde Agadir",breadcrumbTafraout:"Tafraout desde Agadir",breadcrumbDakhla:"Dakhla desde Agadir",breadcrumbMirleft:"Mirleft desde Agadir",breadcrumbTiznit:"Tiznit desde Agadir"}};function $(e,t){var n;return((n=Ic[t])==null?void 0:n[e])??Ic.fr[e]}function md(e,t){let n;try{n=e()}catch{return}return{getItem:a=>{var o;const i=l=>l===null?null:JSON.parse(l,void 0),c=(o=n.getItem(a))!=null?o:null;return c instanceof Promise?c.then(i):i(c)},setItem:(a,o)=>n.setItem(a,JSON.stringify(o,void 0)),removeItem:a=>n.removeItem(a)}}const As=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return As(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return As(r)(n)}}}},Ay=(e,t)=>(n,r,a)=>{let o={storage:md(()=>localStorage),partialize:h=>h,version:0,merge:(h,v)=>({...v,...h}),...t},i=!1;const c=new Set,l=new Set;let u=o.storage;if(!u)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...h)},r,a);const p=()=>{const h=o.partialize({...r()});return u.setItem(o.name,{state:h,version:o.version})},m=a.setState;a.setState=(h,v)=>(m(h,v),p());const g=e((...h)=>(n(...h),p()),r,a);a.getInitialState=()=>g;let f;const _=()=>{var h,v;if(!u)return;i=!1,c.forEach(y=>{var b;return y((b=r())!=null?b:g)});const x=((v=o.onRehydrateStorage)==null?void 0:v.call(o,(h=r())!=null?h:g))||void 0;return As(u.getItem.bind(u))(o.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==o.version){if(o.migrate){const b=o.migrate(y.state,y.version);return b instanceof Promise?b.then(w=>[!0,w]):[!0,b]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var b;const[w,C]=y;if(f=o.merge(C,(b=r())!=null?b:g),n(f,!0),w)return p()}).then(()=>{x==null||x(f,void 0),f=r(),i=!0,l.forEach(y=>y(f))}).catch(y=>{x==null||x(void 0,y)})};return a.persist={setOptions:h=>{o={...o,...h},h.storage&&(u=h.storage)},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>_(),hasHydrated:()=>i,onHydrate:h=>(c.add(h),()=>{c.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},o.skipHydration||_(),f||g},jy=Ay,hd="EUR",Ny={EUR:1,MAD:10.8,USD:1.1};function My(e){return e==="EUR"||e==="MAD"||e==="USD"}function Oc(e){return My(e)?e:hd}function Ry(e,t){const n=typeof e=="number"&&Number.isFinite(e)?e:0,r=Ny[t]??1;return Math.round(n*r)}function Dy(e,t){const n=typeof e=="number"&&Number.isFinite(e)?e:0,r=Math.round(n);switch(t){case"USD":return`$${r}`;case"MAD":return`${r} MAD`;case"EUR":return`${r}€`}}function VS(e,t){return Dy(Ry(e,t),t)}const Iy="currency",Oy={getItem:()=>null,setItem:()=>{},removeItem:()=>{},clear:()=>{},key:()=>null,length:0},zy=cd()(jy(e=>({currency:hd,setCurrency:t=>e({currency:Oc(t)})}),{name:Iy,version:1,storage:md(()=>typeof window>"u"?Oy:window.localStorage),partialize:e=>({currency:e.currency}),merge:(e,t)=>{const n=e;return{...t,currency:Oc(n==null?void 0:n.currency)}}}));function Ly({open:e,onClose:t,lang:n,isHome:r,onBookClick:a}){const o=xe(),i=Je(),c=p=>ke(p,n);d.useEffect(()=>{t()},[o.pathname]),d.useEffect(()=>{if(e){const p=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=p}}},[e]),d.useEffect(()=>{if(!e)return;const p=m=>{m.key==="Escape"&&t()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[e,t]);const l=p=>{if(t(),r){const m=document.getElementById(p);if(m){m.scrollIntoView({behavior:"smooth",block:"start"});return}}i(`${c("/")}#${p}`),setTimeout(()=>{const m=document.getElementById(p);m&&m.scrollIntoView({behavior:"smooth",block:"start"})},350)},u=[{label:$("nav_vehicles",n),to:c("/voitures"),icon:cr},{label:$("nav_destinations",n),onClick:()=>l("destinations"),icon:Qr},{label:$("nav_blog",n),to:c("/blog"),icon:bm},{label:$("nav_faq",n),to:c("/faq"),icon:xm},{label:$("nav_about",n),to:c("/a-propos"),icon:wm},{label:$("nav_contact",n),to:c("/contact"),icon:Tl}];return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:["fixed inset-0 z-[80] bg-black/50 transition-opacity duration-300 md:hidden",e?"opacity-100":"opacity-0 pointer-events-none"].join(" "),onClick:t,"aria-hidden":"true"}),s.jsxs("aside",{role:"dialog","aria-modal":"true","aria-label":$("nav_open_menu",n),className:["fixed top-0 right-0 z-[90] h-full w-[85%] max-w-sm bg-white shadow-2xl transition-transform duration-300 ease-out md:hidden","flex flex-col",e?"translate-x-0":"translate-x-full"].join(" "),children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-4 border-b border-slate-100",children:[s.jsx("span",{className:"text-base font-bold text-slate-900",children:"Menu"}),s.jsx("button",{type:"button",onClick:t,"aria-label":$("nav_close_menu",n),className:"rounded-lg p-2 hover:bg-slate-100 text-slate-700",children:s.jsx(Ya,{className:"w-5 h-5"})})]}),s.jsx("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:s.jsx("ul",{className:"flex flex-col gap-1",children:u.map(p=>{const m=p.icon,g=s.jsxs("span",{className:"flex items-center gap-3 px-4 py-3 rounded-xl text-slate-800 hover:bg-slate-100 font-medium text-base",children:[s.jsx(m,{className:"w-5 h-5 text-slate-500"}),p.label]});return s.jsx("li",{children:p.onClick?s.jsx("button",{type:"button",onClick:p.onClick,className:"w-full text-left",children:g}):s.jsx(Qe,{to:p.to,onClick:t,children:g})},p.label)})})}),s.jsxs("div",{className:"px-4 py-4 border-t border-slate-100 space-y-2",children:[s.jsxs(Te,{className:"w-full btn-primary-gradient",onClick:()=>{t(),a()},children:[s.jsx(Cm,{className:"w-4 h-4 mr-2"}),$("nav_book_now",n)]}),s.jsx(Qe,{to:c("/mes-reservations"),onClick:t,className:"block",children:s.jsx(Te,{variant:"outline",className:"w-full",children:$("manage_my_reservations",n)})})]})]})]})}function Fy(){const e=xe(),t=Je(),n=dt(e.pathname),r=pr(e.pathname),a=r==="/recherche",o=r==="/"||r==="",{isAdmin:i}=ra(),{currency:c,setCurrency:l}=zy(),{isEnabled:u}=fd(),{data:p}=xr({defer:r==="/"}),m=b=>H(b,n),g=b=>ke(b,n),f=n,[_,h]=d.useState(!1),v=b=>{if(o){const w=document.getElementById(b);if(w){w.scrollIntoView({behavior:"smooth",block:"start"});return}}t(`${g("/")}#${b}`),setTimeout(()=>{const w=document.getElementById(b);w&&w.scrollIntoView({behavior:"smooth",block:"start"})},350)},x=[{label:$("nav_vehicles",f),to:g("/voitures")},{label:$("nav_destinations",f),onClick:()=>v("destinations")},{label:$("nav_blog",f),to:g("/blog")},{label:$("nav_faq",f),to:g("/faq")},{label:$("nav_about",f),to:g("/a-propos")},{label:$("nav_contact",f),to:g("/contact")}],y=()=>{if(o){const b=document.getElementById("wizard");if(b){b.scrollIntoView({behavior:"smooth",block:"start"});return}}t(g("/recherche"))};return s.jsxs("header",{className:"fixed top-0 left-0 w-full z-50 bg-white border-b border-slate-100 transition-all duration-300",children:[s.jsx("div",{className:"container mx-auto px-4 py-3",children:s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center space-x-2 min-w-0",children:[s.jsx(Qe,{to:g("/"),children:p!=null&&p.logo_url?s.jsx("img",{src:p.logo_url,alt:"Logo",className:"h-10 max-h-12 w-auto"}):s.jsx("div",{className:"w-10 h-10 bg-gradient-primary/90 rounded-lg flex items-center justify-center",children:s.jsx(cr,{className:"w-6 h-6 text-white"})})}),s.jsxs("div",{className:"min-w-0 block",children:[s.jsx("h1",{className:"text-xl font-bold tracking-tight text-blue-600 truncate",children:m(p==null?void 0:p.site_name)||"GadiWaze"}),s.jsx("p",{className:"text-xs text-slate-600 truncate",children:m(p==null?void 0:p.site_tagline)||"Premium Location"})]})]}),s.jsx("nav",{"aria-label":"Navigation principale",className:"hidden lg:flex items-center gap-1 xl:gap-2",children:x.map(b=>{const w="px-3 py-2 text-sm font-medium text-slate-700 hover:text-blue-600 hover:bg-slate-50 rounded-md transition-colors";if(b.onClick)return s.jsx("button",{type:"button",onClick:b.onClick,className:w,children:b.label},b.label);const C=b.to?r===pr(b.to):!1;return s.jsx(Qe,{to:b.to,className:w,"aria-current":C?"page":void 0,children:b.label},b.label)})}),s.jsxs("div",{className:"flex items-center space-x-3",children:[!i&&a&&s.jsxs(s.Fragment,{children:[s.jsx("div",{role:"group","aria-label":"Currency",className:"hidden sm:flex items-center rounded-lg border border-slate-200 bg-white overflow-hidden",children:["EUR","MAD","USD"].map(b=>{const w=c===b;return s.jsx("button",{type:"button",onClick:()=>l(b),"aria-pressed":w,className:["px-3 py-1.5 text-xs font-semibold transition-colors",w?"bg-blue-600 text-white":"text-slate-700 hover:bg-slate-50"].join(" "),children:b},b)})}),s.jsx("div",{role:"group","aria-label":"Currency",className:"sm:hidden flex items-center rounded-lg border border-slate-200 bg-white overflow-hidden",children:["EUR","MAD","USD"].map(b=>{const w=c===b;return s.jsx("button",{type:"button",onClick:()=>l(b),"aria-pressed":w,className:["px-2 py-1 text-[11px] font-semibold transition-colors",w?"bg-blue-600 text-white":"text-slate-700 hover:bg-slate-50"].join(" "),children:b},b)})})]}),s.jsx(Te,{type:"button",size:"sm",className:"hidden lg:inline-flex btn-primary-gradient",onClick:y,children:$("nav_book_now",f)}),u("display_header_cta")!==!1&&s.jsxs(s.Fragment,{children:[s.jsx(Qe,{to:g("/mes-reservations"),className:"sm:hidden",children:s.jsx(Te,{variant:"outline",size:"icon","aria-label":$("my_reservations",f),children:s.jsx(cr,{className:"w-4 h-4"})})}),s.jsx(Qe,{to:g("/mes-reservations"),className:"hidden sm:block lg:hidden",children:s.jsx(Te,{className:"btn-primary-gradient",size:"sm",children:$("manage_my_reservations",f)})}),s.jsx(Qe,{to:g("/mes-reservations"),className:"hidden lg:block",children:s.jsx(Te,{variant:"outline",size:"sm",children:$("my_reservations",f)})})]}),s.jsx("button",{type:"button",onClick:()=>h(!0),"aria-label":$("nav_open_menu",f),"aria-expanded":_,"aria-controls":"mobile-menu-drawer",className:"lg:hidden inline-flex items-center justify-center w-10 h-10 rounded-lg border border-slate-200 bg-white text-slate-700 hover:bg-slate-50",children:s.jsx(Gs,{className:"w-5 h-5"})})]})]})}),s.jsx(Ly,{open:_,onClose:()=>h(!1),lang:f,isHome:o,onBookClick:y})]})}function Wy({className:e}){return s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:s.jsx("path",{d:"M24 12.073C24 5.405 18.627 0 12 0S0 5.405 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047V9.41c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.97h-1.513c-1.491 0-1.956.928-1.956 1.88v2.25h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z"})})}function qy({className:e}){return s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:s.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-2.88 2.5 2.89 2.89 0 0 1-2.89-2.89 2.89 2.89 0 0 1 2.89-2.89c.28 0 .54.04.79.1V9.01a6.33 6.33 0 0 0-.79-.05 6.34 6.34 0 0 0-6.34 6.34 6.34 6.34 0 0 0 6.34 6.34 6.34 6.34 0 0 0 6.33-6.34V8.69a8.14 8.14 0 0 0 4.77 1.52V6.76a4.85 4.85 0 0 1-1-.07z"})})}function By({className:e}){return s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:s.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 0 1 .083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.632-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12S18.627 0 12 0z"})})}function $y({className:e}){return s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:s.jsx("path",{d:"M12.206.793c.99 0 4.347.276 5.93 3.821.529 1.193.403 3.219.299 4.847l-.003.06c-.012.18-.022.345-.03.51.07.07.194.094.297.063.141-.047.255-.141.375-.244.216-.184.501-.234.73-.148.224.085.375.324.366.567-.013.428-.485.91-1.051 1.115-.147.059-.295.073-.436.073a1.008 1.008 0 0 1-.215-.024c.063.276.116.558.141.836.058.574.015 1.09-.116 1.512-.45 1.467-1.986 2.397-3.38 2.946.278.234.59.421.925.56.67.287 1.406.43 2.173.43.757 0 1.49-.143 2.173-.43.355-.153.673-.341.955-.578.09-.091.205-.13.318-.13.207 0 .415.123.507.327.051.117.055.237.015.352-.026.073-.068.137-.122.196-.196.217-.56.486-1.086.73-.337.163-.71.305-1.118.42-.137.037-.252.094-.349.178-.165.138-.257.343-.298.578-.04.228-.104.414-.192.557-.123.2-.349.325-.588.325-.126 0-.273-.029-.449-.097-.218-.084-.468-.126-.726-.126-.329 0-.63.079-.898.234-.545.32-1.019.48-1.413.48-.394 0-.868-.16-1.413-.48a1.824 1.824 0 0 0-.897-.234c-.259 0-.509.042-.727.126-.176.068-.323.097-.449.097-.239 0-.465-.125-.588-.325-.088-.143-.152-.329-.192-.557-.041-.235-.133-.44-.298-.578a1.028 1.028 0 0 0-.349-.178 6.45 6.45 0 0 1-1.118-.42c-.526-.244-.89-.513-1.086-.73a.623.623 0 0 1-.122-.196.481.481 0 0 1 .015-.352c.092-.204.3-.327.507-.327.113 0 .228.039.318.13.282.237.6.425.955.578.683.287 1.416.43 2.173.43.767 0 1.503-.143 2.173-.43.335-.139.647-.326.925-.56-1.394-.549-2.93-1.479-3.38-2.946-.131-.422-.174-.938-.116-1.512.025-.278.078-.56.141-.836a1.008 1.008 0 0 1-.215.024c-.141 0-.289-.014-.436-.073-.566-.205-1.038-.687-1.051-1.115-.009-.243.142-.482.366-.567.229-.086.514-.036.73.148.12.103.234.197.375.244.103.031.227.007.297-.063-.008-.165-.018-.33-.03-.51l-.003-.06c-.104-1.628-.23-3.654.299-4.847C7.859 1.069 11.216.793 12.206.793z"})})}function Vy({className:e}){return s.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:s.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm0 4.5c4.142 0 7.5 3.358 7.5 7.5S16.142 19.5 12 19.5 4.5 16.142 4.5 12 7.858 4.5 12 4.5zm-4 7.5a4 4 0 1 0 8 0 4 4 0 0 0-8 0zm4-2a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"})})}const Uy={facebook:{label:"Facebook",Icon:Wy},instagram:{label:"Instagram",Icon:km},whatsapp:{label:"WhatsApp",Icon:Xr},tiktok:{label:"TikTok",Icon:qy},linkedin:{label:"LinkedIn",Icon:Tm},x:{label:"X (Twitter)",Icon:Sm},youtube:{label:"YouTube",Icon:Pm},telegram:{label:"Telegram",Icon:Em},pinterest:{label:"Pinterest",Icon:By},snapchat:{label:"Snapchat",Icon:$y},tripadvisor:{label:"TripAdvisor",Icon:Vy},google_business:{label:"Google Business",Icon:Qr}},US={facebook:{placeholder:"https://facebook.com/votrepage"},instagram:{placeholder:"https://instagram.com/votrecompte"},whatsapp:{placeholder:"https://wa.me/212600000000"},tiktok:{placeholder:"https://tiktok.com/@votrecompte"},linkedin:{placeholder:"https://linkedin.com/company/..."},x:{placeholder:"https://x.com/votrecompte"},youtube:{placeholder:"https://youtube.com/@votrecompte"},telegram:{placeholder:"https://t.me/votregroupe"},pinterest:{placeholder:"https://pinterest.com/votrecompte"},snapchat:{placeholder:"https://snapchat.com/add/votrecompte"},tripadvisor:{placeholder:"https://tripadvisor.com/..."},google_business:{placeholder:"https://g.page/votreentreprise"}};function Hy(){var M;const[e,t]=d.useState(null),[n,r]=d.useState(!0);if(d.useEffect(()=>{(async()=>{try{const{data:R}=await Ae.from("site_settings").select("site_name, site_tagline, footer_config, footer_seo_text, footer_trust_phrase, social_facebook, social_instagram, social_whatsapp, social_facebook_enabled, social_facebook_icon, social_facebook_url, social_instagram_enabled, social_instagram_icon, social_instagram_url, social_whatsapp_enabled, social_whatsapp_icon, social_whatsapp_url, social_links, contact_email, contact_phone, contact_address, logo_url, flags").single();R&&t(R)}finally{r(!1)}})()},[]),n||((M=e==null?void 0:e.flags)==null?void 0:M.show_footer)===!1)return null;const a=new Date().getFullYear(),o=xe(),i=dt(o.pathname),c=R=>ke(R,i),l=i,u=(e==null?void 0:e.footer_config)||null,p=(()=>{const R=(e==null?void 0:e.footer_seo_text)??(u==null?void 0:u.seo_text),N=H(R,i);return N?String(N).replace(/\s+/g," ").trim():""})(),m=(u==null?void 0:u.email)||(e==null?void 0:e.contact_email)||"",g=(u==null?void 0:u.phone)||(e==null?void 0:e.contact_phone)||"",f=(u==null?void 0:u.address)||(e==null?void 0:e.contact_address)||"",_=H(u==null?void 0:u.title_links,i)||$("footer_links_title",l),h=H(u==null?void 0:u.title_contact,i)||$("footer_contact_title",l),v=H(u==null?void 0:u.title_social,i)||$("footer_follow_title",l),x=[{label:$("footer_link_vehicles",l),href:"/voitures"},{label:$("footer_link_about",l),href:"/a-propos"},{label:$("footer_link_faq",l),href:"/faq"},{label:"Blog",href:"/blog"},{label:$("footer_link_terms",l),href:"/conditions"},{label:$("footer_link_privacy",l),href:"/confidentialite"},{label:$("footer_link_contact",l),href:"/contact"}],y=Array.isArray(u==null?void 0:u.links)&&u.links.length>0,b=y?u.links:x,w=!!(H(f,i)||H(m,i)||H(g,i)),C=new Set(["/conditions","/confidentialite","/terms","/privacy","/mentions-legales","/legal"]),S=b.filter(R=>C.has(R.href)),P=(()=>{const R=b.filter(N=>!(C.has(N.href)||w&&N.href==="/contact"));return R.some(N=>N.href==="/blog")||R.push({label:"Blog",href:"/blog"}),R})(),T=(()=>{const R=Array.isArray(e==null?void 0:e.social_links)?e.social_links:[];if(R.length>0)return R.filter(L=>L.enabled&&L.url).sort((L,O)=>(L.order??0)-(O.order??0)).map(L=>({platform:L.platform,url:L.url,icon:L.icon||L.platform}));const N=[e!=null&&e.social_facebook_enabled&&(e!=null&&e.social_facebook_url||e!=null&&e.social_facebook)?{platform:"facebook",url:e.social_facebook_url||e.social_facebook,icon:e.social_facebook_icon||"facebook"}:null,e!=null&&e.social_instagram_enabled&&(e!=null&&e.social_instagram_url||e!=null&&e.social_instagram)?{platform:"instagram",url:e.social_instagram_url||e.social_instagram,icon:e.social_instagram_icon||"instagram"}:null,e!=null&&e.social_whatsapp_enabled&&(e!=null&&e.social_whatsapp_url||e!=null&&e.social_whatsapp)?{platform:"whatsapp",url:e.social_whatsapp_url||e.social_whatsapp,icon:e.social_whatsapp_icon||"whatsapp"}:null].filter(Boolean);return N.length>0?N:(u==null?void 0:u.social)||[e!=null&&e.social_facebook?{platform:"facebook",url:e.social_facebook,icon:"facebook"}:null,e!=null&&e.social_instagram?{platform:"instagram",url:e.social_instagram,icon:"instagram"}:null,e!=null&&e.social_whatsapp?{platform:"whatsapp",url:e.social_whatsapp,icon:"whatsapp"}:null].filter(Boolean)})(),E=(()=>{const R=H(e==null?void 0:e.site_tagline,i)||"";return String(R).replace(/\s+/g," ").trim()})();return s.jsxs("footer",{className:"mt-12 border-t border-white/10 bg-slate-900",children:[s.jsxs("div",{className:"container mx-auto px-4 py-12 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-10",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs(Qe,{to:c("/"),className:"flex items-center gap-3",children:[(e==null?void 0:e.logo_url)&&s.jsx("img",{src:e.logo_url,alt:H(e==null?void 0:e.site_name,i)||"Logo",className:"h-10 w-auto shrink-0",onError:R=>{R.target.style.display="none"}}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h2",{className:"text-base font-semibold leading-tight text-white",children:H(e==null?void 0:e.site_name,i)||"GadiWaze"}),s.jsx("p",{className:"text-sm leading-tight text-white/60",children:H(e==null?void 0:e.site_tagline,i)||"Premium Location"})]})]}),E&&s.jsx("p",{className:"text-sm text-white/70 leading-relaxed",children:E})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-3 text-white",children:_}),s.jsx("ul",{className:"space-y-2 text-sm text-white/70",children:P.map(R=>s.jsx("li",{children:s.jsx(Qe,{to:c(R.href),className:"transition-colors hover:text-primary",children:y?H(R.label,i):R.label})},R.href))})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-3 text-white",children:h}),s.jsxs("ul",{className:"space-y-2 text-sm text-white/70",children:[H(f,i)&&s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Qr,{className:"mt-0.5 h-4 w-4 text-white/50 shrink-0","aria-hidden":"true"}),s.jsx("span",{className:"text-white/70",children:H(f,i)})]}),H(m,i)&&s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Tl,{className:"mt-0.5 h-4 w-4 text-white/50 shrink-0","aria-hidden":"true"}),s.jsx("a",{href:`mailto:${H(m,i)}`,"aria-label":`${$("label_email",l)} ${H(m,i)}`,className:"transition-colors hover:text-primary",children:H(m,i)})]}),H(g,i)&&s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Am,{className:"mt-0.5 h-4 w-4 text-white/50 shrink-0","aria-hidden":"true"}),s.jsx("a",{href:`tel:${H(g,i)}`,"aria-label":`${$("label_phone",l)} ${H(g,i)}`,className:"transition-colors hover:text-primary",children:H(g,i)})]})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-3 text-white",children:v}),s.jsx("div",{className:"flex items-center gap-4 text-sm",children:T.map(R=>{const N=R.platform,L=Uy[N],O=L==null?void 0:L.Icon;return s.jsxs("a",{href:R.url,target:"_blank",rel:"noreferrer",className:"text-white/80 transition-colors hover:text-primary",children:[O?s.jsx(O,{className:"w-5 h-5"}):s.jsx("span",{children:R.icon??"🔗"}),s.jsx("span",{className:"sr-only",children:(L==null?void 0:L.label)||N})]},N)})})]})]}),s.jsxs("div",{className:"border-t border-white/10",children:[H(e==null?void 0:e.footer_trust_phrase,i)&&s.jsxs("div",{className:"container mx-auto px-4 pt-6 pb-2 text-center text-sm italic text-white/60",children:["“",H(e==null?void 0:e.footer_trust_phrase,i),"”"]}),p&&s.jsx("div",{className:"container mx-auto px-4 pt-5 pb-1",children:s.jsx("p",{className:"text-[11px] leading-relaxed text-white/40 max-w-5xl mx-auto text-center",children:p})}),s.jsxs("div",{className:"container mx-auto px-4 py-6 text-xs text-white/60 flex flex-col sm:flex-row gap-3 sm:gap-0 items-start sm:items-center justify-between",children:[s.jsxs("div",{children:["© ",a," ",H(e==null?void 0:e.site_name,i)||"CarRental",$("footer_rights_reserved",l)]}),S.length>0&&s.jsx("div",{className:"flex flex-wrap gap-x-6 gap-y-2",children:S.map(R=>s.jsx(Qe,{to:c(R.href),className:"transition-colors hover:text-white",children:y?H(R.label,i):R.label},R.href))})]})]})]})}const bi=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:U("rounded-xl border bg-card text-card-foreground shadow-md",e),...t}));bi.displayName="Card";const Gy=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:U("flex flex-col space-y-1.5 p-6",e),...t}));Gy.displayName="CardHeader";const Yy=d.forwardRef(({className:e,...t},n)=>s.jsx("h3",{ref:n,className:U("text-2xl font-semibold leading-none tracking-tight",e),...t}));Yy.displayName="CardTitle";const Ky=d.forwardRef(({className:e,...t},n)=>s.jsx("p",{ref:n,className:U("text-sm text-muted-foreground",e),...t}));Ky.displayName="CardDescription";const gd=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:U("p-6 pt-0",e),...t}));gd.displayName="CardContent";const Qy=d.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:U("flex items-center p-6 pt-0",e),...t}));Qy.displayName="CardFooter";const Xy=({children:e})=>s.jsx(jm,{features:Nm,children:e}),HS=({children:e,className:t,stagger:n=.06})=>s.jsx(Ia.div,{className:t,initial:"hidden",animate:"visible",viewport:{once:!0,amount:.2},variants:{hidden:{},visible:{transition:{staggerChildren:n}}},children:I.Children.map(e,r=>s.jsx(Ia.div,{variants:{hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},transition:{duration:.25,ease:"easeOut"},children:r}))}),GS=({className:e,children:t,bare:n,...r})=>s.jsx("div",{className:e,children:s.jsx(Ia.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.25,ease:"easeOut"},whileHover:{scale:1.01},whileTap:{scale:.98},children:n?s.jsx("div",{children:t}):s.jsx(bi,{...r,children:t})})}),Eo=({children:e})=>s.jsx(Ia.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.2,ease:"easeOut"},children:e});var Jy=typeof Element<"u",Zy=typeof Map=="function",eb=typeof Set=="function",tb=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Aa(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,a;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Aa(e[r],t[r]))return!1;return!0}var o;if(Zy&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!Aa(r.value[1],t.get(r.value[0])))return!1;return!0}if(eb&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(tb&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[r]))return!1;if(Jy&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((a[r]==="_owner"||a[r]==="__v"||a[r]==="__o")&&e.$$typeof)&&!Aa(e[a[r]],t[a[r]]))return!1;return!0}return e!==e&&t!==t}var nb=function(t,n){try{return Aa(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const rb=Qa(nb);var ab=function(e,t,n,r,a,o,i,c){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,c],p=0;l=new Error(t.replace(/%s/g,function(){return u[p++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},ob=ab;const zc=Qa(ob);var sb=function(t,n,r,a){var o=r?r.call(a,t,n):void 0;if(o!==void 0)return!!o;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var i=Object.keys(t),c=Object.keys(n);if(i.length!==c.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),u=0;u(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(vd||{}),Ao={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Lc=Object.values(vd),xi={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},cb=Object.entries(xi).reduce((e,[t,n])=>(e[n]=t,e),{}),st="data-rh",Hn={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Gn=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},lb=e=>{let t=Gn(e,"title");const n=Gn(e,Hn.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Gn(e,Hn.DEFAULT_TITLE);return t||r||void 0},ub=e=>Gn(e,Hn.ON_CHANGE_CLIENT_STATE)||(()=>{}),jo=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),db=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const a=Object.keys(r);for(let o=0;oconsole&&typeof console.warn=="function"&&console.warn(e),Er=(e,t,n)=>{const r={};return n.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&fb(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,o)=>{const i={};o.filter(l=>{let u;const p=Object.keys(l);for(let g=0;ga.push(l));const c=Object.keys(i);for(let l=0;l{if(Array.isArray(e)&&e.length){for(let n=0;n({baseTag:db(["href"],e),bodyAttributes:jo("bodyAttributes",e),defer:Gn(e,Hn.DEFER),encode:Gn(e,Hn.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:jo("htmlAttributes",e),linkTags:Er("link",["rel","href"],e),metaTags:Er("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Er("noscript",["innerHTML"],e),onChangeClientState:ub(e),scriptTags:Er("script",["src","innerHTML"],e),styleTags:Er("style",["cssText"],e),title:lb(e),titleAttributes:jo("titleAttributes",e),prioritizeSeoTags:pb(e,Hn.PRIORITIZE_SEO_TAGS)}),_d=e=>Array.isArray(e)?e.join(""):e,hb=(e,t)=>{const n=Object.keys(e);for(let r=0;rArray.isArray(e)?e.reduce((n,r)=>(hb(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},Fc=(e,t)=>({...e,[t]:void 0}),gb=["noscript","script","style"],js=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),yd=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),vb=(e,t,n,r)=>{const a=yd(n),o=_d(t);return a?`<${e} ${st}="true" ${a}>${js(o,r)}`:`<${e} ${st}="true">${js(o,r)}`},_b=(e,t,n=!0)=>t.reduce((r,a)=>{const o=a,i=Object.keys(o).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,p)=>{const m=typeof o[p]>"u"?p:`${p}="${js(o[p],n)}"`;return u?`${u} ${m}`:m},""),c=o.innerHTML||o.cssText||"",l=gb.indexOf(e)===-1;return`${r}<${e} ${st}="true" ${i}${l?"/>":`>${c}`}`},""),bd=(e,t={})=>Object.keys(e).reduce((n,r)=>{const a=xi[r];return n[a||r]=e[r],n},t),yb=(e,t,n)=>{const r={key:t,[st]:!0},a=bd(n,r);return[I.createElement("title",a,t)]},ja=(e,t)=>t.map((n,r)=>{const a={key:r,[st]:!0};return Object.keys(n).forEach(o=>{const c=xi[o]||o;if(c==="innerHTML"||c==="cssText"){const l=n.innerHTML||n.cssText;a.dangerouslySetInnerHTML={__html:l}}else a[c]=n[o]}),I.createElement(e,a)}),Ge=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>yb(e,t.title,t.titleAttributes),toString:()=>vb(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>bd(t),toString:()=>yd(t)};default:return{toComponent:()=>ja(e,t),toString:()=>_b(e,t,n)}}},bb=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const a=No(e,Ao.meta),o=No(t,Ao.link),i=No(n,Ao.script);return{priorityMethods:{toComponent:()=>[...ja("meta",a.priority),...ja("link",o.priority),...ja("script",i.priority)],toString:()=>`${Ge("meta",a.priority,r)} ${Ge("link",o.priority,r)} ${Ge("script",i.priority,r)}`},metaTags:a.default,linkTags:o.default,scriptTags:i.default}},xb=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:a,noscriptTags:o,styleTags:i,title:c="",titleAttributes:l,prioritizeSeoTags:u}=e;let{linkTags:p,metaTags:m,scriptTags:g}=e,f={toComponent:()=>{},toString:()=>""};return u&&({priorityMethods:f,linkTags:p,metaTags:m,scriptTags:g}=bb(e)),{priority:f,base:Ge("base",t,r),bodyAttributes:Ge("bodyAttributes",n,r),htmlAttributes:Ge("htmlAttributes",a,r),link:Ge("link",p,r),meta:Ge("meta",m,r),noscript:Ge("noscript",o,r),script:Ge("script",g,r),style:Ge("style",i,r),title:Ge("title",{title:c,titleAttributes:l},r)}},Ns=xb,_a=[],xd=!!(typeof window<"u"&&window.document&&window.document.createElement),Ms=class{constructor(e,t){Tt(this,"instances",[]);Tt(this,"canUseDOM",xd);Tt(this,"context");Tt(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?_a:this.instances,add:e=>{(this.canUseDOM?_a:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?_a:this.instances).indexOf(e);(this.canUseDOM?_a:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Ns({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},wb={},wd=I.createContext(wb),xn,Cd=(xn=class extends d.Component{constructor(n){super(n);Tt(this,"helmetData");this.helmetData=new Ms(this.props.context||{},xn.canUseDOM)}render(){return I.createElement(wd.Provider,{value:this.helmetData.value},this.props.children)}},Tt(xn,"canUseDOM",xd),xn),On=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${st}]`),a=[].slice.call(r),o=[];let i;return t&&t.length&&t.forEach(c=>{const l=document.createElement(e);for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u))if(u==="innerHTML")l.innerHTML=c.innerHTML;else if(u==="cssText")l.styleSheet?l.styleSheet.cssText=c.cssText:l.appendChild(document.createTextNode(c.cssText));else{const p=u,m=typeof c[p]>"u"?"":c[p];l.setAttribute(u,m)}l.setAttribute(st,"true"),a.some((u,p)=>(i=p,l.isEqualNode(u)))?a.splice(i,1):o.push(l)}),a.forEach(c=>{var l;return(l=c.parentNode)==null?void 0:l.removeChild(c)}),o.forEach(c=>n.appendChild(c)),{oldTags:a,newTags:o}},Rs=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(st),a=r?r.split(","):[],o=[...a],i=Object.keys(t);for(const c of i){const l=t[c]||"";n.getAttribute(c)!==l&&n.setAttribute(c,l),a.indexOf(c)===-1&&a.push(c);const u=o.indexOf(c);u!==-1&&o.splice(u,1)}for(let c=o.length-1;c>=0;c-=1)n.removeAttribute(o[c]);a.length===o.length?n.removeAttribute(st):n.getAttribute(st)!==i.join(",")&&n.setAttribute(st,i.join(","))},Cb=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=_d(e)),Rs("title",t)},Wc=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:a,linkTags:o,metaTags:i,noscriptTags:c,onChangeClientState:l,scriptTags:u,styleTags:p,title:m,titleAttributes:g}=e;Rs("body",r),Rs("html",a),Cb(m,g);const f={baseTag:On("base",n),linkTags:On("link",o),metaTags:On("meta",i),noscriptTags:On("noscript",c),scriptTags:On("script",u),styleTags:On("style",p)},_={},h={};Object.keys(f).forEach(v=>{const{newTags:x,oldTags:y}=f[v];x.length&&(_[v]=x),y.length&&(h[v]=f[v].oldTags)}),t&&t(),l(e,_,h)},Ar=null,kb=e=>{Ar&&cancelAnimationFrame(Ar),e.defer?Ar=requestAnimationFrame(()=>{Wc(e,()=>{Ar=null})}):(Wc(e),Ar=null)},Tb=kb,qc=class extends d.Component{constructor(){super(...arguments);Tt(this,"rendered",!1)}shouldComponentUpdate(t){return!ib(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const a=mb(t.get().map(o=>{const i={...o.props};return delete i.context,i}));Cd.canUseDOM?Tb(a):Ns&&(r=Ns(a)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},es,kd=(es=class extends d.Component{shouldComponentUpdate(e){return!rb(Fc(this.props,"helmetData"),Fc(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}warnOnInvalidChildren(e,t){return zc(Lc.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Lc.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),zc(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`} ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return I.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:a,...o}=r.props,i=Object.keys(o).reduce((l,u)=>(l[cb[u]||u]=o[u],l),{});let{type:c}=r;switch(typeof c=="symbol"?c=c.toString():this.warnOnInvalidChildren(r,a),c){case"Symbol(react.fragment)":t=this.mapChildrenToProps(a,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,i,a);break;default:t=this.mapObjectTypeChildren(r,t,i,a);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Ms)){const a=r;r=new Ms(a.context,!0),delete n.helmetData}return r?I.createElement(qc,{...n,context:r.value}):I.createElement(wd.Consumer,null,a=>I.createElement(qc,{...n,context:a}))}},Tt(es,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),es);const Td=d.createContext(null);function Sb({children:e}){const[t,n]=d.useState(!0),[r,a]=d.useState(null),[o,i]=d.useState(null),[c,l]=d.useState(null);typeof window<"u"&&window.location.search.includes("authDebug=1");const u=async _=>{try{const h=new Promise((b,w)=>setTimeout(()=>w(new Error("Profile fetch timeout")),5e3)),v=Ae.from("profiles").select("id,email,first_name,last_name,role,status,assigned_locations").eq("id",_).maybeSingle(),{data:x,error:y}=await Promise.race([v,h]);return y?null:x??null}catch{return null}},p=async(_,h=3,v=1e3)=>{for(let x=0;xsetTimeout(b,v))}return null},m=async()=>{const _=o==null?void 0:o.id;if(!_)return l(null),null;const h=await p(_);return l(h),h},g=async()=>{try{sessionStorage.removeItem("datatable_admin_reservations"),await Ae.auth.signOut()}finally{a(null),i(null),l(null)}};d.useEffect(()=>{let _=!1,h=!1,v=null,x=null;const y=setTimeout(()=>{_||n(!1)},1e4),b=async()=>{try{n(!0);const{data:C}=await Ae.auth.getSession();if(_)return;const S=(C==null?void 0:C.session)??null,P=(S==null?void 0:S.user)??null;if(a(S),i(P),P!=null&&P.id){const T=await p(P.id);v=P.id,x=T,_||l(T)}else l(null)}finally{if(_)return;n(!1),h=!0}};let w=null;return(async()=>{if(await b(),_)return;const{data:C}=Ae.auth.onAuthStateChange(async(S,P)=>{if(!h||_)return;a(P);const T=(P==null?void 0:P.user)??null;i(T);try{if(T!=null&&T.id){if(S==="INITIAL_SESSION"&&v===T.id){_||l(x),_||n(!1);return}x||n(!0);const E=await p(T.id);v=T.id,x=E,_||l(E)}else v=null,x=null,_||l(null)}finally{_||n(!1)}});w=()=>{var S;return(S=C==null?void 0:C.subscription)==null?void 0:S.unsubscribe()}})(),()=>{_=!0,clearTimeout(y),w==null||w()}},[]),d.useEffect(()=>{const _=async()=>{if(document.visibilityState==="visible")try{const{data:{session:h},error:v}=await Ae.auth.getSession();if(v||!h)a(null),i(null),l(null);else if(a(h),i(h.user),!c||c.id!==h.user.id){await new Promise(b=>setTimeout(b,500));const y=await p(h.user.id);y&&l(y)}}catch{}finally{n(!1)}};return document.addEventListener("visibilitychange",_),()=>document.removeEventListener("visibilitychange",_)},[c]);const f=d.useMemo(()=>({loading:t,session:r,user:o,profile:c,refreshProfile:m,signOut:g}),[t,r,o,c]);return s.jsx(Td.Provider,{value:f,children:e})}function wr(){const e=d.useContext(Td);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}const Bc=3,Pb=1500;function Se({allow:e,children:t}){const{loading:n,session:r,profile:a,signOut:o,refreshProfile:i}=wr();xe(),typeof window<"u"&&window.location.search.includes("authDebug=1");const[c,l]=d.useState(!1);d.useEffect(()=>{if(!n){l(!1);return}const v=setTimeout(()=>l(!0),5e3);return()=>clearTimeout(v)},[n]);const[u,p]=d.useState(0),[m,g]=d.useState(!1);d.useEffect(()=>{a&&(p(0),g(!1))},[a]),d.useEffect(()=>{if(n||!r||a||u>=Bc)return;g(!0);const v=setTimeout(async()=>{await i(),p(x=>x+1),g(!1)},Pb);return()=>clearTimeout(v)},[n,r,a,u]);const f=e.includes("agent")?"/login-agent":"/login-admin";if(n)return s.jsxs("div",{className:"flex min-h-[50vh] w-full flex-col items-center justify-center gap-4",children:[s.jsx("div",{className:"text-sm text-muted-foreground",children:"Chargement…"}),c&&s.jsx("button",{type:"button",className:"text-sm text-primary underline underline-offset-2",onClick:()=>window.location.reload(),children:"La page ne répond pas ? Cliquer ici pour rafraîchir"})]});if(!r)return s.jsx(Jt,{to:f,replace:!0});if(!a&&(m||u{window.location.href="/unauthorized"},children:"Réessayer"}),s.jsx("button",{type:"button",className:"inline-flex h-10 items-center justify-center rounded-md border px-4 text-sm font-medium hover:bg-muted",onClick:()=>{o(),window.location.href=f},children:"Se déconnecter"})]})]})});if(String(a.status||"").toLowerCase()!=="active")return s.jsx(Jt,{to:f,replace:!0});const _=String(a.role||"").toLowerCase();if(!e.map(v=>String(v||"").toLowerCase()).includes(_)){let v="/unauthorized";return _==="admin"?v="/dash":_==="superviseur"?v="/dash/reservations":_==="agent"&&(v="/agent/reservations"),s.jsx(Jt,{to:v,replace:!0})}return s.jsx(s.Fragment,{children:t})}function Eb(e,t={}){return id({queryKey:["destination_pages",e],queryFn:async()=>{const{data:n,error:r}=await Ae.from("destination_pages").select("*").eq("slug",e).eq("enabled",!0).single();if(r){if(r.code==="PGRST116")return null;throw r}return n},staleTime:5*60*1e3,refetchOnWindowFocus:!1,enabled:t.enabled!==!1})}function Ab(e){const t=(e||"").trim();return!t||/^https?:\/\//i.test(t)||t.startsWith("data:")||typeof window>"u"?t:new URL(t,window.location.origin).toString()}function jb(e,t){const n=t==null?"":String(t).trim();if(!n||e.startsWith("data:"))return e;const r=e.includes("?")?"&":"?";return`${e}${r}v=${encodeURIComponent(n)}`}function Sd(e={}){var i;if(typeof document>"u")return;const t=(()=>{const c=(e.faviconUrl||"").trim();return Ab(c||"/favicon.png")})(),n=jb(t,e.version),r=Array.from(document.querySelectorAll('link[rel~="icon"]'));for(const c of r)c.id!=="app-favicon"&&((i=c.parentElement)==null||i.removeChild(c));const a=document.head||document.getElementsByTagName("head")[0];if(!a)return;const o=document.getElementById("app-favicon")??document.createElement("link");o.id="app-favicon",o.rel="icon",o.type="image/png",o.href=n,o.parentElement||a.appendChild(o)}function Nb(e,t={}){const n=(e||"").trim();if(!n)return n;let r;try{r=new URL(n)}catch{return n}const a=r.pathname.includes("/storage/v1/object/public/"),o=r.pathname.includes("/storage/v1/render/image/public/");if(!a&&!o)return n;const i=r.pathname.indexOf("/public/");if(i<0)return n;const c=r.pathname.slice(i+8),[l,...u]=c.split("/").filter(Boolean);if(!l||u.length===0)return n;const p=u.join("/"),m=new URL(r.toString());m.pathname=`/storage/v1/render/image/public/${l}/${p}`;const g=(f,_)=>{typeof _!="number"||!Number.isFinite(_)||_<=0||m.searchParams.set(f,String(Math.round(_)))};return g("width",t.width),g("height",t.height),g("quality",t.quality),t.resize&&m.searchParams.set("resize",t.resize),t.format&&m.searchParams.set("format",t.format),m.toString()}var Pd={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress * @license MIT */(function(e,t){(function(n,r){e.exports=r()})(Wm,function(){var n={};n.version="0.2.0";var r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};n.configure=function(_){var h,v;for(h in _)v=_[h],v!==void 0&&_.hasOwnProperty(h)&&(r[h]=v);return this},n.status=null,n.set=function(_){var h=n.isStarted();_=a(_,r.minimum,1),n.status=_===1?null:_;var v=n.render(!h),x=v.querySelector(r.barSelector),y=r.speed,b=r.easing;return v.offsetWidth,c(function(w){r.positionUsing===""&&(r.positionUsing=n.getPositioningCSS()),l(x,i(_,y,b)),_===1?(l(v,{transition:"none",opacity:1}),v.offsetWidth,setTimeout(function(){l(v,{transition:"all "+y+"ms linear",opacity:0}),setTimeout(function(){n.remove(),w()},y)},y)):setTimeout(w,y)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var _=function(){setTimeout(function(){n.status&&(n.trickle(),_())},r.trickleSpeed)};return r.trickle&&_(),this},n.done=function(_){return!_&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(_){var h=n.status;return h?(typeof _!="number"&&(_=(1-h)*a(Math.random()*h,.1,.95)),h=a(h+_,0,.994),n.set(h)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},function(){var _=0,h=0;n.promise=function(v){return!v||v.state()==="resolved"?this:(h===0&&n.start(),_++,h++,v.always(function(){h--,h===0?(_=0,n.done()):n.set((_-h)/_)}),this)}}(),n.render=function(_){if(n.isRendered())return document.getElementById("nprogress");p(document.documentElement,"nprogress-busy");var h=document.createElement("div");h.id="nprogress",h.innerHTML=r.template;var v=h.querySelector(r.barSelector),x=_?"-100":o(n.status||0),y=document.querySelector(r.parent),b;return l(v,{transition:"all 0 linear",transform:"translate3d("+x+"%,0,0)"}),r.showSpinner||(b=h.querySelector(r.spinnerSelector),b&&f(b)),y!=document.body&&p(y,"nprogress-custom-parent"),y.appendChild(h),h},n.remove=function(){m(document.documentElement,"nprogress-busy"),m(document.querySelector(r.parent),"nprogress-custom-parent");var _=document.getElementById("nprogress");_&&f(_)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var _=document.body.style,h="WebkitTransform"in _?"Webkit":"MozTransform"in _?"Moz":"msTransform"in _?"ms":"OTransform"in _?"O":"";return h+"Perspective"in _?"translate3d":h+"Transform"in _?"translate":"margin"};function a(_,h,v){return _v?v:_}function o(_){return(-1+_)*100}function i(_,h,v){var x;return r.positionUsing==="translate3d"?x={transform:"translate3d("+o(_)+"%,0,0)"}:r.positionUsing==="translate"?x={transform:"translate("+o(_)+"%,0)"}:x={"margin-left":o(_)+"%"},x.transition="all "+h+"ms "+v,x}var c=function(){var _=[];function h(){var v=_.shift();v&&v(h)}return function(v){_.push(v),_.length==1&&h()}}(),l=function(){var _=["Webkit","O","Moz","ms"],h={};function v(w){return w.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(C,S){return S.toUpperCase()})}function x(w){var C=document.body.style;if(w in C)return w;for(var S=_.length,P=w.charAt(0).toUpperCase()+w.slice(1),T;S--;)if(T=_[S]+P,T in C)return T;return w}function y(w){return w=v(w),h[w]||(h[w]=x(w))}function b(w,C,S){C=y(C),w.style[C]=S}return function(w,C){var S=arguments,P,T;if(S.length==2)for(P in C)T=C[P],T!==void 0&&C.hasOwnProperty(P)&&b(w,P,T);else b(w,S[1],S[2])}}();function u(_,h){var v=typeof _=="string"?_:g(_);return v.indexOf(" "+h+" ")>=0}function p(_,h){var v=g(_),x=v+h;u(v,h)||(_.className=x.substring(1))}function m(_,h){var v=g(_),x;u(_,h)&&(x=v.replace(" "+h+" "," "),_.className=x.substring(1,x.length-1))}function g(_){return(" "+(_.className||"")+" ").replace(/\s+/gi," ")}function f(_){_&&_.parentNode&&_.parentNode.removeChild(_)}return n})})(Pd);var Mb=Pd.exports;const Zt=Qa(Mb);Zt.configure({showSpinner:!1,minimum:.1,easing:"ease",speed:200,trickleSpeed:200});function Rb(){const e=xe();return d.useEffect(()=>{Zt.start();const t=setTimeout(()=>{Zt.done()},300);return()=>{clearTimeout(t),Zt.done()}},[e.pathname]),null}const Db="https://wa.me/212779581690",Ib=["/admin","/dash","/agent"];function Ob(){const{pathname:e}=xe(),{data:t}=xr();if(Ib.some(a=>e===a||e.startsWith(a+"/")))return null;const r=(t==null?void 0:t.social_whatsapp_url)||Db;return s.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer","aria-label":"Contact us on WhatsApp",className:"whatsapp-fab",children:[s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"28",height:"28","aria-hidden":"true",fill:"currentColor",children:s.jsx("path",{d:"M24 4C12.954 4 4 12.954 4 24c0 3.591.951 7.013 2.756 9.995L4.08 43.051a1 1 0 0 0 1.222 1.257l9.36-2.448A19.9 19.9 0 0 0 24 44c11.046 0 20-8.954 20-20S35.046 4 24 4Zm0 2c9.941 0 18 8.059 18 18s-8.059 18-18 18c-3.26 0-6.337-.87-8.99-2.516a1 1 0 0 0-.74-.115l-7.85 2.053 2.183-7.641a1 1 0 0 0-.1-.762A17.923 17.923 0 0 1 6 24c0-9.941 8.059-18 18-18Zm-6.108 9c-.318 0-.834.12-1.27.594-.437.473-1.666 1.628-1.666 3.971s1.706 4.604 1.944 4.922c.237.317 3.355 5.125 8.161 6.985 4.034 1.59 4.853 1.274 5.728 1.194.875-.079 2.82-1.154 3.218-2.268.397-1.114.397-2.07.278-2.27-.12-.198-.437-.317-.914-.554-.478-.238-2.82-1.392-3.258-1.55-.437-.159-.755-.238-1.073.238-.317.476-1.23 1.55-1.508 1.868-.278.317-.556.357-1.033.119-.477-.238-2.013-.742-3.835-2.368-1.417-1.265-2.374-2.826-2.652-3.303-.278-.476-.03-.734.21-.97.213-.212.477-.554.715-.832.238-.277.318-.476.478-.793.159-.317.08-.596-.04-.833-.12-.238-1.073-2.584-1.47-3.538-.397-.952-.795-.832-1.073-.832h-.149Z"})}),s.jsx("style",{children:` .whatsapp-fab { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background-color: #25D366; color: #fff; box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45), 0 2px 6px rgba(0, 0, 0, 0.18); transition: transform 0.2s ease, box-shadow 0.2s ease; text-decoration: none; outline-offset: 3px; } .whatsapp-fab:hover, .whatsapp-fab:focus-visible { transform: scale(1.1); box-shadow: 0 6px 22px rgba(37, 211, 102, 0.55), 0 3px 10px rgba(0, 0, 0, 0.2); } .whatsapp-fab:active { transform: scale(0.97); } @media (max-width: 640px) { .whatsapp-fab { width: 48px; height: 48px; bottom: 18px; right: 18px; } .whatsapp-fab svg { width: 24px; height: 24px; } body.sticky-cta-visible .whatsapp-fab { bottom: 74px; } } body.sticky-cta-visible .whatsapp-fab { bottom: 80px; right: 24px; } `})]})}function zb(){const{pathname:e}=xe();return d.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"instant"})},[e]),null}const Lb=["/dash","/agent","/login-admin","/login-superviseur","/login-agent"];function Fb(e){return Lb.some(t=>e===t||e.startsWith(t+"/"))}function ft(e,t,n){if(document.getElementById(e))return;const r=document.createElement("script");r.id=e,r.async=!0,t&&(r.src=t),n&&(r.innerHTML=n),document.head.appendChild(r)}function Wb(e,t){var r;if(document.getElementById(e))return;const n=document.createElement("noscript");n.id=e,n.innerHTML=t,(r=document.body)==null||r.insertAdjacentElement("afterbegin",n)}function qb(){const{pathname:e}=xe(),{data:t}=xr(),n=(t==null?void 0:t.tracking)||{},r=(n.google_analytics_id||"").trim(),a=(n.google_tag_manager_id||"").trim(),o=(n.google_search_console_verification||"").trim(),i=(n.facebook_pixel_id||"").trim(),c=(n.tiktok_pixel_id||"").trim(),l=(n.snapchat_pixel_id||"").trim(),u=(n.pinterest_tag_id||"").trim(),p=(n.linkedin_insight_tag_id||"").trim(),m=(n.microsoft_clarity_id||"").trim(),g=(n.hotjar_id||"").trim(),f=Fb(e);return d.useEffect(()=>{f||(r&&(ft("ga4-loader",`https://www.googletagmanager.com/gtag/js?id=${r}`),ft("ga4-init",void 0,` window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '${r}'); `)),a&&(ft("gtm-init",void 0,` (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','${a}'); `),Wb("gtm-noscript",``)),i&&ft("fb-pixel-init",void 0,` !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js'); fbq('init','${i}');fbq('track','PageView'); `),c&&ft("tiktok-pixel-init",void 0,` !function(w,d,t){w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[]; ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"]; ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}; for(var i=0;iyw[e],xw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ww={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Cw={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},kw={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Tw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Sw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Pw=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Ew={ordinalNumber:Pw,era:vt({values:xw,defaultWidth:"wide"}),quarter:vt({values:ww,defaultWidth:"wide",argumentCallback:e=>e-1}),month:vt({values:Cw,defaultWidth:"wide"}),day:vt({values:kw,defaultWidth:"wide"}),dayPeriod:vt({values:Tw,defaultWidth:"wide",formattingValues:Sw,defaultFormattingWidth:"wide"})},Aw=/^(\d+)(th|st|nd|rd)?/i,jw=/\d+/i,Nw={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Mw={any:[/^b/i,/^(a|c)/i]},Rw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Dw={any:[/1/i,/2/i,/3/i,/4/i]},Iw={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ow={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},zw={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Lw={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Fw={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ww={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},qw={ordinalNumber:Sf({matchPattern:Aw,parsePattern:jw,valueCallback:e=>parseInt(e,10)}),era:_t({matchPatterns:Nw,defaultMatchWidth:"wide",parsePatterns:Mw,defaultParseWidth:"any"}),quarter:_t({matchPatterns:Rw,defaultMatchWidth:"wide",parsePatterns:Dw,defaultParseWidth:"any",valueCallback:e=>e+1}),month:_t({matchPatterns:Iw,defaultMatchWidth:"wide",parsePatterns:Ow,defaultParseWidth:"any"}),day:_t({matchPatterns:zw,defaultMatchWidth:"wide",parsePatterns:Lw,defaultParseWidth:"any"}),dayPeriod:_t({matchPatterns:Fw,defaultMatchWidth:"any",parsePatterns:Ww,defaultParseWidth:"any"})},Bw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$w={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Vw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Uw={date:Kn({formats:Bw,defaultWidth:"full"}),time:Kn({formats:$w,defaultWidth:"full"}),dateTime:Kn({formats:Vw,defaultWidth:"full"})},Si={code:"en-US",formatDistance:_w,formatLong:Uw,formatRelative:bw,localize:Ew,match:qw,options:{weekStartsOn:0,firstWeekContainsDate:1}},Hw={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},Gw=(e,t,n)=>{let r;const a=Hw[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dans "+r:"il y a "+r:r},Yw={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},Kw={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Qw={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Xw={date:Kn({formats:Yw,defaultWidth:"full"}),time:Kn({formats:Kw,defaultWidth:"full"}),dateTime:Kn({formats:Qw,defaultWidth:"full"})},Jw={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},Zw=(e,t,n,r)=>Jw[e],e0={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},t0={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},n0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},r0={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},a0={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},o0=(e,t)=>{const n=Number(e),r=t==null?void 0:t.unit;if(n===0)return"0";const a=["year","week","hour","minute","second"];let o;return n===1?o=r&&a.includes(r)?"ère":"er":o="ème",n+o},s0=["MMM","MMMM"],i0={preprocessor:(e,t)=>e.getDate()===1||!t.some(r=>r.isToken&&s0.includes(r.value))?t:t.map(r=>r.isToken&&r.value==="do"?{isToken:!0,value:"d"}:r),ordinalNumber:o0,era:vt({values:e0,defaultWidth:"wide"}),quarter:vt({values:t0,defaultWidth:"wide",argumentCallback:e=>e-1}),month:vt({values:n0,defaultWidth:"wide"}),day:vt({values:r0,defaultWidth:"wide"}),dayPeriod:vt({values:a0,defaultWidth:"wide"})},c0=/^(\d+)(ième|ère|ème|er|e)?/i,l0=/\d+/i,u0={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},d0={any:[/^av/i,/^ap/i]},f0={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},p0={any:[/1/i,/2/i,/3/i,/4/i]},m0={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},h0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},g0={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},v0={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},_0={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},y0={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},b0={ordinalNumber:Sf({matchPattern:c0,parsePattern:l0,valueCallback:e=>parseInt(e)}),era:_t({matchPatterns:u0,defaultMatchWidth:"wide",parsePatterns:d0,defaultParseWidth:"any"}),quarter:_t({matchPatterns:f0,defaultMatchWidth:"wide",parsePatterns:p0,defaultParseWidth:"any",valueCallback:e=>e+1}),month:_t({matchPatterns:m0,defaultMatchWidth:"wide",parsePatterns:h0,defaultParseWidth:"any"}),day:_t({matchPatterns:g0,defaultMatchWidth:"wide",parsePatterns:v0,defaultParseWidth:"any"}),dayPeriod:_t({matchPatterns:_0,defaultMatchWidth:"any",parsePatterns:y0,defaultParseWidth:"any"})},x0={code:"fr",formatDistance:Gw,formatLong:Xw,formatRelative:Zw,localize:i0,match:b0,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Ve(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function De(e,t){const n=ce(e);return isNaN(t)?Ve(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function lt(e,t){const n=ce(e);if(isNaN(t))return Ve(e,NaN);if(!t)return n;const r=n.getDate(),a=Ve(e,n.getTime());a.setMonth(n.getMonth()+t+1,0);const o=a.getDate();return r>=o?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}const Pi=6048e5,w0=864e5;function Pn(e){return Ct(e,{weekStartsOn:1})}function Pf(e){const t=ce(e),n=t.getFullYear(),r=Ve(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=Pn(r),o=Ve(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const i=Pn(o);return t.getTime()>=a.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function mr(e){const t=ce(e);return t.setHours(0,0,0,0),t}function Va(e){const t=ce(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function bt(e,t){const n=mr(e),r=mr(t),a=+n-Va(n),o=+r-Va(r);return Math.round((a-o)/w0)}function C0(e){const t=Pf(e),n=Ve(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Pn(n)}function Ws(e,t){const n=t*7;return De(e,n)}function k0(e,t){return lt(e,t*12)}function T0(e){let t;return e.forEach(function(n){const r=ce(n);(t===void 0||t{const r=ce(n);(!t||t>r||isNaN(+r))&&(t=r)}),t||new Date(NaN)}function We(e,t){const n=mr(e),r=mr(t);return+n==+r}function Ei(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function P0(e){if(!Ei(e)&&typeof e!="number")return!1;const t=ce(e);return!isNaN(Number(t))}function $r(e,t){const n=ce(e),r=ce(t),a=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return a*12+o}function E0(e,t,n){const r=Ct(e,n),a=Ct(t,n),o=+r-Va(r),i=+a-Va(a);return Math.round((o-i)/Pi)}function Ai(e){const t=ce(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function qe(e){const t=ce(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Ef(e){const t=ce(e),n=Ve(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ji(e,t){var c,l,u,p;const n=aa(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((p=(u=n.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)??0,a=ce(e),o=a.getDay(),i=(o=c.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function j0(e,t){var c,l,u,p;const n=aa(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(u=n.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)??1,a=Nf(e,t),o=Ve(e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),Ct(o,t)}function Mf(e,t){const n=ce(e),r=+Ct(n,t)-+j0(n,t);return Math.round(r/Pi)+1}function pe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const qt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return pe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):pe(n+1,2)},d(e,t){return pe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return pe(e.getHours()%12||12,t.length)},H(e,t){return pe(e.getHours(),t.length)},m(e,t){return pe(e.getMinutes(),t.length)},s(e,t){return pe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return pe(a,t.length)}},Wn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},el={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return qt.y(e,t)},Y:function(e,t,n,r){const a=Nf(e,r),o=a>0?a:1-a;if(t==="YY"){const i=o%100;return pe(i,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):pe(o,t.length)},R:function(e,t){const n=Pf(e);return pe(n,t.length)},u:function(e,t){const n=e.getFullYear();return pe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return pe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return pe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return qt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return pe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=Mf(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):pe(a,t.length)},I:function(e,t,n){const r=jf(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):pe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):qt.d(e,t)},D:function(e,t,n){const r=A0(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):pe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return pe(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return pe(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return pe(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=Wn.noon:r===0?a=Wn.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=Wn.evening:r>=12?a=Wn.afternoon:r>=4?a=Wn.morning:a=Wn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return qt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):qt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):qt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):qt.s(e,t)},S:function(e,t){return qt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return nl(r);case"XXXX":case"XX":return dn(r);case"XXXXX":case"XXX":default:return dn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return nl(r);case"xxxx":case"xx":return dn(r);case"xxxxx":case"xxx":default:return dn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+tl(r,":");case"OOOO":default:return"GMT"+dn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+tl(r,":");case"zzzz":default:return"GMT"+dn(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return pe(r,t.length)},T:function(e,t,n){const r=e.getTime();return pe(r,t.length)}};function tl(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return o===0?n+String(a):n+String(a)+t+pe(o,2)}function nl(e,t){return e%60===0?(e>0?"-":"+")+pe(Math.abs(e)/60,2):dn(e,t)}function dn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=pe(Math.trunc(r/60),2),o=pe(r%60,2);return n+a+t+o}const rl=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Rf=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},N0=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return rl(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",rl(r,t)).replace("{{time}}",Rf(a,t))},M0={p:Rf,P:N0},R0=/^D+$/,D0=/^Y+$/,I0=["D","DD","YY","YYYY"];function O0(e){return R0.test(e)}function z0(e){return D0.test(e)}function L0(e,t,n){const r=F0(e,t,n);if(console.warn(r),I0.includes(e))throw new RangeError(r)}function F0(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const W0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,q0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,B0=/^'([^]*?)'?$/,$0=/''/g,V0=/[a-zA-Z]/;function An(e,t,n){var p,m,g,f,_,h,v,x;const r=aa(),a=(n==null?void 0:n.locale)??r.locale??Si,o=(n==null?void 0:n.firstWeekContainsDate)??((m=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(g=r.locale)==null?void 0:g.options)==null?void 0:f.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((h=(_=n==null?void 0:n.locale)==null?void 0:_.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((x=(v=r.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0,c=ce(e);if(!P0(c))throw new RangeError("Invalid time value");let l=t.match(q0).map(y=>{const b=y[0];if(b==="p"||b==="P"){const w=M0[b];return w(y,a.formatLong)}return y}).join("").match(W0).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const b=y[0];if(b==="'")return{isToken:!1,value:U0(y)};if(el[b])return{isToken:!0,value:y};if(b.match(V0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:y}});a.localize.preprocessor&&(l=a.localize.preprocessor(c,l));const u={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return l.map(y=>{if(!y.isToken)return y.value;const b=y.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&z0(b)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&O0(b))&&L0(b,t,String(e));const w=el[b[0]];return w(c,b,a.localize,u)}).join("")}function U0(e){const t=e.match(B0);return t?t[1].replace($0,"'"):e}function H0(e){const t=ce(e),n=t.getFullYear(),r=t.getMonth(),a=Ve(e,0);return a.setFullYear(n,r+1,0),a.setHours(0,0,0,0),a.getDate()}function G0(e){return Math.trunc(+ce(e)/1e3)}function Y0(e){const t=ce(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function K0(e,t){return E0(Y0(e),qe(e),t)+1}function qs(e,t){const n=ce(e),r=ce(t);return n.getTime()>r.getTime()}function Df(e,t){const n=ce(e),r=ce(t);return+n<+r}function Ni(e,t){const n=ce(e),r=ce(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Q0(e,t){const n=ce(e),r=ce(t);return n.getFullYear()===r.getFullYear()}function qo(e,t){return De(e,-t)}function Bo(e,t){const n=ce(e),r=n.getFullYear(),a=n.getDate(),o=Ve(e,0);o.setFullYear(r,t,15),o.setHours(0,0,0,0);const i=H0(o);return n.setMonth(t,Math.min(a,i)),n}function al(e,t){const n=ce(e);return isNaN(+n)?Ve(e,NaN):(n.setFullYear(t),n)}var J=function(){return J=Object.assign||function(t){for(var n,r=1,a=arguments.length;r1&&(l||!u),m=t>1&&(u||!l),g=function(){r&&o(r)},f=function(){a&&o(a)};return s.jsx(A1,{displayMonth:e.displayMonth,hideNext:p,hidePrevious:m,nextMonth:a,previousMonth:r,onPreviousClick:g,onNextClick:f})}function j1(e){var t,n=ve(),r=n.classNames,a=n.disableNavigation,o=n.styles,i=n.captionLayout,c=n.components,l=(t=c==null?void 0:c.CaptionLabel)!==null&&t!==void 0?t:zf,u;return a?u=s.jsx(l,{id:e.id,displayMonth:e.displayMonth}):i==="dropdown"?u=s.jsx(ol,{displayMonth:e.displayMonth,id:e.id}):i==="dropdown-buttons"?u=s.jsxs(s.Fragment,{children:[s.jsx(ol,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),s.jsx(sl,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=s.jsxs(s.Fragment,{children:[s.jsx(l,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(sl,{displayMonth:e.displayMonth,id:e.id})]}),s.jsx("div",{className:r.caption,style:o.caption,children:u})}function N1(e){var t=ve(),n=t.footer,r=t.styles,a=t.classNames.tfoot;return n?s.jsx("tfoot",{className:a,style:r.tfoot,children:s.jsx("tr",{children:s.jsx("td",{colSpan:8,children:n})})}):s.jsx(s.Fragment,{})}function M1(e,t,n){for(var r=n?Pn(new Date):Ct(new Date,{locale:e,weekStartsOn:t}),a=[],o=0;o<7;o++){var i=De(r,o);a.push(i)}return a}function R1(){var e=ve(),t=e.classNames,n=e.styles,r=e.showWeekNumber,a=e.locale,o=e.weekStartsOn,i=e.ISOWeek,c=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,u=M1(a,o,i);return s.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&s.jsx("td",{style:n.head_cell,className:t.head_cell}),u.map(function(p,m){return s.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":l(p,{locale:a}),children:c(p,{locale:a})},m)})]})}function D1(){var e,t=ve(),n=t.classNames,r=t.styles,a=t.components,o=(e=a==null?void 0:a.HeadRow)!==null&&e!==void 0?e:R1;return s.jsx("thead",{style:r.head,className:n.head,children:s.jsx(o,{})})}function I1(e){var t=ve(),n=t.locale,r=t.formatters.formatDay;return s.jsx(s.Fragment,{children:r(e.date,{locale:n})})}var Mi=d.createContext(void 0);function O1(e){if(!oa(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return s.jsx(Mi.Provider,{value:t,children:e.children})}return s.jsx(z1,{initialProps:e.initialProps,children:e.children})}function z1(e){var t=e.initialProps,n=e.children,r=t.selected,a=t.min,o=t.max,i=function(u,p,m){var g,f;(g=t.onDayClick)===null||g===void 0||g.call(t,u,p,m);var _=!!(p.selected&&a&&(r==null?void 0:r.length)===a);if(!_){var h=!!(!p.selected&&o&&(r==null?void 0:r.length)===o);if(!h){var v=r?If([],r):[];if(p.selected){var x=v.findIndex(function(y){return We(u,y)});v.splice(x,1)}else v.push(u);(f=t.onSelect)===null||f===void 0||f.call(t,v,u,p,m)}}},c={disabled:[]};r&&c.disabled.push(function(u){var p=o&&r.length>o-1,m=r.some(function(g){return We(g,u)});return!!(p&&!m)});var l={selected:r,onDayClick:i,modifiers:c};return s.jsx(Mi.Provider,{value:l,children:n})}function Ri(){var e=d.useContext(Mi);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function L1(e,t){var n=t||{},r=n.from,a=n.to;return r&&a?We(a,e)&&We(r,e)?void 0:We(a,e)?{from:a,to:void 0}:We(r,e)?void 0:qs(r,e)?{from:e,to:a}:{from:r,to:e}:a?qs(e,a)?{from:a,to:e}:{from:e,to:a}:r?Df(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var Di=d.createContext(void 0);function F1(e){if(!sa(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return s.jsx(Di.Provider,{value:t,children:e.children})}return s.jsx(W1,{initialProps:e.initialProps,children:e.children})}function W1(e){var t=e.initialProps,n=e.children,r=t.selected,a=r||{},o=a.from,i=a.to,c=t.min,l=t.max,u=function(f,_,h){var v,x;(v=t.onDayClick)===null||v===void 0||v.call(t,f,_,h);var y=L1(f,r);(x=t.onSelect)===null||x===void 0||x.call(t,y,f,_,h)},p={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(p.range_start=[o],i?(p.range_end=[i],We(o,i)||(p.range_middle=[{after:o,before:i}])):p.range_end=[o]):i&&(p.range_start=[i],p.range_end=[i]),c&&(o&&!i&&p.disabled.push({after:qo(o,c-1),before:De(o,c-1)}),o&&i&&p.disabled.push({after:o,before:De(o,c-1)}),!o&&i&&p.disabled.push({after:qo(i,c-1),before:De(i,c-1)})),l){if(o&&!i&&(p.disabled.push({before:De(o,-l+1)}),p.disabled.push({after:De(o,l-1)})),o&&i){var m=bt(i,o)+1,g=l-m;p.disabled.push({before:qo(o,g)}),p.disabled.push({after:De(i,g)})}!o&&i&&(p.disabled.push({before:De(i,-l+1)}),p.disabled.push({after:De(i,l-1)}))}return s.jsx(Di.Provider,{value:{selected:r,onDayClick:u,modifiers:p},children:n})}function Ii(){var e=d.useContext(Di);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Ra(e){return Array.isArray(e)?If([],e):e!==void 0?[e]:[]}function q1(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],a=n[1];t[r]=Ra(a)}),t}var ut;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(ut||(ut={}));var B1=ut.Selected,Pt=ut.Disabled,$1=ut.Hidden,V1=ut.Today,$o=ut.RangeEnd,Vo=ut.RangeMiddle,Uo=ut.RangeStart,U1=ut.Outside;function H1(e,t,n){var r,a=(r={},r[B1]=Ra(e.selected),r[Pt]=Ra(e.disabled),r[$1]=Ra(e.hidden),r[V1]=[e.today],r[$o]=[],r[Vo]=[],r[Uo]=[],r[U1]=[],r);return e.fromDate&&a[Pt].push({before:e.fromDate}),e.toDate&&a[Pt].push({after:e.toDate}),oa(e)?a[Pt]=a[Pt].concat(t.modifiers[Pt]):sa(e)&&(a[Pt]=a[Pt].concat(n.modifiers[Pt]),a[Uo]=n.modifiers[Uo],a[Vo]=n.modifiers[Vo],a[$o]=n.modifiers[$o]),a}var Wf=d.createContext(void 0);function G1(e){var t=ve(),n=Ri(),r=Ii(),a=H1(t,n,r),o=q1(t.modifiers),i=J(J({},a),o);return s.jsx(Wf.Provider,{value:i,children:e.children})}function qf(){var e=d.useContext(Wf);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Y1(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function K1(e){return!!(e&&typeof e=="object"&&"from"in e)}function Q1(e){return!!(e&&typeof e=="object"&&"after"in e)}function X1(e){return!!(e&&typeof e=="object"&&"before"in e)}function J1(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Z1(e,t){var n,r=t.from,a=t.to;if(r&&a){var o=bt(a,r)<0;o&&(n=[a,r],r=n[0],a=n[1]);var i=bt(e,r)>=0&&bt(a,e)>=0;return i}return a?We(a,e):r?We(r,e):!1}function eC(e){return Ei(e)}function tC(e){return Array.isArray(e)&&e.every(Ei)}function nC(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(eC(n))return We(e,n);if(tC(n))return n.includes(e);if(K1(n))return Z1(e,n);if(J1(n))return n.dayOfWeek.includes(e.getDay());if(Y1(n)){var r=bt(n.before,e),a=bt(n.after,e),o=r>0,i=a<0,c=qs(n.before,n.after);return c?i&&o:o||i}return Q1(n)?bt(e,n.after)>0:X1(n)?bt(n.before,e)>0:typeof n=="function"?n(e):!1})}function Oi(e,t,n){var r=Object.keys(t).reduce(function(o,i){var c=t[i];return nC(e,c)&&o.push(i),o},[]),a={};return r.forEach(function(o){return a[o]=!0}),n&&!Ni(e,n)&&(a.outside=!0),a}function rC(e,t){for(var n=qe(e[0]),r=Ai(e[e.length-1]),a,o,i=n;i<=r;){var c=Oi(i,t),l=!c.disabled&&!c.hidden;if(!l){i=De(i,1);continue}if(c.selected)return i;c.today&&!o&&(o=i),a||(a=i),i=De(i,1)}return o||a}var aC=365;function Bf(e,t){var n=t.moveBy,r=t.direction,a=t.context,o=t.modifiers,i=t.retry,c=i===void 0?{count:0,lastFocused:e}:i,l=a.weekStartsOn,u=a.fromDate,p=a.toDate,m=a.locale,g={day:De,week:Ws,month:lt,year:k0,startOfWeek:function(v){return a.ISOWeek?Pn(v):Ct(v,{locale:m,weekStartsOn:l})},endOfWeek:function(v){return a.ISOWeek?Af(v):ji(v,{locale:m,weekStartsOn:l})}},f=g[n](e,r==="after"?1:-1);r==="before"&&u?f=T0([u,f]):r==="after"&&p&&(f=S0([p,f]));var _=!0;if(o){var h=Oi(f,o);_=!h.disabled&&!h.hidden}return _?f:c.count>aC?c.lastFocused:Bf(f,{moveBy:n,direction:r,context:a,modifiers:o,retry:J(J({},c),{count:c.count+1})})}var $f=d.createContext(void 0);function oC(e){var t=ia(),n=qf(),r=d.useState(),a=r[0],o=r[1],i=d.useState(),c=i[0],l=i[1],u=rC(t.displayMonths,n),p=a??(c&&t.isDateDisplayed(c))?c:u,m=function(){l(a),o(void 0)},g=function(v){o(v)},f=ve(),_=function(v,x){if(a){var y=Bf(a,{moveBy:v,direction:x,context:f,modifiers:n});We(a,y)||(t.goToDate(y,a),g(y))}},h={focusedDay:a,focusTarget:p,blur:m,focus:g,focusDayAfter:function(){return _("day","after")},focusDayBefore:function(){return _("day","before")},focusWeekAfter:function(){return _("week","after")},focusWeekBefore:function(){return _("week","before")},focusMonthBefore:function(){return _("month","before")},focusMonthAfter:function(){return _("month","after")},focusYearBefore:function(){return _("year","before")},focusYearAfter:function(){return _("year","after")},focusStartOfWeek:function(){return _("startOfWeek","before")},focusEndOfWeek:function(){return _("endOfWeek","after")}};return s.jsx($f.Provider,{value:h,children:e.children})}function zi(){var e=d.useContext($f);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function sC(e,t){var n=qf(),r=Oi(e,n,t);return r}var Li=d.createContext(void 0);function iC(e){if(!mo(e.initialProps)){var t={selected:void 0};return s.jsx(Li.Provider,{value:t,children:e.children})}return s.jsx(cC,{initialProps:e.initialProps,children:e.children})}function cC(e){var t=e.initialProps,n=e.children,r=function(o,i,c){var l,u,p;if((l=t.onDayClick)===null||l===void 0||l.call(t,o,i,c),i.selected&&!t.required){(u=t.onSelect)===null||u===void 0||u.call(t,void 0,o,i,c);return}(p=t.onSelect)===null||p===void 0||p.call(t,o,o,i,c)},a={selected:t.selected,onDayClick:r};return s.jsx(Li.Provider,{value:a,children:n})}function Vf(){var e=d.useContext(Li);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function lC(e,t){var n=ve(),r=Vf(),a=Ri(),o=Ii(),i=zi(),c=i.focusDayAfter,l=i.focusDayBefore,u=i.focusWeekAfter,p=i.focusWeekBefore,m=i.blur,g=i.focus,f=i.focusMonthBefore,_=i.focusMonthAfter,h=i.focusYearBefore,v=i.focusYearAfter,x=i.focusStartOfWeek,y=i.focusEndOfWeek,b=function(D){var A,j,W,G;mo(n)?(A=r.onDayClick)===null||A===void 0||A.call(r,e,t,D):oa(n)?(j=a.onDayClick)===null||j===void 0||j.call(a,e,t,D):sa(n)?(W=o.onDayClick)===null||W===void 0||W.call(o,e,t,D):(G=n.onDayClick)===null||G===void 0||G.call(n,e,t,D)},w=function(D){var A;g(e),(A=n.onDayFocus)===null||A===void 0||A.call(n,e,t,D)},C=function(D){var A;m(),(A=n.onDayBlur)===null||A===void 0||A.call(n,e,t,D)},S=function(D){var A;(A=n.onDayMouseEnter)===null||A===void 0||A.call(n,e,t,D)},P=function(D){var A;(A=n.onDayMouseLeave)===null||A===void 0||A.call(n,e,t,D)},T=function(D){var A;(A=n.onDayPointerEnter)===null||A===void 0||A.call(n,e,t,D)},E=function(D){var A;(A=n.onDayPointerLeave)===null||A===void 0||A.call(n,e,t,D)},M=function(D){var A;(A=n.onDayTouchCancel)===null||A===void 0||A.call(n,e,t,D)},R=function(D){var A;(A=n.onDayTouchEnd)===null||A===void 0||A.call(n,e,t,D)},N=function(D){var A;(A=n.onDayTouchMove)===null||A===void 0||A.call(n,e,t,D)},L=function(D){var A;(A=n.onDayTouchStart)===null||A===void 0||A.call(n,e,t,D)},O=function(D){var A;(A=n.onDayKeyUp)===null||A===void 0||A.call(n,e,t,D)},Y=function(D){var A;switch(D.key){case"ArrowLeft":D.preventDefault(),D.stopPropagation(),n.dir==="rtl"?c():l();break;case"ArrowRight":D.preventDefault(),D.stopPropagation(),n.dir==="rtl"?l():c();break;case"ArrowDown":D.preventDefault(),D.stopPropagation(),u();break;case"ArrowUp":D.preventDefault(),D.stopPropagation(),p();break;case"PageUp":D.preventDefault(),D.stopPropagation(),D.shiftKey?h():f();break;case"PageDown":D.preventDefault(),D.stopPropagation(),D.shiftKey?v():_();break;case"Home":D.preventDefault(),D.stopPropagation(),x();break;case"End":D.preventDefault(),D.stopPropagation(),y();break}(A=n.onDayKeyDown)===null||A===void 0||A.call(n,e,t,D)},F={onClick:b,onFocus:w,onBlur:C,onKeyDown:Y,onKeyUp:O,onMouseEnter:S,onMouseLeave:P,onPointerEnter:T,onPointerLeave:E,onTouchCancel:M,onTouchEnd:R,onTouchMove:N,onTouchStart:L};return F}function uC(){var e=ve(),t=Vf(),n=Ri(),r=Ii(),a=mo(e)?t.selected:oa(e)?n.selected:sa(e)?r.selected:void 0;return a}function dC(e){return Object.values(ut).includes(e)}function fC(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var a=e.modifiersClassNames[r];if(a)n.push(a);else if(dC(r)){var o=e.classNames["day_".concat(r)];o&&n.push(o)}}),n}function pC(e,t){var n=J({},e.styles.day);return Object.keys(t).forEach(function(r){var a;n=J(J({},n),(a=e.modifiersStyles)===null||a===void 0?void 0:a[r])}),n}function mC(e,t,n){var r,a,o,i=ve(),c=zi(),l=sC(e,t),u=lC(e,l),p=uC(),m=!!(i.onDayClick||i.mode!=="default");d.useEffect(function(){var S;l.outside||c.focusedDay&&m&&We(c.focusedDay,e)&&((S=n.current)===null||S===void 0||S.focus())},[c.focusedDay,e,n,m,l.outside]);var g=fC(i,l).join(" "),f=pC(i,l),_=!!(l.outside&&!i.showOutsideDays||l.hidden),h=(o=(a=i.components)===null||a===void 0?void 0:a.DayContent)!==null&&o!==void 0?o:I1,v=s.jsx(h,{date:e,displayMonth:t,activeModifiers:l}),x={style:f,className:g,children:v,role:"gridcell"},y=c.focusTarget&&We(c.focusTarget,e)&&!l.outside,b=c.focusedDay&&We(c.focusedDay,e),w=J(J(J({},x),(r={disabled:l.disabled,role:"gridcell"},r["aria-selected"]=l.selected,r.tabIndex=b||y?0:-1,r)),u),C={isButton:m,isHidden:_,activeModifiers:l,selectedDays:p,buttonProps:w,divProps:x};return C}function hC(e){var t=d.useRef(null),n=mC(e.date,e.displayMonth,t);return n.isHidden?s.jsx("div",{role:"gridcell"}):n.isButton?s.jsx(Ua,J({name:"day",ref:t},n.buttonProps)):s.jsx("div",J({},n.divProps))}function gC(e){var t=e.number,n=e.dates,r=ve(),a=r.onWeekNumberClick,o=r.styles,i=r.classNames,c=r.locale,l=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,p=u(Number(t),{locale:c});if(!a)return s.jsx("span",{className:i.weeknumber,style:o.weeknumber,children:p});var m=l(Number(t),{locale:c}),g=function(f){a(t,n,f)};return s.jsx(Ua,{name:"week-number","aria-label":m,className:i.weeknumber,style:o.weeknumber,onClick:g,children:p})}function vC(e){var t,n,r=ve(),a=r.styles,o=r.classNames,i=r.showWeekNumber,c=r.components,l=(t=c==null?void 0:c.Day)!==null&&t!==void 0?t:hC,u=(n=c==null?void 0:c.WeekNumber)!==null&&n!==void 0?n:gC,p;return i&&(p=s.jsx("td",{className:o.cell,style:a.cell,children:s.jsx(u,{number:e.weekNumber,dates:e.dates})})),s.jsxs("tr",{className:o.row,style:a.row,children:[p,e.dates.map(function(m){return s.jsx("td",{className:o.cell,style:a.cell,role:"presentation",children:s.jsx(l,{displayMonth:e.displayMonth,date:m})},G0(m))})]})}function il(e,t,n){for(var r=n!=null&&n.ISOWeek?Af(t):ji(t,n),a=n!=null&&n.ISOWeek?Pn(e):Ct(e,n),o=bt(r,a),i=[],c=0;c<=o;c++)i.push(De(a,c));var l=i.reduce(function(u,p){var m=n!=null&&n.ISOWeek?jf(p):Mf(p,n),g=u.find(function(f){return f.weekNumber===m});return g?(g.dates.push(p),u):(u.push({weekNumber:m,dates:[p]}),u)},[]);return l}function _C(e,t){var n=il(qe(e),Ai(e),t);if(t!=null&&t.useFixedWeeks){var r=K0(e,t);if(r<6){var a=n[n.length-1],o=a.dates[a.dates.length-1],i=Ws(o,6-r),c=il(Ws(o,1),i,t);n.push.apply(n,c)}}return n}function yC(e){var t,n,r,a=ve(),o=a.locale,i=a.classNames,c=a.styles,l=a.hideHead,u=a.fixedWeeks,p=a.components,m=a.weekStartsOn,g=a.firstWeekContainsDate,f=a.ISOWeek,_=_C(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:f,locale:o,weekStartsOn:m,firstWeekContainsDate:g}),h=(t=p==null?void 0:p.Head)!==null&&t!==void 0?t:D1,v=(n=p==null?void 0:p.Row)!==null&&n!==void 0?n:vC,x=(r=p==null?void 0:p.Footer)!==null&&r!==void 0?r:N1;return s.jsxs("table",{id:e.id,className:i.table,style:c.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&s.jsx(h,{}),s.jsx("tbody",{className:i.tbody,style:c.tbody,children:_.map(function(y){return s.jsx(v,{displayMonth:e.displayMonth,dates:y.dates,weekNumber:y.weekNumber},y.weekNumber)})}),s.jsx(x,{displayMonth:e.displayMonth})]})}function bC(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var xC=bC()?d.useLayoutEffect:d.useEffect,Ho=!1,wC=0;function cl(){return"react-day-picker-".concat(++wC)}function CC(e){var t,n=e??(Ho?cl():null),r=d.useState(n),a=r[0],o=r[1];return xC(function(){a===null&&o(cl())},[]),d.useEffect(function(){Ho===!1&&(Ho=!0)},[]),(t=e??a)!==null&&t!==void 0?t:void 0}function kC(e){var t,n,r=ve(),a=r.dir,o=r.classNames,i=r.styles,c=r.components,l=ia().displayMonths,u=CC(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),p=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,m=[o.month],g=i.month,f=e.displayIndex===0,_=e.displayIndex===l.length-1,h=!f&&!_;a==="rtl"&&(t=[f,_],_=t[0],f=t[1]),f&&(m.push(o.caption_start),g=J(J({},g),i.caption_start)),_&&(m.push(o.caption_end),g=J(J({},g),i.caption_end)),h&&(m.push(o.caption_between),g=J(J({},g),i.caption_between));var v=(n=c==null?void 0:c.Caption)!==null&&n!==void 0?n:j1;return s.jsxs("div",{className:m.join(" "),style:g,children:[s.jsx(v,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(yC,{id:p,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function TC(e){var t=ve(),n=t.classNames,r=t.styles;return s.jsx("div",{className:n.months,style:r.months,children:e.children})}function SC(e){var t,n,r=e.initialProps,a=ve(),o=zi(),i=ia(),c=d.useState(!1),l=c[0],u=c[1];d.useEffect(function(){a.initialFocus&&o.focusTarget&&(l||(o.focus(o.focusTarget),u(!0)))},[a.initialFocus,l,o.focus,o.focusTarget,o]);var p=[a.classNames.root,a.className];a.numberOfMonths>1&&p.push(a.classNames.multiple_months),a.showWeekNumber&&p.push(a.classNames.with_weeknumber);var m=J(J({},a.styles.root),a.style),g=Object.keys(r).filter(function(_){return _.startsWith("data-")}).reduce(function(_,h){var v;return J(J({},_),(v={},v[h]=r[h],v))},{}),f=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:TC;return s.jsx("div",J({className:p.join(" "),style:m,dir:a.dir,id:a.id,nonce:r.nonce,title:r.title,lang:r.lang},g,{children:s.jsx(f,{children:i.displayMonths.map(function(_,h){return s.jsx(kC,{displayIndex:h,displayMonth:_},h)})})}))}function PC(e){var t=e.children,n=X0(e,["children"]);return s.jsx(g1,{initialProps:n,children:s.jsx(S1,{children:s.jsx(iC,{initialProps:n,children:s.jsx(O1,{initialProps:n,children:s.jsx(F1,{initialProps:n,children:s.jsx(G1,{children:s.jsx(oC,{children:t})})})})})})})}function EC(e){return s.jsx(PC,J({},e,{children:s.jsx(SC,{initialProps:e})}))}function Uf({className:e,classNames:t,showOutsideDays:n=!0,...r}){return s.jsx(EC,{showOutsideDays:n,className:U("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4 w-full",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:U(Ts({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md flex-1 text-center font-normal text-[0.8rem] sm:flex-none sm:w-9",row:"flex w-full mt-2",cell:"relative flex-1 aspect-square text-center text-sm p-0 [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20 sm:flex-none sm:aspect-auto sm:h-9 sm:w-9",day:U(Ts({variant:"ghost"}),"h-full w-full p-0 font-normal aria-selected:opacity-100 sm:h-9 sm:w-9"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({...a})=>s.jsx(El,{className:"h-4 w-4"}),IconRight:({...a})=>s.jsx(Ka,{className:"h-4 w-4"})},...r})}Uf.displayName="Calendar";function Go(){const e=Je(),{pathname:t}=xe(),n=dt(t),{searchParams:r,setSearchParams:a}=ra(),o=Sn(r),c=n,l=d.useMemo(()=>{const m=$n(o.pickupDate)?void 0:o.pickupDate,g=$n(o.returnDate)?void 0:o.returnDate;if(!(!m&&!g))return{from:m,to:g}},[o.pickupDate,o.returnDate]),u=!!(l!=null&&l.from&&(l!=null&&l.to)&&l.from{a({...Sn(r),...m})};return s.jsx(po,{title:$("dates",c),back:{enabled:!0,onClick:()=>e(ke("/m/booking/location",n))},close:{enabled:!0,onClick:()=>{e(ke("/",n),{replace:!0})}},cta:{label:$("continue",c),enabled:u,onClick:()=>{!(l!=null&&l.from)||!(l!=null&&l.to)||e(ke("/m/booking/hours",n))}},ctaClassName:"btn-hero",children:s.jsx("div",{className:"w-full rounded-2xl border border-border bg-card",children:s.jsx(Uf,{mode:"range",selected:l,onSelect:m=>{!(m!=null&&m.from)&&!(m!=null&&m.to)||(m!=null&&m.from&&p({pickupDate:m.from}),m!=null&&m.to&&p({returnDate:m.to}))},numberOfMonths:2,locale:c==="en"?Si:x0,disabled:m=>m{a({...Sn(r),...g})};return s.jsx(po,{title:$("hours_title",c),back:{enabled:!0,onClick:()=>e(ke("/m/booking/dates",n))},close:{enabled:!0,onClick:()=>e(ke("/",n),{replace:!0})},cta:{label:$("continue",c),enabled:p,onClick:()=>e(ke("/m/booking/summary",n))},ctaClassName:"btn-hero",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold mb-3",children:$("wizard_pickup_time",c)}),s.jsx("div",{className:"grid grid-cols-3 gap-3",children:ll.map(g=>{const f=l===g;return s.jsx(Te,{variant:f?"default":"outline",className:U("h-12 rounded-xl",f?"btn-primary-gradient":""),onClick:()=>m({pickupTime:g}),children:g},`start-${g}`)})})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold mb-3",children:$("wizard_return_time",c)}),s.jsx("div",{className:"grid grid-cols-3 gap-3",children:ll.map(g=>{const f=u===g;return s.jsx(Te,{variant:f?"default":"outline",className:U("h-12 rounded-xl",f?"btn-primary-gradient":""),onClick:()=>m({returnTime:g}),children:g},`end-${g}`)})})]})]})})}var AC="Separator",ul="horizontal",jC=["horizontal","vertical"],Hf=d.forwardRef((e,t)=>{const{decorative:n,orientation:r=ul,...a}=e,o=NC(r)?r:ul,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return s.jsx(re.div,{"data-orientation":o,...c,...a,ref:t})});Hf.displayName=AC;function NC(e){return jC.includes(e)}var Gf=Hf;const Bs=d.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>s.jsx(Gf,{ref:a,decorative:n,orientation:t,className:U("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Bs.displayName=Gf.displayName;function Ko(){const e=Je(),{pathname:t}=xe(),n=dt(t),{isEnabled:r}=fd(),{searchParams:a,setSearchParams:o}=ra(),[i,c]=d.useState([]),[l,u]=d.useState([]),p=n,m=p,g=S=>H(S,p),f=Sn(a),_=d.useMemo(()=>f.city||"",[f.city]),h=r("enable_different_return_location")!==!1,v=d.useMemo(()=>f.pickupLocationId?!h||!f.returnLocationId?f.pickupLocationId:f.returnLocationId:null,[h,f.pickupLocationId,f.returnLocationId]),x=d.useMemo(()=>{var S;return v?((S=i.find(P=>P.id===v))==null?void 0:S.name)??_:_},[i,v,_]),y=d.useMemo(()=>f.pickupPointId?l.find(S=>S.id===f.pickupPointId)??null:null,[l,f.pickupPointId]),b=f.returnPickupPointName??null,w=!!f.pickupLocationId&&!!f.city&&!$n(f.pickupDate)&&!$n(f.returnDate)&&!!(f.pickupDate&&f.returnDate&&f.pickupDate{(async()=>{const{data:S}=await Ae.from("locations").select("id,name").eq("type","city").eq("is_active",!0).order("display_order",{ascending:!0});c((S||[]).map(P=>({id:P.id,name:g(P.name)})))})()},[]),d.useEffect(()=>{(async()=>{if(!f.pickupLocationId){u([]);return}const{data:S}=await Ae.from("pickup_points").select("id,name,type,fee,fee_enabled").eq("location_id",f.pickupLocationId);u((S||[]).map(P=>({id:P.id,name:g(P.name),type:P.type,fee:Number(P.fee||0),fee_enabled:!!P.fee_enabled})))})()},[f.pickupLocationId]);const C=()=>{if(!w)return;const S=r("enable_pickup_fees")!==!1,P=S&&(y!=null&&y.fee_enabled)&&(y==null?void 0:y.fee)||0,T=S&&f.returnPickupPointId?f.returnPickupFee??0:0,E=r("seasonal_pricing_enabled")!==!1,M=E?f.seasonCoefficient??1:1,R=E?f.seasonName??null:null,N={city:_,pickupDate:f.pickupDate,returnDate:f.returnDate,pickupTime:f.pickupTime,returnTime:f.returnTime,pickupLocation:(y==null?void 0:y.name)||_,returnCity:x,returnLocation:f.returnPickupPointName||x,pickupLocationId:f.pickupLocationId||void 0,returnLocationId:v||null,pickupPointId:f.pickupPointId||null,pickupPointName:(y==null?void 0:y.name)||null,pickupPointType:(y==null?void 0:y.type)||null,pickupFee:P,returnPickupPointId:f.returnPickupPointId||null,returnPickupPointName:f.returnPickupPointName||null,returnPickupPointType:f.returnPickupPointType||null,returnPickupFee:T,seasonCoefficient:M,seasonName:R};o(N),e(ke("/recherche",n))};return s.jsx(po,{title:$("summary",m),back:{enabled:!0,onClick:()=>e(ke("/m/booking/hours",n))},close:{enabled:!1},cta:{label:$("hero_cta_search_vehicles",m),enabled:w,onClick:C},ctaClassName:"btn-hero",children:s.jsx(bi,{className:"rounded-2xl",children:s.jsxs(gd,{className:"p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"text-sm font-semibold",children:$("location",m)}),s.jsx(Te,{variant:"ghost",size:"sm",onClick:()=>e(ke("/m/booking/location",n)),children:$("edit",m)})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("div",{className:"font-medium",children:_||"—"}),y!=null&&y.name?s.jsx("div",{className:"text-xs text-muted-foreground",children:y.name}):null,h&&x&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[$("return_prefix",m)," ",x]}),h&&b&&s.jsxs("div",{className:"text-xs text-muted-foreground",children:["  ↳ ",b]})]}),s.jsx(Bs,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"text-sm font-semibold",children:$("dates",m)}),s.jsx(Te,{variant:"ghost",size:"sm",onClick:()=>e(ke("/m/booking/dates",n)),children:$("edit",m)})]}),s.jsxs("div",{className:"text-sm",children:[$n(f.pickupDate)?"—":f.pickupDate.toLocaleDateString(m==="en"?"en-US":m==="es"?"es-ES":"fr-FR")," →"," ",$n(f.returnDate)?"—":f.returnDate.toLocaleDateString(m==="en"?"en-US":m==="es"?"es-ES":"fr-FR")]}),s.jsx(Bs,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"text-sm font-semibold",children:$("hours_title",m)}),s.jsx(Te,{variant:"ghost",size:"sm",onClick:()=>e(ke("/m/booking/hours",n)),children:$("edit",m)})]}),s.jsxs("div",{className:"text-sm",children:[f.pickupTime||"—"," → ",f.returnTime||"—"]})]})})})}const Yf=[{label:"ADMINISTRATION",items:[{to:"/dash",icon:Ys,label:"Dashboard",roles:["admin","superviseur"]},{to:"/dash/reservations",icon:Jr,label:"Réservations",roles:["admin","superviseur"]},{to:"/dash/clients",icon:Ks,label:"Clients",roles:["admin","superviseur"]},{to:"/dash/vehicules",icon:cr,label:"Véhicules",roles:["admin","superviseur"]},{to:"/dash/equipements",icon:Al,label:"Équipements",roles:["admin","superviseur"]},{to:"/dash/tarifs",icon:jl,label:"Tarifs & Options",roles:["admin","superviseur"]},{to:"/admin/whatsapp",icon:Xr,label:"WhatsApp",roles:["admin","superviseur","agent"]},{to:"/dash/logs",icon:Nl,label:"Logs & Actions",roles:["admin"]},{to:"/dash/users",icon:Ml,label:"Utilisateurs",roles:["admin"]}]},{label:null,items:[{to:"/dash/blog",icon:ts,label:"Blog",roles:["admin"]},{to:"/dash/flags",icon:Rl,label:"Feature Flags",roles:["admin"]},{to:"/dash/policies",icon:ts,label:"Politiques & Assurances",roles:["admin","superviseur"]},{to:"/dash/locations",icon:Qr,label:"Villes & Retraits",roles:["admin","superviseur"]},{to:"/dash/saisons",icon:Dl,label:"Saisons",roles:["admin"]}]}],At={to:"/dash/config",icon:Qs,label:"Configuration",roles:["admin"]},MC={"/dash":()=>B(()=>import("./AdminDashboard-B17twlKM.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),"/dash/reservations":()=>B(()=>import("./AdminReservations-Stc1Kww7.js"),__vite__mapDeps([11,1,2,3,12,4,5,6,13,14,7,15,16,17,18,19,20,21,22,23,9,10])),"/dash/clients":()=>B(()=>import("./AdminClients-CLLwrVkK.js"),__vite__mapDeps([24,1,2,8,3,12,4,5,6,7,16,14,17,15,19,21,9,10])),"/dash/vehicules":()=>B(()=>import("./AdminVehicles-DBN6ohPp.js"),__vite__mapDeps([25,1,2,3,12,4,5,6,7,16,14,17,15,21,18,19,26,8,27,20,9,10])),"/dash/equipements":()=>B(()=>import("./AdminEquipments-DKK_qQiF.js"),__vite__mapDeps([28,1,2,3,12,4,5,6,21,15,14,27,20,9,10])),"/dash/tarifs":()=>B(()=>import("./AdminPricing-Cs-MuPV9.js"),__vite__mapDeps([29,1,2,8,3,12,4,5,6,7,30,16,14,17,15,19,27,20,9,10])),"/admin/whatsapp":()=>B(()=>import("./WhatsAppDashboard-B69j_iOY.js"),__vite__mapDeps([31,1,2,30,7,6,32,20,9,10])),"/dash/logs":()=>B(()=>import("./AdminLogs-JO9Khur5.js"),__vite__mapDeps([33,1,2,34,3,12,4,5,6,7,15,14,9,10])),"/dash/users":()=>B(()=>import("./AdminUsers-DQXtZqoJ.js"),__vite__mapDeps([35,1,2,6,7,21,15,14,5,34,9,10])),"/dash/blog":()=>B(()=>import("./BlogAdmin-CqRjgm9G.js"),__vite__mapDeps([36,1,2,3,37,8,26,38,18,15,14,39,6,20,16,27,7,21,9,10])),"/dash/flags":()=>B(()=>import("./flags-CrUwu3YP.js"),__vite__mapDeps([40,1,2,34,41,42,6,7,43,9,10])),"/dash/policies":()=>B(()=>import("./Policies-CEZSO6U3.js"),__vite__mapDeps([44,1,2,8,41,6,7,42,43,16,14,9,10])),"/dash/locations":()=>B(()=>import("./Locations-BA3y9V4-.js"),__vite__mapDeps([45,1,2,8,38,6,7,42,32,16,14,41,27,20,9,10])),"/dash/saisons":()=>B(()=>import("./Seasons-Bmk7ZY7s.js"),__vite__mapDeps([46,1,2,34,6,42,15,14,41,27,20,9,10])),"/dash/config":()=>B(()=>import("./Config-ono1pudU.js"),__vite__mapDeps([47,1,2,34,6,42,26,48,43,15,14,20,7,27,16,9,10]))},dl=new Set,fl=e=>{const t=MC[e];!t||dl.has(e)||(dl.add(e),t())},RC=[...Yf.flatMap(e=>e.items),At].map(e=>({title:e.label,url:e.to,icon:e.icon,roles:e.roles}));function DC(){const[e,t]=d.useState(!1),n=xe(),r=Je(),{profile:a}=wr(),{data:o}=xr(),{toast:i}=Xa(),c=((a==null?void 0:a.role)||"").toString().toLowerCase(),l=f=>f==="/dash"?n.pathname==="/dash":n.pathname.startsWith(f),u=async()=>{try{await Ae.auth.signOut(),r(c==="superviseur"?"/login-superviseur":c==="agent"?"/login-agent":"/login-admin"),i({title:"Déconnexion réussie",description:"À bientôt !"})}catch{i({title:"Erreur",description:"Impossible de se déconnecter",variant:"destructive"})}};if(c==="agent")return s.jsxs("aside",{className:U("hidden md:flex h-screen bg-sidebar flex-col border-r border-sidebar-border sticky top-0","w-[260px]"),children:[s.jsx("div",{className:"h-16 flex items-center justify-between px-4 border-b border-sidebar-border",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("img",{src:(o==null?void 0:o.logo_url)||"/logo.png",alt:"Logo",className:"h-8 w-auto flex-shrink-0",onError:f=>{f.target.style.display="none"}}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"font-semibold text-sidebar-foreground text-sm",children:H(o==null?void 0:o.site_name,"fr")||"CarRental"}),s.jsx("span",{className:"text-[10px] text-sidebar-muted",children:"Espace Agent"})]})]})}),s.jsxs("nav",{className:"flex-1 p-4 space-y-2",children:[s.jsxs(Nt,{to:"/dash/reservations",onClick:()=>Zt.start(),className:U("w-full flex items-center gap-3 px-3 py-3 rounded-lg transition-all duration-200",l("/dash/reservations")?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-accent/50"),children:[s.jsx(Jr,{className:U("w-5 h-5 flex-shrink-0 transition-colors",l("/dash/reservations")&&"text-primary")}),s.jsx("span",{className:"text-sm font-medium",children:"Réservations"})]}),s.jsxs(Nt,{to:"/admin/whatsapp",onClick:()=>Zt.start(),className:U("w-full flex items-center gap-3 px-3 py-3 rounded-lg transition-all duration-200",l("/admin/whatsapp")?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-accent/50"),children:[s.jsx(Xr,{className:U("w-5 h-5 flex-shrink-0 transition-colors",l("/admin/whatsapp")&&"text-primary")}),s.jsx("span",{className:"text-sm font-medium",children:"WhatsApp"})]})]}),s.jsx("div",{className:"p-4 border-t border-sidebar-border",children:s.jsxs("button",{onClick:u,className:"w-full flex items-center gap-3 px-3 py-3 rounded-lg text-destructive hover:bg-destructive/10 transition-all duration-200",children:[s.jsx(Oa,{className:"w-5 h-5 flex-shrink-0"}),s.jsx("span",{className:"text-sm font-medium",children:"Déconnexion"})]})})]});const p=f=>f.roles?f.roles.includes(c):!0,m=Yf.map(f=>({...f,items:f.items.filter(p)})).filter(f=>f.items.length>0),g=p(At);return s.jsxs("aside",{className:U("hidden md:flex h-screen bg-sidebar flex-col border-r border-sidebar-border sticky top-0 transition-all duration-300 ease-in-out",e?"w-[72px]":"w-[260px]"),children:[s.jsxs("div",{className:"h-16 flex items-center justify-between px-4 border-b border-sidebar-border",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("img",{src:(o==null?void 0:o.logo_url)||"/logo.png",alt:"Logo",className:"h-8 w-auto flex-shrink-0",onError:f=>{f.target.style.display="none"}}),!e&&s.jsx("span",{className:"font-semibold text-sidebar-foreground whitespace-nowrap",children:H(o==null?void 0:o.site_name,"fr")||"CarRental"})]}),s.jsx("button",{onClick:()=>t(!e),className:"w-8 h-8 rounded-lg bg-sidebar-accent flex items-center justify-center text-sidebar-muted hover:text-sidebar-foreground transition-colors",children:e?s.jsx(Ka,{className:"w-4 h-4"}):s.jsx(El,{className:"w-4 h-4"})})]}),s.jsx("nav",{className:"flex-1 p-3 space-y-6 overflow-y-auto",children:m.map((f,_)=>f.items.length===0?null:s.jsxs("div",{children:[f.label&&!e&&s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-sidebar-muted font-medium mb-3 px-3",children:f.label}),s.jsx("div",{className:"space-y-1",children:f.items.map(h=>{const v=h.icon,x=l(h.to);return s.jsxs(Nt,{to:h.to,onClick:()=>Zt.start(),onMouseEnter:()=>fl(h.to),className:U("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg transition-all duration-200",x?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-accent/50",e&&"justify-center px-0"),title:e?h.label:void 0,children:[s.jsx(v,{className:U("w-5 h-5 flex-shrink-0 transition-colors",x&&"text-primary")}),!e&&s.jsx("span",{className:"text-sm font-medium whitespace-nowrap",children:h.label})]},h.to)})})]},_))}),g&&s.jsx("div",{className:"p-3 border-t border-sidebar-border",children:s.jsxs(Nt,{to:At.to,onClick:()=>Zt.start(),onMouseEnter:()=>fl(At.to),className:U("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg transition-all duration-200",l(At.to)?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-accent/50",e&&"justify-center px-0"),title:e?At.label:void 0,children:[s.jsx(At.icon,{className:U("w-5 h-5 flex-shrink-0 transition-colors",l(At.to)&&"text-primary")}),!e&&s.jsx("span",{className:"text-sm font-medium whitespace-nowrap",children:At.label})]})})]})}function IC(){const e=xe();d.useEffect(()=>{if(typeof window>"u")return;const t=`scroll_${e.pathname}`,n=window.sessionStorage.getItem(t);if(n){const r=Number.parseInt(n,10);Number.isNaN(r)||requestAnimationFrame(()=>window.scrollTo(0,r))}return()=>{typeof window>"u"||window.sessionStorage.setItem(t,window.scrollY.toString())}},[e.pathname])}const OC={admin:"Dashboard",customers:"Clients",reservations:"Réservations",vehicles:"Véhicules",locations:"Lieux",settings:"Paramètres",profile:"Profil"};function zC(){const t=xe().pathname.split("/").filter(Boolean),n=t[0]==="admin"?t.slice(1):t;return n.length===0?null:s.jsxs("nav",{className:"flex items-center space-x-2 text-sm text-muted-foreground mb-4",children:[s.jsxs(Qe,{to:"/admin",className:"hover:text-foreground transition-colors flex items-center gap-1",children:[s.jsx(Dm,{className:"h-4 w-4"}),s.jsx("span",{children:"Dashboard"})]}),n.map((r,a)=>{const o=`/admin/${n.slice(0,a+1).join("/")}`,i=a===n.length-1,c=OC[r]||r.charAt(0).toUpperCase()+r.slice(1);return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ka,{className:"h-4 w-4"}),i?s.jsx("span",{className:"font-medium text-foreground",children:c}):s.jsx(Qe,{to:o,className:"hover:text-foreground transition-colors",children:c})]},o)})]})}const LC=[{label:"Dashboard",icon:Ys,href:"/dash",roles:["admin","superviseur"]},{label:"Réservations",icon:Jr,href:"/dash/reservations",roles:["admin","superviseur"]},{label:"Véhicules",icon:cr,href:"/dash/vehicules",roles:["admin","superviseur"]},{label:"Clients",icon:Ks,href:"/dash/clients",roles:["admin","superviseur"]}];function FC({onMenuClick:e}){const t=xe(),n=Je(),{profile:r}=wr(),{toast:a}=Xa(),o=((r==null?void 0:r.role)||"").toString().toLowerCase(),i=p=>p==="/dash"?t.pathname==="/dash":t.pathname.startsWith(p),c=async()=>{try{await Ae.auth.signOut(),n(o==="superviseur"?"/login-superviseur":o==="agent"?"/login-agent":"/login-admin"),a({title:"Déconnexion réussie",description:"À bientôt !"})}catch{a({title:"Erreur",description:"Impossible de se déconnecter",variant:"destructive"})}};if(o==="agent")return s.jsx("nav",{className:"fixed bottom-0 left-0 right-0 z-50 md:hidden bg-card/90 backdrop-blur-xl border-t border-border/50",role:"navigation","aria-label":"Navigation agent mobile",children:s.jsxs("div",{className:"relative flex items-center justify-around h-16 px-1 safe-area-bottom",children:[s.jsx(Nt,{to:"/dash/reservations",className:"flex-1 flex flex-col items-center justify-center py-1 relative touch-target active:scale-95 transition-transform","aria-current":i("/dash/reservations")?"page":void 0,children:s.jsxs("div",{className:U("flex flex-col items-center gap-0.5 transition-colors duration-200 relative",i("/dash/reservations")?"text-primary":"text-muted-foreground"),children:[i("/dash/reservations")&&s.jsx("div",{className:"absolute -top-1 w-12 h-1 bg-primary rounded-full animate-in fade-in-0 slide-in-from-bottom-1 duration-200"}),s.jsx(Jr,{className:"w-5 h-5"}),s.jsx("span",{className:U("text-[10px] font-medium",i("/dash/reservations")?"font-semibold":"opacity-80"),children:"Réservations"})]})}),s.jsx(Nt,{to:"/admin/whatsapp",className:"flex-1 flex flex-col items-center justify-center py-1 relative touch-target active:scale-95 transition-transform","aria-current":i("/admin/whatsapp")?"page":void 0,children:s.jsxs("div",{className:U("flex flex-col items-center gap-0.5 transition-colors duration-200 relative",i("/admin/whatsapp")?"text-primary":"text-muted-foreground"),children:[i("/admin/whatsapp")&&s.jsx("div",{className:"absolute -top-1 w-12 h-1 bg-primary rounded-full animate-in fade-in-0 slide-in-from-bottom-1 duration-200"}),s.jsx(Xr,{className:"w-5 h-5"}),s.jsx("span",{className:U("text-[10px] font-medium",i("/admin/whatsapp")?"font-semibold":"opacity-80"),children:"WhatsApp"})]})}),s.jsx("button",{onClick:c,className:"flex-1 flex flex-col items-center justify-center py-1 touch-target active:scale-95 transition-transform","aria-label":"Se déconnecter",children:s.jsxs("div",{className:"flex flex-col items-center gap-0.5 text-destructive",children:[s.jsx(Oa,{className:"w-5 h-5"}),s.jsx("span",{className:"text-[10px] font-medium opacity-80",children:"Déconnexion"})]})})]})});const l=p=>p.roles?p.roles.includes(o):!0,u=LC.filter(l);return s.jsx("nav",{className:"fixed bottom-0 left-0 right-0 z-50 md:hidden bg-card/90 backdrop-blur-xl border-t border-border/50",role:"navigation","aria-label":"Navigation principale mobile",children:s.jsxs("div",{className:"relative flex items-center justify-around h-16 px-1 safe-area-bottom",children:[u.map(p=>{const m=p.icon,g=i(p.href);return s.jsx(Nt,{to:p.href,className:"flex-1 flex flex-col items-center justify-center py-1 relative touch-target active:scale-95 transition-transform","aria-current":g?"page":void 0,children:s.jsxs("div",{className:U("flex flex-col items-center gap-0.5 transition-colors duration-200 relative",g?"text-primary":"text-muted-foreground"),children:[g&&s.jsx("div",{className:"absolute -top-1 w-12 h-1 bg-primary rounded-full animate-in fade-in-0 slide-in-from-bottom-1 duration-200"}),s.jsx(m,{className:"w-5 h-5"}),s.jsx("span",{className:U("text-[10px] font-medium",g?"font-semibold":"opacity-80"),children:p.label})]})},p.href)}),s.jsx("button",{onClick:e,className:"flex-1 flex flex-col items-center justify-center py-1 touch-target active:scale-95 transition-transform","aria-label":"Ouvrir le menu","aria-haspopup":"true",children:s.jsxs("div",{className:"flex flex-col items-center gap-0.5 text-muted-foreground",children:[s.jsx(Gs,{className:"w-5 h-5"}),s.jsx("span",{className:"text-[10px] font-medium opacity-80",children:"Menu"})]})}),s.jsx("button",{onClick:c,className:"flex-1 flex flex-col items-center justify-center py-1 touch-target active:scale-95 transition-transform","aria-label":"Se déconnecter",children:s.jsxs("div",{className:"flex flex-col items-center gap-0.5 text-destructive",children:[s.jsx(Oa,{className:"w-5 h-5"}),s.jsx("span",{className:"text-[10px] font-medium opacity-80",children:"Déconnexion"})]})})]})})}const WC=[{label:"ADMINISTRATION",items:[{to:"/dash",icon:Ys,label:"Dashboard",roles:["admin","superviseur"]},{to:"/dash/reservations",icon:Jr,label:"Réservations",roles:["admin","superviseur"]},{to:"/dash/clients",icon:Ks,label:"Clients",roles:["admin","superviseur"]},{to:"/dash/vehicules",icon:cr,label:"Véhicules",roles:["admin","superviseur"]},{to:"/dash/equipements",icon:Al,label:"Équipements",roles:["admin","superviseur"]},{to:"/dash/tarifs",icon:jl,label:"Tarifs & Options",roles:["admin","superviseur"]},{to:"/admin/whatsapp",icon:Xr,label:"WhatsApp",roles:["admin","superviseur","agent"]},{to:"/dash/logs",icon:Nl,label:"Logs & Actions",roles:["admin"]},{to:"/dash/users",icon:Ml,label:"Utilisateurs",roles:["admin"]}]},{label:null,items:[{to:"/dash/flags",icon:Rl,label:"Feature Flags",roles:["admin"]},{to:"/dash/policies",icon:ts,label:"Politiques & Assurances",roles:["admin","superviseur"]},{to:"/dash/locations",icon:Qr,label:"Villes & Retraits",roles:["admin","superviseur"]},{to:"/dash/saisons",icon:Dl,label:"Saisons",roles:["admin"]}]}],qn={to:"/dash/config",icon:Qs,label:"Configuration",roles:["admin"]};function qC({isOpen:e,onClose:t}){const n=xe(),{data:r,isLoading:a}=xr(),{profile:o}=wr(),i=((o==null?void 0:o.role)||"").toString().toLowerCase();if(d.useEffect(()=>{t()},[n.pathname]),d.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),a)return null;const c=m=>m==="/dash"?n.pathname==="/dash":n.pathname.startsWith(m),l=m=>m.roles?m.roles.includes(i):!0,u=WC.map(m=>({...m,items:m.items.filter(l)})).filter(m=>m.items.length>0),p=l(qn);return e?s.jsxs(s.Fragment,{children:[s.jsx("div",{onClick:t,className:U("fixed inset-0 z-[90] bg-background/80 backdrop-blur-sm md:hidden transition-opacity duration-200",e?"opacity-100":"opacity-0 pointer-events-none"),"aria-hidden":"true"}),s.jsxs("div",{className:U("fixed inset-y-0 left-0 z-[95] w-[300px] max-w-[85vw] bg-sidebar flex flex-col border-r border-sidebar-border shadow-2xl md:hidden transition-transform duration-300 ease-out",e?"translate-x-0":"-translate-x-full"),role:"dialog","aria-modal":"true","aria-label":"Menu de navigation",children:[s.jsxs("div",{className:"h-16 flex items-center justify-between px-4 border-b border-sidebar-border flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("img",{src:(r==null?void 0:r.logo_url)||"/logo.png",alt:"Logo",className:"h-8 w-auto flex-shrink-0",onError:m=>{m.target.style.display="none"}}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"font-bold text-sidebar-foreground",children:H(r==null?void 0:r.site_name,"fr")||"CarRental"}),s.jsx("span",{className:"text-[10px] text-sidebar-muted",children:"Administration"})]})]}),s.jsx("button",{onClick:t,className:"w-10 h-10 rounded-xl bg-sidebar-accent flex items-center justify-center text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-accent/80 transition-colors touch-target active:scale-95","aria-label":"Fermer le menu",children:s.jsx(Ya,{className:"w-5 h-5"})})]}),s.jsx("nav",{className:"flex-1 overflow-y-auto scrollbar-hide py-4",children:u.map((m,g)=>m.items.length===0?null:s.jsxs("div",{className:U("px-3",g>0&&"mt-6"),children:[m.label&&s.jsx("p",{className:"text-[10px] uppercase tracking-wider text-sidebar-muted font-semibold mb-2 px-3",children:m.label}),s.jsx("div",{className:"space-y-1",children:m.items.map(f=>{const _=f.icon,h=c(f.to);return s.jsxs(Nt,{to:f.to,className:U("w-full flex items-center gap-3 px-3 py-3.5 rounded-xl transition-all duration-200 touch-target active:scale-95","text-sidebar-muted hover:text-sidebar-foreground",h&&"bg-sidebar-accent text-sidebar-foreground shadow-sm"),children:[s.jsx(_,{className:U("w-5 h-5 flex-shrink-0 transition-colors",h&&"text-primary")}),s.jsx("span",{className:"text-sm font-medium flex-1",children:f.label})]},f.to)})})]},g))}),p&&s.jsx("div",{className:"p-4 border-t border-sidebar-border flex-shrink-0 safe-area-bottom",children:s.jsxs(Nt,{to:qn.to,className:U("w-full flex items-center gap-3 px-3 py-3.5 rounded-xl transition-all duration-200 touch-target active:scale-95",c(qn.to)?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-accent/50"),children:[s.jsx(qn.icon,{className:U("w-5 h-5 flex-shrink-0 transition-colors",c(qn.to)&&"text-primary")}),s.jsx("span",{className:"text-sm font-medium",children:qn.label})]})})]})]}):null}var Kf={exports:{}},Qf={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var hr=d;function BC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $C=typeof Object.is=="function"?Object.is:BC,VC=hr.useState,UC=hr.useEffect,HC=hr.useLayoutEffect,GC=hr.useDebugValue;function YC(e,t){var n=t(),r=VC({inst:{value:n,getSnapshot:t}}),a=r[0].inst,o=r[1];return HC(function(){a.value=n,a.getSnapshot=t,Qo(a)&&o({inst:a})},[e,n,t]),UC(function(){return Qo(a)&&o({inst:a}),e(function(){Qo(a)&&o({inst:a})})},[e]),GC(n),n}function Qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!$C(e,n)}catch{return!0}}function KC(e,t){return t()}var QC=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?KC:YC;Qf.useSyncExternalStore=hr.useSyncExternalStore!==void 0?hr.useSyncExternalStore:QC;Kf.exports=Qf;var XC=Kf.exports;function JC(){return XC.useSyncExternalStore(ZC,()=>!0,()=>!1)}function ZC(){return()=>{}}var Fi="Avatar",[ek,KS]=Dt(Fi),[tk,Xf]=ek(Fi),Jf=d.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,o]=d.useState("idle");return s.jsx(tk,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:s.jsx(re.span,{...r,ref:t})})});Jf.displayName=Fi;var Zf="AvatarImage",ep=d.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...o}=e,i=Xf(Zf,n),c=nk(r,o),l=Ie(u=>{a(u),i.onImageLoadingStatusChange(u)});return Ce(()=>{c!=="idle"&&l(c)},[c,l]),c==="loaded"?s.jsx(re.img,{...o,ref:t,src:r}):null});ep.displayName=Zf;var tp="AvatarFallback",np=d.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,o=Xf(tp,n),[i,c]=d.useState(r===void 0);return d.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>c(!0),r);return()=>window.clearTimeout(l)}},[r]),i&&o.imageLoadingStatus!=="loaded"?s.jsx(re.span,{...a,ref:t}):null});np.displayName=tp;function pl(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function nk(e,{referrerPolicy:t,crossOrigin:n}){const r=JC(),a=d.useRef(null),o=r?(a.current||(a.current=new window.Image),a.current):null,[i,c]=d.useState(()=>pl(o,e));return Ce(()=>{c(pl(o,e))},[o,e]),Ce(()=>{const l=m=>()=>{c(m)};if(!o)return;const u=l("loaded"),p=l("error");return o.addEventListener("load",u),o.addEventListener("error",p),t&&(o.referrerPolicy=t),typeof n=="string"&&(o.crossOrigin=n),()=>{o.removeEventListener("load",u),o.removeEventListener("error",p)}},[o,n,t]),i}var rp=Jf,ap=ep,op=np;const sp=d.forwardRef(({className:e,...t},n)=>s.jsx(rp,{ref:n,className:U("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));sp.displayName=rp.displayName;const rk=d.forwardRef(({className:e,...t},n)=>s.jsx(ap,{ref:n,className:U("aspect-square h-full w-full",e),...t}));rk.displayName=ap.displayName;const ip=d.forwardRef(({className:e,...t},n)=>s.jsx(op,{ref:n,className:U("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ip.displayName=op.displayName;var Xo="rovingFocusGroup.onEntryFocus",ak={bubbles:!1,cancelable:!0},ca="RovingFocusGroup",[$s,cp,ok]=Za(ca),[sk,lp]=Dt(ca,[ok]),[ik,ck]=sk(ca),up=d.forwardRef((e,t)=>s.jsx($s.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx($s.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(lk,{...e,ref:t})})}));up.displayName=ca;var lk=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...m}=e,g=d.useRef(null),f=he(t,g),_=wi(o),[h,v]=zr({prop:i,defaultProp:c??null,onChange:l,caller:ca}),[x,y]=d.useState(!1),b=Ie(u),w=cp(n),C=d.useRef(!1),[S,P]=d.useState(0);return d.useEffect(()=>{const T=g.current;if(T)return T.addEventListener(Xo,b),()=>T.removeEventListener(Xo,b)},[b]),s.jsx(ik,{scope:n,orientation:r,dir:_,loop:a,currentTabStopId:h,onItemFocus:d.useCallback(T=>v(T),[v]),onItemShiftTab:d.useCallback(()=>y(!0),[]),onFocusableItemAdd:d.useCallback(()=>P(T=>T+1),[]),onFocusableItemRemove:d.useCallback(()=>P(T=>T-1),[]),children:s.jsx(re.div,{tabIndex:x||S===0?-1:0,"data-orientation":r,...m,ref:f,style:{outline:"none",...e.style},onMouseDown:q(e.onMouseDown,()=>{C.current=!0}),onFocus:q(e.onFocus,T=>{const E=!C.current;if(T.target===T.currentTarget&&E&&!x){const M=new CustomEvent(Xo,ak);if(T.currentTarget.dispatchEvent(M),!M.defaultPrevented){const R=w().filter(F=>F.focusable),N=R.find(F=>F.active),L=R.find(F=>F.id===h),Y=[N,L,...R].filter(Boolean).map(F=>F.ref.current);pp(Y,p)}}C.current=!1}),onBlur:q(e.onBlur,()=>y(!1))})})}),dp="RovingFocusGroupItem",fp=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:i,...c}=e,l=ur(),u=o||l,p=ck(dp,n),m=p.currentTabStopId===u,g=cp(n),{onFocusableItemAdd:f,onFocusableItemRemove:_,currentTabStopId:h}=p;return d.useEffect(()=>{if(r)return f(),()=>_()},[r,f,_]),s.jsx($s.ItemSlot,{scope:n,id:u,focusable:r,active:a,children:s.jsx(re.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:q(e.onMouseDown,v=>{r?p.onItemFocus(u):v.preventDefault()}),onFocus:q(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:q(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const x=fk(v,p.orientation,p.dir);if(x!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=g().filter(w=>w.focusable).map(w=>w.ref.current);if(x==="last")b.reverse();else if(x==="prev"||x==="next"){x==="prev"&&b.reverse();const w=b.indexOf(v.currentTarget);b=p.loop?pk(b,w+1):b.slice(w+1)}setTimeout(()=>pp(b))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:h!=null}):i})})});fp.displayName=dp;var uk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dk(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function fk(e,t,n){const r=dk(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return uk[r]}function pp(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function pk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mk=up,hk=fp,Vs=["Enter"," "],gk=["ArrowDown","PageUp","Home"],mp=["ArrowUp","PageDown","End"],vk=[...gk,...mp],_k={ltr:[...Vs,"ArrowRight"],rtl:[...Vs,"ArrowLeft"]},yk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},la="Menu",[Vr,bk,xk]=Za(la),[jn,hp]=Dt(la,[xk,br,lp]),ho=br(),gp=lp(),[wk,Nn]=jn(la),[Ck,ua]=jn(la),vp=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:i=!0}=e,c=ho(t),[l,u]=d.useState(null),p=d.useRef(!1),m=Ie(o),g=wi(a);return d.useEffect(()=>{const f=()=>{p.current=!0,document.addEventListener("pointerdown",_,{capture:!0,once:!0}),document.addEventListener("pointermove",_,{capture:!0,once:!0})},_=()=>p.current=!1;return document.addEventListener("keydown",f,{capture:!0}),()=>{document.removeEventListener("keydown",f,{capture:!0}),document.removeEventListener("pointerdown",_,{capture:!0}),document.removeEventListener("pointermove",_,{capture:!0})}},[]),s.jsx(qu,{...c,children:s.jsx(wk,{scope:t,open:n,onOpenChange:m,content:l,onContentChange:u,children:s.jsx(Ck,{scope:t,onClose:d.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:p,dir:g,modal:i,children:r})})})};vp.displayName=la;var kk="MenuAnchor",Wi=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=ho(n);return s.jsx(fi,{...a,...r,ref:t})});Wi.displayName=kk;var qi="MenuPortal",[Tk,_p]=jn(qi,{forceMount:void 0}),yp=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=Nn(qi,t);return s.jsx(Tk,{scope:t,forceMount:n,children:s.jsx(En,{present:n||o.open,children:s.jsx(eo,{asChild:!0,container:a,children:r})})})};yp.displayName=qi;var Xe="MenuContent",[Sk,Bi]=jn(Xe),bp=d.forwardRef((e,t)=>{const n=_p(Xe,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=Nn(Xe,e.__scopeMenu),i=ua(Xe,e.__scopeMenu);return s.jsx(Vr.Provider,{scope:e.__scopeMenu,children:s.jsx(En,{present:r||o.open,children:s.jsx(Vr.Slot,{scope:e.__scopeMenu,children:i.modal?s.jsx(Pk,{...a,ref:t}):s.jsx(Ek,{...a,ref:t})})})})}),Pk=d.forwardRef((e,t)=>{const n=Nn(Xe,e.__scopeMenu),r=d.useRef(null),a=he(t,r);return d.useEffect(()=>{const o=r.current;if(o)return Dd(o)},[]),s.jsx($i,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:q(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ek=d.forwardRef((e,t)=>{const n=Nn(Xe,e.__scopeMenu);return s.jsx($i,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ak=lr("MenuContent.ScrollLock"),$i=d.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:g,onDismiss:f,disableOutsideScroll:_,...h}=e,v=Nn(Xe,n),x=ua(Xe,n),y=ho(n),b=gp(n),w=bk(n),[C,S]=d.useState(null),P=d.useRef(null),T=he(t,P,v.onContentChange),E=d.useRef(0),M=d.useRef(""),R=d.useRef(0),N=d.useRef(null),L=d.useRef("right"),O=d.useRef(0),Y=_?ki:d.Fragment,F=_?{as:Ak,allowPinchZoom:!0}:void 0,D=j=>{var z,le;const W=M.current+j,G=w().filter(ue=>!ue.disabled),Q=document.activeElement,K=(z=G.find(ue=>ue.ref.current===Q))==null?void 0:z.textValue,te=G.map(ue=>ue.textValue),ge=qk(te,W,K),ye=(le=G.find(ue=>ue.textValue===ge))==null?void 0:le.ref.current;(function ue(se){M.current=se,window.clearTimeout(E.current),se!==""&&(E.current=window.setTimeout(()=>ue(""),1e3))})(W),ye&&setTimeout(()=>ye.focus())};d.useEffect(()=>()=>window.clearTimeout(E.current),[]),Nd();const A=d.useCallback(j=>{var G,Q;return L.current===((G=N.current)==null?void 0:G.side)&&$k(j,(Q=N.current)==null?void 0:Q.area)},[]);return s.jsx(Sk,{scope:n,searchRef:M,onItemEnter:d.useCallback(j=>{A(j)&&j.preventDefault()},[A]),onItemLeave:d.useCallback(j=>{var W;A(j)||((W=P.current)==null||W.focus(),S(null))},[A]),onTriggerLeave:d.useCallback(j=>{A(j)&&j.preventDefault()},[A]),pointerGraceTimerRef:R,onPointerGraceIntentChange:d.useCallback(j=>{N.current=j},[]),children:s.jsx(Y,{...F,children:s.jsx(Ci,{asChild:!0,trapped:a,onMountAutoFocus:q(o,j=>{var W;j.preventDefault(),(W=P.current)==null||W.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:s.jsx(Zr,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:g,onDismiss:f,children:s.jsx(mk,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:q(l,j=>{x.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(pi,{role:"menu","aria-orientation":"vertical","data-state":Op(v.open),"data-radix-menu-content":"",dir:x.dir,...y,...h,ref:T,style:{outline:"none",...h.style},onKeyDown:q(h.onKeyDown,j=>{const G=j.target.closest("[data-radix-menu-content]")===j.currentTarget,Q=j.ctrlKey||j.altKey||j.metaKey,K=j.key.length===1;G&&(j.key==="Tab"&&j.preventDefault(),!Q&&K&&D(j.key));const te=P.current;if(j.target!==te||!vk.includes(j.key))return;j.preventDefault();const ye=w().filter(z=>!z.disabled).map(z=>z.ref.current);mp.includes(j.key)&&ye.reverse(),Fk(ye)}),onBlur:q(e.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(E.current),M.current="")}),onPointerMove:q(e.onPointerMove,Ur(j=>{const W=j.target,G=O.current!==j.clientX;if(j.currentTarget.contains(W)&&G){const Q=j.clientX>O.current?"right":"left";L.current=Q,O.current=j.clientX}}))})})})})})})});bp.displayName=Xe;var jk="MenuGroup",Vi=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(re.div,{role:"group",...r,ref:t})});Vi.displayName=jk;var Nk="MenuLabel",xp=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(re.div,{...r,ref:t})});xp.displayName=Nk;var Ha="MenuItem",ml="menu.itemSelect",go=d.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,o=d.useRef(null),i=ua(Ha,e.__scopeMenu),c=Bi(Ha,e.__scopeMenu),l=he(t,o),u=d.useRef(!1),p=()=>{const m=o.current;if(!n&&m){const g=new CustomEvent(ml,{bubbles:!0,cancelable:!0});m.addEventListener(ml,f=>r==null?void 0:r(f),{once:!0}),Xs(m,g),g.defaultPrevented?u.current=!1:i.onClose()}};return s.jsx(wp,{...a,ref:l,disabled:n,onClick:q(e.onClick,p),onPointerDown:m=>{var g;(g=e.onPointerDown)==null||g.call(e,m),u.current=!0},onPointerUp:q(e.onPointerUp,m=>{var g;u.current||(g=m.currentTarget)==null||g.click()}),onKeyDown:q(e.onKeyDown,m=>{const g=c.searchRef.current!=="";n||g&&m.key===" "||Vs.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});go.displayName=Ha;var wp=d.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,i=Bi(Ha,n),c=gp(n),l=d.useRef(null),u=he(t,l),[p,m]=d.useState(!1),[g,f]=d.useState("");return d.useEffect(()=>{const _=l.current;_&&f((_.textContent??"").trim())},[o.children]),s.jsx(Vr.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:s.jsx(hk,{asChild:!0,...c,focusable:!r,children:s.jsx(re.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:q(e.onPointerMove,Ur(_=>{r?i.onItemLeave(_):(i.onItemEnter(_),_.defaultPrevented||_.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:q(e.onPointerLeave,Ur(_=>i.onItemLeave(_))),onFocus:q(e.onFocus,()=>m(!0)),onBlur:q(e.onBlur,()=>m(!1))})})})}),Mk="MenuCheckboxItem",Cp=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return s.jsx(Ep,{scope:e.__scopeMenu,checked:n,children:s.jsx(go,{role:"menuitemcheckbox","aria-checked":Ga(n)?"mixed":n,...a,ref:t,"data-state":Hi(n),onSelect:q(a.onSelect,()=>r==null?void 0:r(Ga(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Cp.displayName=Mk;var kp="MenuRadioGroup",[Rk,Dk]=jn(kp,{value:void 0,onValueChange:()=>{}}),Tp=d.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,o=Ie(r);return s.jsx(Rk,{scope:e.__scopeMenu,value:n,onValueChange:o,children:s.jsx(Vi,{...a,ref:t})})});Tp.displayName=kp;var Sp="MenuRadioItem",Pp=d.forwardRef((e,t)=>{const{value:n,...r}=e,a=Dk(Sp,e.__scopeMenu),o=n===a.value;return s.jsx(Ep,{scope:e.__scopeMenu,checked:o,children:s.jsx(go,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Hi(o),onSelect:q(r.onSelect,()=>{var i;return(i=a.onValueChange)==null?void 0:i.call(a,n)},{checkForDefaultPrevented:!1})})})});Pp.displayName=Sp;var Ui="MenuItemIndicator",[Ep,Ik]=jn(Ui,{checked:!1}),Ap=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,o=Ik(Ui,n);return s.jsx(En,{present:r||Ga(o.checked)||o.checked===!0,children:s.jsx(re.span,{...a,ref:t,"data-state":Hi(o.checked)})})});Ap.displayName=Ui;var Ok="MenuSeparator",jp=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(re.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});jp.displayName=Ok;var zk="MenuArrow",Np=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=ho(n);return s.jsx(mi,{...a,...r,ref:t})});Np.displayName=zk;var Lk="MenuSub",[QS,Mp]=jn(Lk),Ir="MenuSubTrigger",Rp=d.forwardRef((e,t)=>{const n=Nn(Ir,e.__scopeMenu),r=ua(Ir,e.__scopeMenu),a=Mp(Ir,e.__scopeMenu),o=Bi(Ir,e.__scopeMenu),i=d.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},p=d.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return d.useEffect(()=>p,[p]),d.useEffect(()=>{const m=c.current;return()=>{window.clearTimeout(m),l(null)}},[c,l]),s.jsx(Wi,{asChild:!0,...u,children:s.jsx(wp,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Op(n.open),...e,ref:Ja(t,a.onTriggerChange),onClick:m=>{var g;(g=e.onClick)==null||g.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:q(e.onPointerMove,Ur(m=>{o.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:q(e.onPointerLeave,Ur(m=>{var f,_;p();const g=(f=n.content)==null?void 0:f.getBoundingClientRect();if(g){const h=(_=n.content)==null?void 0:_.dataset.side,v=h==="right",x=v?-5:5,y=g[v?"left":"right"],b=g[v?"right":"left"];o.onPointerGraceIntentChange({area:[{x:m.clientX+x,y:m.clientY},{x:y,y:g.top},{x:b,y:g.top},{x:b,y:g.bottom},{x:y,y:g.bottom}],side:h}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(m),m.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:q(e.onKeyDown,m=>{var f;const g=o.searchRef.current!=="";e.disabled||g&&m.key===" "||_k[r.dir].includes(m.key)&&(n.onOpenChange(!0),(f=n.content)==null||f.focus(),m.preventDefault())})})})});Rp.displayName=Ir;var Dp="MenuSubContent",Ip=d.forwardRef((e,t)=>{const n=_p(Xe,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=Nn(Xe,e.__scopeMenu),i=ua(Xe,e.__scopeMenu),c=Mp(Dp,e.__scopeMenu),l=d.useRef(null),u=he(t,l);return s.jsx(Vr.Provider,{scope:e.__scopeMenu,children:s.jsx(En,{present:r||o.open,children:s.jsx(Vr.Slot,{scope:e.__scopeMenu,children:s.jsx($i,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var m;i.isUsingKeyboardRef.current&&((m=l.current)==null||m.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:q(e.onFocusOutside,p=>{p.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:q(e.onEscapeKeyDown,p=>{i.onClose(),p.preventDefault()}),onKeyDown:q(e.onKeyDown,p=>{var f;const m=p.currentTarget.contains(p.target),g=yk[i.dir].includes(p.key);m&&g&&(o.onOpenChange(!1),(f=c.trigger)==null||f.focus(),p.preventDefault())})})})})})});Ip.displayName=Dp;function Op(e){return e?"open":"closed"}function Ga(e){return e==="indeterminate"}function Hi(e){return Ga(e)?"indeterminate":e?"checked":"unchecked"}function Fk(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Wk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function qk(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=Wk(e,Math.max(o,0));a.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return l!==n?l:void 0}function Bk(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;or!=g>r&&n<(m-u)*(r-p)/(g-p)+u&&(a=!a)}return a}function $k(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Bk(n,t)}function Ur(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Vk=vp,Uk=Wi,Hk=yp,Gk=bp,Yk=Vi,Kk=xp,Qk=go,Xk=Cp,Jk=Tp,Zk=Pp,eT=Ap,tT=jp,nT=Np,rT=Rp,aT=Ip,vo="DropdownMenu",[oT,XS]=Dt(vo,[hp]),Oe=hp(),[sT,zp]=oT(vo),Lp=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:o,onOpenChange:i,modal:c=!0}=e,l=Oe(t),u=d.useRef(null),[p,m]=zr({prop:a,defaultProp:o??!1,onChange:i,caller:vo});return s.jsx(sT,{scope:t,triggerId:ur(),triggerRef:u,contentId:ur(),open:p,onOpenChange:m,onOpenToggle:d.useCallback(()=>m(g=>!g),[m]),modal:c,children:s.jsx(Vk,{...l,open:p,onOpenChange:m,dir:r,modal:c,children:n})})};Lp.displayName=vo;var Fp="DropdownMenuTrigger",Wp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=zp(Fp,n),i=Oe(n);return s.jsx(Uk,{asChild:!0,...i,children:s.jsx(re.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Ja(t,o.triggerRef),onPointerDown:q(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:q(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Wp.displayName=Fp;var iT="DropdownMenuPortal",qp=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Oe(t);return s.jsx(Hk,{...r,...n})};qp.displayName=iT;var Bp="DropdownMenuContent",$p=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zp(Bp,n),o=Oe(n),i=d.useRef(!1);return s.jsx(Gk,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:q(e.onCloseAutoFocus,c=>{var l;i.current||(l=a.triggerRef.current)==null||l.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:q(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,p=l.button===2||u;(!a.modal||p)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$p.displayName=Bp;var cT="DropdownMenuGroup",lT=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Oe(n);return s.jsx(Yk,{...a,...r,ref:t})});lT.displayName=cT;var uT="DropdownMenuLabel",Vp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Oe(n);return s.jsx(Kk,{...a,...r,ref:t})});Vp.displayName=uT;var dT="DropdownMenuItem",Up=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Oe(n);return s.jsx(Qk,{...a,...r,ref:t})});Up.displayName=dT;var fT="DropdownMenuCheckboxItem",Hp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Oe(n);return s.jsx(Xk,{...a,...r,ref:t})});Hp.displayName=fT;var pT="DropdownMenuRadioGroup",mT=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Oe(n);return s.jsx(Jk,{...a,...r,ref:t})});mT.displayName=pT;var hT="DropdownMenuRadioItem",Gp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Oe(n);return s.jsx(Zk,{...a,...r,ref:t})});Gp.displayName=hT;var gT="DropdownMenuItemIndicator",Yp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Oe(n);return s.jsx(eT,{...a,...r,ref:t})});Yp.displayName=gT;var vT="DropdownMenuSeparator",Kp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Oe(n);return s.jsx(tT,{...a,...r,ref:t})});Kp.displayName=vT;var _T="DropdownMenuArrow",yT=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Oe(n);return s.jsx(nT,{...a,...r,ref:t})});yT.displayName=_T;var bT="DropdownMenuSubTrigger",Qp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Oe(n);return s.jsx(rT,{...a,...r,ref:t})});Qp.displayName=bT;var xT="DropdownMenuSubContent",Xp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Oe(n);return s.jsx(aT,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Xp.displayName=xT;var wT=Lp,CT=Wp,kT=qp,Jp=$p,Zp=Vp,em=Up,tm=Hp,nm=Gp,rm=Yp,am=Kp,om=Qp,sm=Xp;const TT=wT,ST=CT,PT=d.forwardRef(({className:e,inset:t,children:n,...r},a)=>s.jsxs(om,{ref:a,className:U("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,s.jsx(Ka,{className:"ml-auto h-4 w-4"})]}));PT.displayName=om.displayName;const ET=d.forwardRef(({className:e,...t},n)=>s.jsx(sm,{ref:n,className:U("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));ET.displayName=sm.displayName;const im=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(kT,{children:s.jsx(Jp,{ref:r,sideOffset:t,className:U("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));im.displayName=Jp.displayName;const Us=d.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(em,{ref:r,className:U("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Us.displayName=em.displayName;const AT=d.forwardRef(({className:e,children:t,checked:n,...r},a)=>s.jsxs(tm,{ref:a,className:U("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(rm,{children:s.jsx(Pl,{className:"h-4 w-4"})})}),t]}));AT.displayName=tm.displayName;const jT=d.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(nm,{ref:r,className:U("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(rm,{children:s.jsx(Im,{className:"h-2 w-2 fill-current"})})}),t]}));jT.displayName=nm.displayName;const cm=d.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(Zp,{ref:r,className:U("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));cm.displayName=Zp.displayName;const Hs=d.forwardRef(({className:e,...t},n)=>s.jsx(am,{ref:n,className:U("-mx-1 my-1 h-px bg-muted",e),...t}));Hs.displayName=am.displayName;function NT({title:e,onMenuClick:t}){const{profile:n}=wr(),r=Je(),{toast:a}=Xa(),o=((n==null?void 0:n.role)||"").toString().toLowerCase(),i=()=>{if(!n)return"??";const p=(n.first_name||"").charAt(0).toUpperCase(),m=(n.last_name||"").charAt(0).toUpperCase();return p+m||"??"},c=async()=>{try{const p=((n==null?void 0:n.role)||"").toString().toLowerCase();await Ae.auth.signOut(),r(p==="superviseur"?"/login-superviseur":p==="agent"?"/login-agent":"/login-admin"),a({title:"Déconnexion réussie",description:"À bientôt !"})}catch{a({title:"Erreur",description:"Impossible de se déconnecter",variant:"destructive"})}},l=()=>{a({title:"Recherche",description:"Fonctionnalité en développement"})},u=()=>{a({title:"Notifications",description:"Aucune notification pour le moment"})};return s.jsx("header",{className:"sticky top-0 z-40 w-full bg-card/95 backdrop-blur-lg border-b border-border md:hidden",children:s.jsxs("div",{className:"flex items-center justify-between h-14 px-4",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[o!=="agent"&&s.jsx(Te,{variant:"ghost",size:"icon",onClick:t,className:"touch-target flex-shrink-0","aria-label":"Ouvrir le menu",children:s.jsx(Gs,{className:"h-5 w-5"})}),s.jsx("h1",{className:"font-semibold text-base truncate",children:e})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Te,{variant:"ghost",size:"icon",className:"touch-target active:scale-95 transition-transform","aria-label":"Rechercher",onClick:l,children:s.jsx(Om,{className:"h-5 w-5"})}),s.jsxs(Te,{variant:"ghost",size:"icon",className:"touch-target relative active:scale-95 transition-transform","aria-label":"Notifications",onClick:u,children:[s.jsx(zm,{className:"h-5 w-5"}),s.jsx("span",{className:"absolute top-1.5 right-1.5 w-2 h-2 bg-destructive rounded-full animate-pulse"})]}),s.jsxs(TT,{children:[s.jsx(ST,{asChild:!0,children:s.jsx(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full active:scale-95 transition-transform","aria-label":"Menu utilisateur",children:s.jsx(sp,{className:"h-8 w-8",children:s.jsx(ip,{className:"bg-primary/10 text-primary text-xs font-semibold",children:i()})})})}),s.jsxs(im,{align:"end",className:"w-56 animate-in fade-in-0 slide-in-from-top-2 duration-200",children:[s.jsx(cm,{children:s.jsxs("div",{className:"flex flex-col space-y-1",children:[s.jsxs("p",{className:"text-sm font-medium leading-none",children:[n==null?void 0:n.first_name," ",n==null?void 0:n.last_name]}),s.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:n==null?void 0:n.email})]})}),s.jsx(Hs,{}),s.jsxs(Us,{onClick:()=>r("/dash/config"),className:"cursor-pointer",children:[s.jsx(Qs,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Configuration"})]}),s.jsx(Hs,{}),s.jsxs(Us,{onClick:c,className:"cursor-pointer text-destructive focus:text-destructive",children:[s.jsx(Oa,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Déconnexion"})]})]})]})]})]})})}function MT({children:e}){const t=xe(),n=Je(),r=Ed(),{profile:a}=wr(),o=((a==null?void 0:a.role)||"").toString().toLowerCase(),[i,c]=d.useState(!1),l=["/dash","/dash/reservations","/dash/clients","/dash/vehicules"],u=d.useMemo(()=>l.filter(f=>{const _=RC.find(v=>v.url===f);return _?(_.roles||["admin","superviseur"]).includes(o):!1}),[o]),p=d.useRef(null),m=d.useRef(null);d.useEffect(()=>{if(!r||t.pathname==="/dash/reservations")return;const f=h=>{const v=h.touches[0];p.current=v.clientX,m.current=v.clientY},_=h=>{const v=p.current,x=m.current;if(v===null||x===null)return;const y=h.changedTouches[0],b=y.clientX-v,w=y.clientY-x;if(p.current=null,m.current=null,Math.abs(b)<60||Math.abs(b){window.removeEventListener("touchstart",f),window.removeEventListener("touchend",_)}},[r,t.pathname,n,u]);const g=()=>{const f=t.pathname;return f==="/dash"?"Dashboard":f.includes("reservations")?"Réservations":f.includes("clients")?"Clients":f.includes("vehicules")?"Véhicules":f.includes("equipements")?"Équipements":f.includes("tarifs")?"Tarifs":f.includes("logs")?"Logs":f.includes("users")?"Utilisateurs":f.includes("flags")?"Feature Flags":f.includes("policies")?"Politiques":f.includes("locations")?"Villes & Retraits":f.includes("saisons")?"Saisons":f.includes("config")?"Configuration":f.includes("whatsapp")?"WhatsApp":"Dashboard"};return s.jsxs("div",{className:"admin-theme min-h-screen flex w-full bg-background text-foreground",children:[s.jsx(DC,{}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r&&s.jsx(NT,{title:g(),onMenuClick:()=>c(!0)}),s.jsxs("main",{className:"flex-1 pb-16 md:pb-0 p-6",children:[!r&&s.jsx(zC,{}),s.jsx("div",{className:"flex-1",children:e??s.jsx(zl,{})})]})]}),r&&s.jsxs(s.Fragment,{children:[s.jsx(FC,{onMenuClick:()=>c(!0)}),s.jsx(qC,{isOpen:i,onClose:()=>c(!1)})]})]})}function Pe({children:e}){return IC(),s.jsx(MT,{children:e})}const RT=d.lazy(()=>B(()=>import("./Home-U4aC_KKz.js").then(e=>e.H),__vite__mapDeps([49,1,2,9,18,48,37,50,51]))),DT=d.lazy(()=>B(()=>import("./Search-BizUPdR9.js"),__vite__mapDeps([52,1,2,7,43,53,54,18,15,14,13,9,10]))),IT=d.lazy(()=>B(()=>import("./Extras-B9I71Qpl.js"),__vite__mapDeps([55,1,2,7,54,56,9,53,10]))),OT=d.lazy(()=>B(()=>import("./Payment-Da8uBGCg.js"),__vite__mapDeps([57,1,2,6,7,21,54,56,9,53,10]))),zT=d.lazy(()=>B(()=>import("./Confirmation-DC80u5Jx.js"),__vite__mapDeps([58,1,2,7,54,56,9,22,53,10]))),LT=d.lazy(()=>B(()=>import("./NotFound-ClgH_5qK.js"),__vite__mapDeps([59,1,2,9,10]))),FT=d.lazy(()=>B(()=>import("./MyReservations-DYco5d49.js"),__vite__mapDeps([60,1,2,6,9,10]))),WT=d.lazy(()=>B(()=>import("./MyReservationDetail-BocDftoM.js"),__vite__mapDeps([61,1,2,7,53,9,10])));d.lazy(()=>B(()=>import("./StaticPage-Csg_IvQ_.js"),__vite__mapDeps([62,1,2,9,10])));const qT=d.lazy(()=>B(()=>import("./FAQ-C3LZ59AW.js"),__vite__mapDeps([63,1,2,43,6,64,51,9,10]))),BT=d.lazy(()=>B(()=>import("./AboutPage-DlmTeDMS.js"),__vite__mapDeps([65,1,2,64,51,50,66,9,10]))),$T=d.lazy(()=>B(()=>import("./ConditionsPage-BUZFNIWc.js"),__vite__mapDeps([67,1,2,64,51,66,9,10]))),VT=d.lazy(()=>B(()=>import("./PrivacyPage-Bxdj33En.js"),__vite__mapDeps([68,1,2,64,51,66,9,10]))),UT=d.lazy(()=>B(()=>import("./ContactPage-BgAkCu65.js"),__vite__mapDeps([69,1,2,43,64,51,50,70,9,10]))),HT=d.lazy(()=>B(()=>import("./LoginAdmin-DRu1k9uP.js"),__vite__mapDeps([71,1,2,6,72,9,10]))),GT=d.lazy(()=>B(()=>import("./LoginSuperviseur-CL2WG4kK.js"),__vite__mapDeps([73,1,2,72,6,9,10]))),YT=d.lazy(()=>B(()=>import("./LoginAgent-Cq3OH--F.js"),__vite__mapDeps([74,1,2,6,72,9,10]))),KT=d.lazy(()=>B(()=>import("./Unauthorized-BTr2SQ9N.js"),__vite__mapDeps([75,1,2,9,10]))),QT=d.lazy(()=>B(()=>import("./Taghazout-DI9sjuhV.js"),__vite__mapDeps([76,1,2,77,78,9,10,79]))),XT=d.lazy(()=>B(()=>import("./Essaouira-FtwwkITg.js"),__vite__mapDeps([80,1,2,77,81,9,10]))),JT=d.lazy(()=>B(()=>import("./Agadir-4xcO2_JM.js"),__vite__mapDeps([82,1,2,77,81,9,10]))),ZT=d.lazy(()=>B(()=>import("./AeroportAgadir-DTe6bDas.js"),__vite__mapDeps([83,1,2,77,81,9,10]))),eS=d.lazy(()=>B(()=>import("./Marrakech-CEBu98Of.js"),__vite__mapDeps([84,1,2,77,81,9,10]))),tS=d.lazy(()=>B(()=>import("./Tiznit-C_BG0T1d.js"),__vite__mapDeps([85,1,2,77,81,9,10]))),nS=d.lazy(()=>B(()=>import("./Ouarzazate-BEz9qhvA.js"),__vite__mapDeps([86,1,2,77,81,9,10]))),rS=d.lazy(()=>B(()=>import("./Tafraout-CNVw0EsB.js"),__vite__mapDeps([87,1,2,77,81,9,10]))),aS=d.lazy(()=>B(()=>import("./Mirleft-CG1o8X_r.js"),__vite__mapDeps([88,1,2,77,81,9,10]))),oS=d.lazy(()=>B(()=>import("./Dakhla-DZJjq7Nd.js"),__vite__mapDeps([89,1,2,77,81,9,10]))),sS=d.lazy(()=>B(()=>import("./VehiclesList-jGjzr0iW.js"),__vite__mapDeps([90,1,2,9,10]))),iS=d.lazy(()=>B(()=>import("./VehicleDetail-Cop2ZVm7.js"),__vite__mapDeps([91,1,2,9,10]))),cS=d.lazy(()=>B(()=>import("./AdminDashboard-B17twlKM.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),Jo=d.lazy(()=>B(()=>import("./ReservationsMobile-CIWiqLWa.js"),__vite__mapDeps([92,1,2,6,23,21,22,93,13,14,16,15,9,10]))),lS=d.lazy(()=>B(()=>import("./Clients-C2A75pyF.js"),__vite__mapDeps([94,1,2,93,21,17,15,14,6,7,16,5,13,8,12,9,10]))),uS=d.lazy(()=>B(()=>import("./AdminVehicles-DBN6ohPp.js"),__vite__mapDeps([25,1,2,3,12,4,5,6,7,16,14,17,15,21,18,19,26,8,27,20,9,10]))),dS=d.lazy(()=>B(()=>import("./AdminEquipments-DKK_qQiF.js"),__vite__mapDeps([28,1,2,3,12,4,5,6,21,15,14,27,20,9,10]))),fS=d.lazy(()=>B(()=>import("./AdminPricing-Cs-MuPV9.js"),__vite__mapDeps([29,1,2,8,3,12,4,5,6,7,30,16,14,17,15,19,27,20,9,10]))),pS=d.lazy(()=>B(()=>import("./AdminLogs-JO9Khur5.js"),__vite__mapDeps([33,1,2,34,3,12,4,5,6,7,15,14,9,10]))),mS=d.lazy(()=>B(()=>import("./Policies-CEZSO6U3.js"),__vite__mapDeps([44,1,2,8,41,6,7,42,43,16,14,9,10]))),hS=d.lazy(()=>B(()=>import("./Locations-BA3y9V4-.js"),__vite__mapDeps([45,1,2,8,38,6,7,42,32,16,14,41,27,20,9,10]))),gS=d.lazy(()=>B(()=>import("./Seasons-Bmk7ZY7s.js"),__vite__mapDeps([46,1,2,34,6,42,15,14,41,27,20,9,10]))),vS=d.lazy(()=>B(()=>import("./Config-ono1pudU.js"),__vite__mapDeps([47,1,2,34,6,42,26,48,43,15,14,20,7,27,16,9,10]))),_S=d.lazy(()=>B(()=>import("./Blog-oYhMgx2p.js"),__vite__mapDeps([95,1,2,37,9,10]))),yS=d.lazy(()=>B(()=>import("./BlogPost-g-0bOiYA.js"),__vite__mapDeps([96,1,2,37,39,9,10]))),bS=d.lazy(()=>B(()=>import("./PharmacieGardeAgadir-C36BqxPF.js"),__vite__mapDeps([97,1,2,9,10]))),xS=d.lazy(()=>B(()=>import("./CalculateurRoadTrip-DTLl3djJ.js"),__vite__mapDeps([98,1,2,9,10]))),wS=d.lazy(()=>B(()=>import("./BlogAdmin-CqRjgm9G.js"),__vite__mapDeps([36,1,2,3,37,8,26,38,18,15,14,39,6,20,16,27,7,21,9,10]))),CS=d.lazy(()=>B(()=>import("./flags-CrUwu3YP.js"),__vite__mapDeps([40,1,2,34,41,42,6,7,43,9,10]))),kS=d.lazy(()=>B(()=>import("./AdminUsers-DQXtZqoJ.js"),__vite__mapDeps([35,1,2,6,7,21,15,14,5,34,9,10]))),hl=d.lazy(()=>B(()=>import("./WhatsAppDashboard-B69j_iOY.js"),__vite__mapDeps([31,1,2,30,7,6,32,20,9,10])));d.lazy(()=>B(()=>import("./DashRedirect-Cl62_AB_.js"),__vite__mapDeps([99,1,2,9,10])));const TS=d.lazy(()=>B(()=>import("./PinnedFAQSection-DFuNmw9l.js"),__vite__mapDeps([100,1,2,43,50,51,70,9,10])).then(e=>({default:e.PinnedFAQSection}))),SS=new ny,Da=()=>s.jsx("div",{className:"flex h-[50vh] w-full items-center justify-center",children:s.jsx(Fm,{className:"h-10 w-10 animate-spin text-primary"})});function PS({lang:e}){const t=xe(),n=e==="en"?"en":e==="es"?"es":"fr",r=t.pathname||"/",a=pr(r),{data:o}=xr({defer:a==="/"}),c=["agadir","taghazout","essaouira","marrakech","tiznit","ouarzazate","tafraout","mirleft","dakhla","aeroport-agadir"].includes(a.slice(1))?a.slice(1):"",{data:l}=Eb(c,{enabled:!!c}),u=r==="/admin"||r.startsWith("/admin/")||r==="/superviseur"||r.startsWith("/superviseur/")||r==="/agent"||r.startsWith("/agent/"),p=W=>{const G=(W||"").trim();return!G||/^https?:\/\//i.test(G)||G.startsWith("data:")||typeof window>"u"?G:new URL(G,window.location.origin).toString()},m=typeof window<"u"?window.location.origin:"",g=$("seo_description_default",n),f="/hero-car.webp";(H(o==null?void 0:o.site_name,e)||"").trim();const _=(H(o==null?void 0:o.contact_email,e)||"").trim(),h=(H(o==null?void 0:o.contact_phone,e)||"").trim(),v=(H(o==null?void 0:o.contact_address,e)||"").trim(),x="GadiWaze",y=(()=>{const W=((o==null?void 0:o.og_image_url)||"").trim();return p(W||f)})(),b=typeof window<"u"?window.location.href:"",w=a!=="/"?null:Nb("https://jwnbjkmwvydltaihrsdi.supabase.co/storage/v1/object/public/uploads-global/banners/home.webp",{width:900,height:1600,quality:70,resize:"cover"}),C=(()=>{if(u)return{title:$("seo_title_default",n),description:g};const W={"/":{title:H(o==null?void 0:o.og_title_i18n,n)||(n==="en"?"Cheap Car Rental Agadir | Taghazout, Imsouane, Airport":n==="es"?"Alquiler coche Agadir barato | Taghazout, Imsouane, Aeropuerto":"Location voiture Agadir pas cher | Taghazout, Imsouane, Aéroport"),description:H(o==null?void 0:o.og_description_i18n,n)||(n==="en"?"Car rental in Agadir, Al Massira Airport, Taghazout, and Imsouane. No deposit, hotel delivery, fast booking.":n==="es"?"Alquiler de coches en Agadir aeropuerto Al Massira, Taghazout, Imsouane y Aourir. Sin fianza, entrega en hotel y reserva rápida.":"Location de voiture à Agadir, aéroport Al Massira, Taghazout et Imsouane. Sans caution, livraison hôtel, réservation rapide."),ogTitle:H(o==null?void 0:o.og_title_i18n,n)||(n==="en"?"Cheap Car Rental Agadir | Taghazout, Imsouane, Airport":n==="es"?"Alquiler coche Agadir barato | Taghazout, Imsouane, Aeropuerto":"Location voiture Agadir pas cher | Taghazout, Imsouane, Aéroport"),ogDescription:H(o==null?void 0:o.og_description_i18n,n)||(n==="en"?"Car rental in Agadir, Al Massira Airport, Taghazout, and Imsouane. No deposit, hotel delivery, fast booking.":n==="es"?"Alquiler de coches en Agadir aeropuerto Al Massira, Taghazout, Imsouane y Aourir. Sin fianza, entrega en hotel y reserva rápida.":"Location de voiture à Agadir, aéroport Al Massira, Taghazout et Imsouane. Sans caution, livraison hôtel, réservation rapide."),robots:"index, follow",canonicalPath:"/",includeJsonLd:!0},"/recherche":{title:n==="en"?"Search rental cars (Agadir, Taghazout, Al Massira) | GadiWaze":"Recherche location voiture (Agadir, Taghazout, Al Massira) | GadiWaze",description:n==="en"?"Compare available vehicles for Agadir, Taghazout and Al Massira Airport based on your dates.":"Comparez les véhicules disponibles à Agadir, Taghazout et l’aéroport Al Massira selon vos dates.",robots:"index, follow",canonicalPath:"/recherche"},"/extras":{title:n==="en"?"Options & extras (Agadir car rental) | GadiWaze":"Options & extras (location de voiture Agadir) | GadiWaze",description:n==="en"?"Select optional services and equipment for your rental in Agadir / Taghazout.":"Sélectionnez les services et équipements optionnels pour votre location à Agadir / Taghazout.",robots:"noindex, nofollow",canonicalPath:"/extras"},"/paiement":{title:n==="en"?"Payment (Agadir car rental) | GadiWaze":"Paiement (location de voiture Agadir) | GadiWaze",description:n==="en"?"Finalize your booking and review rental details (Agadir / Taghazout / Al Massira).":"Finalisez votre réservation et vérifiez les détails (Agadir / Taghazout / Al Massira).",robots:"noindex, nofollow",canonicalPath:"/paiement"},"/confirmation":{title:n==="en"?"Booking confirmation (Agadir) | GadiWaze":"Confirmation de réservation (Agadir) | GadiWaze",description:n==="en"?"Booking confirmation and next steps.":"Confirmation de réservation et étapes suivantes.",robots:"noindex, nofollow",canonicalPath:"/confirmation"},"/a-propos":{title:n==="en"?"About GadiWaze (Agadir, Morocco) | GadiWaze":"À propos de GadiWaze (Agadir, Maroc) | GadiWaze",description:n==="en"?"About GadiWaze: how car rental works in Agadir (Morocco), booking steps, pay at the agency, and support.":"À propos de GadiWaze : location de voiture à Agadir (Maroc), étapes de réservation, paiement en agence et assistance.",robots:"index, follow",canonicalPath:"/a-propos",includeJsonLd:!0},"/contact":{title:n==="en"?"Contact (Agadir, Morocco) | GadiWaze":"Contact (Agadir, Maroc) | GadiWaze",description:n==="en"?"Contact GadiWaze (Agadir, Morocco): email, phone and practical info for booking, payment at the agency, insurance or support.":"Contactez GadiWaze à Agadir (Maroc) : email, téléphone et infos utiles pour réservation, paiement en agence, assurance ou assistance.",robots:"index, follow",canonicalPath:"/contact",includeJsonLd:!0},"/conditions":{title:n==="en"?"Car rental terms (Agadir, Morocco) | GadiWaze":"Conditions de location de voiture (Agadir, Maroc) | GadiWaze",description:n==="en"?"Car rental terms with GadiWaze: driver age, required documents, insurance, deposit, fuel policy, cancellation and pickup rules in Morocco.":"Conditions de location de voiture : âge, documents, assurance, dépôt, carburant, annulation et règles de prise en charge au Maroc.",robots:"index, follow",canonicalPath:"/conditions",includeJsonLd:!0},"/confidentialite":{title:n==="en"?"Privacy policy (Agadir, Morocco) | GadiWaze":"Politique de confidentialité (Agadir, Maroc) | GadiWaze",description:n==="en"?"Privacy policy: what data is collected during a booking, why it is used, retention periods and user rights (Agadir, Morocco).":"Politique de confidentialité : données collectées lors d’une réservation, finalités, durée de conservation et droits des utilisateurs (Agadir, Maroc).",robots:"index, follow",canonicalPath:"/confidentialite",includeJsonLd:!0},"/faq":{title:n==="en"?"FAQ – car rental in Morocco | GadiWaze":"FAQ – location de voiture au Maroc | GadiWaze",description:n==="en"?"Car rental FAQ (Agadir, Morocco): booking, pay at the agency, insurance, deposit and support. Clear answers in plain language.":"FAQ location de voiture (Agadir, Maroc) : réservation, paiement en agence, assurance, dépôt de garantie et assistance. Réponses claires.",robots:"index, follow",canonicalPath:"/faq",includeJsonLd:!0},"/taghazout":{title:H(l==null?void 0:l.meta_title,n)||(n==="en"?"Taghazout surf spots & car rental from Agadir | GadiWaze":n==="es"?"Alquiler coche Taghazout — Surf trip desde Agadir | GadiWaze":"Taghazout surf : spots & location voiture depuis Agadir | GadiWaze"),description:H(l==null?void 0:l.meta_description,n)||(n==="en"?"Taghazout guide near Agadir (Morocco): Anchor Point, surf spots, coastal road, practical tips. Rent a car and explore at your own pace with GadiWaze.":n==="es"?"Guía de Taghazout (Marruecos): Anchor Point, spots de surf, ruta costera, consejos prácticos. Alquile un coche y explore a su ritmo con GadiWaze.":"Guide Taghazout (Maroc) : Anchor Point, spots de surf, route côtière, conseils pratiques. Louez une voiture et explorez à votre rythme avec GadiWaze."),robots:"index, follow",canonicalPath:"/taghazout",includeJsonLd:!0,ogImage:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=1200&h=630&fit=crop",geoPlacename:"Taghazout"},"/essaouira":{title:H(l==null?void 0:l.meta_title,n)||(n==="en"?"Essaouira from Agadir — UNESCO Medina & Car Rental | GadiWaze":n==="es"?"Alquiler coche Essaouira — Road trip Atlántico | GadiWaze":"Essaouira depuis Agadir — Médina UNESCO & location voiture | GadiWaze"),description:H(l==null?void 0:l.meta_description,n)||(n==="en"?"Essaouira day trip from Agadir by car. UNESCO medina, fishing port, kitesurf, Gnaoua Festival. No deposit car rental with GadiWaze.":n==="es"?"Excursión a Essaouira desde Agadir en coche. Medina UNESCO, puerto de pesca, kitesurf, Festival Gnaoua. Alquiler sin fianza con GadiWaze.":"Excursion Essaouira depuis Agadir en voiture. Médina UNESCO, port de pêche, kitesurf, Festival Gnaoua. Location sans caution avec GadiWaze."),robots:"index, follow",canonicalPath:"/essaouira",includeJsonLd:!0,ogImage:"https://images.unsplash.com/photo-1558642452-9d2a7deb7f62?w=1200&h=630&fit=crop",geoPlacename:"Essaouira"},"/marrakech":{title:H(l==null?void 0:l.meta_title,n)||(n==="en"?"Car Rental Marrakech from Agadir | GadiWaze":n==="es"?"Alquiler coche Marrakech desde Agadir | GadiWaze":"Location Voiture Marrakech depuis Agadir | GadiWaze"),description:H(l==null?void 0:l.meta_description,n)||(n==="en"?"Reserve your car in Agadir to explore Marrakech. 250 km, 2h45 via A1 highway. Unlimited mileage, no deposit.":n==="es"?"Reserve su coche en Agadir para explorar Marrakech. 250 km, 2h45 por la autopista A1. Kilometraje ilimitado, sin fianza.":"Réservez votre voiture à Agadir pour explorer Marrakech. 250 km, 2h45 par l'autoroute A1. Kilométrage illimité, sans caution."),robots:"index, follow",canonicalPath:"/marrakech",includeJsonLd:!0,ogImage:"https://images.unsplash.com/photo-1539020140153-e479b8f22c41?w=1200&h=630&fit=crop",geoPlacename:"Marrakech, Maroc"},"/tiznit":{title:H(l==null?void 0:l.meta_title,n)||(n==="en"?"Car Rental Tiznit from Agadir | GadiWaze":n==="es"?"Alquiler coche Tiznit desde Agadir | GadiWaze":"Location Voiture Tiznit depuis Agadir | GadiWaze"),description:H(l==null?void 0:l.meta_description,n)||(n==="en"?"Car rental Agadir → Tiznit. 90 km, 1h with no toll. Berber silverware, historic ramparts, combine with Mirleft.":n==="es"?"Alquiler coche Agadir → Tiznit. 90 km, 1h sin peaje. Joyería bereber, murallas históricas, combine con Mirleft.":"Location voiture Agadir → Tiznit. 90 km, 1h sans péage. Bijouterie berbère, remparts historiques, combinez avec Mirleft."),robots:"index, follow",canonicalPath:"/tiznit",includeJsonLd:!0,ogImage:"https://images.unsplash.com/photo-1560969184-10fe8719e047?w=1200&h=630&fit=crop",geoPlacename:"Tiznit, Maroc"},"/ouarzazate":{title:H(l==null?void 0:l.meta_title,n)||(n==="en"?"Car Rental Ouarzazate from Agadir | GadiWaze":n==="es"?"Alquiler coche Ouarzazate desde Agadir | GadiWaze":"Location Voiture Ouarzazate depuis Agadir | GadiWaze"),description:H(l==null?void 0:l.meta_description,n)||(n==="en"?"Reserve your SUV for Ouarzazate. 260 km, kasbah road. Aït Ben Haddou UNESCO, Atlas Studios, Drâa Valley.":n==="es"?"Reserve su SUV para Ouarzazate. 260 km, ruta de las kasbahs. Aït Ben Haddou UNESCO, Estudios Atlas, Valle del Drâa.":"Réservez votre SUV pour Ouarzazate. 260 km, route des kasbahs. Aït Ben Haddou UNESCO, Studios Atlas, Vallée du Drâa."),robots:"index, follow",canonicalPath:"/ouarzazate",includeJsonLd:!0,ogImage:"https://images.unsplash.com/photo-1539037116277-4db20889f2d4?w=1200&h=630&fit=crop",geoPlacename:"Ouarzazate, Maroc"},"/tafraout":{title:H(l==null?void 0:l.meta_title,n)||(n==="en"?"Car Rental Tafraout from Agadir | GadiWaze":n==="es"?"Alquiler coche Tafraout desde Agadir | GadiWaze":"Location Voiture Tafraout depuis Agadir | GadiWaze"),description:H(l==null?void 0:l.meta_description,n)||(n==="en"?"Car rental Agadir → Tafraout. 160 km, Anti-Atlas. Painted rocks, almond valley, authentic Berber villages.":n==="es"?"Alquiler coche Agadir → Tafraout. 160 km, Anti-Atlas. Rocas pintadas, valle de los almendros, pueblos bereberes auténticos.":"Location voiture Agadir → Tafraout. 160 km, Anti-Atlas. Rochers peints, vallée des amandiers, villages berbères authentiques."),robots:"index, follow",canonicalPath:"/tafraout",includeJsonLd:!0,ogImage:"https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=1200&h=630&fit=crop",geoPlacename:"Tafraout, Maroc"},"/mirleft":{title:H(l==null?void 0:l.meta_title,n)||(n==="en"?"Car Rental Mirleft from Agadir | GadiWaze":n==="es"?"Alquiler coche Mirleft desde Agadir | GadiWaze":"Location Voiture Mirleft depuis Agadir | GadiWaze"),description:H(l==null?void 0:l.meta_description,n)||(n==="en"?"Reserve your car for Mirleft. 130 km, wild coves. The most unspoiled Atlantic coast in Morocco.":n==="es"?"Reserve su coche para Mirleft. 130 km, calas salvajes. La costa atlántica más salvaje de Marruecos.":"Réservez votre voiture pour Mirleft. 130 km, criques sauvages. La côte atlantique la plus sauvage du Maroc."),robots:"index, follow",canonicalPath:"/mirleft",includeJsonLd:!0,ogImage:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=1200&h=630&fit=crop",geoPlacename:"Mirleft, Maroc"},"/dakhla":{title:H(l==null?void 0:l.meta_title,n)||(n==="en"?"Car Rental Dakhla from Agadir | GadiWaze":n==="es"?"Alquiler coche Dakhla desde Agadir | GadiWaze":"Location Voiture Dakhla depuis Agadir | GadiWaze"),description:H(l==null?void 0:l.meta_description,n)||(n==="en"?"The ultimate road trip: Agadir → Dakhla, 1100 km of Atlantic coast. SUV with unlimited mileage for Morocco's most epic journey.":n==="es"?"El road trip definitivo: Agadir → Dakhla, 1100 km de costa atlántica. SUV con kilometraje ilimitado para el viaje más épico de Marruecos.":"Le road trip ultime : Agadir → Dakhla, 1100 km d'Atlantique. SUV kilométrage illimité pour le voyage le plus épique du Maroc."),robots:"index, follow",canonicalPath:"/dakhla",includeJsonLd:!0,ogImage:"https://images.unsplash.com/photo-1530549387789-4c1017266635?w=1200&h=630&fit=crop",geoPlacename:"Dakhla, Maroc"},"/agadir":{title:H(l==null?void 0:l.meta_title,n)||(n==="en"?"Car Rental Agadir — Explore the City & Surroundings | GadiWaze":n==="es"?"Alquiler coche Agadir — Sin fianza, entrega gratuita | GadiWaze":"Location voiture Agadir — Ville, plages & alentours | GadiWaze"),description:H(l==null?void 0:l.meta_description,n)||(n==="en"?"Rent a car in Agadir with no deposit, unlimited mileage. Discover Dania Land, Souk El Had, Crocoparc, Paradise Valley. Free delivery.":n==="es"?"Alquile un coche en Agadir sin fianza, kilometraje ilimitado. Descubra Dania Land, Souk El Had, Crocoparc, Valle del Paraíso. Entrega gratuita.":"Louez une voiture à Agadir sans caution, kilométrage illimité. Découvrez Dania Land, Souk El Had, Crocoparc, Vallée du Paradis. Livraison gratuite."),robots:"index, follow",canonicalPath:"/agadir",includeJsonLd:!0,ogImage:"https://images.unsplash.com/photo-1499856871958-5b9627545d1a?w=1200&h=630&fit=crop",geoPlacename:"Agadir"},"/aeroport-agadir":{title:H(l==null?void 0:l.meta_title,n)||(n==="en"?"Car Rental Agadir Airport (AGA) — Terminal Delivery | GadiWaze":n==="es"?"Alquiler coche aeropuerto Agadir Al Massira — Entrega terminal | GadiWaze":"Location voiture Aéroport Agadir (AGA) — Livraison terminal | GadiWaze"),description:H(l==null?void 0:l.meta_description,n)||(n==="en"?"Rent a car at Agadir Al Massira Airport (AGA). No deposit, unlimited mileage, direct delivery at the single terminal. Book with GadiWaze.":n==="es"?"Alquile un coche en el aeropuerto Agadir Al Massira (AGA). Sin fianza, kilometraje ilimitado, entrega directa en el terminal único. Reserve con GadiWaze.":"Location voiture à l'aéroport Agadir Al Massira (AGA). Sans caution, kilométrage illimité, livraison directe au terminal unique. Réservez avec GadiWaze."),robots:"index, follow",canonicalPath:"/aeroport-agadir",includeJsonLd:!0,ogImage:"https://images.unsplash.com/photo-1556388158-158ea5ccacbd?w=1200&h=630&fit=crop",geoPlacename:"Agadir Al Massira"},"/pharmacie-garde-agadir":{title:"Pharmacie de Garde Agadir — Horaires et Numéros Utiles 2026 | GadiWaze",description:"Comment trouver une pharmacie de garde à Agadir ? Numéro d'urgence, méthodes pratiques et adresses des principales pharmacies par quartier. Guide complet pour touristes et résidents.",robots:"index, follow",canonicalPath:"/pharmacie-garde-agadir",includeJsonLd:!0,geoPlacename:"Agadir"},"/calculateur-road-trip":{title:"Calculateur Road Trip Maroc — Budget Carburant & Péage 2026 | GadiWaze",description:"Calculez votre budget road trip au Maroc en 2026. Coût carburant, péages autoroute, location voiture inclus. Départ Agadir vers Marrakech, Essaouira, Taroudant et plus.",robots:"index, follow",canonicalPath:"/calculateur-road-trip",includeJsonLd:!0,geoPlacename:"Agadir"},"/voitures":{title:n==="en"?"Vehicle Fleet in Agadir — No Deposit Car Rental | GadiWaze":"Flotte de véhicules à Agadir — Location sans caution | GadiWaze",description:n==="en"?"Discover our full fleet of vehicles in Agadir. Economy, SUV, sedans — no deposit, unlimited mileage, free delivery.":"Découvrez notre flotte complète de véhicules à Agadir. Économiques, SUV, berlines — sans caution, kilométrage illimité, livraison gratuite.",robots:"index, follow",canonicalPath:"/voitures",includeJsonLd:!0},"/blog":{title:n==="en"?"Car Rental Tips & Guides in Morocco | GadiWaze Blog":"Conseils & guides location voiture au Maroc | Blog GadiWaze",description:n==="en"?"Travel tips, destination guides and car rental advice for Agadir, Taghazout and Morocco. Explore the GadiWaze blog.":"Conseils voyage, guides de destinations et astuces location voiture à Agadir, Taghazout et au Maroc. Découvrez le blog GadiWaze.",robots:"index, follow",canonicalPath:"/blog",includeJsonLd:!0},"/login-admin":{title:n==="en"?"Admin login | GadiWaze":"Connexion admin | GadiWaze",description:n==="en"?"Administrator sign-in.":"Connexion à l’espace administrateur.",robots:"noindex, nofollow",canonicalPath:"/login-admin"},"/mes-reservations":{title:n==="en"?"My bookings (Agadir) | GadiWaze":"Mes réservations (Agadir) | GadiWaze",description:n==="en"?"Access your bookings.":"Accédez à vos réservations.",robots:"noindex, nofollow",canonicalPath:"/mes-reservations"}};return a.startsWith("/mes-reservations/")?{title:n==="en"?"Booking details | GadiWaze":"Détail de réservation | GadiWaze",description:n==="en"?"Booking details.":"Détail de réservation.",robots:"noindex, nofollow",canonicalPath:"/mes-reservations"}:a.startsWith("/m/booking")?{title:n==="en"?"Booking – mobile flow | GadiWaze":"Réservation – parcours mobile | GadiWaze",description:n==="en"?"Mobile booking flow.":"Parcours de réservation sur mobile.",robots:"noindex, nofollow",canonicalPath:"/m/booking"}:a.startsWith("/voitures/")?{title:n==="en"?"Car Rental Agadir | GadiWaze":"Location voiture Agadir | GadiWaze",description:n==="en"?"Rent a car in Agadir with no deposit and unlimited mileage.":"Louez une voiture à Agadir sans caution et kilométrage illimité.",robots:"index, follow",canonicalPath:a}:a.startsWith("/blog/")?{title:n==="en"?"Car Rental Tips & Guides in Morocco | GadiWaze Blog":"Conseils & guides location voiture au Maroc | Blog GadiWaze",description:n==="en"?"Travel tips, destination guides and car rental advice for Morocco.":"Conseils voyage, guides de destinations et astuces location voiture au Maroc.",robots:"index, follow",canonicalPath:a}:W[a]?W[a]:{title:n==="en"?"Page not found | GadiWaze":"Page introuvable | GadiWaze",description:n==="en"?"The requested page does not exist.":"La page demandée n’existe pas.",robots:"noindex, follow",canonicalPath:a}})(),S=!m||!C.canonicalPath?"":e==="en"?C.canonicalPath==="/"?`${m}/en`:`${m}/en${C.canonicalPath}`:e==="es"?C.canonicalPath==="/"?`${m}/es`:`${m}/es${C.canonicalPath}`:`${m}${C.canonicalPath}`,P=m&&C.canonicalPath?`${m}${C.canonicalPath}`:"",T=m&&C.canonicalPath?C.canonicalPath==="/"?`${m}/en`:`${m}/en${C.canonicalPath}`:"",E=m&&C.canonicalPath?C.canonicalPath==="/"?`${m}/es`:`${m}/es${C.canonicalPath}`:"",M=[((o==null?void 0:o.social_facebook_url)||(o==null?void 0:o.social_facebook)||"").trim(),((o==null?void 0:o.social_instagram_url)||(o==null?void 0:o.social_instagram)||"").trim(),((o==null?void 0:o.social_whatsapp_url)||(o==null?void 0:o.social_whatsapp)||"").trim()].filter(Boolean).filter(G=>/^https?:\/\//i.test(G)),R=[((o==null?void 0:o.social_facebook_url)||(o==null?void 0:o.social_facebook)||"").trim(),((o==null?void 0:o.social_instagram_url)||(o==null?void 0:o.social_instagram)||"").trim()].filter(Boolean).filter(G=>/^https?:\/\//i.test(G)),N=(()=>{if(!C.includeJsonLd||!m)return null;const W="GadiWaze",G=p(((o==null?void 0:o.logo_url)||"").trim()),Q={"@context":"https://schema.org","@type":"Organization",name:W,url:m};G&&(Q.logo=G),Q.sameAs=M;const K={"@context":"https://schema.org","@type":["AutoRental","LocalBusiness"],name:W,url:m};h&&(K.telephone=h),_&&(K.email=_),y&&(K.image=y),K.priceRange="$$",K.sameAs=R;const te=(o==null?void 0:o.geo_latitude)||"30.4278",ge=(o==null?void 0:o.geo_longitude)||"-9.5981";K.geo={"@type":"GeoCoordinates",latitude:te,longitude:ge};const ye=o==null?void 0:o.opening_hours;return K.openingHoursSpecification=Array.isArray(ye)&&ye.length>0?ye:[{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],opens:"00:00",closes:"23:59"}],v&&(K.address={"@type":"PostalAddress",streetAddress:v,addressLocality:"Agadir",addressRegion:"Souss-Massa",postalCode:"80000",addressCountry:"MA"}),K.areaServed=[{"@type":"City",name:"Agadir"},{"@type":"City",name:"Taghazout"},{"@type":"City",name:"Tamraght"},{"@type":"City",name:"Aourir"},{"@type":"Airport",name:"Agadir Al Massira Airport"}],o!=null&&o.rating_value&&(o!=null&&o.review_count)&&(K.aggregateRating={"@type":"AggregateRating",ratingValue:String(o.rating_value),reviewCount:String(o.review_count),bestRating:"5",worstRating:"1"}),{organization:Q,localBusiness:K}})();d.useEffect(()=>{Sd({faviconUrl:(o==null?void 0:o.favicon_url)??null,version:(o==null?void 0:o.updated_at)??Date.now()})},[o==null?void 0:o.favicon_url,o==null?void 0:o.updated_at]);const L=C.title||$("seo_title_default",n),O=C.description||g,Y=S||b,F=C.ogImage?p(C.ogImage):y,D=C.geoPlacename||"Agadir",A=C.ogTitle||L,j=C.ogDescription||O;return s.jsxs(kd,{htmlAttributes:{lang:n},children:[w?s.jsx("link",{rel:"preload",as:"image",href:w}):null,s.jsx("title",{children:L}),s.jsx("meta",{name:"description",content:O}),S?s.jsx("link",{rel:"canonical",href:S}):null,C.robots?s.jsx("meta",{name:"robots",content:C.robots}):null,P&&T&&C.robots==="index, follow"?s.jsxs(s.Fragment,{children:[s.jsx("link",{rel:"alternate",hrefLang:"fr",href:P}),s.jsx("link",{rel:"alternate",hrefLang:"en",href:T}),E&&s.jsx("link",{rel:"alternate",hrefLang:"es",href:E}),s.jsx("link",{rel:"alternate",hrefLang:"x-default",href:P})]}):null,u?null:s.jsxs(s.Fragment,{children:[s.jsx("meta",{name:"geo.region",content:"MA-AGD"}),s.jsx("meta",{name:"geo.placename",content:D})]}),s.jsx("meta",{property:"og:title",content:A}),s.jsx("meta",{property:"og:description",content:j}),s.jsx("meta",{property:"og:image",content:F}),s.jsx("meta",{property:"og:site_name",content:x}),s.jsx("meta",{property:"og:type",content:"website"}),s.jsx("meta",{property:"og:url",content:Y}),s.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),s.jsx("meta",{name:"twitter:title",content:A}),s.jsx("meta",{name:"twitter:description",content:j}),s.jsx("meta",{name:"twitter:image",content:F}),N!=null&&N.organization?s.jsx("script",{id:"schema-org-organization",type:"application/ld+json",children:JSON.stringify(N.organization)}):null,N!=null&&N.localBusiness?s.jsx("script",{id:"schema-org-vehicle-rental",type:"application/ld+json",children:JSON.stringify(N.localBusiness)}):null,C.includeJsonLd&&m?s.jsx("script",{id:"schema-org-website",type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"WebSite",url:"https://gadiwaze.com",name:"GadiWaze",description:n==="en"?"Premium car rental in Agadir, Morocco":"Location de voiture premium à Agadir, Maroc",inLanguage:["fr","en","es"],potentialAction:{"@type":"SearchAction",target:{"@type":"EntryPoint",urlTemplate:"https://gadiwaze.com/recherche?q={search_term_string}"},"query-input":"required name=search_term_string"}})}):null]})}const ES=["/a-propos","/faq","/conditions","/confidentialite","/contact"];function Zo({children:e}){const{pathname:t}=xe(),n=!ES.includes(pr(t));return s.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[s.jsx(Fy,{}),s.jsx("div",{className:"flex-1 pt-20",children:s.jsx(d.Suspense,{fallback:s.jsx(Da,{}),children:e})}),n&&s.jsx(d.Suspense,{fallback:null,children:s.jsx(TS,{})}),s.jsx(Hy,{}),s.jsx(Ob,{})]})}function AS({lang:e,setLang:t}){const n=xe();d.useEffect(()=>{Sd({faviconUrl:"https://jwnbjkmwvydltaihrsdi.supabase.co/storage/v1/object/public/uploads-global/favicon.png",version:null})},[]);const r=(i,c)=>{const l=i==="/"?"/en":`/en${i}`,u=i==="/"?"/es":`/es${i}`;return[s.jsx(Z,{path:i,element:c},`fr:${i}`),s.jsx(Z,{path:l,element:c},`en:${l}`),s.jsx(Z,{path:u,element:c},`es:${u}`)]},a=i=>s.jsx(Zo,{children:s.jsx(Eo,{children:i})}),o=i=>s.jsx(Zo,{children:s.jsx(Eo,{children:s.jsx(d.Suspense,{fallback:s.jsx(Da,{}),children:i})})});return s.jsxs(s.Fragment,{children:[s.jsx(PS,{lang:e}),s.jsx(Lm,{mode:"wait",children:s.jsxs(Bm,{location:n,children:[s.jsxs(Z,{path:"/m/booking",element:s.jsx(Mo,{}),children:[s.jsx(Z,{path:"location",element:s.jsx(Wo,{})}),s.jsx(Z,{path:"dates",element:s.jsx(Go,{})}),s.jsx(Z,{path:"hours",element:s.jsx(Yo,{})}),s.jsx(Z,{path:"summary",element:s.jsx(Ko,{})})]}),s.jsxs(Z,{path:"/en/m/booking",element:s.jsx(Mo,{}),children:[s.jsx(Z,{path:"location",element:s.jsx(Wo,{})}),s.jsx(Z,{path:"dates",element:s.jsx(Go,{})}),s.jsx(Z,{path:"hours",element:s.jsx(Yo,{})}),s.jsx(Z,{path:"summary",element:s.jsx(Ko,{})})]}),s.jsxs(Z,{path:"/es/m/booking",element:s.jsx(Mo,{}),children:[s.jsx(Z,{path:"location",element:s.jsx(Wo,{})}),s.jsx(Z,{path:"dates",element:s.jsx(Go,{})}),s.jsx(Z,{path:"hours",element:s.jsx(Yo,{})}),s.jsx(Z,{path:"summary",element:s.jsx(Ko,{})})]}),r("/",a(s.jsx(RT,{lang:e,setLang:t}))),r("/recherche",a(s.jsx(DT,{}))),r("/extras",a(s.jsx(IT,{}))),r("/paiement",a(s.jsx(OT,{}))),r("/confirmation",a(s.jsx(zT,{}))),r("/mes-reservations",a(s.jsx(FT,{}))),r("/mes-reservations/:id",a(s.jsx(WT,{}))),r("/a-propos",a(s.jsx(BT,{}))),r("/contact",a(s.jsx(UT,{}))),r("/conditions",a(s.jsx($T,{}))),r("/confidentialite",a(s.jsx(VT,{}))),r("/faq",a(s.jsx(qT,{}))),r("/taghazout",a(s.jsx(QT,{}))),r("/essaouira",a(s.jsx(XT,{}))),r("/agadir",a(s.jsx(JT,{}))),r("/aeroport-agadir",a(s.jsx(ZT,{}))),r("/marrakech",a(s.jsx(eS,{}))),r("/tiznit",a(s.jsx(tS,{}))),r("/ouarzazate",a(s.jsx(nS,{}))),r("/tafraout",a(s.jsx(rS,{}))),r("/mirleft",a(s.jsx(aS,{}))),r("/dakhla",a(s.jsx(oS,{}))),r("/pharmacie-garde-agadir",a(s.jsx(bS,{}))),r("/calculateur-road-trip",a(s.jsx(xS,{}))),r("/voitures",o(s.jsx(sS,{}))),r("/voitures/:slug",o(s.jsx(iS,{}))),r("/blog",o(s.jsx(_S,{}))),r("/blog/:slug",o(s.jsx(yS,{}))),s.jsx(Z,{path:"/login-admin",element:s.jsx(HT,{})}),s.jsx(Z,{path:"/login-superviseur",element:s.jsx(GT,{})}),s.jsx(Z,{path:"/login-agent",element:s.jsx(YT,{})}),s.jsx(Z,{path:"/superviseur",element:s.jsx(Jt,{to:"/login-superviseur",replace:!0})}),s.jsx(Z,{path:"/unauthorized",element:s.jsx(Zo,{children:s.jsx(Eo,{children:s.jsx(KT,{})})})}),s.jsx(Z,{path:"/admin",element:s.jsx(Jt,{to:"/dash",replace:!0})}),s.jsx(Z,{path:"/admin/whatsapp",element:s.jsx(Jt,{to:"/dash/whatsapp",replace:!0})}),s.jsx(Z,{path:"/dash",element:s.jsx(Se,{allow:["admin","superviseur"],children:s.jsx(Pe,{children:s.jsx(cS,{})})})}),s.jsx(Z,{path:"/agent",element:s.jsx(Jt,{to:"/agent/reservations",replace:!0})}),s.jsx(Z,{path:"/agent/reservations",element:s.jsx(Se,{allow:["agent"],children:s.jsx(Pe,{children:s.jsx(Jo,{})})})}),s.jsx(Z,{path:"/agent/reservations/:id",element:s.jsx(Se,{allow:["agent"],children:s.jsx(Pe,{children:s.jsx(Jo,{})})})}),s.jsx(Z,{path:"/agent/whatsapp",element:s.jsx(Se,{allow:["agent"],children:s.jsx(Pe,{children:s.jsx(hl,{})})})}),s.jsx(Z,{path:"/dash/reservations",element:s.jsx(Se,{allow:["admin","superviseur"],children:s.jsx(Pe,{children:s.jsx(Jo,{})})})}),s.jsx(Z,{path:"/dash/clients",element:s.jsx(Se,{allow:["admin","superviseur"],children:s.jsx(Pe,{children:s.jsx(lS,{})})})}),s.jsx(Z,{path:"/dash/vehicules",element:s.jsx(Se,{allow:["admin","superviseur"],children:s.jsx(Pe,{children:s.jsx(uS,{})})})}),s.jsx(Z,{path:"/dash/equipements",element:s.jsx(Se,{allow:["admin","superviseur"],children:s.jsx(Pe,{children:s.jsx(dS,{})})})}),s.jsx(Z,{path:"/dash/tarifs",element:s.jsx(Se,{allow:["admin","superviseur"],children:s.jsx(Pe,{children:s.jsx(fS,{})})})}),s.jsx(Z,{path:"/dash/whatsapp",element:s.jsx(Se,{allow:["admin","superviseur","agent"],children:s.jsx(Pe,{children:s.jsx(hl,{})})})}),s.jsx(Z,{path:"/dash/logs",element:s.jsx(Se,{allow:["admin"],children:s.jsx(Pe,{children:s.jsx(pS,{})})})}),s.jsx(Z,{path:"/dash/users",element:s.jsx(Se,{allow:["admin"],children:s.jsx(Pe,{children:s.jsx(kS,{})})})}),s.jsx(Z,{path:"/dash/flags",element:s.jsx(Se,{allow:["admin"],children:s.jsx(Pe,{children:s.jsx(CS,{})})})}),s.jsx(Z,{path:"/dash/policies",element:s.jsx(Se,{allow:["admin","superviseur"],children:s.jsx(Pe,{children:s.jsx(mS,{})})})}),s.jsx(Z,{path:"/dash/locations",element:s.jsx(Se,{allow:["admin","superviseur"],children:s.jsx(Pe,{children:s.jsx(hS,{})})})}),s.jsx(Z,{path:"/dash/saisons",element:s.jsx(Se,{allow:["admin"],children:s.jsx(Pe,{children:s.jsx(gS,{})})})}),s.jsx(Z,{path:"/dash/blog",element:s.jsx(Se,{allow:["admin"],children:s.jsx(Pe,{children:s.jsx(d.Suspense,{fallback:s.jsx(Da,{}),children:s.jsx(wS,{})})})})}),s.jsx(Z,{path:"/dash/config",element:s.jsx(Se,{allow:["admin"],children:s.jsx(Pe,{children:s.jsx(vS,{})})})}),s.jsx(Z,{path:"*",element:s.jsx(d.Suspense,{fallback:s.jsx(Da,{}),children:s.jsx(LT,{})})})]},n.pathname)})]})}function jS(){const e=xe(),t=Je(),n=dt(e.pathname);if(typeof window<"u"){try{window.localStorage.setItem("lang",n)}catch{}try{document.documentElement.lang=n}catch{}}const r=d.useCallback(a=>{if(a===n)return;const o=pr(e.pathname);if(o.match(/^\/blog\/.+$/))return;const i=a==="fr"?o:o==="/"?`/${a}`:`/${a}${o}`;t(i+e.search+e.hash,{replace:!0})},[n,e,t]);return s.jsxs(s.Fragment,{children:[s.jsx(zb,{}),s.jsx(qb,{}),s.jsx(AS,{lang:n,setLang:r})]})}const NS=()=>(d.useEffect(()=>{if(typeof window>"u")return;const e=window.location.hash.replace(/^#/,""),t=window.location.search.replace(/^\?/,""),n=e||t;if(!n)return;const a=new URLSearchParams(n).get("type");(a==="recovery"||a==="invite")&&window.location.pathname!=="/login-admin"&&window.location.replace("/login-admin"+(window.location.hash?window.location.hash:"")+(window.location.search?window.location.search:""))},[]),s.jsx(iy,{client:SS,children:s.jsxs(z_,{children:[s.jsx(bg,{}),s.jsx(Jg,{}),s.jsx(Ty,{children:s.jsx(Xy,{children:s.jsx(Cd,{children:s.jsx(Sb,{children:s.jsxs(qm,{children:[s.jsx(Rb,{}),s.jsx(jS,{})]})})})})})]})}));Fl(document.getElementById("root")).render(s.jsx(NS,{}));export{ki as $,q as A,Te as B,Uf as C,he as D,wi as E,HS as F,p_ as G,Jb as H,$c as I,Xa as J,Bs as K,Nr as L,GS as M,Gy as N,Yy as O,re as P,kd as Q,Ky as R,ka as S,wr as T,$S as U,Eb as V,pr as W,br as X,fi as Y,En as Z,Dd as _,fd as a,Nd as a0,Ci as a1,Zr as a2,pi as a3,mi as a4,qu as a5,ur as a6,eo as a7,lr as a8,ti as a9,Ee as aA,Fe as aB,$_ as aC,Ce as aa,zS as ab,TT as ac,ST as ad,sp as ae,rk as af,ip as ag,im as ah,Us as ai,Hs as aj,Jm as ak,Ts as al,Qm as am,lp as an,mk as ao,hk as ap,Qy as aq,Ie as ar,sy as as,US as at,Uy as au,FS as av,na as aw,ps as ax,Wr as ay,Z_ as az,ra as b,zy as c,U as d,Rr as e,Ta as f,dt as g,Dr as h,Bn as i,VS as j,An as k,H as l,x0 as m,xr as n,Nb as o,id as p,ke as q,bi as r,Ae as s,$ as t,Ed as u,gd as v,Sn as w,Za as x,Dt as y,zr as z};