var qT=Object.defineProperty;var xy=e=>{throw TypeError(e)};var HT=(e,t,r)=>t in e?qT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xn=(e,t,r)=>HT(e,typeof t!="symbol"?t+"":t,r),Vh=(e,t,r)=>t.has(e)||xy("Cannot "+r);var E=(e,t,r)=>(Vh(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?xy("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),W=(e,t,r,n)=>(Vh(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),he=(e,t,r)=>(Vh(e,t,"access private method"),r);var _c=(e,t,r,n)=>({set _(s){W(e,t,s,r)},get _(){return E(e,t,n)}});function WT(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();function sc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jj={exports:{}},Id={},Yj={exports:{}},me={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ic=Symbol.for("react.element"),GT=Symbol.for("react.portal"),KT=Symbol.for("react.fragment"),JT=Symbol.for("react.strict_mode"),YT=Symbol.for("react.profiler"),XT=Symbol.for("react.provider"),QT=Symbol.for("react.context"),ZT=Symbol.for("react.forward_ref"),eP=Symbol.for("react.suspense"),tP=Symbol.for("react.memo"),rP=Symbol.for("react.lazy"),yy=Symbol.iterator;function nP(e){return e===null||typeof e!="object"?null:(e=yy&&e[yy]||e["@@iterator"],typeof e=="function"?e:null)}var Xj={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Qj=Object.assign,Zj={};function ma(e,t,r){this.props=e,this.context=t,this.refs=Zj,this.updater=r||Xj}ma.prototype.isReactComponent={};ma.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ma.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function e1(){}e1.prototype=ma.prototype;function Eg(e,t,r){this.props=e,this.context=t,this.refs=Zj,this.updater=r||Xj}var _g=Eg.prototype=new e1;_g.constructor=Eg;Qj(_g,ma.prototype);_g.isPureReactComponent=!0;var by=Array.isArray,t1=Object.prototype.hasOwnProperty,kg={current:null},r1={key:!0,ref:!0,__self:!0,__source:!0};function n1(e,t,r){var n,s={},o=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)t1.call(t,n)&&!r1.hasOwnProperty(n)&&(s[n]=t[n]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)s[n]===void 0&&(s[n]=l[n]);return{$$typeof:ic,type:e,key:o,ref:a,props:s,_owner:kg.current}}function sP(e,t){return{$$typeof:ic,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Tg(e){return typeof e=="object"&&e!==null&&e.$$typeof===ic}function iP(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var wy=/\/+/g;function Uh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?iP(""+e.key):t.toString(36)}function hu(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case ic:case GT:a=!0}}if(a)return a=e,s=s(a),e=n===""?"."+Uh(a,0):n,by(s)?(r="",e!=null&&(r=e.replace(wy,"$&/")+"/"),hu(s,t,r,"",function(u){return u})):s!=null&&(Tg(s)&&(s=sP(s,r+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(wy,"$&/")+"/")+e)),t.push(s)),1;if(a=0,n=n===""?".":n+":",by(e))for(var l=0;l<e.length;l++){o=e[l];var c=n+Uh(o,l);a+=hu(o,t,r,c,s)}else if(c=nP(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=n+Uh(o,l++),a+=hu(o,t,r,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function kc(e,t,r){if(e==null)return e;var n=[],s=0;return hu(e,n,"","",function(o){return t.call(r,o,s++)}),n}function oP(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Mt={current:null},mu={transition:null},aP={ReactCurrentDispatcher:Mt,ReactCurrentBatchConfig:mu,ReactCurrentOwner:kg};function s1(){throw Error("act(...) is not supported in production builds of React.")}me.Children={map:kc,forEach:function(e,t,r){kc(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return kc(e,function(){t++}),t},toArray:function(e){return kc(e,function(t){return t})||[]},only:function(e){if(!Tg(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};me.Component=ma;me.Fragment=KT;me.Profiler=YT;me.PureComponent=Eg;me.StrictMode=JT;me.Suspense=eP;me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aP;me.act=s1;me.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Qj({},e.props),s=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=kg.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)t1.call(t,c)&&!r1.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:ic,type:e.type,key:s,ref:o,props:n,_owner:a}};me.createContext=function(e){return e={$$typeof:QT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:XT,_context:e},e.Consumer=e};me.createElement=n1;me.createFactory=function(e){var t=n1.bind(null,e);return t.type=e,t};me.createRef=function(){return{current:null}};me.forwardRef=function(e){return{$$typeof:ZT,render:e}};me.isValidElement=Tg;me.lazy=function(e){return{$$typeof:rP,_payload:{_status:-1,_result:e},_init:oP}};me.memo=function(e,t){return{$$typeof:tP,type:e,compare:t===void 0?null:t}};me.startTransition=function(e){var t=mu.transition;mu.transition={};try{e()}finally{mu.transition=t}};me.unstable_act=s1;me.useCallback=function(e,t){return Mt.current.useCallback(e,t)};me.useContext=function(e){return Mt.current.useContext(e)};me.useDebugValue=function(){};me.useDeferredValue=function(e){return Mt.current.useDeferredValue(e)};me.useEffect=function(e,t){return Mt.current.useEffect(e,t)};me.useId=function(){return Mt.current.useId()};me.useImperativeHandle=function(e,t,r){return Mt.current.useImperativeHandle(e,t,r)};me.useInsertionEffect=function(e,t){return Mt.current.useInsertionEffect(e,t)};me.useLayoutEffect=function(e,t){return Mt.current.useLayoutEffect(e,t)};me.useMemo=function(e,t){return Mt.current.useMemo(e,t)};me.useReducer=function(e,t,r){return Mt.current.useReducer(e,t,r)};me.useRef=function(e){return Mt.current.useRef(e)};me.useState=function(e){return Mt.current.useState(e)};me.useSyncExternalStore=function(e,t,r){return Mt.current.useSyncExternalStore(e,t,r)};me.useTransition=function(){return Mt.current.useTransition()};me.version="18.3.1";Yj.exports=me;var f=Yj.exports;const M=sc(f),Pg=WT({__proto__:null,default:M},[f]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var lP=f,cP=Symbol.for("react.element"),uP=Symbol.for("react.fragment"),dP=Object.prototype.hasOwnProperty,hP=lP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,mP={key:!0,ref:!0,__self:!0,__source:!0};function i1(e,t,r){var n,s={},o=null,a=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)dP.call(t,n)&&!mP.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:cP,type:e,key:o,ref:a,props:s,_owner:hP.current}}Id.Fragment=uP;Id.jsx=i1;Id.jsxs=i1;Jj.exports=Id;var i=Jj.exports,o1={exports:{}},tr={},a1={exports:{}},l1={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(P,_){var D=P.length;P.push(_);e:for(;0<D;){var Q=D-1>>>1,K=P[Q];if(0<s(K,_))P[Q]=_,P[D]=K,D=Q;else break e}}function r(P){return P.length===0?null:P[0]}function n(P){if(P.length===0)return null;var _=P[0],D=P.pop();if(D!==_){P[0]=D;e:for(var Q=0,K=P.length,ae=K>>>1;Q<ae;){var se=2*(Q+1)-1,je=P[se],Ce=se+1,B=P[Ce];if(0>s(je,D))Ce<K&&0>s(B,je)?(P[Q]=B,P[Ce]=D,Q=Ce):(P[Q]=je,P[se]=D,Q=se);else if(Ce<K&&0>s(B,D))P[Q]=B,P[Ce]=D,Q=Ce;else break e}}return _}function s(P,_){var D=P.sortIndex-_.sortIndex;return D!==0?D:P.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,m=3,p=!1,b=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(P){for(var _=r(u);_!==null;){if(_.callback===null)n(u);else if(_.startTime<=P)n(u),_.sortIndex=_.expirationTime,t(c,_);else break;_=r(u)}}function j(P){if(g=!1,v(P),!b)if(r(c)!==null)b=!0,V(C);else{var _=r(u);_!==null&&z(j,_.startTime-P)}}function C(P,_){b=!1,g&&(g=!1,x(R),R=-1),p=!0;var D=m;try{for(v(_),h=r(c);h!==null&&(!(h.expirationTime>_)||P&&!O());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,m=h.priorityLevel;var K=Q(h.expirationTime<=_);_=e.unstable_now(),typeof K=="function"?h.callback=K:h===r(c)&&n(c),v(_)}else n(c);h=r(c)}if(h!==null)var ae=!0;else{var se=r(u);se!==null&&z(j,se.startTime-_),ae=!1}return ae}finally{h=null,m=D,p=!1}}var S=!1,N=null,R=-1,k=5,T=-1;function O(){return!(e.unstable_now()-T<k)}function A(){if(N!==null){var P=e.unstable_now();T=P;var _=!0;try{_=N(!0,P)}finally{_?q():(S=!1,N=null)}}else S=!1}var q;if(typeof y=="function")q=function(){y(A)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,X=I.port2;I.port1.onmessage=A,q=function(){X.postMessage(null)}}else q=function(){w(A,0)};function V(P){N=P,S||(S=!0,q())}function z(P,_){R=w(function(){P(e.unstable_now())},_)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){b||p||(b=!0,V(C))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(P){switch(m){case 1:case 2:case 3:var _=3;break;default:_=m}var D=m;m=_;try{return P()}finally{m=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,_){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var D=m;m=P;try{return _()}finally{m=D}},e.unstable_scheduleCallback=function(P,_,D){var Q=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?Q+D:Q):D=Q,P){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=D+K,P={id:d++,callback:_,priorityLevel:P,startTime:D,expirationTime:K,sortIndex:-1},D>Q?(P.sortIndex=D,t(u,P),r(c)===null&&P===r(u)&&(g?(x(R),R=-1):g=!0,z(j,D-Q))):(P.sortIndex=K,t(c,P),b||p||(b=!0,V(C))),P},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(P){var _=m;return function(){var D=m;m=_;try{return P.apply(this,arguments)}finally{m=D}}}})(l1);a1.exports=l1;var fP=a1.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var pP=f,er=fP;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c1=new Set,xl={};function Ii(e,t){Xo(e,t),Xo(e+"Capture",t)}function Xo(e,t){for(xl[e]=t,e=0;e<t.length;e++)c1.add(t[e])}var Pn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cf=Object.prototype.hasOwnProperty,gP=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,jy={},Cy={};function vP(e){return cf.call(Cy,e)?!0:cf.call(jy,e)?!1:gP.test(e)?Cy[e]=!0:(jy[e]=!0,!1)}function xP(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function yP(e,t,r,n){if(t===null||typeof t>"u"||xP(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ot(e,t,r,n,s,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var gt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){gt[e]=new Ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];gt[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){gt[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){gt[e]=new Ot(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){gt[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){gt[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){gt[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){gt[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){gt[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ag=/[\-:]([a-z])/g;function Mg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ag,Mg);gt[t]=new Ot(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ag,Mg);gt[t]=new Ot(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ag,Mg);gt[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){gt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});gt.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){gt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function Og(e,t,r,n){var s=gt.hasOwnProperty(t)?gt[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(yP(t,r,s,n)&&(r=null),n||s===null?vP(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Fn=pP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Tc=Symbol.for("react.element"),ao=Symbol.for("react.portal"),lo=Symbol.for("react.fragment"),Ig=Symbol.for("react.strict_mode"),uf=Symbol.for("react.profiler"),u1=Symbol.for("react.provider"),d1=Symbol.for("react.context"),Dg=Symbol.for("react.forward_ref"),df=Symbol.for("react.suspense"),hf=Symbol.for("react.suspense_list"),Lg=Symbol.for("react.memo"),es=Symbol.for("react.lazy"),h1=Symbol.for("react.offscreen"),Sy=Symbol.iterator;function Aa(e){return e===null||typeof e!="object"?null:(e=Sy&&e[Sy]||e["@@iterator"],typeof e=="function"?e:null)}var Ue=Object.assign,Bh;function Ha(e){if(Bh===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Bh=t&&t[1]||""}return`
`+Bh+e}var qh=!1;function Hh(e,t){if(!e||qh)return"";qh=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
`),o=n.stack.split(`
`),a=s.length-1,l=o.length-1;1<=a&&0<=l&&s[a]!==o[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==o[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==o[l]){var c=`
`+s[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{qh=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ha(e):""}function bP(e){switch(e.tag){case 5:return Ha(e.type);case 16:return Ha("Lazy");case 13:return Ha("Suspense");case 19:return Ha("SuspenseList");case 0:case 2:case 15:return e=Hh(e.type,!1),e;case 11:return e=Hh(e.type.render,!1),e;case 1:return e=Hh(e.type,!0),e;default:return""}}function mf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case lo:return"Fragment";case ao:return"Portal";case uf:return"Profiler";case Ig:return"StrictMode";case df:return"Suspense";case hf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case d1:return(e.displayName||"Context")+".Consumer";case u1:return(e._context.displayName||"Context")+".Provider";case Dg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Lg:return t=e.displayName||null,t!==null?t:mf(e.type)||"Memo";case es:t=e._payload,e=e._init;try{return mf(e(t))}catch{}}return null}function wP(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return mf(t);case 8:return t===Ig?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ts(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function m1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jP(e){var t=m1(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pc(e){e._valueTracker||(e._valueTracker=jP(e))}function f1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=m1(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Fu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ff(e,t){var r=t.checked;return Ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Ny(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ts(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function p1(e,t){t=t.checked,t!=null&&Og(e,"checked",t,!1)}function pf(e,t){p1(e,t);var r=Ts(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gf(e,t.type,r):t.hasOwnProperty("defaultValue")&&gf(e,t.type,Ts(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ry(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function gf(e,t,r){(t!=="number"||Fu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Wa=Array.isArray;function No(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Ts(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function vf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return Ue({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ey(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error($(92));if(Wa(r)){if(1<r.length)throw Error($(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ts(r)}}function g1(e,t){var r=Ts(t.value),n=Ts(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function _y(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function v1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?v1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ac,x1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ac=Ac||document.createElement("div"),Ac.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ac.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var tl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CP=["Webkit","ms","Moz","O"];Object.keys(tl).forEach(function(e){CP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tl[t]=tl[e]})});function y1(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||tl.hasOwnProperty(e)&&tl[e]?(""+t).trim():t+"px"}function b1(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=y1(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var SP=Ue({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yf(e,t){if(t){if(SP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function bf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wf=null;function $g(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jf=null,Ro=null,Eo=null;function ky(e){if(e=lc(e)){if(typeof jf!="function")throw Error($(280));var t=e.stateNode;t&&(t=zd(t),jf(e.stateNode,e.type,t))}}function w1(e){Ro?Eo?Eo.push(e):Eo=[e]:Ro=e}function j1(){if(Ro){var e=Ro,t=Eo;if(Eo=Ro=null,ky(e),t)for(e=0;e<t.length;e++)ky(t[e])}}function C1(e,t){return e(t)}function S1(){}var Wh=!1;function N1(e,t,r){if(Wh)return e(t,r);Wh=!0;try{return C1(e,t,r)}finally{Wh=!1,(Ro!==null||Eo!==null)&&(S1(),j1())}}function bl(e,t){var r=e.stateNode;if(r===null)return null;var n=zd(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error($(231,t,typeof r));return r}var Cf=!1;if(Pn)try{var Ma={};Object.defineProperty(Ma,"passive",{get:function(){Cf=!0}}),window.addEventListener("test",Ma,Ma),window.removeEventListener("test",Ma,Ma)}catch{Cf=!1}function NP(e,t,r,n,s,o,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var rl=!1,zu=null,Vu=!1,Sf=null,RP={onError:function(e){rl=!0,zu=e}};function EP(e,t,r,n,s,o,a,l,c){rl=!1,zu=null,NP.apply(RP,arguments)}function _P(e,t,r,n,s,o,a,l,c){if(EP.apply(this,arguments),rl){if(rl){var u=zu;rl=!1,zu=null}else throw Error($(198));Vu||(Vu=!0,Sf=u)}}function Di(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function R1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ty(e){if(Di(e)!==e)throw Error($(188))}function kP(e){var t=e.alternate;if(!t){if(t=Di(e),t===null)throw Error($(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return Ty(s),e;if(o===n)return Ty(s),t;o=o.sibling}throw Error($(188))}if(r.return!==n.return)r=s,n=o;else{for(var a=!1,l=s.child;l;){if(l===r){a=!0,r=s,n=o;break}if(l===n){a=!0,n=s,r=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===r){a=!0,r=o,n=s;break}if(l===n){a=!0,n=o,r=s;break}l=l.sibling}if(!a)throw Error($(189))}}if(r.alternate!==n)throw Error($(190))}if(r.tag!==3)throw Error($(188));return r.stateNode.current===r?e:t}function E1(e){return e=kP(e),e!==null?_1(e):null}function _1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_1(e);if(t!==null)return t;e=e.sibling}return null}var k1=er.unstable_scheduleCallback,Py=er.unstable_cancelCallback,TP=er.unstable_shouldYield,PP=er.unstable_requestPaint,We=er.unstable_now,AP=er.unstable_getCurrentPriorityLevel,Fg=er.unstable_ImmediatePriority,T1=er.unstable_UserBlockingPriority,Uu=er.unstable_NormalPriority,MP=er.unstable_LowPriority,P1=er.unstable_IdlePriority,Dd=null,rn=null;function OP(e){if(rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(Dd,e,void 0,(e.current.flags&128)===128)}catch{}}var Lr=Math.clz32?Math.clz32:LP,IP=Math.log,DP=Math.LN2;function LP(e){return e>>>=0,e===0?32:31-(IP(e)/DP|0)|0}var Mc=64,Oc=4194304;function Ga(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,a=r&268435455;if(a!==0){var l=a&~s;l!==0?n=Ga(l):(o&=a,o!==0&&(n=Ga(o)))}else a=r&~s,a!==0?n=Ga(a):o!==0&&(n=Ga(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Lr(t),s=1<<r,n|=e[r],t&=~s;return n}function $P(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function FP(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Lr(o),l=1<<a,c=s[a];c===-1?(!(l&r)||l&n)&&(s[a]=$P(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function Nf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function A1(){var e=Mc;return Mc<<=1,!(Mc&4194240)&&(Mc=64),e}function Gh(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function oc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lr(t),e[t]=r}function zP(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-Lr(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function zg(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Lr(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var Re=0;function M1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var O1,Vg,I1,D1,L1,Rf=!1,Ic=[],bs=null,ws=null,js=null,wl=new Map,jl=new Map,ns=[],VP="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ay(e,t){switch(e){case"focusin":case"focusout":bs=null;break;case"dragenter":case"dragleave":ws=null;break;case"mouseover":case"mouseout":js=null;break;case"pointerover":case"pointerout":wl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jl.delete(t.pointerId)}}function Oa(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=lc(t),t!==null&&Vg(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function UP(e,t,r,n,s){switch(t){case"focusin":return bs=Oa(bs,e,t,r,n,s),!0;case"dragenter":return ws=Oa(ws,e,t,r,n,s),!0;case"mouseover":return js=Oa(js,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return wl.set(o,Oa(wl.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,jl.set(o,Oa(jl.get(o)||null,e,t,r,n,s)),!0}return!1}function $1(e){var t=ti(e.target);if(t!==null){var r=Di(t);if(r!==null){if(t=r.tag,t===13){if(t=R1(r),t!==null){e.blockedOn=t,L1(e.priority,function(){I1(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Ef(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);wf=n,r.target.dispatchEvent(n),wf=null}else return t=lc(r),t!==null&&Vg(t),e.blockedOn=r,!1;t.shift()}return!0}function My(e,t,r){fu(e)&&r.delete(t)}function BP(){Rf=!1,bs!==null&&fu(bs)&&(bs=null),ws!==null&&fu(ws)&&(ws=null),js!==null&&fu(js)&&(js=null),wl.forEach(My),jl.forEach(My)}function Ia(e,t){e.blockedOn===t&&(e.blockedOn=null,Rf||(Rf=!0,er.unstable_scheduleCallback(er.unstable_NormalPriority,BP)))}function Cl(e){function t(s){return Ia(s,e)}if(0<Ic.length){Ia(Ic[0],e);for(var r=1;r<Ic.length;r++){var n=Ic[r];n.blockedOn===e&&(n.blockedOn=null)}}for(bs!==null&&Ia(bs,e),ws!==null&&Ia(ws,e),js!==null&&Ia(js,e),wl.forEach(t),jl.forEach(t),r=0;r<ns.length;r++)n=ns[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<ns.length&&(r=ns[0],r.blockedOn===null);)$1(r),r.blockedOn===null&&ns.shift()}var _o=Fn.ReactCurrentBatchConfig,qu=!0;function qP(e,t,r,n){var s=Re,o=_o.transition;_o.transition=null;try{Re=1,Ug(e,t,r,n)}finally{Re=s,_o.transition=o}}function HP(e,t,r,n){var s=Re,o=_o.transition;_o.transition=null;try{Re=4,Ug(e,t,r,n)}finally{Re=s,_o.transition=o}}function Ug(e,t,r,n){if(qu){var s=Ef(e,t,r,n);if(s===null)nm(e,t,n,Hu,r),Ay(e,n);else if(UP(s,e,t,r,n))n.stopPropagation();else if(Ay(e,n),t&4&&-1<VP.indexOf(e)){for(;s!==null;){var o=lc(s);if(o!==null&&O1(o),o=Ef(e,t,r,n),o===null&&nm(e,t,n,Hu,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else nm(e,t,n,null,r)}}var Hu=null;function Ef(e,t,r,n){if(Hu=null,e=$g(n),e=ti(e),e!==null)if(t=Di(e),t===null)e=null;else if(r=t.tag,r===13){if(e=R1(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Hu=e,null}function F1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(AP()){case Fg:return 1;case T1:return 4;case Uu:case MP:return 16;case P1:return 536870912;default:return 16}default:return 16}}var gs=null,Bg=null,pu=null;function z1(){if(pu)return pu;var e,t=Bg,r=t.length,n,s="value"in gs?gs.value:gs.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===s[o-n];n++);return pu=s.slice(e,1<n?1-n:void 0)}function gu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Dc(){return!0}function Oy(){return!1}function rr(e){function t(r,n,s,o,a){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Dc:Oy,this.isPropagationStopped=Oy,this}return Ue(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Dc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Dc)},persist:function(){},isPersistent:Dc}),t}var fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qg=rr(fa),ac=Ue({},fa,{view:0,detail:0}),WP=rr(ac),Kh,Jh,Da,Ld=Ue({},ac,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Da&&(Da&&e.type==="mousemove"?(Kh=e.screenX-Da.screenX,Jh=e.screenY-Da.screenY):Jh=Kh=0,Da=e),Kh)},movementY:function(e){return"movementY"in e?e.movementY:Jh}}),Iy=rr(Ld),GP=Ue({},Ld,{dataTransfer:0}),KP=rr(GP),JP=Ue({},ac,{relatedTarget:0}),Yh=rr(JP),YP=Ue({},fa,{animationName:0,elapsedTime:0,pseudoElement:0}),XP=rr(YP),QP=Ue({},fa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ZP=rr(QP),eA=Ue({},fa,{data:0}),Dy=rr(eA),tA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rA={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},nA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sA(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nA[e])?!!t[e]:!1}function Hg(){return sA}var iA=Ue({},ac,{key:function(e){if(e.key){var t=tA[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rA[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hg,charCode:function(e){return e.type==="keypress"?gu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),oA=rr(iA),aA=Ue({},Ld,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ly=rr(aA),lA=Ue({},ac,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hg}),cA=rr(lA),uA=Ue({},fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),dA=rr(uA),hA=Ue({},Ld,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),mA=rr(hA),fA=[9,13,27,32],Wg=Pn&&"CompositionEvent"in window,nl=null;Pn&&"documentMode"in document&&(nl=document.documentMode);var pA=Pn&&"TextEvent"in window&&!nl,V1=Pn&&(!Wg||nl&&8<nl&&11>=nl),$y=" ",Fy=!1;function U1(e,t){switch(e){case"keyup":return fA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function B1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var co=!1;function gA(e,t){switch(e){case"compositionend":return B1(t);case"keypress":return t.which!==32?null:(Fy=!0,$y);case"textInput":return e=t.data,e===$y&&Fy?null:e;default:return null}}function vA(e,t){if(co)return e==="compositionend"||!Wg&&U1(e,t)?(e=z1(),pu=Bg=gs=null,co=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return V1&&t.locale!=="ko"?null:t.data;default:return null}}var xA={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function zy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xA[e.type]:t==="textarea"}function q1(e,t,r,n){w1(n),t=Wu(t,"onChange"),0<t.length&&(r=new qg("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var sl=null,Sl=null;function yA(e){tC(e,0)}function $d(e){var t=mo(e);if(f1(t))return e}function bA(e,t){if(e==="change")return t}var H1=!1;if(Pn){var Xh;if(Pn){var Qh="oninput"in document;if(!Qh){var Vy=document.createElement("div");Vy.setAttribute("oninput","return;"),Qh=typeof Vy.oninput=="function"}Xh=Qh}else Xh=!1;H1=Xh&&(!document.documentMode||9<document.documentMode)}function Uy(){sl&&(sl.detachEvent("onpropertychange",W1),Sl=sl=null)}function W1(e){if(e.propertyName==="value"&&$d(Sl)){var t=[];q1(t,Sl,e,$g(e)),N1(yA,t)}}function wA(e,t,r){e==="focusin"?(Uy(),sl=t,Sl=r,sl.attachEvent("onpropertychange",W1)):e==="focusout"&&Uy()}function jA(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $d(Sl)}function CA(e,t){if(e==="click")return $d(t)}function SA(e,t){if(e==="input"||e==="change")return $d(t)}function NA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zr=typeof Object.is=="function"?Object.is:NA;function Nl(e,t){if(zr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!cf.call(t,s)||!zr(e[s],t[s]))return!1}return!0}function By(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qy(e,t){var r=By(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=By(r)}}function G1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?G1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function K1(){for(var e=window,t=Fu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Fu(e.document)}return t}function Gg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function RA(e){var t=K1(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&G1(r.ownerDocument.documentElement,r)){if(n!==null&&Gg(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=qy(r,o);var a=qy(r,n);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var EA=Pn&&"documentMode"in document&&11>=document.documentMode,uo=null,_f=null,il=null,kf=!1;function Hy(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;kf||uo==null||uo!==Fu(n)||(n=uo,"selectionStart"in n&&Gg(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),il&&Nl(il,n)||(il=n,n=Wu(_f,"onSelect"),0<n.length&&(t=new qg("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=uo)))}function Lc(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var ho={animationend:Lc("Animation","AnimationEnd"),animationiteration:Lc("Animation","AnimationIteration"),animationstart:Lc("Animation","AnimationStart"),transitionend:Lc("Transition","TransitionEnd")},Zh={},J1={};Pn&&(J1=document.createElement("div").style,"AnimationEvent"in window||(delete ho.animationend.animation,delete ho.animationiteration.animation,delete ho.animationstart.animation),"TransitionEvent"in window||delete ho.transitionend.transition);function Fd(e){if(Zh[e])return Zh[e];if(!ho[e])return e;var t=ho[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in J1)return Zh[e]=t[r];return e}var Y1=Fd("animationend"),X1=Fd("animationiteration"),Q1=Fd("animationstart"),Z1=Fd("transitionend"),eC=new Map,Wy="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ls(e,t){eC.set(e,t),Ii(t,[e])}for(var em=0;em<Wy.length;em++){var tm=Wy[em],_A=tm.toLowerCase(),kA=tm[0].toUpperCase()+tm.slice(1);Ls(_A,"on"+kA)}Ls(Y1,"onAnimationEnd");Ls(X1,"onAnimationIteration");Ls(Q1,"onAnimationStart");Ls("dblclick","onDoubleClick");Ls("focusin","onFocus");Ls("focusout","onBlur");Ls(Z1,"onTransitionEnd");Xo("onMouseEnter",["mouseout","mouseover"]);Xo("onMouseLeave",["mouseout","mouseover"]);Xo("onPointerEnter",["pointerout","pointerover"]);Xo("onPointerLeave",["pointerout","pointerover"]);Ii("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ii("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ii("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ii("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ii("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ii("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ka="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),TA=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ka));function Gy(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,_P(n,t,void 0,e),e.currentTarget=null}function tC(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var a=n.length-1;0<=a;a--){var l=n[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;Gy(s,l,u),o=c}else for(a=0;a<n.length;a++){if(l=n[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;Gy(s,l,u),o=c}}}if(Vu)throw e=Sf,Vu=!1,Sf=null,e}function Pe(e,t){var r=t[Of];r===void 0&&(r=t[Of]=new Set);var n=e+"__bubble";r.has(n)||(rC(t,e,2,!1),r.add(n))}function rm(e,t,r){var n=0;t&&(n|=4),rC(r,e,n,t)}var $c="_reactListening"+Math.random().toString(36).slice(2);function Rl(e){if(!e[$c]){e[$c]=!0,c1.forEach(function(r){r!=="selectionchange"&&(TA.has(r)||rm(r,!1,e),rm(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$c]||(t[$c]=!0,rm("selectionchange",!1,t))}}function rC(e,t,r,n){switch(F1(t)){case 1:var s=qP;break;case 4:s=HP;break;default:s=Ug}r=s.bind(null,t,r,e),s=void 0,!Cf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function nm(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var l=n.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=n.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;l!==null;){if(a=ti(l),a===null)return;if(c=a.tag,c===5||c===6){n=o=a;continue e}l=l.parentNode}}n=n.return}N1(function(){var u=o,d=$g(r),h=[];e:{var m=eC.get(e);if(m!==void 0){var p=qg,b=e;switch(e){case"keypress":if(gu(r)===0)break e;case"keydown":case"keyup":p=oA;break;case"focusin":b="focus",p=Yh;break;case"focusout":b="blur",p=Yh;break;case"beforeblur":case"afterblur":p=Yh;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Iy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=KP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=cA;break;case Y1:case X1:case Q1:p=XP;break;case Z1:p=dA;break;case"scroll":p=WP;break;case"wheel":p=mA;break;case"copy":case"cut":case"paste":p=ZP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Ly}var g=(t&4)!==0,w=!g&&e==="scroll",x=g?m!==null?m+"Capture":null:m;g=[];for(var y=u,v;y!==null;){v=y;var j=v.stateNode;if(v.tag===5&&j!==null&&(v=j,x!==null&&(j=bl(y,x),j!=null&&g.push(El(y,j,v)))),w)break;y=y.return}0<g.length&&(m=new p(m,b,null,r,d),h.push({event:m,listeners:g}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",m&&r!==wf&&(b=r.relatedTarget||r.fromElement)&&(ti(b)||b[An]))break e;if((p||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,p?(b=r.relatedTarget||r.toElement,p=u,b=b?ti(b):null,b!==null&&(w=Di(b),b!==w||b.tag!==5&&b.tag!==6)&&(b=null)):(p=null,b=u),p!==b)){if(g=Iy,j="onMouseLeave",x="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=Ly,j="onPointerLeave",x="onPointerEnter",y="pointer"),w=p==null?m:mo(p),v=b==null?m:mo(b),m=new g(j,y+"leave",p,r,d),m.target=w,m.relatedTarget=v,j=null,ti(d)===u&&(g=new g(x,y+"enter",b,r,d),g.target=v,g.relatedTarget=w,j=g),w=j,p&&b)t:{for(g=p,x=b,y=0,v=g;v;v=Gi(v))y++;for(v=0,j=x;j;j=Gi(j))v++;for(;0<y-v;)g=Gi(g),y--;for(;0<v-y;)x=Gi(x),v--;for(;y--;){if(g===x||x!==null&&g===x.alternate)break t;g=Gi(g),x=Gi(x)}g=null}else g=null;p!==null&&Ky(h,m,p,g,!1),b!==null&&w!==null&&Ky(h,w,b,g,!0)}}e:{if(m=u?mo(u):window,p=m.nodeName&&m.nodeName.toLowerCase(),p==="select"||p==="input"&&m.type==="file")var C=bA;else if(zy(m))if(H1)C=SA;else{C=jA;var S=wA}else(p=m.nodeName)&&p.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(C=CA);if(C&&(C=C(e,u))){q1(h,C,r,d);break e}S&&S(e,m,u),e==="focusout"&&(S=m._wrapperState)&&S.controlled&&m.type==="number"&&gf(m,"number",m.value)}switch(S=u?mo(u):window,e){case"focusin":(zy(S)||S.contentEditable==="true")&&(uo=S,_f=u,il=null);break;case"focusout":il=_f=uo=null;break;case"mousedown":kf=!0;break;case"contextmenu":case"mouseup":case"dragend":kf=!1,Hy(h,r,d);break;case"selectionchange":if(EA)break;case"keydown":case"keyup":Hy(h,r,d)}var N;if(Wg)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else co?U1(e,r)&&(R="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(R="onCompositionStart");R&&(V1&&r.locale!=="ko"&&(co||R!=="onCompositionStart"?R==="onCompositionEnd"&&co&&(N=z1()):(gs=d,Bg="value"in gs?gs.value:gs.textContent,co=!0)),S=Wu(u,R),0<S.length&&(R=new Dy(R,e,null,r,d),h.push({event:R,listeners:S}),N?R.data=N:(N=B1(r),N!==null&&(R.data=N)))),(N=pA?gA(e,r):vA(e,r))&&(u=Wu(u,"onBeforeInput"),0<u.length&&(d=new Dy("onBeforeInput","beforeinput",null,r,d),h.push({event:d,listeners:u}),d.data=N))}tC(h,t)})}function El(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Wu(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=bl(e,r),o!=null&&n.unshift(El(e,o,s)),o=bl(e,t),o!=null&&n.push(El(e,o,s))),e=e.return}return n}function Gi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ky(e,t,r,n,s){for(var o=t._reactName,a=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,s?(c=bl(r,o),c!=null&&a.unshift(El(r,c,l))):s||(c=bl(r,o),c!=null&&a.push(El(r,c,l)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var PA=/\r\n?/g,AA=/\u0000|\uFFFD/g;function Jy(e){return(typeof e=="string"?e:""+e).replace(PA,`
`).replace(AA,"")}function Fc(e,t,r){if(t=Jy(t),Jy(e)!==t&&r)throw Error($(425))}function Gu(){}var Tf=null,Pf=null;function Af(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Mf=typeof setTimeout=="function"?setTimeout:void 0,MA=typeof clearTimeout=="function"?clearTimeout:void 0,Yy=typeof Promise=="function"?Promise:void 0,OA=typeof queueMicrotask=="function"?queueMicrotask:typeof Yy<"u"?function(e){return Yy.resolve(null).then(e).catch(IA)}:Mf;function IA(e){setTimeout(function(){throw e})}function sm(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Cl(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Cl(t)}function Cs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Xy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var pa=Math.random().toString(36).slice(2),Zr="__reactFiber$"+pa,_l="__reactProps$"+pa,An="__reactContainer$"+pa,Of="__reactEvents$"+pa,DA="__reactListeners$"+pa,LA="__reactHandles$"+pa;function ti(e){var t=e[Zr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[An]||r[Zr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Xy(e);e!==null;){if(r=e[Zr])return r;e=Xy(e)}return t}e=r,r=e.parentNode}return null}function lc(e){return e=e[Zr]||e[An],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function mo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function zd(e){return e[_l]||null}var If=[],fo=-1;function $s(e){return{current:e}}function Ae(e){0>fo||(e.current=If[fo],If[fo]=null,fo--)}function ke(e,t){fo++,If[fo]=e.current,e.current=t}var Ps={},Ct=$s(Ps),Ut=$s(!1),ji=Ps;function Qo(e,t){var r=e.type.contextTypes;if(!r)return Ps;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Bt(e){return e=e.childContextTypes,e!=null}function Ku(){Ae(Ut),Ae(Ct)}function Qy(e,t,r){if(Ct.current!==Ps)throw Error($(168));ke(Ct,t),ke(Ut,r)}function nC(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error($(108,wP(e)||"Unknown",s));return Ue({},r,n)}function Ju(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ps,ji=Ct.current,ke(Ct,e),ke(Ut,Ut.current),!0}function Zy(e,t,r){var n=e.stateNode;if(!n)throw Error($(169));r?(e=nC(e,t,ji),n.__reactInternalMemoizedMergedChildContext=e,Ae(Ut),Ae(Ct),ke(Ct,e)):Ae(Ut),ke(Ut,r)}var Cn=null,Vd=!1,im=!1;function sC(e){Cn===null?Cn=[e]:Cn.push(e)}function $A(e){Vd=!0,sC(e)}function Fs(){if(!im&&Cn!==null){im=!0;var e=0,t=Re;try{var r=Cn;for(Re=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Cn=null,Vd=!1}catch(s){throw Cn!==null&&(Cn=Cn.slice(e+1)),k1(Fg,Fs),s}finally{Re=t,im=!1}}return null}var po=[],go=0,Yu=null,Xu=0,lr=[],cr=0,Ci=null,Rn=1,En="";function Js(e,t){po[go++]=Xu,po[go++]=Yu,Yu=e,Xu=t}function iC(e,t,r){lr[cr++]=Rn,lr[cr++]=En,lr[cr++]=Ci,Ci=e;var n=Rn;e=En;var s=32-Lr(n)-1;n&=~(1<<s),r+=1;var o=32-Lr(t)+s;if(30<o){var a=s-s%5;o=(n&(1<<a)-1).toString(32),n>>=a,s-=a,Rn=1<<32-Lr(t)+s|r<<s|n,En=o+e}else Rn=1<<o|r<<s|n,En=e}function Kg(e){e.return!==null&&(Js(e,1),iC(e,1,0))}function Jg(e){for(;e===Yu;)Yu=po[--go],po[go]=null,Xu=po[--go],po[go]=null;for(;e===Ci;)Ci=lr[--cr],lr[cr]=null,En=lr[--cr],lr[cr]=null,Rn=lr[--cr],lr[cr]=null}var Qt=null,Xt=null,De=!1,Ir=null;function oC(e,t){var r=ur(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function e0(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Qt=e,Xt=Cs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Qt=e,Xt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Ci!==null?{id:Rn,overflow:En}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ur(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Qt=e,Xt=null,!0):!1;default:return!1}}function Df(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Lf(e){if(De){var t=Xt;if(t){var r=t;if(!e0(e,t)){if(Df(e))throw Error($(418));t=Cs(r.nextSibling);var n=Qt;t&&e0(e,t)?oC(n,r):(e.flags=e.flags&-4097|2,De=!1,Qt=e)}}else{if(Df(e))throw Error($(418));e.flags=e.flags&-4097|2,De=!1,Qt=e}}}function t0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Qt=e}function zc(e){if(e!==Qt)return!1;if(!De)return t0(e),De=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Af(e.type,e.memoizedProps)),t&&(t=Xt)){if(Df(e))throw aC(),Error($(418));for(;t;)oC(e,t),t=Cs(t.nextSibling)}if(t0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Xt=Cs(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Xt=null}}else Xt=Qt?Cs(e.stateNode.nextSibling):null;return!0}function aC(){for(var e=Xt;e;)e=Cs(e.nextSibling)}function Zo(){Xt=Qt=null,De=!1}function Yg(e){Ir===null?Ir=[e]:Ir.push(e)}var FA=Fn.ReactCurrentBatchConfig;function La(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error($(309));var n=r.stateNode}if(!n)throw Error($(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var l=s.refs;a===null?delete l[o]:l[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error($(284));if(!r._owner)throw Error($(290,e))}return e}function Vc(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function r0(e){var t=e._init;return t(e._payload)}function lC(e){function t(x,y){if(e){var v=x.deletions;v===null?(x.deletions=[y],x.flags|=16):v.push(y)}}function r(x,y){if(!e)return null;for(;y!==null;)t(x,y),y=y.sibling;return null}function n(x,y){for(x=new Map;y!==null;)y.key!==null?x.set(y.key,y):x.set(y.index,y),y=y.sibling;return x}function s(x,y){return x=Es(x,y),x.index=0,x.sibling=null,x}function o(x,y,v){return x.index=v,e?(v=x.alternate,v!==null?(v=v.index,v<y?(x.flags|=2,y):v):(x.flags|=2,y)):(x.flags|=1048576,y)}function a(x){return e&&x.alternate===null&&(x.flags|=2),x}function l(x,y,v,j){return y===null||y.tag!==6?(y=hm(v,x.mode,j),y.return=x,y):(y=s(y,v),y.return=x,y)}function c(x,y,v,j){var C=v.type;return C===lo?d(x,y,v.props.children,j,v.key):y!==null&&(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===es&&r0(C)===y.type)?(j=s(y,v.props),j.ref=La(x,y,v),j.return=x,j):(j=Cu(v.type,v.key,v.props,null,x.mode,j),j.ref=La(x,y,v),j.return=x,j)}function u(x,y,v,j){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=mm(v,x.mode,j),y.return=x,y):(y=s(y,v.children||[]),y.return=x,y)}function d(x,y,v,j,C){return y===null||y.tag!==7?(y=yi(v,x.mode,j,C),y.return=x,y):(y=s(y,v),y.return=x,y)}function h(x,y,v){if(typeof y=="string"&&y!==""||typeof y=="number")return y=hm(""+y,x.mode,v),y.return=x,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Tc:return v=Cu(y.type,y.key,y.props,null,x.mode,v),v.ref=La(x,null,y),v.return=x,v;case ao:return y=mm(y,x.mode,v),y.return=x,y;case es:var j=y._init;return h(x,j(y._payload),v)}if(Wa(y)||Aa(y))return y=yi(y,x.mode,v,null),y.return=x,y;Vc(x,y)}return null}function m(x,y,v,j){var C=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return C!==null?null:l(x,y,""+v,j);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Tc:return v.key===C?c(x,y,v,j):null;case ao:return v.key===C?u(x,y,v,j):null;case es:return C=v._init,m(x,y,C(v._payload),j)}if(Wa(v)||Aa(v))return C!==null?null:d(x,y,v,j,null);Vc(x,v)}return null}function p(x,y,v,j,C){if(typeof j=="string"&&j!==""||typeof j=="number")return x=x.get(v)||null,l(y,x,""+j,C);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Tc:return x=x.get(j.key===null?v:j.key)||null,c(y,x,j,C);case ao:return x=x.get(j.key===null?v:j.key)||null,u(y,x,j,C);case es:var S=j._init;return p(x,y,v,S(j._payload),C)}if(Wa(j)||Aa(j))return x=x.get(v)||null,d(y,x,j,C,null);Vc(y,j)}return null}function b(x,y,v,j){for(var C=null,S=null,N=y,R=y=0,k=null;N!==null&&R<v.length;R++){N.index>R?(k=N,N=null):k=N.sibling;var T=m(x,N,v[R],j);if(T===null){N===null&&(N=k);break}e&&N&&T.alternate===null&&t(x,N),y=o(T,y,R),S===null?C=T:S.sibling=T,S=T,N=k}if(R===v.length)return r(x,N),De&&Js(x,R),C;if(N===null){for(;R<v.length;R++)N=h(x,v[R],j),N!==null&&(y=o(N,y,R),S===null?C=N:S.sibling=N,S=N);return De&&Js(x,R),C}for(N=n(x,N);R<v.length;R++)k=p(N,x,R,v[R],j),k!==null&&(e&&k.alternate!==null&&N.delete(k.key===null?R:k.key),y=o(k,y,R),S===null?C=k:S.sibling=k,S=k);return e&&N.forEach(function(O){return t(x,O)}),De&&Js(x,R),C}function g(x,y,v,j){var C=Aa(v);if(typeof C!="function")throw Error($(150));if(v=C.call(v),v==null)throw Error($(151));for(var S=C=null,N=y,R=y=0,k=null,T=v.next();N!==null&&!T.done;R++,T=v.next()){N.index>R?(k=N,N=null):k=N.sibling;var O=m(x,N,T.value,j);if(O===null){N===null&&(N=k);break}e&&N&&O.alternate===null&&t(x,N),y=o(O,y,R),S===null?C=O:S.sibling=O,S=O,N=k}if(T.done)return r(x,N),De&&Js(x,R),C;if(N===null){for(;!T.done;R++,T=v.next())T=h(x,T.value,j),T!==null&&(y=o(T,y,R),S===null?C=T:S.sibling=T,S=T);return De&&Js(x,R),C}for(N=n(x,N);!T.done;R++,T=v.next())T=p(N,x,R,T.value,j),T!==null&&(e&&T.alternate!==null&&N.delete(T.key===null?R:T.key),y=o(T,y,R),S===null?C=T:S.sibling=T,S=T);return e&&N.forEach(function(A){return t(x,A)}),De&&Js(x,R),C}function w(x,y,v,j){if(typeof v=="object"&&v!==null&&v.type===lo&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Tc:e:{for(var C=v.key,S=y;S!==null;){if(S.key===C){if(C=v.type,C===lo){if(S.tag===7){r(x,S.sibling),y=s(S,v.props.children),y.return=x,x=y;break e}}else if(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===es&&r0(C)===S.type){r(x,S.sibling),y=s(S,v.props),y.ref=La(x,S,v),y.return=x,x=y;break e}r(x,S);break}else t(x,S);S=S.sibling}v.type===lo?(y=yi(v.props.children,x.mode,j,v.key),y.return=x,x=y):(j=Cu(v.type,v.key,v.props,null,x.mode,j),j.ref=La(x,y,v),j.return=x,x=j)}return a(x);case ao:e:{for(S=v.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){r(x,y.sibling),y=s(y,v.children||[]),y.return=x,x=y;break e}else{r(x,y);break}else t(x,y);y=y.sibling}y=mm(v,x.mode,j),y.return=x,x=y}return a(x);case es:return S=v._init,w(x,y,S(v._payload),j)}if(Wa(v))return b(x,y,v,j);if(Aa(v))return g(x,y,v,j);Vc(x,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(r(x,y.sibling),y=s(y,v),y.return=x,x=y):(r(x,y),y=hm(v,x.mode,j),y.return=x,x=y),a(x)):r(x,y)}return w}var ea=lC(!0),cC=lC(!1),Qu=$s(null),Zu=null,vo=null,Xg=null;function Qg(){Xg=vo=Zu=null}function Zg(e){var t=Qu.current;Ae(Qu),e._currentValue=t}function $f(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ko(e,t){Zu=e,Xg=vo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Vt=!0),e.firstContext=null)}function gr(e){var t=e._currentValue;if(Xg!==e)if(e={context:e,memoizedValue:t,next:null},vo===null){if(Zu===null)throw Error($(308));vo=e,Zu.dependencies={lanes:0,firstContext:e}}else vo=vo.next=e;return t}var ri=null;function ev(e){ri===null?ri=[e]:ri.push(e)}function uC(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,ev(t)):(r.next=s.next,s.next=r),t.interleaved=r,Mn(e,n)}function Mn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ts=!1;function tv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dC(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _n(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ss(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,we&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Mn(e,r)}return s=n.interleaved,s===null?(t.next=t,ev(n)):(t.next=s.next,s.next=t),n.interleaved=t,Mn(e,r)}function vu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,zg(e,r)}}function n0(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=a:o=o.next=a,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ed(e,t,r,n){var s=e.updateQueue;ts=!1;var o=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?o=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var h=s.baseState;a=0,d=u=c=null,l=o;do{var m=l.lane,p=l.eventTime;if((n&m)===m){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var b=e,g=l;switch(m=t,p=r,g.tag){case 1:if(b=g.payload,typeof b=="function"){h=b.call(p,h,m);break e}h=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=g.payload,m=typeof b=="function"?b.call(p,h,m):b,m==null)break e;h=Ue({},h,m);break e;case 2:ts=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[l]:m.push(l))}else p={eventTime:p,lane:m,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=h):d=d.next=p,a|=m;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;m=l,l=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Ni|=a,e.lanes=a,e.memoizedState=h}}function s0(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error($(191,s));s.call(n)}}}var cc={},nn=$s(cc),kl=$s(cc),Tl=$s(cc);function ni(e){if(e===cc)throw Error($(174));return e}function rv(e,t){switch(ke(Tl,t),ke(kl,e),ke(nn,cc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xf(t,e)}Ae(nn),ke(nn,t)}function ta(){Ae(nn),Ae(kl),Ae(Tl)}function hC(e){ni(Tl.current);var t=ni(nn.current),r=xf(t,e.type);t!==r&&(ke(kl,e),ke(nn,r))}function nv(e){kl.current===e&&(Ae(nn),Ae(kl))}var Fe=$s(0);function td(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var om=[];function sv(){for(var e=0;e<om.length;e++)om[e]._workInProgressVersionPrimary=null;om.length=0}var xu=Fn.ReactCurrentDispatcher,am=Fn.ReactCurrentBatchConfig,Si=0,Ve=null,st=null,lt=null,rd=!1,ol=!1,Pl=0,zA=0;function xt(){throw Error($(321))}function iv(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!zr(e[r],t[r]))return!1;return!0}function ov(e,t,r,n,s,o){if(Si=o,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xu.current=e===null||e.memoizedState===null?qA:HA,e=r(n,s),ol){o=0;do{if(ol=!1,Pl=0,25<=o)throw Error($(301));o+=1,lt=st=null,t.updateQueue=null,xu.current=WA,e=r(n,s)}while(ol)}if(xu.current=nd,t=st!==null&&st.next!==null,Si=0,lt=st=Ve=null,rd=!1,t)throw Error($(300));return e}function av(){var e=Pl!==0;return Pl=0,e}function Jr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Ve.memoizedState=lt=e:lt=lt.next=e,lt}function vr(){if(st===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=lt===null?Ve.memoizedState:lt.next;if(t!==null)lt=t,st=e;else{if(e===null)throw Error($(310));st=e,e={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},lt===null?Ve.memoizedState=lt=e:lt=lt.next=e}return lt}function Al(e,t){return typeof t=="function"?t(e):t}function lm(e){var t=vr(),r=t.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=e;var n=st,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var a=s.next;s.next=o.next,o.next=a}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var l=a=null,c=null,u=o;do{var d=u.lane;if((Si&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,a=n):c=c.next=h,Ve.lanes|=d,Ni|=d}u=u.next}while(u!==null&&u!==o);c===null?a=n:c.next=l,zr(n,t.memoizedState)||(Vt=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,Ve.lanes|=o,Ni|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function cm(e){var t=vr(),r=t.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var a=s=s.next;do o=e(o,a.action),a=a.next;while(a!==s);zr(o,t.memoizedState)||(Vt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function mC(){}function fC(e,t){var r=Ve,n=vr(),s=t(),o=!zr(n.memoizedState,s);if(o&&(n.memoizedState=s,Vt=!0),n=n.queue,lv(vC.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||lt!==null&<.memoizedState.tag&1){if(r.flags|=2048,Ml(9,gC.bind(null,r,n,s,t),void 0,null),ct===null)throw Error($(349));Si&30||pC(r,t,s)}return s}function pC(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function gC(e,t,r,n){t.value=r,t.getSnapshot=n,xC(t)&&yC(e)}function vC(e,t,r){return r(function(){xC(t)&&yC(e)})}function xC(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!zr(e,r)}catch{return!0}}function yC(e){var t=Mn(e,1);t!==null&&$r(t,e,1,-1)}function i0(e){var t=Jr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Al,lastRenderedState:e},t.queue=e,e=e.dispatch=BA.bind(null,Ve,e),[t.memoizedState,e]}function Ml(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function bC(){return vr().memoizedState}function yu(e,t,r,n){var s=Jr();Ve.flags|=e,s.memoizedState=Ml(1|t,r,void 0,n===void 0?null:n)}function Ud(e,t,r,n){var s=vr();n=n===void 0?null:n;var o=void 0;if(st!==null){var a=st.memoizedState;if(o=a.destroy,n!==null&&iv(n,a.deps)){s.memoizedState=Ml(t,r,o,n);return}}Ve.flags|=e,s.memoizedState=Ml(1|t,r,o,n)}function o0(e,t){return yu(8390656,8,e,t)}function lv(e,t){return Ud(2048,8,e,t)}function wC(e,t){return Ud(4,2,e,t)}function jC(e,t){return Ud(4,4,e,t)}function CC(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function SC(e,t,r){return r=r!=null?r.concat([e]):null,Ud(4,4,CC.bind(null,t,e),r)}function cv(){}function NC(e,t){var r=vr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&iv(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function RC(e,t){var r=vr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&iv(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function EC(e,t,r){return Si&21?(zr(r,t)||(r=A1(),Ve.lanes|=r,Ni|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Vt=!0),e.memoizedState=r)}function VA(e,t){var r=Re;Re=r!==0&&4>r?r:4,e(!0);var n=am.transition;am.transition={};try{e(!1),t()}finally{Re=r,am.transition=n}}function _C(){return vr().memoizedState}function UA(e,t,r){var n=Rs(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},kC(e))TC(t,r);else if(r=uC(e,t,r,n),r!==null){var s=Pt();$r(r,e,n,s),PC(r,t,n)}}function BA(e,t,r){var n=Rs(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(kC(e))TC(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,r);if(s.hasEagerState=!0,s.eagerState=l,zr(l,a)){var c=t.interleaved;c===null?(s.next=s,ev(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}r=uC(e,t,s,n),r!==null&&(s=Pt(),$r(r,e,n,s),PC(r,t,n))}}function kC(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function TC(e,t){ol=rd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function PC(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,zg(e,r)}}var nd={readContext:gr,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useInsertionEffect:xt,useLayoutEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useMutableSource:xt,useSyncExternalStore:xt,useId:xt,unstable_isNewReconciler:!1},qA={readContext:gr,useCallback:function(e,t){return Jr().memoizedState=[e,t===void 0?null:t],e},useContext:gr,useEffect:o0,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,yu(4194308,4,CC.bind(null,t,e),r)},useLayoutEffect:function(e,t){return yu(4194308,4,e,t)},useInsertionEffect:function(e,t){return yu(4,2,e,t)},useMemo:function(e,t){var r=Jr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Jr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=UA.bind(null,Ve,e),[n.memoizedState,e]},useRef:function(e){var t=Jr();return e={current:e},t.memoizedState=e},useState:i0,useDebugValue:cv,useDeferredValue:function(e){return Jr().memoizedState=e},useTransition:function(){var e=i0(!1),t=e[0];return e=VA.bind(null,e[1]),Jr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ve,s=Jr();if(De){if(r===void 0)throw Error($(407));r=r()}else{if(r=t(),ct===null)throw Error($(349));Si&30||pC(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,o0(vC.bind(null,n,o,e),[e]),n.flags|=2048,Ml(9,gC.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Jr(),t=ct.identifierPrefix;if(De){var r=En,n=Rn;r=(n&~(1<<32-Lr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Pl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=zA++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},HA={readContext:gr,useCallback:NC,useContext:gr,useEffect:lv,useImperativeHandle:SC,useInsertionEffect:wC,useLayoutEffect:jC,useMemo:RC,useReducer:lm,useRef:bC,useState:function(){return lm(Al)},useDebugValue:cv,useDeferredValue:function(e){var t=vr();return EC(t,st.memoizedState,e)},useTransition:function(){var e=lm(Al)[0],t=vr().memoizedState;return[e,t]},useMutableSource:mC,useSyncExternalStore:fC,useId:_C,unstable_isNewReconciler:!1},WA={readContext:gr,useCallback:NC,useContext:gr,useEffect:lv,useImperativeHandle:SC,useInsertionEffect:wC,useLayoutEffect:jC,useMemo:RC,useReducer:cm,useRef:bC,useState:function(){return cm(Al)},useDebugValue:cv,useDeferredValue:function(e){var t=vr();return st===null?t.memoizedState=e:EC(t,st.memoizedState,e)},useTransition:function(){var e=cm(Al)[0],t=vr().memoizedState;return[e,t]},useMutableSource:mC,useSyncExternalStore:fC,useId:_C,unstable_isNewReconciler:!1};function kr(e,t){if(e&&e.defaultProps){t=Ue({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Ff(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Ue({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Bd={isMounted:function(e){return(e=e._reactInternals)?Di(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Pt(),s=Rs(e),o=_n(n,s);o.payload=t,r!=null&&(o.callback=r),t=Ss(e,o,s),t!==null&&($r(t,e,s,n),vu(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Pt(),s=Rs(e),o=_n(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=Ss(e,o,s),t!==null&&($r(t,e,s,n),vu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Pt(),n=Rs(e),s=_n(r,n);s.tag=2,t!=null&&(s.callback=t),t=Ss(e,s,n),t!==null&&($r(t,e,n,r),vu(t,e,n))}};function a0(e,t,r,n,s,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,a):t.prototype&&t.prototype.isPureReactComponent?!Nl(r,n)||!Nl(s,o):!0}function AC(e,t,r){var n=!1,s=Ps,o=t.contextType;return typeof o=="object"&&o!==null?o=gr(o):(s=Bt(t)?ji:Ct.current,n=t.contextTypes,o=(n=n!=null)?Qo(e,s):Ps),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Bd,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function l0(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Bd.enqueueReplaceState(t,t.state,null)}function zf(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},tv(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=gr(o):(o=Bt(t)?ji:Ct.current,s.context=Qo(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Ff(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Bd.enqueueReplaceState(s,s.state,null),ed(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ra(e,t){try{var r="",n=t;do r+=bP(n),n=n.return;while(n);var s=r}catch(o){s=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function um(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Vf(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var GA=typeof WeakMap=="function"?WeakMap:Map;function MC(e,t,r){r=_n(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){id||(id=!0,Xf=n),Vf(e,t)},r}function OC(e,t,r){r=_n(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Vf(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){Vf(e,t),typeof n!="function"&&(Ns===null?Ns=new Set([this]):Ns.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function c0(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new GA;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=aM.bind(null,e,t,r),t.then(e,e))}function u0(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function d0(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=_n(-1,1),t.tag=2,Ss(r,t,1))),r.lanes|=1),e)}var KA=Fn.ReactCurrentOwner,Vt=!1;function Rt(e,t,r,n){t.child=e===null?cC(t,null,r,n):ea(t,e.child,r,n)}function h0(e,t,r,n,s){r=r.render;var o=t.ref;return ko(t,s),n=ov(e,t,r,n,o,s),r=av(),e!==null&&!Vt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,On(e,t,s)):(De&&r&&Kg(t),t.flags|=1,Rt(e,t,n,s),t.child)}function m0(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!vv(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,IC(e,t,o,n,s)):(e=Cu(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var a=o.memoizedProps;if(r=r.compare,r=r!==null?r:Nl,r(a,n)&&e.ref===t.ref)return On(e,t,s)}return t.flags|=1,e=Es(o,n),e.ref=t.ref,e.return=t,t.child=e}function IC(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(Nl(o,n)&&e.ref===t.ref)if(Vt=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(Vt=!0);else return t.lanes=e.lanes,On(e,t,s)}return Uf(e,t,r,n,s)}function DC(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ke(yo,Gt),Gt|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ke(yo,Gt),Gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,ke(yo,Gt),Gt|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,ke(yo,Gt),Gt|=n;return Rt(e,t,s,r),t.child}function LC(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Uf(e,t,r,n,s){var o=Bt(r)?ji:Ct.current;return o=Qo(t,o),ko(t,s),r=ov(e,t,r,n,o,s),n=av(),e!==null&&!Vt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,On(e,t,s)):(De&&n&&Kg(t),t.flags|=1,Rt(e,t,r,s),t.child)}function f0(e,t,r,n,s){if(Bt(r)){var o=!0;Ju(t)}else o=!1;if(ko(t,s),t.stateNode===null)bu(e,t),AC(t,r,n),zf(t,r,n,s),n=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var c=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=gr(u):(u=Bt(r)?ji:Ct.current,u=Qo(t,u));var d=r.getDerivedStateFromProps,h=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==n||c!==u)&&l0(t,a,n,u),ts=!1;var m=t.memoizedState;a.state=m,ed(t,n,a,s),c=t.memoizedState,l!==n||m!==c||Ut.current||ts?(typeof d=="function"&&(Ff(t,r,d,n),c=t.memoizedState),(l=ts||a0(t,r,l,n,m,c,u))?(h||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),a.props=n,a.state=c,a.context=u,n=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,dC(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:kr(t.type,l),a.props=u,h=t.pendingProps,m=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=gr(c):(c=Bt(r)?ji:Ct.current,c=Qo(t,c));var p=r.getDerivedStateFromProps;(d=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==h||m!==c)&&l0(t,a,n,c),ts=!1,m=t.memoizedState,a.state=m,ed(t,n,a,s);var b=t.memoizedState;l!==h||m!==b||Ut.current||ts?(typeof p=="function"&&(Ff(t,r,p,n),b=t.memoizedState),(u=ts||a0(t,r,u,n,m,b,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,b,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,b,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=b),a.props=n,a.state=b,a.context=c,n=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),n=!1)}return Bf(e,t,r,n,o,s)}function Bf(e,t,r,n,s,o){LC(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return s&&Zy(t,r,!1),On(e,t,o);n=t.stateNode,KA.current=t;var l=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=ea(t,e.child,null,o),t.child=ea(t,null,l,o)):Rt(e,t,l,o),t.memoizedState=n.state,s&&Zy(t,r,!0),t.child}function $C(e){var t=e.stateNode;t.pendingContext?Qy(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Qy(e,t.context,!1),rv(e,t.containerInfo)}function p0(e,t,r,n,s){return Zo(),Yg(s),t.flags|=256,Rt(e,t,r,n),t.child}var qf={dehydrated:null,treeContext:null,retryLane:0};function Hf(e){return{baseLanes:e,cachePool:null,transitions:null}}function FC(e,t,r){var n=t.pendingProps,s=Fe.current,o=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ke(Fe,s&1),e===null)return Lf(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=n.children,e=n.fallback,o?(n=t.mode,o=t.child,a={mode:"hidden",children:a},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Wd(a,n,0,null),e=yi(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Hf(r),t.memoizedState=qf,e):uv(t,a));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return JA(e,t,a,n,l,s,r);if(o){o=n.fallback,a=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:n.children};return!(a&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=Es(s,c),n.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=Es(l,o):(o=yi(o,a,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,a=e.child.memoizedState,a=a===null?Hf(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~r,t.memoizedState=qf,n}return o=e.child,e=o.sibling,n=Es(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function uv(e,t){return t=Wd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Uc(e,t,r,n){return n!==null&&Yg(n),ea(t,e.child,null,r),e=uv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function JA(e,t,r,n,s,o,a){if(r)return t.flags&256?(t.flags&=-257,n=um(Error($(422))),Uc(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=Wd({mode:"visible",children:n.children},s,0,null),o=yi(o,s,a,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&ea(t,e.child,null,a),t.child.memoizedState=Hf(a),t.memoizedState=qf,o);if(!(t.mode&1))return Uc(e,t,a,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var l=n.dgst;return n=l,o=Error($(419)),n=um(o,n,void 0),Uc(e,t,a,n)}if(l=(a&e.childLanes)!==0,Vt||l){if(n=ct,n!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|a)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Mn(e,s),$r(n,e,s,-1))}return gv(),n=um(Error($(421))),Uc(e,t,a,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=lM.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Xt=Cs(s.nextSibling),Qt=t,De=!0,Ir=null,e!==null&&(lr[cr++]=Rn,lr[cr++]=En,lr[cr++]=Ci,Rn=e.id,En=e.overflow,Ci=t),t=uv(t,n.children),t.flags|=4096,t)}function g0(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),$f(e.return,t,r)}function dm(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function zC(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(Rt(e,t,n.children,r),n=Fe.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&g0(e,r,t);else if(e.tag===19)g0(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(ke(Fe,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&td(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),dm(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&td(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}dm(t,!0,r,null,o);break;case"together":dm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function bu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function On(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ni|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,r=Es(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Es(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function YA(e,t,r){switch(t.tag){case 3:$C(t),Zo();break;case 5:hC(t);break;case 1:Bt(t.type)&&Ju(t);break;case 4:rv(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;ke(Qu,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ke(Fe,Fe.current&1),t.flags|=128,null):r&t.child.childLanes?FC(e,t,r):(ke(Fe,Fe.current&1),e=On(e,t,r),e!==null?e.sibling:null);ke(Fe,Fe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return zC(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ke(Fe,Fe.current),n)break;return null;case 22:case 23:return t.lanes=0,DC(e,t,r)}return On(e,t,r)}var VC,Wf,UC,BC;VC=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Wf=function(){};UC=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,ni(nn.current);var o=null;switch(r){case"input":s=ff(e,s),n=ff(e,n),o=[];break;case"select":s=Ue({},s,{value:void 0}),n=Ue({},n,{value:void 0}),o=[];break;case"textarea":s=vf(e,s),n=vf(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Gu)}yf(r,n);var a;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(a in l)l.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(xl.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var c=n[u];if(l=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(o||(o=[]),o.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(xl.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Pe("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}r&&(o=o||[]).push("style",r);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};BC=function(e,t,r,n){r!==n&&(t.flags|=4)};function $a(e,t){if(!De)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function XA(e,t,r){var n=t.pendingProps;switch(Jg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return Bt(t.type)&&Ku(),yt(t),null;case 3:return n=t.stateNode,ta(),Ae(Ut),Ae(Ct),sv(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ir!==null&&(ep(Ir),Ir=null))),Wf(e,t),yt(t),null;case 5:nv(t);var s=ni(Tl.current);if(r=t.type,e!==null&&t.stateNode!=null)UC(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error($(166));return yt(t),null}if(e=ni(nn.current),zc(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Zr]=t,n[_l]=o,e=(t.mode&1)!==0,r){case"dialog":Pe("cancel",n),Pe("close",n);break;case"iframe":case"object":case"embed":Pe("load",n);break;case"video":case"audio":for(s=0;s<Ka.length;s++)Pe(Ka[s],n);break;case"source":Pe("error",n);break;case"img":case"image":case"link":Pe("error",n),Pe("load",n);break;case"details":Pe("toggle",n);break;case"input":Ny(n,o),Pe("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},Pe("invalid",n);break;case"textarea":Ey(n,o),Pe("invalid",n)}yf(r,o),s=null;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="children"?typeof l=="string"?n.textContent!==l&&(o.suppressHydrationWarning!==!0&&Fc(n.textContent,l,e),s=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Fc(n.textContent,l,e),s=["children",""+l]):xl.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Pe("scroll",n)}switch(r){case"input":Pc(n),Ry(n,o,!0);break;case"textarea":Pc(n),_y(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=Gu)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=v1(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Zr]=t,e[_l]=n,VC(e,t,!1,!1),t.stateNode=e;e:{switch(a=bf(r,n),r){case"dialog":Pe("cancel",e),Pe("close",e),s=n;break;case"iframe":case"object":case"embed":Pe("load",e),s=n;break;case"video":case"audio":for(s=0;s<Ka.length;s++)Pe(Ka[s],e);s=n;break;case"source":Pe("error",e),s=n;break;case"img":case"image":case"link":Pe("error",e),Pe("load",e),s=n;break;case"details":Pe("toggle",e),s=n;break;case"input":Ny(e,n),s=ff(e,n),Pe("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=Ue({},n,{value:void 0}),Pe("invalid",e);break;case"textarea":Ey(e,n),s=vf(e,n),Pe("invalid",e);break;default:s=n}yf(r,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?b1(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&x1(e,c)):o==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&yl(e,c):typeof c=="number"&&yl(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(xl.hasOwnProperty(o)?c!=null&&o==="onScroll"&&Pe("scroll",e):c!=null&&Og(e,o,c,a))}switch(r){case"input":Pc(e),Ry(e,n,!1);break;case"textarea":Pc(e),_y(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Ts(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?No(e,!!n.multiple,o,!1):n.defaultValue!=null&&No(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Gu)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return yt(t),null;case 6:if(e&&t.stateNode!=null)BC(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error($(166));if(r=ni(Tl.current),ni(nn.current),zc(t)){if(n=t.stateNode,r=t.memoizedProps,n[Zr]=t,(o=n.nodeValue!==r)&&(e=Qt,e!==null))switch(e.tag){case 3:Fc(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Fc(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Zr]=t,t.stateNode=n}return yt(t),null;case 13:if(Ae(Fe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(De&&Xt!==null&&t.mode&1&&!(t.flags&128))aC(),Zo(),t.flags|=98560,o=!1;else if(o=zc(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error($(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error($(317));o[Zr]=t}else Zo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yt(t),o=!1}else Ir!==null&&(ep(Ir),Ir=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Fe.current&1?ot===0&&(ot=3):gv())),t.updateQueue!==null&&(t.flags|=4),yt(t),null);case 4:return ta(),Wf(e,t),e===null&&Rl(t.stateNode.containerInfo),yt(t),null;case 10:return Zg(t.type._context),yt(t),null;case 17:return Bt(t.type)&&Ku(),yt(t),null;case 19:if(Ae(Fe),o=t.memoizedState,o===null)return yt(t),null;if(n=(t.flags&128)!==0,a=o.rendering,a===null)if(n)$a(o,!1);else{if(ot!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=td(e),a!==null){for(t.flags|=128,$a(o,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ke(Fe,Fe.current&1|2),t.child}e=e.sibling}o.tail!==null&&We()>na&&(t.flags|=128,n=!0,$a(o,!1),t.lanes=4194304)}else{if(!n)if(e=td(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),$a(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!De)return yt(t),null}else 2*We()-o.renderingStartTime>na&&r!==1073741824&&(t.flags|=128,n=!0,$a(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(r=o.last,r!==null?r.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=We(),t.sibling=null,r=Fe.current,ke(Fe,n?r&1|2:r&1),t):(yt(t),null);case 22:case 23:return pv(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Gt&1073741824&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function QA(e,t){switch(Jg(t),t.tag){case 1:return Bt(t.type)&&Ku(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ta(),Ae(Ut),Ae(Ct),sv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nv(t),null;case 13:if(Ae(Fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Zo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ae(Fe),null;case 4:return ta(),null;case 10:return Zg(t.type._context),null;case 22:case 23:return pv(),null;case 24:return null;default:return null}}var Bc=!1,wt=!1,ZA=typeof WeakSet=="function"?WeakSet:Set,Y=null;function xo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){He(e,t,n)}else r.current=null}function Gf(e,t,r){try{r()}catch(n){He(e,t,n)}}var v0=!1;function eM(e,t){if(Tf=qu,e=K1(),Gg(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var a=0,l=-1,c=-1,u=0,d=0,h=e,m=null;t:for(;;){for(var p;h!==r||s!==0&&h.nodeType!==3||(l=a+s),h!==o||n!==0&&h.nodeType!==3||(c=a+n),h.nodeType===3&&(a+=h.nodeValue.length),(p=h.firstChild)!==null;)m=h,h=p;for(;;){if(h===e)break t;if(m===r&&++u===s&&(l=a),m===o&&++d===n&&(c=a),(p=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=p}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Pf={focusedElem:e,selectionRange:r},qu=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var g=b.memoizedProps,w=b.memoizedState,x=t.stateNode,y=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:kr(t.type,g),w);x.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(j){He(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return b=v0,v0=!1,b}function al(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Gf(t,r,o)}s=s.next}while(s!==n)}}function qd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Kf(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function qC(e){var t=e.alternate;t!==null&&(e.alternate=null,qC(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zr],delete t[_l],delete t[Of],delete t[DA],delete t[LA])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function HC(e){return e.tag===5||e.tag===3||e.tag===4}function x0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||HC(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jf(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Gu));else if(n!==4&&(e=e.child,e!==null))for(Jf(e,t,r),e=e.sibling;e!==null;)Jf(e,t,r),e=e.sibling}function Yf(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Yf(e,t,r),e=e.sibling;e!==null;)Yf(e,t,r),e=e.sibling}var mt=null,Mr=!1;function Gn(e,t,r){for(r=r.child;r!==null;)WC(e,t,r),r=r.sibling}function WC(e,t,r){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(Dd,r)}catch{}switch(r.tag){case 5:wt||xo(r,t);case 6:var n=mt,s=Mr;mt=null,Gn(e,t,r),mt=n,Mr=s,mt!==null&&(Mr?(e=mt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):mt.removeChild(r.stateNode));break;case 18:mt!==null&&(Mr?(e=mt,r=r.stateNode,e.nodeType===8?sm(e.parentNode,r):e.nodeType===1&&sm(e,r),Cl(e)):sm(mt,r.stateNode));break;case 4:n=mt,s=Mr,mt=r.stateNode.containerInfo,Mr=!0,Gn(e,t,r),mt=n,Mr=s;break;case 0:case 11:case 14:case 15:if(!wt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Gf(r,t,a),s=s.next}while(s!==n)}Gn(e,t,r);break;case 1:if(!wt&&(xo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){He(r,t,l)}Gn(e,t,r);break;case 21:Gn(e,t,r);break;case 22:r.mode&1?(wt=(n=wt)||r.memoizedState!==null,Gn(e,t,r),wt=n):Gn(e,t,r);break;default:Gn(e,t,r)}}function y0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new ZA),t.forEach(function(n){var s=cM.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Cr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:mt=l.stateNode,Mr=!1;break e;case 3:mt=l.stateNode.containerInfo,Mr=!0;break e;case 4:mt=l.stateNode.containerInfo,Mr=!0;break e}l=l.return}if(mt===null)throw Error($(160));WC(o,a,s),mt=null,Mr=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){He(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)GC(t,e),t=t.sibling}function GC(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Cr(t,e),Gr(e),n&4){try{al(3,e,e.return),qd(3,e)}catch(g){He(e,e.return,g)}try{al(5,e,e.return)}catch(g){He(e,e.return,g)}}break;case 1:Cr(t,e),Gr(e),n&512&&r!==null&&xo(r,r.return);break;case 5:if(Cr(t,e),Gr(e),n&512&&r!==null&&xo(r,r.return),e.flags&32){var s=e.stateNode;try{yl(s,"")}catch(g){He(e,e.return,g)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,a=r!==null?r.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&p1(s,o),bf(l,a);var u=bf(l,o);for(a=0;a<c.length;a+=2){var d=c[a],h=c[a+1];d==="style"?b1(s,h):d==="dangerouslySetInnerHTML"?x1(s,h):d==="children"?yl(s,h):Og(s,d,h,u)}switch(l){case"input":pf(s,o);break;case"textarea":g1(s,o);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?No(s,!!o.multiple,p,!1):m!==!!o.multiple&&(o.defaultValue!=null?No(s,!!o.multiple,o.defaultValue,!0):No(s,!!o.multiple,o.multiple?[]:"",!1))}s[_l]=o}catch(g){He(e,e.return,g)}}break;case 6:if(Cr(t,e),Gr(e),n&4){if(e.stateNode===null)throw Error($(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(g){He(e,e.return,g)}}break;case 3:if(Cr(t,e),Gr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Cl(t.containerInfo)}catch(g){He(e,e.return,g)}break;case 4:Cr(t,e),Gr(e);break;case 13:Cr(t,e),Gr(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(mv=We())),n&4&&y0(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(wt=(u=wt)||d,Cr(t,e),wt=u):Cr(t,e),Gr(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Y=e,d=e.child;d!==null;){for(h=Y=d;Y!==null;){switch(m=Y,p=m.child,m.tag){case 0:case 11:case 14:case 15:al(4,m,m.return);break;case 1:xo(m,m.return);var b=m.stateNode;if(typeof b.componentWillUnmount=="function"){n=m,r=m.return;try{t=n,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(g){He(n,r,g)}}break;case 5:xo(m,m.return);break;case 22:if(m.memoizedState!==null){w0(h);continue}}p!==null?(p.return=m,Y=p):w0(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=h.stateNode,c=h.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=y1("display",a))}catch(g){He(e,e.return,g)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){He(e,e.return,g)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Cr(t,e),Gr(e),n&4&&y0(e);break;case 21:break;default:Cr(t,e),Gr(e)}}function Gr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(HC(r)){var n=r;break e}r=r.return}throw Error($(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(yl(s,""),n.flags&=-33);var o=x0(e);Yf(e,o,s);break;case 3:case 4:var a=n.stateNode.containerInfo,l=x0(e);Jf(e,l,a);break;default:throw Error($(161))}}catch(c){He(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function tM(e,t,r){Y=e,KC(e)}function KC(e,t,r){for(var n=(e.mode&1)!==0;Y!==null;){var s=Y,o=s.child;if(s.tag===22&&n){var a=s.memoizedState!==null||Bc;if(!a){var l=s.alternate,c=l!==null&&l.memoizedState!==null||wt;l=Bc;var u=wt;if(Bc=a,(wt=c)&&!u)for(Y=s;Y!==null;)a=Y,c=a.child,a.tag===22&&a.memoizedState!==null?j0(s):c!==null?(c.return=a,Y=c):j0(s);for(;o!==null;)Y=o,KC(o),o=o.sibling;Y=s,Bc=l,wt=u}b0(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Y=o):b0(e)}}function b0(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:wt||qd(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!wt)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:kr(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&s0(t,o,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}s0(t,a,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Cl(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}wt||t.flags&512&&Kf(t)}catch(m){He(t,t.return,m)}}if(t===e){Y=null;break}if(r=t.sibling,r!==null){r.return=t.return,Y=r;break}Y=t.return}}function w0(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Y=r;break}Y=t.return}}function j0(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{qd(4,t)}catch(c){He(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(c){He(t,s,c)}}var o=t.return;try{Kf(t)}catch(c){He(t,o,c)}break;case 5:var a=t.return;try{Kf(t)}catch(c){He(t,a,c)}}}catch(c){He(t,t.return,c)}if(t===e){Y=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Y=l;break}Y=t.return}}var rM=Math.ceil,sd=Fn.ReactCurrentDispatcher,dv=Fn.ReactCurrentOwner,hr=Fn.ReactCurrentBatchConfig,we=0,ct=null,Ze=null,pt=0,Gt=0,yo=$s(0),ot=0,Ol=null,Ni=0,Hd=0,hv=0,ll=null,zt=null,mv=0,na=1/0,wn=null,id=!1,Xf=null,Ns=null,qc=!1,vs=null,od=0,cl=0,Qf=null,wu=-1,ju=0;function Pt(){return we&6?We():wu!==-1?wu:wu=We()}function Rs(e){return e.mode&1?we&2&&pt!==0?pt&-pt:FA.transition!==null?(ju===0&&(ju=A1()),ju):(e=Re,e!==0||(e=window.event,e=e===void 0?16:F1(e.type)),e):1}function $r(e,t,r,n){if(50<cl)throw cl=0,Qf=null,Error($(185));oc(e,r,n),(!(we&2)||e!==ct)&&(e===ct&&(!(we&2)&&(Hd|=r),ot===4&&ss(e,pt)),qt(e,n),r===1&&we===0&&!(t.mode&1)&&(na=We()+500,Vd&&Fs()))}function qt(e,t){var r=e.callbackNode;FP(e,t);var n=Bu(e,e===ct?pt:0);if(n===0)r!==null&&Py(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Py(r),t===1)e.tag===0?$A(C0.bind(null,e)):sC(C0.bind(null,e)),OA(function(){!(we&6)&&Fs()}),r=null;else{switch(M1(n)){case 1:r=Fg;break;case 4:r=T1;break;case 16:r=Uu;break;case 536870912:r=P1;break;default:r=Uu}r=rS(r,JC.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function JC(e,t){if(wu=-1,ju=0,we&6)throw Error($(327));var r=e.callbackNode;if(To()&&e.callbackNode!==r)return null;var n=Bu(e,e===ct?pt:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=ad(e,n);else{t=n;var s=we;we|=2;var o=XC();(ct!==e||pt!==t)&&(wn=null,na=We()+500,xi(e,t));do try{iM();break}catch(l){YC(e,l)}while(!0);Qg(),sd.current=o,we=s,Ze!==null?t=0:(ct=null,pt=0,t=ot)}if(t!==0){if(t===2&&(s=Nf(e),s!==0&&(n=s,t=Zf(e,s))),t===1)throw r=Ol,xi(e,0),ss(e,n),qt(e,We()),r;if(t===6)ss(e,n);else{if(s=e.current.alternate,!(n&30)&&!nM(s)&&(t=ad(e,n),t===2&&(o=Nf(e),o!==0&&(n=o,t=Zf(e,o))),t===1))throw r=Ol,xi(e,0),ss(e,n),qt(e,We()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error($(345));case 2:Ys(e,zt,wn);break;case 3:if(ss(e,n),(n&130023424)===n&&(t=mv+500-We(),10<t)){if(Bu(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Pt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Mf(Ys.bind(null,e,zt,wn),t);break}Ys(e,zt,wn);break;case 4:if(ss(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var a=31-Lr(n);o=1<<a,a=t[a],a>s&&(s=a),n&=~o}if(n=s,n=We()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*rM(n/1960))-n,10<n){e.timeoutHandle=Mf(Ys.bind(null,e,zt,wn),n);break}Ys(e,zt,wn);break;case 5:Ys(e,zt,wn);break;default:throw Error($(329))}}}return qt(e,We()),e.callbackNode===r?JC.bind(null,e):null}function Zf(e,t){var r=ll;return e.current.memoizedState.isDehydrated&&(xi(e,t).flags|=256),e=ad(e,t),e!==2&&(t=zt,zt=r,t!==null&&ep(t)),e}function ep(e){zt===null?zt=e:zt.push.apply(zt,e)}function nM(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!zr(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ss(e,t){for(t&=~hv,t&=~Hd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Lr(t),n=1<<r;e[r]=-1,t&=~n}}function C0(e){if(we&6)throw Error($(327));To();var t=Bu(e,0);if(!(t&1))return qt(e,We()),null;var r=ad(e,t);if(e.tag!==0&&r===2){var n=Nf(e);n!==0&&(t=n,r=Zf(e,n))}if(r===1)throw r=Ol,xi(e,0),ss(e,t),qt(e,We()),r;if(r===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ys(e,zt,wn),qt(e,We()),null}function fv(e,t){var r=we;we|=1;try{return e(t)}finally{we=r,we===0&&(na=We()+500,Vd&&Fs())}}function Ri(e){vs!==null&&vs.tag===0&&!(we&6)&&To();var t=we;we|=1;var r=hr.transition,n=Re;try{if(hr.transition=null,Re=1,e)return e()}finally{Re=n,hr.transition=r,we=t,!(we&6)&&Fs()}}function pv(){Gt=yo.current,Ae(yo)}function xi(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,MA(r)),Ze!==null)for(r=Ze.return;r!==null;){var n=r;switch(Jg(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Ku();break;case 3:ta(),Ae(Ut),Ae(Ct),sv();break;case 5:nv(n);break;case 4:ta();break;case 13:Ae(Fe);break;case 19:Ae(Fe);break;case 10:Zg(n.type._context);break;case 22:case 23:pv()}r=r.return}if(ct=e,Ze=e=Es(e.current,null),pt=Gt=t,ot=0,Ol=null,hv=Hd=Ni=0,zt=ll=null,ri!==null){for(t=0;t<ri.length;t++)if(r=ri[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var a=o.next;o.next=s,n.next=a}r.pending=n}ri=null}return e}function YC(e,t){do{var r=Ze;try{if(Qg(),xu.current=nd,rd){for(var n=Ve.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}rd=!1}if(Si=0,lt=st=Ve=null,ol=!1,Pl=0,dv.current=null,r===null||r.return===null){ot=1,Ol=t,Ze=null;break}e:{var o=e,a=r.return,l=r,c=t;if(t=pt,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=u0(a);if(p!==null){p.flags&=-257,d0(p,a,l,o,t),p.mode&1&&c0(o,u,t),t=p,c=u;var b=t.updateQueue;if(b===null){var g=new Set;g.add(c),t.updateQueue=g}else b.add(c);break e}else{if(!(t&1)){c0(o,u,t),gv();break e}c=Error($(426))}}else if(De&&l.mode&1){var w=u0(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),d0(w,a,l,o,t),Yg(ra(c,l));break e}}o=c=ra(c,l),ot!==4&&(ot=2),ll===null?ll=[o]:ll.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var x=MC(o,c,t);n0(o,x);break e;case 1:l=c;var y=o.type,v=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Ns===null||!Ns.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t;var j=OC(o,l,t);n0(o,j);break e}}o=o.return}while(o!==null)}ZC(r)}catch(C){t=C,Ze===r&&r!==null&&(Ze=r=r.return);continue}break}while(!0)}function XC(){var e=sd.current;return sd.current=nd,e===null?nd:e}function gv(){(ot===0||ot===3||ot===2)&&(ot=4),ct===null||!(Ni&268435455)&&!(Hd&268435455)||ss(ct,pt)}function ad(e,t){var r=we;we|=2;var n=XC();(ct!==e||pt!==t)&&(wn=null,xi(e,t));do try{sM();break}catch(s){YC(e,s)}while(!0);if(Qg(),we=r,sd.current=n,Ze!==null)throw Error($(261));return ct=null,pt=0,ot}function sM(){for(;Ze!==null;)QC(Ze)}function iM(){for(;Ze!==null&&!TP();)QC(Ze)}function QC(e){var t=tS(e.alternate,e,Gt);e.memoizedProps=e.pendingProps,t===null?ZC(e):Ze=t,dv.current=null}function ZC(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=QA(r,t),r!==null){r.flags&=32767,Ze=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ot=6,Ze=null;return}}else if(r=XA(r,t,Gt),r!==null){Ze=r;return}if(t=t.sibling,t!==null){Ze=t;return}Ze=t=e}while(t!==null);ot===0&&(ot=5)}function Ys(e,t,r){var n=Re,s=hr.transition;try{hr.transition=null,Re=1,oM(e,t,r,n)}finally{hr.transition=s,Re=n}return null}function oM(e,t,r,n){do To();while(vs!==null);if(we&6)throw Error($(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error($(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(zP(e,o),e===ct&&(Ze=ct=null,pt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||qc||(qc=!0,rS(Uu,function(){return To(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=hr.transition,hr.transition=null;var a=Re;Re=1;var l=we;we|=4,dv.current=null,eM(e,r),GC(r,e),RA(Pf),qu=!!Tf,Pf=Tf=null,e.current=r,tM(r),PP(),we=l,Re=a,hr.transition=o}else e.current=r;if(qc&&(qc=!1,vs=e,od=s),o=e.pendingLanes,o===0&&(Ns=null),OP(r.stateNode),qt(e,We()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(id)throw id=!1,e=Xf,Xf=null,e;return od&1&&e.tag!==0&&To(),o=e.pendingLanes,o&1?e===Qf?cl++:(cl=0,Qf=e):cl=0,Fs(),null}function To(){if(vs!==null){var e=M1(od),t=hr.transition,r=Re;try{if(hr.transition=null,Re=16>e?16:e,vs===null)var n=!1;else{if(e=vs,vs=null,od=0,we&6)throw Error($(331));var s=we;for(we|=4,Y=e.current;Y!==null;){var o=Y,a=o.child;if(Y.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(Y=u;Y!==null;){var d=Y;switch(d.tag){case 0:case 11:case 15:al(8,d,o)}var h=d.child;if(h!==null)h.return=d,Y=h;else for(;Y!==null;){d=Y;var m=d.sibling,p=d.return;if(qC(d),d===u){Y=null;break}if(m!==null){m.return=p,Y=m;break}Y=p}}}var b=o.alternate;if(b!==null){var g=b.child;if(g!==null){b.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}Y=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,Y=a;else e:for(;Y!==null;){if(o=Y,o.flags&2048)switch(o.tag){case 0:case 11:case 15:al(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,Y=x;break e}Y=o.return}}var y=e.current;for(Y=y;Y!==null;){a=Y;var v=a.child;if(a.subtreeFlags&2064&&v!==null)v.return=a,Y=v;else e:for(a=y;Y!==null;){if(l=Y,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:qd(9,l)}}catch(C){He(l,l.return,C)}if(l===a){Y=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,Y=j;break e}Y=l.return}}if(we=s,Fs(),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(Dd,e)}catch{}n=!0}return n}finally{Re=r,hr.transition=t}}return!1}function S0(e,t,r){t=ra(r,t),t=MC(e,t,1),e=Ss(e,t,1),t=Pt(),e!==null&&(oc(e,1,t),qt(e,t))}function He(e,t,r){if(e.tag===3)S0(e,e,r);else for(;t!==null;){if(t.tag===3){S0(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ns===null||!Ns.has(n))){e=ra(r,e),e=OC(t,e,1),t=Ss(t,e,1),e=Pt(),t!==null&&(oc(t,1,e),qt(t,e));break}}t=t.return}}function aM(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Pt(),e.pingedLanes|=e.suspendedLanes&r,ct===e&&(pt&r)===r&&(ot===4||ot===3&&(pt&130023424)===pt&&500>We()-mv?xi(e,0):hv|=r),qt(e,t)}function eS(e,t){t===0&&(e.mode&1?(t=Oc,Oc<<=1,!(Oc&130023424)&&(Oc=4194304)):t=1);var r=Pt();e=Mn(e,t),e!==null&&(oc(e,t,r),qt(e,r))}function lM(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),eS(e,r)}function cM(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error($(314))}n!==null&&n.delete(t),eS(e,r)}var tS;tS=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ut.current)Vt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Vt=!1,YA(e,t,r);Vt=!!(e.flags&131072)}else Vt=!1,De&&t.flags&1048576&&iC(t,Xu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;bu(e,t),e=t.pendingProps;var s=Qo(t,Ct.current);ko(t,r),s=ov(null,t,n,e,s,r);var o=av();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Bt(n)?(o=!0,Ju(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,tv(t),s.updater=Bd,t.stateNode=s,s._reactInternals=t,zf(t,n,e,r),t=Bf(null,t,n,!0,o,r)):(t.tag=0,De&&o&&Kg(t),Rt(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(bu(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=dM(n),e=kr(n,e),s){case 0:t=Uf(null,t,n,e,r);break e;case 1:t=f0(null,t,n,e,r);break e;case 11:t=h0(null,t,n,e,r);break e;case 14:t=m0(null,t,n,kr(n.type,e),r);break e}throw Error($(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:kr(n,s),Uf(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:kr(n,s),f0(e,t,n,s,r);case 3:e:{if($C(t),e===null)throw Error($(387));n=t.pendingProps,o=t.memoizedState,s=o.element,dC(e,t),ed(t,n,null,r);var a=t.memoizedState;if(n=a.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=ra(Error($(423)),t),t=p0(e,t,n,r,s);break e}else if(n!==s){s=ra(Error($(424)),t),t=p0(e,t,n,r,s);break e}else for(Xt=Cs(t.stateNode.containerInfo.firstChild),Qt=t,De=!0,Ir=null,r=cC(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zo(),n===s){t=On(e,t,r);break e}Rt(e,t,n,r)}t=t.child}return t;case 5:return hC(t),e===null&&Lf(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,a=s.children,Af(n,s)?a=null:o!==null&&Af(n,o)&&(t.flags|=32),LC(e,t),Rt(e,t,a,r),t.child;case 6:return e===null&&Lf(t),null;case 13:return FC(e,t,r);case 4:return rv(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ea(t,null,n,r):Rt(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:kr(n,s),h0(e,t,n,s,r);case 7:return Rt(e,t,t.pendingProps,r),t.child;case 8:return Rt(e,t,t.pendingProps.children,r),t.child;case 12:return Rt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,a=s.value,ke(Qu,n._currentValue),n._currentValue=a,o!==null)if(zr(o.value,a)){if(o.children===s.children&&!Ut.current){t=On(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(o.tag===1){c=_n(-1,r&-r),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=r,c=o.alternate,c!==null&&(c.lanes|=r),$f(o.return,r,t),l.lanes|=r;break}c=c.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error($(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),$f(a,r,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Rt(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,ko(t,r),s=gr(s),n=n(s),t.flags|=1,Rt(e,t,n,r),t.child;case 14:return n=t.type,s=kr(n,t.pendingProps),s=kr(n.type,s),m0(e,t,n,s,r);case 15:return IC(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:kr(n,s),bu(e,t),t.tag=1,Bt(n)?(e=!0,Ju(t)):e=!1,ko(t,r),AC(t,n,s),zf(t,n,s,r),Bf(null,t,n,!0,e,r);case 19:return zC(e,t,r);case 22:return DC(e,t,r)}throw Error($(156,t.tag))};function rS(e,t){return k1(e,t)}function uM(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ur(e,t,r,n){return new uM(e,t,r,n)}function vv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dM(e){if(typeof e=="function")return vv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dg)return 11;if(e===Lg)return 14}return 2}function Es(e,t){var r=e.alternate;return r===null?(r=ur(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Cu(e,t,r,n,s,o){var a=2;if(n=e,typeof e=="function")vv(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case lo:return yi(r.children,s,o,t);case Ig:a=8,s|=8;break;case uf:return e=ur(12,r,t,s|2),e.elementType=uf,e.lanes=o,e;case df:return e=ur(13,r,t,s),e.elementType=df,e.lanes=o,e;case hf:return e=ur(19,r,t,s),e.elementType=hf,e.lanes=o,e;case h1:return Wd(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case u1:a=10;break e;case d1:a=9;break e;case Dg:a=11;break e;case Lg:a=14;break e;case es:a=16,n=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=ur(a,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function yi(e,t,r,n){return e=ur(7,e,n,t),e.lanes=r,e}function Wd(e,t,r,n){return e=ur(22,e,n,t),e.elementType=h1,e.lanes=r,e.stateNode={isHidden:!1},e}function hm(e,t,r){return e=ur(6,e,null,t),e.lanes=r,e}function mm(e,t,r){return t=ur(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hM(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gh(0),this.expirationTimes=Gh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gh(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function xv(e,t,r,n,s,o,a,l,c){return e=new hM(e,t,r,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ur(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},tv(o),e}function mM(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ao,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function nS(e){if(!e)return Ps;e=e._reactInternals;e:{if(Di(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Bt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var r=e.type;if(Bt(r))return nC(e,r,t)}return t}function sS(e,t,r,n,s,o,a,l,c){return e=xv(r,n,!0,e,s,o,a,l,c),e.context=nS(null),r=e.current,n=Pt(),s=Rs(r),o=_n(n,s),o.callback=t??null,Ss(r,o,s),e.current.lanes=s,oc(e,s,n),qt(e,n),e}function Gd(e,t,r,n){var s=t.current,o=Pt(),a=Rs(s);return r=nS(r),t.context===null?t.context=r:t.pendingContext=r,t=_n(o,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Ss(s,t,a),e!==null&&($r(e,s,a,o),vu(e,s,a)),a}function ld(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function N0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function yv(e,t){N0(e,t),(e=e.alternate)&&N0(e,t)}function fM(){return null}var iS=typeof reportError=="function"?reportError:function(e){console.error(e)};function bv(e){this._internalRoot=e}Kd.prototype.render=bv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));Gd(e,t,null,null)};Kd.prototype.unmount=bv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ri(function(){Gd(null,e,null,null)}),t[An]=null}};function Kd(e){this._internalRoot=e}Kd.prototype.unstable_scheduleHydration=function(e){if(e){var t=D1();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ns.length&&t!==0&&t<ns[r].priority;r++);ns.splice(r,0,e),r===0&&$1(e)}};function wv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Jd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function R0(){}function pM(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var u=ld(a);o.call(u)}}var a=sS(t,n,e,0,null,!1,!1,"",R0);return e._reactRootContainer=a,e[An]=a.current,Rl(e.nodeType===8?e.parentNode:e),Ri(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var l=n;n=function(){var u=ld(c);l.call(u)}}var c=xv(e,0,!1,null,null,!1,!1,"",R0);return e._reactRootContainer=c,e[An]=c.current,Rl(e.nodeType===8?e.parentNode:e),Ri(function(){Gd(t,c,r,n)}),c}function Yd(e,t,r,n,s){var o=r._reactRootContainer;if(o){var a=o;if(typeof s=="function"){var l=s;s=function(){var c=ld(a);l.call(c)}}Gd(t,a,e,s)}else a=pM(r,t,e,s,n);return ld(a)}O1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Ga(t.pendingLanes);r!==0&&(zg(t,r|1),qt(t,We()),!(we&6)&&(na=We()+500,Fs()))}break;case 13:Ri(function(){var n=Mn(e,1);if(n!==null){var s=Pt();$r(n,e,1,s)}}),yv(e,1)}};Vg=function(e){if(e.tag===13){var t=Mn(e,134217728);if(t!==null){var r=Pt();$r(t,e,134217728,r)}yv(e,134217728)}};I1=function(e){if(e.tag===13){var t=Rs(e),r=Mn(e,t);if(r!==null){var n=Pt();$r(r,e,t,n)}yv(e,t)}};D1=function(){return Re};L1=function(e,t){var r=Re;try{return Re=e,t()}finally{Re=r}};jf=function(e,t,r){switch(t){case"input":if(pf(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=zd(n);if(!s)throw Error($(90));f1(n),pf(n,s)}}}break;case"textarea":g1(e,r);break;case"select":t=r.value,t!=null&&No(e,!!r.multiple,t,!1)}};C1=fv;S1=Ri;var gM={usingClientEntryPoint:!1,Events:[lc,mo,zd,w1,j1,fv]},Fa={findFiberByHostInstance:ti,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vM={bundleType:Fa.bundleType,version:Fa.version,rendererPackageName:Fa.rendererPackageName,rendererConfig:Fa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Fn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=E1(e),e===null?null:e.stateNode},findFiberByHostInstance:Fa.findFiberByHostInstance||fM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hc.isDisabled&&Hc.supportsFiber)try{Dd=Hc.inject(vM),rn=Hc}catch{}}tr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gM;tr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wv(t))throw Error($(200));return mM(e,t,null,r)};tr.createRoot=function(e,t){if(!wv(e))throw Error($(299));var r=!1,n="",s=iS;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=xv(e,1,!1,null,null,r,!1,n,s),e[An]=t.current,Rl(e.nodeType===8?e.parentNode:e),new bv(t)};tr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=E1(t),e=e===null?null:e.stateNode,e};tr.flushSync=function(e){return Ri(e)};tr.hydrate=function(e,t,r){if(!Jd(t))throw Error($(200));return Yd(null,e,t,!0,r)};tr.hydrateRoot=function(e,t,r){if(!wv(e))throw Error($(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",a=iS;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=sS(t,null,e,1,r??null,s,!1,o,a),e[An]=t.current,Rl(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Kd(t)};tr.render=function(e,t,r){if(!Jd(t))throw Error($(200));return Yd(null,e,t,!1,r)};tr.unmountComponentAtNode=function(e){if(!Jd(e))throw Error($(40));return e._reactRootContainer?(Ri(function(){Yd(null,null,e,!1,function(){e._reactRootContainer=null,e[An]=null})}),!0):!1};tr.unstable_batchedUpdates=fv;tr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Jd(r))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return Yd(e,t,r,!1,n)};tr.version="18.3.1-next-f1338f8080-20240426";function oS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(oS)}catch(e){console.error(e)}}oS(),o1.exports=tr;var Li=o1.exports;const aS=sc(Li);var lS,E0=Li;lS=E0.createRoot,E0.hydrateRoot;var xM=typeof Element<"u",yM=typeof Map=="function",bM=typeof Set=="function",wM=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Su(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Su(e[n],t[n]))return!1;return!0}var o;if(yM&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;for(o=e.entries();!(n=o.next()).done;)if(!Su(n.value[1],t.get(n.value[0])))return!1;return!0}if(bM&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(wM&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])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(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;if(xM&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((s[n]==="_owner"||s[n]==="__v"||s[n]==="__o")&&e.$$typeof)&&!Su(e[s[n]],t[s[n]]))return!1;return!0}return e!==e&&t!==t}var jM=function(t,r){try{return Su(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const CM=sc(jM);var SM=function(e,t,r,n,s,o,a,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,s,o,a,l],d=0;c=new Error(t.replace(/%s/g,function(){return u[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},NM=SM;const _0=sc(NM);var RM=function(t,r,n,s){var o=n?n.call(s,t,r):void 0;if(o!==void 0)return!!o;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var a=Object.keys(t),l=Object.keys(r);if(a.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),u=0;u<a.length;u++){var d=a[u];if(!c(d))return!1;var h=t[d],m=r[d];if(o=n?n.call(s,h,m,d):void 0,o===!1||o===void 0&&h!==m)return!1}return!0};const EM=sc(RM);var cS=(e=>(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))(cS||{}),fm={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"]}},k0=Object.values(cS),jv={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},_M=Object.entries(jv).reduce((e,[t,r])=>(e[r]=t,e),{}),Dr="data-rh",Po={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Ao=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},kM=e=>{let t=Ao(e,"title");const r=Ao(e,Po.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=Ao(e,Po.DEFAULT_TITLE);return t||n||void 0},TM=e=>Ao(e,Po.ON_CHANGE_CLIENT_STATE)||(()=>{}),pm=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),PM=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const s=Object.keys(n);for(let o=0;o<s.length;o+=1){const l=s[o].toLowerCase();if(e.indexOf(l)!==-1&&n[l])return r.concat(n)}}return r},[]),AM=e=>console&&typeof console.warn=="function"&&console.warn(e),za=(e,t,r)=>{const n={};return r.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&AM(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,o)=>{const a={};o.filter(c=>{let u;const d=Object.keys(c);for(let m=0;m<d.length;m+=1){const p=d[m],b=p.toLowerCase();t.indexOf(b)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(b==="rel"&&c[b].toLowerCase()==="stylesheet")&&(u=b),t.indexOf(p)!==-1&&(p==="innerHTML"||p==="cssText"||p==="itemprop")&&(u=p)}if(!u||!c[u])return!1;const h=c[u].toLowerCase();return n[u]||(n[u]={}),a[u]||(a[u]={}),n[u][h]?!1:(a[u][h]=!0,!0)}).reverse().forEach(c=>s.push(c));const l=Object.keys(a);for(let c=0;c<l.length;c+=1){const u=l[c],d={...n[u],...a[u]};n[u]=d}return s},[]).reverse()},MM=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},OM=e=>({baseTag:PM(["href"],e),bodyAttributes:pm("bodyAttributes",e),defer:Ao(e,Po.DEFER),encode:Ao(e,Po.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:pm("htmlAttributes",e),linkTags:za("link",["rel","href"],e),metaTags:za("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:za("noscript",["innerHTML"],e),onChangeClientState:TM(e),scriptTags:za("script",["src","innerHTML"],e),styleTags:za("style",["cssText"],e),title:kM(e),titleAttributes:pm("titleAttributes",e),prioritizeSeoTags:MM(e,Po.PRIORITIZE_SEO_TAGS)}),uS=e=>Array.isArray(e)?e.join(""):e,IM=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},gm=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(IM(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},T0=(e,t)=>({...e,[t]:void 0}),DM=["noscript","script","style"],tp=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),dS=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),LM=(e,t,r,n)=>{const s=dS(r),o=uS(t);return s?`<${e} ${Dr}="true" ${s}>${tp(o,n)}</${e}>`:`<${e} ${Dr}="true">${tp(o,n)}</${e}>`},$M=(e,t,r=!0)=>t.reduce((n,s)=>{const o=s,a=Object.keys(o).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,d)=>{const h=typeof o[d]>"u"?d:`${d}="${tp(o[d],r)}"`;return u?`${u} ${h}`:h},""),l=o.innerHTML||o.cssText||"",c=DM.indexOf(e)===-1;return`${n}<${e} ${Dr}="true" ${a}${c?"/>":`>${l}</${e}>`}`},""),hS=(e,t={})=>Object.keys(e).reduce((r,n)=>{const s=jv[n];return r[s||n]=e[n],r},t),FM=(e,t,r)=>{const n={key:t,[Dr]:!0},s=hS(r,n);return[M.createElement("title",s,t)]},Nu=(e,t)=>t.map((r,n)=>{const s={key:n,[Dr]:!0};return Object.keys(r).forEach(o=>{const l=jv[o]||o;if(l==="innerHTML"||l==="cssText"){const c=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:c}}else s[l]=r[o]}),M.createElement(e,s)}),ir=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>FM(e,t.title,t.titleAttributes),toString:()=>LM(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>hS(t),toString:()=>dS(t)};default:return{toComponent:()=>Nu(e,t),toString:()=>$M(e,t,r)}}},zM=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const s=gm(e,fm.meta),o=gm(t,fm.link),a=gm(r,fm.script);return{priorityMethods:{toComponent:()=>[...Nu("meta",s.priority),...Nu("link",o.priority),...Nu("script",a.priority)],toString:()=>`${ir("meta",s.priority,n)} ${ir("link",o.priority,n)} ${ir("script",a.priority,n)}`},metaTags:s.default,linkTags:o.default,scriptTags:a.default}},VM=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:s,noscriptTags:o,styleTags:a,title:l="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:d,metaTags:h,scriptTags:m}=e,p={toComponent:()=>{},toString:()=>""};return u&&({priorityMethods:p,linkTags:d,metaTags:h,scriptTags:m}=zM(e)),{priority:p,base:ir("base",t,n),bodyAttributes:ir("bodyAttributes",r,n),htmlAttributes:ir("htmlAttributes",s,n),link:ir("link",d,n),meta:ir("meta",h,n),noscript:ir("noscript",o,n),script:ir("script",m,n),style:ir("style",a,n),title:ir("title",{title:l,titleAttributes:c},n)}},rp=VM,Wc=[],mS=!!(typeof window<"u"&&window.document&&window.document.createElement),np=class{constructor(e,t){xn(this,"instances",[]);xn(this,"canUseDOM",mS);xn(this,"context");xn(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Wc:this.instances,add:e=>{(this.canUseDOM?Wc:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Wc:this.instances).indexOf(e);(this.canUseDOM?Wc:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=rp({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},UM={},fS=M.createContext(UM),li,pS=(li=class extends f.Component{constructor(r){super(r);xn(this,"helmetData");this.helmetData=new np(this.props.context||{},li.canUseDOM)}render(){return M.createElement(fS.Provider,{value:this.helmetData.value},this.props.children)}},xn(li,"canUseDOM",mS),li),Ki=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${Dr}]`),s=[].slice.call(n),o=[];let a;return t&&t.length&&t.forEach(l=>{const c=document.createElement(e);for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u))if(u==="innerHTML")c.innerHTML=l.innerHTML;else if(u==="cssText")c.styleSheet?c.styleSheet.cssText=l.cssText:c.appendChild(document.createTextNode(l.cssText));else{const d=u,h=typeof l[d]>"u"?"":l[d];c.setAttribute(u,h)}c.setAttribute(Dr,"true"),s.some((u,d)=>(a=d,c.isEqualNode(u)))?s.splice(a,1):o.push(c)}),s.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)}),o.forEach(l=>r.appendChild(l)),{oldTags:s,newTags:o}},sp=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(Dr),s=n?n.split(","):[],o=[...s],a=Object.keys(t);for(const l of a){const c=t[l]||"";r.getAttribute(l)!==c&&r.setAttribute(l,c),s.indexOf(l)===-1&&s.push(l);const u=o.indexOf(l);u!==-1&&o.splice(u,1)}for(let l=o.length-1;l>=0;l-=1)r.removeAttribute(o[l]);s.length===o.length?r.removeAttribute(Dr):r.getAttribute(Dr)!==a.join(",")&&r.setAttribute(Dr,a.join(","))},BM=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=uS(e)),sp("title",t)},P0=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:s,linkTags:o,metaTags:a,noscriptTags:l,onChangeClientState:c,scriptTags:u,styleTags:d,title:h,titleAttributes:m}=e;sp("body",n),sp("html",s),BM(h,m);const p={baseTag:Ki("base",r),linkTags:Ki("link",o),metaTags:Ki("meta",a),noscriptTags:Ki("noscript",l),scriptTags:Ki("script",u),styleTags:Ki("style",d)},b={},g={};Object.keys(p).forEach(w=>{const{newTags:x,oldTags:y}=p[w];x.length&&(b[w]=x),y.length&&(g[w]=p[w].oldTags)}),t&&t(),c(e,b,g)},Va=null,qM=e=>{Va&&cancelAnimationFrame(Va),e.defer?Va=requestAnimationFrame(()=>{P0(e,()=>{Va=null})}):(P0(e),Va=null)},HM=qM,A0=class extends f.Component{constructor(){super(...arguments);xn(this,"rendered",!1)}shouldComponentUpdate(t){return!EM(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const s=OM(t.get().map(o=>{const a={...o.props};return delete a.context,a}));pS.canUseDOM?HM(s):rp&&(n=rp(s)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},lf,Ye=(lf=class extends f.Component{shouldComponentUpdate(e){return!CM(T0(this.props,"helmetData"),T0(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,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,t){return _0(k0.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${k0.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),_0(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return M.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:s,...o}=n.props,a=Object.keys(o).reduce((c,u)=>(c[_M[u]||u]=o[u],c),{});let{type:l}=n;switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(n,s),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,a,s);break;default:t=this.mapObjectTypeChildren(n,t,a,s);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof np)){const s=n;n=new np(s.context,!0),delete r.helmetData}return n?M.createElement(A0,{...r,context:n.value}):M.createElement(fS.Consumer,null,s=>M.createElement(A0,{...r,context:s}))}},xn(lf,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),lf);const WM=1,GM=1e6;let vm=0;function KM(){return vm=(vm+1)%Number.MAX_SAFE_INTEGER,vm.toString()}const xm=new Map,M0=e=>{if(xm.has(e))return;const t=setTimeout(()=>{xm.delete(e),ul({type:"REMOVE_TOAST",toastId:e})},GM);xm.set(e,t)},JM=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,WM)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?M0(r):e.toasts.forEach(n=>{M0(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Ru=[];let Eu={toasts:[]};function ul(e){Eu=JM(Eu,e),Ru.forEach(t=>{t(Eu)})}function YM({...e}){const t=KM(),r=s=>ul({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>ul({type:"DISMISS_TOAST",toastId:t});return ul({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function dn(){const[e,t]=f.useState(Eu);return f.useEffect(()=>(Ru.push(t),()=>{const r=Ru.indexOf(t);r>-1&&Ru.splice(r,1)}),[e]),{...e,toast:YM,dismiss:r=>ul({type:"DISMISS_TOAST",toastId:r})}}function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function O0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xd(...e){return t=>{let r=!1;const n=e.map(s=>{const o=O0(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():O0(e[s],null)}}}}function ue(...e){return f.useCallback(Xd(...e),e)}function XM(e,t){const r=f.createContext(t),n=o=>{const{children:a,...l}=o,c=f.useMemo(()=>l,Object.values(l));return i.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function s(o){const a=f.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function Ht(e,t=[]){let r=[];function n(o,a){const l=f.createContext(a),c=r.length;r=[...r,a];const u=h=>{var x;const{scope:m,children:p,...b}=h,g=((x=m==null?void 0:m[e])==null?void 0:x[c])||l,w=f.useMemo(()=>b,Object.values(b));return i.jsx(g.Provider,{value:w,children:p})};u.displayName=o+"Provider";function d(h,m){var g;const p=((g=m==null?void 0:m[e])==null?void 0:g[c])||l,b=f.useContext(p);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,d]}const s=()=>{const o=r.map(a=>f.createContext(a));return function(l){const c=(l==null?void 0:l[e])||o;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[n,QM(s,...t)]}function QM(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const a=n.reduce((l,{useScope:c,scopeName:u})=>{const h=c(o)[`__scope${u}`];return{...l,...h}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Ei(e){const t=ZM(e),r=f.forwardRef((n,s)=>{const{children:o,...a}=n,l=f.Children.toArray(o),c=l.find(eO);if(c){const u=c.props.children,d=l.map(h=>h===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:h);return i.jsx(t,{...a,ref:s,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return i.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var gS=Ei("Slot");function ZM(e){const t=f.forwardRef((r,n)=>{const{children:s,...o}=r;if(f.isValidElement(s)){const a=rO(s),l=tO(o,s.props);return s.type!==f.Fragment&&(l.ref=n?Xd(n,a):a),f.cloneElement(s,l)}return f.Children.count(s)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vS=Symbol("radix.slottable");function xS(e){const t=({children:r})=>i.jsx(i.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=vS,t}function eO(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vS}function tO(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...l)=>{const c=o(...l);return s(...l),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function rO(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function uc(e){const t=e+"CollectionProvider",[r,n]=Ht(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:w,children:x}=g,y=M.useRef(null),v=M.useRef(new Map).current;return i.jsx(s,{scope:w,itemMap:v,collectionRef:y,children:x})};a.displayName=t;const l=e+"CollectionSlot",c=Ei(l),u=M.forwardRef((g,w)=>{const{scope:x,children:y}=g,v=o(l,x),j=ue(w,v.collectionRef);return i.jsx(c,{ref:j,children:y})});u.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",m=Ei(d),p=M.forwardRef((g,w)=>{const{scope:x,children:y,...v}=g,j=M.useRef(null),C=ue(w,j),S=o(d,x);return M.useEffect(()=>(S.itemMap.set(j,{ref:j,...v}),()=>void S.itemMap.delete(j))),i.jsx(m,{[h]:"",ref:C,children:y})});p.displayName=d;function b(g){const w=o(e+"CollectionConsumer",g);return M.useCallback(()=>{const y=w.collectionRef.current;if(!y)return[];const v=Array.from(y.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((S,N)=>v.indexOf(S.ref.current)-v.indexOf(N.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:u,ItemSlot:p},b,n]}var nO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],re=nO.reduce((e,t)=>{const r=Ei(`Primitive.${t}`),n=f.forwardRef((s,o)=>{const{asChild:a,...l}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Cv(e,t){e&&Li.flushSync(()=>e.dispatchEvent(t))}function Ge(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function sO(e,t=globalThis==null?void 0:globalThis.document){const r=Ge(e);f.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var iO="DismissableLayer",ip="dismissableLayer.update",oO="dismissableLayer.pointerDownOutside",aO="dismissableLayer.focusOutside",I0,yS=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ga=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=e,u=f.useContext(yS),[d,h]=f.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),b=ue(t,N=>h(N)),g=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(w),y=d?g.indexOf(d):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,j=y>=x,C=cO(N=>{const R=N.target,k=[...u.branches].some(T=>T.contains(R));!j||k||(s==null||s(N),a==null||a(N),N.defaultPrevented||l==null||l())},m),S=uO(N=>{const R=N.target;[...u.branches].some(T=>T.contains(R))||(o==null||o(N),a==null||a(N),N.defaultPrevented||l==null||l())},m);return sO(N=>{y===u.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},m),f.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(I0=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),D0(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=I0)}},[d,m,r,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),D0())},[d,u]),f.useEffect(()=>{const N=()=>p({});return document.addEventListener(ip,N),()=>document.removeEventListener(ip,N)},[]),i.jsx(re.div,{...c,ref:b,style:{pointerEvents:v?j?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,S.onFocusCapture),onBlurCapture:U(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,C.onPointerDownCapture)})});ga.displayName=iO;var lO="DismissableLayerBranch",bS=f.forwardRef((e,t)=>{const r=f.useContext(yS),n=f.useRef(null),s=ue(t,n);return f.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),i.jsx(re.div,{...e,ref:s})});bS.displayName=lO;function cO(e,t=globalThis==null?void 0:globalThis.document){const r=Ge(e),n=f.useRef(!1),s=f.useRef(()=>{});return f.useEffect(()=>{const o=l=>{if(l.target&&!n.current){let c=function(){wS(oO,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function uO(e,t=globalThis==null?void 0:globalThis.document){const r=Ge(e),n=f.useRef(!1);return f.useEffect(()=>{const s=o=>{o.target&&!n.current&&wS(aO,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function D0(){const e=new CustomEvent(ip);document.dispatchEvent(e)}function wS(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Cv(s,o):s.dispatchEvent(o)}var dO=ga,hO=bS,at=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},mO="Portal",dc=f.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[s,o]=f.useState(!1);at(()=>o(!0),[]);const a=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?aS.createPortal(i.jsx(re.div,{...n,ref:t}),a):null});dc.displayName=mO;function fO(e,t){return f.useReducer((r,n)=>t[r][n]??r,e)}var It=e=>{const{present:t,children:r}=e,n=pO(t),s=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),o=ue(n.ref,gO(s));return typeof r=="function"||n.isPresent?f.cloneElement(s,{ref:o}):null};It.displayName="Presence";function pO(e){const[t,r]=f.useState(),n=f.useRef(null),s=f.useRef(e),o=f.useRef("none"),a=e?"mounted":"unmounted",[l,c]=fO(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Gc(n.current);o.current=l==="mounted"?u:"none"},[l]),at(()=>{const u=n.current,d=s.current;if(d!==e){const m=o.current,p=Gc(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),at(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=p=>{const g=Gc(n.current).includes(p.animationName);if(p.target===t&&g&&(c("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=p=>{p.target===t&&(o.current=Gc(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Gc(e){return(e==null?void 0:e.animationName)||"none"}function gO(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var vO=Pg[" useInsertionEffect ".trim().toString()]||at;function ln({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,a]=xO({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:s;{const d=f.useRef(e!==void 0);f.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${l?"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.`),d.current=l},[l,n])}const u=f.useCallback(d=>{var h;if(l){const m=yO(d)?d(e):d;m!==e&&((h=a.current)==null||h.call(a,m))}else o(d)},[l,e,o,a]);return[c,u]}function xO({defaultProp:e,onChange:t}){const[r,n]=f.useState(e),s=f.useRef(r),o=f.useRef(t);return vO(()=>{o.current=t},[t]),f.useEffect(()=>{var a;s.current!==r&&((a=o.current)==null||a.call(o,r),s.current=r)},[r,s]),[r,n,o]}function yO(e){return typeof e=="function"}var jS=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"}),bO="VisuallyHidden",Qd=f.forwardRef((e,t)=>i.jsx(re.span,{...e,ref:t,style:{...jS,...e.style}}));Qd.displayName=bO;var wO=Qd,Sv="ToastProvider",[Nv,jO,CO]=uc("Toast"),[CS,mW]=Ht("Toast",[CO]),[SO,Zd]=CS(Sv),SS=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:a}=e,[l,c]=f.useState(null),[u,d]=f.useState(0),h=f.useRef(!1),m=f.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Sv}\`. Expected non-empty \`string\`.`),i.jsx(Nv.Provider,{scope:t,children:i.jsx(SO,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:f.useCallback(()=>d(p=>p+1),[]),onToastRemove:f.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:m,children:a})})};SS.displayName=Sv;var NS="ToastViewport",NO=["F8"],op="toast.viewportPause",ap="toast.viewportResume",RS=f.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=NO,label:s="Notifications ({hotkey})",...o}=e,a=Zd(NS,r),l=jO(r),c=f.useRef(null),u=f.useRef(null),d=f.useRef(null),h=f.useRef(null),m=ue(t,h,a.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;f.useEffect(()=>{const w=x=>{var v;n.length!==0&&n.every(j=>x[j]||x.code===j)&&((v=h.current)==null||v.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),f.useEffect(()=>{const w=c.current,x=h.current;if(b&&w&&x){const y=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(op);x.dispatchEvent(S),a.isClosePausedRef.current=!0}},v=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(ap);x.dispatchEvent(S),a.isClosePausedRef.current=!1}},j=S=>{!w.contains(S.relatedTarget)&&v()},C=()=>{w.contains(document.activeElement)||v()};return w.addEventListener("focusin",y),w.addEventListener("focusout",j),w.addEventListener("pointermove",y),w.addEventListener("pointerleave",C),window.addEventListener("blur",y),window.addEventListener("focus",v),()=>{w.removeEventListener("focusin",y),w.removeEventListener("focusout",j),w.removeEventListener("pointermove",y),w.removeEventListener("pointerleave",C),window.removeEventListener("blur",y),window.removeEventListener("focus",v)}}},[b,a.isClosePausedRef]);const g=f.useCallback(({tabbingDirection:w})=>{const y=l().map(v=>{const j=v.ref.current,C=[j,...$O(j)];return w==="forwards"?C:C.reverse()});return(w==="forwards"?y.reverse():y).flat()},[l]);return f.useEffect(()=>{const w=h.current;if(w){const x=y=>{var C,S,N;const v=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!v){const R=document.activeElement,k=y.shiftKey;if(y.target===w&&k){(C=u.current)==null||C.focus();return}const A=g({tabbingDirection:k?"backwards":"forwards"}),q=A.findIndex(I=>I===R);ym(A.slice(q+1))?y.preventDefault():k?(S=u.current)==null||S.focus():(N=d.current)==null||N.focus()}};return w.addEventListener("keydown",x),()=>w.removeEventListener("keydown",x)}},[l,g]),i.jsxs(hO,{ref:c,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&i.jsx(lp,{ref:u,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});ym(w)}}),i.jsx(Nv.Slot,{scope:r,children:i.jsx(re.ol,{tabIndex:-1,...o,ref:m})}),b&&i.jsx(lp,{ref:d,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});ym(w)}})]})});RS.displayName=NS;var ES="ToastFocusProxy",lp=f.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=Zd(ES,r);return i.jsx(Qd,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const l=a.relatedTarget;!((u=o.viewport)!=null&&u.contains(l))&&n()}})});lp.displayName=ES;var hc="Toast",RO="toast.swipeStart",EO="toast.swipeMove",_O="toast.swipeCancel",kO="toast.swipeEnd",_S=f.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...a}=e,[l,c]=ln({prop:n,defaultProp:s??!0,onChange:o,caller:hc});return i.jsx(It,{present:r||l,children:i.jsx(AO,{open:l,...a,ref:t,onClose:()=>c(!1),onPause:Ge(e.onPause),onResume:Ge(e.onResume),onSwipeStart:U(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:U(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:U(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:U(e.onSwipeEnd,u=>{const{x:d,y:h}=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",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});_S.displayName=hc;var[TO,PO]=CS(hc,{onClose(){}}),AO=f.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:a,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:m,onSwipeEnd:p,...b}=e,g=Zd(hc,r),[w,x]=f.useState(null),y=ue(t,I=>x(I)),v=f.useRef(null),j=f.useRef(null),C=s||g.duration,S=f.useRef(0),N=f.useRef(C),R=f.useRef(0),{onToastAdd:k,onToastRemove:T}=g,O=Ge(()=>{var X;(w==null?void 0:w.contains(document.activeElement))&&((X=g.viewport)==null||X.focus()),a()}),A=f.useCallback(I=>{!I||I===1/0||(window.clearTimeout(R.current),S.current=new Date().getTime(),R.current=window.setTimeout(O,I))},[O]);f.useEffect(()=>{const I=g.viewport;if(I){const X=()=>{A(N.current),u==null||u()},V=()=>{const z=new Date().getTime()-S.current;N.current=N.current-z,window.clearTimeout(R.current),c==null||c()};return I.addEventListener(op,V),I.addEventListener(ap,X),()=>{I.removeEventListener(op,V),I.removeEventListener(ap,X)}}},[g.viewport,C,c,u,A]),f.useEffect(()=>{o&&!g.isClosePausedRef.current&&A(C)},[o,C,g.isClosePausedRef,A]),f.useEffect(()=>(k(),()=>T()),[k,T]);const q=f.useMemo(()=>w?IS(w):null,[w]);return g.viewport?i.jsxs(i.Fragment,{children:[q&&i.jsx(MO,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:q}),i.jsx(TO,{scope:r,onClose:O,children:Li.createPortal(i.jsx(Nv.ItemSlot,{scope:r,children:i.jsx(dO,{asChild:!0,onEscapeKeyDown:U(l,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:i.jsx(re.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":g.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:U(e.onKeyDown,I=>{I.key==="Escape"&&(l==null||l(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:U(e.onPointerDown,I=>{I.button===0&&(v.current={x:I.clientX,y:I.clientY})}),onPointerMove:U(e.onPointerMove,I=>{if(!v.current)return;const X=I.clientX-v.current.x,V=I.clientY-v.current.y,z=!!j.current,P=["left","right"].includes(g.swipeDirection),_=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,D=P?_(0,X):0,Q=P?0:_(0,V),K=I.pointerType==="touch"?10:2,ae={x:D,y:Q},se={originalEvent:I,delta:ae};z?(j.current=ae,Kc(EO,h,se,{discrete:!1})):L0(ae,g.swipeDirection,K)?(j.current=ae,Kc(RO,d,se,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(X)>K||Math.abs(V)>K)&&(v.current=null)}),onPointerUp:U(e.onPointerUp,I=>{const X=j.current,V=I.target;if(V.hasPointerCapture(I.pointerId)&&V.releasePointerCapture(I.pointerId),j.current=null,v.current=null,X){const z=I.currentTarget,P={originalEvent:I,delta:X};L0(X,g.swipeDirection,g.swipeThreshold)?Kc(kO,p,P,{discrete:!0}):Kc(_O,m,P,{discrete:!0}),z.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),MO=e=>{const{__scopeToast:t,children:r,...n}=e,s=Zd(hc,t),[o,a]=f.useState(!1),[l,c]=f.useState(!1);return DO(()=>a(!0)),f.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:i.jsx(dc,{asChild:!0,children:i.jsx(Qd,{...n,children:o&&i.jsxs(i.Fragment,{children:[s.label," ",r]})})})},OO="ToastTitle",kS=f.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return i.jsx(re.div,{...n,ref:t})});kS.displayName=OO;var IO="ToastDescription",TS=f.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return i.jsx(re.div,{...n,ref:t})});TS.displayName=IO;var PS="ToastAction",AS=f.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?i.jsx(OS,{altText:r,asChild:!0,children:i.jsx(Rv,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${PS}\`. Expected non-empty \`string\`.`),null)});AS.displayName=PS;var MS="ToastClose",Rv=f.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=PO(MS,r);return i.jsx(OS,{asChild:!0,children:i.jsx(re.button,{type:"button",...n,ref:t,onClick:U(e.onClick,s.onClose)})})});Rv.displayName=MS;var OS=f.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return i.jsx(re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function IS(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),LO(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const a=n.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...IS(n))}}),t}function Kc(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Cv(s,o):s.dispatchEvent(o)}var L0=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function DO(e=()=>{}){const t=Ge(e);at(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function LO(e){return e.nodeType===e.ELEMENT_NODE}function $O(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ym(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var FO=SS,DS=RS,LS=_S,$S=kS,FS=TS,zS=AS,VS=Rv;function US(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=US(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function BS(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=US(e))&&(n&&(n+=" "),n+=t);return n}const $0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,F0=BS,eh=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return F0(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],h=o==null?void 0:o[u];if(d===null)return null;const m=$0(d)||$0(h);return s[u][m]}),l=r&&Object.entries(r).reduce((u,d)=>{let[h,m]=d;return m===void 0||(u[h]=m),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:h,className:m,...p}=d;return Object.entries(p).every(b=>{let[g,w]=b;return Array.isArray(w)?w.includes({...o,...l}[g]):{...o,...l}[g]===w})?[...u,h,m]:u},[]);return F0(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),qS=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var VO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const UO=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:a,...l},c)=>f.createElement("svg",{ref:c,...VO,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:qS("lucide",s),...l},[...a.map(([u,d])=>f.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H=(e,t)=>{const r=f.forwardRef(({className:n,...s},o)=>f.createElement(UO,{ref:o,iconNode:t,className:qS(`lucide-${zO(e)}`,n),...s}));return r.displayName=`${e}`,r};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const BO=H("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const As=H("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ve=H("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qO=H("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HO=H("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bi=H("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const WO=H("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const GO=H("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KO=H("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sa=H("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xr=H("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const JO=H("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const th=H("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const va=H("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const At=H("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rh=H("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const YO=H("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ev=H("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const XO=H("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HS=H("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const QO=H("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ZO=H("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const WS=H("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $i=H("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eI=H("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tI=H("Euro",[["path",{d:"M4 10h12",key:"1y6xl8"}],["path",{d:"M4 14h9",key:"1loblj"}],["path",{d:"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",key:"1j6lzo"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jc=H("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rI=H("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nh=H("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mr=H("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const z0=H("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nI=H("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sI=H("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iI=H("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sh=H("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _i=H("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oI=H("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V0=H("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U0=H("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const B0=H("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const aI=H("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lI=H("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cI=H("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uI=H("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const GS=H("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Il=H("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dI=H("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ih=H("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hI=H("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mc=H("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kn=H("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mI=H("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fI=H("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const In=H("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pI=H("PiggyBank",[["path",{d:"M19 5c-1.5 0-2.8 1.4-3 2-3.5-1.5-11-.3-11 5 0 1.8 0 3 2 4.5V20h4v-2h3v2h4v-4c1-.5 1.7-1 2-2h2v-4h-2c0-1-.5-1.5-1-2V5z",key:"1ivx2i"}],["path",{d:"M2 9v1c0 1.1.9 2 2 2h1",key:"nm575m"}],["path",{d:"M16 11h.01",key:"xkw8gn"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ia=H("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cp=H("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gI=H("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oh=H("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KS=H("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _v=H("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vI=H("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xa=H("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const JS=H("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xI=H("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yI=H("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _u=H("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fi=H("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bI=H("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kv=H("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vt=H("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ah=H("UtensilsCrossed",[["path",{d:"m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8",key:"n7qcjb"}],["path",{d:"M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7",key:"d0u48b"}],["path",{d:"m2.1 21.8 6.4-6.3",key:"yn04lh"}],["path",{d:"m19 5-7 7",key:"194lzd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wI=H("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jI=H("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oa=H("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const YS=H("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Tv="-",CI=e=>{const t=NI(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const l=a.split(Tv);return l[0]===""&&l.length!==1&&l.shift(),XS(l,t)||SI(a)},getConflictingClassGroupIds:(a,l)=>{const c=r[a]||[];return l&&n[a]?[...c,...n[a]]:c}}},XS=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?XS(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Tv);return(a=t.validators.find(({validator:l})=>l(o)))==null?void 0:a.classGroupId},q0=/^\[(.+)\]$/,SI=e=>{if(q0.test(e)){const t=q0.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},NI=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return EI(Object.entries(e.classGroups),r).forEach(([o,a])=>{up(a,n,o,t)}),n},up=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:H0(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(RI(s)){up(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,a])=>{up(a,H0(t,o),r,n)})})},H0=(e,t)=>{let r=e;return t.split(Tv).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},RI=e=>e.isThemeGetter,EI=(e,t)=>t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,l])=>[t+a,l])):o);return[r,s]}):e,_I=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(o,a)=>{r.set(o,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let a=r.get(o);if(a!==void 0)return a;if((a=n.get(o))!==void 0)return s(o,a),a},set(o,a){r.has(o)?r.set(o,a):s(o,a)}}},QS="!",kI=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length,a=l=>{const c=[];let u=0,d=0,h;for(let w=0;w<l.length;w++){let x=l[w];if(u===0){if(x===s&&(n||l.slice(w,w+o)===t)){c.push(l.slice(d,w)),d=w+o;continue}if(x==="/"){h=w;continue}}x==="["?u++:x==="]"&&u--}const m=c.length===0?l:l.substring(d),p=m.startsWith(QS),b=p?m.substring(1):m,g=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:g}};return r?l=>r({className:l,parseClassName:a}):a},TI=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},PI=e=>({cache:_I(e.cacheSize),parseClassName:kI(e),...CI(e)}),AI=/\s+/,MI=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=[],a=e.trim().split(AI);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=r(u);let b=!!p,g=n(b?m.substring(0,p):m);if(!g){if(!b){l=u+(l.length>0?" "+l:l);continue}if(g=n(m),!g){l=u+(l.length>0?" "+l:l);continue}b=!1}const w=TI(d).join(":"),x=h?w+QS:w,y=x+g;if(o.includes(y))continue;o.push(y);const v=s(g,b);for(let j=0;j<v.length;++j){const C=v[j];o.push(x+C)}l=u+(l.length>0?" "+l:l)}return l};function OI(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ZS(t))&&(n&&(n+=" "),n+=r);return n}const ZS=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=ZS(e[n]))&&(r&&(r+=" "),r+=t);return r};function II(e,...t){let r,n,s,o=a;function a(c){const u=t.reduce((d,h)=>h(d),e());return r=PI(u),n=r.cache.get,s=r.cache.set,o=l,l(c)}function l(c){const u=n(c);if(u)return u;const d=MI(c,r);return s(c,d),d}return function(){return o(OI.apply(null,arguments))}}const Te=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},eN=/^\[(?:([a-z-]+):)?(.+)\]$/i,DI=/^\d+\/\d+$/,LI=new Set(["px","full","screen"]),$I=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FI=/\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$/,zI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,VI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,UI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yn=e=>Mo(e)||LI.has(e)||DI.test(e),Kn=e=>ya(e,"length",YI),Mo=e=>!!e&&!Number.isNaN(Number(e)),bm=e=>ya(e,"number",Mo),Ua=e=>!!e&&Number.isInteger(Number(e)),BI=e=>e.endsWith("%")&&Mo(e.slice(0,-1)),de=e=>eN.test(e),Jn=e=>$I.test(e),qI=new Set(["length","size","percentage"]),HI=e=>ya(e,qI,tN),WI=e=>ya(e,"position",tN),GI=new Set(["image","url"]),KI=e=>ya(e,GI,QI),JI=e=>ya(e,"",XI),Ba=()=>!0,ya=(e,t,r)=>{const n=eN.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},YI=e=>FI.test(e)&&!zI.test(e),tN=()=>!1,XI=e=>VI.test(e),QI=e=>UI.test(e),ZI=()=>{const e=Te("colors"),t=Te("spacing"),r=Te("blur"),n=Te("brightness"),s=Te("borderColor"),o=Te("borderRadius"),a=Te("borderSpacing"),l=Te("borderWidth"),c=Te("contrast"),u=Te("grayscale"),d=Te("hueRotate"),h=Te("invert"),m=Te("gap"),p=Te("gradientColorStops"),b=Te("gradientColorStopPositions"),g=Te("inset"),w=Te("margin"),x=Te("opacity"),y=Te("padding"),v=Te("saturate"),j=Te("scale"),C=Te("sepia"),S=Te("skew"),N=Te("space"),R=Te("translate"),k=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",de,t],A=()=>[de,t],q=()=>["",yn,Kn],I=()=>["auto",Mo,de],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",de],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[Mo,de];return{cacheSize:500,separator:":",theme:{colors:[Ba],spacing:[yn,Kn],blur:["none","",Jn,de],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Jn,de],borderSpacing:A(),borderWidth:q(),contrast:Q(),grayscale:_(),hueRotate:Q(),invert:_(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[BI,Kn],inset:O(),margin:O(),opacity:Q(),padding:A(),saturate:Q(),scale:Q(),sepia:_(),skew:Q(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",de]}],container:["container"],columns:[{columns:[Jn]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:[...X(),de]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ua,de]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",de]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",Ua,de]}],"grid-cols":[{"grid-cols":[Ba]}],"col-start-end":[{col:["auto",{span:["full",Ua,de]},de]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[Ba]}],"row-start-end":[{row:["auto",{span:[Ua,de]},de]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",de]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",de]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[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:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",de,t]}],"min-w":[{"min-w":[de,t,"min","max","fit"]}],"max-w":[{"max-w":[de,t,"none","full","min","max","fit","prose",{screen:[Jn]},Jn]}],h:[{h:[de,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[de,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[de,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[de,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Jn,Kn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",bm]}],"font-family":[{font:[Ba]}],"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",de]}],"line-clamp":[{"line-clamp":["none",Mo,bm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yn,de]}],"list-image":[{"list-image":["none",de]}],"list-style-type":[{list:["none","disc","decimal",de]}],"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:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yn,Kn]}],"underline-offset":[{"underline-offset":["auto",yn,de]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de]}],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",de]}],"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:[...X(),WI]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",HI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},KI]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:V()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[yn,de]}],"outline-w":[{outline:[yn,Kn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[yn,Kn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Jn,JI]}],"shadow-color":[{shadow:[Ba]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Jn,de]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[v]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",de]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",de]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",de]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Ua,de]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"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",de]}],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",de]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",de]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[yn,Kn,bm]}],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"]}}},eD=II(ZI);function te(...e){return eD(BS(e))}const tD=FO,rN=f.forwardRef(({className:e,...t},r)=>i.jsx(DS,{ref:r,className:te("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}));rN.displayName=DS.displayName;const rD=eh("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"}}),nN=f.forwardRef(({className:e,variant:t,...r},n)=>i.jsx(LS,{ref:n,className:te(rD({variant:t}),e),...r}));nN.displayName=LS.displayName;const nD=f.forwardRef(({className:e,...t},r)=>i.jsx(zS,{ref:r,className:te("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 group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));nD.displayName=zS.displayName;const sN=f.forwardRef(({className:e,...t},r)=>i.jsx(VS,{ref:r,className:te("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:i.jsx(oa,{className:"h-4 w-4"})}));sN.displayName=VS.displayName;const iN=f.forwardRef(({className:e,...t},r)=>i.jsx($S,{ref:r,className:te("text-sm font-semibold",e),...t}));iN.displayName=$S.displayName;const oN=f.forwardRef(({className:e,...t},r)=>i.jsx(FS,{ref:r,className:te("text-sm opacity-90",e),...t}));oN.displayName=FS.displayName;function sD(){const{toasts:e}=dn();return i.jsxs(tD,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return i.jsxs(nN,{...o,children:[i.jsxs("div",{className:"grid gap-1",children:[r&&i.jsx(iN,{children:r}),n&&i.jsx(oN,{children:n})]}),s,i.jsx(sN,{})]},t)}),i.jsx(rN,{})]})}var W0=["light","dark"],iD="(prefers-color-scheme: dark)",oD=f.createContext(void 0),aD={setTheme:e=>{},themes:[]},lD=()=>{var e;return(e=f.useContext(oD))!=null?e:aD};f.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:o,value:a,attrs:l,nonce:c})=>{let u=o==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?W0.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(b,g=!1,w=!0)=>{let x=a?a[b]:b,y=g?b+"|| ''":`'${x}'`,v="";return s&&w&&!g&&W0.includes(b)&&(v+=`d.style.colorScheme = '${b}';`),r==="class"?g||x?v+=`c.add(${y})`:v+="null":x&&(v+=`d[s](n,${y})`),v},p=e?`!function(){${d}${m(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${iD}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${m(a?"x[e]":"e",!0)}}${u?"":"else{"+m(o,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${m(a?"x[e]":"e",!0)}}else{${m(o,!1,!1)};}${h}}catch(t){}}();`;return f.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:p}})});var cD=e=>{switch(e){case"success":return hD;case"info":return fD;case"warning":return mD;case"error":return pD;default:return null}},uD=Array(12).fill(0),dD=({visible:e,className:t})=>M.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},M.createElement("div",{className:"sonner-spinner"},uD.map((r,n)=>M.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),hD=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),mD=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},M.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"})),fD=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),pD=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),gD=M.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"},M.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),vD=()=>{let[e,t]=M.useState(document.hidden);return M.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},dp=1,xD=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:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:dp++,o=this.toasts.find(l=>l.id===s),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:r}),{...l,...e,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...n,dismissible:a,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({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 r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,o,a=n.then(async c=>{if(o=["resolve",c],M.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(bD(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:r,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"success",message:u,description:d})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>a.then(()=>o[0]==="reject"?u(o[1]):c(o[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||dp++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ft=new xD,yD=(e,t)=>{let r=(t==null?void 0:t.id)||dp++;return Ft.addToast({title:e,...t,id:r}),r},bD=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",wD=yD,jD=()=>Ft.toasts,CD=()=>Ft.getActiveToasts();Object.assign(wD,{success:Ft.success,info:Ft.info,warning:Ft.warning,error:Ft.error,custom:Ft.custom,message:Ft.message,promise:Ft.promise,dismiss:Ft.dismiss,loading:Ft.loading},{getHistory:jD,getToasts:CD});function SD(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}SD(`: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 Yc(e){return e.label!==void 0}var ND=3,RD="32px",ED="16px",G0=4e3,_D=356,kD=14,TD=20,PD=200;function Sr(...e){return e.filter(Boolean).join(" ")}function AD(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var MD=e=>{var t,r,n,s,o,a,l,c,u,d,h;let{invert:m,toast:p,unstyled:b,interacting:g,setHeights:w,visibleToasts:x,heights:y,index:v,toasts:j,expanded:C,removeToast:S,defaultRichColors:N,closeButton:R,style:k,cancelButtonStyle:T,actionButtonStyle:O,className:A="",descriptionClassName:q="",duration:I,position:X,gap:V,loadingIcon:z,expandByDefault:P,classNames:_,icons:D,closeButtonAriaLabel:Q="Close toast",pauseWhenPageIsHidden:K}=e,[ae,se]=M.useState(null),[je,Ce]=M.useState(null),[B,xe]=M.useState(!1),[ye,fe]=M.useState(!1),[pe,L]=M.useState(!1),[le,be]=M.useState(!1),[Oe,vn]=M.useState(!1),[Wr,Un]=M.useState(0),[Bn,hy]=M.useState(0),Pa=M.useRef(p.duration||I||G0),my=M.useRef(null),qs=M.useRef(null),IT=v===0,DT=v+1<=x,nr=p.type,qi=p.dismissible!==!1,LT=p.className||"",$T=p.descriptionClassName||"",Ec=M.useMemo(()=>y.findIndex(ce=>ce.toastId===p.id)||0,[y,p.id]),FT=M.useMemo(()=>{var ce;return(ce=p.closeButton)!=null?ce:R},[p.closeButton,R]),fy=M.useMemo(()=>p.duration||I||G0,[p.duration,I]),Fh=M.useRef(0),Hi=M.useRef(0),py=M.useRef(0),Wi=M.useRef(null),[zT,VT]=X.split("-"),gy=M.useMemo(()=>y.reduce((ce,Ee,Ie)=>Ie>=Ec?ce:ce+Ee.height,0),[y,Ec]),vy=vD(),UT=p.invert||m,zh=nr==="loading";Hi.current=M.useMemo(()=>Ec*V+gy,[Ec,gy]),M.useEffect(()=>{Pa.current=fy},[fy]),M.useEffect(()=>{xe(!0)},[]),M.useEffect(()=>{let ce=qs.current;if(ce){let Ee=ce.getBoundingClientRect().height;return hy(Ee),w(Ie=>[{toastId:p.id,height:Ee,position:p.position},...Ie]),()=>w(Ie=>Ie.filter(br=>br.toastId!==p.id))}},[w,p.id]),M.useLayoutEffect(()=>{if(!B)return;let ce=qs.current,Ee=ce.style.height;ce.style.height="auto";let Ie=ce.getBoundingClientRect().height;ce.style.height=Ee,hy(Ie),w(br=>br.find(wr=>wr.toastId===p.id)?br.map(wr=>wr.toastId===p.id?{...wr,height:Ie}:wr):[{toastId:p.id,height:Ie,position:p.position},...br])},[B,p.title,p.description,w,p.id]);let qn=M.useCallback(()=>{fe(!0),Un(Hi.current),w(ce=>ce.filter(Ee=>Ee.toastId!==p.id)),setTimeout(()=>{S(p)},PD)},[p,S,w,Hi]);M.useEffect(()=>{if(p.promise&&nr==="loading"||p.duration===1/0||p.type==="loading")return;let ce;return C||g||K&&vy?(()=>{if(py.current<Fh.current){let Ee=new Date().getTime()-Fh.current;Pa.current=Pa.current-Ee}py.current=new Date().getTime()})():Pa.current!==1/0&&(Fh.current=new Date().getTime(),ce=setTimeout(()=>{var Ee;(Ee=p.onAutoClose)==null||Ee.call(p,p),qn()},Pa.current)),()=>clearTimeout(ce)},[C,g,p,nr,K,vy,qn]),M.useEffect(()=>{p.delete&&qn()},[qn,p.delete]);function BT(){var ce,Ee,Ie;return D!=null&&D.loading?M.createElement("div",{className:Sr(_==null?void 0:_.loader,(ce=p==null?void 0:p.classNames)==null?void 0:ce.loader,"sonner-loader"),"data-visible":nr==="loading"},D.loading):z?M.createElement("div",{className:Sr(_==null?void 0:_.loader,(Ee=p==null?void 0:p.classNames)==null?void 0:Ee.loader,"sonner-loader"),"data-visible":nr==="loading"},z):M.createElement(dD,{className:Sr(_==null?void 0:_.loader,(Ie=p==null?void 0:p.classNames)==null?void 0:Ie.loader),visible:nr==="loading"})}return M.createElement("li",{tabIndex:0,ref:qs,className:Sr(A,LT,_==null?void 0:_.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,_==null?void 0:_.default,_==null?void 0:_[nr],(r=p==null?void 0:p.classNames)==null?void 0:r[nr]),"data-sonner-toast":"","data-rich-colors":(n=p.richColors)!=null?n:N,"data-styled":!(p.jsx||p.unstyled||b),"data-mounted":B,"data-promise":!!p.promise,"data-swiped":Oe,"data-removed":ye,"data-visible":DT,"data-y-position":zT,"data-x-position":VT,"data-index":v,"data-front":IT,"data-swiping":pe,"data-dismissible":qi,"data-type":nr,"data-invert":UT,"data-swipe-out":le,"data-swipe-direction":je,"data-expanded":!!(C||P&&B),style:{"--index":v,"--toasts-before":v,"--z-index":j.length-v,"--offset":`${ye?Wr:Hi.current}px`,"--initial-height":P?"auto":`${Bn}px`,...k,...p.style},onDragEnd:()=>{L(!1),se(null),Wi.current=null},onPointerDown:ce=>{zh||!qi||(my.current=new Date,Un(Hi.current),ce.target.setPointerCapture(ce.pointerId),ce.target.tagName!=="BUTTON"&&(L(!0),Wi.current={x:ce.clientX,y:ce.clientY}))},onPointerUp:()=>{var ce,Ee,Ie,br;if(le||!qi)return;Wi.current=null;let wr=Number(((ce=qs.current)==null?void 0:ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Hn=Number(((Ee=qs.current)==null?void 0:Ee.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Hs=new Date().getTime()-((Ie=my.current)==null?void 0:Ie.getTime()),jr=ae==="x"?wr:Hn,Wn=Math.abs(jr)/Hs;if(Math.abs(jr)>=TD||Wn>.11){Un(Hi.current),(br=p.onDismiss)==null||br.call(p,p),Ce(ae==="x"?wr>0?"right":"left":Hn>0?"down":"up"),qn(),be(!0),vn(!1);return}L(!1),se(null)},onPointerMove:ce=>{var Ee,Ie,br,wr;if(!Wi.current||!qi||((Ee=window.getSelection())==null?void 0:Ee.toString().length)>0)return;let Hn=ce.clientY-Wi.current.y,Hs=ce.clientX-Wi.current.x,jr=(Ie=e.swipeDirections)!=null?Ie:AD(X);!ae&&(Math.abs(Hs)>1||Math.abs(Hn)>1)&&se(Math.abs(Hs)>Math.abs(Hn)?"x":"y");let Wn={x:0,y:0};ae==="y"?(jr.includes("top")||jr.includes("bottom"))&&(jr.includes("top")&&Hn<0||jr.includes("bottom")&&Hn>0)&&(Wn.y=Hn):ae==="x"&&(jr.includes("left")||jr.includes("right"))&&(jr.includes("left")&&Hs<0||jr.includes("right")&&Hs>0)&&(Wn.x=Hs),(Math.abs(Wn.x)>0||Math.abs(Wn.y)>0)&&vn(!0),(br=qs.current)==null||br.style.setProperty("--swipe-amount-x",`${Wn.x}px`),(wr=qs.current)==null||wr.style.setProperty("--swipe-amount-y",`${Wn.y}px`)}},FT&&!p.jsx?M.createElement("button",{"aria-label":Q,"data-disabled":zh,"data-close-button":!0,onClick:zh||!qi?()=>{}:()=>{var ce;qn(),(ce=p.onDismiss)==null||ce.call(p,p)},className:Sr(_==null?void 0:_.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(o=D==null?void 0:D.close)!=null?o:gD):null,p.jsx||f.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:M.createElement(M.Fragment,null,nr||p.icon||p.promise?M.createElement("div",{"data-icon":"",className:Sr(_==null?void 0:_.icon,(a=p==null?void 0:p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||BT():null,p.type!=="loading"?p.icon||(D==null?void 0:D[nr])||cD(nr):null):null,M.createElement("div",{"data-content":"",className:Sr(_==null?void 0:_.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},M.createElement("div",{"data-title":"",className:Sr(_==null?void 0:_.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?M.createElement("div",{"data-description":"",className:Sr(q,$T,_==null?void 0:_.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),f.isValidElement(p.cancel)?p.cancel:p.cancel&&Yc(p.cancel)?M.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||T,onClick:ce=>{var Ee,Ie;Yc(p.cancel)&&qi&&((Ie=(Ee=p.cancel).onClick)==null||Ie.call(Ee,ce),qn())},className:Sr(_==null?void 0:_.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,f.isValidElement(p.action)?p.action:p.action&&Yc(p.action)?M.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||O,onClick:ce=>{var Ee,Ie;Yc(p.action)&&((Ie=(Ee=p.action).onClick)==null||Ie.call(Ee,ce),!ce.defaultPrevented&&qn())},className:Sr(_==null?void 0:_.actionButton,(h=p==null?void 0:p.classNames)==null?void 0:h.actionButton)},p.action.label):null))};function K0(){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 OD(e,t){let r={};return[e,t].forEach((n,s)=>{let o=s===1,a=o?"--mobile-offset":"--offset",l=o?ED:RD;function c(u){["top","right","bottom","left"].forEach(d=>{r[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${a}-${u}`]=l:r[`${a}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):c(l)}),r}var ID=f.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:m,style:p,visibleToasts:b=ND,toastOptions:g,dir:w=K0(),gap:x=kD,loadingIcon:y,icons:v,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:C}=e,[S,N]=M.useState([]),R=M.useMemo(()=>Array.from(new Set([n].concat(S.filter(K=>K.position).map(K=>K.position)))),[S,n]),[k,T]=M.useState([]),[O,A]=M.useState(!1),[q,I]=M.useState(!1),[X,V]=M.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=M.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=M.useRef(null),D=M.useRef(!1),Q=M.useCallback(K=>{N(ae=>{var se;return(se=ae.find(je=>je.id===K.id))!=null&&se.delete||Ft.dismiss(K.id),ae.filter(({id:je})=>je!==K.id)})},[]);return M.useEffect(()=>Ft.subscribe(K=>{if(K.dismiss){N(ae=>ae.map(se=>se.id===K.id?{...se,delete:!0}:se));return}setTimeout(()=>{aS.flushSync(()=>{N(ae=>{let se=ae.findIndex(je=>je.id===K.id);return se!==-1?[...ae.slice(0,se),{...ae[se],...K},...ae.slice(se+1)]:[K,...ae]})})})}),[]),M.useEffect(()=>{if(d!=="system"){V(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:ae})=>{V(ae?"dark":"light")})}catch{K.addListener(({matches:se})=>{try{V(se?"dark":"light")}catch(je){console.error(je)}})}},[d]),M.useEffect(()=>{S.length<=1&&A(!1)},[S]),M.useEffect(()=>{let K=ae=>{var se,je;s.every(Ce=>ae[Ce]||ae.code===Ce)&&(A(!0),(se=z.current)==null||se.focus()),ae.code==="Escape"&&(document.activeElement===z.current||(je=z.current)!=null&&je.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[s]),M.useEffect(()=>{if(z.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,D.current=!1)}},[z.current]),M.createElement("section",{ref:t,"aria-label":`${j} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((K,ae)=>{var se;let[je,Ce]=K.split("-");return S.length?M.createElement("ol",{key:K,dir:w==="auto"?K0():w,tabIndex:-1,ref:z,className:l,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":je,"data-lifted":O&&S.length>1&&!o,"data-x-position":Ce,style:{"--front-toast-height":`${((se=k[0])==null?void 0:se.height)||0}px`,"--width":`${_D}px`,"--gap":`${x}px`,...p,...OD(c,u)},onBlur:B=>{D.current&&!B.currentTarget.contains(B.relatedTarget)&&(D.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||D.current||(D.current=!0,_.current=B.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{q||A(!1)},onDragEnd:()=>A(!1),onPointerDown:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},S.filter(B=>!B.position&&ae===0||B.position===K).map((B,xe)=>{var ye,fe;return M.createElement(MD,{key:B.id,icons:v,index:xe,toast:B,defaultRichColors:h,duration:(ye=g==null?void 0:g.duration)!=null?ye:m,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:b,closeButton:(fe=g==null?void 0:g.closeButton)!=null?fe:a,interacting:q,position:K,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:Q,toasts:S.filter(pe=>pe.position==B.position),heights:k.filter(pe=>pe.position==B.position),setHeights:T,expandByDefault:o,gap:x,loadingIcon:y,expanded:O,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const DD=({...e})=>{const{theme:t="system"}=lD();return i.jsx(ID,{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 LD=Pg[" useId ".trim().toString()]||(()=>{}),$D=0;function Fr(e){const[t,r]=f.useState(LD());return at(()=>{r(n=>n??String($D++))},[e]),t?`radix-${t}`:""}const FD=["top","right","bottom","left"],Ms=Math.min,Kt=Math.max,cd=Math.round,Xc=Math.floor,sn=e=>({x:e,y:e}),zD={left:"right",right:"left",bottom:"top",top:"bottom"},VD={start:"end",end:"start"};function hp(e,t,r){return Kt(e,Ms(t,r))}function Dn(e,t){return typeof e=="function"?e(t):e}function Ln(e){return e.split("-")[0]}function ba(e){return e.split("-")[1]}function Pv(e){return e==="x"?"y":"x"}function Av(e){return e==="y"?"height":"width"}const UD=new Set(["top","bottom"]);function tn(e){return UD.has(Ln(e))?"y":"x"}function Mv(e){return Pv(tn(e))}function BD(e,t,r){r===void 0&&(r=!1);const n=ba(e),s=Mv(e),o=Av(s);let a=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ud(a)),[a,ud(a)]}function qD(e){const t=ud(e);return[mp(e),t,mp(t)]}function mp(e){return e.replace(/start|end/g,t=>VD[t])}const J0=["left","right"],Y0=["right","left"],HD=["top","bottom"],WD=["bottom","top"];function GD(e,t,r){switch(e){case"top":case"bottom":return r?t?Y0:J0:t?J0:Y0;case"left":case"right":return t?HD:WD;default:return[]}}function KD(e,t,r,n){const s=ba(e);let o=GD(Ln(e),r==="start",n);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(mp)))),o}function ud(e){return e.replace(/left|right|bottom|top/g,t=>zD[t])}function JD(e){return{top:0,right:0,bottom:0,left:0,...e}}function aN(e){return typeof e!="number"?JD(e):{top:e,right:e,bottom:e,left:e}}function dd(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function X0(e,t,r){let{reference:n,floating:s}=e;const o=tn(t),a=Mv(t),l=Av(a),c=Ln(t),u=o==="y",d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,m=n[l]/2-s[l]/2;let p;switch(c){case"top":p={x:d,y:n.y-s.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-s.width,y:h};break;default:p={x:n.x,y:n.y}}switch(ba(t)){case"start":p[a]-=m*(r&&u?-1:1);break;case"end":p[a]+=m*(r&&u?-1:1);break}return p}const YD=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:a}=r,l=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=X0(u,n,c),m=n,p={},b=0;for(let g=0;g<l.length;g++){const{name:w,fn:x}=l[g],{x:y,y:v,data:j,reset:C}=await x({x:d,y:h,initialPlacement:n,placement:m,strategy:s,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});d=y??d,h=v??h,p={...p,[w]:{...p[w],...j}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(u=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):C.rects),{x:d,y:h}=X0(u,m,c)),g=-1)}return{x:d,y:h,placement:m,strategy:s,middlewareData:p}};async function Dl(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:p=0}=Dn(t,e),b=aN(p),w=l[m?h==="floating"?"reference":"floating":h],x=dd(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(w)))==null||r?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),y=h==="floating"?{x:n,y:s,width:a.floating.width,height:a.floating.height}:a.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),j=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},C=dd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:c}):y);return{top:(x.top-C.top+b.top)/j.y,bottom:(C.bottom-x.bottom+b.bottom)/j.y,left:(x.left-C.left+b.left)/j.x,right:(C.right-x.right+b.right)/j.x}}const XD=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:a,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Dn(e,t)||{};if(u==null)return{};const h=aN(d),m={x:r,y:n},p=Mv(s),b=Av(p),g=await a.getDimensions(u),w=p==="y",x=w?"top":"left",y=w?"bottom":"right",v=w?"clientHeight":"clientWidth",j=o.reference[b]+o.reference[p]-m[p]-o.floating[b],C=m[p]-o.reference[p],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let N=S?S[v]:0;(!N||!await(a.isElement==null?void 0:a.isElement(S)))&&(N=l.floating[v]||o.floating[b]);const R=j/2-C/2,k=N/2-g[b]/2-1,T=Ms(h[x],k),O=Ms(h[y],k),A=T,q=N-g[b]-O,I=N/2-g[b]/2+R,X=hp(A,I,q),V=!c.arrow&&ba(s)!=null&&I!==X&&o.reference[b]/2-(I<A?T:O)-g[b]/2<0,z=V?I<A?I-A:I-q:0;return{[p]:m[p]+z,data:{[p]:X,centerOffset:I-X-z,...V&&{alignmentOffset:z}},reset:V}}}),QD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:a,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...w}=Dn(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const x=Ln(s),y=tn(l),v=Ln(l)===l,j=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=m||(v||!g?[ud(l)]:qD(l)),S=b!=="none";!m&&S&&C.push(...KD(l,g,b,j));const N=[l,...C],R=await Dl(t,w),k=[];let T=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&k.push(R[x]),h){const I=BD(s,a,j);k.push(R[I[0]],R[I[1]])}if(T=[...T,{placement:s,overflows:k}],!k.every(I=>I<=0)){var O,A;const I=(((O=o.flip)==null?void 0:O.index)||0)+1,X=N[I];if(X&&(!(h==="alignment"?y!==tn(X):!1)||T.every(P=>P.overflows[0]>0&&tn(P.placement)===y)))return{data:{index:I,overflows:T},reset:{placement:X}};let V=(A=T.filter(z=>z.overflows[0]<=0).sort((z,P)=>z.overflows[1]-P.overflows[1])[0])==null?void 0:A.placement;if(!V)switch(p){case"bestFit":{var q;const z=(q=T.filter(P=>{if(S){const _=tn(P.placement);return _===y||_==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(_=>_>0).reduce((_,D)=>_+D,0)]).sort((P,_)=>P[1]-_[1])[0])==null?void 0:q[0];z&&(V=z);break}case"initialPlacement":V=l;break}if(s!==V)return{reset:{placement:V}}}return{}}}};function Q0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Z0(e){return FD.some(t=>e[t]>=0)}const ZD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Dn(e,t);switch(n){case"referenceHidden":{const o=await Dl(t,{...s,elementContext:"reference"}),a=Q0(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Z0(a)}}}case"escaped":{const o=await Dl(t,{...s,altBoundary:!0}),a=Q0(o,r.floating);return{data:{escapedOffsets:a,escaped:Z0(a)}}}default:return{}}}}},lN=new Set(["left","top"]);async function e4(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),a=Ln(r),l=ba(r),c=tn(r)==="y",u=lN.has(a)?-1:1,d=o&&c?-1:1,h=Dn(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof b=="number"&&(p=l==="end"?b*-1:b),c?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const t4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:a,middlewareData:l}=t,c=await e4(t,e);return a===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:a}}}}},r4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x,y}=w;return{x,y}}},...c}=Dn(e,t),u={x:r,y:n},d=await Dl(t,c),h=tn(Ln(s)),m=Pv(h);let p=u[m],b=u[h];if(o){const w=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=p+d[w],v=p-d[x];p=hp(y,p,v)}if(a){const w=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=b+d[w],v=b-d[x];b=hp(y,b,v)}const g=l.fn({...t,[m]:p,[h]:b});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[m]:o,[h]:a}}}}}},n4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Dn(e,t),d={x:r,y:n},h=tn(s),m=Pv(h);let p=d[m],b=d[h];const g=Dn(l,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const v=m==="y"?"height":"width",j=o.reference[m]-o.floating[v]+w.mainAxis,C=o.reference[m]+o.reference[v]-w.mainAxis;p<j?p=j:p>C&&(p=C)}if(u){var x,y;const v=m==="y"?"width":"height",j=lN.has(Ln(s)),C=o.reference[h]-o.floating[v]+(j&&((x=a.offset)==null?void 0:x[h])||0)+(j?0:w.crossAxis),S=o.reference[h]+o.reference[v]+(j?0:((y=a.offset)==null?void 0:y[h])||0)-(j?w.crossAxis:0);b<C?b=C:b>S&&(b=S)}return{[m]:p,[h]:b}}}},s4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:a,elements:l}=t,{apply:c=()=>{},...u}=Dn(e,t),d=await Dl(t,u),h=Ln(s),m=ba(s),p=tn(s)==="y",{width:b,height:g}=o.floating;let w,x;h==="top"||h==="bottom"?(w=h,x=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(x=h,w=m==="end"?"top":"bottom");const y=g-d.top-d.bottom,v=b-d.left-d.right,j=Ms(g-d[w],y),C=Ms(b-d[x],v),S=!t.middlewareData.shift;let N=j,R=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=y),S&&!m){const T=Kt(d.left,0),O=Kt(d.right,0),A=Kt(d.top,0),q=Kt(d.bottom,0);p?R=b-2*(T!==0||O!==0?T+O:Kt(d.left,d.right)):N=g-2*(A!==0||q!==0?A+q:Kt(d.top,d.bottom))}await c({...t,availableWidth:R,availableHeight:N});const k=await a.getDimensions(l.floating);return b!==k.width||g!==k.height?{reset:{rects:!0}}:{}}}};function lh(){return typeof window<"u"}function wa(e){return cN(e)?(e.nodeName||"").toLowerCase():"#document"}function Zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hn(e){var t;return(t=(cN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function cN(e){return lh()?e instanceof Node||e instanceof Zt(e).Node:!1}function Vr(e){return lh()?e instanceof Element||e instanceof Zt(e).Element:!1}function cn(e){return lh()?e instanceof HTMLElement||e instanceof Zt(e).HTMLElement:!1}function eb(e){return!lh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zt(e).ShadowRoot}const i4=new Set(["inline","contents"]);function fc(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!i4.has(s)}const o4=new Set(["table","td","th"]);function a4(e){return o4.has(wa(e))}const l4=[":popover-open",":modal"];function ch(e){return l4.some(t=>{try{return e.matches(t)}catch{return!1}})}const c4=["transform","translate","scale","rotate","perspective"],u4=["transform","translate","scale","rotate","perspective","filter"],d4=["paint","layout","strict","content"];function Ov(e){const t=Iv(),r=Vr(e)?Ur(e):e;return c4.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||u4.some(n=>(r.willChange||"").includes(n))||d4.some(n=>(r.contain||"").includes(n))}function h4(e){let t=Os(e);for(;cn(t)&&!aa(t);){if(Ov(t))return t;if(ch(t))return null;t=Os(t)}return null}function Iv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const m4=new Set(["html","body","#document"]);function aa(e){return m4.has(wa(e))}function Ur(e){return Zt(e).getComputedStyle(e)}function uh(e){return Vr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Os(e){if(wa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||eb(e)&&e.host||hn(e);return eb(t)?t.host:t}function uN(e){const t=Os(e);return aa(t)?e.ownerDocument?e.ownerDocument.body:e.body:cn(t)&&fc(t)?t:uN(t)}function Ll(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=uN(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),a=Zt(s);if(o){const l=fp(a);return t.concat(a,a.visualViewport||[],fc(s)?s:[],l&&r?Ll(l):[])}return t.concat(s,Ll(s,[],r))}function fp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function dN(e){const t=Ur(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=cn(e),o=s?e.offsetWidth:r,a=s?e.offsetHeight:n,l=cd(r)!==o||cd(n)!==a;return l&&(r=o,n=a),{width:r,height:n,$:l}}function Dv(e){return Vr(e)?e:e.contextElement}function Oo(e){const t=Dv(e);if(!cn(t))return sn(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=dN(t);let a=(o?cd(r.width):r.width)/n,l=(o?cd(r.height):r.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const f4=sn(0);function hN(e){const t=Zt(e);return!Iv()||!t.visualViewport?f4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function p4(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Zt(e)?!1:t}function ki(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=Dv(e);let a=sn(1);t&&(n?Vr(n)&&(a=Oo(n)):a=Oo(e));const l=p4(o,r,n)?hN(o):sn(0);let c=(s.left+l.x)/a.x,u=(s.top+l.y)/a.y,d=s.width/a.x,h=s.height/a.y;if(o){const m=Zt(o),p=n&&Vr(n)?Zt(n):n;let b=m,g=fp(b);for(;g&&n&&p!==b;){const w=Oo(g),x=g.getBoundingClientRect(),y=Ur(g),v=x.left+(g.clientLeft+parseFloat(y.paddingLeft))*w.x,j=x.top+(g.clientTop+parseFloat(y.paddingTop))*w.y;c*=w.x,u*=w.y,d*=w.x,h*=w.y,c+=v,u+=j,b=Zt(g),g=fp(b)}}return dd({width:d,height:h,x:c,y:u})}function Lv(e,t){const r=uh(e).scrollLeft;return t?t.left+r:ki(hn(e)).left+r}function mN(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:Lv(e,n)),o=n.top+t.scrollTop;return{x:s,y:o}}function g4(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",a=hn(n),l=t?ch(t.floating):!1;if(n===a||l&&o)return r;let c={scrollLeft:0,scrollTop:0},u=sn(1);const d=sn(0),h=cn(n);if((h||!h&&!o)&&((wa(n)!=="body"||fc(a))&&(c=uh(n)),cn(n))){const p=ki(n);u=Oo(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const m=a&&!h&&!o?mN(a,c,!0):sn(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:r.y*u.y-c.scrollTop*u.y+d.y+m.y}}function v4(e){return Array.from(e.getClientRects())}function x4(e){const t=hn(e),r=uh(e),n=e.ownerDocument.body,s=Kt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Kt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Lv(e);const l=-r.scrollTop;return Ur(n).direction==="rtl"&&(a+=Kt(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:a,y:l}}function y4(e,t){const r=Zt(e),n=hn(e),s=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,l=0,c=0;if(s){o=s.width,a=s.height;const u=Iv();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:o,height:a,x:l,y:c}}const b4=new Set(["absolute","fixed"]);function w4(e,t){const r=ki(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=cn(e)?Oo(e):sn(1),a=e.clientWidth*o.x,l=e.clientHeight*o.y,c=s*o.x,u=n*o.y;return{width:a,height:l,x:c,y:u}}function tb(e,t,r){let n;if(t==="viewport")n=y4(e,r);else if(t==="document")n=x4(hn(e));else if(Vr(t))n=w4(t,r);else{const s=hN(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return dd(n)}function fN(e,t){const r=Os(e);return r===t||!Vr(r)||aa(r)?!1:Ur(r).position==="fixed"||fN(r,t)}function j4(e,t){const r=t.get(e);if(r)return r;let n=Ll(e,[],!1).filter(l=>Vr(l)&&wa(l)!=="body"),s=null;const o=Ur(e).position==="fixed";let a=o?Os(e):e;for(;Vr(a)&&!aa(a);){const l=Ur(a),c=Ov(a);!c&&l.position==="fixed"&&(s=null),(o?!c&&!s:!c&&l.position==="static"&&!!s&&b4.has(s.position)||fc(a)&&!c&&fN(e,a))?n=n.filter(d=>d!==a):s=l,a=Os(a)}return t.set(e,n),n}function C4(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const a=[...r==="clippingAncestors"?ch(t)?[]:j4(t,this._c):[].concat(r),n],l=a[0],c=a.reduce((u,d)=>{const h=tb(t,d,s);return u.top=Kt(h.top,u.top),u.right=Ms(h.right,u.right),u.bottom=Ms(h.bottom,u.bottom),u.left=Kt(h.left,u.left),u},tb(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function S4(e){const{width:t,height:r}=dN(e);return{width:t,height:r}}function N4(e,t,r){const n=cn(t),s=hn(t),o=r==="fixed",a=ki(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=sn(0);function u(){c.x=Lv(s)}if(n||!n&&!o)if((wa(t)!=="body"||fc(s))&&(l=uh(t)),n){const p=ki(t,!0,o,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else s&&u();o&&!n&&s&&u();const d=s&&!n&&!o?mN(s,l):sn(0),h=a.left+l.scrollLeft-c.x-d.x,m=a.top+l.scrollTop-c.y-d.y;return{x:h,y:m,width:a.width,height:a.height}}function wm(e){return Ur(e).position==="static"}function rb(e,t){if(!cn(e)||Ur(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return hn(e)===r&&(r=r.ownerDocument.body),r}function pN(e,t){const r=Zt(e);if(ch(e))return r;if(!cn(e)){let s=Os(e);for(;s&&!aa(s);){if(Vr(s)&&!wm(s))return s;s=Os(s)}return r}let n=rb(e,t);for(;n&&a4(n)&&wm(n);)n=rb(n,t);return n&&aa(n)&&wm(n)&&!Ov(n)?r:n||h4(e)||r}const R4=async function(e){const t=this.getOffsetParent||pN,r=this.getDimensions,n=await r(e.floating);return{reference:N4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function E4(e){return Ur(e).direction==="rtl"}const _4={convertOffsetParentRelativeRectToViewportRelativeRect:g4,getDocumentElement:hn,getClippingRect:C4,getOffsetParent:pN,getElementRects:R4,getClientRects:v4,getDimensions:S4,getScale:Oo,isElement:Vr,isRTL:E4};function gN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function k4(e,t){let r=null,n;const s=hn(e);function o(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const u=e.getBoundingClientRect(),{left:d,top:h,width:m,height:p}=u;if(l||t(),!m||!p)return;const b=Xc(h),g=Xc(s.clientWidth-(d+m)),w=Xc(s.clientHeight-(h+p)),x=Xc(d),v={rootMargin:-b+"px "+-g+"px "+-w+"px "+-x+"px",threshold:Kt(0,Ms(1,c))||1};let j=!0;function C(S){const N=S[0].intersectionRatio;if(N!==c){if(!j)return a();N?a(!1,N):n=setTimeout(()=>{a(!1,1e-7)},1e3)}N===1&&!gN(u,e.getBoundingClientRect())&&a(),j=!1}try{r=new IntersectionObserver(C,{...v,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,v)}r.observe(e)}return a(!0),o}function T4(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Dv(e),d=s||o?[...u?Ll(u):[],...Ll(t)]:[];d.forEach(x=>{s&&x.addEventListener("scroll",r,{passive:!0}),o&&x.addEventListener("resize",r)});const h=u&&l?k4(u,r):null;let m=-1,p=null;a&&(p=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=p)==null||v.observe(t)})),r()}),u&&!c&&p.observe(u),p.observe(t));let b,g=c?ki(e):null;c&&w();function w(){const x=ki(e);g&&!gN(g,x)&&r(),g=x,b=requestAnimationFrame(w)}return r(),()=>{var x;d.forEach(y=>{s&&y.removeEventListener("scroll",r),o&&y.removeEventListener("resize",r)}),h==null||h(),(x=p)==null||x.disconnect(),p=null,c&&cancelAnimationFrame(b)}}const P4=t4,A4=r4,M4=QD,O4=s4,I4=ZD,nb=XD,D4=n4,L4=(e,t,r)=>{const n=new Map,s={platform:_4,...r},o={...s.platform,_c:n};return YD(e,t,{...s,platform:o})};var $4=typeof document<"u",F4=function(){},ku=$4?f.useLayoutEffect:F4;function hd(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 r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!hd(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!hd(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function vN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sb(e,t){const r=vN(e);return Math.round(t*r)/r}function jm(e){const t=f.useRef(e);return ku(()=>{t.current=e}),t}function z4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=f.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=f.useState(n);hd(m,n)||p(n);const[b,g]=f.useState(null),[w,x]=f.useState(null),y=f.useCallback(P=>{P!==S.current&&(S.current=P,g(P))},[]),v=f.useCallback(P=>{P!==N.current&&(N.current=P,x(P))},[]),j=o||b,C=a||w,S=f.useRef(null),N=f.useRef(null),R=f.useRef(d),k=c!=null,T=jm(c),O=jm(s),A=jm(u),q=f.useCallback(()=>{if(!S.current||!N.current)return;const P={placement:t,strategy:r,middleware:m};O.current&&(P.platform=O.current),L4(S.current,N.current,P).then(_=>{const D={..._,isPositioned:A.current!==!1};I.current&&!hd(R.current,D)&&(R.current=D,Li.flushSync(()=>{h(D)}))})},[m,t,r,O,A]);ku(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(P=>({...P,isPositioned:!1})))},[u]);const I=f.useRef(!1);ku(()=>(I.current=!0,()=>{I.current=!1}),[]),ku(()=>{if(j&&(S.current=j),C&&(N.current=C),j&&C){if(T.current)return T.current(j,C,q);q()}},[j,C,q,T,k]);const X=f.useMemo(()=>({reference:S,floating:N,setReference:y,setFloating:v}),[y,v]),V=f.useMemo(()=>({reference:j,floating:C}),[j,C]),z=f.useMemo(()=>{const P={position:r,left:0,top:0};if(!V.floating)return P;const _=sb(V.floating,d.x),D=sb(V.floating,d.y);return l?{...P,transform:"translate("+_+"px, "+D+"px)",...vN(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:_,top:D}},[r,l,V.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:q,refs:X,elements:V,floatingStyles:z}),[d,q,X,V,z])}const V4=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?nb({element:n.current,padding:s}).fn(r):{}:n?nb({element:n,padding:s}).fn(r):{}}}},U4=(e,t)=>({...P4(e),options:[e,t]}),B4=(e,t)=>({...A4(e),options:[e,t]}),q4=(e,t)=>({...D4(e),options:[e,t]}),H4=(e,t)=>({...M4(e),options:[e,t]}),W4=(e,t)=>({...O4(e),options:[e,t]}),G4=(e,t)=>({...I4(e),options:[e,t]}),K4=(e,t)=>({...V4(e),options:[e,t]});var J4="Arrow",xN=f.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return i.jsx(re.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});xN.displayName=J4;var Y4=xN;function yN(e){const[t,r]=f.useState(void 0);return at(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let a,l;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;r({width:a,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var $v="Popper",[bN,ja]=Ht($v),[X4,wN]=bN($v),jN=e=>{const{__scopePopper:t,children:r}=e,[n,s]=f.useState(null);return i.jsx(X4,{scope:t,anchor:n,onAnchorChange:s,children:r})};jN.displayName=$v;var CN="PopperAnchor",SN=f.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=wN(CN,r),a=f.useRef(null),l=ue(t,a);return f.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:i.jsx(re.div,{...s,ref:l})});SN.displayName=CN;var Fv="PopperContent",[Q4,Z4]=bN(Fv),NN=f.forwardRef((e,t)=>{var B,xe,ye,fe,pe,L;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:b,...g}=e,w=wN(Fv,r),[x,y]=f.useState(null),v=ue(t,le=>y(le)),[j,C]=f.useState(null),S=yN(j),N=(S==null?void 0:S.width)??0,R=(S==null?void 0:S.height)??0,k=n+(o!=="center"?"-"+o:""),T=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],A=O.length>0,q={padding:T,boundary:O.filter(tL),altBoundary:A},{refs:I,floatingStyles:X,placement:V,isPositioned:z,middlewareData:P}=z4({strategy:"fixed",placement:k,whileElementsMounted:(...le)=>T4(...le,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[U4({mainAxis:s+R,alignmentAxis:a}),c&&B4({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?q4():void 0,...q}),c&&H4({...q}),W4({...q,apply:({elements:le,rects:be,availableWidth:Oe,availableHeight:vn})=>{const{width:Wr,height:Un}=be.reference,Bn=le.floating.style;Bn.setProperty("--radix-popper-available-width",`${Oe}px`),Bn.setProperty("--radix-popper-available-height",`${vn}px`),Bn.setProperty("--radix-popper-anchor-width",`${Wr}px`),Bn.setProperty("--radix-popper-anchor-height",`${Un}px`)}}),j&&K4({element:j,padding:l}),rL({arrowWidth:N,arrowHeight:R}),m&&G4({strategy:"referenceHidden",...q})]}),[_,D]=_N(V),Q=Ge(b);at(()=>{z&&(Q==null||Q())},[z,Q]);const K=(B=P.arrow)==null?void 0:B.x,ae=(xe=P.arrow)==null?void 0:xe.y,se=((ye=P.arrow)==null?void 0:ye.centerOffset)!==0,[je,Ce]=f.useState();return at(()=>{x&&Ce(window.getComputedStyle(x).zIndex)},[x]),i.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:je,"--radix-popper-transform-origin":[(fe=P.transformOrigin)==null?void 0:fe.x,(pe=P.transformOrigin)==null?void 0:pe.y].join(" "),...((L=P.hide)==null?void 0:L.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(Q4,{scope:r,placedSide:_,onArrowChange:C,arrowX:K,arrowY:ae,shouldHideArrow:se,children:i.jsx(re.div,{"data-side":_,"data-align":D,...g,ref:v,style:{...g.style,animation:z?void 0:"none"}})})})});NN.displayName=Fv;var RN="PopperArrow",eL={top:"bottom",right:"left",bottom:"top",left:"right"},EN=f.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=Z4(RN,n),a=eL[o.placedSide];return i.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]: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:i.jsx(Y4,{...s,ref:r,style:{...s.style,display:"block"}})})});EN.displayName=RN;function tL(e){return e!==null}var rL=e=>({name:"transformOrigin",options:e,fn(t){var w,x,y;const{placement:r,rects:n,middlewareData:s}=t,a=((w=s.arrow)==null?void 0:w.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=_N(r),h={start:"0%",center:"50%",end:"100%"}[d],m=(((x=s.arrow)==null?void 0:x.x)??0)+l/2,p=(((y=s.arrow)==null?void 0:y.y)??0)+c/2;let b="",g="";return u==="bottom"?(b=a?h:`${m}px`,g=`${-c}px`):u==="top"?(b=a?h:`${m}px`,g=`${n.floating.height+c}px`):u==="right"?(b=`${-c}px`,g=a?h:`${p}px`):u==="left"&&(b=`${n.floating.width+c}px`,g=a?h:`${p}px`),{data:{x:b,y:g}}}});function _N(e){const[t,r="center"]=e.split("-");return[t,r]}var kN=jN,zv=SN,Vv=NN,Uv=EN,[dh,fW]=Ht("Tooltip",[ja]),Bv=ja(),TN="TooltipProvider",nL=700,ib="tooltip.open",[sL,PN]=dh(TN),AN=e=>{const{__scopeTooltip:t,delayDuration:r=nL,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,a=f.useRef(!0),l=f.useRef(!1),c=f.useRef(0);return f.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),i.jsx(sL,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:f.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:o})};AN.displayName=TN;var MN="Tooltip",[pW,hh]=dh(MN),pp="TooltipTrigger",iL=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=hh(pp,r),o=PN(pp,r),a=Bv(r),l=f.useRef(null),c=ue(t,l,s.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),h=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),i.jsx(zv,{asChild:!0,...a,children:i.jsx(re.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:U(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:U(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:U(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:U(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:U(e.onBlur,s.onClose),onClick:U(e.onClick,s.onClose)})})});iL.displayName=pp;var oL="TooltipPortal",[gW,aL]=dh(oL,{forceMount:void 0}),la="TooltipContent",ON=f.forwardRef((e,t)=>{const r=aL(la,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,a=hh(la,e.__scopeTooltip);return i.jsx(It,{present:n||a.open,children:a.disableHoverableContent?i.jsx(IN,{side:s,...o,ref:t}):i.jsx(lL,{side:s,...o,ref:t})})}),lL=f.forwardRef((e,t)=>{const r=hh(la,e.__scopeTooltip),n=PN(la,e.__scopeTooltip),s=f.useRef(null),o=ue(t,s),[a,l]=f.useState(null),{trigger:c,onClose:u}=r,d=s.current,{onPointerInTransitChange:h}=n,m=f.useCallback(()=>{l(null),h(!1)},[h]),p=f.useCallback((b,g)=>{const w=b.currentTarget,x={x:b.clientX,y:b.clientY},y=mL(x,w.getBoundingClientRect()),v=fL(x,y),j=pL(g.getBoundingClientRect()),C=vL([...v,...j]);l(C),h(!0)},[h]);return f.useEffect(()=>()=>m(),[m]),f.useEffect(()=>{if(c&&d){const b=w=>p(w,d),g=w=>p(w,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",g)}}},[c,d,p,m]),f.useEffect(()=>{if(a){const b=g=>{const w=g.target,x={x:g.clientX,y:g.clientY},y=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),v=!gL(x,a);y?m():v&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,u,m]),i.jsx(IN,{...e,ref:o})}),[cL,uL]=dh(MN,{isInside:!1}),dL=xS("TooltipContent"),IN=f.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...l}=e,c=hh(la,r),u=Bv(r),{onClose:d}=c;return f.useEffect(()=>(document.addEventListener(ib,d),()=>document.removeEventListener(ib,d)),[d]),f.useEffect(()=>{if(c.trigger){const h=m=>{const p=m.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),i.jsx(ga,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:i.jsxs(Vv,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.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:[i.jsx(dL,{children:n}),i.jsx(cL,{scope:r,isInside:!0,children:i.jsx(wO,{id:c.contentId,role:"tooltip",children:s||n})})]})})});ON.displayName=la;var DN="TooltipArrow",hL=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Bv(r);return uL(DN,r).isInside?null:i.jsx(Uv,{...s,...n,ref:t})});hL.displayName=DN;function mL(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function fL(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function pL(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function gL(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const l=t[o],c=t[a],u=l.x,d=l.y,h=c.x,m=c.y;d>n!=m>n&&r<(h-u)*(n-d)/(m-d)+u&&(s=!s)}return s}function vL(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),xL(t)}function xL(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],a=r[r.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var yL=AN,LN=ON;const bL=yL,wL=f.forwardRef(({className:e,sideOffset:t=4,...r},n)=>i.jsx(LN,{ref:n,sideOffset:t,className:te("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),...r}));wL.displayName=LN.displayName;var Ca=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(){}},Ti=typeof window>"u"||"Deno"in globalThis;function Et(){}function jL(e,t){return typeof e=="function"?e(t):e}function gp(e){return typeof e=="number"&&e>=0&&e!==1/0}function $N(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _s(e,t){return typeof e=="function"?e(t):e}function ar(e,t){return typeof e=="function"?e(t):e}function ob(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:o,queryKey:a,stale:l}=e;if(a){if(n){if(t.queryHash!==qv(a,t.options))return!1}else if(!$l(t.queryKey,a))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||o&&!o(t))}function ab(e,t){const{exact:r,status:n,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Pi(t.options.mutationKey)!==Pi(o))return!1}else if(!$l(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function qv(e,t){return((t==null?void 0:t.queryKeyHashFn)||Pi)(e)}function Pi(e){return JSON.stringify(e,(t,r)=>vp(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function $l(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>$l(e[r],t[r])):!1}function FN(e,t){if(e===t)return e;const r=lb(e)&&lb(t);if(r||vp(e)&&vp(t)){const n=r?e:Object.keys(e),s=n.length,o=r?t:Object.keys(t),a=o.length,l=r?[]:{},c=new Set(n);let u=0;for(let d=0;d<a;d++){const h=r?d:o[d];(!r&&c.has(h)||r)&&e[h]===void 0&&t[h]===void 0?(l[h]=void 0,u++):(l[h]=FN(e[h],t[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return s===a&&u===s?e:l}return t}function md(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function lb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vp(e){if(!cb(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!cb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function cb(e){return Object.prototype.toString.call(e)==="[object Object]"}function CL(e){return new Promise(t=>{setTimeout(t,e)})}function xp(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?FN(e,t):t}function SL(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function NL(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Hv=Symbol();function zN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Hv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function VN(e,t){return typeof e=="function"?e(...t):!!e}var ci,os,Fo,Fj,RL=(Fj=class extends Ca{constructor(){super();ne(this,ci);ne(this,os);ne(this,Fo);W(this,Fo,t=>{if(!Ti&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){E(this,os)||this.setEventListener(E(this,Fo))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,os))==null||t.call(this),W(this,os,void 0))}setEventListener(t){var r;W(this,Fo,t),(r=E(this,os))==null||r.call(this),W(this,os,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){E(this,ci)!==t&&(W(this,ci,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof E(this,ci)=="boolean"?E(this,ci):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ci=new WeakMap,os=new WeakMap,Fo=new WeakMap,Fj),Wv=new RL,zo,as,Vo,zj,EL=(zj=class extends Ca{constructor(){super();ne(this,zo,!0);ne(this,as);ne(this,Vo);W(this,Vo,t=>{if(!Ti&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){E(this,as)||this.setEventListener(E(this,Vo))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,as))==null||t.call(this),W(this,as,void 0))}setEventListener(t){var r;W(this,Vo,t),(r=E(this,as))==null||r.call(this),W(this,as,t(this.setOnline.bind(this)))}setOnline(t){E(this,zo)!==t&&(W(this,zo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return E(this,zo)}},zo=new WeakMap,as=new WeakMap,Vo=new WeakMap,zj),fd=new EL;function yp(){let e,t;const r=new Promise((s,o)=>{e=s,t=o});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function _L(e){return Math.min(1e3*2**e,3e4)}function UN(e){return(e??"online")==="online"?fd.isOnline():!0}var BN=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Cm(e){return e instanceof BN}function qN(e){let t=!1,r=0,n=!1,s;const o=yp(),a=g=>{var w;n||(m(new BN(g)),(w=e.abort)==null||w.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>Wv.isFocused()&&(e.networkMode==="always"||fd.isOnline())&&e.canRun(),d=()=>UN(e.networkMode)&&e.canRun(),h=g=>{var w;n||(n=!0,(w=e.onSuccess)==null||w.call(e,g),s==null||s(),o.resolve(g))},m=g=>{var w;n||(n=!0,(w=e.onError)==null||w.call(e,g),s==null||s(),o.reject(g))},p=()=>new Promise(g=>{var w;s=x=>{(n||u())&&g(x)},(w=e.onPause)==null||w.call(e)}).then(()=>{var g;s=void 0,n||(g=e.onContinue)==null||g.call(e)}),b=()=>{if(n)return;let g;const w=r===0?e.initialPromise:void 0;try{g=w??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(h).catch(x=>{var S;if(n)return;const y=e.retry??(Ti?0:3),v=e.retryDelay??_L,j=typeof v=="function"?v(r,x):v,C=y===!0||typeof y=="number"&&r<y||typeof y=="function"&&y(r,x);if(t||!C){m(x);return}r++,(S=e.onFail)==null||S.call(e,r,x),CL(j).then(()=>u()?void 0:p()).then(()=>{t?m(x):b()})})};return{promise:o,cancel:a,continue:()=>(s==null||s(),o),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?b():p().then(b),o)}}var kL=e=>setTimeout(e,0);function TL(){let e=[],t=0,r=l=>{l()},n=l=>{l()},s=kL;const o=l=>{t?e.push(l):s(()=>{r(l)})},a=()=>{const l=e;e=[],l.length&&s(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||a()}return c},batchCalls:l=>(...c)=>{o(()=>{l(...c)})},schedule:o,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{s=l}}}var it=TL(),ui,Vj,HN=(Vj=class{constructor(){ne(this,ui)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gp(this.gcTime)&&W(this,ui,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ti?1/0:5*60*1e3))}clearGcTimeout(){E(this,ui)&&(clearTimeout(E(this,ui)),W(this,ui,void 0))}},ui=new WeakMap,Vj),Uo,di,or,hi,bt,ec,mi,Pr,bn,Uj,PL=(Uj=class extends HN{constructor(t){super();ne(this,Pr);ne(this,Uo);ne(this,di);ne(this,or);ne(this,hi);ne(this,bt);ne(this,ec);ne(this,mi);W(this,mi,!1),W(this,ec,t.defaultOptions),this.setOptions(t.options),this.observers=[],W(this,hi,t.client),W(this,or,E(this,hi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,W(this,Uo,AL(this.options)),this.state=t.state??E(this,Uo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,bt))==null?void 0:t.promise}setOptions(t){this.options={...E(this,ec),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,or).remove(this)}setData(t,r){const n=xp(this.state.data,t,this.options);return he(this,Pr,bn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){he(this,Pr,bn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=E(this,bt))==null?void 0:n.promise;return(s=E(this,bt))==null||s.cancel(t),r?r.then(Et).catch(Et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,Uo))}isActive(){return this.observers.some(t=>ar(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>_s(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:!$N(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,bt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,bt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,or).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(E(this,bt)&&(E(this,mi)?E(this,bt).cancel({revert:!0}):E(this,bt).cancelRetry()),this.scheduleGc()),E(this,or).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||he(this,Pr,bn).call(this,{type:"invalidate"})}fetch(t,r){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(E(this,bt))return E(this,bt).continueRetry(),E(this,bt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const n=new AbortController,s=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(W(this,mi,!0),n.signal)})},o=()=>{const m=zN(this.options,r),b=(()=>{const g={client:E(this,hi),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return W(this,mi,!1),this.options.persister?this.options.persister(m,b,this):m(b)},l=(()=>{const m={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:E(this,hi),state:this.state,fetchFn:o};return s(m),m})();(u=this.options.behavior)==null||u.onFetch(l,this),W(this,di,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&he(this,Pr,bn).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta});const c=m=>{var p,b,g,w;Cm(m)&&m.silent||he(this,Pr,bn).call(this,{type:"error",error:m}),Cm(m)||((b=(p=E(this,or).config).onError)==null||b.call(p,m,this),(w=(g=E(this,or).config).onSettled)==null||w.call(g,this.state.data,m,this)),this.scheduleGc()};return W(this,bt,qN({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:m=>{var p,b,g,w;if(m===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(x){c(x);return}(b=(p=E(this,or).config).onSuccess)==null||b.call(p,m,this),(w=(g=E(this,or).config).onSettled)==null||w.call(g,m,this.state.error,this),this.scheduleGc()},onError:c,onFail:(m,p)=>{he(this,Pr,bn).call(this,{type:"failed",failureCount:m,error:p})},onPause:()=>{he(this,Pr,bn).call(this,{type:"pause"})},onContinue:()=>{he(this,Pr,bn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),E(this,bt).start()}},Uo=new WeakMap,di=new WeakMap,or=new WeakMap,hi=new WeakMap,bt=new WeakMap,ec=new WeakMap,mi=new WeakMap,Pr=new WeakSet,bn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...WN(n.data,this.options),fetchMeta:t.meta??null};case"success":return W(this,di,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Cm(s)&&s.revert&&E(this,di)?{...E(this,di),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),it.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),E(this,or).notify({query:this,type:"updated",action:t})})},Uj);function WN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:UN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function AL(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Yr,Bj,ML=(Bj=class extends Ca{constructor(t={}){super();ne(this,Yr);this.config=t,W(this,Yr,new Map)}build(t,r,n){const s=r.queryKey,o=r.queryHash??qv(s,r);let a=this.get(o);return a||(a=new PL({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){E(this,Yr).has(t.queryHash)||(E(this,Yr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=E(this,Yr).get(t.queryHash);r&&(t.destroy(),r===t&&E(this,Yr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){it.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,Yr).get(t)}getAll(){return[...E(this,Yr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ob(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>ob(t,n)):r}notify(t){it.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){it.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yr=new WeakMap,Bj),Xr,St,fi,Qr,Xn,qj,OL=(qj=class extends HN{constructor(t){super();ne(this,Qr);ne(this,Xr);ne(this,St);ne(this,fi);this.mutationId=t.mutationId,W(this,St,t.mutationCache),W(this,Xr,[]),this.state=t.state||GN(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,Xr).includes(t)||(E(this,Xr).push(t),this.clearGcTimeout(),E(this,St).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){W(this,Xr,E(this,Xr).filter(r=>r!==t)),this.scheduleGc(),E(this,St).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,Xr).length||(this.state.status==="pending"?this.scheduleGc():E(this,St).remove(this))}continue(){var t;return((t=E(this,fi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,a,l,c,u,d,h,m,p,b,g,w,x,y,v,j,C,S,N,R;const r=()=>{he(this,Qr,Xn).call(this,{type:"continue"})};W(this,fi,qN({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,T)=>{he(this,Qr,Xn).call(this,{type:"failed",failureCount:k,error:T})},onPause:()=>{he(this,Qr,Xn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,St).canRun(this)}));const n=this.state.status==="pending",s=!E(this,fi).canStart();try{if(n)r();else{he(this,Qr,Xn).call(this,{type:"pending",variables:t,isPaused:s}),await((a=(o=E(this,St).config).onMutate)==null?void 0:a.call(o,t,this));const T=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));T!==this.state.context&&he(this,Qr,Xn).call(this,{type:"pending",context:T,variables:t,isPaused:s})}const k=await E(this,fi).start();return await((d=(u=E(this,St).config).onSuccess)==null?void 0:d.call(u,k,t,this.state.context,this)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,k,t,this.state.context)),await((b=(p=E(this,St).config).onSettled)==null?void 0:b.call(p,k,null,this.state.variables,this.state.context,this)),await((w=(g=this.options).onSettled)==null?void 0:w.call(g,k,null,t,this.state.context)),he(this,Qr,Xn).call(this,{type:"success",data:k}),k}catch(k){try{throw await((y=(x=E(this,St).config).onError)==null?void 0:y.call(x,k,t,this.state.context,this)),await((j=(v=this.options).onError)==null?void 0:j.call(v,k,t,this.state.context)),await((S=(C=E(this,St).config).onSettled)==null?void 0:S.call(C,void 0,k,this.state.variables,this.state.context,this)),await((R=(N=this.options).onSettled)==null?void 0:R.call(N,void 0,k,t,this.state.context)),k}finally{he(this,Qr,Xn).call(this,{type:"error",error:k})}}finally{E(this,St).runNext(this)}}},Xr=new WeakMap,St=new WeakMap,fi=new WeakMap,Qr=new WeakSet,Xn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),it.batch(()=>{E(this,Xr).forEach(n=>{n.onMutationUpdate(t)}),E(this,St).notify({mutation:this,type:"updated",action:t})})},qj);function GN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sn,Ar,tc,Hj,IL=(Hj=class extends Ca{constructor(t={}){super();ne(this,Sn);ne(this,Ar);ne(this,tc);this.config=t,W(this,Sn,new Set),W(this,Ar,new Map),W(this,tc,0)}build(t,r,n){const s=new OL({mutationCache:this,mutationId:++_c(this,tc)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){E(this,Sn).add(t);const r=Qc(t);if(typeof r=="string"){const n=E(this,Ar).get(r);n?n.push(t):E(this,Ar).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(E(this,Sn).delete(t)){const r=Qc(t);if(typeof r=="string"){const n=E(this,Ar).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&E(this,Ar).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Qc(t);if(typeof r=="string"){const n=E(this,Ar).get(r),s=n==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Qc(t);if(typeof r=="string"){const s=(n=E(this,Ar).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){it.batch(()=>{E(this,Sn).forEach(t=>{this.notify({type:"removed",mutation:t})}),E(this,Sn).clear(),E(this,Ar).clear()})}getAll(){return Array.from(E(this,Sn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ab(r,n))}findAll(t={}){return this.getAll().filter(r=>ab(t,r))}notify(t){it.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return it.batch(()=>Promise.all(t.map(r=>r.continue().catch(Et))))}},Sn=new WeakMap,Ar=new WeakMap,tc=new WeakMap,Hj);function Qc(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ub(e){return{onFetch:(t,r)=>{var d,h,m,p,b;const n=t.options,s=(m=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,o=((p=t.state.data)==null?void 0:p.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let g=!1;const w=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=zN(t.options,t.fetchOptions),y=async(v,j,C)=>{if(g)return Promise.reject();if(j==null&&v.pages.length)return Promise.resolve(v);const N=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:j,direction:C?"backward":"forward",meta:t.options.meta};return w(O),O})(),R=await x(N),{maxPages:k}=t.options,T=C?NL:SL;return{pages:T(v.pages,R,k),pageParams:T(v.pageParams,j,k)}};if(s&&o.length){const v=s==="backward",j=v?DL:db,C={pages:o,pageParams:a},S=j(n,C);l=await y(C,S,v)}else{const v=e??o.length;do{const j=c===0?a[0]??n.initialPageParam:db(n,l);if(c>0&&j==null)break;l=await y(l,j),c++}while(c<v)}return l};t.options.persister?t.fetchFn=()=>{var g,w;return(w=(g=t.options).persister)==null?void 0:w.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function db(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function DL(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Be,ls,cs,Bo,qo,us,Ho,Wo,Wj,LL=(Wj=class{constructor(e={}){ne(this,Be);ne(this,ls);ne(this,cs);ne(this,Bo);ne(this,qo);ne(this,us);ne(this,Ho);ne(this,Wo);W(this,Be,e.queryCache||new ML),W(this,ls,e.mutationCache||new IL),W(this,cs,e.defaultOptions||{}),W(this,Bo,new Map),W(this,qo,new Map),W(this,us,0)}mount(){_c(this,us)._++,E(this,us)===1&&(W(this,Ho,Wv.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Be).onFocus())})),W(this,Wo,fd.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Be).onOnline())})))}unmount(){var e,t;_c(this,us)._--,E(this,us)===0&&((e=E(this,Ho))==null||e.call(this),W(this,Ho,void 0),(t=E(this,Wo))==null||t.call(this),W(this,Wo,void 0))}isFetching(e){return E(this,Be).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,ls).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Be).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=E(this,Be).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(_s(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return E(this,Be).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=E(this,Be).get(n.queryHash),o=s==null?void 0:s.state.data,a=jL(t,o);if(a!==void 0)return E(this,Be).build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return it.batch(()=>E(this,Be).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Be).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=E(this,Be);it.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=E(this,Be);return it.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=it.batch(()=>E(this,Be).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Et).catch(Et)}invalidateQueries(e,t={}){return it.batch(()=>(E(this,Be).findAll(e).forEach(r=>{r.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 r={...t,cancelRefetch:t.cancelRefetch??!0},n=it.batch(()=>E(this,Be).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,r);return r.throwOnError||(o=o.catch(Et)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Et)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=E(this,Be).build(this,t);return r.isStaleByTime(_s(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Et).catch(Et)}fetchInfiniteQuery(e){return e.behavior=ub(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Et).catch(Et)}ensureInfiniteQueryData(e){return e.behavior=ub(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return fd.isOnline()?E(this,ls).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Be)}getMutationCache(){return E(this,ls)}getDefaultOptions(){return E(this,cs)}setDefaultOptions(e){W(this,cs,e)}setQueryDefaults(e,t){E(this,Bo).set(Pi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,Bo).values()],r={};return t.forEach(n=>{$l(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){E(this,qo).set(Pi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,qo).values()],r={};return t.forEach(n=>{$l(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,cs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qv(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===Hv&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,cs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Be).clear(),E(this,ls).clear()}},Be=new WeakMap,ls=new WeakMap,cs=new WeakMap,Bo=new WeakMap,qo=new WeakMap,us=new WeakMap,Ho=new WeakMap,Wo=new WeakMap,Wj),Lt,ge,rc,Nt,pi,Go,ds,hs,nc,Ko,Jo,gi,vi,ms,Yo,Se,Ja,bp,wp,jp,Cp,Sp,Np,Rp,KN,Gj,$L=(Gj=class extends Ca{constructor(t,r){super();ne(this,Se);ne(this,Lt);ne(this,ge);ne(this,rc);ne(this,Nt);ne(this,pi);ne(this,Go);ne(this,ds);ne(this,hs);ne(this,nc);ne(this,Ko);ne(this,Jo);ne(this,gi);ne(this,vi);ne(this,ms);ne(this,Yo,new Set);this.options=r,W(this,Lt,t),W(this,hs,null),W(this,ds,yp()),this.options.experimental_prefetchInRender||E(this,ds).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,ge).addObserver(this),hb(E(this,ge),this.options)?he(this,Se,Ja).call(this):this.updateResult(),he(this,Se,Cp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ep(E(this,ge),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ep(E(this,ge),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,he(this,Se,Sp).call(this),he(this,Se,Np).call(this),E(this,ge).removeObserver(this)}setOptions(t){const r=this.options,n=E(this,ge);if(this.options=E(this,Lt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ar(this.options.enabled,E(this,ge))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");he(this,Se,Rp).call(this),E(this,ge).setOptions(this.options),r._defaulted&&!md(this.options,r)&&E(this,Lt).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,ge),observer:this});const s=this.hasListeners();s&&mb(E(this,ge),n,this.options,r)&&he(this,Se,Ja).call(this),this.updateResult(),s&&(E(this,ge)!==n||ar(this.options.enabled,E(this,ge))!==ar(r.enabled,E(this,ge))||_s(this.options.staleTime,E(this,ge))!==_s(r.staleTime,E(this,ge)))&&he(this,Se,bp).call(this);const o=he(this,Se,wp).call(this);s&&(E(this,ge)!==n||ar(this.options.enabled,E(this,ge))!==ar(r.enabled,E(this,ge))||o!==E(this,ms))&&he(this,Se,jp).call(this,o)}getOptimisticResult(t){const r=E(this,Lt).getQueryCache().build(E(this,Lt),t),n=this.createResult(r,t);return zL(this,n)&&(W(this,Nt,n),W(this,Go,this.options),W(this,pi,E(this,ge).state)),n}getCurrentResult(){return E(this,Nt)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),Reflect.get(n,s))})}trackProp(t){E(this,Yo).add(t)}getCurrentQuery(){return E(this,ge)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=E(this,Lt).defaultQueryOptions(t),n=E(this,Lt).getQueryCache().build(E(this,Lt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return he(this,Se,Ja).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,Nt)))}createResult(t,r){var k;const n=E(this,ge),s=this.options,o=E(this,Nt),a=E(this,pi),l=E(this,Go),u=t!==n?t.state:E(this,rc),{state:d}=t;let h={...d},m=!1,p;if(r._optimisticResults){const T=this.hasListeners(),O=!T&&hb(t,r),A=T&&mb(t,n,r,s);(O||A)&&(h={...h,...WN(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:w}=h;p=h.data;let x=!1;if(r.placeholderData!==void 0&&p===void 0&&w==="pending"){let T;o!=null&&o.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(T=o.data,x=!0):T=typeof r.placeholderData=="function"?r.placeholderData((k=E(this,Jo))==null?void 0:k.state.data,E(this,Jo)):r.placeholderData,T!==void 0&&(w="success",p=xp(o==null?void 0:o.data,T,r),m=!0)}if(r.select&&p!==void 0&&!x)if(o&&p===(a==null?void 0:a.data)&&r.select===E(this,nc))p=E(this,Ko);else try{W(this,nc,r.select),p=r.select(p),p=xp(o==null?void 0:o.data,p,r),W(this,Ko,p),W(this,hs,null)}catch(T){W(this,hs,T)}E(this,hs)&&(b=E(this,hs),p=E(this,Ko),g=Date.now(),w="error");const y=h.fetchStatus==="fetching",v=w==="pending",j=w==="error",C=v&&y,S=p!==void 0,R={status:w,fetchStatus:h.fetchStatus,isPending:v,isSuccess:w==="success",isError:j,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:h.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!v,isLoadingError:j&&!S,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:j&&S,isStale:Gv(t,r),refetch:this.refetch,promise:E(this,ds),isEnabled:ar(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=q=>{R.status==="error"?q.reject(R.error):R.data!==void 0&&q.resolve(R.data)},O=()=>{const q=W(this,ds,R.promise=yp());T(q)},A=E(this,ds);switch(A.status){case"pending":t.queryHash===n.queryHash&&T(A);break;case"fulfilled":(R.status==="error"||R.data!==A.value)&&O();break;case"rejected":(R.status!=="error"||R.error!==A.reason)&&O();break}}return R}updateResult(){const t=E(this,Nt),r=this.createResult(E(this,ge),this.options);if(W(this,pi,E(this,ge).state),W(this,Go,this.options),E(this,pi).data!==void 0&&W(this,Jo,E(this,ge)),md(r,t))return;W(this,Nt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!E(this,Yo).size)return!0;const a=new Set(o??E(this,Yo));return this.options.throwOnError&&a.add("error"),Object.keys(E(this,Nt)).some(l=>{const c=l;return E(this,Nt)[c]!==t[c]&&a.has(c)})};he(this,Se,KN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&he(this,Se,Cp).call(this)}},Lt=new WeakMap,ge=new WeakMap,rc=new WeakMap,Nt=new WeakMap,pi=new WeakMap,Go=new WeakMap,ds=new WeakMap,hs=new WeakMap,nc=new WeakMap,Ko=new WeakMap,Jo=new WeakMap,gi=new WeakMap,vi=new WeakMap,ms=new WeakMap,Yo=new WeakMap,Se=new WeakSet,Ja=function(t){he(this,Se,Rp).call(this);let r=E(this,ge).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Et)),r},bp=function(){he(this,Se,Sp).call(this);const t=_s(this.options.staleTime,E(this,ge));if(Ti||E(this,Nt).isStale||!gp(t))return;const n=$N(E(this,Nt).dataUpdatedAt,t)+1;W(this,gi,setTimeout(()=>{E(this,Nt).isStale||this.updateResult()},n))},wp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,ge)):this.options.refetchInterval)??!1},jp=function(t){he(this,Se,Np).call(this),W(this,ms,t),!(Ti||ar(this.options.enabled,E(this,ge))===!1||!gp(E(this,ms))||E(this,ms)===0)&&W(this,vi,setInterval(()=>{(this.options.refetchIntervalInBackground||Wv.isFocused())&&he(this,Se,Ja).call(this)},E(this,ms)))},Cp=function(){he(this,Se,bp).call(this),he(this,Se,jp).call(this,he(this,Se,wp).call(this))},Sp=function(){E(this,gi)&&(clearTimeout(E(this,gi)),W(this,gi,void 0))},Np=function(){E(this,vi)&&(clearInterval(E(this,vi)),W(this,vi,void 0))},Rp=function(){const t=E(this,Lt).getQueryCache().build(E(this,Lt),this.options);if(t===E(this,ge))return;const r=E(this,ge);W(this,ge,t),W(this,rc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},KN=function(t){it.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(E(this,Nt))}),E(this,Lt).getQueryCache().notify({query:E(this,ge),type:"observerResultsUpdated"})})},Gj);function FL(e,t){return ar(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function hb(e,t){return FL(e,t)||e.state.data!==void 0&&Ep(e,t,t.refetchOnMount)}function Ep(e,t,r){if(ar(t.enabled,e)!==!1&&_s(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Gv(e,t)}return!1}function mb(e,t,r,n){return(e!==t||ar(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Gv(e,r)}function Gv(e,t){return ar(t.enabled,e)!==!1&&e.isStaleByTime(_s(t.staleTime,e))}function zL(e,t){return!md(e.getCurrentResult(),t)}var fs,ps,$t,Nn,Tn,Tu,_p,Kj,VL=(Kj=class extends Ca{constructor(r,n){super();ne(this,Tn);ne(this,fs);ne(this,ps);ne(this,$t);ne(this,Nn);W(this,fs,r),this.setOptions(n),this.bindMethods(),he(this,Tn,Tu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var s;const n=this.options;this.options=E(this,fs).defaultMutationOptions(r),md(this.options,n)||E(this,fs).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,$t),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Pi(n.mutationKey)!==Pi(this.options.mutationKey)?this.reset():((s=E(this,$t))==null?void 0:s.state.status)==="pending"&&E(this,$t).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=E(this,$t))==null||r.removeObserver(this)}onMutationUpdate(r){he(this,Tn,Tu).call(this),he(this,Tn,_p).call(this,r)}getCurrentResult(){return E(this,ps)}reset(){var r;(r=E(this,$t))==null||r.removeObserver(this),W(this,$t,void 0),he(this,Tn,Tu).call(this),he(this,Tn,_p).call(this)}mutate(r,n){var s;return W(this,Nn,n),(s=E(this,$t))==null||s.removeObserver(this),W(this,$t,E(this,fs).getMutationCache().build(E(this,fs),this.options)),E(this,$t).addObserver(this),E(this,$t).execute(r)}},fs=new WeakMap,ps=new WeakMap,$t=new WeakMap,Nn=new WeakMap,Tn=new WeakSet,Tu=function(){var n;const r=((n=E(this,$t))==null?void 0:n.state)??GN();W(this,ps,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},_p=function(r){it.batch(()=>{var n,s,o,a,l,c,u,d;if(E(this,Nn)&&this.hasListeners()){const h=E(this,ps).variables,m=E(this,ps).context;(r==null?void 0:r.type)==="success"?((s=(n=E(this,Nn)).onSuccess)==null||s.call(n,r.data,h,m),(a=(o=E(this,Nn)).onSettled)==null||a.call(o,r.data,null,h,m)):(r==null?void 0:r.type)==="error"&&((c=(l=E(this,Nn)).onError)==null||c.call(l,r.error,h,m),(d=(u=E(this,Nn)).onSettled)==null||d.call(u,void 0,r.error,h,m))}this.listeners.forEach(h=>{h(E(this,ps))})})},Kj),JN=f.createContext(void 0),zi=e=>{const t=f.useContext(JN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},UL=({client:e,children:t})=>(f.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(JN.Provider,{value:e,children:t})),YN=f.createContext(!1),BL=()=>f.useContext(YN);YN.Provider;function qL(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var HL=f.createContext(qL()),WL=()=>f.useContext(HL),GL=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},KL=e=>{f.useEffect(()=>{e.clearReset()},[e])},JL=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||VN(r,[e.error,n])),YL=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},XL=(e,t)=>e.isLoading&&e.isFetching&&!t,QL=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,fb=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function ZL(e,t,r){var h,m,p,b,g;const n=BL(),s=WL(),o=zi(),a=o.defaultQueryOptions(e);(m=(h=o.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,a),a._optimisticResults=n?"isRestoring":"optimistic",YL(a),GL(a,s),KL(s);const l=!o.getQueryCache().get(a.queryHash),[c]=f.useState(()=>new t(o,a)),u=c.getOptimisticResult(a),d=!n&&e.subscribed!==!1;if(f.useSyncExternalStore(f.useCallback(w=>{const x=d?c.subscribe(it.batchCalls(w)):Et;return c.updateResult(),x},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),f.useEffect(()=>{c.setOptions(a)},[a,c]),QL(a,u))throw fb(a,c,s);if(JL({result:u,errorResetBoundary:s,throwOnError:a.throwOnError,query:o.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw u.error;if((b=(p=o.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||b.call(p,a,u),a.experimental_prefetchInRender&&!Ti&&XL(u,n)){const w=l?fb(a,c,s):(g=o.getQueryCache().get(a.queryHash))==null?void 0:g.promise;w==null||w.catch(Et).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?u:c.trackResult(u)}function pc(e,t){return ZL(e,$L)}function gc(e,t){const r=zi(),[n]=f.useState(()=>new VL(r,e));f.useEffect(()=>{n.setOptions(e)},[n,e]);const s=f.useSyncExternalStore(f.useCallback(a=>n.subscribe(it.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=f.useCallback((a,l)=>{n.mutate(a,l).catch(Et)},[n]);if(s.error&&VN(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}/**
* @remix-run/router v1.23.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Fl(){return Fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fl.apply(this,arguments)}var xs;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(xs||(xs={}));const pb="popstate";function e3(e){e===void 0&&(e={});function t(n,s){let{pathname:o,search:a,hash:l}=n.location;return kp("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:pd(s)}return r3(t,r,null,e)}function et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function XN(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function t3(){return Math.random().toString(36).substr(2,8)}function gb(e,t){return{usr:e.state,key:e.key,idx:t}}function kp(e,t,r,n){return r===void 0&&(r=null),Fl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Sa(t):t,{state:r,key:t&&t.key||n||t3()})}function pd(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Sa(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function r3(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,a=s.history,l=xs.Pop,c=null,u=d();u==null&&(u=0,a.replaceState(Fl({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function h(){l=xs.Pop;let w=d(),x=w==null?null:w-u;u=w,c&&c({action:l,location:g.location,delta:x})}function m(w,x){l=xs.Push;let y=kp(g.location,w,x);u=d()+1;let v=gb(y,u),j=g.createHref(y);try{a.pushState(v,"",j)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(j)}o&&c&&c({action:l,location:g.location,delta:1})}function p(w,x){l=xs.Replace;let y=kp(g.location,w,x);u=d();let v=gb(y,u),j=g.createHref(y);a.replaceState(v,"",j),o&&c&&c({action:l,location:g.location,delta:0})}function b(w){let x=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof w=="string"?w:pd(w);return y=y.replace(/ $/,"%20"),et(x,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,x)}let g={get action(){return l},get location(){return e(s,a)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(pb,h),c=w,()=>{s.removeEventListener(pb,h),c=null}},createHref(w){return t(s,w)},createURL:b,encodeLocation(w){let x=b(w);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:p,go(w){return a.go(w)}};return g}var vb;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(vb||(vb={}));function n3(e,t,r){return r===void 0&&(r="/"),s3(e,t,r,!1)}function s3(e,t,r,n){let s=typeof t=="string"?Sa(t):t,o=Kv(s.pathname||"/",r);if(o==null)return null;let a=QN(e);i3(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=g3(o);l=f3(a[c],u,n)}return l}function QN(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,a,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};c.relativePath.startsWith("/")&&(et(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=ks([n,c.relativePath]),d=r.concat(c);o.children&&o.children.length>0&&(et(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),QN(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:h3(u,o.index),routesMeta:d})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,a);else for(let c of ZN(o.path))s(o,a,c)}),t}function ZN(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let a=ZN(n.join("/")),l=[];return l.push(...a.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function i3(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:m3(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const o3=/^:[\w-]+$/,a3=3,l3=2,c3=1,u3=10,d3=-2,xb=e=>e==="*";function h3(e,t){let r=e.split("/"),n=r.length;return r.some(xb)&&(n+=d3),t&&(n+=l3),r.filter(s=>!xb(s)).reduce((s,o)=>s+(o3.test(o)?a3:o===""?c3:u3),n)}function m3(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function f3(e,t,r){let{routesMeta:n}=e,s={},o="/",a=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",h=yb({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),m=c.route;if(!h&&u&&r&&!n[n.length-1].route.index&&(h=yb({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;Object.assign(s,h.params),a.push({params:s,pathname:ks([o,h.pathname]),pathnameBase:b3(ks([o,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(o=ks([o,h.pathnameBase]))}return a}function yb(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=p3(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],a=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:n.reduce((u,d,h)=>{let{paramName:m,isOptional:p}=d;if(m==="*"){let g=l[h]||"";a=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const b=l[h];return p&&!b?u[m]=void 0:u[m]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function p3(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),XN(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function g3(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return XN(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Kv(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function v3(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Sa(e):e;return{pathname:r?r.startsWith("/")?r:x3(r,t):t,search:w3(n),hash:j3(s)}}function x3(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Sm(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function y3(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function eR(e,t){let r=y3(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function tR(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Sa(e):(s=Fl({},e),et(!s.pathname||!s.pathname.includes("?"),Sm("?","pathname","search",s)),et(!s.pathname||!s.pathname.includes("#"),Sm("#","pathname","hash",s)),et(!s.search||!s.search.includes("#"),Sm("#","search","hash",s)));let o=e===""||s.pathname==="",a=o?"/":s.pathname,l;if(a==null)l=r;else{let h=t.length-1;if(!n&&a.startsWith("..")){let m=a.split("/");for(;m[0]==="..";)m.shift(),h-=1;s.pathname=m.join("/")}l=h>=0?t[h]:"/"}let c=v3(s,l),u=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const ks=e=>e.join("/").replace(/\/\/+/g,"/"),b3=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),w3=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,j3=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function C3(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const rR=["post","put","patch","delete"];new Set(rR);const S3=["get",...rR];new Set(S3);/**
* React Router v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function zl(){return zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zl.apply(this,arguments)}const Jv=f.createContext(null),N3=f.createContext(null),Vi=f.createContext(null),mh=f.createContext(null),zs=f.createContext({outlet:null,matches:[],isDataRoute:!1}),nR=f.createContext(null);function R3(e,t){let{relative:r}=t===void 0?{}:t;vc()||et(!1);let{basename:n,navigator:s}=f.useContext(Vi),{hash:o,pathname:a,search:l}=iR(e,{relative:r}),c=a;return n!=="/"&&(c=a==="/"?n:ks([n,a])),s.createHref({pathname:c,search:l,hash:o})}function vc(){return f.useContext(mh)!=null}function Na(){return vc()||et(!1),f.useContext(mh).location}function sR(e){f.useContext(Vi).static||f.useLayoutEffect(e)}function Br(){let{isDataRoute:e}=f.useContext(zs);return e?F3():E3()}function E3(){vc()||et(!1);let e=f.useContext(Jv),{basename:t,future:r,navigator:n}=f.useContext(Vi),{matches:s}=f.useContext(zs),{pathname:o}=Na(),a=JSON.stringify(eR(s,r.v7_relativeSplatPath)),l=f.useRef(!1);return sR(()=>{l.current=!0}),f.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){n.go(u);return}let h=tR(u,JSON.parse(a),o,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:ks([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,a,o,e])}function Yv(){let{matches:e}=f.useContext(zs),t=e[e.length-1];return t?t.params:{}}function iR(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=f.useContext(Vi),{matches:s}=f.useContext(zs),{pathname:o}=Na(),a=JSON.stringify(eR(s,n.v7_relativeSplatPath));return f.useMemo(()=>tR(e,JSON.parse(a),o,r==="path"),[e,a,o,r])}function _3(e,t){return k3(e,t)}function k3(e,t,r,n){vc()||et(!1);let{navigator:s}=f.useContext(Vi),{matches:o}=f.useContext(zs),a=o[o.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=Na(),d;if(t){var h;let w=typeof t=="string"?Sa(t):t;c==="/"||(h=w.pathname)!=null&&h.startsWith(c)||et(!1),d=w}else d=u;let m=d.pathname||"/",p=m;if(c!=="/"){let w=c.replace(/^\//,"").split("/");p="/"+m.replace(/^\//,"").split("/").slice(w.length).join("/")}let b=n3(e,{pathname:p}),g=O3(b&&b.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:ks([c,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:ks([c,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,r,n);return t&&g?f.createElement(mh.Provider,{value:{location:zl({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:xs.Pop}},g):g}function T3(){let e=$3(),t=C3(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),r?f.createElement("pre",{style:s},r):null,null)}const P3=f.createElement(T3,null);class A3 extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?f.createElement(zs.Provider,{value:this.props.routeContext},f.createElement(nR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function M3(e){let{routeContext:t,match:r,children:n}=e,s=f.useContext(Jv);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),f.createElement(zs.Provider,{value:t},n)}function O3(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,l=(s=r)==null?void 0:s.errors;if(l!=null){let d=a.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||et(!1),a=a.slice(0,Math.min(a.length,d+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<a.length;d++){let h=a[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:m,errors:p}=r,b=h.route.loader&&m[h.route.id]===void 0&&(!p||p[h.route.id]===void 0);if(h.route.lazy||b){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,h,m)=>{let p,b=!1,g=null,w=null;r&&(p=l&&h.route.id?l[h.route.id]:void 0,g=h.route.errorElement||P3,c&&(u<0&&m===0?(b=!0,w=null):u===m&&(b=!0,w=h.route.hydrateFallbackElement||null)));let x=t.concat(a.slice(0,m+1)),y=()=>{let v;return p?v=g:b?v=w:h.route.Component?v=f.createElement(h.route.Component,null):h.route.element?v=h.route.element:v=d,f.createElement(M3,{match:h,routeContext:{outlet:d,matches:x,isDataRoute:r!=null},children:v})};return r&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?f.createElement(A3,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:y(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):y()},null)}var oR=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(oR||{}),gd=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(gd||{});function I3(e){let t=f.useContext(Jv);return t||et(!1),t}function D3(e){let t=f.useContext(N3);return t||et(!1),t}function L3(e){let t=f.useContext(zs);return t||et(!1),t}function aR(e){let t=L3(),r=t.matches[t.matches.length-1];return r.route.id||et(!1),r.route.id}function $3(){var e;let t=f.useContext(nR),r=D3(gd.UseRouteError),n=aR(gd.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function F3(){let{router:e}=I3(oR.UseNavigateStable),t=aR(gd.UseNavigateStable),r=f.useRef(!1);return sR(()=>{r.current=!0}),f.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,zl({fromRouteId:t},o)))},[e,t])}function z3(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ne(e){et(!1)}function V3(e){let{basename:t="/",children:r=null,location:n,navigationType:s=xs.Pop,navigator:o,static:a=!1,future:l}=e;vc()&&et(!1);let c=t.replace(/^\/*/,"/"),u=f.useMemo(()=>({basename:c,navigator:o,static:a,future:zl({v7_relativeSplatPath:!1},l)}),[c,l,o,a]);typeof n=="string"&&(n=Sa(n));let{pathname:d="/",search:h="",hash:m="",state:p=null,key:b="default"}=n,g=f.useMemo(()=>{let w=Kv(d,c);return w==null?null:{location:{pathname:w,search:h,hash:m,state:p,key:b},navigationType:s}},[c,d,h,m,p,b,s]);return g==null?null:f.createElement(Vi.Provider,{value:u},f.createElement(mh.Provider,{children:r,value:g}))}function U3(e){let{children:t,location:r}=e;return _3(Tp(t),r)}new Promise(()=>{});function Tp(e,t){t===void 0&&(t=[]);let r=[];return f.Children.forEach(e,(n,s)=>{if(!f.isValidElement(n))return;let o=[...t,s];if(n.type===f.Fragment){r.push.apply(r,Tp(n.props.children,o));return}n.type!==Ne&&et(!1),!n.props.index||!n.props.children||et(!1);let a={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=Tp(n.props.children,o)),r.push(a)}),r}/**
* React Router DOM v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Pp(){return Pp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pp.apply(this,arguments)}function B3(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function q3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function H3(e,t){return e.button===0&&(!t||t==="_self")&&!q3(e)}function Ap(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function W3(e,t){let r=Ap(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const G3=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],K3="6";try{window.__reactRouterVersion=K3}catch{}const J3="startTransition",bb=Pg[J3];function Y3(e){let{basename:t,children:r,future:n,window:s}=e,o=f.useRef();o.current==null&&(o.current=e3({window:s,v5Compat:!0}));let a=o.current,[l,c]=f.useState({action:a.action,location:a.location}),{v7_startTransition:u}=n||{},d=f.useCallback(h=>{u&&bb?bb(()=>c(h)):c(h)},[c,u]);return f.useLayoutEffect(()=>a.listen(d),[a,d]),f.useEffect(()=>z3(n),[n]),f.createElement(V3,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:a,future:n})}const X3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Q3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,G=f.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:a,state:l,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,m=B3(t,G3),{basename:p}=f.useContext(Vi),b,g=!1;if(typeof u=="string"&&Q3.test(u)&&(b=u,X3))try{let v=new URL(window.location.href),j=u.startsWith("//")?new URL(v.protocol+u):new URL(u),C=Kv(j.pathname,p);j.origin===v.origin&&C!=null?u=C+j.search+j.hash:g=!0}catch{}let w=R3(u,{relative:s}),x=Z3(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:s,viewTransition:h});function y(v){n&&n(v),v.defaultPrevented||x(v)}return f.createElement("a",Pp({},m,{href:b||w,onClick:g||o?n:y,ref:r,target:c}))});var wb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wb||(wb={}));var jb;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(jb||(jb={}));function Z3(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:a,viewTransition:l}=t===void 0?{}:t,c=Br(),u=Na(),d=iR(e,{relative:a});return f.useCallback(h=>{if(H3(h,r)){h.preventDefault();let m=n!==void 0?n:pd(u)===pd(d);c(e,{replace:m,state:s,preventScrollReset:o,relative:a,viewTransition:l})}},[u,c,d,n,s,r,e,o,a,l])}function e5(e){let t=f.useRef(Ap(e)),r=f.useRef(!1),n=Na(),s=f.useMemo(()=>W3(n.search,r.current?null:t.current),[n.search]),o=Br(),a=f.useCallback((l,c)=>{const u=Ap(typeof l=="function"?l(s):l);r.current=!0,o("?"+u,c)},[o,s]);return[s,a]}const Xv=eh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 shadow-lg shadow-primary/25 hover:shadow-primary/40 hover:scale-[1.02]",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-border bg-transparent hover:bg-secondary hover:text-secondary-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-secondary hover:text-secondary-foreground",link:"text-primary underline-offset-4 hover:underline",hero:"bg-gradient-to-r from-primary to-accent text-primary-foreground font-semibold shadow-lg shadow-primary/30 hover:shadow-xl hover:shadow-primary/40 hover:scale-[1.03] transition-all duration-300",glass:"bg-card/60 backdrop-blur-xl border border-border/50 text-foreground hover:bg-card/80 hover:border-primary/30 hover:text-primary transition-all duration-300",glow:"bg-primary text-primary-foreground shadow-[0_0_40px_hsl(var(--glow-primary)/0.3),0_0_80px_hsl(var(--glow-primary)/0.1)] hover:scale-[1.02]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-12 rounded-lg px-8 text-base",xl:"h-14 rounded-xl px-10 text-lg",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),F=f.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const a=n?gS:"button";return i.jsx(a,{className:te(Xv({variant:t,size:r,className:e})),ref:o,...s})});F.displayName="Button";var Nm="focusScope.autoFocusOnMount",Rm="focusScope.autoFocusOnUnmount",Cb={bubbles:!1,cancelable:!0},t5="FocusScope",fh=f.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=e,[l,c]=f.useState(null),u=Ge(s),d=Ge(o),h=f.useRef(null),m=ue(t,g=>c(g)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(n){let g=function(v){if(p.paused||!l)return;const j=v.target;l.contains(j)?h.current=j:Qn(h.current,{select:!0})},w=function(v){if(p.paused||!l)return;const j=v.relatedTarget;j!==null&&(l.contains(j)||Qn(h.current,{select:!0}))},x=function(v){if(document.activeElement===document.body)for(const C of v)C.removedNodes.length>0&&Qn(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const y=new MutationObserver(x);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),y.disconnect()}}},[n,l,p.paused]),f.useEffect(()=>{if(l){Nb.add(p);const g=document.activeElement;if(!l.contains(g)){const x=new CustomEvent(Nm,Cb);l.addEventListener(Nm,u),l.dispatchEvent(x),x.defaultPrevented||(r5(a5(lR(l)),{select:!0}),document.activeElement===g&&Qn(l))}return()=>{l.removeEventListener(Nm,u),setTimeout(()=>{const x=new CustomEvent(Rm,Cb);l.addEventListener(Rm,d),l.dispatchEvent(x),x.defaultPrevented||Qn(g??document.body,{select:!0}),l.removeEventListener(Rm,d),Nb.remove(p)},0)}}},[l,u,d,p]);const b=f.useCallback(g=>{if(!r&&!n||p.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(w&&x){const y=g.currentTarget,[v,j]=n5(y);v&&j?!g.shiftKey&&x===j?(g.preventDefault(),r&&Qn(v,{select:!0})):g.shiftKey&&x===v&&(g.preventDefault(),r&&Qn(j,{select:!0})):x===y&&g.preventDefault()}},[r,n,p.paused]);return i.jsx(re.div,{tabIndex:-1,...a,ref:m,onKeyDown:b})});fh.displayName=t5;function r5(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Qn(n,{select:t}),document.activeElement!==r)return}function n5(e){const t=lR(e),r=Sb(t,e),n=Sb(t.reverse(),e);return[r,n]}function lR(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Sb(e,t){for(const r of e)if(!s5(r,{upTo:t}))return r}function s5(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function i5(e){return e instanceof HTMLInputElement&&"select"in e}function Qn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&i5(e)&&t&&e.select()}}var Nb=o5();function o5(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Rb(e,t),e.unshift(t)},remove(t){var r;e=Rb(e,t),(r=e[0])==null||r.resume()}}}function Rb(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function a5(e){return e.filter(t=>t.tagName!=="A")}var Em=0;function Qv(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Eb()),document.body.insertAdjacentElement("beforeend",e[1]??Eb()),Em++,()=>{Em===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Em--}},[])}function Eb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var en=function(){return en=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},en.apply(this,arguments)};function Ra(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function l5(e,t,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function l(d){try{u(n.next(d))}catch(h){a(h)}}function c(d){try{u(n.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):s(d.value).then(l,c)}u((n=n.apply(e,t||[])).next())})}function c5(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Pu="right-scroll-bar-position",Au="width-before-scroll-bar",u5="with-scroll-bars-hidden",d5="--removed-body-scroll-bar-size";function _m(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function h5(e,t){var r=f.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var m5=typeof window<"u"?f.useLayoutEffect:f.useEffect,_b=new WeakMap;function f5(e,t){var r=h5(null,function(n){return e.forEach(function(s){return _m(s,n)})});return m5(function(){var n=_b.get(r);if(n){var s=new Set(n),o=new Set(e),a=r.current;s.forEach(function(l){o.has(l)||_m(l,null)}),o.forEach(function(l){s.has(l)||_m(l,a)})}_b.set(r,e)},[e]),r}function p5(e){return e}function g5(e,t){t===void 0&&(t=p5);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(l){return l!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(l){return o(l)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var l=r;r=[],l.forEach(o),a=r}var c=function(){var d=a;a=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),r}}}};return s}function v5(e){e===void 0&&(e={});var t=g5(null);return t.options=en({async:!0,ssr:!1},e),t}var cR=function(e){var t=e.sideCar,r=Ra(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return f.createElement(n,en({},r))};cR.isSideCarExport=!0;function x5(e,t){return e.useMedium(t),cR}var uR=v5(),km=function(){},ph=f.forwardRef(function(e,t){var r=f.useRef(null),n=f.useState({onScrollCapture:km,onWheelCapture:km,onTouchMoveCapture:km}),s=n[0],o=n[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,m=e.sideCar,p=e.noRelative,b=e.noIsolation,g=e.inert,w=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,v=e.gapMode,j=Ra(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,S=f5([r,t]),N=en(en({},j),s);return f.createElement(f.Fragment,null,d&&f.createElement(C,{sideCar:uR,removeScrollBar:u,shards:h,noRelative:p,noIsolation:b,inert:g,setCallbacks:o,allowPinchZoom:!!w,lockRef:r,gapMode:v}),a?f.cloneElement(f.Children.only(l),en(en({},N),{ref:S})):f.createElement(y,en({},N,{className:c,ref:S}),l))});ph.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ph.classNames={fullWidth:Au,zeroRight:Pu};var y5=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function b5(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=y5();return t&&e.setAttribute("nonce",t),e}function w5(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function j5(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var C5=function(){var e=0,t=null;return{add:function(r){e==0&&(t=b5())&&(w5(t,r),j5(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},S5=function(){var e=C5();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},dR=function(){var e=S5(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},N5={left:0,top:0,right:0,gap:0},Tm=function(e){return parseInt(e||"",10)||0},R5=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Tm(r),Tm(n),Tm(s)]},E5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return N5;var t=R5(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},_5=dR(),Io="data-scroll-locked",k5=function(e,t,r,n){var s=e.left,o=e.top,a=e.right,l=e.gap;return r===void 0&&(r="margin"),`
.`.concat(u5,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(l,"px ").concat(n,`;
}
body[`).concat(Io,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(s,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(a,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(Pu,` {
right: `).concat(l,"px ").concat(n,`;
}
.`).concat(Au,` {
margin-right: `).concat(l,"px ").concat(n,`;
}
.`).concat(Pu," .").concat(Pu,` {
right: 0 `).concat(n,`;
}
.`).concat(Au," .").concat(Au,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(Io,`] {
`).concat(d5,": ").concat(l,`px;
}
`)},kb=function(){var e=parseInt(document.body.getAttribute(Io)||"0",10);return isFinite(e)?e:0},T5=function(){f.useEffect(function(){return document.body.setAttribute(Io,(kb()+1).toString()),function(){var e=kb()-1;e<=0?document.body.removeAttribute(Io):document.body.setAttribute(Io,e.toString())}},[])},P5=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;T5();var o=f.useMemo(function(){return E5(s)},[s]);return f.createElement(_5,{styles:k5(o,!t,s,r?"":"!important")})},Mp=!1;if(typeof window<"u")try{var Zc=Object.defineProperty({},"passive",{get:function(){return Mp=!0,!0}});window.addEventListener("test",Zc,Zc),window.removeEventListener("test",Zc,Zc)}catch{Mp=!1}var Ji=Mp?{passive:!1}:!1,A5=function(e){return e.tagName==="TEXTAREA"},hR=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!A5(e)&&r[t]==="visible")},M5=function(e){return hR(e,"overflowY")},O5=function(e){return hR(e,"overflowX")},Tb=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=mR(e,n);if(s){var o=fR(e,n),a=o[1],l=o[2];if(a>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},I5=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},D5=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},mR=function(e,t){return e==="v"?M5(t):O5(t)},fR=function(e,t){return e==="v"?I5(t):D5(t)},L5=function(e,t){return e==="h"&&t==="rtl"?-1:1},$5=function(e,t,r,n,s){var o=L5(e,window.getComputedStyle(t).direction),a=o*n,l=r.target,c=t.contains(l),u=!1,d=a>0,h=0,m=0;do{if(!l)break;var p=fR(e,l),b=p[0],g=p[1],w=p[2],x=g-w-o*b;(b||x)&&mR(e,l)&&(h+=x,m+=b);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(m)<1||!s))&&(u=!0),u},eu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pb=function(e){return[e.deltaX,e.deltaY]},Ab=function(e){return e&&"current"in e?e.current:e},F5=function(e,t){return e[0]===t[0]&&e[1]===t[1]},z5=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},V5=0,Yi=[];function U5(e){var t=f.useRef([]),r=f.useRef([0,0]),n=f.useRef(),s=f.useState(V5++)[0],o=f.useState(dR)[0],a=f.useRef(e);f.useEffect(function(){a.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=c5([e.lockRef.current],(e.shards||[]).map(Ab),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=f.useCallback(function(g,w){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!a.current.allowPinchZoom;var x=eu(g),y=r.current,v="deltaX"in g?g.deltaX:y[0]-x[0],j="deltaY"in g?g.deltaY:y[1]-x[1],C,S=g.target,N=Math.abs(v)>Math.abs(j)?"h":"v";if("touches"in g&&N==="h"&&S.type==="range")return!1;var R=Tb(N,S);if(!R)return!0;if(R?C=N:(C=N==="v"?"h":"v",R=Tb(N,S)),!R)return!1;if(!n.current&&"changedTouches"in g&&(v||j)&&(n.current=C),!C)return!0;var k=n.current||C;return $5(k,w,g,k==="h"?v:j,!0)},[]),c=f.useCallback(function(g){var w=g;if(!(!Yi.length||Yi[Yi.length-1]!==o)){var x="deltaY"in w?Pb(w):eu(w),y=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&F5(C.delta,x)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var v=(a.current.shards||[]).map(Ab).filter(Boolean).filter(function(C){return C.contains(w.target)}),j=v.length>0?l(w,v[0]):!a.current.noIsolation;j&&w.cancelable&&w.preventDefault()}}},[]),u=f.useCallback(function(g,w,x,y){var v={name:g,delta:w,target:x,should:y,shadowParent:B5(x)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(j){return j!==v})},1)},[]),d=f.useCallback(function(g){r.current=eu(g),n.current=void 0},[]),h=f.useCallback(function(g){u(g.type,Pb(g),g.target,l(g,e.lockRef.current))},[]),m=f.useCallback(function(g){u(g.type,eu(g),g.target,l(g,e.lockRef.current))},[]);f.useEffect(function(){return Yi.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Ji),document.addEventListener("touchmove",c,Ji),document.addEventListener("touchstart",d,Ji),function(){Yi=Yi.filter(function(g){return g!==o}),document.removeEventListener("wheel",c,Ji),document.removeEventListener("touchmove",c,Ji),document.removeEventListener("touchstart",d,Ji)}},[]);var p=e.removeScrollBar,b=e.inert;return f.createElement(f.Fragment,null,b?f.createElement(o,{styles:z5(s)}):null,p?f.createElement(P5,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function B5(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const q5=x5(uR,U5);var gh=f.forwardRef(function(e,t){return f.createElement(ph,en({},e,{ref:t,sideCar:q5}))});gh.classNames=ph.classNames;var H5=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xi=new WeakMap,tu=new WeakMap,ru={},Pm=0,pR=function(e){return e&&(e.host||pR(e.parentNode))},W5=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=pR(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},G5=function(e,t,r,n){var s=W5(t,Array.isArray(e)?e:[e]);ru[r]||(ru[r]=new WeakMap);var o=ru[r],a=[],l=new Set,c=new Set(s),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(m){if(l.has(m))d(m);else try{var p=m.getAttribute(n),b=p!==null&&p!=="false",g=(Xi.get(m)||0)+1,w=(o.get(m)||0)+1;Xi.set(m,g),o.set(m,w),a.push(m),g===1&&b&&tu.set(m,!0),w===1&&m.setAttribute(r,"true"),b||m.setAttribute(n,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return d(t),l.clear(),Pm++,function(){a.forEach(function(h){var m=Xi.get(h)-1,p=o.get(h)-1;Xi.set(h,m),o.set(h,p),m||(tu.has(h)||h.removeAttribute(n),tu.delete(h)),p||h.removeAttribute(r)}),Pm--,Pm||(Xi=new WeakMap,Xi=new WeakMap,tu=new WeakMap,ru={})}},Zv=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=H5(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),G5(n,s,r,"aria-hidden")):function(){return null}},vh="Dialog",[gR,vR]=Ht(vh),[K5,qr]=gR(vh),xR=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:a=!0}=e,l=f.useRef(null),c=f.useRef(null),[u,d]=ln({prop:n,defaultProp:s??!1,onChange:o,caller:vh});return i.jsx(K5,{scope:t,triggerRef:l,contentRef:c,contentId:Fr(),titleId:Fr(),descriptionId:Fr(),open:u,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(h=>!h),[d]),modal:a,children:r})};xR.displayName=vh;var yR="DialogTrigger",bR=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=qr(yR,r),o=ue(t,s.triggerRef);return i.jsx(re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":rx(s.open),...n,ref:o,onClick:U(e.onClick,s.onOpenToggle)})});bR.displayName=yR;var ex="DialogPortal",[J5,wR]=gR(ex,{forceMount:void 0}),jR=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=qr(ex,t);return i.jsx(J5,{scope:t,forceMount:r,children:f.Children.map(n,a=>i.jsx(It,{present:r||o.open,children:i.jsx(dc,{asChild:!0,container:s,children:a})}))})};jR.displayName=ex;var vd="DialogOverlay",CR=f.forwardRef((e,t)=>{const r=wR(vd,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=qr(vd,e.__scopeDialog);return o.modal?i.jsx(It,{present:n||o.open,children:i.jsx(X5,{...s,ref:t})}):null});CR.displayName=vd;var Y5=Ei("DialogOverlay.RemoveScroll"),X5=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=qr(vd,r);return i.jsx(gh,{as:Y5,allowPinchZoom:!0,shards:[s.contentRef],children:i.jsx(re.div,{"data-state":rx(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ai="DialogContent",SR=f.forwardRef((e,t)=>{const r=wR(Ai,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=qr(Ai,e.__scopeDialog);return i.jsx(It,{present:n||o.open,children:o.modal?i.jsx(Q5,{...s,ref:t}):i.jsx(Z5,{...s,ref:t})})});SR.displayName=Ai;var Q5=f.forwardRef((e,t)=>{const r=qr(Ai,e.__scopeDialog),n=f.useRef(null),s=ue(t,r.contentRef,n);return f.useEffect(()=>{const o=n.current;if(o)return Zv(o)},[]),i.jsx(NR,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:U(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&o.preventDefault()}),onFocusOutside:U(e.onFocusOutside,o=>o.preventDefault())})}),Z5=f.forwardRef((e,t)=>{const r=qr(Ai,e.__scopeDialog),n=f.useRef(!1),s=f.useRef(!1);return i.jsx(NR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=o.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),NR=f.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...a}=e,l=qr(Ai,r),c=f.useRef(null),u=ue(t,c);return Qv(),i.jsxs(i.Fragment,{children:[i.jsx(fh,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:i.jsx(ga,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":rx(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(t6,{titleId:l.titleId}),i.jsx(n6,{contentRef:c,descriptionId:l.descriptionId})]})]})}),tx="DialogTitle",RR=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=qr(tx,r);return i.jsx(re.h2,{id:s.titleId,...n,ref:t})});RR.displayName=tx;var ER="DialogDescription",_R=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=qr(ER,r);return i.jsx(re.p,{id:s.descriptionId,...n,ref:t})});_R.displayName=ER;var kR="DialogClose",TR=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=qr(kR,r);return i.jsx(re.button,{type:"button",...n,ref:t,onClick:U(e.onClick,()=>s.onOpenChange(!1))})});TR.displayName=kR;function rx(e){return e?"open":"closed"}var PR="DialogTitleWarning",[e6,AR]=XM(PR,{contentName:Ai,titleName:tx,docsSlug:"dialog"}),t6=({titleId:e})=>{const t=AR(PR),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},r6="DialogDescriptionWarning",n6=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${AR(r6).contentName}}.`;return f.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},MR=xR,s6=bR,OR=jR,nx=CR,sx=SR,ix=RR,ox=_R,ax=TR;const lx=MR,i6=OR,IR=f.forwardRef(({className:e,...t},r)=>i.jsx(nx,{ref:r,className:te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));IR.displayName=nx.displayName;const xh=f.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(i6,{children:[i.jsx(IR,{}),i.jsxs(sx,{ref:n,className:te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,i.jsxs(ax,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[i.jsx(oa,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));xh.displayName=sx.displayName;const yh=({className:e,...t})=>i.jsx("div",{className:te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});yh.displayName="DialogHeader";const bh=f.forwardRef(({className:e,...t},r)=>i.jsx(ix,{ref:r,className:te("text-lg font-semibold leading-none tracking-tight",e),...t}));bh.displayName=ix.displayName;const o6=f.forwardRef(({className:e,...t},r)=>i.jsx(ox,{ref:r,className:te("text-sm text-muted-foreground",e),...t}));o6.displayName=ox.displayName;const Mb="+33756819438",a6=encodeURIComponent("Bonjour, je souhaite en savoir plus sur vos CRM sur mesure."),ut=({open:e,onOpenChange:t})=>{const a=[{icon:mc,title:"WhatsApp",description:"Discutez avec un chef de projet",color:"bg-[#25D366]/20 text-[#25D366] border-[#25D366]/30",hoverColor:"hover:bg-[#25D366]/30 hover:border-[#25D366]/50",onClick:()=>{window.open(`https://wa.me/${Mb.replace("+","")}?text=${a6}`,"_blank"),t(!1)}},{icon:In,title:"Appeler",description:"Parlez à un chef de projet",color:"bg-primary/20 text-primary border-primary/30",hoverColor:"hover:bg-primary/30 hover:border-primary/50",onClick:()=>{window.location.href=`tel:${Mb}`,t(!1)}},{icon:mr,title:"Formulaire",description:"Décrivez votre projet",color:"bg-accent/20 text-accent border-accent/30",hoverColor:"hover:bg-accent/30 hover:border-accent/50",onClick:()=>{var l;(l=document.getElementById("contact-form"))==null||l.scrollIntoView({behavior:"smooth"}),t(!1)}},{icon:bi,title:"Chatbot IA",description:"Démarrer un projet avec notre IA",color:"bg-secondary text-foreground border-border",hoverColor:"hover:bg-secondary/80 hover:border-primary/30",onClick:()=>{window.location.href="/discovery",t(!1)}}];return i.jsx(lx,{open:e,onOpenChange:t,children:i.jsxs(xh,{className:"sm:max-w-md",children:[i.jsx(yh,{children:i.jsx(bh,{className:"text-center font-display text-xl",children:"Comment souhaitez-vous démarrer votre projet ?"})}),i.jsx("div",{className:"grid grid-cols-2 gap-3 pt-4",children:a.map(l=>i.jsxs("button",{onClick:l.onClick,className:`flex flex-col items-center gap-3 p-4 rounded-xl border transition-all ${l.color} ${l.hoverColor}`,children:[i.jsx(l.icon,{className:"w-8 h-8"}),i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"font-semibold text-sm",children:l.title}),i.jsx("p",{className:"text-xs opacity-70 mt-1",children:l.description})]})]},l.title))})]})})};var l6=f.createContext(void 0);function xc(e){const t=f.useContext(l6);return e||t||"ltr"}var Am="rovingFocusGroup.onEntryFocus",c6={bubbles:!1,cancelable:!0},yc="RovingFocusGroup",[Op,DR,u6]=uc(yc),[d6,LR]=Ht(yc,[u6]),[h6,m6]=d6(yc),$R=f.forwardRef((e,t)=>i.jsx(Op.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Op.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(f6,{...e,ref:t})})}));$R.displayName=yc;var f6=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,m=f.useRef(null),p=ue(t,m),b=xc(o),[g,w]=ln({prop:a,defaultProp:l??null,onChange:c,caller:yc}),[x,y]=f.useState(!1),v=Ge(u),j=DR(r),C=f.useRef(!1),[S,N]=f.useState(0);return f.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(Am,v),()=>R.removeEventListener(Am,v)},[v]),i.jsx(h6,{scope:r,orientation:n,dir:b,loop:s,currentTabStopId:g,onItemFocus:f.useCallback(R=>w(R),[w]),onItemShiftTab:f.useCallback(()=>y(!0),[]),onFocusableItemAdd:f.useCallback(()=>N(R=>R+1),[]),onFocusableItemRemove:f.useCallback(()=>N(R=>R-1),[]),children:i.jsx(re.div,{tabIndex:x||S===0?-1:0,"data-orientation":n,...h,ref:p,style:{outline:"none",...e.style},onMouseDown:U(e.onMouseDown,()=>{C.current=!0}),onFocus:U(e.onFocus,R=>{const k=!C.current;if(R.target===R.currentTarget&&k&&!x){const T=new CustomEvent(Am,c6);if(R.currentTarget.dispatchEvent(T),!T.defaultPrevented){const O=j().filter(V=>V.focusable),A=O.find(V=>V.active),q=O.find(V=>V.id===g),X=[A,q,...O].filter(Boolean).map(V=>V.ref.current);VR(X,d)}}C.current=!1}),onBlur:U(e.onBlur,()=>y(!1))})})}),FR="RovingFocusGroupItem",zR=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,children:a,...l}=e,c=Fr(),u=o||c,d=m6(FR,r),h=d.currentTabStopId===u,m=DR(r),{onFocusableItemAdd:p,onFocusableItemRemove:b,currentTabStopId:g}=d;return f.useEffect(()=>{if(n)return p(),()=>b()},[n,p,b]),i.jsx(Op.ItemSlot,{scope:r,id:u,focusable:n,active:s,children:i.jsx(re.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:U(e.onMouseDown,w=>{n?d.onItemFocus(u):w.preventDefault()}),onFocus:U(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:U(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const x=v6(w,d.orientation,d.dir);if(x!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let v=m().filter(j=>j.focusable).map(j=>j.ref.current);if(x==="last")v.reverse();else if(x==="prev"||x==="next"){x==="prev"&&v.reverse();const j=v.indexOf(w.currentTarget);v=d.loop?x6(v,j+1):v.slice(j+1)}setTimeout(()=>VR(v))}}),children:typeof a=="function"?a({isCurrentTabStop:h,hasTabStop:g!=null}):a})})});zR.displayName=FR;var p6={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function g6(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function v6(e,t,r){const n=g6(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return p6[n]}function VR(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function x6(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var y6=$R,b6=zR,Ip=["Enter"," "],w6=["ArrowDown","PageUp","Home"],UR=["ArrowUp","PageDown","End"],j6=[...w6,...UR],C6={ltr:[...Ip,"ArrowRight"],rtl:[...Ip,"ArrowLeft"]},S6={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bc="Menu",[Vl,N6,R6]=uc(bc),[Ui,BR]=Ht(bc,[R6,ja,LR]),wh=ja(),qR=LR(),[E6,Bi]=Ui(bc),[_6,wc]=Ui(bc),HR=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:o,modal:a=!0}=e,l=wh(t),[c,u]=f.useState(null),d=f.useRef(!1),h=Ge(o),m=xc(s);return f.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),i.jsx(kN,{...l,children:i.jsx(E6,{scope:t,open:r,onOpenChange:h,content:c,onContentChange:u,children:i.jsx(_6,{scope:t,onClose:f.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:m,modal:a,children:n})})})};HR.displayName=bc;var k6="MenuAnchor",cx=f.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=wh(r);return i.jsx(zv,{...s,...n,ref:t})});cx.displayName=k6;var ux="MenuPortal",[T6,WR]=Ui(ux,{forceMount:void 0}),GR=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,o=Bi(ux,t);return i.jsx(T6,{scope:t,forceMount:r,children:i.jsx(It,{present:r||o.open,children:i.jsx(dc,{asChild:!0,container:s,children:n})})})};GR.displayName=ux;var fr="MenuContent",[P6,dx]=Ui(fr),KR=f.forwardRef((e,t)=>{const r=WR(fr,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=Bi(fr,e.__scopeMenu),a=wc(fr,e.__scopeMenu);return i.jsx(Vl.Provider,{scope:e.__scopeMenu,children:i.jsx(It,{present:n||o.open,children:i.jsx(Vl.Slot,{scope:e.__scopeMenu,children:a.modal?i.jsx(A6,{...s,ref:t}):i.jsx(M6,{...s,ref:t})})})})}),A6=f.forwardRef((e,t)=>{const r=Bi(fr,e.__scopeMenu),n=f.useRef(null),s=ue(t,n);return f.useEffect(()=>{const o=n.current;if(o)return Zv(o)},[]),i.jsx(hx,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:U(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),M6=f.forwardRef((e,t)=>{const r=Bi(fr,e.__scopeMenu);return i.jsx(hx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),O6=Ei("MenuContent.ScrollLock"),hx=f.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:m,onDismiss:p,disableOutsideScroll:b,...g}=e,w=Bi(fr,r),x=wc(fr,r),y=wh(r),v=qR(r),j=N6(r),[C,S]=f.useState(null),N=f.useRef(null),R=ue(t,N,w.onContentChange),k=f.useRef(0),T=f.useRef(""),O=f.useRef(0),A=f.useRef(null),q=f.useRef("right"),I=f.useRef(0),X=b?gh:f.Fragment,V=b?{as:O6,allowPinchZoom:!0}:void 0,z=_=>{var B,xe;const D=T.current+_,Q=j().filter(ye=>!ye.disabled),K=document.activeElement,ae=(B=Q.find(ye=>ye.ref.current===K))==null?void 0:B.textValue,se=Q.map(ye=>ye.textValue),je=W6(se,D,ae),Ce=(xe=Q.find(ye=>ye.textValue===je))==null?void 0:xe.ref.current;(function ye(fe){T.current=fe,window.clearTimeout(k.current),fe!==""&&(k.current=window.setTimeout(()=>ye(""),1e3))})(D),Ce&&setTimeout(()=>Ce.focus())};f.useEffect(()=>()=>window.clearTimeout(k.current),[]),Qv();const P=f.useCallback(_=>{var Q,K;return q.current===((Q=A.current)==null?void 0:Q.side)&&K6(_,(K=A.current)==null?void 0:K.area)},[]);return i.jsx(P6,{scope:r,searchRef:T,onItemEnter:f.useCallback(_=>{P(_)&&_.preventDefault()},[P]),onItemLeave:f.useCallback(_=>{var D;P(_)||((D=N.current)==null||D.focus(),S(null))},[P]),onTriggerLeave:f.useCallback(_=>{P(_)&&_.preventDefault()},[P]),pointerGraceTimerRef:O,onPointerGraceIntentChange:f.useCallback(_=>{A.current=_},[]),children:i.jsx(X,{...V,children:i.jsx(fh,{asChild:!0,trapped:s,onMountAutoFocus:U(o,_=>{var D;_.preventDefault(),(D=N.current)==null||D.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:i.jsx(ga,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:m,onDismiss:p,children:i.jsx(y6,{asChild:!0,...v,dir:x.dir,orientation:"vertical",loop:n,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:U(c,_=>{x.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Vv,{role:"menu","aria-orientation":"vertical","data-state":u2(w.open),"data-radix-menu-content":"",dir:x.dir,...y,...g,ref:R,style:{outline:"none",...g.style},onKeyDown:U(g.onKeyDown,_=>{const Q=_.target.closest("[data-radix-menu-content]")===_.currentTarget,K=_.ctrlKey||_.altKey||_.metaKey,ae=_.key.length===1;Q&&(_.key==="Tab"&&_.preventDefault(),!K&&ae&&z(_.key));const se=N.current;if(_.target!==se||!j6.includes(_.key))return;_.preventDefault();const Ce=j().filter(B=>!B.disabled).map(B=>B.ref.current);UR.includes(_.key)&&Ce.reverse(),q6(Ce)}),onBlur:U(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(k.current),T.current="")}),onPointerMove:U(e.onPointerMove,Ul(_=>{const D=_.target,Q=I.current!==_.clientX;if(_.currentTarget.contains(D)&&Q){const K=_.clientX>I.current?"right":"left";q.current=K,I.current=_.clientX}}))})})})})})})});KR.displayName=fr;var I6="MenuGroup",mx=f.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return i.jsx(re.div,{role:"group",...n,ref:t})});mx.displayName=I6;var D6="MenuLabel",JR=f.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return i.jsx(re.div,{...n,ref:t})});JR.displayName=D6;var xd="MenuItem",Ob="menu.itemSelect",jh=f.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,o=f.useRef(null),a=wc(xd,e.__scopeMenu),l=dx(xd,e.__scopeMenu),c=ue(t,o),u=f.useRef(!1),d=()=>{const h=o.current;if(!r&&h){const m=new CustomEvent(Ob,{bubbles:!0,cancelable:!0});h.addEventListener(Ob,p=>n==null?void 0:n(p),{once:!0}),Cv(h,m),m.defaultPrevented?u.current=!1:a.onClose()}};return i.jsx(YR,{...s,ref:c,disabled:r,onClick:U(e.onClick,d),onPointerDown:h=>{var m;(m=e.onPointerDown)==null||m.call(e,h),u.current=!0},onPointerUp:U(e.onPointerUp,h=>{var m;u.current||(m=h.currentTarget)==null||m.click()}),onKeyDown:U(e.onKeyDown,h=>{const m=l.searchRef.current!=="";r||m&&h.key===" "||Ip.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});jh.displayName=xd;var YR=f.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...o}=e,a=dx(xd,r),l=qR(r),c=f.useRef(null),u=ue(t,c),[d,h]=f.useState(!1),[m,p]=f.useState("");return f.useEffect(()=>{const b=c.current;b&&p((b.textContent??"").trim())},[o.children]),i.jsx(Vl.ItemSlot,{scope:r,disabled:n,textValue:s??m,children:i.jsx(b6,{asChild:!0,...l,focusable:!n,children:i.jsx(re.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:u,onPointerMove:U(e.onPointerMove,Ul(b=>{n?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:U(e.onPointerLeave,Ul(b=>a.onItemLeave(b))),onFocus:U(e.onFocus,()=>h(!0)),onBlur:U(e.onBlur,()=>h(!1))})})})}),L6="MenuCheckboxItem",XR=f.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return i.jsx(r2,{scope:e.__scopeMenu,checked:r,children:i.jsx(jh,{role:"menuitemcheckbox","aria-checked":yd(r)?"mixed":r,...s,ref:t,"data-state":px(r),onSelect:U(s.onSelect,()=>n==null?void 0:n(yd(r)?!0:!r),{checkForDefaultPrevented:!1})})})});XR.displayName=L6;var QR="MenuRadioGroup",[$6,F6]=Ui(QR,{value:void 0,onValueChange:()=>{}}),ZR=f.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,o=Ge(n);return i.jsx($6,{scope:e.__scopeMenu,value:r,onValueChange:o,children:i.jsx(mx,{...s,ref:t})})});ZR.displayName=QR;var e2="MenuRadioItem",t2=f.forwardRef((e,t)=>{const{value:r,...n}=e,s=F6(e2,e.__scopeMenu),o=r===s.value;return i.jsx(r2,{scope:e.__scopeMenu,checked:o,children:i.jsx(jh,{role:"menuitemradio","aria-checked":o,...n,ref:t,"data-state":px(o),onSelect:U(n.onSelect,()=>{var a;return(a=s.onValueChange)==null?void 0:a.call(s,r)},{checkForDefaultPrevented:!1})})})});t2.displayName=e2;var fx="MenuItemIndicator",[r2,z6]=Ui(fx,{checked:!1}),n2=f.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,o=z6(fx,r);return i.jsx(It,{present:n||yd(o.checked)||o.checked===!0,children:i.jsx(re.span,{...s,ref:t,"data-state":px(o.checked)})})});n2.displayName=fx;var V6="MenuSeparator",s2=f.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return i.jsx(re.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});s2.displayName=V6;var U6="MenuArrow",i2=f.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=wh(r);return i.jsx(Uv,{...s,...n,ref:t})});i2.displayName=U6;var B6="MenuSub",[xW,o2]=Ui(B6),Ya="MenuSubTrigger",a2=f.forwardRef((e,t)=>{const r=Bi(Ya,e.__scopeMenu),n=wc(Ya,e.__scopeMenu),s=o2(Ya,e.__scopeMenu),o=dx(Ya,e.__scopeMenu),a=f.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=f.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return f.useEffect(()=>d,[d]),f.useEffect(()=>{const h=l.current;return()=>{window.clearTimeout(h),c(null)}},[l,c]),i.jsx(cx,{asChild:!0,...u,children:i.jsx(YR,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":u2(r.open),...e,ref:Xd(t,s.onTriggerChange),onClick:h=>{var m;(m=e.onClick)==null||m.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:U(e.onPointerMove,Ul(h=>{o.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!r.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:U(e.onPointerLeave,Ul(h=>{var p,b;d();const m=(p=r.content)==null?void 0:p.getBoundingClientRect();if(m){const g=(b=r.content)==null?void 0:b.dataset.side,w=g==="right",x=w?-5:5,y=m[w?"left":"right"],v=m[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:h.clientX+x,y:h.clientY},{x:y,y:m.top},{x:v,y:m.top},{x:v,y:m.bottom},{x:y,y:m.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(h),h.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:U(e.onKeyDown,h=>{var p;const m=o.searchRef.current!=="";e.disabled||m&&h.key===" "||C6[n.dir].includes(h.key)&&(r.onOpenChange(!0),(p=r.content)==null||p.focus(),h.preventDefault())})})})});a2.displayName=Ya;var l2="MenuSubContent",c2=f.forwardRef((e,t)=>{const r=WR(fr,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=Bi(fr,e.__scopeMenu),a=wc(fr,e.__scopeMenu),l=o2(l2,e.__scopeMenu),c=f.useRef(null),u=ue(t,c);return i.jsx(Vl.Provider,{scope:e.__scopeMenu,children:i.jsx(It,{present:n||o.open,children:i.jsx(Vl.Slot,{scope:e.__scopeMenu,children:i.jsx(hx,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var h;a.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:U(e.onFocusOutside,d=>{d.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:U(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:U(e.onKeyDown,d=>{var p;const h=d.currentTarget.contains(d.target),m=S6[a.dir].includes(d.key);h&&m&&(o.onOpenChange(!1),(p=l.trigger)==null||p.focus(),d.preventDefault())})})})})})});c2.displayName=l2;function u2(e){return e?"open":"closed"}function yd(e){return e==="indeterminate"}function px(e){return yd(e)?"indeterminate":e?"checked":"unchecked"}function q6(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function H6(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function W6(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let a=H6(e,Math.max(o,0));s.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function G6(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const l=t[o],c=t[a],u=l.x,d=l.y,h=c.x,m=c.y;d>n!=m>n&&r<(h-u)*(n-d)/(m-d)+u&&(s=!s)}return s}function K6(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return G6(r,t)}function Ul(e){return t=>t.pointerType==="mouse"?e(t):void 0}var J6=HR,Y6=cx,X6=GR,Q6=KR,Z6=mx,e$=JR,t$=jh,r$=XR,n$=ZR,s$=t2,i$=n2,o$=s2,a$=i2,l$=a2,c$=c2,Ch="DropdownMenu",[u$,yW]=Ht(Ch,[BR]),Dt=BR(),[d$,d2]=u$(Ch),h2=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,c=Dt(t),u=f.useRef(null),[d,h]=ln({prop:s,defaultProp:o??!1,onChange:a,caller:Ch});return i.jsx(d$,{scope:t,triggerId:Fr(),triggerRef:u,contentId:Fr(),open:d,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(m=>!m),[h]),modal:l,children:i.jsx(J6,{...c,open:d,onOpenChange:h,dir:n,modal:l,children:r})})};h2.displayName=Ch;var m2="DropdownMenuTrigger",f2=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,o=d2(m2,r),a=Dt(r);return i.jsx(Y6,{asChild:!0,...a,children:i.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":n?"":void 0,disabled:n,...s,ref:Xd(t,o.triggerRef),onPointerDown:U(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(o.onOpenToggle(),o.open||l.preventDefault())}),onKeyDown:U(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&o.onOpenToggle(),l.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});f2.displayName=m2;var h$="DropdownMenuPortal",p2=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Dt(t);return i.jsx(X6,{...n,...r})};p2.displayName=h$;var g2="DropdownMenuContent",v2=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=d2(g2,r),o=Dt(r),a=f.useRef(!1);return i.jsx(Q6,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...n,ref:t,onCloseAutoFocus:U(e.onCloseAutoFocus,l=>{var c;a.current||(c=s.triggerRef.current)==null||c.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:U(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(a.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)"}})});v2.displayName=g2;var m$="DropdownMenuGroup",f$=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Dt(r);return i.jsx(Z6,{...s,...n,ref:t})});f$.displayName=m$;var p$="DropdownMenuLabel",x2=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Dt(r);return i.jsx(e$,{...s,...n,ref:t})});x2.displayName=p$;var g$="DropdownMenuItem",y2=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Dt(r);return i.jsx(t$,{...s,...n,ref:t})});y2.displayName=g$;var v$="DropdownMenuCheckboxItem",b2=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Dt(r);return i.jsx(r$,{...s,...n,ref:t})});b2.displayName=v$;var x$="DropdownMenuRadioGroup",y$=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Dt(r);return i.jsx(n$,{...s,...n,ref:t})});y$.displayName=x$;var b$="DropdownMenuRadioItem",w2=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Dt(r);return i.jsx(s$,{...s,...n,ref:t})});w2.displayName=b$;var w$="DropdownMenuItemIndicator",j2=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Dt(r);return i.jsx(i$,{...s,...n,ref:t})});j2.displayName=w$;var j$="DropdownMenuSeparator",C2=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Dt(r);return i.jsx(o$,{...s,...n,ref:t})});C2.displayName=j$;var C$="DropdownMenuArrow",S$=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Dt(r);return i.jsx(a$,{...s,...n,ref:t})});S$.displayName=C$;var N$="DropdownMenuSubTrigger",S2=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Dt(r);return i.jsx(l$,{...s,...n,ref:t})});S2.displayName=N$;var R$="DropdownMenuSubContent",N2=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Dt(r);return i.jsx(c$,{...s,...n,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)"}})});N2.displayName=R$;var E$=h2,_$=f2,k$=p2,R2=v2,E2=x2,_2=y2,k2=b2,T2=w2,P2=j2,A2=C2,M2=S2,O2=N2;const T$=E$,P$=_$,A$=f.forwardRef(({className:e,inset:t,children:r,...n},s)=>i.jsxs(M2,{ref:s,className:te("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...n,children:[r,i.jsx(Ev,{className:"ml-auto h-4 w-4"})]}));A$.displayName=M2.displayName;const M$=f.forwardRef(({className:e,...t},r)=>i.jsx(O2,{ref:r,className:te("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}));M$.displayName=O2.displayName;const I2=f.forwardRef(({className:e,sideOffset:t=4,...r},n)=>i.jsx(k$,{children:i.jsx(R2,{ref:n,sideOffset:t,className:te("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),...r})}));I2.displayName=R2.displayName;const Dp=f.forwardRef(({className:e,inset:t,...r},n)=>i.jsx(_2,{ref:n,className:te("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...r}));Dp.displayName=_2.displayName;const O$=f.forwardRef(({className:e,children:t,checked:r,...n},s)=>i.jsxs(k2,{ref:s,className:te("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:r,...n,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(P2,{children:i.jsx(At,{className:"h-4 w-4"})})}),t]}));O$.displayName=k2.displayName;const I$=f.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(T2,{ref:n,className:te("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(P2,{children:i.jsx(ZO,{className:"h-2 w-2 fill-current"})})}),t]}));I$.displayName=T2.displayName;const D$=f.forwardRef(({className:e,inset:t,...r},n)=>i.jsx(E2,{ref:n,className:te("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));D$.displayName=E2.displayName;const L$=f.forwardRef(({className:e,...t},r)=>i.jsx(A2,{ref:r,className:te("-mx-1 my-1 h-px bg-muted",e),...t}));L$.displayName=A2.displayName;const Ib=[{name:"CRM Assurance",href:"/crm-assurance"},{name:"CRM Immobilier",href:"/crm-immobilier"},{name:"CRM Courtage",href:"/crm-courtage"},{name:"CRM Cabinet Comptable",href:"/crm-comptable"},{name:"CRM Recrutement",href:"/crm-recrutement"},{name:"CRM Automobile",href:"/crm-automobile"},{name:"CRM Avocat",href:"/crm-avocat"},{name:"CRM Santé",href:"/crm-sante"},{name:"CRM Agence Marketing",href:"/crm-marketing"},{name:"CRM Restauration",href:"/crm-restauration"}],Ke=()=>{const[e,t]=f.useState(!1),[r,n]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsx("nav",{className:"fixed top-0 left-0 right-0 z-50 glass border-b border-border/30",children:i.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"flex items-center justify-between h-16 lg:h-20",children:[i.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-primary to-accent flex items-center justify-center",children:i.jsx("span",{className:"text-primary-foreground font-bold text-lg",children:"C"})}),i.jsxs("span",{className:"font-display font-bold text-xl text-foreground",children:["CRM",i.jsx("span",{className:"text-primary",children:"SurMesure"})]})]}),i.jsxs("div",{className:"hidden md:flex items-center gap-8",children:[i.jsx("a",{href:"/#avantages",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Avantages"}),i.jsxs(T$,{children:[i.jsxs(P$,{className:"flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",children:["CRM Métiers",i.jsx(rh,{className:"h-4 w-4"})]}),i.jsxs(I2,{className:"bg-background border-border",children:[Ib.map(s=>i.jsx(Dp,{asChild:!0,children:i.jsx("a",{href:s.href,className:"cursor-pointer",children:s.name})},s.href)),i.jsx(Dp,{asChild:!0,children:i.jsx("a",{href:"/crm-metiers",className:"cursor-pointer font-medium text-primary",children:"Voir tous les métiers →"})})]})]}),i.jsx("a",{href:"/comment-ca-marche",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Comment ça marche"}),i.jsx("a",{href:"/blog",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Blog"}),i.jsx("a",{href:"/qui-sommes-nous",className:"text-muted-foreground hover:text-foreground transition-colors",children:"À propos"}),i.jsx("a",{href:"/#contact",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Contact"})]}),i.jsx("div",{className:"hidden md:flex items-center gap-4",children:i.jsx(F,{variant:"hero",size:"sm",onClick:()=>n(!0),children:"Démarrer un projet"})}),i.jsx("button",{className:"md:hidden text-foreground",onClick:()=>t(!e),children:e?i.jsx(oa,{size:24}):i.jsx(hI,{size:24})})]}),e&&i.jsx("div",{className:"md:hidden py-6 border-t border-border/30 animate-slide-up bg-background/95 backdrop-blur-xl",children:i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsx("a",{href:"/#avantages",className:"text-foreground font-medium hover:text-primary hover:bg-primary/10 transition-colors py-4 px-4 rounded-xl text-lg",onClick:()=>t(!1),children:"Avantages"}),i.jsx("div",{className:"py-2 px-4",children:i.jsx("span",{className:"text-muted-foreground text-sm font-medium",children:"CRM Métiers"})}),Ib.map(s=>i.jsx("a",{href:s.href,className:"text-foreground font-medium hover:text-primary hover:bg-primary/10 transition-colors py-3 px-6 rounded-xl text-base",onClick:()=>t(!1),children:s.name},s.href)),i.jsx("a",{href:"/comment-ca-marche",className:"text-foreground font-medium hover:text-primary hover:bg-primary/10 transition-colors py-4 px-4 rounded-xl text-lg",onClick:()=>t(!1),children:"Comment ça marche"}),i.jsx("a",{href:"/blog",className:"text-foreground font-medium hover:text-primary hover:bg-primary/10 transition-colors py-4 px-4 rounded-xl text-lg",onClick:()=>t(!1),children:"Blog"}),i.jsx("a",{href:"/qui-sommes-nous",className:"text-foreground font-medium hover:text-primary hover:bg-primary/10 transition-colors py-4 px-4 rounded-xl text-lg",onClick:()=>t(!1),children:"À propos"}),i.jsx("a",{href:"/#contact",className:"text-foreground font-medium hover:text-primary hover:bg-primary/10 transition-colors py-4 px-4 rounded-xl text-lg",onClick:()=>t(!1),children:"Contact"}),i.jsx("div",{className:"pt-4 px-4",children:i.jsx(F,{variant:"hero",className:"w-full",size:"lg",onClick:()=>{t(!1),n(!0)},children:"Démarrer un projet"})})]})})]})}),i.jsx(ut,{open:r,onOpenChange:n})]})},Db="+33756819438",$$=encodeURIComponent("Bonjour, je souhaite en savoir plus sur vos CRM sur mesure."),F$=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"relative min-h-screen flex items-center justify-center pt-20 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-hero-gradient opacity-50"}),i.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-primary/20 rounded-full blur-[128px] animate-pulse-glow"}),i.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-accent/20 rounded-full blur-[128px] animate-pulse-glow",style:{animationDelay:"1.5s"}}),i.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(rgba(255,255,255,0.02)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,0.02)_1px,transparent_1px)] bg-[size:64px_64px]"}),i.jsx("div",{className:"container relative mx-auto px-4 sm:px-6 lg:px-8 py-20 lg:py-32",children:i.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[i.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full glass mb-8 animate-fade-in",children:[i.jsx(JS,{className:"w-4 h-4 text-primary"}),i.jsx("span",{className:"text-sm text-muted-foreground",children:"Développement assisté par IA"})]}),i.jsxs("h1",{className:"font-display font-bold text-4xl sm:text-5xl lg:text-7xl leading-tight mb-6 animate-slide-up",children:["Votre CRM sur mesure,"," ",i.jsx("span",{className:"text-gradient",children:"propulsé par l'IA"})]}),i.jsxs("p",{className:"text-lg sm:text-xl text-muted-foreground max-w-2xl mx-auto mb-10 animate-slide-up",style:{animationDelay:"0.1s"},children:["Un CRM 100% personnalisé à vos processus métier. Vous êtes propriétaire du code. Dès ",i.jsx("span",{className:"text-primary font-semibold",children:"3 000€"}),".",i.jsx("br",{}),i.jsxs("span",{className:"text-base",children:["Découvrez ",i.jsx(G,{to:"/comment-ca-marche",className:"text-primary hover:underline",children:"comment ça marche"})," ou ",i.jsx(G,{to:"/qui-sommes-nous",className:"text-primary hover:underline",children:"qui nous sommes"}),"."]})]}),i.jsxs("div",{className:"flex flex-col items-center gap-4 animate-slide-up",style:{animationDelay:"0.2s"},children:[i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[i.jsxs(F,{variant:"hero",size:"xl",onClick:()=>t(!0),children:["Démarrer mon projet",i.jsx(ve,{className:"w-5 h-5"})]}),i.jsx(F,{variant:"glass",size:"xl",children:"Voir une démo"})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-3 mt-4",children:[i.jsx("span",{className:"text-sm text-muted-foreground",children:"ou parlez à un chef de projet :"}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("a",{href:`tel:${Db}`,className:"inline-flex items-center gap-2 px-4 py-2 rounded-full glass glass-hover text-sm font-medium transition-all hover:border-primary/50",children:[i.jsx(In,{className:"w-4 h-4 text-primary"}),"+33 7 56 81 94 38"]}),i.jsxs("a",{href:`https://wa.me/${Db.replace("+","")}?text=${$$}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-[#25D366]/20 border border-[#25D366]/30 text-sm font-medium transition-all hover:bg-[#25D366]/30 hover:border-[#25D366]/50",children:[i.jsx(mc,{className:"w-4 h-4 text-[#25D366]"}),"WhatsApp"]})]})]})]}),i.jsxs("div",{className:"mt-16 pt-16 border-t border-border/30 animate-fade-in",style:{animationDelay:"0.4s"},children:[i.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Une alternative moderne à"}),i.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8 opacity-50 mb-8",children:[i.jsx("span",{className:"text-lg font-display font-semibold",children:"Salesforce"}),i.jsx("span",{className:"text-lg font-display font-semibold",children:"HubSpot"}),i.jsx("span",{className:"text-lg font-display font-semibold",children:"Zoho"}),i.jsx("span",{className:"text-lg font-display font-semibold",children:"GHL"})]}),i.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:i.jsx(G,{to:"/crm-metiers",className:"text-primary hover:underline font-medium",children:"Découvrez nos CRM par secteur d'activité →"})}),i.jsx("p",{className:"text-sm text-primary font-medium",children:"✨ Sans engagement • Réponse en 24h • 100% gratuit pour commencer"})]})]})})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},z$=[{icon:bi,title:"Développement IA",description:"L'IA accélère le développement et réduit drastiquement les coûts. Ce qui prenait des mois se fait en semaines."},{icon:eI,title:"100% Propriétaire",description:"Contrairement aux SaaS, vous possédez votre code. Pas de dépendance, pas de frais récurrents exorbitants."},{icon:vt,title:"Équipe Dédiée",description:"Un développeur et un chef de projet dédiés à votre projet. Communication directe, pas d'intermédiaire."},{icon:cp,title:"Adapté à Vos Process",description:"APIs, automatisations, design : tout est personnalisable pour coller parfaitement à vos procédures."}],V$=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsx("section",{id:"avantages",className:"relative py-24 lg:py-32",children:i.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[i.jsxs("h2",{className:"font-display font-bold text-3xl sm:text-4xl lg:text-5xl mb-6",children:["Pourquoi choisir ",i.jsx("span",{className:"text-gradient",children:"CRMSurMesure"})," ?"]}),i.jsxs("p",{className:"text-lg text-muted-foreground",children:["Un CRM qui s'adapte à vous, pas l'inverse. Fini les workarounds et les limitations."," ",i.jsx(G,{to:"/comment-ca-marche",className:"text-primary hover:underline",children:"Découvrez notre processus en 3 étapes"}),"."]})]}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6 lg:gap-8",children:z$.map((r,n)=>i.jsxs("div",{className:"group relative p-6 lg:p-8 rounded-2xl glass glass-hover",style:{animationDelay:`${n*.1}s`},children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-primary/20 to-accent/20 flex items-center justify-center mb-6 group-hover:scale-110 transition-transform duration-300",children:i.jsx(r.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-xl mb-3 text-foreground",children:r.title}),i.jsx("p",{className:"text-muted-foreground leading-relaxed",children:r.description}),i.jsx("div",{className:"absolute inset-0 rounded-2xl bg-gradient-to-br from-primary/5 to-accent/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300 -z-10"})]},r.title))}),i.jsxs("div",{className:"text-center mt-12 space-y-4",children:[i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Démarrer mon projet gratuitement",i.jsx(ve,{className:"w-4 h-4"})]}),i.jsx("p",{className:"text-sm text-muted-foreground",children:i.jsx(G,{to:"/crm-metiers",className:"text-primary hover:underline",children:"Voir nos solutions par métier →"})})]})]})}),i.jsx(ut,{open:e,onOpenChange:t})]})},U$=[{icon:xa,name:"Assurance",slug:"/crm-assurance",shortDescription:"Contrats, sinistres, renouvellements"},{icon:_i,name:"Immobilier",slug:"/crm-immobilier",shortDescription:"Biens, acquéreurs, transactions"},{icon:Fi,name:"Courtage",slug:"/crm-courtage",shortDescription:"Dossiers, commissions, conformité"},{icon:sa,name:"Comptabilité",slug:"/crm-comptable",shortDescription:"Missions, timesheet, échéances"},{icon:vt,name:"Recrutement",slug:"/crm-recrutement",shortDescription:"Candidats, missions, placements"},{icon:th,name:"Automobile",slug:"/crm-automobile",shortDescription:"Parc véhicules, après-vente"},{icon:oh,name:"Avocats",slug:"/crm-avocat",shortDescription:"Dossiers, conflits, facturation"},{icon:sh,name:"Santé",slug:"/crm-sante",shortDescription:"Patients, RDV, conformité"},{icon:ih,name:"Marketing",slug:"/crm-marketing",shortDescription:"Clients, campagnes, projets"},{icon:ah,name:"Restauration",slug:"/crm-restauration",shortDescription:"Réservations, fidélité, événements"}],B$=()=>i.jsxs("section",{className:"relative py-24 lg:py-32 bg-secondary/20",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-primary/5 to-transparent"}),i.jsxs("div",{className:"container relative mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"Solutions Sectorielles"}),i.jsxs("h2",{className:"font-display font-bold text-3xl sm:text-4xl lg:text-5xl mb-6",children:["Un CRM pour ",i.jsx("span",{className:"text-gradient",children:"chaque métier"})]}),i.jsx("p",{className:"text-lg text-muted-foreground",children:"Des solutions spécialement conçues pour répondre aux besoins de votre secteur d'activité."})]}),i.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-4 lg:gap-6",children:U$.map((e,t)=>i.jsxs(G,{to:e.slug,className:"group relative p-4 lg:p-6 rounded-2xl glass glass-hover text-center transition-all duration-300 hover:scale-105",style:{animationDelay:`${t*.05}s`},children:[i.jsx("div",{className:"w-12 h-12 mx-auto rounded-xl bg-gradient-to-br from-primary/20 to-accent/20 flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300",children:i.jsx(e.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-base lg:text-lg mb-1 text-foreground group-hover:text-primary transition-colors",children:e.name}),i.jsx("p",{className:"text-xs lg:text-sm text-muted-foreground leading-relaxed hidden sm:block",children:e.shortDescription}),i.jsx("div",{className:"absolute top-3 right-3 opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:i.jsx(ve,{className:"w-4 h-4 text-primary"})}),i.jsx("div",{className:"absolute inset-0 rounded-2xl bg-gradient-to-br from-primary/5 to-accent/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300 -z-10"})]},e.slug))}),i.jsx("div",{className:"text-center mt-12",children:i.jsx(G,{to:"/crm-metiers",children:i.jsxs(F,{variant:"glass",size:"lg",children:["Voir tous les secteurs",i.jsx(ve,{className:"w-4 h-4"})]})})})]})]}),Lb=[{number:"01",icon:kn,title:"Analyse de vos besoins",description:"On échange sur vos processus, vos pain points et vos objectifs. Aucun jargon technique, on parle métier."},{number:"02",icon:vI,title:"Développement sur mesure",description:"Votre dev dédié construit le CRM avec l'IA. Vous suivez l'avancement et validez chaque fonctionnalité."},{number:"03",icon:YS,title:"Livraison & Formation",description:"Vous recevez le code source complet, la documentation et une formation pour votre équipe."}],q$=()=>i.jsx("section",{id:"comment",className:"relative py-24 lg:py-32 bg-gradient-subtle",children:i.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[i.jsxs("h2",{className:"font-display font-bold text-3xl sm:text-4xl lg:text-5xl mb-6",children:["Comment ça ",i.jsx("span",{className:"text-gradient",children:"fonctionne"})," ?"]}),i.jsx("p",{className:"text-lg text-muted-foreground",children:"Un processus simple et transparent, de l'idée à la mise en production."})]}),i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsx("div",{className:"grid lg:grid-cols-3 gap-8 lg:gap-12",children:Lb.map((e,t)=>i.jsxs("div",{className:"relative group",children:[t<Lb.length-1&&i.jsx("div",{className:"hidden lg:block absolute top-12 left-full w-full h-[2px] bg-gradient-to-r from-primary/50 to-transparent -translate-x-1/2"}),i.jsxs("div",{className:"relative p-8 rounded-2xl glass glass-hover text-center lg:text-left",children:[i.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-primary to-accent mb-6 group-hover:scale-110 transition-transform duration-300",children:i.jsx(e.icon,{className:"w-7 h-7 text-primary-foreground"})}),i.jsx("span",{className:"absolute top-4 right-4 text-6xl font-display font-bold text-primary/10",children:e.number}),i.jsx("h3",{className:"font-display font-semibold text-xl mb-3 text-foreground",children:e.title}),i.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e.description})]})]},e.number))}),i.jsxs("div",{className:"text-center mt-12",children:[i.jsx("p",{className:"text-muted-foreground mb-4",children:"Prêt à passer à l'action ?"}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>window.location.href="/discovery",children:["Commencer maintenant",i.jsx(ve,{className:"w-4 h-4"})]})]})]})]})}),Mm=[{feature:"Prix d'entrée",crmsurmesure:"Dès 3 000€",others:"10 000€ à 100 000€+",advantage:!0},{feature:"Propriété du code",crmsurmesure:"100% à vous",others:"Jamais",advantage:!0},{feature:"Personnalisation",crmsurmesure:"Illimitée",others:"Limitée aux plugins",advantage:!0},{feature:"Coûts récurrents",crmsurmesure:"Hébergement seul (~50€/mois)",others:"500€ à 5 000€/mois",advantage:!0},{feature:"Dépendance éditeur",crmsurmesure:"Aucune",others:"Totale",advantage:!0},{feature:"Délai de livraison",crmsurmesure:"4 à 8 semaines",others:"3 à 12 mois",advantage:!0}],H$=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsx("section",{className:"relative py-24 lg:py-32",children:i.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[i.jsxs("h2",{className:"font-display font-bold text-3xl sm:text-4xl lg:text-5xl mb-6",children:["CRMSurMesure vs ",i.jsx("span",{className:"text-gradient",children:"les autres"})]}),i.jsx("p",{className:"text-lg text-muted-foreground",children:"Comparez objectivement et faites le bon choix pour votre entreprise."})]}),i.jsxs("div",{className:"hidden md:block max-w-4xl mx-auto overflow-hidden rounded-2xl glass",children:[i.jsxs("div",{className:"grid grid-cols-3 bg-secondary/50 p-4 lg:p-6 border-b border-border/30",children:[i.jsx("div",{className:"font-display font-semibold text-muted-foreground",children:"Critère"}),i.jsx("div",{className:"font-display font-semibold text-primary text-center whitespace-nowrap",children:"CRMSurMesure"}),i.jsx("div",{className:"font-display font-semibold text-muted-foreground text-center",children:"SaaS Classiques"})]}),Mm.map((r,n)=>i.jsxs("div",{className:`grid grid-cols-3 p-4 lg:p-6 items-center ${n!==Mm.length-1?"border-b border-border/30":""}`,children:[i.jsx("div",{className:"font-medium text-foreground text-sm lg:text-base",children:r.feature}),i.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm lg:text-base",children:[i.jsx(At,{className:"w-5 h-5 text-primary flex-shrink-0"}),i.jsx("span",{className:"text-foreground",children:r.crmsurmesure})]}),i.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm lg:text-base text-muted-foreground",children:[i.jsx(oa,{className:"w-5 h-5 text-destructive flex-shrink-0"}),i.jsx("span",{children:r.others})]})]},r.feature))]}),i.jsx("div",{className:"md:hidden space-y-4 max-w-lg mx-auto",children:Mm.map(r=>i.jsxs("div",{className:"glass rounded-2xl p-5 space-y-4",children:[i.jsx("h3",{className:"font-display font-semibold text-lg text-foreground text-center border-b border-border/30 pb-3",children:r.feature}),i.jsxs("div",{className:"bg-primary/10 border border-primary/30 rounded-xl p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(At,{className:"w-5 h-5 text-primary flex-shrink-0"}),i.jsx("span",{className:"font-semibold text-primary text-sm",children:"CRMSurMesure"})]}),i.jsx("p",{className:"text-foreground font-medium text-base pl-7",children:r.crmsurmesure})]}),i.jsxs("div",{className:"bg-secondary/30 rounded-xl p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(oa,{className:"w-5 h-5 text-destructive flex-shrink-0"}),i.jsx("span",{className:"font-semibold text-muted-foreground text-sm",children:"SaaS Classiques"})]}),i.jsx("p",{className:"text-muted-foreground text-base pl-7",children:r.others})]})]},r.feature))}),i.jsxs("div",{className:"text-center mt-12",children:[i.jsx("p",{className:"text-muted-foreground mb-4",children:"Convaincu ? Lancez votre projet en 5 minutes"}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Démarrer mon projet",i.jsx(ve,{className:"w-4 h-4"})]})]})]})}),i.jsx(ut,{open:e,onOpenChange:t})]})},W$=[{name:"Starter",price:"3 000",description:"Idéal pour les TPE et startups",features:["CRM personnalisé de base","Jusqu'à 5 modules","1 intégration API","Formation incluse","Support 3 mois","Code source livré"],popular:!1},{name:"Business",price:"8 000",description:"Pour les PME en croissance",features:["CRM complet sur mesure","Modules illimités","5 intégrations API","Automatisations avancées","Dashboard client","Support 6 mois","Chef de projet dédié"],popular:!0},{name:"Enterprise",price:"Sur devis",description:"Solutions complexes",features:["Architecture sur mesure","Intégrations illimitées","Multi-tenants possible","SLA garanti","Support prioritaire 12 mois","Équipe dédiée","Maintenance évolutive"],popular:!1}],G$=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsx("section",{id:"tarifs",className:"relative py-24 lg:py-32 bg-gradient-subtle",children:i.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[i.jsxs("h2",{className:"font-display font-bold text-3xl sm:text-4xl lg:text-5xl mb-6",children:["Tarification ",i.jsx("span",{className:"text-gradient",children:"transparente"})]}),i.jsx("p",{className:"text-lg text-muted-foreground",children:"Pas de frais cachés. Vous payez une fois, le CRM est à vous."})]}),i.jsx("div",{className:"grid lg:grid-cols-3 gap-8 max-w-6xl mx-auto",children:W$.map(r=>i.jsxs("div",{className:`relative p-8 rounded-2xl ${r.popular?"glass border-primary/50 glow-primary":"glass"}`,children:[r.popular&&i.jsx("div",{className:"absolute -top-4 left-1/2 -translate-x-1/2",children:i.jsx("span",{className:"px-4 py-1 rounded-full bg-gradient-to-r from-primary to-accent text-primary-foreground text-sm font-medium",children:"Le plus populaire"})}),i.jsxs("div",{className:"text-center mb-8",children:[i.jsx("h3",{className:"font-display font-semibold text-2xl mb-2 text-foreground",children:r.name}),i.jsx("p",{className:"text-muted-foreground text-sm mb-4",children:r.description}),i.jsxs("div",{className:"flex items-baseline justify-center gap-1",children:[i.jsx("span",{className:"text-4xl lg:text-5xl font-display font-bold text-foreground",children:r.price}),r.price!=="Sur devis"&&i.jsx("span",{className:"text-muted-foreground",children:"€"})]})]}),i.jsx("ul",{className:"space-y-4 mb-8",children:r.features.map(n=>i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx(At,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),i.jsx("span",{className:"text-muted-foreground",children:n})]},n))}),i.jsxs(F,{variant:r.popular?"hero":"glass",className:"w-full",size:"lg",onClick:()=>t(!0),children:[r.price==="Sur devis"?"Discuter de mon projet":"Démarrer mon projet",i.jsx(ve,{className:"w-4 h-4"})]})]},r.name))}),i.jsx("p",{className:"text-center text-muted-foreground text-sm mt-12 max-w-2xl mx-auto",children:"* Tous les prix sont HT. Les frais d'hébergement (environ 50€/mois) sont à votre charge après livraison."})]})}),i.jsx(ut,{open:e,onOpenChange:t})]})},K$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class gx extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class J$ extends gx{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class $b extends gx{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Fb extends gx{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Lp;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Lp||(Lp={}));class Y${constructor(t,{headers:r={},customFetch:n,region:s=Lp.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=K$(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return l5(this,arguments,void 0,function*(r,n={}){var s;let o,a;try{const{headers:l,method:c,body:u,signal:d,timeout:h}=n;let m={},{region:p}=n;p||(p=this.region);const b=new URL(`${this.url}/${r}`);p&&p!=="any"&&(m["x-region"]=p,b.searchParams.set("forceFunctionRegion",p));let g;u&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(m["Content-Type"]="application/octet-stream",g=u):typeof u=="string"?(m["Content-Type"]="text/plain",g=u):typeof FormData<"u"&&u instanceof FormData?g=u:(m["Content-Type"]="application/json",g=JSON.stringify(u)):g=u;let w=d;h&&(a=new AbortController,o=setTimeout(()=>a.abort(),h),d?(w=a.signal,d.addEventListener("abort",()=>a.abort())):w=a.signal);const x=yield this.fetch(b.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},m),this.headers),l),body:g,signal:w}).catch(C=>{throw new J$(C)}),y=x.headers.get("x-relay-error");if(y&&y==="true")throw new $b(x);if(!x.ok)throw new Fb(x);let v=((s=x.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),j;return v==="application/json"?j=yield x.json():v==="application/octet-stream"||v==="application/pdf"?j=yield x.blob():v==="text/event-stream"?j=x:v==="multipart/form-data"?j=yield x.formData():j=yield x.text(),{data:j,error:null,response:x}}catch(l){return{data:null,error:l,response:l instanceof Fb||l instanceof $b?l.context:void 0}}finally{o&&clearTimeout(o)}})}}var X$=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}},Q$=class{constructor(e){var t,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{let a=null,l=null,c=null,u=o.status,d=o.statusText;if(o.ok){var h,m;if(r.method!=="HEAD"){var p;const x=await o.text();x===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((p=r.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text"))?l=x:l=JSON.parse(x))}const g=(h=r.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),w=(m=o.headers.get("content-range"))===null||m===void 0?void 0:m.split("/");g&&w&&w.length>1&&(c=parseInt(w[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(l)&&(l.length>1?(a={code:"PGRST116",details:`Results contain ${l.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l=null,c=null,u=406,d="Not Acceptable"):l.length===1?l=l[0]:l=null)}else{var b;const g=await o.text();try{a=JSON.parse(g),Array.isArray(a)&&o.status===404&&(l=[],a=null,u=200,d="OK")}catch{o.status===404&&g===""?(u=204,d="No Content"):a={message:g}}if(a&&r.isMaybeSingle&&(!(a==null||(b=a.details)===null||b===void 0)&&b.includes("0 rows"))&&(a=null,u=200,d="OK"),a&&r.shouldThrowOnError)throw new X$(a)}return{error:a,data:l,count:c,status:u,statusText:d}});return this.shouldThrowOnError||(s=s.catch(o=>{var a;let l="";const c=o==null?void 0:o.cause;if(c){var u,d,h,m;const b=(u=c==null?void 0:c.message)!==null&&u!==void 0?u:"",g=(d=c==null?void 0:c.code)!==null&&d!==void 0?d:"";l=`${(h=o==null?void 0:o.name)!==null&&h!==void 0?h:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
Caused by: ${(m=c==null?void 0:c.name)!==null&&m!==void 0?m:"Error"}: ${b}`,g&&(l+=` (${g})`),c!=null&&c.stack&&(l+=`
${c.stack}`)}else{var p;l=(p=o==null?void 0:o.stack)!==null&&p!==void 0?p:""}return{error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},Z$=class extends Q${select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const o=s?`${s}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,o=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:o="text"}={}){var a;const l=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${c}"; options=${l};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const zb=new RegExp("[,()]");var so=class extends Z${eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&zb.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&zb.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},eF=class{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let o=!1;const a=(e??"*").split("").map(l=>/\s/.test(l)&&!o?"":(l==='"'&&(o=!o),l)).join("");return this.url.searchParams.set("select",a),n&&this.headers.append("Prefer",`count=${n}`),new so({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST";if(t&&this.headers.append("Prefer",`count=${t}`),r||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const o=e.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>0){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new so({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var o;const a="POST";if(this.headers.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&this.url.searchParams.set("on_conflict",t),n&&this.headers.append("Prefer",`count=${n}`),s||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);this.url.searchParams.set("columns",c.join(","))}}return new so({method:a,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(e,{count:t}={}){var r;const n="PATCH";return t&&this.headers.append("Prefer",`count=${t}`),new so({method:n,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:e}={}){var t;const r="DELETE";return e&&this.headers.append("Prefer",`count=${e}`),new so({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},tF=class D2{constructor(t,{headers:r={},schema:n,fetch:s}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.fetch=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new eF(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new D2(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,r={},{head:n=!1,get:s=!1,count:o}={}){var a;let l;const c=new URL(`${this.url}/rpc/${t}`);let u;n||s?(l=n?"HEAD":"GET",Object.entries(r).filter(([h,m])=>m!==void 0).map(([h,m])=>[h,Array.isArray(m)?`{${m.join(",")}}`:`${m}`]).forEach(([h,m])=>{c.searchParams.append(h,m)})):(l="POST",u=r);const d=new Headers(this.headers);return o&&d.set("Prefer",`count=${o}`),new so({method:l,url:c,headers:d,schema:this.schemaName,body:u,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}};class rF{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const r=process.versions;if(r&&r.node){const n=r.node,s=parseInt(n.replace(/^v/,"").split(".")[0]);return s>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
import ws from "ws"
new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const nF="2.89.0",sF=`realtime-js/${nF}`,L2="1.0.0",iF="2.0.0",Vb=L2,$p=1e4,oF=1e3,aF=100;var rs;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(rs||(rs={}));var tt;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(tt||(tt={}));var Or;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Or||(Or={}));var Fp;(function(e){e.websocket="websocket"})(Fp||(Fp={}));var Zs;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Zs||(Zs={}));class lF{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},a=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,a)}_encodeUserBroadcastPush(t,r,n){var s,o;const a=t.topic,l=(s=t.ref)!==null&&s!==void 0?s:"",c=(o=t.join_ref)!==null&&o!==void 0?o:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const m=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+a.length+u.length+h.length,p=new ArrayBuffer(this.HEADER_LENGTH+m);let b=new DataView(p),g=0;b.setUint8(g++,this.KINDS.userBroadcastPush),b.setUint8(g++,c.length),b.setUint8(g++,l.length),b.setUint8(g++,a.length),b.setUint8(g++,u.length),b.setUint8(g++,h.length),b.setUint8(g++,r),Array.from(c,x=>b.setUint8(g++,x.charCodeAt(0))),Array.from(l,x=>b.setUint8(g++,x.charCodeAt(0))),Array.from(a,x=>b.setUint8(g++,x.charCodeAt(0))),Array.from(u,x=>b.setUint8(g++,x.charCodeAt(0))),Array.from(h,x=>b.setUint8(g++,x.charCodeAt(0)));var w=new Uint8Array(p.byteLength+n.byteLength);return w.set(new Uint8Array(p),0),w.set(new Uint8Array(n),p.byteLength),w.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,o,a,l,c]=n;return r({join_ref:s,ref:o,topic:a,event:l,payload:c})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),o=r.getUint8(2),a=r.getUint8(3),l=r.getUint8(4);let c=this.HEADER_LENGTH+4;const u=n.decode(t.slice(c,c+s));c=c+s;const d=n.decode(t.slice(c,c+o));c=c+o;const h=n.decode(t.slice(c,c+a));c=c+a;const m=t.slice(c,t.byteLength),p=l===this.JSON_ENCODING?JSON.parse(n.decode(m)):m,b={type:this.BROADCAST_EVENT,event:d,payload:p};return a>0&&(b.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:b}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}class $2{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var _e;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(_e||(_e={}));const Ub=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((o,a)=>(o[a]=cF(a,e,t,s),o),{}):{}},cF=(e,t,r,n)=>{const s=t.find(l=>l.name===e),o=s==null?void 0:s.type,a=r[e];return o&&!n.includes(o)?F2(o,a):zp(a)},F2=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return mF(t,r)}switch(e){case _e.bool:return uF(t);case _e.float4:case _e.float8:case _e.int2:case _e.int4:case _e.int8:case _e.numeric:case _e.oid:return dF(t);case _e.json:case _e.jsonb:return hF(t);case _e.timestamp:return fF(t);case _e.abstime:case _e.date:case _e.daterange:case _e.int4range:case _e.int8range:case _e.money:case _e.reltime:case _e.text:case _e.time:case _e.timestamptz:case _e.timetz:case _e.tsrange:case _e.tstzrange:return zp(t);default:return zp(t)}},zp=e=>e,uF=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},dF=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},hF=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},mF=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let o;const a=e.slice(1,r);try{o=JSON.parse("["+a+"]")}catch{o=a?a.split(","):[]}return o.map(l=>F2(t,l))}return e},fF=e=>typeof e=="string"?e.replace(" ","T"):e,z2=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class Om{constructor(t,r,n={},s=$p){this.channel=t,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var Bb;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Bb||(Bb={}));class dl{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:o,onLeave:a,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=dl.syncState(this.state,s,o,a),this.pendingDiffs.forEach(c=>{this.state=dl.syncDiff(this.state,c,o,a)}),this.pendingDiffs=[],l()}),this.channel._on(n.diff,{},s=>{const{onJoin:o,onLeave:a,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=dl.syncDiff(this.state,s,o,a),l())}),this.onJoin((s,o,a)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:a})}),this.onLeave((s,o,a)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:a})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,s){const o=this.cloneDeep(t),a=this.transformState(r),l={},c={};return this.map(o,(u,d)=>{a[u]||(c[u]=d)}),this.map(a,(u,d)=>{const h=o[u];if(h){const m=d.map(w=>w.presence_ref),p=h.map(w=>w.presence_ref),b=d.filter(w=>p.indexOf(w.presence_ref)<0),g=h.filter(w=>m.indexOf(w.presence_ref)<0);b.length>0&&(l[u]=b),g.length>0&&(c[u]=g)}else l[u]=d}),this.syncDiff(o,{joins:l,leaves:c},n,s)}static syncDiff(t,r,n,s){const{joins:o,leaves:a}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(o,(l,c)=>{var u;const d=(u=t[l])!==null&&u!==void 0?u:[];if(t[l]=this.cloneDeep(c),d.length>0){const h=t[l].map(p=>p.presence_ref),m=d.filter(p=>h.indexOf(p.presence_ref)<0);t[l].unshift(...m)}n(l,d,c)}),this.map(a,(l,c)=>{let u=t[l];if(!u)return;const d=c.map(h=>h.presence_ref);u=u.filter(h=>d.indexOf(h.presence_ref)<0),t[l]=u,s(l,u,c),u.length===0&&delete t[l]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return"metas"in s?r[n]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):r[n]=s,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var qb;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(qb||(qb={}));var hl;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(hl||(hl={}));var jn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(jn||(jn={}));class bo{constructor(t,r={config:{}},n){var s,o;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=tt.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new Om(this,Or.join,this.params,this.timeout),this.rejoinTimer=new $2(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=tt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=tt.closed,this.socket._remove(this)}),this._onError(a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=tt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=tt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=tt.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Or.reply,{},(a,l)=>{this._trigger(this._replyEventName(l),a)}),this.presence=new dl(this),this.broadcastEndpointURL=z2(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,o;if(this.socket.isConnected()||this.socket.connect(),this.state==tt.closed){const{config:{broadcast:a,presence:l,private:c}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(p=>p.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[hl.PRESENCE]&&this.bindings[hl.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,h={},m={broadcast:a,presence:Object.assign(Object.assign({},l),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(p=>t==null?void 0:t(jn.CHANNEL_ERROR,p)),this._onClose(()=>t==null?void 0:t(jn.CLOSED)),this.updateJoinPayload(Object.assign({config:m},h)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:p})=>{var b;if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(jn.SUBSCRIBED);return}else{const g=this.bindings.postgres_changes,w=(b=g==null?void 0:g.length)!==null&&b!==void 0?b:0,x=[];for(let y=0;y<w;y++){const v=g[y],{filter:{event:j,schema:C,table:S,filter:N}}=v,R=p&&p[y];if(R&&R.event===j&&bo.isFilterValueEqual(R.schema,C)&&bo.isFilterValueEqual(R.table,S)&&bo.isFilterValueEqual(R.filter,N))x.push(Object.assign(Object.assign({},v),{id:R.id}));else{this.unsubscribe(),this.state=tt.errored,t==null||t(jn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=x,t&&t(jn.SUBSCRIBED);return}}).receive("error",p=>{this.state=tt.errored,t==null||t(jn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(jn.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===tt.joined&&t===hl.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,a,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;try{const u=await l.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,r={}){var n,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:a}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:a,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var a,l,c;const u=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(a=this.params)===null||a===void 0?void 0:a.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&o("ok"),u.receive("ok",()=>o("ok")),u.receive("error",()=>o("error")),u.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=tt.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Or.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new Om(this,Or.leave,{},t),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=tt.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const s=new AbortController,o=setTimeout(()=>s.abort(),n),a=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(o),a}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Om(this,t,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>aF){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var s,o;const a=t.toLocaleLowerCase(),{close:l,error:c,leave:u,join:d}=Or;if(n&&[l,c,u,d].indexOf(a)>=0&&n!==this._joinRef())return;let m=this._onMessage(a,r,n);if(r&&!m)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(a)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(p=>{var b,g,w;return((b=p.filter)===null||b===void 0?void 0:b.event)==="*"||((w=(g=p.filter)===null||g===void 0?void 0:g.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===a}).map(p=>p.callback(m,n)):(o=this.bindings[a])===null||o===void 0||o.filter(p=>{var b,g,w,x,y,v;if(["broadcast","presence","postgres_changes"].includes(a))if("id"in p){const j=p.id,C=(b=p.filter)===null||b===void 0?void 0:b.event;return j&&((g=r.ids)===null||g===void 0?void 0:g.includes(j))&&(C==="*"||(C==null?void 0:C.toLocaleLowerCase())===((w=r.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const j=(y=(x=p==null?void 0:p.filter)===null||x===void 0?void 0:x.event)===null||y===void 0?void 0:y.toLocaleLowerCase();return j==="*"||j===((v=r==null?void 0:r.event)===null||v===void 0?void 0:v.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===a}).map(p=>{if(typeof m=="object"&&"ids"in m){const b=m.data,{schema:g,table:w,commit_timestamp:x,type:y,errors:v}=b;m=Object.assign(Object.assign({},{schema:g,table:w,commit_timestamp:x,eventType:y,new:{},old:{},errors:v}),this._getPayloadRecords(b))}p.callback(m,n)})}_isClosed(){return this.state===tt.closed}_isJoined(){return this.state===tt.joined}_isJoining(){return this.state===tt.joining}_isLeaving(){return this.state===tt.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const s=t.toLocaleLowerCase(),o={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===n&&bo.isEqual(s.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Or.close,{},t)}_onError(t){this._on(Or.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=tt.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Ub(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Ub(t.columns,t.old_record)),r}}const Im=()=>{},nu={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},pF=[1e3,2e3,5e3,1e4],gF=1e4,vF=`
addEventListener("message", (e) => {
if (e.data.event === "start") {
setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
}
});`;class xF{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=$p,this.transport=null,this.heartbeatIntervalMs=nu.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Im,this.ref=0,this.reconnectTimer=null,this.vsn=Vb,this.logger=Im,this.conn=null,this.sendBuffer=[],this.serializer=new lF,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>s?(...o)=>s(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${Fp.websocket}`,this.httpEndpoint=z2(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=rF.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r}
To use Realtime in Node.js, you need to provide a WebSocket implementation:
Option 1: Use Node.js 22+ which has native WebSocket support
Option 2: Install and provide the "ws" package:
npm install ws
import ws from "ws"
const client = new RealtimeClient(url, {
...options,
transport: ws
})`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case rs.connecting:return Zs.Connecting;case rs.open:return Zs.Open;case rs.closing:return Zs.Closing;default:return Zs.Closed}}isConnected(){return this.connectionState()===Zs.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===n);if(s)return s;{const o=new bo(`realtime:${t}`,r,this);return this.channels.push(o),o}}push(t){const{topic:r,event:n,payload:s,ref:o}=t,a=()=>{this.encode(t,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${r} ${n} (${o})`,s),this.isConnected()?a():this.sendBuffer.push(a)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(oF,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout()},nu.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:s,payload:o,ref:a}=r,l=a?`(${a})`:"",c=o.status||"";this.log("receive",`${c} ${n} ${s} ${l}`.trim(),o),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(s,o,a)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===rs.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===rs.open||this.conn.readyState===rs.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(Or.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${t}${n}${s}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([vF],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const o={access_token:r,version:sF};r&&s.updateJoinPayload(o),s.joinedOnce&&s._isJoined()&&s._push(Or.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new $2(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},nu.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,s,o,a,l,c,u,d,h,m,p;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:$p,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:nu.HEARTBEAT_INTERVAL,this.worker=(o=t==null?void 0:t.worker)!==null&&o!==void 0?o:!1,this.accessToken=(a=t==null?void 0:t.accessToken)!==null&&a!==void 0?a:null,this.heartbeatCallback=(l=t==null?void 0:t.heartbeatCallback)!==null&&l!==void 0?l:Im,this.vsn=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:Vb,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:b=>pF[b-1]||gF,this.vsn){case L2:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(b,g)=>g(JSON.stringify(b)),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:(b,g)=>g(JSON.parse(b));break;case iF:this.encode=(m=t==null?void 0:t.encode)!==null&&m!==void 0?m:this.serializer.encode.bind(this.serializer),this.decode=(p=t==null?void 0:t.decode)!==null&&p!==void 0?p:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var Bl=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function yF(e,t,r){const n=new URL(t,e);if(r)for(const[s,o]of Object.entries(r))o!==void 0&&n.searchParams.set(s,o);return n.toString()}async function bF(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function wF(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:o,headers:a}){const l=yF(e.baseUrl,n,s),c=await bF(e.auth),u=await t(l,{method:r,headers:{...o?{"Content-Type":"application/json"}:{},...c,...a},body:o?JSON.stringify(o):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),m=h&&d?JSON.parse(d):d;if(!u.ok){const p=h?m:void 0,b=p==null?void 0:p.error;throw new Bl((b==null?void 0:b.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:b==null?void 0:b.type,icebergCode:b==null?void 0:b.code,details:p})}return{status:u.status,headers:u.headers,data:m}}}}function su(e){return e.join("")}var jF=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:su(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${su(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${su(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${su(e.namespace)}`}),!0}catch(t){if(t instanceof Bl&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Bl&&r.status===409)return;throw r}}};function Qi(e){return e.join("")}var CF=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Bl&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Bl&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},SF=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=wF({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new jF(this.client,t),this.tableOps=new CF(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},Sh=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function Le(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var NF=class extends Sh{constructor(e,t,r){super(e),this.name="StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Vp=class extends Sh{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const vx=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),RF=()=>Response,Up=e=>{if(Array.isArray(e))return e.map(r=>Up(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=Up(n)}),t},EF=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},_F=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function ql(e){"@babel/helpers - typeof";return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ql(e)}function kF(e,t){if(ql(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ql(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function TF(e){var t=kF(e,"string");return ql(t)=="symbol"?t:t+""}function PF(e,t,r){return(t=TF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hb(Object(r),!0).forEach(function(n){PF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Dm=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},AF=async(e,t,r)=>{e instanceof await RF()&&!(r!=null&&r.noResolveJson)?e.json().then(n=>{const s=e.status||500,o=(n==null?void 0:n.statusCode)||s+"";t(new NF(Dm(n),s,o))}).catch(n=>{t(new Vp(Dm(n),n))}):t(new Vp(Dm(e),e))},MF=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?s:(EF(n)?(s.headers=oe({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,t!=null&&t.duplex&&(s.duplex=t.duplex),oe(oe({},s),r))};async function jc(e,t,r,n,s,o){return new Promise((a,l)=>{e(r,MF(t,n,s,o)).then(c=>{if(!c.ok)throw c;return n!=null&&n.noResolveJson?c:c.json()}).then(c=>a(c)).catch(c=>AF(c,l,n))})}async function Hl(e,t,r,n){return jc(e,"GET",t,r,n)}async function Tr(e,t,r,n,s){return jc(e,"POST",t,n,s,r)}async function Bp(e,t,r,n,s){return jc(e,"PUT",t,n,s,r)}async function OF(e,t,r,n){return jc(e,"HEAD",t,oe(oe({},r),{},{noResolveJson:!0}),n)}async function xx(e,t,r,n,s){return jc(e,"DELETE",t,n,s,r)}var IF=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Le(t))return{data:null,error:t};throw t}}};let V2;V2=Symbol.toStringTag;var DF=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[V2]="BlobDownloadBuilder",this.promise=null}asStream(){return new IF(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Le(t))return{data:null,error:t};throw t}}};const LF={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Wb={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var $F=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=r,this.fetch=vx(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,r,n){var s=this;try{let o;const a=oe(oe({},Wb),n);let l=oe(oe({},s.headers),e==="POST"&&{"x-upsert":String(a.upsert)});const c=a.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",a.cacheControl),c&&o.append("metadata",s.encodeMetadata(c)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.has("cacheControl")||o.append("cacheControl",a.cacheControl),c&&!o.has("metadata")&&o.append("metadata",s.encodeMetadata(c))):(o=r,l["cache-control"]=`max-age=${a.cacheControl}`,l["content-type"]=a.contentType,c&&(l["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!a.duplex&&(a.duplex="half")),n!=null&&n.headers&&(l=oe(oe({},l),n.headers));const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?Bp:Tr)(s.fetch,`${s.url}/object/${d}`,o,oe({headers:l},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{data:{path:u,id:h.Id,fullPath:h.Key},error:null}}catch(o){if(s.shouldThrowOnError)throw o;if(Le(o))return{data:null,error:o};throw o}}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const o=s._removeEmptyFolders(e),a=s._getFinalPath(o),l=new URL(s.url+`/object/upload/sign/${a}`);l.searchParams.set("token",t);try{let c;const u=oe({upsert:Wb.upsert},n),d=oe(oe({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.append("cacheControl",u.cacheControl)):(c=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{data:{path:o,fullPath:(await Bp(s.fetch,l.toString(),c,{headers:d})).Key},error:null}}catch(c){if(s.shouldThrowOnError)throw c;if(Le(c))return{data:null,error:c};throw c}}async createSignedUploadUrl(e,t){var r=this;try{let n=r._getFinalPath(e);const s=oe({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await Tr(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),a=new URL(r.url+o.url),l=a.searchParams.get("token");if(!l)throw new Sh("No token returned by API");return{data:{signedUrl:a.toString(),path:e,token:l},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Le(n))return{data:null,error:n};throw n}}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;try{return{data:await Tr(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(Le(s))return{data:null,error:s};throw s}}async copy(e,t,r){var n=this;try{return{data:{path:(await Tr(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key},error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(Le(s))return{data:null,error:s};throw s}}async createSignedUrl(e,t,r){var n=this;try{let s=n._getFinalPath(e),o=await Tr(n.fetch,`${n.url}/object/sign/${s}`,oe({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return o={signedUrl:encodeURI(`${n.url}${o.signedURL}${a}`)},{data:o,error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(Le(s))return{data:null,error:s};throw s}}async createSignedUrls(e,t,r){var n=this;try{const s=await Tr(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(a=>oe(oe({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${o}`):null})),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(Le(s))return{data:null,error:s};throw s}}download(e,t){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",n=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),s=n?`?${n}`:"",o=this._getFinalPath(e),a=()=>Hl(this.fetch,`${this.url}/${r}/${o}${s}`,{headers:this.headers,noResolveJson:!0});return new DF(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);try{return{data:Up(await Hl(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Le(n))return{data:null,error:n};throw n}}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await OF(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Le(n)&&n instanceof Vp){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",a=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});a!==""&&n.push(a);let l=n.join("&");return l!==""&&(l=`?${l}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}${l}`)}}}async remove(e){var t=this;try{return{data:await xx(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async list(e,t,r){var n=this;try{const s=oe(oe(oe({},LF),t),{},{prefix:e||""});return{data:await Tr(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(Le(s))return{data:null,error:s};throw s}}async listV2(e,t){var r=this;try{const n=oe({},e);return{data:await Tr(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Le(n))return{data:null,error:n};throw n}}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const U2="2.89.0",B2={"X-Client-Info":`storage-js/${U2}`};var FF=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1;const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href.replace(/\/$/,""),this.headers=oe(oe({},B2),t),this.fetch=vx(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const r=t.listBucketOptionsToQueryString(e);return{data:await Hl(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await Hl(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async createBucket(e,t={public:!1}){var r=this;try{return{data:await Tr(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Le(n))return{data:null,error:n};throw n}}async updateBucket(e,t){var r=this;try{return{data:await Bp(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Le(n))return{data:null,error:n};throw n}}async emptyBucket(e){var t=this;try{return{data:await Tr(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await xx(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},zF=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=oe(oe({},B2),t),this.fetch=vx(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Tr(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async listBuckets(e){var t=this;try{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return{data:await Hl(t.fetch,s,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await xx(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Le(r))return{data:null,error:r};throw r}}from(e){var t=this;if(!_F(e))throw new Sh("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new SF({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,o){const a=s[o];return typeof a!="function"?a:async(...l)=>{try{return{data:await a.apply(s,l),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}}}})}};const yx={"X-Client-Info":`storage-js/${U2}`,"Content-Type":"application/json"};var q2=class extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function Jt(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}var Lm=class extends q2{constructor(e,t,r){super(e),this.name="StorageVectorsApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},VF=class extends q2{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const bx=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),UF=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Gb=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),BF=async(e,t,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const n=e.status||500,s=e;if(typeof s.json=="function")s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||n+"";t(new Lm(Gb(o),n,a))}).catch(()=>{const o=n+"";t(new Lm(s.statusText||`HTTP ${n} error`,n,o))});else{const o=n+"";t(new Lm(s.statusText||`HTTP ${n} error`,n,o))}}else t(new VF(Gb(e),e))},qF=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(UF(n)?(s.headers=oe({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,oe(oe({},s),r)):s};async function HF(e,t,r,n,s,o){return new Promise((a,l)=>{e(r,qF(t,n,s,o)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;const u=c.headers.get("content-type");return!u||!u.includes("application/json")?{}:c.json()}).then(c=>a(c)).catch(c=>BF(c,l,n))})}async function Yt(e,t,r,n,s){return HF(e,"POST",t,n,s,r)}var WF=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=oe(oe({},yx),t),this.fetch=bx(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await Yt(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Jt(r))return{data:null,error:r};throw r}}async getIndex(e,t){var r=this;try{return{data:await Yt(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Jt(n))return{data:null,error:n};throw n}}async listIndexes(e){var t=this;try{return{data:await Yt(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Jt(r))return{data:null,error:r};throw r}}async deleteIndex(e,t){var r=this;try{return{data:await Yt(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Jt(n))return{data:null,error:n};throw n}}},GF=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=oe(oe({},yx),t),this.fetch=bx(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(e){var t=this;try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await Yt(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Jt(r))return{data:null,error:r};throw r}}async getVectors(e){var t=this;try{return{data:await Yt(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Jt(r))return{data:null,error:r};throw r}}async listVectors(e){var t=this;try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:await Yt(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Jt(r))return{data:null,error:r};throw r}}async queryVectors(e){var t=this;try{return{data:await Yt(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Jt(r))return{data:null,error:r};throw r}}async deleteVectors(e){var t=this;try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await Yt(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Jt(r))return{data:null,error:r};throw r}}},KF=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=oe(oe({},yx),t),this.fetch=bx(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Yt(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Jt(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await Yt(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Jt(r))return{data:null,error:r};throw r}}async listBuckets(e={}){var t=this;try{return{data:await Yt(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Jt(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Yt(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Jt(r))return{data:null,error:r};throw r}}},JF=class extends KF{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new YF(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},YF=class extends WF{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,oe(oe({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,oe(oe({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new XF(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},XF=class extends GF{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,oe(oe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,oe(oe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,oe(oe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,oe(oe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,oe(oe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},QF=class extends FF{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new $F(this.url,this.headers,e,this.fetch)}get vectors(){return new JF(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new zF(this.url+"/iceberg",this.headers,this.fetch)}};const H2="2.89.0",io=30*1e3,qp=3,$m=qp*io,ZF="http://localhost:9999",e8="supabase.auth.token",t8={"X-Client-Info":`gotrue-js/${H2}`},Hp="X-Supabase-Api-Version",W2={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},r8=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,n8=10*60*1e3;class Wl extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function Z(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class s8 extends Wl{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function i8(e){return Z(e)&&e.name==="AuthApiError"}class ei extends Wl{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class zn extends Wl{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class Wt extends zn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function o8(e){return Z(e)&&e.name==="AuthSessionMissingError"}class Zi extends zn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class iu extends zn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class ou extends zn{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function a8(e){return Z(e)&&e.name==="AuthImplicitGrantRedirectError"}class Kb extends zn{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class l8 extends zn{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Wp extends zn{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Fm(e){return Z(e)&&e.name==="AuthRetryableFetchError"}class Jb extends zn{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Gp extends zn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const bd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Yb=`
\r=`.split(""),c8=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Yb.length;t+=1)e[Yb[t].charCodeAt(0)]=-2;for(let t=0;t<bd.length;t+=1)e[bd[t].charCodeAt(0)]=t;return e})();function Xb(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(bd[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(bd[n]),t.queuedBits-=6}}function G2(e,t,r){const n=c8[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Qb(e){const t=[],r=a=>{t.push(String.fromCodePoint(a))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=a=>{h8(a,n,r)};for(let a=0;a<e.length;a+=1)G2(e.charCodeAt(a),s,o);return t.join("")}function u8(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function d8(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}u8(n,t)}}function h8(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Do(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)G2(e.charCodeAt(s),r,n);return new Uint8Array(t)}function m8(e){const t=[];return d8(e,r=>t.push(r)),new Uint8Array(t)}function si(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Xb(s,r,n)),Xb(null,r,n),t.join("")}function f8(e){return Math.round(Date.now()/1e3)+e}function p8(){return Symbol("auth-callback")}const ht=()=>typeof window<"u"&&typeof document<"u",Ws={tested:!1,writable:!1},K2=()=>{if(!ht())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ws.tested)return Ws.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ws.tested=!0,Ws.writable=!0}catch{Ws.tested=!0,Ws.writable=!1}return Ws.writable};function g8(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,o)=>{t[o]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const J2=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),v8=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",oo=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Gs=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},dt=async(e,t)=>{await e.removeItem(t)};class Nh{constructor(){this.promise=new Nh.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Nh.promiseConstructor=Promise;function zm(e){const t=e.split(".");if(t.length!==3)throw new Gp("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!r8.test(t[n]))throw new Gp("JWT not in base64url format");return{header:JSON.parse(Qb(t[0])),payload:JSON.parse(Qb(t[1])),signature:Do(t[2]),raw:{header:t[0],payload:t[1]}}}async function x8(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function y8(e,t){return new Promise((n,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const a=await e(o);if(!t(o,null,a)){n(a);return}}catch(a){if(!t(o,a)){s(a);return}}})()})}function b8(e){return("0"+e.toString(16)).substr(-2)}function w8(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let o=0;o<56;o++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,b8).join("")}async function j8(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function C8(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await j8(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function eo(e,t,r=!1){const n=w8();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await oo(e,`${t}-code-verifier`,s);const o=await C8(n);return[o,n===o?"plain":"s256"]}const S8=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function N8(e){const t=e.headers.get(Hp);if(!t||!t.match(S8))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function R8(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function E8(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const _8=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function to(e){if(!_8.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Vm(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function k8(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const o=n.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function Zb(e){return JSON.parse(JSON.stringify(e))}const Xs=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),T8=[502,503,504];async function ew(e){var t;if(!v8(e))throw new Wp(Xs(e),0);if(T8.includes(e.status))throw new Wp(Xs(e),e.status);let r;try{r=await e.json()}catch(o){throw new ei(Xs(o),o)}let n;const s=N8(e);if(s&&s.getTime()>=W2["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Jb(Xs(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Wt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((o,a)=>o&&typeof a=="string",!0))throw new Jb(Xs(r),e.status,r.weak_password.reasons);throw new s8(Xs(r),e.status||500,n)}const P8=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function ie(e,t,r,n){var s;const o=Object.assign({},n==null?void 0:n.headers);o[Hp]||(o[Hp]=W2["2024-01-01"].name),n!=null&&n.jwt&&(o.Authorization=`Bearer ${n.jwt}`);const a=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(a.redirect_to=n.redirectTo);const l=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",c=await A8(e,t,r+l,{headers:o,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function A8(e,t,r,n,s,o){const a=P8(t,n,s,o);let l;try{l=await e(r,Object.assign({},a))}catch(c){throw console.error(c),new Wp(Xs(c),0)}if(l.ok||await ew(l),n!=null&&n.noResolveJson)return l;try{return await l.json()}catch(c){await ew(c)}}function Rr(e){var t;let r=null;I8(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=f8(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function tw(e){const t=Rr(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function is(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function M8(e){return{data:e,error:null}}function O8(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=e,a=Ra(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o},c=Object.assign({},a);return{data:{properties:l,user:c},error:null}}function rw(e){return e}function I8(e){return e.access_token&&e.refresh_token&&e.expires_in}const Um=["global","local","others"];class D8{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=J2(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,r=Um[0]){if(Um.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Um.join(", ")}`);try{return await ie(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Z(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await ie(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:is})}catch(n){if(Z(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Ra(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await ie(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:O8,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(Z(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await ie(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:is})}catch(r){if(Z(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,o,a,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ie(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:rw});if(d.error)throw d.error;const h=await d.json(),m=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,p=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(b=>{const g=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(b.split(";")[1].split("=")[1]);u[`${w}Page`]=g}),u.total=parseInt(m)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(Z(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){to(t);try{return await ie(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:is})}catch(r){if(Z(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){to(t);try{return await ie(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:is})}catch(n){if(Z(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){to(t);try{return await ie(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:is})}catch(n){if(Z(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){to(t.userId);try{const{data:r,error:n}=await ie(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _deleteFactor(t){to(t.userId),to(t.id);try{return{data:await ie(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,o,a,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ie(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:rw});if(d.error)throw d.error;const h=await d.json(),m=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,p=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(b=>{const g=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(b.split(";")[1].split("=")[1]);u[`${w}Page`]=g}),u.total=parseInt(m)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(Z(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await ie(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await ie(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await ie(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Z(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await ie(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await ie(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}}function nw(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const ro={debug:!!(globalThis&&K2()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Y2 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class L8 extends Y2{}async function $8(e,t,r){ro.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),ro.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){ro.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await r()}finally{ro.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw ro.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new L8(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(ro.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}function F8(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function X2(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function z8(e){return parseInt(e,16)}function V8(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function U8(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:o=new Date,nonce:a,notBefore:l,requestId:c,resources:u,scheme:d,uri:h,version:m}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(m!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${m}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=X2(e.address),b=d?`${d}://${n}`:n,g=e.statement?`${e.statement}
`:"",w=`${b} wants you to sign in with your Ethereum account:
${p}
${g}`;let x=`URI: ${h}
Version: ${m}
Chain ID: ${r}${a?`
Nonce: ${a}`:""}
Issued At: ${o.toISOString()}`;if(s&&(x+=`
Expiration Time: ${s.toISOString()}`),l&&(x+=`
Not Before: ${l.toISOString()}`),c&&(x+=`
Request ID: ${c}`),u){let y=`
Resources:`;for(const v of u){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);y+=`
- ${v}`}x+=y}return`${w}
${x}`}class Xe extends Error{constructor({message:t,code:r,cause:n,name:s}){var o;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(o=s??(n instanceof Error?n.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=r}}class wd extends Xe{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function B8({error:e,options:t}){var r,n,s;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Xe({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=o.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Xe({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=o.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Xe({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Xe({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Xe({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Xe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new Xe({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Xe({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(Q2(a)){if(o.rp.id!==a)return new Xe({message:`The RP ID "${o.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Xe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new Xe({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Xe({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Xe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function q8({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Xe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Xe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(Q2(n)){if(r.rpId!==n)return new Xe({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Xe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Xe({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Xe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class H8{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const W8=new H8;function G8(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=Ra(e,["challenge","user","excludeCredentials"]),o=Do(t).buffer,a=Object.assign(Object.assign({},r),{id:Do(r.id).buffer}),l=Object.assign(Object.assign({},s),{challenge:o,user:a});if(n&&n.length>0){l.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const u=n[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:Do(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function K8(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Ra(e,["challenge","allowCredentials"]),s=Do(t).buffer,o=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){o.allowCredentials=new Array(r.length);for(let a=0;a<r.length;a++){const l=r[a];o.allowCredentials[a]=Object.assign(Object.assign({},l),{id:Do(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return o}function J8(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:si(new Uint8Array(e.response.attestationObject)),clientDataJSON:si(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Y8(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:si(new Uint8Array(s.authenticatorData)),clientDataJSON:si(new Uint8Array(s.clientDataJSON)),signature:si(new Uint8Array(s.signature)),userHandle:s.userHandle?si(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Q2(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function sw(){var e,t;return!!(ht()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function X8(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new wd("Browser returned unexpected credential type",t)}:{data:null,error:new wd("Empty credential response",t)}}catch(t){return{data:null,error:B8({error:t,options:e})}}}async function Q8(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new wd("Browser returned unexpected credential type",t)}:{data:null,error:new wd("Empty credential response",t)}}catch(t){return{data:null,error:q8({error:t,options:e})}}}const Z8={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},ez={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function jd(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const o in s){const a=s[o];if(a!==void 0)if(Array.isArray(a))n[o]=a;else if(r(a))n[o]=a;else if(t(a)){const l=n[o];t(l)?n[o]=jd(l,a):n[o]=jd(a)}else n[o]=a}return n}function tz(e,t){return jd(Z8,e,t||{})}function rz(e,t){return jd(ez,e,t||{})}class nz{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},o){try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!a)return{data:null,error:l};const c=s??W8.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${n}`),u.displayName||(u.displayName=u.name)}switch(a.webauthn.type){case"create":{const u=tz(a.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:d,error:h}=await X8({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const u=rz(a.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:d,error:h}=await Q8(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(a){return Z(a)?{data:null,error:a}:{data:null,error:new ei("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new Wl("rpId is required for WebAuthn authentication")};try{if(!sw())return{data:null,error:new ei("Browser does not support WebAuthn",null)};const{data:a,error:l}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:o});if(!a)return{data:null,error:l};const{webauthn:c}=a;return this._verify({factorId:t,challengeId:a.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(a){return Z(a)?{data:null,error:a}:{data:null,error:new ei("Unexpected error in authenticate",a)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new Wl("rpId is required for WebAuthn registration")};try{if(!sw())return{data:null,error:new ei("Browser does not support WebAuthn",null)};const{data:a,error:l}=await this._enroll({friendlyName:t});if(!a)return await this.client.mfa.listFactors().then(d=>{var h;return(h=d.data)===null||h===void 0?void 0:h.all.find(m=>m.factor_type==="webauthn"&&m.friendly_name===t&&m.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:o});return c?this._verify({factorId:a.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(a){return Z(a)?{data:null,error:a}:{data:null,error:new ei("Unexpected error in register",a)}}}}F8();const sz={url:ZF,storageKey:e8,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:t8,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function iw(e,t,r){return await r()}const no={};class Gl{get jwks(){var t,r;return(r=(t=no[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){no[this.storageKey]=Object.assign(Object.assign({},no[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=no[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){no[this.storageKey]=Object.assign(Object.assign({},no[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},sz),t);if(this.storageKey=o.storageKey,this.instanceID=(r=Gl.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Gl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&ht()){const a=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new D8({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=J2(o.fetch),this.lock=o.lock||iw,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,o.lock?this.lock=o.lock:this.persistSession&&ht()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=$8:this.lock=iw,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new nz(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:K2()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=nw(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=nw(this.memoryStorage)),ht()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a),await this._notifyAllSubscribers(a.data.event,a.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${H2}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(ht()&&(r=g8(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),ht()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),a8(o)){const c=(t=o.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:o}}return await this._removeSession(),{error:o}}const{session:a,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",a,"redirect type",l),await this._saveSession(a),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return Z(r)?this._returnResult({error:r}):this._returnResult({error:new ei("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const o=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Rr}),{data:a,error:l}=o;if(l||!a)return this._returnResult({data:{user:null,session:null},error:l});const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(o){if(Z(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var r,n,s;try{let o;if("email"in t){const{email:d,password:h,options:m}=t;let p=null,b=null;this.flowType==="pkce"&&([p,b]=await eo(this.storage,this.storageKey)),o=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:m==null?void 0:m.emailRedirectTo,body:{email:d,password:h,data:(r=m==null?void 0:m.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken},code_challenge:p,code_challenge_method:b},xform:Rr})}else if("phone"in t){const{phone:d,password:h,options:m}=t;o=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(n=m==null?void 0:m.data)!==null&&n!==void 0?n:{},channel:(s=m==null?void 0:m.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken}},xform:Rr})}else throw new iu("You must provide either an email or phone number and a password");const{data:a,error:l}=o;if(l||!a)return await dt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(o){if(await dt(this.storage,`${this.storageKey}-code-verifier`),Z(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let r;if("email"in t){const{email:o,password:a,options:l}=t;r=await ie(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:tw})}else if("phone"in t){const{phone:o,password:a,options:l}=t;r=await ie(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:tw})}else throw new iu("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const o=new Zi;return this._returnResult({data:{user:null,session:null},error:o})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,o,a,l,c,u,d,h,m;let p,b;if("message"in t)p=t.message,b=t.signature;else{const{chain:g,wallet:w,statement:x,options:y}=t;let v;if(ht())if(typeof w=="object")v=w;else{const k=window;if("ethereum"in k&&typeof k.ethereum=="object"&&"request"in k.ethereum&&typeof k.ethereum.request=="function")v=k.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=w}const j=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href),C=await v.request({method:"eth_requestAccounts"}).then(k=>k).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!C||C.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=X2(C[0]);let N=(n=y==null?void 0:y.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!N){const k=await v.request({method:"eth_chainId"});N=z8(k)}const R={domain:j.host,address:S,statement:x,uri:j.href,version:"1",chainId:N,nonce:(s=y==null?void 0:y.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(a=(o=y==null?void 0:y.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(l=y==null?void 0:y.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=y==null?void 0:y.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=y==null?void 0:y.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=y==null?void 0:y.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=U8(R),b=await v.request({method:"personal_sign",params:[V8(p),S]})}try{const{data:g,error:w}=await ie(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:b},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(m=t.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:Rr});if(w)throw w;if(!g||!g.session||!g.user){const x=new Zi;return this._returnResult({data:{user:null,session:null},error:x})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:w})}catch(g){if(Z(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var r,n,s,o,a,l,c,u,d,h,m,p;let b,g;if("message"in t)b=t.message,g=t.signature;else{const{chain:w,wallet:x,statement:y,options:v}=t;let j;if(ht())if(typeof x=="object")j=x;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))j=S.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=x}const C=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in j&&j.signIn){const S=await j.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:C.host,uri:C.href}),y?{statement:y}:null));let N;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")N=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)N=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in N&&"signature"in N&&(typeof N.signedMessage=="string"||N.signedMessage instanceof Uint8Array)&&N.signature instanceof Uint8Array)b=typeof N.signedMessage=="string"?N.signedMessage:new TextDecoder().decode(N.signedMessage),g=N.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");b=[`${C.host} wants you to sign in with your Solana account:`,j.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${C.href}`,`Issued At: ${(s=(n=v==null?void 0:v.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((a=v==null?void 0:v.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((c=v==null?void 0:v.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((u=v==null?void 0:v.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((h=(d=v==null?void 0:v.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...v.signInWithSolana.resources.map(N=>`- ${N}`)]:[]].join(`
`);const S=await j.signMessage(new TextEncoder().encode(b),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=S}}try{const{data:w,error:x}=await ie(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:b,signature:si(g)},!((m=t.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Rr});if(x)throw x;if(!w||!w.session||!w.user){const y=new Zi;return this._returnResult({data:{user:null,session:null},error:y})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:x})}catch(w){if(Z(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const r=await Gs(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new l8;const{data:o,error:a}=await ie(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Rr});if(await dt(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!o||!o.session||!o.user){const l=new Zi;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:a})}catch(o){if(await dt(this.storage,`${this.storageKey}-code-verifier`),Z(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:o,nonce:a}=t,l=await ie(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:o,nonce:a,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Rr}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new Zi;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(r){if(Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,o,a;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await eo(this.storage,this.storageKey));const{error:h}=await ie(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await ie(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(o=c==null?void 0:c.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(a=c==null?void 0:c.channel)!==null&&a!==void 0?a:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new iu("You must provide either an email or phone number.")}catch(l){if(await dt(this.storage,`${this.storageKey}-code-verifier`),Z(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var r,n;try{let s,o;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,o=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:a,error:l}=await ie(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:Rr});if(l)throw l;if(!a)throw new Error("An error occurred on token verification.");const c=a.session,u=a.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,o,a;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await eo(this.storage,this.storageKey));const u=await ie(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:M8});return!((o=u.data)===null||o===void 0)&&o.url&&ht()&&!(!((a=t.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(l){if(await dt(this.storage,`${this.storageKey}-code-verifier`),Z(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Wt;const{error:s}=await ie(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(Z(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:o}=t,{error:a}=await ie(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}else if("phone"in t){const{phone:n,type:s,options:o}=t,{data:a,error:l}=await ie(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:l})}throw new iu("You must provide either an email or phone number and a type")}catch(r){if(Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Gs(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<$m:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const a=await Gs(this.userStorage,this.storageKey+"-user");a!=null&&a.user?t.user=a.user:t.user=Vm()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};t.user=k8(t.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(-1,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await ie(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:is}):await this._useSession(async r=>{var n,s,o;const{data:a,error:l}=r;if(l)throw l;return!(!((n=a.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Wt}:await ie(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:is})})}catch(r){if(Z(r))return o8(r)&&(await this._removeSession(),await dt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:o}=n;if(o)throw o;if(!s.session)throw new Wt;const a=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await eo(this.storage,this.storageKey));const{data:u,error:d}=await ie(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:a.access_token,xform:is});if(d)throw d;return a.user=u.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(n){if(await dt(this.storage,`${this.storageKey}-code-verifier`),Z(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Wt;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:a}=zm(t.access_token);if(a.exp&&(n=a.exp,s=n<=r),s){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};o=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)throw c;o={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(r){if(Z(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:a,error:l}=r;if(l)throw l;t=(n=a.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Wt;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(Z(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!ht())throw new ou("No browser detected.");if(t.error||t.error_description||t.error_code)throw new ou(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Kb("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ou("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Kb("No code detected.");const{data:y,error:v}=await this._exchangeCodeForSession(t.code);if(v)throw v;const j=new URL(window.location.href);return j.searchParams.delete("code"),window.history.replaceState(window.history.state,"",j.toString()),{data:{session:y.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:u}=t;if(!o||!l||!a||!u)throw new ou("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(l);let m=d+h;c&&(m=parseInt(c));const p=m-d;p*1e3<=io&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${h}s`);const b=m-h;d-b>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",b,m,d):d-b<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",b,m,d);const{data:g,error:w}=await this._getUser(o);if(w)throw w;const x={provider_token:n,provider_refresh_token:s,access_token:o,expires_in:h,expires_at:m,refresh_token:a,token_type:u,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:x,redirectType:t.type},error:null})}catch(n){if(Z(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await Gs(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({error:o});const a=(n=s.session)===null||n===void 0?void 0:n.access_token;if(a){const{error:l}=await this.admin.signOut(a,t);if(l&&!(i8(l)&&(l.status===404||l.status===401||l.status===403)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await dt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=p8(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:o},error:a}=r;if(a)throw a;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await eo(this.storage,this.storageKey,!0));try{return await ie(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(await dt(this.storage,`${this.storageKey}-code-verifier`),Z(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async o=>{var a,l,c,u,d;const{data:h,error:m}=o;if(m)throw m;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await ie(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return ht()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(Z(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:o}}=r;if(s)throw s;const{options:a,provider:l,token:c,access_token:u,nonce:d}=t,h=await ie(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=o==null?void 0:o.access_token)!==null&&n!==void 0?n:void 0,body:{provider:l,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Rr}),{data:m,error:p}=h;return p?this._returnResult({data:{user:null,session:null},error:p}):!m||!m.session||!m.user?this._returnResult({data:{user:null,session:null},error:new Zi}):(m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("USER_UPDATED",m.session)),this._returnResult({data:m,error:p}))}catch(s){if(await dt(this.storage,`${this.storageKey}-code-verifier`),Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:a}=r;if(a)throw a;return await ie(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await y8(async s=>(s>0&&await x8(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await ie(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Rr})),(s,o)=>{const a=200*Math.pow(2,s);return o&&Fm(o)&&Date.now()+a-n<io})}catch(n){if(this._debug(r,"error",n),Z(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),ht()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Gs(this.storage,this.storageKey);if(s&&this.userStorage){let a=await Gs(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:s.user},await oo(this.userStorage,this.storageKey+"-user",a)),s.user=(t=a==null?void 0:a.user)!==null&&t!==void 0?t:Vm()}else if(s&&!s.user&&!s.user){const a=await Gs(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(s.user=a.user,await dt(this.storage,this.storageKey+"-user"),await oo(this.storage,this.storageKey,s)):s.user=Vm()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const o=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<$m;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${$m}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:a}=await this._callRefreshToken(s.refresh_token);a&&(console.error(a),Fm(a)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:l}=await this._getUser(s.access_token);!l&&(a!=null&&a.user)?(s.user=a.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(n,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Wt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Nh;const{data:o,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!o.session)throw new Wt;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const l={data:o.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(o){if(this._debug(s,"error",o),Z(o)){const a={data:null,error:o};return Fm(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(a),a}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const o=[],a=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,r)}catch(c){o.push(c)}});if(await Promise.all(a),o.length>0){for(let l=0;l<o.length;l+=1)console.error(o[l]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await dt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await oo(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=Zb(s);await oo(this.storage,this.storageKey,o)}else{const s=Zb(r);await oo(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await dt(this.storage,this.storageKey),await dt(this.storage,this.storageKey+"-code-verifier"),await dt(this.storage,this.storageKey+"-user"),this.userStorage&&await dt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&ht()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),io);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/io);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${io}ms, refresh threshold is ${qp} ticks`),s<=qp&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof Y2)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!ht()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[o,a]=await eo(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(l.toString())}if(n!=null&&n.queryParams){const o=new URLSearchParams(n.queryParams);s.push(o.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;return o?this._returnResult({data:null,error:o}):await ie(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:a}=r;if(a)return this._returnResult({data:null,error:a});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await ie(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(n=o==null?void 0:o.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?J8(t.webauthn.credential_response):Y8(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await ie(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=await ie(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(a.error)return a;const{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:G8(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:K8(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var t,r;const{data:{session:n},error:s}=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=zm(n.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const u=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:u},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await ie(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Wt})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new Wt});const a=await ie(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return a.data&&a.data.redirect_url&&ht()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new Wt});const a=await ie(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return a.data&&a.data.redirect_url&&ht()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await ie(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Wt})})}catch(t){if(Z(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await ie(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Wt})})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(l=>l.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(l=>l.kid===t),n&&this.jwks_cached_at+n8>s)return n;const{data:o,error:a}=await ie(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,n=o.keys.find(l=>l.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:p,error:b}=await this.getSession();if(b||!p.session)return this._returnResult({data:null,error:b});n=p.session.access_token}const{header:s,payload:o,signature:a,raw:{header:l,payload:c}}=zm(n);r!=null&&r.allowExpired||R8(o.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:p}=await this.getUser(n);if(p)throw p;return{data:{claims:o,header:s,signature:a},error:null}}const d=E8(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,a,m8(`${l}.${c}`)))throw new Gp("Invalid JWT signature");return{data:{claims:o,header:s,signature:a},error:null}}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}}Gl.nextInstanceID={};const iz=Gl,oz="2.89.0";let Xa="";typeof Deno<"u"?Xa="deno":typeof document<"u"?Xa="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Xa="react-native":Xa="node";const az={"X-Client-Info":`supabase-js-${Xa}/${oz}`},lz={headers:az},cz={schema:"public"},uz={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},dz={};function Kl(e){"@babel/helpers - typeof";return Kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kl(e)}function hz(e,t){if(Kl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mz(e){var t=hz(e,"string");return Kl(t)=="symbol"?t:t+""}function fz(e,t,r){return(t=mz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ow(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ow(Object(r),!0).forEach(function(n){fz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ow(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const pz=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),gz=()=>Headers,vz=(e,t,r)=>{const n=pz(r),s=gz();return async(o,a)=>{var l;const c=(l=await t())!==null&&l!==void 0?l:e;let u=new s(a==null?void 0:a.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),n(o,qe(qe({},a),{},{headers:u}))}};function xz(e){return e.endsWith("/")?e:e+"/"}function yz(e,t){var r,n;const{db:s,auth:o,realtime:a,global:l}=e,{db:c,auth:u,realtime:d,global:h}=t,m={db:qe(qe({},c),s),auth:qe(qe({},u),o),realtime:qe(qe({},d),a),storage:{},global:qe(qe(qe({},h),l),{},{headers:qe(qe({},(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{}),(n=l==null?void 0:l.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?m.accessToken=e.accessToken:delete m.accessToken,m}function bz(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(xz(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var wz=class extends iz{constructor(e){super(e)}},jz=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const o=bz(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const a=`sb-${o.hostname.split(".")[0]}-auth-token`,l={db:cz,realtime:dz,auth:qe(qe({},uz),{},{storageKey:a}),global:lz},c=yz(r??{},l);if(this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=vz(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(qe({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&this.accessToken().then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new tF(new URL("rest/v1",o).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new QF(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new Y$(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:o,flowType:a,lock:l,debug:c,throwOnError:u},d,h){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new wz({url:this.authUrl.href,headers:qe(qe({},m),d),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:a,lock:l,debug:c,throwOnError:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new xF(this.realtimeUrl.href,qe(qe({},e),{},{params:qe(qe({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Cz=(e,t,r)=>new jz(e,t,r);function Sz(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}Sz()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const Nz="https://xijyfkgwbabbivysrlkr.supabase.co",Rz="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inhpanlma2d3YmFiYml2eXNybGtyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjY5NDUzNjIsImV4cCI6MjA4MjUyMTM2Mn0.iI0dQKsag_yxHOFr3BGOgX9-IXTGZXT8WUp8hYG6F0Y",ee=Cz(Nz,Rz,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),_t=f.forwardRef(({className:e,type:t,...r},n)=>i.jsx("input",{type:t,className:te("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));_t.displayName="Input";const ii=f.forwardRef(({className:e,...t},r)=>i.jsx("textarea",{className:te("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));ii.displayName="Textarea";var Ez="Label",Z2=f.forwardRef((e,t)=>i.jsx(re.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Z2.displayName=Ez;var eE=Z2;const _z=eh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),nt=f.forwardRef(({className:e,...t},r)=>i.jsx(eE,{ref:r,className:te(_z(),e),...t}));nt.displayName=eE.displayName;const aw="+33756819438",kz=encodeURIComponent("Bonjour, je souhaite en savoir plus sur vos CRM sur mesure."),Tz=()=>{const{toast:e}=dn(),[t,r]=f.useState(!1),[n,s]=f.useState({firstName:"",lastName:"",email:"",phone:"",message:""}),o=async a=>{if(a.preventDefault(),!n.firstName||!n.lastName||!n.email){e({title:"Champs requis",description:"Veuillez remplir tous les champs obligatoires.",variant:"destructive"});return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.email)){e({title:"Email invalide",description:"Veuillez entrer une adresse email valide.",variant:"destructive"});return}r(!0);try{const{error:c}=await ee.from("contact_requests").insert({first_name:n.firstName,last_name:n.lastName,email:n.email,phone:n.phone||null,company:"",message:n.message||null});if(c)throw c;e({title:"Demande envoyée !",description:"Un chef de projet vous contactera sous 24h."}),s({firstName:"",lastName:"",email:"",phone:"",message:""})}catch{e({title:"Erreur",description:"Une erreur est survenue. Veuillez réessayer.",variant:"destructive"})}finally{r(!1)}};return i.jsxs("section",{id:"contact-form",className:"relative py-24 lg:py-32 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background via-secondary/20 to-background"}),i.jsx("div",{className:"container relative mx-auto px-4 sm:px-6 lg:px-8",children:i.jsx("div",{className:"max-w-6xl mx-auto",children:i.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16",children:[i.jsxs("div",{className:"lg:sticky lg:top-24 lg:self-start",children:[i.jsxs("h2",{className:"font-display font-bold text-3xl sm:text-4xl lg:text-5xl mb-6",children:["Parlez-nous de"," ",i.jsx("span",{className:"text-gradient",children:"votre projet"})]}),i.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:"Remplissez ce formulaire pour nous aider à comprendre vos besoins. Un chef de projet vous recontactera sous 24h pour un premier échange gratuit."}),i.jsxs("div",{className:"space-y-4 mb-8",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0 mt-0.5",children:i.jsx("span",{className:"text-primary font-bold text-sm",children:"1"})}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-semibold mb-1",children:"Analyse gratuite"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Nous étudions votre demande et préparons des recommandations personnalisées."})]})]}),i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0 mt-0.5",children:i.jsx("span",{className:"text-primary font-bold text-sm",children:"2"})}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-semibold mb-1",children:"Appel découverte"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"30 minutes pour comprendre vos processus et définir la meilleure solution."})]})]}),i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0 mt-0.5",children:i.jsx("span",{className:"text-primary font-bold text-sm",children:"3"})}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-semibold mb-1",children:"Devis détaillé"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Recevez une proposition claire avec planning et tarif fixe."})]})]})]}),i.jsxs("div",{className:"p-6 glass rounded-2xl",children:[i.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Préférez-vous nous contacter directement ?"}),i.jsxs("div",{className:"flex flex-wrap gap-3",children:[i.jsxs("a",{href:`tel:${aw}`,className:"inline-flex items-center gap-2 px-4 py-2 rounded-full glass glass-hover text-sm font-medium transition-all hover:border-primary/50",children:[i.jsx(In,{className:"w-4 h-4 text-primary"}),"+33 7 56 81 94 38"]}),i.jsxs("a",{href:`https://wa.me/${aw.replace("+","")}?text=${kz}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-[#25D366]/20 border border-[#25D366]/30 text-sm font-medium transition-all hover:bg-[#25D366]/30 hover:border-[#25D366]/50",children:[i.jsx(mc,{className:"w-4 h-4 text-[#25D366]"}),"WhatsApp"]})]})]})]}),i.jsx("div",{className:"glass rounded-2xl p-6 sm:p-8",children:i.jsxs("form",{onSubmit:o,className:"space-y-6",children:[i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsxs(nt,{htmlFor:"firstName",className:"flex items-center gap-2",children:[i.jsx(kv,{className:"w-4 h-4 text-muted-foreground"}),"Prénom *"]}),i.jsx(_t,{id:"firstName",value:n.firstName,onChange:a=>s({...n,firstName:a.target.value}),placeholder:"Jean",required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(nt,{htmlFor:"lastName",children:"Nom *"}),i.jsx(_t,{id:"lastName",value:n.lastName,onChange:a=>s({...n,lastName:a.target.value}),placeholder:"Dupont",required:!0})]})]}),i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsxs(nt,{htmlFor:"email",className:"flex items-center gap-2",children:[i.jsx(Il,{className:"w-4 h-4 text-muted-foreground"}),"Email professionnel *"]}),i.jsx(_t,{id:"email",type:"email",value:n.email,onChange:a=>s({...n,email:a.target.value}),placeholder:"jean@entreprise.com",required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs(nt,{htmlFor:"phone",className:"flex items-center gap-2",children:[i.jsx(In,{className:"w-4 h-4 text-muted-foreground"}),"Téléphone"]}),i.jsx(_t,{id:"phone",type:"tel",value:n.phone,onChange:a=>s({...n,phone:a.target.value}),placeholder:"+33 6 00 00 00 00"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(nt,{htmlFor:"message",children:"Décrivez votre projet"}),i.jsx(ii,{id:"message",value:n.message,onChange:a=>s({...n,message:a.target.value}),placeholder:"Décrivez vos besoins, vos processus actuels, les outils que vous utilisez, les problèmes que vous rencontrez...",rows:4})]}),i.jsx(F,{type:"submit",variant:"hero",size:"xl",className:"w-full",disabled:t,children:t?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-primary-foreground"}),"Envoi en cours..."]}):i.jsxs(i.Fragment,{children:[i.jsx(_v,{className:"w-5 h-5"}),"Envoyer ma demande"]})}),i.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"En soumettant ce formulaire, vous acceptez d'être contacté par notre équipe. Vos données sont confidentielles et ne seront jamais partagées."})]})})]})})})]})},lw="+33756819438",Pz=encodeURIComponent("Bonjour, je souhaite en savoir plus sur vos CRM sur mesure."),Az=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs("section",{id:"contact",className:"relative py-24 lg:py-32 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/10 via-transparent to-accent/10"}),i.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-primary/10 rounded-full blur-[150px]"}),i.jsx("div",{className:"container relative mx-auto px-4 sm:px-6 lg:px-8",children:i.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[i.jsxs("h2",{className:"font-display font-bold text-3xl sm:text-4xl lg:text-6xl mb-6",children:["Prêt à avoir un CRM"," ",i.jsx("span",{className:"text-gradient",children:"qui vous ressemble"})," ?"]}),i.jsxs("p",{className:"text-lg sm:text-xl text-muted-foreground max-w-2xl mx-auto mb-10",children:["Réservez un appel découverte gratuit de 30 minutes. On analyse vos besoins ensemble, sans engagement."," ",i.jsx(G,{to:"/qui-sommes-nous",className:"text-primary hover:underline",children:"En savoir plus sur notre équipe"}),"."]}),i.jsxs("div",{className:"flex flex-col items-center gap-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[i.jsxs(F,{variant:"hero",size:"xl",onClick:()=>t(!0),children:[i.jsx(xr,{className:"w-5 h-5"}),"Démarrer mon projet"]}),i.jsxs(F,{variant:"glass",size:"xl",children:["Voir nos réalisations",i.jsx(ve,{className:"w-5 h-5"})]})]}),i.jsxs("div",{className:"flex flex-col items-center gap-3",children:[i.jsx("span",{className:"text-sm text-muted-foreground",children:"Parler directement à un chef de projet"}),i.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[i.jsxs("a",{href:`tel:${lw}`,className:"inline-flex items-center gap-2 px-5 py-3 rounded-full glass glass-hover text-sm font-medium transition-all hover:border-primary/50",children:[i.jsx(In,{className:"w-4 h-4 text-primary"}),"+33 7 56 81 94 38"]}),i.jsxs("a",{href:`https://wa.me/${lw.replace("+","")}?text=${Pz}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-3 rounded-full bg-[#25D366]/20 border border-[#25D366]/30 text-sm font-medium transition-all hover:bg-[#25D366]/30 hover:border-[#25D366]/50",children:[i.jsx(mc,{className:"w-4 h-4 text-[#25D366]"}),"WhatsApp"]})]})]})]}),i.jsxs("div",{className:"mt-12 inline-flex items-center gap-3 px-6 py-3 rounded-full glass",children:[i.jsxs("div",{className:"flex -space-x-2",children:[i.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/30 border-2 border-background flex items-center justify-center text-xs font-medium",children:"JD"}),i.jsx("div",{className:"w-8 h-8 rounded-full bg-accent/30 border-2 border-background flex items-center justify-center text-xs font-medium",children:"ML"}),i.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/30 border-2 border-background flex items-center justify-center text-xs font-medium",children:"SC"})]}),i.jsx("span",{className:"text-sm text-muted-foreground",children:"Réponse sous 24h garantie"})]})]})})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},Je=()=>i.jsx("footer",{className:"relative py-16 border-t border-border/30",children:i.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"grid md:grid-cols-4 gap-12 lg:gap-16 mb-12",children:[i.jsxs("div",{className:"md:col-span-2",children:[i.jsxs("a",{href:"#",className:"flex items-center gap-2 mb-4",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-primary to-accent flex items-center justify-center",children:i.jsx("span",{className:"text-primary-foreground font-bold text-lg",children:"C"})}),i.jsxs("span",{className:"font-display font-bold text-xl text-foreground",children:["CRM",i.jsx("span",{className:"text-primary",children:"SurMesure"})]})]}),i.jsx("p",{className:"text-muted-foreground mb-6 max-w-md",children:"Des CRM sur mesure, propulsés par l'IA. Vous possédez votre code, maîtrisez vos coûts et gardez le contrôle."}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("a",{href:"#",className:"w-10 h-10 rounded-lg glass glass-hover flex items-center justify-center text-muted-foreground hover:text-primary transition-colors",children:i.jsx(lI,{className:"w-5 h-5"})}),i.jsx("a",{href:"mailto:contact@crmsurmesure.com",className:"w-10 h-10 rounded-lg glass glass-hover flex items-center justify-center text-muted-foreground hover:text-primary transition-colors",children:i.jsx(Il,{className:"w-5 h-5"})}),i.jsx("a",{href:"tel:+33756819438",className:"w-10 h-10 rounded-lg glass glass-hover flex items-center justify-center text-muted-foreground hover:text-primary transition-colors",children:i.jsx(In,{className:"w-5 h-5"})}),i.jsx("a",{href:"https://wa.me/33756819438",target:"_blank",rel:"noopener noreferrer",className:"w-10 h-10 rounded-lg glass glass-hover flex items-center justify-center text-muted-foreground hover:text-primary transition-colors",children:i.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-display font-semibold text-foreground mb-4",children:"Navigation"}),i.jsxs("ul",{className:"space-y-3",children:[i.jsx("li",{children:i.jsx("a",{href:"#avantages",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Avantages"})}),i.jsx("li",{children:i.jsx(G,{to:"/comment-ca-marche",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Comment ça marche"})}),i.jsx("li",{children:i.jsx("a",{href:"#tarifs",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Tarifs"})}),i.jsx("li",{children:i.jsx("a",{href:"#contact",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Contact"})}),i.jsx("li",{children:i.jsx(G,{to:"/qui-sommes-nous",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Qui Sommes-Nous"})})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-display font-semibold text-foreground mb-4",children:"Contact"}),i.jsxs("ul",{className:"space-y-3 text-muted-foreground",children:[i.jsx("li",{children:"contact@crmsurmesure.com"}),i.jsx("li",{children:"+33 7 56 81 94 38"}),i.jsx("li",{children:"Paris, France"})]})]})]}),i.jsxs("div",{className:"pt-8 border-t border-border/30 flex flex-col md:flex-row items-center justify-between gap-4",children:[i.jsxs("p",{className:"text-sm text-muted-foreground",children:["© ",new Date().getFullYear()," CRMSurMesure. Tous droits réservés."]}),i.jsxs("div",{className:"flex items-center gap-6 text-sm text-muted-foreground",children:[i.jsx(G,{to:"/mentions-legales",className:"hover:text-foreground transition-colors",children:"Mentions légales"}),i.jsx(G,{to:"/politique-confidentialite",className:"hover:text-foreground transition-colors",children:"Politique de confidentialité"})]})]})]})}),Mz=()=>{const[e,t]=f.useState(!1),[r,n]=f.useState(!1),[s,o]=f.useState(!1);return f.useEffect(()=>{const a=()=>{window.scrollY>400&&!r?t(!0):window.scrollY<=400&&t(!1)};return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)},[r]),!e||r?null:i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-50 animate-slide-up",children:i.jsx("div",{className:"glass border-t border-border/30 backdrop-blur-xl",children:i.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:i.jsxs("div",{className:"flex items-center justify-between py-3 sm:py-4 gap-4",children:[i.jsx("div",{className:"hidden sm:block",children:i.jsx("p",{className:"text-sm font-medium text-foreground",children:"Prêt à créer votre CRM sur mesure ?"})}),i.jsx("p",{className:"sm:hidden text-sm font-medium text-foreground",children:"Créez votre CRM"}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs(F,{variant:"hero",size:"sm",onClick:()=>o(!0),className:"whitespace-nowrap",children:[i.jsx("span",{className:"hidden sm:inline",children:"Démarrer mon projet"}),i.jsx("span",{className:"sm:hidden",children:"Démarrer"}),i.jsx(ve,{className:"w-4 h-4"})]}),i.jsx("button",{onClick:()=>n(!0),className:"p-2 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Fermer",children:i.jsx(oa,{className:"w-4 h-4"})})]})]})})})}),i.jsx(ut,{open:s,onOpenChange:o})]})},Oz={"@context":"https://schema.org","@type":"Organization",name:"CRM sur Mesure",alternateName:"CRMSurMesure",url:"https://crmsurmesure.com",logo:"https://crmsurmesure.com/og-image.png",description:"Agence spécialisée dans la création de CRM sur mesure assistés par IA. Solutions personnalisées pour PME et entreprises.",email:"contact@crmsurmesure.com",telephone:"+33756819438",sameAs:[],contactPoint:{"@type":"ContactPoint",telephone:"+33756819438",contactType:"sales",availableLanguage:["French","English"]},offers:{"@type":"Offer",description:"CRM sur mesure avec développeur dédié",priceSpecification:{"@type":"PriceSpecification",price:"3000",priceCurrency:"EUR",minPrice:"3000"}}},Iz=()=>i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM sur Mesure | Solutions CRM Personnalisées pour PME"}),i.jsx("meta",{name:"description",content:"Créez votre CRM sur mesure assisté par IA. Solutions 100% personnalisables dès 3000€ avec développeur dédié. Propriété totale du code."}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com"}),i.jsx("meta",{property:"og:title",content:"CRM sur Mesure | Solutions CRM Personnalisées pour PME"}),i.jsx("meta",{property:"og:description",content:"Créez votre CRM sur mesure assisté par IA. Solutions 100% personnalisables dès 3000€ avec développeur dédié."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-image.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(Oz)})]}),i.jsx(Ke,{}),i.jsx(F$,{}),i.jsx(V$,{}),i.jsx(B$,{}),i.jsx(q$,{}),i.jsx(H$,{}),i.jsx(G$,{}),i.jsx(Tz,{}),i.jsx(Az,{}),i.jsx(Je,{}),i.jsx(Mz,{})]});function Dz(){return pc({queryKey:["blog-articles","published"],queryFn:async()=>{const{data:e,error:t}=await ee.from("blog_articles").select("*").eq("published",!0).order("created_at",{ascending:!1});if(t)throw t;return e}})}function Lz(e){return pc({queryKey:["blog-article",e],queryFn:async()=>{const{data:t,error:r}=await ee.from("blog_articles").select("*").eq("slug",e).eq("published",!0).single();if(r)throw r;const[n,s]=await Promise.all([ee.from("blog_sections").select("*").eq("article_id",t.id).order("position",{ascending:!0}),ee.from("blog_faqs").select("*").eq("article_id",t.id).order("position",{ascending:!0})]);if(n.error)throw n.error;if(s.error)throw s.error;return{...t,sections:n.data,faqs:s.data}},enabled:!!e})}function $z(e,t){return pc({queryKey:["blog-articles","related",e,t],queryFn:async()=>{if(!e||!t)return[];const{data:r,error:n}=await ee.from("blog_articles").select("*").eq("published",!0).eq("category",e).neq("id",t).order("created_at",{ascending:!1}).limit(3);if(n)throw n;return r},enabled:!!e&&!!t})}function Fz(){return pc({queryKey:["blog-articles","all"],queryFn:async()=>{const{data:e,error:t}=await ee.from("blog_articles").select("*").order("created_at",{ascending:!1});if(t)throw t;return e}})}function zz(e){return pc({queryKey:["blog-article-admin",e],queryFn:async()=>{const{data:t,error:r}=await ee.from("blog_articles").select("*").eq("id",e).single();if(r)throw r;const[n,s]=await Promise.all([ee.from("blog_sections").select("*").eq("article_id",e).order("position",{ascending:!0}),ee.from("blog_faqs").select("*").eq("article_id",e).order("position",{ascending:!0})]);if(n.error)throw n.error;if(s.error)throw s.error;return{...t,sections:n.data,faqs:s.data}},enabled:!!e})}function Vz(){const e=zi();return gc({mutationFn:async t=>{const{data:r,error:n}=await ee.from("blog_articles").insert(t).select().single();if(n)throw n;return r},onSuccess:()=>{e.invalidateQueries({queryKey:["blog-articles"]})}})}function tE(){const e=zi();return gc({mutationFn:async({id:t,...r})=>{const{data:n,error:s}=await ee.from("blog_articles").update(r).eq("id",t).select().single();if(s)throw s;return n},onSuccess:(t,r)=>{e.invalidateQueries({queryKey:["blog-articles"]}),e.invalidateQueries({queryKey:["blog-article-admin",r.id]})}})}function Uz(){const e=zi();return gc({mutationFn:async t=>{const{error:r}=await ee.from("blog_articles").delete().eq("id",t);if(r)throw r},onSuccess:()=>{e.invalidateQueries({queryKey:["blog-articles"]})}})}function Bz(){const e=zi();return gc({mutationFn:async({articleId:t,sections:r})=>{if(await ee.from("blog_sections").delete().eq("article_id",t),r.length>0){const{error:n}=await ee.from("blog_sections").insert(r);if(n)throw n}},onSuccess:(t,r)=>{e.invalidateQueries({queryKey:["blog-article-admin",r.articleId]})}})}function qz(){const e=zi();return gc({mutationFn:async({articleId:t,faqs:r})=>{if(await ee.from("blog_faqs").delete().eq("article_id",t),r.length>0){const{error:n}=await ee.from("blog_faqs").insert(r);if(n)throw n}},onSuccess:(t,r)=>{e.invalidateQueries({queryKey:["blog-article-admin",r.articleId]})}})}const au=[{id:"all",label:"Tous",icon:U0},{id:"general",label:"Général",icon:U0},{id:"assurance",label:"Assurance",icon:xa},{id:"immobilier",label:"Immobilier",icon:_i},{id:"courtage",label:"Courtage",icon:Fi},{id:"comptable",label:"Comptabilité",icon:sa},{id:"recrutement",label:"Recrutement",icon:vt},{id:"automobile",label:"Automobile",icon:th},{id:"avocat",label:"Avocat",icon:oh},{id:"sante",label:"Santé",icon:sh},{id:"marketing",label:"Marketing",icon:ih},{id:"restauration",label:"Restauration",icon:ah}],Hz=e=>{const r=e.trim().split(/\s+/).length*10,n=Math.ceil(r/200);return Math.max(2,Math.min(n,8))},Wz=()=>{var o;const{data:e,isLoading:t}=Dz(),[r,n]=f.useState("all"),s=e==null?void 0:e.filter(a=>r==="all"?!0:a.category===r);return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"Blog CRM sur Mesure | Conseils et Actualités"}),i.jsx("meta",{name:"description",content:"Découvrez nos articles sur les CRM, l'automatisation et les meilleures pratiques pour optimiser votre entreprise."}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/blog"}),i.jsx("meta",{property:"og:title",content:"Blog CRM sur Mesure | Conseils et Actualités"}),i.jsx("meta",{property:"og:description",content:"Découvrez nos articles sur les CRM, l'automatisation et les meilleures pratiques pour optimiser votre entreprise."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-image.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"Blog CRM sur Mesure | Conseils et Actualités"}),i.jsx("meta",{name:"twitter:description",content:"Découvrez nos articles sur les CRM, l'automatisation et les meilleures pratiques pour optimiser votre entreprise."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-image.png"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/blog"})]}),i.jsx(Ke,{}),i.jsx("main",{className:"pt-24 pb-16",children:i.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"text-center mb-12",children:[i.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Notre ",i.jsx("span",{className:"text-gradient",children:"Blog"})]}),i.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Découvrez nos articles sur les CRM, l'automatisation et les meilleures pratiques pour optimiser votre entreprise."})]}),i.jsx("div",{className:"mb-12",children:i.jsx("div",{className:"flex flex-wrap gap-2 justify-center",children:au.map(a=>{const l=a.icon;return i.jsxs("button",{onClick:()=>n(a.id),className:te("flex items-center gap-2 px-4 py-2 rounded-full text-sm font-medium transition-all duration-200",r===a.id?"bg-primary text-primary-foreground shadow-lg shadow-primary/25":"glass hover:bg-primary/10 text-muted-foreground hover:text-foreground"),children:[i.jsx(l,{className:"w-4 h-4"}),a.label]},a.id)})})}),t?i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[1,2,3].map(a=>i.jsxs("div",{className:"glass rounded-2xl overflow-hidden animate-pulse",children:[i.jsx("div",{className:"h-48 bg-muted"}),i.jsxs("div",{className:"p-6",children:[i.jsx("div",{className:"h-4 bg-muted rounded w-1/3 mb-4"}),i.jsx("div",{className:"h-6 bg-muted rounded w-full mb-3"}),i.jsx("div",{className:"h-4 bg-muted rounded w-full mb-2"}),i.jsx("div",{className:"h-4 bg-muted rounded w-2/3"})]})]},a))}):s&&s.length>0?i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:s.map(a=>{const l=au.find(u=>u.id===a.category)||au[1],c=l.icon;return i.jsxs(G,{to:`/blog/${a.slug}`,className:"group glass rounded-2xl overflow-hidden glass-hover",children:[a.image_url?i.jsxs("div",{className:"relative h-48 overflow-hidden",children:[i.jsx("img",{src:a.image_url,alt:a.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/80 to-transparent"}),i.jsx("div",{className:"absolute top-4 left-4",children:i.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-background/80 backdrop-blur-sm text-xs font-medium",children:[i.jsx(c,{className:"w-3 h-3 text-primary"}),l.label]})})]}):i.jsxs("div",{className:"relative h-48 bg-gradient-to-br from-primary/20 to-accent/20 flex items-center justify-center",children:[i.jsx("span",{className:"text-4xl font-bold text-primary/30",children:a.title.charAt(0)}),i.jsx("div",{className:"absolute top-4 left-4",children:i.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-background/80 backdrop-blur-sm text-xs font-medium",children:[i.jsx(c,{className:"w-3 h-3 text-primary"}),l.label]})})]}),i.jsxs("div",{className:"p-6",children:[i.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mb-3 flex-wrap",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(xr,{className:"w-4 h-4"}),i.jsx("time",{dateTime:a.created_at,children:new Date(a.created_at).toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"})})]}),i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx($i,{className:"w-3.5 h-3.5"}),i.jsxs("span",{children:[Hz(a.introduction)," min"]})]})]}),i.jsx("h2",{className:"text-xl font-semibold mb-3 group-hover:text-primary transition-colors line-clamp-2",children:a.title}),i.jsx("p",{className:"text-muted-foreground line-clamp-2 mb-4 text-sm",children:a.introduction}),i.jsxs("div",{className:"flex items-center gap-2 text-primary font-medium text-sm",children:["Lire l'article",i.jsx(ve,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})]})]},a.id)})}):i.jsx("div",{className:"text-center py-16",children:i.jsx("p",{className:"text-muted-foreground text-lg",children:r==="all"?"Aucun article publié pour le moment.":`Aucun article dans la catégorie "${(o=au.find(a=>a.id===r))==null?void 0:o.label}".`})})]})}),i.jsx(Je,{})]})};var Rh="Collapsible",[Gz,rE]=Ht(Rh),[Kz,wx]=Gz(Rh),nE=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:o,onOpenChange:a,...l}=e,[c,u]=ln({prop:n,defaultProp:s??!1,onChange:a,caller:Rh});return i.jsx(Kz,{scope:r,disabled:o,contentId:Fr(),open:c,onOpenToggle:f.useCallback(()=>u(d=>!d),[u]),children:i.jsx(re.div,{"data-state":Cx(c),"data-disabled":o?"":void 0,...l,ref:t})})});nE.displayName=Rh;var sE="CollapsibleTrigger",iE=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,s=wx(sE,r);return i.jsx(re.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Cx(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:t,onClick:U(e.onClick,s.onOpenToggle)})});iE.displayName=sE;var jx="CollapsibleContent",oE=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=wx(jx,e.__scopeCollapsible);return i.jsx(It,{present:r||s.open,children:({present:o})=>i.jsx(Jz,{...n,ref:t,present:o})})});oE.displayName=jx;var Jz=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:s,...o}=e,a=wx(jx,r),[l,c]=f.useState(n),u=f.useRef(null),d=ue(t,u),h=f.useRef(0),m=h.current,p=f.useRef(0),b=p.current,g=a.open||l,w=f.useRef(g),x=f.useRef(void 0);return f.useEffect(()=>{const y=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(y)},[]),at(()=>{const y=u.current;if(y){x.current=x.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const v=y.getBoundingClientRect();h.current=v.height,p.current=v.width,w.current||(y.style.transitionDuration=x.current.transitionDuration,y.style.animationName=x.current.animationName),c(n)}},[a.open,n]),i.jsx(re.div,{"data-state":Cx(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!g,...o,ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:g&&s})});function Cx(e){return e?"open":"closed"}var Yz=nE,Xz=iE,Qz=oE,Hr="Accordion",Zz=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Sx,eV,tV]=uc(Hr),[Eh,bW]=Ht(Hr,[tV,rE]),Nx=rE(),aE=M.forwardRef((e,t)=>{const{type:r,...n}=e,s=n,o=n;return i.jsx(Sx.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?i.jsx(iV,{...o,ref:t}):i.jsx(sV,{...s,ref:t})})});aE.displayName=Hr;var[lE,rV]=Eh(Hr),[cE,nV]=Eh(Hr,{collapsible:!1}),sV=M.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},collapsible:o=!1,...a}=e,[l,c]=ln({prop:r,defaultProp:n??"",onChange:s,caller:Hr});return i.jsx(lE,{scope:e.__scopeAccordion,value:M.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:M.useCallback(()=>o&&c(""),[o,c]),children:i.jsx(cE,{scope:e.__scopeAccordion,collapsible:o,children:i.jsx(uE,{...a,ref:t})})})}),iV=M.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},...o}=e,[a,l]=ln({prop:r,defaultProp:n??[],onChange:s,caller:Hr}),c=M.useCallback(d=>l((h=[])=>[...h,d]),[l]),u=M.useCallback(d=>l((h=[])=>h.filter(m=>m!==d)),[l]);return i.jsx(lE,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:i.jsx(cE,{scope:e.__scopeAccordion,collapsible:!0,children:i.jsx(uE,{...o,ref:t})})})}),[oV,_h]=Eh(Hr),uE=M.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:s,orientation:o="vertical",...a}=e,l=M.useRef(null),c=ue(l,t),u=eV(r),h=xc(s)==="ltr",m=U(e.onKeyDown,p=>{var R;if(!Zz.includes(p.key))return;const b=p.target,g=u().filter(k=>{var T;return!((T=k.ref.current)!=null&&T.disabled)}),w=g.findIndex(k=>k.ref.current===b),x=g.length;if(w===-1)return;p.preventDefault();let y=w;const v=0,j=x-1,C=()=>{y=w+1,y>j&&(y=v)},S=()=>{y=w-1,y<v&&(y=j)};switch(p.key){case"Home":y=v;break;case"End":y=j;break;case"ArrowRight":o==="horizontal"&&(h?C():S());break;case"ArrowDown":o==="vertical"&&C();break;case"ArrowLeft":o==="horizontal"&&(h?S():C());break;case"ArrowUp":o==="vertical"&&S();break}const N=y%x;(R=g[N].ref.current)==null||R.focus()});return i.jsx(oV,{scope:r,disabled:n,direction:s,orientation:o,children:i.jsx(Sx.Slot,{scope:r,children:i.jsx(re.div,{...a,"data-orientation":o,ref:c,onKeyDown:n?void 0:m})})})}),Cd="AccordionItem",[aV,Rx]=Eh(Cd),dE=M.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...s}=e,o=_h(Cd,r),a=rV(Cd,r),l=Nx(r),c=Fr(),u=n&&a.value.includes(n)||!1,d=o.disabled||e.disabled;return i.jsx(aV,{scope:r,open:u,disabled:d,triggerId:c,children:i.jsx(Yz,{"data-orientation":o.orientation,"data-state":vE(u),...l,...s,ref:t,disabled:d,open:u,onOpenChange:h=>{h?a.onItemOpen(n):a.onItemClose(n)}})})});dE.displayName=Cd;var hE="AccordionHeader",mE=M.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=_h(Hr,r),o=Rx(hE,r);return i.jsx(re.h3,{"data-orientation":s.orientation,"data-state":vE(o.open),"data-disabled":o.disabled?"":void 0,...n,ref:t})});mE.displayName=hE;var Kp="AccordionTrigger",fE=M.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=_h(Hr,r),o=Rx(Kp,r),a=nV(Kp,r),l=Nx(r);return i.jsx(Sx.ItemSlot,{scope:r,children:i.jsx(Xz,{"aria-disabled":o.open&&!a.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...l,...n,ref:t})})});fE.displayName=Kp;var pE="AccordionContent",gE=M.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=_h(Hr,r),o=Rx(pE,r),a=Nx(r);return i.jsx(Qz,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});gE.displayName=pE;function vE(e){return e?"open":"closed"}var lV=aE,cV=dE,uV=mE,xE=fE,yE=gE;const bE=lV,Ex=f.forwardRef(({className:e,...t},r)=>i.jsx(cV,{ref:r,className:te("border-b",e),...t}));Ex.displayName="AccordionItem";const _x=f.forwardRef(({className:e,children:t,...r},n)=>i.jsx(uV,{className:"flex",children:i.jsxs(xE,{ref:n,className:te("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,i.jsx(rh,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));_x.displayName=xE.displayName;const kx=f.forwardRef(({className:e,children:t,...r},n)=>i.jsx(yE,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:i.jsx("div",{className:te("pb-4 pt-0",e),children:t})}));kx.displayName=yE.displayName;const wE=f.forwardRef(({...e},t)=>i.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));wE.displayName="Breadcrumb";const jE=f.forwardRef(({className:e,...t},r)=>i.jsx("ol",{ref:r,className:te("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));jE.displayName="BreadcrumbList";const Mu=f.forwardRef(({className:e,...t},r)=>i.jsx("li",{ref:r,className:te("inline-flex items-center gap-1.5",e),...t}));Mu.displayName="BreadcrumbItem";const Jp=f.forwardRef(({asChild:e,className:t,...r},n)=>{const s=e?gS:"a";return i.jsx(s,{ref:n,className:te("transition-colors hover:text-foreground",t),...r})});Jp.displayName="BreadcrumbLink";const CE=f.forwardRef(({className:e,...t},r)=>i.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:te("font-normal text-foreground",e),...t}));CE.displayName="BreadcrumbPage";const Yp=({children:e,className:t,...r})=>i.jsx("li",{role:"presentation","aria-hidden":"true",className:te("[&>svg]:size-3.5",t),...r,children:e??i.jsx(Ev,{})});Yp.displayName="BreadcrumbSeparator";const lu={assurance:{name:"CRM Assurance",slug:"/crm-assurance",description:"Découvrez notre solution CRM dédiée aux courtiers et agents généraux en assurance"},immobilier:{name:"CRM Immobilier",slug:"/crm-immobilier",description:"Explorez notre CRM spécialisé pour les agences immobilières et mandataires"},courtage:{name:"CRM Courtage",slug:"/crm-courtage",description:"Consultez notre solution pour les courtiers en crédit et CGP"},comptable:{name:"CRM Comptable",slug:"/crm-comptable",description:"Découvrez notre CRM pour cabinets d'expertise comptable"},avocat:{name:"CRM Avocat",slug:"/crm-avocat",description:"Explorez notre solution pour les cabinets d'avocats"},recrutement:{name:"CRM Recrutement",slug:"/crm-recrutement",description:"Consultez notre CRM pour cabinets de recrutement et chasseurs de têtes"},automobile:{name:"CRM Automobile",slug:"/crm-automobile",description:"Découvrez notre solution pour concessions et garages automobiles"},sante:{name:"CRM Santé",slug:"/crm-sante",description:"Explorez notre CRM pour cliniques et cabinets médicaux"},marketing:{name:"CRM Marketing",slug:"/crm-marketing",description:"Consultez notre solution pour agences marketing et communication"},restauration:{name:"CRM Restauration",slug:"/crm-restauration",description:"Découvrez notre CRM pour restaurants et traiteurs"}},cw=e=>e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim(),dV=e=>{const t=/\[([^\]]+)\]\(([^)]+)\)/g,r=[];let n=0,s;for(;(s=t.exec(e))!==null;){s.index>n&&r.push(e.slice(n,s.index));const[,o,a]=s;r.push(i.jsx(G,{to:a,className:"text-primary hover:underline font-medium",children:o},`${a}-${s.index}`)),n=s.index+s[0].length}return n<e.length&&r.push(e.slice(n)),r.length>0?r:[e]},hV=e=>{const t=document.getElementById(e);if(t){const s=t.getBoundingClientRect().top+window.pageYOffset-100;window.scrollTo({top:s,behavior:"smooth"})}},uw=(e,t)=>{const n=(e+" "+t.map(o=>o.content).join(" ")).trim().split(/\s+/).length,s=Math.ceil(n/200);return Math.max(1,s)},mV=()=>{const{slug:e}=Yv(),{data:t,isLoading:r,error:n}=Lz(e||""),{data:s}=$z((t==null?void 0:t.category)||null,(t==null?void 0:t.id)||null);if(r)return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsx("main",{className:"pt-24 pb-16",children:i.jsx("div",{className:"container mx-auto px-4 max-w-4xl",children:i.jsxs("div",{className:"animate-pulse",children:[i.jsx("div",{className:"h-4 bg-muted rounded w-32 mb-8"}),i.jsx("div",{className:"h-10 bg-muted rounded w-3/4 mb-4"}),i.jsx("div",{className:"h-4 bg-muted rounded w-48 mb-8"}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("div",{className:"h-4 bg-muted rounded w-full"}),i.jsx("div",{className:"h-4 bg-muted rounded w-full"}),i.jsx("div",{className:"h-4 bg-muted rounded w-2/3"})]})]})})}),i.jsx(Je,{})]});if(n||!t)return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsx("main",{className:"pt-24 pb-16",children:i.jsxs("div",{className:"container mx-auto px-4 text-center",children:[i.jsx("h1",{className:"text-3xl font-bold mb-4",children:"Article non trouvé"}),i.jsx("p",{className:"text-muted-foreground mb-8",children:"L'article que vous recherchez n'existe pas ou n'est plus disponible."}),i.jsxs(G,{to:"/blog",className:"inline-flex items-center gap-2 text-primary hover:underline",children:[i.jsx(YO,{className:"w-4 h-4"}),"Retour au blog"]})]})}),i.jsx(Je,{})]});const o=`https://crmsurmesure.com/blog/${t.slug}`,a=t.image_url||"https://crmsurmesure.com/og-image.png";uw(t.introduction,t.sections);const l=(t.introduction+" "+t.sections.map(h=>h.content).join(" ")).trim().split(/\s+/).length,c={"@context":"https://schema.org","@type":"Article",headline:t.title,description:t.meta_description,image:a,datePublished:t.created_at,dateModified:t.updated_at,author:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com"},publisher:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com",logo:{"@type":"ImageObject",url:"https://crmsurmesure.com/og-image.png"}},mainEntityOfPage:{"@type":"WebPage","@id":o},wordCount:l,articleBody:t.introduction+" "+t.sections.map(h=>h.content).join(" "),articleSection:t.category||"Général",inLanguage:"fr-FR",url:o},u=t.faqs.length>0?{"@context":"https://schema.org","@type":"FAQPage",mainEntity:t.faqs.map(h=>({"@type":"Question",name:h.question,acceptedAnswer:{"@type":"Answer",text:h.answer}}))}:null,d={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"Blog",item:"https://crmsurmesure.com/blog"},{"@type":"ListItem",position:3,name:t.title,item:o}]};return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsxs(Ye,{children:[i.jsx("title",{children:t.meta_title}),i.jsx("meta",{name:"description",content:t.meta_description}),i.jsx("meta",{property:"og:type",content:"article"}),i.jsx("meta",{property:"og:url",content:o}),i.jsx("meta",{property:"og:title",content:t.meta_title}),i.jsx("meta",{property:"og:description",content:t.meta_description}),i.jsx("meta",{property:"og:image",content:a}),i.jsx("meta",{property:"article:published_time",content:t.created_at}),i.jsx("meta",{property:"article:modified_time",content:t.updated_at}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:t.meta_title}),i.jsx("meta",{name:"twitter:description",content:t.meta_description}),i.jsx("meta",{name:"twitter:image",content:a}),i.jsx("link",{rel:"canonical",href:o}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(c)}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(d)}),u&&i.jsx("script",{type:"application/ld+json",children:JSON.stringify(u)})]}),i.jsx(Ke,{}),i.jsx("main",{className:"pt-24 pb-16",children:i.jsxs("article",{className:"container mx-auto px-4 max-w-4xl",children:[i.jsx(wE,{className:"mb-6",children:i.jsxs(jE,{children:[i.jsx(Mu,{children:i.jsx(Jp,{asChild:!0,children:i.jsxs(G,{to:"/",className:"flex items-center gap-1",children:[i.jsx(_i,{className:"w-3.5 h-3.5"}),i.jsx("span",{className:"sr-only md:not-sr-only",children:"Accueil"})]})})}),i.jsx(Yp,{}),i.jsx(Mu,{children:i.jsx(Jp,{asChild:!0,children:i.jsx(G,{to:"/blog",children:"Blog"})})}),i.jsx(Yp,{}),i.jsx(Mu,{children:i.jsx(CE,{className:"line-clamp-1 max-w-[200px] md:max-w-none",children:t.title})})]})}),t.image_url&&i.jsxs("div",{className:"relative mb-12 rounded-2xl overflow-hidden",children:[i.jsx("img",{src:t.image_url,alt:t.title,className:"w-full h-64 md:h-96 object-cover"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/60 to-transparent"})]}),i.jsxs("header",{className:"mb-12",children:[i.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold mb-4",children:t.title}),i.jsxs("div",{className:"flex items-center gap-4 text-muted-foreground flex-wrap",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(xr,{className:"w-4 h-4"}),i.jsx("time",{dateTime:t.created_at,children:new Date(t.created_at).toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"})})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx($i,{className:"w-4 h-4"}),i.jsxs("span",{children:[uw(t.introduction,t.sections)," min de lecture"]})]})]})]}),i.jsx("div",{className:"prose prose-lg prose-invert max-w-none mb-12",children:i.jsx("p",{className:"text-xl text-muted-foreground leading-relaxed",children:t.introduction})}),t.sections.length>0&&i.jsxs("nav",{className:"glass rounded-xl p-6 mb-12",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx(cI,{className:"w-5 h-5 text-primary"}),i.jsx("h2",{className:"text-lg font-semibold",children:"Sommaire"})]}),i.jsx("ol",{className:"space-y-2",children:t.sections.map((h,m)=>{const p=cw(h.heading);return i.jsx("li",{children:i.jsxs("button",{onClick:()=>hV(p),className:"text-left w-full text-muted-foreground hover:text-primary transition-colors flex items-start gap-2 group",children:[i.jsxs("span",{className:"text-primary/60 font-medium min-w-[1.5rem]",children:[m+1,"."]}),i.jsx("span",{className:"group-hover:underline",children:h.heading})]})},h.id)})})]}),t.sections.map(h=>{const m=cw(h.heading);return i.jsxs("section",{id:m,className:"mb-12 scroll-mt-24",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-4 text-gradient",children:h.heading}),i.jsx("div",{className:"prose prose-lg prose-invert max-w-none",children:i.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap",children:dV(h.content)})})]},h.id)}),t.category&&lu[t.category.toLowerCase()]&&i.jsx("div",{className:"my-12 p-6 glass rounded-xl border-primary/20",children:i.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-semibold text-lg mb-1",children:lu[t.category.toLowerCase()].name}),i.jsx("p",{className:"text-muted-foreground text-sm",children:lu[t.category.toLowerCase()].description})]}),i.jsx(G,{to:lu[t.category.toLowerCase()].slug,className:"inline-flex items-center gap-2 px-6 py-2 bg-primary/10 text-primary font-medium rounded-lg hover:bg-primary/20 transition-colors whitespace-nowrap",children:"En savoir plus →"})]})}),t.faqs.length>0&&i.jsxs("section",{className:"mt-16 pt-12 border-t border-border",children:[i.jsxs("h2",{className:"text-2xl md:text-3xl font-bold mb-8",children:["Questions ",i.jsx("span",{className:"text-gradient",children:"Fréquentes"})]}),i.jsx(bE,{type:"single",collapsible:!0,className:"space-y-4",children:t.faqs.map(h=>i.jsxs(Ex,{value:h.id,className:"glass rounded-xl px-6 border-none",children:[i.jsx(_x,{className:"text-left hover:no-underline py-5",children:i.jsx("span",{className:"font-medium",children:h.question})}),i.jsx(kx,{className:"text-muted-foreground pb-5",children:h.answer})]},h.id))})]}),s&&s.length>0&&i.jsxs("section",{className:"mt-16 pt-12 border-t border-border",children:[i.jsxs("h2",{className:"text-2xl md:text-3xl font-bold mb-8",children:["Articles ",i.jsx("span",{className:"text-gradient",children:"Connexes"})]}),i.jsx("div",{className:"grid gap-6 md:grid-cols-3",children:s.map(h=>i.jsxs(G,{to:`/blog/${h.slug}`,className:"group glass rounded-xl overflow-hidden hover:border-primary/50 transition-all duration-300",children:[h.image_url&&i.jsxs("div",{className:"relative h-32 overflow-hidden",children:[i.jsx("img",{src:h.image_url,alt:h.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/80 to-transparent"})]}),i.jsxs("div",{className:"p-4",children:[i.jsx("h3",{className:"font-semibold text-sm line-clamp-2 group-hover:text-primary transition-colors",children:h.title}),i.jsx("p",{className:"text-xs text-muted-foreground mt-2 line-clamp-2",children:h.introduction})]})]},h.id))})]}),i.jsxs("div",{className:"mt-16 p-8 glass rounded-2xl text-center",children:[i.jsx("h3",{className:"text-2xl font-bold mb-4",children:"Prêt à créer votre CRM sur mesure ?"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"Découvrez comment nous pouvons transformer vos processus métier."}),i.jsx(G,{to:"/discovery",className:"inline-flex items-center gap-2 px-8 py-3 bg-gradient-primary text-primary-foreground font-semibold rounded-xl hover:opacity-90 transition-opacity",children:"Démarrer mon projet"})]})]})}),i.jsx(Je,{})]})};var SE="AlertDialog",[fV,wW]=Ht(SE,[vR]),Vn=vR(),NE=e=>{const{__scopeAlertDialog:t,...r}=e,n=Vn(t);return i.jsx(MR,{...n,...r,modal:!0})};NE.displayName=SE;var pV="AlertDialogTrigger",gV=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Vn(r);return i.jsx(s6,{...s,...n,ref:t})});gV.displayName=pV;var vV="AlertDialogPortal",RE=e=>{const{__scopeAlertDialog:t,...r}=e,n=Vn(t);return i.jsx(OR,{...n,...r})};RE.displayName=vV;var xV="AlertDialogOverlay",EE=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Vn(r);return i.jsx(nx,{...s,...n,ref:t})});EE.displayName=xV;var Lo="AlertDialogContent",[yV,bV]=fV(Lo),wV=xS("AlertDialogContent"),_E=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,o=Vn(r),a=f.useRef(null),l=ue(t,a),c=f.useRef(null);return i.jsx(e6,{contentName:Lo,titleName:kE,docsSlug:"alert-dialog",children:i.jsx(yV,{scope:r,cancelRef:c,children:i.jsxs(sx,{role:"alertdialog",...o,...s,ref:l,onOpenAutoFocus:U(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[i.jsx(wV,{children:n}),i.jsx(CV,{contentRef:a})]})})})});_E.displayName=Lo;var kE="AlertDialogTitle",TE=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Vn(r);return i.jsx(ix,{...s,...n,ref:t})});TE.displayName=kE;var PE="AlertDialogDescription",AE=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Vn(r);return i.jsx(ox,{...s,...n,ref:t})});AE.displayName=PE;var jV="AlertDialogAction",ME=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Vn(r);return i.jsx(ax,{...s,...n,ref:t})});ME.displayName=jV;var OE="AlertDialogCancel",IE=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=bV(OE,r),o=Vn(r),a=ue(t,s);return i.jsx(ax,{...o,...n,ref:a})});IE.displayName=OE;var CV=({contentRef:e})=>{const t=`\`${Lo}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${Lo}\` by passing a \`${PE}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Lo}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},SV=NE,NV=RE,DE=EE,LE=_E,$E=ME,FE=IE,zE=TE,VE=AE;const RV=SV,EV=NV,UE=f.forwardRef(({className:e,...t},r)=>i.jsx(DE,{className:te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));UE.displayName=DE.displayName;const BE=f.forwardRef(({className:e,...t},r)=>i.jsxs(EV,{children:[i.jsx(UE,{}),i.jsx(LE,{ref:r,className:te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));BE.displayName=LE.displayName;const qE=({className:e,...t})=>i.jsx("div",{className:te("flex flex-col space-y-2 text-center sm:text-left",e),...t});qE.displayName="AlertDialogHeader";const HE=({className:e,...t})=>i.jsx("div",{className:te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});HE.displayName="AlertDialogFooter";const WE=f.forwardRef(({className:e,...t},r)=>i.jsx(zE,{ref:r,className:te("text-lg font-semibold",e),...t}));WE.displayName=zE.displayName;const GE=f.forwardRef(({className:e,...t},r)=>i.jsx(VE,{ref:r,className:te("text-sm text-muted-foreground",e),...t}));GE.displayName=VE.displayName;const KE=f.forwardRef(({className:e,...t},r)=>i.jsx($E,{ref:r,className:te(Xv(),e),...t}));KE.displayName=$E.displayName;const JE=f.forwardRef(({className:e,...t},r)=>i.jsx(FE,{ref:r,className:te(Xv({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));JE.displayName=FE.displayName;const _V=()=>{const e=Br(),{toast:t}=dn(),[r,n]=f.useState(!1),[s,o]=f.useState(!0),[a,l]=f.useState(null),{data:c,isLoading:u}=Fz(),d=Uz(),h=tE();f.useEffect(()=>{(async()=>{const{data:{session:w}}=await ee.auth.getSession();if(!w){e("/auth");return}n(!0),o(!1)})();const{data:{subscription:g}}=ee.auth.onAuthStateChange((w,x)=>{x||e("/auth")});return()=>g.unsubscribe()},[e]);const m=async()=>{if(a){try{await d.mutateAsync(a),t({title:"Article supprimé",description:"L'article a été supprimé avec succès."})}catch{t({title:"Erreur",description:"Impossible de supprimer l'article.",variant:"destructive"})}l(null)}},p=async(b,g)=>{try{await h.mutateAsync({id:b,published:!g}),t({title:g?"Article dépublié":"Article publié",description:g?"L'article n'est plus visible publiquement.":"L'article est maintenant visible sur le blog."})}catch{t({title:"Erreur",description:"Impossible de modifier le statut de l'article.",variant:"destructive"})}};return s?i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):r?i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsxs("div",{className:"container mx-auto px-4 py-8",children:[i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(F,{variant:"ghost",size:"icon",onClick:()=>e("/dashboard"),children:i.jsx(As,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("h1",{className:"text-3xl font-bold",children:"Gestion du Blog"}),i.jsx("p",{className:"text-muted-foreground",children:"Créez et gérez vos articles"})]})]}),i.jsxs(F,{onClick:()=>e("/blog/admin/new"),className:"gap-2",children:[i.jsx(ia,{className:"w-4 h-4"}),"Nouvel article"]})]}),u?i.jsx("div",{className:"space-y-4",children:[1,2,3].map(b=>i.jsxs("div",{className:"glass rounded-xl p-6 animate-pulse",children:[i.jsx("div",{className:"h-6 bg-muted rounded w-1/3 mb-2"}),i.jsx("div",{className:"h-4 bg-muted rounded w-1/4"})]},b))}):c&&c.length>0?i.jsx("div",{className:"space-y-4",children:c.map(b=>i.jsxs("div",{className:"glass rounded-xl p-6 flex items-center justify-between",children:[i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[i.jsx("h2",{className:"text-xl font-semibold",children:b.title}),i.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${b.published?"bg-green-500/20 text-green-400":"bg-yellow-500/20 text-yellow-400"}`,children:b.published?"Publié":"Brouillon"})]}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:["Créé le ",new Date(b.created_at).toLocaleDateString("fr-FR")," • ","Mis à jour le ",new Date(b.updated_at).toLocaleDateString("fr-FR")]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(F,{variant:"ghost",size:"icon",onClick:()=>p(b.id,b.published),title:b.published?"Dépublier":"Publier",children:b.published?i.jsx(rI,{className:"w-4 h-4"}):i.jsx(nh,{className:"w-4 h-4"})}),i.jsx(F,{variant:"ghost",size:"icon",onClick:()=>e(`/blog/admin/${b.id}`),children:i.jsx(xI,{className:"w-4 h-4"})}),i.jsx(F,{variant:"ghost",size:"icon",onClick:()=>l(b.id),className:"text-destructive hover:text-destructive",children:i.jsx(_u,{className:"w-4 h-4"})})]})]},b.id))}):i.jsxs("div",{className:"text-center py-16 glass rounded-2xl",children:[i.jsx("p",{className:"text-muted-foreground text-lg mb-6",children:"Aucun article pour le moment."}),i.jsxs(F,{onClick:()=>e("/blog/admin/new"),className:"gap-2",children:[i.jsx(ia,{className:"w-4 h-4"}),"Créer mon premier article"]})]})]}),i.jsx(RV,{open:!!a,onOpenChange:()=>l(null),children:i.jsxs(BE,{children:[i.jsxs(qE,{children:[i.jsx(WE,{children:"Supprimer cet article ?"}),i.jsx(GE,{children:"Cette action est irréversible. L'article et tout son contenu seront définitivement supprimés."})]}),i.jsxs(HE,{children:[i.jsx(JE,{children:"Annuler"}),i.jsx(KE,{onClick:m,className:"bg-destructive hover:bg-destructive/90",children:"Supprimer"})]})]})})]}):null};function YE(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var kh="Switch",[kV,jW]=Ht(kh),[TV,PV]=kV(kh),XE=f.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:a,disabled:l,value:c="on",onCheckedChange:u,form:d,...h}=e,[m,p]=f.useState(null),b=ue(t,v=>p(v)),g=f.useRef(!1),w=m?d||!!m.closest("form"):!0,[x,y]=ln({prop:s,defaultProp:o??!1,onChange:u,caller:kh});return i.jsxs(TV,{scope:r,checked:x,disabled:l,children:[i.jsx(re.button,{type:"button",role:"switch","aria-checked":x,"aria-required":a,"data-state":t_(x),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:b,onClick:U(e.onClick,v=>{y(j=>!j),w&&(g.current=v.isPropagationStopped(),g.current||v.stopPropagation())})}),w&&i.jsx(e_,{control:m,bubbles:!g.current,name:n,value:c,checked:x,required:a,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});XE.displayName=kh;var QE="SwitchThumb",ZE=f.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=PV(QE,r);return i.jsx(re.span,{"data-state":t_(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});ZE.displayName=QE;var AV="SwitchBubbleInput",e_=f.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...s},o)=>{const a=f.useRef(null),l=ue(a,o),c=YE(r),u=yN(t);return f.useEffect(()=>{const d=a.current;if(!d)return;const h=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==r&&p){const b=new Event("click",{bubbles:n});p.call(d,r),d.dispatchEvent(b)}},[c,r,n]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:l,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});e_.displayName=AV;function t_(e){return e?"checked":"unchecked"}var r_=XE,MV=ZE;const n_=f.forwardRef(({className:e,...t},r)=>i.jsx(r_,{className:te("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:r,children:i.jsx(MV,{className:te("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));n_.displayName=r_.displayName;function Xp(e,[t,r]){return Math.min(r,Math.max(t,e))}var OV=[" ","Enter","ArrowUp","ArrowDown"],IV=[" ","Enter"],Mi="Select",[Th,Ph,DV]=uc(Mi),[Ea,CW]=Ht(Mi,[DV,ja]),Ah=ja(),[LV,Vs]=Ea(Mi),[$V,FV]=Ea(Mi),s_=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:a,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:h,disabled:m,required:p,form:b}=e,g=Ah(t),[w,x]=f.useState(null),[y,v]=f.useState(null),[j,C]=f.useState(!1),S=xc(u),[N,R]=ln({prop:n,defaultProp:s??!1,onChange:o,caller:Mi}),[k,T]=ln({prop:a,defaultProp:l,onChange:c,caller:Mi}),O=f.useRef(null),A=w?b||!!w.closest("form"):!0,[q,I]=f.useState(new Set),X=Array.from(q).map(V=>V.props.value).join(";");return i.jsx(kN,{...g,children:i.jsxs(LV,{required:p,scope:t,trigger:w,onTriggerChange:x,valueNode:y,onValueNodeChange:v,valueNodeHasChildren:j,onValueNodeHasChildrenChange:C,contentId:Fr(),value:k,onValueChange:T,open:N,onOpenChange:R,dir:S,triggerPointerDownPosRef:O,disabled:m,children:[i.jsx(Th.Provider,{scope:t,children:i.jsx($V,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(V=>{I(z=>new Set(z).add(V))},[]),onNativeOptionRemove:f.useCallback(V=>{I(z=>{const P=new Set(z);return P.delete(V),P})},[]),children:r})}),A?i.jsxs(__,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:h,value:k,onChange:V=>T(V.target.value),disabled:m,form:b,children:[k===void 0?i.jsx("option",{value:""}):null,Array.from(q)]},X):null]})})};s_.displayName=Mi;var i_="SelectTrigger",o_=f.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=Ah(r),a=Vs(i_,r),l=a.disabled||n,c=ue(t,a.onTriggerChange),u=Ph(r),d=f.useRef("touch"),[h,m,p]=T_(g=>{const w=u().filter(v=>!v.disabled),x=w.find(v=>v.value===a.value),y=P_(w,g,x);y!==void 0&&a.onValueChange(y.value)}),b=g=>{l||(a.onOpenChange(!0),p()),g&&(a.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return i.jsx(zv,{asChild:!0,...o,children:i.jsx(re.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":k_(a.value)?"":void 0,...s,ref:c,onClick:U(s.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&b(g)}),onPointerDown:U(s.onPointerDown,g=>{d.current=g.pointerType;const w=g.target;w.hasPointerCapture(g.pointerId)&&w.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(b(g),g.preventDefault())}),onKeyDown:U(s.onKeyDown,g=>{const w=h.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(w&&g.key===" ")&&OV.includes(g.key)&&(b(),g.preventDefault())})})})});o_.displayName=i_;var a_="SelectValue",l_=f.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:a="",...l}=e,c=Vs(a_,r),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,h=ue(t,c.onValueNodeChange);return at(()=>{u(d)},[u,d]),i.jsx(re.span,{...l,ref:h,style:{pointerEvents:"none"},children:k_(c.value)?i.jsx(i.Fragment,{children:a}):o})});l_.displayName=a_;var zV="SelectIcon",c_=f.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return i.jsx(re.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});c_.displayName=zV;var VV="SelectPortal",u_=e=>i.jsx(dc,{asChild:!0,...e});u_.displayName=VV;var Oi="SelectContent",d_=f.forwardRef((e,t)=>{const r=Vs(Oi,e.__scopeSelect),[n,s]=f.useState();if(at(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?Li.createPortal(i.jsx(h_,{scope:e.__scopeSelect,children:i.jsx(Th.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),o):null}return i.jsx(m_,{...e,ref:t})});d_.displayName=Oi;var Er=10,[h_,Us]=Ea(Oi),UV="SelectContentImpl",BV=Ei("SelectContent.RemoveScroll"),m_=f.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:a,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:g,avoidCollisions:w,...x}=e,y=Vs(Oi,r),[v,j]=f.useState(null),[C,S]=f.useState(null),N=ue(t,B=>j(B)),[R,k]=f.useState(null),[T,O]=f.useState(null),A=Ph(r),[q,I]=f.useState(!1),X=f.useRef(!1);f.useEffect(()=>{if(v)return Zv(v)},[v]),Qv();const V=f.useCallback(B=>{const[xe,...ye]=A().map(L=>L.ref.current),[fe]=ye.slice(-1),pe=document.activeElement;for(const L of B)if(L===pe||(L==null||L.scrollIntoView({block:"nearest"}),L===xe&&C&&(C.scrollTop=0),L===fe&&C&&(C.scrollTop=C.scrollHeight),L==null||L.focus(),document.activeElement!==pe))return},[A,C]),z=f.useCallback(()=>V([R,v]),[V,R,v]);f.useEffect(()=>{q&&z()},[q,z]);const{onOpenChange:P,triggerPointerDownPosRef:_}=y;f.useEffect(()=>{if(v){let B={x:0,y:0};const xe=fe=>{var pe,L;B={x:Math.abs(Math.round(fe.pageX)-(((pe=_.current)==null?void 0:pe.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((L=_.current)==null?void 0:L.y)??0))}},ye=fe=>{B.x<=10&&B.y<=10?fe.preventDefault():v.contains(fe.target)||P(!1),document.removeEventListener("pointermove",xe),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",ye,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",ye,{capture:!0})}}},[v,P,_]),f.useEffect(()=>{const B=()=>P(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[P]);const[D,Q]=T_(B=>{const xe=A().filter(pe=>!pe.disabled),ye=xe.find(pe=>pe.ref.current===document.activeElement),fe=P_(xe,B,ye);fe&&setTimeout(()=>fe.ref.current.focus())}),K=f.useCallback((B,xe,ye)=>{const fe=!X.current&&!ye;(y.value!==void 0&&y.value===xe||fe)&&(k(B),fe&&(X.current=!0))},[y.value]),ae=f.useCallback(()=>v==null?void 0:v.focus(),[v]),se=f.useCallback((B,xe,ye)=>{const fe=!X.current&&!ye;(y.value!==void 0&&y.value===xe||fe)&&O(B)},[y.value]),je=n==="popper"?Qp:f_,Ce=je===Qp?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:g,avoidCollisions:w}:{};return i.jsx(h_,{scope:r,content:v,viewport:C,onViewportChange:S,itemRefCallback:K,selectedItem:R,onItemLeave:ae,itemTextRefCallback:se,focusSelectedItem:z,selectedItemText:T,position:n,isPositioned:q,searchRef:D,children:i.jsx(gh,{as:BV,allowPinchZoom:!0,children:i.jsx(fh,{asChild:!0,trapped:y.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:U(s,B=>{var xe;(xe=y.trigger)==null||xe.focus({preventScroll:!0}),B.preventDefault()}),children:i.jsx(ga,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:i.jsx(je,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:B=>B.preventDefault(),...x,...Ce,onPlaced:()=>I(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:U(x.onKeyDown,B=>{const xe=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!xe&&B.key.length===1&&Q(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let fe=A().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(B.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const pe=B.target,L=fe.indexOf(pe);fe=fe.slice(L+1)}setTimeout(()=>V(fe)),B.preventDefault()}})})})})})})});m_.displayName=UV;var qV="SelectItemAlignedPosition",f_=f.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=Vs(Oi,r),a=Us(Oi,r),[l,c]=f.useState(null),[u,d]=f.useState(null),h=ue(t,N=>d(N)),m=Ph(r),p=f.useRef(!1),b=f.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:x,focusSelectedItem:y}=a,v=f.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&u&&g&&w&&x){const N=o.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),k=o.valueNode.getBoundingClientRect(),T=x.getBoundingClientRect();if(o.dir!=="rtl"){const pe=T.left-R.left,L=k.left-pe,le=N.left-L,be=N.width+le,Oe=Math.max(be,R.width),vn=window.innerWidth-Er,Wr=Xp(L,[Er,Math.max(Er,vn-Oe)]);l.style.minWidth=be+"px",l.style.left=Wr+"px"}else{const pe=R.right-T.right,L=window.innerWidth-k.right-pe,le=window.innerWidth-N.right-L,be=N.width+le,Oe=Math.max(be,R.width),vn=window.innerWidth-Er,Wr=Xp(L,[Er,Math.max(Er,vn-Oe)]);l.style.minWidth=be+"px",l.style.right=Wr+"px"}const O=m(),A=window.innerHeight-Er*2,q=g.scrollHeight,I=window.getComputedStyle(u),X=parseInt(I.borderTopWidth,10),V=parseInt(I.paddingTop,10),z=parseInt(I.borderBottomWidth,10),P=parseInt(I.paddingBottom,10),_=X+V+q+P+z,D=Math.min(w.offsetHeight*5,_),Q=window.getComputedStyle(g),K=parseInt(Q.paddingTop,10),ae=parseInt(Q.paddingBottom,10),se=N.top+N.height/2-Er,je=A-se,Ce=w.offsetHeight/2,B=w.offsetTop+Ce,xe=X+V+B,ye=_-xe;if(xe<=se){const pe=O.length>0&&w===O[O.length-1].ref.current;l.style.bottom="0px";const L=u.clientHeight-g.offsetTop-g.offsetHeight,le=Math.max(je,Ce+(pe?ae:0)+L+z),be=xe+le;l.style.height=be+"px"}else{const pe=O.length>0&&w===O[0].ref.current;l.style.top="0px";const le=Math.max(se,X+g.offsetTop+(pe?K:0)+Ce)+ye;l.style.height=le+"px",g.scrollTop=xe-se+g.offsetTop}l.style.margin=`${Er}px 0`,l.style.minHeight=D+"px",l.style.maxHeight=A+"px",n==null||n(),requestAnimationFrame(()=>p.current=!0)}},[m,o.trigger,o.valueNode,l,u,g,w,x,o.dir,n]);at(()=>v(),[v]);const[j,C]=f.useState();at(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const S=f.useCallback(N=>{N&&b.current===!0&&(v(),y==null||y(),b.current=!1)},[v,y]);return i.jsx(WV,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:i.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:i.jsx(re.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});f_.displayName=qV;var HV="SelectPopperPosition",Qp=f.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Er,...o}=e,a=Ah(r);return i.jsx(Vv,{...a,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Qp.displayName=HV;var[WV,Tx]=Ea(Oi,{}),Zp="SelectViewport",p_=f.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=Us(Zp,r),a=Tx(Zp,r),l=ue(t,o.onViewportChange),c=f.useRef(0);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),i.jsx(Th.Slot,{scope:r,children:i.jsx(re.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:U(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=a;if(m!=null&&m.current&&h){const p=Math.abs(c.current-d.scrollTop);if(p>0){const b=window.innerHeight-Er*2,g=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),x=Math.max(g,w);if(x<b){const y=x+p,v=Math.min(b,y),j=y-v;h.style.height=v+"px",h.style.bottom==="0px"&&(d.scrollTop=j>0?j:0,h.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});p_.displayName=Zp;var g_="SelectGroup",[GV,KV]=Ea(g_),JV=f.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Fr();return i.jsx(GV,{scope:r,id:s,children:i.jsx(re.div,{role:"group","aria-labelledby":s,...n,ref:t})})});JV.displayName=g_;var v_="SelectLabel",x_=f.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=KV(v_,r);return i.jsx(re.div,{id:s.id,...n,ref:t})});x_.displayName=v_;var Sd="SelectItem",[YV,y_]=Ea(Sd),b_=f.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...a}=e,l=Vs(Sd,r),c=Us(Sd,r),u=l.value===n,[d,h]=f.useState(o??""),[m,p]=f.useState(!1),b=ue(t,y=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,y,n,s)}),g=Fr(),w=f.useRef("touch"),x=()=>{s||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.jsx(YV,{scope:r,value:n,disabled:s,textId:g,isSelected:u,onItemTextChange:f.useCallback(y=>{h(v=>v||((y==null?void 0:y.textContent)??"").trim())},[]),children:i.jsx(Th.ItemSlot,{scope:r,value:n,disabled:s,textValue:d,children:i.jsx(re.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:b,onFocus:U(a.onFocus,()=>p(!0)),onBlur:U(a.onBlur,()=>p(!1)),onClick:U(a.onClick,()=>{w.current!=="mouse"&&x()}),onPointerUp:U(a.onPointerUp,()=>{w.current==="mouse"&&x()}),onPointerDown:U(a.onPointerDown,y=>{w.current=y.pointerType}),onPointerMove:U(a.onPointerMove,y=>{var v;w.current=y.pointerType,s?(v=c.onItemLeave)==null||v.call(c):w.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:U(a.onPointerLeave,y=>{var v;y.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:U(a.onKeyDown,y=>{var j;((j=c.searchRef)==null?void 0:j.current)!==""&&y.key===" "||(IV.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});b_.displayName=Sd;var Qa="SelectItemText",w_=f.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,a=Vs(Qa,r),l=Us(Qa,r),c=y_(Qa,r),u=FV(Qa,r),[d,h]=f.useState(null),m=ue(t,x=>h(x),c.onItemTextChange,x=>{var y;return(y=l.itemTextRefCallback)==null?void 0:y.call(l,x,c.value,c.disabled)}),p=d==null?void 0:d.textContent,b=f.useMemo(()=>i.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:w}=u;return at(()=>(g(b),()=>w(b)),[g,w,b]),i.jsxs(i.Fragment,{children:[i.jsx(re.span,{id:c.textId,...o,ref:m}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Li.createPortal(o.children,a.valueNode):null]})});w_.displayName=Qa;var j_="SelectItemIndicator",C_=f.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return y_(j_,r).isSelected?i.jsx(re.span,{"aria-hidden":!0,...n,ref:t}):null});C_.displayName=j_;var eg="SelectScrollUpButton",S_=f.forwardRef((e,t)=>{const r=Us(eg,e.__scopeSelect),n=Tx(eg,e.__scopeSelect),[s,o]=f.useState(!1),a=ue(t,n.onScrollButtonChange);return at(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;o(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?i.jsx(R_,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});S_.displayName=eg;var tg="SelectScrollDownButton",N_=f.forwardRef((e,t)=>{const r=Us(tg,e.__scopeSelect),n=Tx(tg,e.__scopeSelect),[s,o]=f.useState(!1),a=ue(t,n.onScrollButtonChange);return at(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;o(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?i.jsx(R_,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});N_.displayName=tg;var R_=f.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=Us("SelectScrollButton",r),a=f.useRef(null),l=Ph(r),c=f.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return f.useEffect(()=>()=>c(),[c]),at(()=>{var d;const u=l().find(h=>h.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),i.jsx(re.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:U(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:U(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:U(s.onPointerLeave,()=>{c()})})}),XV="SelectSeparator",E_=f.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return i.jsx(re.div,{"aria-hidden":!0,...n,ref:t})});E_.displayName=XV;var rg="SelectArrow",QV=f.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Ah(r),o=Vs(rg,r),a=Us(rg,r);return o.open&&a.position==="popper"?i.jsx(Uv,{...s,...n,ref:t}):null});QV.displayName=rg;var ZV="SelectBubbleInput",__=f.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const s=f.useRef(null),o=ue(n,s),a=YE(t);return f.useEffect(()=>{const l=s.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&d){const h=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(h)}},[a,t]),i.jsx(re.select,{...r,style:{...jS,...r.style},ref:o,defaultValue:t})});__.displayName=ZV;function k_(e){return e===""||e===void 0}function T_(e){const t=Ge(e),r=f.useRef(""),n=f.useRef(0),s=f.useCallback(a=>{const l=r.current+a;t(l),function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),o=f.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function P_(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let a=eU(e,Math.max(o,0));s.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function eU(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var tU=s_,A_=o_,rU=l_,nU=c_,sU=u_,M_=d_,iU=p_,O_=x_,I_=b_,oU=w_,aU=C_,D_=S_,L_=N_,$_=E_;const ng=tU,sg=rU,Nd=f.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(A_,{ref:n,className:te("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,i.jsx(nU,{asChild:!0,children:i.jsx(rh,{className:"h-4 w-4 opacity-50"})})]}));Nd.displayName=A_.displayName;const F_=f.forwardRef(({className:e,...t},r)=>i.jsx(D_,{ref:r,className:te("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(XO,{className:"h-4 w-4"})}));F_.displayName=D_.displayName;const z_=f.forwardRef(({className:e,...t},r)=>i.jsx(L_,{ref:r,className:te("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(rh,{className:"h-4 w-4"})}));z_.displayName=L_.displayName;const Rd=f.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>i.jsx(sU,{children:i.jsxs(M_,{ref:s,className:te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[i.jsx(F_,{}),i.jsx(iU,{className:te("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(z_,{})]})}));Rd.displayName=M_.displayName;const lU=f.forwardRef(({className:e,...t},r)=>i.jsx(O_,{ref:r,className:te("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));lU.displayName=O_.displayName;const ml=f.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(I_,{ref:n,className:te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(aU,{children:i.jsx(At,{className:"h-4 w-4"})})}),i.jsx(oU,{children:t})]}));ml.displayName=I_.displayName;const cU=f.forwardRef(({className:e,...t},r)=>i.jsx($_,{ref:r,className:te("-mx-1 my-1 h-px bg-muted",e),...t}));cU.displayName=$_.displayName;const uU=[{value:"general",label:"Général"},{value:"assurance",label:"Assurance"},{value:"immobilier",label:"Immobilier"},{value:"courtage",label:"Courtage"},{value:"comptable",label:"Comptabilité"},{value:"recrutement",label:"Recrutement"},{value:"automobile",label:"Automobile"},{value:"avocat",label:"Avocat"},{value:"sante",label:"Santé"},{value:"marketing",label:"Marketing"},{value:"restauration",label:"Restauration"}],Bm=()=>Math.random().toString(36).substr(2,9),dU=()=>{const{id:e}=Yv(),t=Br(),{toast:r}=dn(),n=e==="new",s=f.useRef(null),{data:o,isLoading:a}=zz(n?"":e||""),l=Vz(),c=tE(),u=Bz(),d=qz(),[h,m]=f.useState(""),[p,b]=f.useState(""),[g,w]=f.useState(""),[x,y]=f.useState(""),[v,j]=f.useState(""),[C,S]=f.useState(null),[N,R]=f.useState("general"),[k,T]=f.useState(!1),[O,A]=f.useState([]),[q,I]=f.useState([]),[X,V]=f.useState(!1),[z,P]=f.useState(!1),[_,D]=f.useState(!1),[Q,K]=f.useState(!0);f.useEffect(()=>{(async()=>{const{data:{session:le}}=await ee.auth.getSession();if(!le){t("/auth");return}D(!0),K(!1)})()},[t]),f.useEffect(()=>{o&&(m(o.title),b(o.slug),w(o.introduction),y(o.meta_title),j(o.meta_description),S(o.image_url),R(o.category||"general"),T(o.published),A(o.sections.map(L=>({id:L.id,heading:L.heading,content:L.content}))),I(o.faqs.map(L=>({id:L.id,question:L.question,answer:L.answer}))))},[o]),f.useEffect(()=>{if(n&&h){const L=h.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");b(L)}},[h,n]);const ae=()=>{A([...O,{id:Bm(),heading:"",content:""}])},se=(L,le,be)=>{A(O.map(Oe=>Oe.id===L?{...Oe,[le]:be}:Oe))},je=L=>{A(O.filter(le=>le.id!==L))},Ce=()=>{I([...q,{id:Bm(),question:"",answer:""}])},B=(L,le,be)=>{I(q.map(Oe=>Oe.id===L?{...Oe,[le]:be}:Oe))},xe=L=>{I(q.filter(le=>le.id!==L))},ye=async L=>{var be;const le=(be=L.target.files)==null?void 0:be[0];if(le){if(!le.type.startsWith("image/")){r({title:"Fichier invalide",description:"Veuillez sélectionner une image.",variant:"destructive"});return}if(le.size>5*1024*1024){r({title:"Fichier trop volumineux",description:"L'image ne doit pas dépasser 5 Mo.",variant:"destructive"});return}P(!0);try{const Oe=le.name.split(".").pop(),Wr=`articles/${`${Bm()}-${Date.now()}.${Oe}`}`,{error:Un}=await ee.storage.from("blog-images").upload(Wr,le);if(Un)throw Un;const{data:{publicUrl:Bn}}=ee.storage.from("blog-images").getPublicUrl(Wr);S(Bn),r({title:"Image uploadée",description:"L'image a été ajoutée avec succès."})}catch(Oe){console.error("Upload error:",Oe),r({title:"Erreur d'upload",description:Oe.message||"Impossible d'uploader l'image.",variant:"destructive"})}finally{P(!1)}}},fe=()=>{S(null),s.current&&(s.current.value="")},pe=async()=>{if(!h||!p||!g||!x||!v){r({title:"Champs requis",description:"Veuillez remplir tous les champs obligatoires.",variant:"destructive"});return}if(x.length>60){r({title:"Meta Title trop long",description:"Le Meta Title doit faire maximum 60 caractères.",variant:"destructive"});return}if(v.length>150){r({title:"Meta Description trop longue",description:"La Meta Description doit faire maximum 150 caractères.",variant:"destructive"});return}V(!0);try{const{data:{user:L}}=await ee.auth.getUser();let le=e;n?le=(await l.mutateAsync({title:h,slug:p,introduction:g,meta_title:x,meta_description:v,image_url:C,category:N,published:k,author_id:(L==null?void 0:L.id)||null})).id:await c.mutateAsync({id:e,title:h,slug:p,introduction:g,meta_title:x,meta_description:v,image_url:C,category:N,published:k}),await u.mutateAsync({articleId:le,sections:O.map((be,Oe)=>({article_id:le,heading:be.heading,content:be.content,position:Oe}))}),await d.mutateAsync({articleId:le,faqs:q.map((be,Oe)=>({article_id:le,question:be.question,answer:be.answer,position:Oe}))}),r({title:"Article sauvegardé",description:n?"Votre article a été créé.":"Vos modifications ont été enregistrées."}),n&&t(`/blog/admin/${le}`)}catch(L){r({title:"Erreur",description:L.message||"Impossible de sauvegarder l'article.",variant:"destructive"})}finally{V(!1)}};return Q||!n&&a?i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):_?i.jsx("div",{className:"min-h-screen bg-background",children:i.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-4xl",children:[i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(F,{variant:"ghost",size:"icon",onClick:()=>t("/blog/admin"),children:i.jsx(As,{className:"w-5 h-5"})}),i.jsx("h1",{className:"text-2xl font-bold",children:n?"Nouvel article":"Modifier l'article"})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[!n&&k&&i.jsxs(F,{variant:"outline",onClick:()=>window.open(`/blog/${p}`,"_blank"),className:"gap-2",children:[i.jsx(nh,{className:"w-4 h-4"}),"Voir"]}),i.jsxs(F,{onClick:pe,disabled:X,className:"gap-2",children:[i.jsx(gI,{className:"w-4 h-4"}),X?"Sauvegarde...":"Sauvegarder"]})]})]}),i.jsxs("div",{className:"space-y-8",children:[i.jsxs("div",{className:"glass rounded-2xl p-6 space-y-6",children:[i.jsx("h2",{className:"text-lg font-semibold",children:"Image principale"}),i.jsx("input",{ref:s,type:"file",accept:"image/*",onChange:ye,className:"hidden"}),C?i.jsxs("div",{className:"relative",children:[i.jsx("img",{src:C,alt:"Image de l'article",className:"w-full h-64 object-cover rounded-xl"}),i.jsxs("div",{className:"absolute top-4 right-4 flex gap-2",children:[i.jsxs(F,{variant:"secondary",size:"sm",onClick:()=>{var L;return(L=s.current)==null?void 0:L.click()},disabled:z,children:[i.jsx(bI,{className:"w-4 h-4 mr-2"}),"Changer"]}),i.jsx(F,{variant:"destructive",size:"sm",onClick:fe,children:i.jsx(_u,{className:"w-4 h-4"})})]})]}):i.jsx("button",{type:"button",onClick:()=>{var L;return(L=s.current)==null?void 0:L.click()},disabled:z,className:"w-full h-48 border-2 border-dashed border-border rounded-xl flex flex-col items-center justify-center gap-3 hover:border-primary/50 hover:bg-secondary/30 transition-colors",children:z?i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"}):i.jsxs(i.Fragment,{children:[i.jsx(oI,{className:"w-12 h-12 text-muted-foreground"}),i.jsx("span",{className:"text-muted-foreground",children:"Cliquez pour ajouter une image"}),i.jsx("span",{className:"text-xs text-muted-foreground",children:"JPG, PNG, WebP • Max 5 Mo"})]})})]}),i.jsxs("div",{className:"glass rounded-2xl p-6 space-y-6",children:[i.jsx("h2",{className:"text-lg font-semibold",children:"Informations générales"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx(nt,{htmlFor:"title",children:"Titre *"}),i.jsx(_t,{id:"title",value:h,onChange:L=>m(L.target.value),placeholder:"Le titre de votre article"})]}),i.jsxs("div",{children:[i.jsx(nt,{htmlFor:"slug",children:"Slug (URL) *"}),i.jsx(_t,{id:"slug",value:p,onChange:L=>b(L.target.value),placeholder:"mon-article-url"}),i.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["URL: /blog/",p||"mon-article"]})]}),i.jsxs("div",{children:[i.jsx(nt,{htmlFor:"introduction",children:"Introduction *"}),i.jsx(ii,{id:"introduction",value:g,onChange:L=>w(L.target.value),placeholder:"L'introduction de votre article...",rows:4})]}),i.jsxs("div",{children:[i.jsx(nt,{htmlFor:"category",children:"Catégorie"}),i.jsxs(ng,{value:N,onValueChange:R,children:[i.jsx(Nd,{children:i.jsx(sg,{placeholder:"Sélectionner une catégorie"})}),i.jsx(Rd,{children:uU.map(L=>i.jsx(ml,{value:L.value,children:L.label},L.value))})]})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx(nt,{htmlFor:"published",children:"Publier l'article"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Rendre l'article visible sur le blog"})]}),i.jsx(n_,{id:"published",checked:k,onCheckedChange:T})]})]})]}),i.jsxs("div",{className:"glass rounded-2xl p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h2",{className:"text-lg font-semibold",children:"Sections (H2 + Contenu)"}),i.jsxs(F,{variant:"outline",size:"sm",onClick:ae,className:"gap-2",children:[i.jsx(ia,{className:"w-4 h-4"}),"Ajouter"]})]}),O.length===0?i.jsx("p",{className:"text-muted-foreground text-center py-8",children:'Aucune section. Cliquez sur "Ajouter" pour créer votre première section.'}):i.jsx("div",{className:"space-y-6",children:O.map((L,le)=>i.jsxs("div",{className:"bg-secondary/30 rounded-xl p-4 space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-sm text-muted-foreground",children:["Section ",le+1]}),i.jsx(F,{variant:"ghost",size:"icon",onClick:()=>je(L.id),className:"text-destructive hover:text-destructive",children:i.jsx(_u,{className:"w-4 h-4"})})]}),i.jsxs("div",{children:[i.jsx(nt,{children:"Titre H2"}),i.jsx(_t,{value:L.heading,onChange:be=>se(L.id,"heading",be.target.value),placeholder:"Titre de la section"})]}),i.jsxs("div",{children:[i.jsx(nt,{children:"Contenu"}),i.jsx(ii,{value:L.content,onChange:be=>se(L.id,"content",be.target.value),placeholder:"Le contenu de cette section...",rows:6})]})]},L.id))})]}),i.jsxs("div",{className:"glass rounded-2xl p-6 space-y-6",children:[i.jsx("h2",{className:"text-lg font-semibold",children:"SEO"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsxs(nt,{htmlFor:"metaTitle",children:["Meta Title * (",x.length,"/60)"]}),i.jsx(_t,{id:"metaTitle",value:x,onChange:L=>y(L.target.value),placeholder:"Titre pour les moteurs de recherche",maxLength:60,className:x.length>60?"border-destructive":""})]}),i.jsxs("div",{children:[i.jsxs(nt,{htmlFor:"metaDescription",children:["Meta Description * (",v.length,"/150)"]}),i.jsx(ii,{id:"metaDescription",value:v,onChange:L=>j(L.target.value),placeholder:"Description pour les moteurs de recherche",maxLength:150,rows:2,className:v.length>150?"border-destructive":""})]})]})]}),i.jsxs("div",{className:"glass rounded-2xl p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold",children:"FAQ"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Questions fréquentes affichées en bas de l'article"})]}),i.jsxs(F,{variant:"outline",size:"sm",onClick:Ce,className:"gap-2",children:[i.jsx(ia,{className:"w-4 h-4"}),"Ajouter"]})]}),q.length===0?i.jsx("p",{className:"text-muted-foreground text-center py-8",children:'Aucune FAQ. Cliquez sur "Ajouter" pour créer votre première question.'}):i.jsx("div",{className:"space-y-6",children:q.map((L,le)=>i.jsxs("div",{className:"bg-secondary/30 rounded-xl p-4 space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-sm text-muted-foreground",children:["Question ",le+1]}),i.jsx(F,{variant:"ghost",size:"icon",onClick:()=>xe(L.id),className:"text-destructive hover:text-destructive",children:i.jsx(_u,{className:"w-4 h-4"})})]}),i.jsxs("div",{children:[i.jsx(nt,{children:"Question"}),i.jsx(_t,{value:L.question,onChange:be=>B(L.id,"question",be.target.value),placeholder:"La question posée"})]}),i.jsxs("div",{children:[i.jsx(nt,{children:"Réponse"}),i.jsx(ii,{value:L.answer,onChange:be=>B(L.id,"answer",be.target.value),placeholder:"La réponse à la question...",rows:3})]})]},L.id))})]})]})]})}):null},hU=()=>{const[e]=e5(),t=e.get("from")==="discovery",[r,n]=f.useState(!t),[s,o]=f.useState(""),[a,l]=f.useState(""),[c,u]=f.useState(!1),d=Br(),{toast:h}=dn(),m=async g=>{try{const{data:w}=await ee.from("user_roles").select("role").eq("user_id",g).maybeSingle(),x=localStorage.getItem("discovery_messages");x?await p(g,x):(w==null?void 0:w.role)==="admin"?d("/admin"):d("/dashboard")}catch(w){console.error("Error checking role:",w),d("/dashboard")}};f.useEffect(()=>{const{data:{subscription:g}}=ee.auth.onAuthStateChange((w,x)=>{x&&m(x.user.id)});return ee.auth.getSession().then(({data:{session:w}})=>{w&&m(w.user.id)}),()=>g.unsubscribe()},[d]);const p=async(g,w)=>{try{const x=JSON.parse(w),{data:y,error:v}=await ee.from("projects").insert({name:"Mon projet CRM",user_id:g,status:"discovery"}).select().single();if(v)throw v;const j=x.map(C=>({project_id:y.id,role:C.role,content:C.content}));await ee.from("messages").insert(j),localStorage.removeItem("discovery_messages"),h({title:"Projet sauvegardé !",description:"Votre conversation a été enregistrée."}),d(`/project/${y.id}`)}catch(x){console.error("Error saving project:",x),h({title:"Erreur",description:"Impossible de sauvegarder le projet",variant:"destructive"}),d("/dashboard")}},b=async g=>{g.preventDefault(),u(!0);try{if(r){const{error:w}=await ee.auth.signInWithPassword({email:s,password:a});if(w)throw w;h({title:"Connexion réussie",description:"Bienvenue !"})}else{const{error:w}=await ee.auth.signUp({email:s,password:a,options:{emailRedirectTo:`${window.location.origin}/dashboard`}});if(w)throw w;h({title:"Compte créé",description:"Vous êtes maintenant connecté."})}}catch(w){let x="Une erreur est survenue";w.message.includes("Invalid login credentials")?x="Email ou mot de passe incorrect":w.message.includes("User already registered")?(x="Cet email est déjà utilisé. Connectez-vous.",n(!0)):w.message.includes("Password should be")&&(x="Le mot de passe doit contenir au moins 6 caractères"),h({title:"Erreur",description:x,variant:"destructive"})}finally{u(!1)}};return i.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:[i.jsx("div",{className:"absolute inset-0 bg-hero-gradient opacity-30"}),i.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-primary/10 rounded-full blur-[128px]"}),i.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-full blur-[128px]"}),i.jsxs("div",{className:"relative w-full max-w-md",children:[i.jsxs(F,{variant:"ghost",className:"absolute -top-16 left-0",onClick:()=>d("/"),children:[i.jsx(As,{className:"w-4 h-4 mr-2"}),"Retour"]}),i.jsxs("div",{className:"glass rounded-2xl p-8",children:[i.jsxs("div",{className:"flex items-center justify-center gap-2 mb-8",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-primary to-accent flex items-center justify-center",children:i.jsx("span",{className:"text-primary-foreground font-bold text-xl",children:"C"})}),i.jsxs("span",{className:"font-display font-bold text-2xl text-foreground",children:["CRM",i.jsx("span",{className:"text-primary",children:"SurMesure"})]})]}),i.jsx("h1",{className:"font-display font-bold text-2xl text-center mb-2",children:r?"Connexion":"Créer un compte"}),i.jsx("p",{className:"text-muted-foreground text-center mb-8",children:t?"Créez votre compte pour sauvegarder votre projet":r?"Accédez à votre espace client":"Rejoignez-nous et démarrez votre projet CRM"}),i.jsxs("form",{onSubmit:b,className:"space-y-6",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(nt,{htmlFor:"email",children:"Email"}),i.jsxs("div",{className:"relative",children:[i.jsx(Il,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),i.jsx(_t,{id:"email",type:"email",placeholder:"vous@entreprise.com",value:s,onChange:g=>o(g.target.value),className:"pl-10",required:!0})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(nt,{htmlFor:"password",children:"Mot de passe"}),i.jsxs("div",{className:"relative",children:[i.jsx(uI,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),i.jsx(_t,{id:"password",type:"password",placeholder:"••••••••",value:a,onChange:g=>l(g.target.value),className:"pl-10",required:!0,minLength:6})]})]}),i.jsx(F,{type:"submit",variant:"hero",className:"w-full",size:"lg",disabled:c,children:c?"Chargement...":r?"Se connecter":"Créer mon compte"})]}),i.jsx("div",{className:"mt-6 text-center",children:i.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",onClick:()=>n(!r),children:r?"Pas encore de compte ? Inscrivez-vous":"Déjà un compte ? Connectez-vous"})})]})]})]})},mU={discovery:"Découverte",pending:"En attente",in_progress:"En cours",completed:"Terminé"},fU={discovery:"bg-primary/20 text-primary",pending:"bg-yellow-500/20 text-yellow-400",in_progress:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400"},pU=()=>{const[e,t]=f.useState(null),[r,n]=f.useState([]),[s,o]=f.useState(!0),a=Br();f.useEffect(()=>{const{data:{subscription:h}}=ee.auth.onAuthStateChange((m,p)=>{p?t(p.user):a("/auth")});return ee.auth.getSession().then(({data:{session:m}})=>{m?(t(m.user),l()):a("/auth")}),()=>h.unsubscribe()},[a]);const l=async()=>{const{data:h,error:m}=await ee.from("projects").select("*").order("updated_at",{ascending:!1});!m&&h&&n(h),o(!1)},c=async()=>{await ee.auth.signOut(),a("/")},u=async()=>{const{data:h,error:m}=await ee.from("projects").insert({name:"Nouveau projet CRM",user_id:e==null?void 0:e.id}).select().single();!m&&h&&a(`/project/${h.id}`)},d=h=>new Date(h).toLocaleDateString("fr-FR",{day:"numeric",month:"short",year:"numeric"});return s?i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Chargement..."})}):i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("header",{className:"border-b border-border/30 glass",children:i.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:i.jsxs("div",{className:"flex items-center justify-between h-16 lg:h-20",children:[i.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-primary to-accent flex items-center justify-center",children:i.jsx("span",{className:"text-primary-foreground font-bold text-lg",children:"C"})}),i.jsxs("span",{className:"font-display font-bold text-xl text-foreground",children:["CRM",i.jsx("span",{className:"text-primary",children:"SurMesure"})]})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("span",{className:"text-sm text-muted-foreground hidden sm:block",children:e==null?void 0:e.email}),i.jsx(F,{variant:"ghost",size:"sm",onClick:c,children:i.jsx(GS,{className:"w-4 h-4"})})]})]})})}),i.jsxs("main",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-8 lg:py-12",children:[i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"font-display font-bold text-3xl lg:text-4xl mb-2",children:"Mes Projets"}),i.jsx("p",{className:"text-muted-foreground",children:"Gérez vos projets CRM et suivez leur avancement"})]}),i.jsxs(F,{variant:"hero",onClick:u,children:[i.jsx(ia,{className:"w-4 h-4"}),"Nouveau projet"]})]}),r.length===0?i.jsxs("div",{className:"glass rounded-2xl p-12 text-center",children:[i.jsx("div",{className:"w-16 h-16 rounded-2xl bg-primary/20 flex items-center justify-center mx-auto mb-6",children:i.jsx(kn,{className:"w-8 h-8 text-primary"})}),i.jsx("h2",{className:"font-display font-semibold text-xl mb-3",children:"Aucun projet pour le moment"}),i.jsx("p",{className:"text-muted-foreground mb-6 max-w-md mx-auto",children:"Démarrez votre premier projet CRM et discutez avec notre IA pour définir vos besoins."}),i.jsxs(F,{variant:"hero",onClick:u,children:[i.jsx(ia,{className:"w-4 h-4"}),"Démarrer mon projet"]})]}):i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:r.map(h=>i.jsxs("div",{className:"glass rounded-2xl p-6 cursor-pointer glass-hover group",onClick:()=>a(`/project/${h.id}`),children:[i.jsxs("div",{className:"flex items-start justify-between mb-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-primary/20 to-accent/20 flex items-center justify-center group-hover:scale-110 transition-transform",children:i.jsx(kn,{className:"w-6 h-6 text-primary"})}),i.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-medium ${fU[h.status]}`,children:mU[h.status]})]}),i.jsx("h3",{className:"font-display font-semibold text-lg mb-2 group-hover:text-primary transition-colors",children:h.name}),h.summary&&i.jsx("p",{className:"text-sm text-muted-foreground mb-4 line-clamp-2",children:h.summary}),i.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx($i,{className:"w-3 h-3"}),i.jsxs("span",{children:["Mis à jour le ",d(h.updated_at)]})]})]},h.id))})]})]})},dw="https://xijyfkgwbabbivysrlkr.supabase.co/functions/v1/crm-consultant",gU=()=>{var j;const e=Br(),{toast:t}=dn(),r=f.useRef(null),[n,s]=f.useState([]),[o,a]=f.useState(""),[l,c]=f.useState(!1),[u,d]=f.useState(!1),[h,m]=f.useState(0);f.useEffect(()=>{var C;(C=r.current)==null||C.scrollIntoView({behavior:"smooth"})},[n]),f.useEffect(()=>{const C=localStorage.getItem("discovery_messages");if(C){const S=JSON.parse(C);s(S),m(S.filter(N=>N.role==="user").length),d(!0)}},[]),f.useEffect(()=>{n.length>0&&localStorage.setItem("discovery_messages",JSON.stringify(n))},[n]);const p=async()=>{d(!0),c(!0);try{const C=await fetch(dw,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:[]})});if(!C.ok)throw new Error("Failed to start conversation");let S="";await b(C,N=>{S+=N,s([{id:"assistant-0",role:"assistant",content:S}])})}catch(C){console.error("Error starting conversation:",C),t({title:"Erreur",description:"Impossible de démarrer la conversation. Veuillez réessayer.",variant:"destructive"}),d(!1)}finally{c(!1)}},b=async(C,S)=>{var T,O,A,q;const N=(T=C.body)==null?void 0:T.getReader();if(!N)return;const R=new TextDecoder;let k="";for(;;){const{done:I,value:X}=await N.read();if(I)break;k+=R.decode(X,{stream:!0});let V;for(;(V=k.indexOf(`
`))!==-1;){let z=k.slice(0,V);if(k=k.slice(V+1),z.endsWith("\r")&&(z=z.slice(0,-1)),z.startsWith(":")||z.trim()===""||!z.startsWith("data: "))continue;const P=z.slice(6).trim();if(P==="[DONE]")break;try{const D=(q=(A=(O=JSON.parse(P).choices)==null?void 0:O[0])==null?void 0:A.delta)==null?void 0:q.content;D&&S(D)}catch{}}}},g=async()=>{if(!o.trim()||l)return;const C=o.trim();a(""),c(!0);const S=h+1;m(S);const N={id:`user-${Date.now()}`,role:"user",content:C},R=[...n,N];s(R);try{const k=R.map(q=>({role:q.role,content:q.content})),T=await fetch(dw,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:k})});if(!T.ok){const q=await T.json();throw new Error(q.error||"Failed to get response")}let O="";const A=`assistant-${Date.now()}`;await b(T,q=>{O+=q,s([...R,{id:A,role:"assistant",content:O}])})}catch(k){console.error("Error sending message:",k),t({title:"Erreur",description:k.message||"Impossible d'envoyer le message",variant:"destructive"})}finally{c(!1)}},w=C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),g())},x=()=>{e("/auth?from=discovery")},y=()=>{localStorage.removeItem("discovery_messages"),s([]),m(0),d(!1)},v=h>=3;return u?i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"Découverte Projet CRM | Consultant IA | CRM Sur Mesure"}),i.jsx("meta",{name:"description",content:"Démarrez votre projet CRM sur mesure avec notre consultant IA. Découvrez vos besoins en 5 minutes sans engagement."}),i.jsx("meta",{name:"robots",content:"noindex, follow"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/discovery"})]}),i.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[i.jsx("header",{className:"border-b border-border/30 glass sticky top-0 z-10",children:i.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:i.jsxs("div",{className:"flex items-center justify-between h-16",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(F,{variant:"ghost",size:"sm",onClick:()=>e("/"),children:i.jsx(As,{className:"w-4 h-4"})}),i.jsxs("div",{children:[i.jsx("h1",{className:"font-display font-semibold text-lg",children:"Découverte de votre projet"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Discussion avec notre consultant IA"})]})]}),i.jsx(F,{variant:"ghost",size:"sm",onClick:y,children:"Recommencer"})]})})}),i.jsx("main",{className:"flex-1 overflow-y-auto",children:i.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-6 max-w-3xl",children:[i.jsxs("div",{className:"space-y-6",children:[n.map(C=>i.jsxs("div",{className:`flex gap-4 ${C.role==="user"?"flex-row-reverse":""}`,children:[i.jsx("div",{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center ${C.role==="assistant"?"bg-gradient-to-br from-primary to-accent":"bg-secondary"}`,children:C.role==="assistant"?i.jsx(bi,{className:"w-5 h-5 text-primary-foreground"}):i.jsx(kv,{className:"w-5 h-5 text-secondary-foreground"})}),i.jsx("div",{className:`flex-1 ${C.role==="user"?"text-right":""}`,children:i.jsx("div",{className:`inline-block rounded-2xl px-4 py-3 max-w-[85%] ${C.role==="assistant"?"glass text-left":"bg-primary text-primary-foreground"}`,children:i.jsx("p",{className:"whitespace-pre-wrap",children:C.content})})})]},C.id)),l&&((j=n[n.length-1])==null?void 0:j.role)!=="assistant"&&i.jsxs("div",{className:"flex gap-4",children:[i.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-xl bg-gradient-to-br from-primary to-accent flex items-center justify-center",children:i.jsx(bi,{className:"w-5 h-5 text-primary-foreground"})}),i.jsx("div",{className:"glass rounded-2xl px-4 py-3",children:i.jsxs("div",{className:"flex gap-1",children:[i.jsx("span",{className:"w-2 h-2 bg-primary rounded-full animate-bounce",style:{animationDelay:"0ms"}}),i.jsx("span",{className:"w-2 h-2 bg-primary rounded-full animate-bounce",style:{animationDelay:"150ms"}}),i.jsx("span",{className:"w-2 h-2 bg-primary rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})]}),i.jsx("div",{ref:r})]}),v&&!l&&i.jsxs("div",{className:"mt-8 p-6 glass rounded-2xl text-center",children:[i.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:"Envie de sauvegarder votre projet ?"}),i.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Créez un compte pour conserver cette conversation et recevoir votre devis personnalisé."}),i.jsx(F,{variant:"hero",onClick:x,children:"Créer mon compte et sauvegarder"})]})]})}),i.jsx("footer",{className:"border-t border-border/30 glass sticky bottom-0",children:i.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-4 max-w-3xl",children:i.jsxs("div",{className:"flex gap-3",children:[i.jsx(_t,{value:o,onChange:C=>a(C.target.value),onKeyDown:w,placeholder:"Décrivez vos besoins CRM...",disabled:l,className:"flex-1"}),i.jsx(F,{variant:"hero",size:"icon",onClick:g,disabled:l||!o.trim(),children:i.jsx(_v,{className:"w-4 h-4"})})]})})})]})]}):i.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"Découverte Projet CRM | Consultant IA | CRM Sur Mesure"}),i.jsx("meta",{name:"description",content:"Démarrez votre projet CRM sur mesure avec notre consultant IA. Découvrez vos besoins en 5 minutes sans engagement."}),i.jsx("meta",{name:"robots",content:"noindex, follow"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/discovery"})]}),i.jsx("div",{className:"absolute inset-0 bg-hero-gradient opacity-30"}),i.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-primary/10 rounded-full blur-[128px]"}),i.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-full blur-[128px]"}),i.jsxs("div",{className:"relative max-w-2xl mx-auto text-center",children:[i.jsxs(F,{variant:"ghost",className:"absolute -top-16 left-0",onClick:()=>e("/"),children:[i.jsx(As,{className:"w-4 h-4 mr-2"}),"Retour"]}),i.jsx("div",{className:"w-20 h-20 rounded-2xl bg-gradient-to-br from-primary to-accent flex items-center justify-center mx-auto mb-8",children:i.jsx(bi,{className:"w-10 h-10 text-primary-foreground"})}),i.jsxs("h1",{className:"font-display font-bold text-3xl sm:text-4xl lg:text-5xl mb-6",children:["Parlons de votre ",i.jsx("span",{className:"text-gradient",children:"projet CRM"})]}),i.jsx("p",{className:"text-lg text-muted-foreground mb-8 max-w-xl mx-auto",children:"Notre consultant IA va vous poser quelques questions pour comprendre vos besoins. Pas besoin de créer de compte, on s'en occupe après !"}),i.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:i.jsxs(F,{variant:"hero",size:"xl",onClick:p,children:[i.jsx(JS,{className:"w-5 h-5"}),"Commencer la discussion"]})}),i.jsx("p",{className:"text-sm text-muted-foreground mt-8",children:"⏱️ Environ 5 minutes • 💬 Sans engagement"})]})]})},hw="https://xijyfkgwbabbivysrlkr.supabase.co/functions/v1/crm-consultant",vU=()=>{var v;const{id:e}=Yv(),t=Br(),{toast:r}=dn(),n=f.useRef(null),[s,o]=f.useState(null),[a,l]=f.useState([]),[c,u]=f.useState(""),[d,h]=f.useState(!1),[m,p]=f.useState(!0);f.useEffect(()=>{(async()=>{const{data:{session:C}}=await ee.auth.getSession();if(!C){t("/auth");return}b()})()},[e,t]),f.useEffect(()=>{var j;(j=n.current)==null||j.scrollIntoView({behavior:"smooth"})},[a]);const b=async()=>{if(!e)return;const{data:j,error:C}=await ee.from("projects").select("*").eq("id",e).maybeSingle();if(C||!j){r({title:"Projet non trouvé",variant:"destructive"}),t("/dashboard");return}o(j);const{data:S}=await ee.from("messages").select("*").eq("project_id",e).order("created_at",{ascending:!0});S&&S.length>0?l(S):g(),p(!1)},g=async()=>{h(!0);try{const j=await fetch(hw,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inhpanlma2d3YmFiYml2eXNybGtyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjY5NDUzNjIsImV4cCI6MjA4MjUyMTM2Mn0.iI0dQKsag_yxHOFr3BGOgX9-IXTGZXT8WUp8hYG6F0Y"},body:JSON.stringify({messages:[]})});if(!j.ok)throw new Error("Failed to start conversation");let C="";await w(j,N=>{C+=N,l([{id:"temp-assistant",role:"assistant",content:C,created_at:new Date().toISOString()}])});const{data:S}=await ee.from("messages").insert({project_id:e,role:"assistant",content:C}).select().single();S&&l([S])}catch(j){console.error("Error starting conversation:",j),r({title:"Erreur",description:"Impossible de démarrer la conversation",variant:"destructive"})}finally{h(!1)}},w=async(j,C)=>{var k,T,O,A;const S=(k=j.body)==null?void 0:k.getReader();if(!S)return;const N=new TextDecoder;let R="";for(;;){const{done:q,value:I}=await S.read();if(q)break;R+=N.decode(I,{stream:!0});let X;for(;(X=R.indexOf(`
`))!==-1;){let V=R.slice(0,X);if(R=R.slice(X+1),V.endsWith("\r")&&(V=V.slice(0,-1)),V.startsWith(":")||V.trim()===""||!V.startsWith("data: "))continue;const z=V.slice(6).trim();if(z==="[DONE]")break;try{const _=(A=(O=(T=JSON.parse(z).choices)==null?void 0:T[0])==null?void 0:O.delta)==null?void 0:A.content;_&&C(_)}catch{}}}},x=async()=>{if(!c.trim()||d||!e)return;const j=c.trim();u(""),h(!0);const C={id:"temp-user",role:"user",content:j,created_at:new Date().toISOString()};l(S=>[...S,C]),await ee.from("messages").insert({project_id:e,role:"user",content:j});try{const S=a.map(O=>({role:O.role,content:O.content}));S.push({role:"user",content:j});const N=await fetch(hw,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inhpanlma2d3YmFiYml2eXNybGtyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjY5NDUzNjIsImV4cCI6MjA4MjUyMTM2Mn0.iI0dQKsag_yxHOFr3BGOgX9-IXTGZXT8WUp8hYG6F0Y"},body:JSON.stringify({messages:S})});if(!N.ok){const O=await N.json();throw new Error(O.error||"Failed to get response")}let R="";const k="temp-assistant-"+Date.now();await w(N,O=>{R+=O,l(A=>[...A.filter(I=>!I.id.startsWith("temp-assistant-")),{id:k,role:"assistant",content:R,created_at:new Date().toISOString()}])}),await ee.from("messages").insert({project_id:e,role:"assistant",content:R});const{data:T}=await ee.from("messages").select("*").eq("project_id",e).order("created_at",{ascending:!0});T&&l(T)}catch(S){console.error("Error sending message:",S),r({title:"Erreur",description:S.message||"Impossible d'envoyer le message",variant:"destructive"})}finally{h(!1)}},y=j=>{j.key==="Enter"&&!j.shiftKey&&(j.preventDefault(),x())};return m?i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Chargement..."})}):i.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[i.jsx("header",{className:"border-b border-border/30 glass sticky top-0 z-10",children:i.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:i.jsxs("div",{className:"flex items-center gap-4 h-16",children:[i.jsx(F,{variant:"ghost",size:"sm",onClick:()=>t("/dashboard"),children:i.jsx(As,{className:"w-4 h-4"})}),i.jsxs("div",{children:[i.jsx("h1",{className:"font-display font-semibold text-lg",children:(s==null?void 0:s.name)||"Projet CRM"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Discussion avec notre consultant IA"})]})]})})}),i.jsx("main",{className:"flex-1 overflow-y-auto",children:i.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-6 max-w-3xl",children:i.jsxs("div",{className:"space-y-6",children:[a.map(j=>i.jsxs("div",{className:`flex gap-4 ${j.role==="user"?"flex-row-reverse":""}`,children:[i.jsx("div",{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center ${j.role==="assistant"?"bg-gradient-to-br from-primary to-accent":"bg-secondary"}`,children:j.role==="assistant"?i.jsx(bi,{className:"w-5 h-5 text-primary-foreground"}):i.jsx(kv,{className:"w-5 h-5 text-secondary-foreground"})}),i.jsx("div",{className:`flex-1 ${j.role==="user"?"text-right":""}`,children:i.jsx("div",{className:`inline-block rounded-2xl px-4 py-3 max-w-[85%] ${j.role==="assistant"?"glass text-left":"bg-primary text-primary-foreground"}`,children:i.jsx("p",{className:"whitespace-pre-wrap",children:j.content})})})]},j.id)),d&&((v=a[a.length-1])==null?void 0:v.role)!=="assistant"&&i.jsxs("div",{className:"flex gap-4",children:[i.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-xl bg-gradient-to-br from-primary to-accent flex items-center justify-center",children:i.jsx(bi,{className:"w-5 h-5 text-primary-foreground"})}),i.jsx("div",{className:"glass rounded-2xl px-4 py-3",children:i.jsxs("div",{className:"flex gap-1",children:[i.jsx("span",{className:"w-2 h-2 bg-primary rounded-full animate-bounce",style:{animationDelay:"0ms"}}),i.jsx("span",{className:"w-2 h-2 bg-primary rounded-full animate-bounce",style:{animationDelay:"150ms"}}),i.jsx("span",{className:"w-2 h-2 bg-primary rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})]}),i.jsx("div",{ref:n})]})})}),i.jsx("footer",{className:"border-t border-border/30 glass sticky bottom-0",children:i.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-4 max-w-3xl",children:i.jsxs("div",{className:"flex gap-3",children:[i.jsx(_t,{value:c,onChange:j=>u(j.target.value),onKeyDown:y,placeholder:"Décrivez vos besoins CRM...",disabled:d,className:"flex-1"}),i.jsx(F,{variant:"hero",size:"icon",onClick:x,disabled:d||!c.trim(),children:i.jsx(_v,{className:"w-4 h-4"})})]})})})]})};function Px(){const[e,t]=f.useState(null),[r,n]=f.useState(null),[s,o]=f.useState(null),[a,l]=f.useState(!0);f.useEffect(()=>{const{data:{subscription:m}}=ee.auth.onAuthStateChange((p,b)=>{n(b),t((b==null?void 0:b.user)??null),b!=null&&b.user?setTimeout(()=>{c(b.user.id)},0):(o(null),l(!1))});return ee.auth.getSession().then(({data:{session:p}})=>{n(p),t((p==null?void 0:p.user)??null),p!=null&&p.user?c(p.user.id):l(!1)}),()=>m.unsubscribe()},[]);const c=async m=>{try{const{data:p,error:b}=await ee.from("user_roles").select("role").eq("user_id",m).maybeSingle();b?(console.error("Error fetching role:",b),o("user")):o((p==null?void 0:p.role)||"user")}catch(p){console.error("Error fetching role:",p),o("user")}finally{l(!1)}};return{user:e,session:r,role:s,isLoading:a,isAdmin:s==="admin",isAuthenticated:!!r,signIn:async(m,p)=>{const{error:b}=await ee.auth.signInWithPassword({email:m,password:p});return{error:b}},signUp:async(m,p)=>{const b=`${window.location.origin}/`,{error:g}=await ee.auth.signUp({email:m,password:p,options:{emailRedirectTo:b}});return{error:g}},signOut:async()=>{const{error:m}=await ee.auth.signOut();return{error:m}}}}const xU=()=>{var b;const e=Br(),{toast:t}=dn(),{user:r,role:n,isLoading:s,signOut:o}=Px(),[a,l]=f.useState({totalProjects:0,totalContacts:0,newContacts:0,totalArticles:0,publishedArticles:0}),[c,u]=f.useState(!0);f.useEffect(()=>{if(!s){if(!r){e("/auth");return}if(n!=="admin"){e("/dashboard");return}d()}},[r,n,s,e]);const d=async()=>{try{const[g,w,x,y,v]=await Promise.all([ee.from("projects").select("id",{count:"exact",head:!0}),ee.from("blog_articles").select("id",{count:"exact",head:!0}),ee.from("blog_articles").select("id",{count:"exact",head:!0}).eq("published",!0),ee.from("contact_requests").select("id",{count:"exact",head:!0}),ee.from("contact_requests").select("id",{count:"exact",head:!0}).eq("status","new")]);l({totalProjects:g.count||0,totalContacts:y.count||0,newContacts:v.count||0,totalArticles:w.count||0,publishedArticles:x.count||0})}catch(g){console.error("Error fetching stats:",g)}finally{u(!1)}},h=async()=>{const{error:g}=await o();g?t({title:"Erreur",description:"Impossible de se déconnecter.",variant:"destructive"}):e("/")};if(s)return i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})});if(n!=="admin")return null;const m=[{icon:B0,label:"Dashboard",href:"/admin",active:!0},{icon:V0,label:"Demandes de contact",href:"/admin/contacts"},{icon:kn,label:"Interactions clients",href:"/admin/interactions"},{icon:mr,label:"Articles Blog",href:"/blog/admin"},{icon:z0,label:"Projets clients",href:"/admin/projects"}],p=[{label:"Nouvelles demandes",value:a.newContacts,icon:V0,color:"from-red-500 to-red-600",href:"/admin/contacts"},{label:"Total demandes",value:a.totalContacts,icon:vt,color:"from-blue-500 to-blue-600",href:"/admin/contacts"},{label:"Projets clients",value:a.totalProjects,icon:z0,color:"from-purple-500 to-purple-600",href:"/admin/interactions"},{label:"Articles publiés",value:a.publishedArticles,icon:mr,color:"from-green-500 to-green-600",href:"/blog/admin"}];return i.jsxs("div",{className:"min-h-screen bg-background flex",children:[i.jsxs("aside",{className:"w-64 bg-card border-r border-border flex flex-col",children:[i.jsx("div",{className:"p-6 border-b border-border",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-primary to-accent flex items-center justify-center",children:i.jsx("span",{className:"text-primary-foreground font-bold text-lg",children:"C"})}),i.jsxs("div",{children:[i.jsx("span",{className:"font-bold text-foreground",children:"Admin"}),i.jsx("span",{className:"text-xs text-muted-foreground block",children:"CRMSurMesure"})]})]})}),i.jsx("nav",{className:"flex-1 p-4 space-y-1",children:m.map(g=>i.jsxs(G,{to:g.href,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-colors ${g.active?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-secondary hover:text-foreground"}`,children:[i.jsx(g.icon,{className:"w-5 h-5"}),g.label]},g.label))}),i.jsxs("div",{className:"p-4 border-t border-border",children:[i.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 mb-4",children:[i.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center",children:i.jsx("span",{className:"text-primary font-medium text-sm",children:(b=r==null?void 0:r.email)==null?void 0:b.charAt(0).toUpperCase()})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-sm font-medium truncate",children:r==null?void 0:r.email}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Administrateur"})]})]}),i.jsxs(F,{variant:"ghost",className:"w-full justify-start gap-3 text-muted-foreground hover:text-foreground",onClick:h,children:[i.jsx(GS,{className:"w-5 h-5"}),"Déconnexion"]})]})]}),i.jsx("main",{className:"flex-1 p-8",children:i.jsxs("div",{className:"max-w-6xl mx-auto",children:[i.jsxs("div",{className:"mb-8",children:[i.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Tableau de bord Admin"}),i.jsx("p",{className:"text-muted-foreground",children:"Bienvenue dans l'espace d'administration de CRMSurMesure."})]}),i.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:p.map(g=>i.jsxs(G,{to:g.href,className:"glass rounded-2xl p-6 hover:border-primary/30 transition-colors",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsx("div",{className:`w-12 h-12 rounded-xl bg-gradient-to-br ${g.color} flex items-center justify-center`,children:i.jsx(g.icon,{className:"w-6 h-6 text-white"})}),c?i.jsx("div",{className:"w-12 h-8 bg-muted rounded animate-pulse"}):i.jsx("span",{className:"text-3xl font-bold",children:g.value})]}),i.jsx("p",{className:"text-muted-foreground",children:g.label})]},g.label))}),i.jsxs("div",{className:"glass rounded-2xl p-6",children:[i.jsx("h2",{className:"text-xl font-semibold mb-6",children:"Actions rapides"}),i.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-4",children:[i.jsxs(G,{to:"/blog/admin/new",className:"p-4 rounded-xl bg-secondary/50 hover:bg-secondary transition-colors text-center",children:[i.jsx(mr,{className:"w-8 h-8 mx-auto mb-2 text-primary"}),i.jsx("span",{className:"font-medium",children:"Nouvel article"})]}),i.jsxs(G,{to:"/blog/admin",className:"p-4 rounded-xl bg-secondary/50 hover:bg-secondary transition-colors text-center",children:[i.jsx(B0,{className:"w-8 h-8 mx-auto mb-2 text-primary"}),i.jsx("span",{className:"font-medium",children:"Gérer le blog"})]}),i.jsxs(G,{to:"/blog",target:"_blank",className:"p-4 rounded-xl bg-secondary/50 hover:bg-secondary transition-colors text-center",children:[i.jsx(nh,{className:"w-8 h-8 mx-auto mb-2 text-primary"}),i.jsx("span",{className:"font-medium",children:"Voir le site"})]}),i.jsxs(G,{to:"/",target:"_blank",className:"p-4 rounded-xl bg-secondary/50 hover:bg-secondary transition-colors text-center",children:[i.jsx(Fi,{className:"w-8 h-8 mx-auto mb-2 text-primary"}),i.jsx("span",{className:"font-medium",children:"Page d'accueil"})]})]})]})]})})]})},yU=eh("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ou({className:e,variant:t,...r}){return i.jsx("div",{className:te(yU({variant:t}),e),...r})}const bU={crm:"CRM / Gestion clients",sales:"Pipeline de ventes",automation:"Automatisation",reporting:"Reporting & Analytics",integration:"Intégration outils",other:"Autre"},mw={"3000-5000":"3 000€ - 5 000€","5000-10000":"5 000€ - 10 000€","10000-20000":"10 000€ - 20 000€","20000+":"20 000€ +",unknown:"Non défini"},wU={asap:"Dès que possible","1-2months":"1-2 mois","3-6months":"3-6 mois",flexible:"Flexible"},Yn={new:{label:"Nouveau",color:"bg-blue-500/20 text-blue-400",icon:$i},contacted:{label:"Contacté",color:"bg-yellow-500/20 text-yellow-400",icon:kn},qualified:{label:"Qualifié",color:"bg-green-500/20 text-green-400",icon:HS},closed:{label:"Fermé",color:"bg-gray-500/20 text-gray-400",icon:QO}},jU=()=>{var x,y;const e=Br(),{toast:t}=dn(),{user:r,role:n,isLoading:s}=Px(),[o,a]=f.useState([]),[l,c]=f.useState(!0),[u,d]=f.useState(null),[h,m]=f.useState("all");f.useEffect(()=>{if(!s){if(!r){e("/auth");return}if(n!=="admin"){e("/dashboard");return}p()}},[r,n,s,e]);const p=async()=>{try{const{data:v,error:j}=await ee.from("contact_requests").select("*").order("created_at",{ascending:!1});if(j)throw j;a(v||[])}catch(v){console.error("Error fetching contacts:",v),t({title:"Erreur",description:"Impossible de charger les demandes de contact.",variant:"destructive"})}finally{c(!1)}},b=async(v,j)=>{var C;try{const{error:S}=await ee.from("contact_requests").update({status:j}).eq("id",v);if(S)throw S;a(N=>N.map(R=>R.id===v?{...R,status:j}:R)),(u==null?void 0:u.id)===v&&d(N=>N?{...N,status:j}:null),t({title:"Statut mis à jour",description:`Le statut a été changé en "${(C=Yn[j])==null?void 0:C.label}".`})}catch{t({title:"Erreur",description:"Impossible de mettre à jour le statut.",variant:"destructive"})}},g=async(v,j)=>{try{const{error:C}=await ee.from("contact_requests").update({notes:j}).eq("id",v);if(C)throw C;a(S=>S.map(N=>N.id===v?{...N,notes:j}:N)),t({title:"Notes sauvegardées"})}catch{t({title:"Erreur",description:"Impossible de sauvegarder les notes.",variant:"destructive"})}},w=h==="all"?o:o.filter(v=>v.status===h);return s||l?i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):n!=="admin"?null:i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsxs("div",{className:"container mx-auto px-4 py-8",children:[i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(F,{variant:"ghost",size:"icon",onClick:()=>e("/admin"),children:i.jsx(As,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("h1",{className:"text-3xl font-bold",children:"Demandes de contact"}),i.jsxs("p",{className:"text-muted-foreground",children:[o.length," demande",o.length>1?"s":""," au total"]})]})]}),i.jsxs(ng,{value:h,onValueChange:m,children:[i.jsx(Nd,{className:"w-48",children:i.jsx(sg,{placeholder:"Filtrer par statut"})}),i.jsxs(Rd,{children:[i.jsx(ml,{value:"all",children:"Tous les statuts"}),Object.entries(Yn).map(([v,j])=>i.jsx(ml,{value:v,children:j.label},v))]})]})]}),i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:Object.entries(Yn).map(([v,j])=>{const C=o.filter(S=>S.status===v).length;return i.jsxs("div",{className:"glass rounded-xl p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(j.icon,{className:"w-4 h-4 text-muted-foreground"}),i.jsx("span",{className:"text-sm text-muted-foreground",children:j.label})]}),i.jsx("p",{className:"text-2xl font-bold",children:C})]},v)})}),w.length===0?i.jsx("div",{className:"text-center py-16 glass rounded-2xl",children:i.jsx("p",{className:"text-muted-foreground",children:"Aucune demande de contact."})}):i.jsx("div",{className:"space-y-4",children:w.map(v=>{const j=Yn[v.status]||Yn.new;return i.jsx("div",{className:"glass rounded-xl p-6 hover:border-primary/30 transition-colors cursor-pointer",onClick:()=>d(v),children:i.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[i.jsxs("h3",{className:"font-semibold text-lg",children:[v.first_name," ",v.last_name]}),i.jsx(Ou,{className:j.color,children:j.label})]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm text-muted-foreground",children:[i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(KO,{className:"w-4 h-4"}),v.company]}),i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(Il,{className:"w-4 h-4"}),v.email]}),v.phone&&i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(In,{className:"w-4 h-4"}),v.phone]})]})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs("div",{className:"text-right",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:new Date(v.created_at).toLocaleDateString("fr-FR",{day:"numeric",month:"short",year:"numeric"})}),v.budget&&i.jsx("p",{className:"text-sm font-medium text-primary",children:mw[v.budget]||v.budget})]}),i.jsx(F,{variant:"ghost",size:"icon",children:i.jsx(nh,{className:"w-4 h-4"})})]})]})},v.id)})})]}),i.jsx(lx,{open:!!u,onOpenChange:()=>d(null),children:i.jsx(xh,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:u&&i.jsxs(i.Fragment,{children:[i.jsx(yh,{children:i.jsxs(bh,{className:"flex items-center gap-3",children:[u.first_name," ",u.last_name,i.jsx(Ou,{className:(x=Yn[u.status])==null?void 0:x.color,children:(y=Yn[u.status])==null?void 0:y.label})]})}),i.jsxs("div",{className:"space-y-6 mt-4",children:[i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Email"}),i.jsx("a",{href:`mailto:${u.email}`,className:"text-primary hover:underline",children:u.email})]}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Téléphone"}),u.phone?i.jsx("a",{href:`tel:${u.phone}`,className:"text-primary hover:underline",children:u.phone}):i.jsx("p",{className:"text-muted-foreground",children:"Non renseigné"})]}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Entreprise"}),i.jsx("p",{className:"font-medium",children:u.company})]}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Taille équipe"}),i.jsx("p",{children:u.company_size||"Non renseigné"})]})]}),i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Budget"}),i.jsx("p",{className:"font-medium",children:u.budget?mw[u.budget]||u.budget:"Non renseigné"})]}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Délai"}),i.jsx("p",{children:u.timeline?wU[u.timeline]||u.timeline:"Non renseigné"})]})]}),u.project_types.length>0&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Types de projet"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:u.project_types.map(v=>i.jsx(Ou,{variant:"secondary",children:bU[v]||v},v))})]}),u.message&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Message"}),i.jsx("div",{className:"p-4 bg-secondary/30 rounded-lg",children:i.jsx("p",{className:"whitespace-pre-wrap",children:u.message})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Statut"}),i.jsxs(ng,{value:u.status,onValueChange:v=>b(u.id,v),children:[i.jsx(Nd,{children:i.jsx(sg,{})}),i.jsx(Rd,{children:Object.entries(Yn).map(([v,j])=>i.jsx(ml,{value:v,children:j.label},v))})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Notes internes"}),i.jsx(ii,{value:u.notes||"",onChange:v=>{d({...u,notes:v.target.value})},onBlur:()=>g(u.id,u.notes||""),placeholder:"Ajouter des notes...",rows:3})]}),i.jsxs("div",{className:"flex gap-3",children:[i.jsx(F,{asChild:!0,className:"flex-1",children:i.jsxs("a",{href:`mailto:${u.email}`,children:[i.jsx(Il,{className:"w-4 h-4 mr-2"}),"Envoyer un email"]})}),u.phone&&i.jsx(F,{variant:"outline",asChild:!0,children:i.jsxs("a",{href:`tel:${u.phone}`,children:[i.jsx(In,{className:"w-4 h-4 mr-2"}),"Appeler"]})})]})]})]})})})]})};function CU(e,t){return f.useReducer((r,n)=>t[r][n]??r,e)}var Ax="ScrollArea",[V_,SW]=Ht(Ax),[SU,yr]=V_(Ax),U_=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:o=600,...a}=e,[l,c]=f.useState(null),[u,d]=f.useState(null),[h,m]=f.useState(null),[p,b]=f.useState(null),[g,w]=f.useState(null),[x,y]=f.useState(0),[v,j]=f.useState(0),[C,S]=f.useState(!1),[N,R]=f.useState(!1),k=ue(t,O=>c(O)),T=xc(s);return i.jsx(SU,{scope:r,type:n,dir:T,scrollHideDelay:o,scrollArea:l,viewport:u,onViewportChange:d,content:h,onContentChange:m,scrollbarX:p,onScrollbarXChange:b,scrollbarXEnabled:C,onScrollbarXEnabledChange:S,scrollbarY:g,onScrollbarYChange:w,scrollbarYEnabled:N,onScrollbarYEnabledChange:R,onCornerWidthChange:y,onCornerHeightChange:j,children:i.jsx(re.div,{dir:T,...a,ref:k,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":v+"px",...e.style}})})});U_.displayName=Ax;var B_="ScrollAreaViewport",q_=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...o}=e,a=yr(B_,r),l=f.useRef(null),c=ue(t,l,a.onViewportChange);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),i.jsx(re.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:i.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});q_.displayName=B_;var mn="ScrollAreaScrollbar",Mx=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=yr(mn,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=s,l=e.orientation==="horizontal";return f.useEffect(()=>(l?o(!0):a(!0),()=>{l?o(!1):a(!1)}),[l,o,a]),s.type==="hover"?i.jsx(NU,{...n,ref:t,forceMount:r}):s.type==="scroll"?i.jsx(RU,{...n,ref:t,forceMount:r}):s.type==="auto"?i.jsx(H_,{...n,ref:t,forceMount:r}):s.type==="always"?i.jsx(Ox,{...n,ref:t}):null});Mx.displayName=mn;var NU=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=yr(mn,e.__scopeScrollArea),[o,a]=f.useState(!1);return f.useEffect(()=>{const l=s.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),a(!0)},d=()=>{c=window.setTimeout(()=>a(!1),s.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),i.jsx(It,{present:r||o,children:i.jsx(H_,{"data-state":o?"visible":"hidden",...n,ref:t})})}),RU=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=yr(mn,e.__scopeScrollArea),o=e.orientation==="horizontal",a=Oh(()=>c("SCROLL_END"),100),[l,c]=CU("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return f.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,s.scrollHideDelay,c]),f.useEffect(()=>{const u=s.viewport,d=o?"scrollLeft":"scrollTop";if(u){let h=u[d];const m=()=>{const p=u[d];h!==p&&(c("SCROLL"),a()),h=p};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[s.viewport,o,c,a]),i.jsx(It,{present:r||l!=="hidden",children:i.jsx(Ox,{"data-state":l==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:U(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:U(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),H_=f.forwardRef((e,t)=>{const r=yr(mn,e.__scopeScrollArea),{forceMount:n,...s}=e,[o,a]=f.useState(!1),l=e.orientation==="horizontal",c=Oh(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;a(l?u:d)}},10);return ca(r.viewport,c),ca(r.content,c),i.jsx(It,{present:n||o,children:i.jsx(Ox,{"data-state":o?"visible":"hidden",...s,ref:t})})}),Ox=f.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,s=yr(mn,e.__scopeScrollArea),o=f.useRef(null),a=f.useRef(0),[l,c]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Y_(l.viewport,l.content),d={...n,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:m=>a.current=m};function h(m,p){return AU(m,a.current,l,p)}return r==="horizontal"?i.jsx(EU,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const m=s.viewport.scrollLeft,p=fw(m,l,s.dir);o.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollLeft=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollLeft=h(m,s.dir))}}):r==="vertical"?i.jsx(_U,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const m=s.viewport.scrollTop,p=fw(m,l);o.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollTop=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollTop=h(m))}}):null}),EU=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=yr(mn,e.__scopeScrollArea),[a,l]=f.useState(),c=f.useRef(null),u=ue(t,c,o.onScrollbarXChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),i.jsx(G_,{"data-orientation":"horizontal",...s,ref:u,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Mh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(o.viewport){const m=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),Q_(m,h)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&a&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:_d(a.paddingLeft),paddingEnd:_d(a.paddingRight)}})}})}),_U=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=yr(mn,e.__scopeScrollArea),[a,l]=f.useState(),c=f.useRef(null),u=ue(t,c,o.onScrollbarYChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),i.jsx(G_,{"data-orientation":"vertical",...s,ref:u,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Mh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(o.viewport){const m=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),Q_(m,h)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&a&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:_d(a.paddingTop),paddingEnd:_d(a.paddingBottom)}})}})}),[kU,W_]=V_(mn),G_=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:h,...m}=e,p=yr(mn,r),[b,g]=f.useState(null),w=ue(t,k=>g(k)),x=f.useRef(null),y=f.useRef(""),v=p.viewport,j=n.content-n.viewport,C=Ge(d),S=Ge(c),N=Oh(h,10);function R(k){if(x.current){const T=k.clientX-x.current.left,O=k.clientY-x.current.top;u({x:T,y:O})}}return f.useEffect(()=>{const k=T=>{const O=T.target;(b==null?void 0:b.contains(O))&&C(T,j)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[v,b,j,C]),f.useEffect(S,[n,S]),ca(b,N),ca(p.content,N),i.jsx(kU,{scope:r,scrollbar:b,hasThumb:s,onThumbChange:Ge(o),onThumbPointerUp:Ge(a),onThumbPositionChange:S,onThumbPointerDown:Ge(l),children:i.jsx(re.div,{...m,ref:w,style:{position:"absolute",...m.style},onPointerDown:U(e.onPointerDown,k=>{k.button===0&&(k.target.setPointerCapture(k.pointerId),x.current=b.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),R(k))}),onPointerMove:U(e.onPointerMove,R),onPointerUp:U(e.onPointerUp,k=>{const T=k.target;T.hasPointerCapture(k.pointerId)&&T.releasePointerCapture(k.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=""),x.current=null})})})}),Ed="ScrollAreaThumb",K_=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=W_(Ed,e.__scopeScrollArea);return i.jsx(It,{present:r||s.hasThumb,children:i.jsx(TU,{ref:t,...n})})}),TU=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,o=yr(Ed,r),a=W_(Ed,r),{onThumbPositionChange:l}=a,c=ue(t,h=>a.onThumbChange(h)),u=f.useRef(void 0),d=Oh(()=>{u.current&&(u.current(),u.current=void 0)},100);return f.useEffect(()=>{const h=o.viewport;if(h){const m=()=>{if(d(),!u.current){const p=MU(h,l);u.current=p,l()}};return l(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,d,l]),i.jsx(re.div,{"data-state":a.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:U(e.onPointerDownCapture,h=>{const p=h.target.getBoundingClientRect(),b=h.clientX-p.left,g=h.clientY-p.top;a.onThumbPointerDown({x:b,y:g})}),onPointerUp:U(e.onPointerUp,a.onThumbPointerUp)})});K_.displayName=Ed;var Ix="ScrollAreaCorner",J_=f.forwardRef((e,t)=>{const r=yr(Ix,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?i.jsx(PU,{...e,ref:t}):null});J_.displayName=Ix;var PU=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=yr(Ix,r),[o,a]=f.useState(0),[l,c]=f.useState(0),u=!!(o&&l);return ca(s.scrollbarX,()=>{var h;const d=((h=s.scrollbarX)==null?void 0:h.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),ca(s.scrollbarY,()=>{var h;const d=((h=s.scrollbarY)==null?void 0:h.offsetWidth)||0;s.onCornerWidthChange(d),a(d)}),u?i.jsx(re.div,{...n,ref:t,style:{width:o,height:l,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function _d(e){return e?parseInt(e,10):0}function Y_(e,t){const r=e/t;return isNaN(r)?0:r}function Mh(e){const t=Y_(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function AU(e,t,r,n="ltr"){const s=Mh(r),o=s/2,a=t||o,l=s-a,c=r.scrollbar.paddingStart+a,u=r.scrollbar.size-r.scrollbar.paddingEnd-l,d=r.content-r.viewport,h=n==="ltr"?[0,d]:[d*-1,0];return X_([c,u],h)(e)}function fw(e,t,r="ltr"){const n=Mh(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,a=t.content-t.viewport,l=o-n,c=r==="ltr"?[0,a]:[a*-1,0],u=Xp(e,c);return X_([0,a],[0,l])(u)}function X_(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Q_(e,t){return e>0&&e<t}var MU=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},a=r.left!==o.left,l=r.top!==o.top;(a||l)&&t(),r=o,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Oh(e,t){const r=Ge(e),n=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(n.current),[]),f.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ca(e,t){const r=Ge(t);at(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var Z_=U_,OU=q_,IU=J_;const ek=f.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(Z_,{ref:n,className:te("relative overflow-hidden",e),...r,children:[i.jsx(OU,{className:"h-full w-full rounded-[inherit]",children:t}),i.jsx(tk,{}),i.jsx(IU,{})]}));ek.displayName=Z_.displayName;const tk=f.forwardRef(({className:e,orientation:t="vertical",...r},n)=>i.jsx(Mx,{ref:n,orientation:t,className:te("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:i.jsx(K_,{className:"relative flex-1 rounded-full bg-border"})}));tk.displayName=Mx.displayName;const DU=()=>{const e=Br(),{toast:t}=dn(),{user:r,role:n,isLoading:s}=Px(),[o,a]=f.useState([]),[l,c]=f.useState(!0),[u,d]=f.useState(null),[h,m]=f.useState([]),[p,b]=f.useState(!1),[g,w]=f.useState("");f.useEffect(()=>{if(!s){if(!r){e("/auth");return}if(n!=="admin"){e("/dashboard");return}x()}},[r,n,s,e]);const x=async()=>{try{const{data:S,error:N}=await ee.from("projects").select("*").order("updated_at",{ascending:!1});if(N)throw N;a(S||[])}catch(S){console.error("Error fetching projects:",S),t({title:"Erreur",description:"Impossible de charger les projets.",variant:"destructive"})}finally{c(!1)}},y=async S=>{b(!0);try{const{data:N,error:R}=await ee.from("messages").select("*").eq("project_id",S).order("created_at",{ascending:!0});if(R)throw R;m(N||[])}catch(N){console.error("Error fetching messages:",N),t({title:"Erreur",description:"Impossible de charger les messages.",variant:"destructive"})}finally{b(!1)}},v=async S=>{d(S),await y(S.id)},j=o.filter(S=>{var N;return S.name.toLowerCase().includes(g.toLowerCase())||((N=S.summary)==null?void 0:N.toLowerCase().includes(g.toLowerCase()))}),C={discovery:{label:"Découverte",color:"bg-blue-500/20 text-blue-400"},in_progress:{label:"En cours",color:"bg-yellow-500/20 text-yellow-400"},completed:{label:"Terminé",color:"bg-green-500/20 text-green-400"}};return s||l?i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):n!=="admin"?null:i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsxs("div",{className:"container mx-auto px-4 py-8",children:[i.jsx("div",{className:"flex items-center justify-between mb-8",children:i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(F,{variant:"ghost",size:"icon",onClick:()=>e("/admin"),children:i.jsx(As,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("h1",{className:"text-3xl font-bold",children:"Interactions clients"}),i.jsxs("p",{className:"text-muted-foreground",children:[o.length," projet",o.length>1?"s":""," avec conversations IA"]})]})]})}),i.jsxs("div",{className:"relative mb-6",children:[i.jsx(KS,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),i.jsx(_t,{placeholder:"Rechercher un projet...",value:g,onChange:S=>w(S.target.value),className:"pl-10"})]}),i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-8",children:[i.jsxs("div",{className:"glass rounded-xl p-4",children:[i.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Total projets"}),i.jsx("p",{className:"text-2xl font-bold",children:o.length})]}),i.jsxs("div",{className:"glass rounded-xl p-4",children:[i.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"En découverte"}),i.jsx("p",{className:"text-2xl font-bold",children:o.filter(S=>S.status==="discovery").length})]}),i.jsxs("div",{className:"glass rounded-xl p-4",children:[i.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Actifs ce mois"}),i.jsx("p",{className:"text-2xl font-bold",children:o.filter(S=>{const N=new Date(S.updated_at),R=new Date;return N.getMonth()===R.getMonth()&&N.getFullYear()===R.getFullYear()}).length})]})]}),j.length===0?i.jsxs("div",{className:"text-center py-16 glass rounded-2xl",children:[i.jsx(kn,{className:"w-12 h-12 mx-auto mb-4 text-muted-foreground"}),i.jsx("p",{className:"text-muted-foreground",children:"Aucun projet trouvé."})]}):i.jsx("div",{className:"space-y-3",children:j.map(S=>{const N=C[S.status]||C.discovery;return i.jsx("div",{className:"glass rounded-xl p-5 hover:border-primary/30 transition-colors cursor-pointer",onClick:()=>v(S),children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[i.jsx("h3",{className:"font-semibold",children:S.name}),i.jsx(Ou,{className:N.color,children:N.label})]}),S.summary&&i.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-2",children:S.summary}),i.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(xr,{className:"w-3 h-3"}),"Créé le ",new Date(S.created_at).toLocaleDateString("fr-FR")]}),i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(kn,{className:"w-3 h-3"}),"Mis à jour le ",new Date(S.updated_at).toLocaleDateString("fr-FR")]})]})]}),i.jsx(Ev,{className:"w-5 h-5 text-muted-foreground"})]})},S.id)})})]}),i.jsx(lx,{open:!!u,onOpenChange:()=>d(null),children:i.jsx(xh,{className:"max-w-3xl max-h-[90vh]",children:u&&i.jsxs(i.Fragment,{children:[i.jsx(yh,{children:i.jsxs(bh,{className:"flex items-center gap-3",children:[i.jsx(kn,{className:"w-5 h-5"}),u.name]})}),i.jsxs("div",{className:"mt-4",children:[u.summary&&i.jsxs("div",{className:"p-4 bg-secondary/30 rounded-lg mb-4",children:[i.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Résumé du projet"}),i.jsx("p",{children:u.summary})]}),i.jsxs("p",{className:"text-sm text-muted-foreground mb-3",children:["Conversation avec l'agent IA (",h.length," messages)"]}),p?i.jsx("div",{className:"flex items-center justify-center py-12",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):h.length===0?i.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Aucun message dans cette conversation."}):i.jsx(ek,{className:"h-[400px] pr-4",children:i.jsx("div",{className:"space-y-4",children:h.map(S=>i.jsx("div",{className:`flex ${S.role==="user"?"justify-end":"justify-start"}`,children:i.jsxs("div",{className:`max-w-[80%] rounded-2xl px-4 py-3 ${S.role==="user"?"bg-primary text-primary-foreground":"bg-secondary"}`,children:[i.jsx("p",{className:"text-sm whitespace-pre-wrap",children:S.content}),i.jsx("p",{className:`text-xs mt-2 ${S.role==="user"?"text-primary-foreground/70":"text-muted-foreground"}`,children:new Date(S.created_at).toLocaleString("fr-FR",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})})]})},S.id))})})]})]})})})]})},rk=f.createContext({});function LU(e){const t=f.useRef(null);return t.current===null&&(t.current=e()),t.current}const Dx=typeof window<"u",$U=Dx?f.useLayoutEffect:f.useEffect,Lx=f.createContext(null);function $x(e,t){e.indexOf(t)===-1&&e.push(t)}function Fx(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const un=(e,t,r)=>r>t?t:r<e?e:r;let Ih=()=>{},ua=()=>{};const $n={},nk=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function sk(e){return typeof e=="object"&&e!==null}const ik=e=>/^0[^.\s]+$/u.test(e);function zx(e){let t;return()=>(t===void 0&&(t=e()),t)}const pr=e=>e,FU=(e,t)=>r=>t(e(r)),Cc=(...e)=>e.reduce(FU),Jl=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class Vx{constructor(){this.subscriptions=[]}add(t){return $x(this.subscriptions,t),()=>Fx(this.subscriptions,t)}notify(t,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,r,n);else for(let o=0;o<s;o++){const a=this.subscriptions[o];a&&a(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const on=e=>e*1e3,dr=e=>e/1e3;function ok(e,t){return t?e*(1e3/t):0}const ak=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,zU=1e-7,VU=12;function UU(e,t,r,n,s){let o,a,l=0;do a=t+(r-t)/2,o=ak(a,n,s)-e,o>0?r=a:t=a;while(Math.abs(o)>zU&&++l<VU);return a}function Sc(e,t,r,n){if(e===t&&r===n)return pr;const s=o=>UU(o,0,1,e,r);return o=>o===0||o===1?o:ak(s(o),t,n)}const lk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ck=e=>t=>1-e(1-t),uk=Sc(.33,1.53,.69,.99),Ux=ck(uk),dk=lk(Ux),hk=e=>(e*=2)<1?.5*Ux(e):.5*(2-Math.pow(2,-10*(e-1))),Bx=e=>1-Math.sin(Math.acos(e)),mk=ck(Bx),fk=lk(Bx),BU=Sc(.42,0,1,1),qU=Sc(0,0,.58,1),pk=Sc(.42,0,.58,1),HU=e=>Array.isArray(e)&&typeof e[0]!="number",gk=e=>Array.isArray(e)&&typeof e[0]=="number",pw={linear:pr,easeIn:BU,easeInOut:pk,easeOut:qU,circIn:Bx,circInOut:fk,circOut:mk,backIn:Ux,backInOut:dk,backOut:uk,anticipate:hk},WU=e=>typeof e=="string",gw=e=>{if(gk(e)){ua(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,r,n,s]=e;return Sc(t,r,n,s)}else if(WU(e))return ua(pw[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),pw[e];return e},cu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],vw={value:null,addProjectionMetrics:null};function GU(e,t){let r=new Set,n=new Set,s=!1,o=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(h){a.has(h)&&(d.schedule(h),e()),c++,h(l)}const d={schedule:(h,m=!1,p=!1)=>{const g=p&&s?r:n;return m&&a.add(h),g.has(h)||g.add(h),h},cancel:h=>{n.delete(h),a.delete(h)},process:h=>{if(l=h,s){o=!0;return}s=!0,[r,n]=[n,r],r.forEach(u),t&&vw.value&&vw.value.frameloop[t].push(c),c=0,r.clear(),s=!1,o&&(o=!1,d.process(h))}};return d}const KU=40;function vk(e,t){let r=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>r=!0,a=cu.reduce((v,j)=>(v[j]=GU(o,t?j:void 0),v),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:m,render:p,postRender:b}=a,g=()=>{const v=$n.useManualTiming?s.timestamp:performance.now();r=!1,$n.useManualTiming||(s.delta=n?1e3/60:Math.max(Math.min(v-s.timestamp,KU),1)),s.timestamp=v,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),d.process(s),h.process(s),m.process(s),p.process(s),b.process(s),s.isProcessing=!1,r&&t&&(n=!1,e(g))},w=()=>{r=!0,n=!0,s.isProcessing||e(g)};return{schedule:cu.reduce((v,j)=>{const C=a[j];return v[j]=(S,N=!1,R=!1)=>(r||w(),C.schedule(S,N,R)),v},{}),cancel:v=>{for(let j=0;j<cu.length;j++)a[cu[j]].cancel(v)},state:s,steps:a}}const{schedule:Me,cancel:Is,state:ft,steps:qm}=vk(typeof requestAnimationFrame<"u"?requestAnimationFrame:pr,!0);let Iu;function JU(){Iu=void 0}const kt={now:()=>(Iu===void 0&&kt.set(ft.isProcessing||$n.useManualTiming?ft.timestamp:performance.now()),Iu),set:e=>{Iu=e,queueMicrotask(JU)}},xk=e=>t=>typeof t=="string"&&t.startsWith(e),yk=xk("--"),YU=xk("var(--"),qx=e=>YU(e)?XU.test(e.split("/*")[0].trim()):!1,XU=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function xw(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const _a={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Yl={..._a,transform:e=>un(0,1,e)},uu={..._a,default:1},fl=e=>Math.round(e*1e5)/1e5,Hx=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function QU(e){return e==null}const ZU=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Wx=(e,t)=>r=>!!(typeof r=="string"&&ZU.test(r)&&r.startsWith(e)||t&&!QU(r)&&Object.prototype.hasOwnProperty.call(r,t)),bk=(e,t,r)=>n=>{if(typeof n!="string")return n;const[s,o,a,l]=n.match(Hx);return{[e]:parseFloat(s),[t]:parseFloat(o),[r]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},eB=e=>un(0,255,e),Hm={..._a,transform:e=>Math.round(eB(e))},oi={test:Wx("rgb","red"),parse:bk("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Hm.transform(e)+", "+Hm.transform(t)+", "+Hm.transform(r)+", "+fl(Yl.transform(n))+")"};function tB(e){let t="",r="",n="",s="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),t+=t,r+=r,n+=n,s+=s),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const ig={test:Wx("#"),parse:tB,transform:oi.transform},Nc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Zn=Nc("deg"),an=Nc("%"),J=Nc("px"),rB=Nc("vh"),nB=Nc("vw"),yw={...an,parse:e=>an.parse(e)/100,transform:e=>an.transform(e*100)},wo={test:Wx("hsl","hue"),parse:bk("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+an.transform(fl(t))+", "+an.transform(fl(r))+", "+fl(Yl.transform(n))+")"},Qe={test:e=>oi.test(e)||ig.test(e)||wo.test(e),parse:e=>oi.test(e)?oi.parse(e):wo.test(e)?wo.parse(e):ig.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?oi.transform(e):wo.transform(e),getAnimatableNone:e=>{const t=Qe.parse(e);return t.alpha=0,Qe.transform(t)}},sB=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function iB(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Hx))==null?void 0:t.length)||0)+(((r=e.match(sB))==null?void 0:r.length)||0)>0}const wk="number",jk="color",oB="var",aB="var(",bw="${}",lB=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Xl(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},s=[];let o=0;const l=t.replace(lB,c=>(Qe.test(c)?(n.color.push(o),s.push(jk),r.push(Qe.parse(c))):c.startsWith(aB)?(n.var.push(o),s.push(oB),r.push(c)):(n.number.push(o),s.push(wk),r.push(parseFloat(c))),++o,bw)).split(bw);return{values:r,split:l,indexes:n,types:s}}function Ck(e){return Xl(e).values}function Sk(e){const{split:t,types:r}=Xl(e),n=t.length;return s=>{let o="";for(let a=0;a<n;a++)if(o+=t[a],s[a]!==void 0){const l=r[a];l===wk?o+=fl(s[a]):l===jk?o+=Qe.transform(s[a]):o+=s[a]}return o}}const cB=e=>typeof e=="number"?0:Qe.test(e)?Qe.getAnimatableNone(e):e;function uB(e){const t=Ck(e);return Sk(e)(t.map(cB))}const Ds={test:iB,parse:Ck,createTransformer:Sk,getAnimatableNone:uB};function Wm(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function dB({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let s=0,o=0,a=0;if(!t)s=o=a=r;else{const l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;s=Wm(c,l,e+1/3),o=Wm(c,l,e),a=Wm(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:n}}function kd(e,t){return r=>r>0?t:e}const ze=(e,t,r)=>e+(t-e)*r,Gm=(e,t,r)=>{const n=e*e,s=r*(t*t-n)+n;return s<0?0:Math.sqrt(s)},hB=[ig,oi,wo],mB=e=>hB.find(t=>t.test(e));function ww(e){const t=mB(e);if(Ih(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===wo&&(r=dB(r)),r}const jw=(e,t)=>{const r=ww(e),n=ww(t);if(!r||!n)return kd(e,t);const s={...r};return o=>(s.red=Gm(r.red,n.red,o),s.green=Gm(r.green,n.green,o),s.blue=Gm(r.blue,n.blue,o),s.alpha=ze(r.alpha,n.alpha,o),oi.transform(s))},og=new Set(["none","hidden"]);function fB(e,t){return og.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function pB(e,t){return r=>ze(e,t,r)}function Gx(e){return typeof e=="number"?pB:typeof e=="string"?qx(e)?kd:Qe.test(e)?jw:xB:Array.isArray(e)?Nk:typeof e=="object"?Qe.test(e)?jw:gB:kd}function Nk(e,t){const r=[...e],n=r.length,s=e.map((o,a)=>Gx(o)(o,t[a]));return o=>{for(let a=0;a<n;a++)r[a]=s[a](o);return r}}function gB(e,t){const r={...e,...t},n={};for(const s in r)e[s]!==void 0&&t[s]!==void 0&&(n[s]=Gx(e[s])(e[s],t[s]));return s=>{for(const o in n)r[o]=n[o](s);return r}}function vB(e,t){const r=[],n={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],a=e.indexes[o][n[o]],l=e.values[a]??0;r[s]=l,n[o]++}return r}const xB=(e,t)=>{const r=Ds.createTransformer(t),n=Xl(e),s=Xl(t);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?og.has(e)&&!s.values.length||og.has(t)&&!n.values.length?fB(e,t):Cc(Nk(vB(n,s),s.values),r):(Ih(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),kd(e,t))};function Rk(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?ze(e,t,r):Gx(e)(e,t)}const yB=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Me.update(t,r),stop:()=>Is(t),now:()=>ft.isProcessing?ft.timestamp:kt.now()}},Ek=(e,t,r=10)=>{let n="";const s=Math.max(Math.round(t/r),2);for(let o=0;o<s;o++)n+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Td=2e4;function Kx(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<Td;)t+=r,n=e.next(t);return t>=Td?1/0:t}function bB(e,t=100,r){const n=r({...e,keyframes:[0,t]}),s=Math.min(Kx(n),Td);return{type:"keyframes",ease:o=>n.next(s*o).value/t,duration:dr(s)}}const wB=5;function _k(e,t,r){const n=Math.max(t-wB,0);return ok(r-e(n),t-n)}const $e={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Km=.001;function jB({duration:e=$e.duration,bounce:t=$e.bounce,velocity:r=$e.velocity,mass:n=$e.mass}){let s,o;Ih(e<=on($e.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=un($e.minDamping,$e.maxDamping,a),e=un($e.minDuration,$e.maxDuration,dr(e)),a<1?(s=u=>{const d=u*a,h=d*e,m=d-r,p=ag(u,a),b=Math.exp(-h);return Km-m/p*b},o=u=>{const h=u*a*e,m=h*r+r,p=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-h),g=ag(Math.pow(u,2),a);return(-s(u)+Km>0?-1:1)*((m-p)*b)/g}):(s=u=>{const d=Math.exp(-u*e),h=(u-r)*e+1;return-Km+d*h},o=u=>{const d=Math.exp(-u*e),h=(r-u)*(e*e);return d*h});const l=5/e,c=SB(s,o,l);if(e=on(e),isNaN(c))return{stiffness:$e.stiffness,damping:$e.damping,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:a*2*Math.sqrt(n*u),duration:e}}}const CB=12;function SB(e,t,r){let n=r;for(let s=1;s<CB;s++)n=n-e(n)/t(n);return n}function ag(e,t){return e*Math.sqrt(1-t*t)}const NB=["duration","bounce"],RB=["stiffness","damping","mass"];function Cw(e,t){return t.some(r=>e[r]!==void 0)}function EB(e){let t={velocity:$e.velocity,stiffness:$e.stiffness,damping:$e.damping,mass:$e.mass,isResolvedFromDuration:!1,...e};if(!Cw(e,RB)&&Cw(e,NB))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),s=n*n,o=2*un(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:$e.mass,stiffness:s,damping:o}}else{const r=jB(e);t={...t,...r,mass:$e.mass},t.isResolvedFromDuration=!0}return t}function Pd(e=$e.visualDuration,t=$e.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:s}=r;const o=r.keyframes[0],a=r.keyframes[r.keyframes.length-1],l={done:!1,value:o},{stiffness:c,damping:u,mass:d,duration:h,velocity:m,isResolvedFromDuration:p}=EB({...r,velocity:-dr(r.velocity||0)}),b=m||0,g=u/(2*Math.sqrt(c*d)),w=a-o,x=dr(Math.sqrt(c/d)),y=Math.abs(w)<5;n||(n=y?$e.restSpeed.granular:$e.restSpeed.default),s||(s=y?$e.restDelta.granular:$e.restDelta.default);let v;if(g<1){const C=ag(x,g);v=S=>{const N=Math.exp(-g*x*S);return a-N*((b+g*x*w)/C*Math.sin(C*S)+w*Math.cos(C*S))}}else if(g===1)v=C=>a-Math.exp(-x*C)*(w+(b+x*w)*C);else{const C=x*Math.sqrt(g*g-1);v=S=>{const N=Math.exp(-g*x*S),R=Math.min(C*S,300);return a-N*((b+g*x*w)*Math.sinh(R)+C*w*Math.cosh(R))/C}}const j={calculatedDuration:p&&h||null,next:C=>{const S=v(C);if(p)l.done=C>=h;else{let N=C===0?b:0;g<1&&(N=C===0?on(b):_k(v,C,S));const R=Math.abs(N)<=n,k=Math.abs(a-S)<=s;l.done=R&&k}return l.value=l.done?a:S,l},toString:()=>{const C=Math.min(Kx(j),Td),S=Ek(N=>j.next(C*N).value,C,30);return C+"ms "+S},toTransition:()=>{}};return j}Pd.applyToOptions=e=>{const t=bB(e,100,Pd);return e.ease=t.ease,e.duration=on(t.duration),e.type="keyframes",e};function lg({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],m={done:!1,value:h},p=R=>l!==void 0&&R<l||c!==void 0&&R>c,b=R=>l===void 0?c:c===void 0||Math.abs(l-R)<Math.abs(c-R)?l:c;let g=r*t;const w=h+g,x=a===void 0?w:a(w);x!==w&&(g=x-h);const y=R=>-g*Math.exp(-R/n),v=R=>x+y(R),j=R=>{const k=y(R),T=v(R);m.done=Math.abs(k)<=u,m.value=m.done?x:T};let C,S;const N=R=>{p(m.value)&&(C=R,S=Pd({keyframes:[m.value,b(m.value)],velocity:_k(v,R,m.value),damping:s,stiffness:o,restDelta:u,restSpeed:d}))};return N(0),{calculatedDuration:null,next:R=>{let k=!1;return!S&&C===void 0&&(k=!0,j(R),N(R)),C!==void 0&&R>=C?S.next(R-C):(!k&&j(R),m)}}}function _B(e,t,r){const n=[],s=r||$n.mix||Rk,o=e.length-1;for(let a=0;a<o;a++){let l=s(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||pr:t;l=Cc(c,l)}n.push(l)}return n}function kB(e,t,{clamp:r=!0,ease:n,mixer:s}={}){const o=e.length;if(ua(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=_B(t,n,s),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const m=Jl(e[h],e[h+1],d);return l[h](m)};return r?d=>u(un(e[0],e[o-1],d)):u}function TB(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const s=Jl(0,t,n);e.push(ze(r,1,s))}}function PB(e){const t=[0];return TB(t,e.length-1),t}function AB(e,t){return e.map(r=>r*t)}function MB(e,t){return e.map(()=>t||pk).splice(0,e.length-1)}function pl({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const s=HU(n)?n.map(gw):gw(n),o={done:!1,value:t[0]},a=AB(r&&r.length===t.length?r:PB(t),e),l=kB(a,t,{ease:Array.isArray(s)?s:MB(t,s)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}const OB=e=>e!==null;function Jx(e,{repeat:t,repeatType:r="loop"},n,s=1){const o=e.filter(OB),l=s<0||t&&r!=="loop"&&t%2===1?0:o.length-1;return!l||n===void 0?o[l]:n}const IB={decay:lg,inertia:lg,tween:pl,keyframes:pl,spring:Pd};function kk(e){typeof e.type=="string"&&(e.type=IB[e.type])}class Yx{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const DB=e=>e/100;class Xx extends Yx{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,s;const{motionValue:r}=this.options;r&&r.updatedAt!==kt.now()&&this.tick(kt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(n=this.options).onStop)==null||s.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;kk(t);const{type:r=pl,repeat:n=0,repeatDelay:s=0,repeatType:o,velocity:a=0}=t;let{keyframes:l}=t;const c=r||pl;c!==pl&&typeof l[0]!="number"&&(this.mixKeyframes=Cc(DB,Rk(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=Kx(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=u}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:m,repeatDelay:p,type:b,onUpdate:g,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?x<0:x>s;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,j=n;if(h){const R=Math.min(this.currentTime,s)/l;let k=Math.floor(R),T=R%1;!T&&R>=1&&(T=1),T===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(m==="reverse"?(T=1-T,p&&(T-=p/l)):m==="mirror"&&(j=a)),v=un(0,1,T)*l}const C=y?{done:!1,value:d[0]}:j.next(v);o&&(C.value=o(C.value));let{done:S}=C;!y&&c!==null&&(S=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return N&&b!==lg&&(C.value=Jx(d,this.options,w,this.speed)),g&&g(C.value),N&&this.finish(),C}then(t,r){return this.finished.then(t,r)}get duration(){return dr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+dr(t)}get time(){return dr(this.currentTime)}set time(t){var r;t=on(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(r=this.driver)==null||r.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(kt.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=dr(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=yB,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(o=(s=this.options).onPlay)==null||o.call(s);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(kt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}}function LB(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ai=e=>e*180/Math.PI,cg=e=>{const t=ai(Math.atan2(e[1],e[0]));return ug(t)},$B={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:cg,rotateZ:cg,skewX:e=>ai(Math.atan(e[1])),skewY:e=>ai(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ug=e=>(e=e%360,e<0&&(e+=360),e),Sw=cg,Nw=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Rw=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),FB={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Nw,scaleY:Rw,scale:e=>(Nw(e)+Rw(e))/2,rotateX:e=>ug(ai(Math.atan2(e[6],e[5]))),rotateY:e=>ug(ai(Math.atan2(-e[2],e[0]))),rotateZ:Sw,rotate:Sw,skewX:e=>ai(Math.atan(e[4])),skewY:e=>ai(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function dg(e){return e.includes("scale")?1:0}function hg(e,t){if(!e||e==="none")return dg(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(r)n=FB,s=r;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=$B,s=l}if(!s)return dg(t);const o=n[t],a=s[1].split(",").map(VB);return typeof o=="function"?o(a):a[o]}const zB=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return hg(r,t)};function VB(e){return parseFloat(e.trim())}const ka=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ta=new Set(ka),Ew=e=>e===_a||e===J,UB=new Set(["x","y","z"]),BB=ka.filter(e=>!UB.has(e));function qB(e){const t=[];return BB.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const ys={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>hg(t,"x"),y:(e,{transform:t})=>hg(t,"y")};ys.translateX=ys.x;ys.translateY=ys.y;const wi=new Set;let mg=!1,fg=!1,pg=!1;function Tk(){if(fg){const e=Array.from(wi).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const s=qB(n);s.length&&(r.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const s=r.get(n);s&&s.forEach(([o,a])=>{var l;(l=n.getValue(o))==null||l.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}fg=!1,mg=!1,wi.forEach(e=>e.complete(pg)),wi.clear()}function Pk(){wi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(fg=!0)})}function HB(){pg=!0,Pk(),Tk(),pg=!1}class Qx{constructor(t,r,n,s,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=s,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(wi.add(this),mg||(mg=!0,Me.read(Pk),Me.resolveKeyframes(Tk))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(n&&r){const l=n.readValue(r,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&o===void 0&&s.set(t[0])}LB(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),wi.delete(this)}cancel(){this.state==="scheduled"&&(wi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const WB=e=>e.startsWith("--");function GB(e,t,r){WB(t)?e.style.setProperty(t,r):e.style[t]=r}const KB=zx(()=>window.ScrollTimeline!==void 0),JB={};function YB(e,t){const r=zx(e);return()=>JB[t]??r()}const Ak=YB(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Za=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,_w={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Za([0,.65,.55,1]),circOut:Za([.55,0,1,.45]),backIn:Za([.31,.01,.66,-.59]),backOut:Za([.33,1.53,.69,.99])};function Mk(e,t){if(e)return typeof e=="function"?Ak()?Ek(e,t):"ease-out":gk(e)?Za(e):Array.isArray(e)?e.map(r=>Mk(r,t)||_w.easeOut):_w[e]}function XB(e,t,r,{delay:n=0,duration:s=300,repeat:o=0,repeatType:a="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:r};c&&(d.offset=c);const h=Mk(l,s);Array.isArray(h)&&(d.easing=h);const m={delay:n,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(d,m)}function Ok(e){return typeof e=="function"&&"applyToOptions"in e}function QB({type:e,...t}){return Ok(e)&&Ak()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ZB extends Yx{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:r,name:n,keyframes:s,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=a,this.options=t,ua(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=QB(t);this.animation=XB(r,n,s,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=Jx(s,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(d):GB(r,n,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,r;this.isPseudoElement||(r=(t=this.animation).commitStyles)==null||r.call(t)}get duration(){var r,n;const t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return dr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+dr(t)}get time(){return dr(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=on(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&KB()?(this.animation.timeline=t,pr):r(this)}}const Ik={anticipate:hk,backInOut:dk,circInOut:fk};function eq(e){return e in Ik}function tq(e){typeof e.ease=="string"&&eq(e.ease)&&(e.ease=Ik[e.ease])}const Jm=10;class rq extends ZB{constructor(t){tq(t),kk(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:s,element:o,...a}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const l=new Xx({...a,autoplay:!1}),c=Math.max(Jm,kt.now()-this.startTime),u=un(0,Jm,c-Jm);r.setWithVelocity(l.sample(Math.max(0,c-u)).value,l.sample(c).value,u),l.stop()}}const kw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ds.test(e)||e==="0")&&!e.startsWith("url("));function nq(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function sq(e,t,r,n){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=kw(s,t),l=kw(o,t);return Ih(a===l,`You are trying to animate ${t} from "${s}" to "${o}". "${a?o:s}" is not an animatable value.`,"value-not-animatable"),!a||!l?!1:nq(e)||(r==="spring"||Ok(r))&&n}function gg(e){e.duration=0,e.type="keyframes"}const iq=new Set(["opacity","clipPath","filter","transform"]),oq=zx(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function aq(e){var d;const{motionValue:t,name:r,repeatDelay:n,repeatType:s,damping:o,type:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return oq()&&r&&iq.has(r)&&(r!=="transform"||!u)&&!c&&!n&&s!=="mirror"&&o!==0&&a!=="inertia"}const lq=40;class cq extends Yx{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",keyframes:l,name:c,motionValue:u,element:d,...h}){var b;super(),this.stop=()=>{var g,w;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=kt.now();const m={autoplay:t,delay:r,type:n,repeat:s,repeatDelay:o,repeatType:a,name:c,motionValue:u,element:d,...h},p=(d==null?void 0:d.KeyframeResolver)||Qx;this.keyframeResolver=new p(l,(g,w,x)=>this.onKeyframesResolved(g,w,m,!x),c,u,d),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(t,r,n,s){this.keyframeResolver=void 0;const{name:o,type:a,velocity:l,delay:c,isHandoff:u,onUpdate:d}=n;this.resolvedAt=kt.now(),sq(t,o,a,l)||(($n.instantAnimations||!c)&&(d==null||d(Jx(t,n,r))),t[0]=t[t.length-1],gg(n),n.repeat=0);const m={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>lq?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!u&&aq(m)?new rq({...m,element:m.motionValue.owner.current}):new Xx(m);p.finished.then(()=>this.notifyFinished()).catch(pr),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),HB()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const uq=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function dq(e){const t=uq.exec(e);if(!t)return[,];const[,r,n,s]=t;return[`--${r??n}`,s]}const hq=4;function Dk(e,t,r=1){ua(r<=hq,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,s]=dq(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const a=o.trim();return nk(a)?parseFloat(a):a}return qx(s)?Dk(s,t,r+1):s}function Zx(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Lk=new Set(["width","height","top","left","right","bottom",...ka]),mq={test:e=>e==="auto",parse:e=>e},$k=e=>t=>t.test(e),Fk=[_a,J,an,Zn,nB,rB,mq],Tw=e=>Fk.find($k(e));function fq(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ik(e):!0}const pq=new Set(["brightness","contrast","saturate","opacity"]);function gq(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Hx)||[];if(!n)return e;const s=r.replace(n,"");let o=pq.has(t)?1:0;return n!==r&&(o*=100),t+"("+o+s+")"}const vq=/\b([a-z-]*)\(.*?\)/gu,vg={...Ds,getAnimatableNone:e=>{const t=e.match(vq);return t?t.map(gq).join(" "):e}},Pw={..._a,transform:Math.round},xq={rotate:Zn,rotateX:Zn,rotateY:Zn,rotateZ:Zn,scale:uu,scaleX:uu,scaleY:uu,scaleZ:uu,skew:Zn,skewX:Zn,skewY:Zn,distance:J,translateX:J,translateY:J,translateZ:J,x:J,y:J,z:J,perspective:J,transformPerspective:J,opacity:Yl,originX:yw,originY:yw,originZ:J},ey={borderWidth:J,borderTopWidth:J,borderRightWidth:J,borderBottomWidth:J,borderLeftWidth:J,borderRadius:J,radius:J,borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomRightRadius:J,borderBottomLeftRadius:J,width:J,maxWidth:J,height:J,maxHeight:J,top:J,right:J,bottom:J,left:J,inset:J,insetBlock:J,insetBlockStart:J,insetBlockEnd:J,insetInline:J,insetInlineStart:J,insetInlineEnd:J,padding:J,paddingTop:J,paddingRight:J,paddingBottom:J,paddingLeft:J,paddingBlock:J,paddingBlockStart:J,paddingBlockEnd:J,paddingInline:J,paddingInlineStart:J,paddingInlineEnd:J,margin:J,marginTop:J,marginRight:J,marginBottom:J,marginLeft:J,marginBlock:J,marginBlockStart:J,marginBlockEnd:J,marginInline:J,marginInlineStart:J,marginInlineEnd:J,backgroundPositionX:J,backgroundPositionY:J,...xq,zIndex:Pw,fillOpacity:Yl,strokeOpacity:Yl,numOctaves:Pw},yq={...ey,color:Qe,backgroundColor:Qe,outlineColor:Qe,fill:Qe,stroke:Qe,borderColor:Qe,borderTopColor:Qe,borderRightColor:Qe,borderBottomColor:Qe,borderLeftColor:Qe,filter:vg,WebkitFilter:vg},zk=e=>yq[e];function Vk(e,t){let r=zk(e);return r!==vg&&(r=Ds),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const bq=new Set(["auto","none","0"]);function wq(e,t,r){let n=0,s;for(;n<e.length&&!s;){const o=e[n];typeof o=="string"&&!bq.has(o)&&Xl(o).values.length&&(s=e[n]),n++}if(s&&r)for(const o of t)e[o]=Vk(r,s)}class jq extends Qx{constructor(t,r,n,s,o){super(t,r,n,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),qx(h))){const m=Dk(h,r.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Lk.has(n)||t.length!==2)return;const[s,o]=t,a=Tw(s),l=Tw(o),c=xw(s),u=xw(o);if(c!==u&&ys[n]){this.needsMeasurement=!0;return}if(a!==l)if(Ew(a)&&Ew(l))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else ys[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let s=0;s<t.length;s++)(t[s]===null||fq(t[s]))&&n.push(s);n.length&&wq(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ys[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const s=r[r.length-1];s!==void 0&&t.getValue(n,s).jump(s,!1)}measureEndState(){var l;const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const s=t.getValue(r);s&&s.jump(this.measuredOrigin,!1);const o=n.length-1,a=n[o];n[o]=ys[r](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Cq(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const Uk=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Sq(e){return sk(e)&&"offsetHeight"in e}const Aw=30,Nq=e=>!isNaN(parseFloat(e));class Rq{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var o;const s=kt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=kt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Nq(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Vx);const n=this.events[t].add(r);return t==="change"?()=>{n(),Me.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=kt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Aw)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,Aw);return ok(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function da(e,t){return new Rq(e,t)}const{schedule:ty,cancel:NW}=vk(queueMicrotask,!1),_r={x:!1,y:!1};function Bk(){return _r.x||_r.y}function Eq(e){return e==="x"||e==="y"?_r[e]?null:(_r[e]=!0,()=>{_r[e]=!1}):_r.x||_r.y?null:(_r.x=_r.y=!0,()=>{_r.x=_r.y=!1})}function qk(e,t){const r=Cq(e),n=new AbortController,s={passive:!0,...t,signal:n.signal};return[r,s,()=>n.abort()]}function Mw(e){return!(e.pointerType==="touch"||Bk())}function _q(e,t,r={}){const[n,s,o]=qk(e,r),a=l=>{if(!Mw(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=h=>{Mw(h)&&(u(h),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,s)};return n.forEach(l=>{l.addEventListener("pointerenter",a,s)}),o}const Hk=(e,t)=>t?e===t?!0:Hk(e,t.parentElement):!1,ry=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,kq=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wk(e){return kq.has(e.tagName)||e.isContentEditable===!0}const Du=new WeakSet;function Ow(e){return t=>{t.key==="Enter"&&e(t)}}function Ym(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Tq=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=Ow(()=>{if(Du.has(r))return;Ym(r,"down");const s=Ow(()=>{Ym(r,"up")}),o=()=>Ym(r,"cancel");r.addEventListener("keyup",s,t),r.addEventListener("blur",o,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function Iw(e){return ry(e)&&!Bk()}function Pq(e,t,r={}){const[n,s,o]=qk(e,r),a=l=>{const c=l.currentTarget;if(!Iw(l))return;Du.add(c);const u=t(c,l),d=(p,b)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),Du.has(c)&&Du.delete(c),Iw(p)&&typeof u=="function"&&u(p,{success:b})},h=p=>{d(p,c===window||c===document||r.useGlobalTarget||Hk(c,p.target))},m=p=>{d(p,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",m,s)};return n.forEach(l=>{(r.useGlobalTarget?window:l).addEventListener("pointerdown",a,s),Sq(l)&&(l.addEventListener("focus",u=>Tq(u,s)),!Wk(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function Gk(e){return sk(e)&&"ownerSVGElement"in e}function Aq(e){return Gk(e)&&e.tagName==="svg"}const jt=e=>!!(e&&e.getVelocity),Mq=[...Fk,Qe,Ds],Oq=e=>Mq.find($k(e)),Kk=f.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Iq(e=!0){const t=f.useContext(Lx);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:s}=t,o=f.useId();f.useEffect(()=>{if(e)return s(o)},[e]);const a=f.useCallback(()=>e&&n&&n(o),[o,n,e]);return!r&&n?[!1,a]:[!0]}const Jk=f.createContext({strict:!1}),Dw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ha={};for(const e in Dw)ha[e]={isEnabled:t=>Dw[e].some(r=>!!t[r])};function Dq(e){for(const t in e)ha[t]={...ha[t],...e[t]}}const Lq=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ad(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Lq.has(e)}let Yk=e=>!Ad(e);function $q(e){typeof e=="function"&&(Yk=t=>t.startsWith("on")?!Ad(t):e(t))}try{$q(require("@emotion/is-prop-valid").default)}catch{}function Fq(e,t,r){const n={};for(const s in e)s==="values"&&typeof e.values=="object"||(Yk(s)||r===!0&&Ad(s)||!t&&!Ad(s)||e.draggable&&s.startsWith("onDrag"))&&(n[s]=e[s]);return n}const Dh=f.createContext({});function Lh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ql(e){return typeof e=="string"||Array.isArray(e)}const ny=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sy=["initial",...ny];function $h(e){return Lh(e.animate)||sy.some(t=>Ql(e[t]))}function Xk(e){return!!($h(e)||e.variants)}function zq(e,t){if($h(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Ql(r)?r:void 0,animate:Ql(n)?n:void 0}}return e.inherit!==!1?t:{}}function Vq(e){const{initial:t,animate:r}=zq(e,f.useContext(Dh));return f.useMemo(()=>({initial:t,animate:r}),[Lw(t),Lw(r)])}function Lw(e){return Array.isArray(e)?e.join(" "):e}function $w(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qa={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(J.test(e))e=parseFloat(e);else return e;const r=$w(e,t.target.x),n=$w(e,t.target.y);return`${r}% ${n}%`}},Uq={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,s=Ds.parse(e);if(s.length>5)return n;const o=Ds.createTransformer(e),a=typeof s[0]!="number"?1:0,l=r.x.scale*t.x,c=r.y.scale*t.y;s[0+a]/=l,s[1+a]/=c;const u=ze(l,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=u),typeof s[3+a]=="number"&&(s[3+a]/=u),o(s)}},xg={borderRadius:{...qa,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qa,borderTopRightRadius:qa,borderBottomLeftRadius:qa,borderBottomRightRadius:qa,boxShadow:Uq};function Qk(e,{layout:t,layoutId:r}){return Ta.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!xg[e]||e==="opacity")}const Bq={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qq=ka.length;function Hq(e,t,r){let n="",s=!0;for(let o=0;o<qq;o++){const a=ka[o],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||r){const u=Uk(l,ey[a]);if(!c){s=!1;const d=Bq[a]||a;n+=`${d}(${u}) `}r&&(t[a]=u)}}return n=n.trim(),r?n=r(t,s?"":n):s&&(n="none"),n}function iy(e,t,r){const{style:n,vars:s,transformOrigin:o}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(Ta.has(c)){a=!0;continue}else if(yk(c)){s[c]=u;continue}else{const d=Uk(u,ey[c]);c.startsWith("origin")?(l=!0,o[c]=d):n[c]=d}}if(t.transform||(a||r?n.transform=Hq(t,e.transform,r):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=o;n.transformOrigin=`${c} ${u} ${d}`}}const oy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Zk(e,t,r){for(const n in t)!jt(t[n])&&!Qk(n,r)&&(e[n]=t[n])}function Wq({transformTemplate:e},t){return f.useMemo(()=>{const r=oy();return iy(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Gq(e,t){const r=e.style||{},n={};return Zk(n,r,e),Object.assign(n,Wq(e,t)),n}function Kq(e,t){const r={},n=Gq(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const Jq={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yq={offset:"strokeDashoffset",array:"strokeDasharray"};function Xq(e,t,r=1,n=0,s=!0){e.pathLength=1;const o=s?Jq:Yq;e[o.offset]=J.transform(-n);const a=J.transform(t),l=J.transform(r);e[o.array]=`${a} ${l}`}const Qq=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function eT(e,{attrX:t,attrY:r,attrScale:n,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},c,u,d){if(iy(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m}=e;h.transform&&(m.transform=h.transform,delete h.transform),(m.transform||h.transformOrigin)&&(m.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),m.transform&&(m.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const p of Qq)h[p]!==void 0&&(m[p]=h[p],delete h[p]);t!==void 0&&(h.x=t),r!==void 0&&(h.y=r),n!==void 0&&(h.scale=n),s!==void 0&&Xq(h,s,o,a,!1)}const tT=()=>({...oy(),attrs:{}}),rT=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Zq(e,t,r,n){const s=f.useMemo(()=>{const o=tT();return eT(o,t,rT(n),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Zk(o,e.style,e),s.style={...o,...s.style}}return s}const e9=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ay(e){return typeof e!="string"||e.includes("-")?!1:!!(e9.indexOf(e)>-1||/[A-Z]/u.test(e))}function t9(e,t,r,{latestValues:n},s,o=!1,a){const c=(a??ay(e)?Zq:Kq)(t,n,s,e),u=Fq(t,typeof e=="string",o),d=e!==f.Fragment?{...u,...c,ref:r}:{},{children:h}=t,m=f.useMemo(()=>jt(h)?h.get():h,[h]);return f.createElement(e,{...d,children:m})}function Fw(e){const t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function ly(e,t,r,n){if(typeof t=="function"){const[s,o]=Fw(n);t=t(r!==void 0?r:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Fw(n);t=t(r!==void 0?r:e.custom,s,o)}return t}function Lu(e){return jt(e)?e.get():e}function r9({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,s){return{latestValues:n9(r,n,s,e),renderState:t()}}function n9(e,t,r,n){const s={},o=n(e,{});for(const m in o)s[m]=Lu(o[m]);let{initial:a,animate:l}=e;const c=$h(e),u=Xk(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=r?r.initial===!1:!1;d=d||a===!1;const h=d?l:a;if(h&&typeof h!="boolean"&&!Lh(h)){const m=Array.isArray(h)?h:[h];for(let p=0;p<m.length;p++){const b=ly(e,m[p]);if(b){const{transitionEnd:g,transition:w,...x}=b;for(const y in x){let v=x[y];if(Array.isArray(v)){const j=d?v.length-1:0;v=v[j]}v!==null&&(s[y]=v)}for(const y in g)s[y]=g[y]}}}return s}const nT=e=>(t,r)=>{const n=f.useContext(Dh),s=f.useContext(Lx),o=()=>r9(e,t,n,s);return r?o():LU(o)};function cy(e,t,r){var o;const{style:n}=e,s={};for(const a in n)(jt(n[a])||t.style&&jt(t.style[a])||Qk(a,e)||((o=r==null?void 0:r.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=n[a]);return s}const s9=nT({scrapeMotionValuesFromProps:cy,createRenderState:oy});function sT(e,t,r){const n=cy(e,t,r);for(const s in e)if(jt(e[s])||jt(t[s])){const o=ka.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[o]=e[s]}return n}const i9=nT({scrapeMotionValuesFromProps:sT,createRenderState:tT}),o9=Symbol.for("motionComponentSymbol");function a9(e,t,r){const n=f.useRef(r);f.useInsertionEffect(()=>{n.current=r});const s=f.useRef(null);return f.useCallback(o=>{var l;o&&((l=e.onMount)==null||l.call(e,o)),t&&(o?t.mount(o):t.unmount());const a=n.current;if(typeof a=="function")if(o){const c=a(o);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):a(o);else a&&(a.current=o)},[t])}const uy=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),l9="framerAppearId",iT="data-"+uy(l9),oT=f.createContext({});function el(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function c9(e,t,r,n,s,o){var w,x;const{visualElement:a}=f.useContext(Dh),l=f.useContext(Jk),c=f.useContext(Lx),u=f.useContext(Kk).reducedMotion,d=f.useRef(null);n=n||l.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:a,props:r,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,isSVG:o}));const h=d.current,m=f.useContext(oT);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&u9(d.current,r,s,m);const p=f.useRef(!1);f.useInsertionEffect(()=>{h&&p.current&&h.update(r,c)});const b=r[iT],g=f.useRef(!!b&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,b))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,b)));return $U(()=>{h&&(p.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),g.current&&h.animationState&&h.animationState.animateChanges())}),f.useEffect(()=>{h&&(!g.current&&h.animationState&&h.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,b)}),g.current=!1),h.enteringChildren=void 0)}),h}function u9(e,t,r,n){const{layoutId:s,layout:o,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:aT(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!a||l&&el(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:c,layoutRoot:u})}function aT(e){if(e)return e.options.allowProjection!==!1?e.projection:aT(e.parent)}function Xm(e,{forwardMotionProps:t=!1,type:r}={},n,s){n&&Dq(n);const o=r?r==="svg":ay(e),a=o?i9:s9;function l(u,d){let h;const m={...f.useContext(Kk),...u,layoutId:d9(u)},{isStatic:p}=m,b=Vq(u),g=a(u,p);if(!p&&Dx){h9();const w=m9(m);h=w.MeasureLayout,b.visualElement=c9(e,g,m,s,w.ProjectionNode,o)}return i.jsxs(Dh.Provider,{value:b,children:[h&&b.visualElement?i.jsx(h,{visualElement:b.visualElement,...m}):null,t9(e,u,a9(g,b.visualElement,d),g,p,t,o)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=f.forwardRef(l);return c[o9]=e,c}function d9({layoutId:e}){const t=f.useContext(rk).id;return t&&e!==void 0?t+"-"+e:e}function h9(e,t){f.useContext(Jk).strict}function m9(e){const{drag:t,layout:r}=ha;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(e)||r!=null&&r.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function f9(e,t){if(typeof Proxy>"u")return Xm;const r=new Map,n=(o,a)=>Xm(o,a,e,t),s=(o,a)=>n(o,a);return new Proxy(s,{get:(o,a)=>a==="create"?n:(r.has(a)||r.set(a,Xm(a,void 0,e,t)),r.get(a))})}function lT({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function p9({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function g9(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function Qm(e){return e===void 0||e===1}function yg({scale:e,scaleX:t,scaleY:r}){return!Qm(e)||!Qm(t)||!Qm(r)}function Qs(e){return yg(e)||cT(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function cT(e){return zw(e.x)||zw(e.y)}function zw(e){return e&&e!=="0%"}function Md(e,t,r){const n=e-r,s=t*n;return r+s}function Vw(e,t,r,n,s){return s!==void 0&&(e=Md(e,s,n)),Md(e,r,n)+t}function bg(e,t=0,r=1,n,s){e.min=Vw(e.min,t,r,n,s),e.max=Vw(e.max,t,r,n,s)}function uT(e,{x:t,y:r}){bg(e.x,t.translate,t.scale,t.originPoint),bg(e.y,r.translate,r.scale,r.originPoint)}const Uw=.999999999999,Bw=1.0000000000001;function v9(e,t,r,n=!1){const s=r.length;if(!s)return;t.x=t.y=1;let o,a;for(let l=0;l<s;l++){o=r[l],a=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Co(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,uT(e,a)),n&&Qs(o.latestValues)&&Co(e,o.latestValues))}t.x<Bw&&t.x>Uw&&(t.x=1),t.y<Bw&&t.y>Uw&&(t.y=1)}function jo(e,t){e.min=e.min+t,e.max=e.max+t}function qw(e,t,r,n,s=.5){const o=ze(e.min,e.max,s);bg(e,t,r,o,n)}function Co(e,t){qw(e.x,t.x,t.scaleX,t.scale,t.originX),qw(e.y,t.y,t.scaleY,t.scale,t.originY)}function dT(e,t){return lT(g9(e.getBoundingClientRect(),t))}function x9(e,t,r){const n=dT(e,r),{scroll:s}=t;return s&&(jo(n.x,s.offset.x),jo(n.y,s.offset.y)),n}const Hw=()=>({translate:0,scale:1,origin:0,originPoint:0}),So=()=>({x:Hw(),y:Hw()}),Ww=()=>({min:0,max:0}),rt=()=>({x:Ww(),y:Ww()}),wg={current:null},hT={current:!1};function y9(){if(hT.current=!0,!!Dx)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>wg.current=e.matches;e.addEventListener("change",t),t()}else wg.current=!1}const b9=new WeakMap;function w9(e,t,r){for(const n in t){const s=t[n],o=r[n];if(jt(s))e.addValue(n,s);else if(jt(o))e.addValue(n,da(s,{owner:e}));else if(o!==s)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(n);e.addValue(n,da(a!==void 0?a:s,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const Gw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class j9{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qx,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=kt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Me.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=r.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=$h(r),this.isVariantNode=Xk(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(r,{},this);for(const m in h){const p=h[m];c[m]!==void 0&&jt(p)&&p.set(c[m])}}mount(t){var r;this.current=t,b9.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(hT.current||y9(),this.shouldReduceMotion=wg.current),(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Is(this.notifyUpdate),Is(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const n=this.features[r];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ta.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=r.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Me.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ha){const r=ha[t];if(!r)continue;const{isEnabled:n,Feature:s}=r;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):rt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<Gw.length;n++){const s=Gw[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,a=t[o];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=w9(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=da(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(nk(n)||ik(n))?n=parseFloat(n):!Oq(n)&&Ds.test(r)&&(n=Vk(t,r)),this.setBaseTarget(t,jt(n)?n.get():n)),jt(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var o;const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const a=ly(this.props,r,(o=this.presenceContext)==null?void 0:o.custom);a&&(n=a[t])}if(r&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!jt(s)?s:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Vx),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){ty.render(this.render)}}class mT extends j9{constructor(){super(...arguments),this.KeyframeResolver=jq}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;jt(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function fT(e,{style:t,vars:r},n,s){const o=e.style;let a;for(a in t)o[a]=t[a];s==null||s.applyProjectionStyles(o,n);for(a in r)o.setProperty(a,r[a])}function C9(e){return window.getComputedStyle(e)}class S9 extends mT{constructor(){super(...arguments),this.type="html",this.renderInstance=fT}readValueFromInstance(t,r){var n;if(Ta.has(r))return(n=this.projection)!=null&&n.isProjecting?dg(r):zB(t,r);{const s=C9(t),o=(yk(r)?s.getPropertyValue(r):s[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return dT(t,r)}build(t,r,n){iy(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return cy(t,r,n)}}const pT=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function N9(e,t,r,n){fT(e,t,void 0,n);for(const s in t.attrs)e.setAttribute(pT.has(s)?s:uy(s),t.attrs[s])}class R9 extends mT{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=rt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Ta.has(r)){const n=zk(r);return n&&n.default||0}return r=pT.has(r)?r:uy(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return sT(t,r,n)}build(t,r,n){eT(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,s){N9(t,r,n,s)}mount(t){this.isSVGTag=rT(t.tagName),super.mount(t)}}const E9=(e,t)=>t.isSVG??ay(e)?new R9(t):new S9(t,{allowProjection:e!==f.Fragment});function $o(e,t,r){const n=e.getProps();return ly(n,t,r!==void 0?r:n.custom,e)}const jg=e=>Array.isArray(e);function _9(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,da(r))}function k9(e){return jg(e)?e[e.length-1]||0:e}function T9(e,t){const r=$o(e,t);let{transitionEnd:n={},transition:s={},...o}=r||{};o={...o,...n};for(const a in o){const l=k9(o[a]);_9(e,a,l)}}function P9(e){return!!(jt(e)&&e.add)}function Cg(e,t){const r=e.getValue("willChange");if(P9(r))return r.add(t);if(!r&&$n.WillChange){const n=new $n.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function gT(e){return e.props[iT]}const A9=e=>e!==null;function M9(e,{repeat:t,repeatType:r="loop"},n){const s=e.filter(A9),o=t&&r!=="loop"&&t%2===1?0:s.length-1;return!o||n===void 0?s[o]:n}const O9={type:"spring",stiffness:500,damping:25,restSpeed:10},I9=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),D9={type:"keyframes",duration:.8},L9={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$9=(e,{keyframes:t})=>t.length>2?D9:Ta.has(e)?e.startsWith("scale")?I9(t[1]):O9:L9;function F9({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:o,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const dy=(e,t,r,n={},s,o)=>a=>{const l=Zx(n,e)||{},c=l.delay||n.delay||0;let{elapsed:u=0}=n;u=u-on(c);const d={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:s};F9(l)||Object.assign(d,$9(e,d)),d.duration&&(d.duration=on(d.duration)),d.repeatDelay&&(d.repeatDelay=on(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(gg(d),d.delay===0&&(h=!0)),($n.instantAnimations||$n.skipAnimations)&&(h=!0,gg(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!o&&t.get()!==void 0){const m=M9(d.keyframes,l);if(m!==void 0){Me.update(()=>{d.onUpdate(m),d.onComplete()});return}}return l.isSync?new Xx(d):new cq(d)};function z9({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function vT(e,t,{delay:r=0,transitionOverride:n,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;n&&(o=n);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const d in l){const h=e.getValue(d,e.latestValues[d]??null),m=l[d];if(m===void 0||u&&z9(u,d))continue;const p={delay:r,...Zx(o||{},d)},b=h.get();if(b!==void 0&&!h.isAnimating&&!Array.isArray(m)&&m===b&&!p.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const x=gT(e);if(x){const y=window.MotionHandoffAnimation(x,d,Me);y!==null&&(p.startTime=y,g=!0)}}Cg(e,d),h.start(dy(d,h,m,e.shouldReduceMotion&&Lk.has(d)?{type:!1}:p,e,g));const w=h.animation;w&&c.push(w)}return a&&Promise.all(c).then(()=>{Me.update(()=>{a&&T9(e,a)})}),c}function xT(e,t,r,n=0,s=1){const o=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),a=e.size,l=(a-1)*n;return typeof r=="function"?r(o,a):s===1?o*n:l-o*n}function Sg(e,t,r={}){var c;const n=$o(e,t,r.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(s=r.transitionOverride);const o=n?()=>Promise.all(vT(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:m}=s;return V9(e,t,u,d,h,m,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,d]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>d())}else return Promise.all([o(),a(r.delay)])}function V9(e,t,r=0,n=0,s=0,o=1,a){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(Sg(c,t,{...a,delay:r+(typeof n=="function"?0:n)+xT(e.variantChildren,c,n,s,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function U9(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const s=t.map(o=>Sg(e,o,r));n=Promise.all(s)}else if(typeof t=="string")n=Sg(e,t,r);else{const s=typeof t=="function"?$o(e,t,r.custom):t;n=Promise.all(vT(e,s,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}function yT(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const B9=sy.length;function bT(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?bT(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<B9;r++){const n=sy[r],s=e.props[n];(Ql(s)||s===!1)&&(t[n]=s)}return t}const q9=[...ny].reverse(),H9=ny.length;function W9(e){return t=>Promise.all(t.map(({animation:r,options:n})=>U9(e,r,n)))}function G9(e){let t=W9(e),r=Kw(),n=!0;const s=c=>(u,d)=>{var m;const h=$o(e,d,c==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:p,transitionEnd:b,...g}=h;u={...u,...g,...b}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,d=bT(e.parent)||{},h=[],m=new Set;let p={},b=1/0;for(let w=0;w<H9;w++){const x=q9[w],y=r[x],v=u[x]!==void 0?u[x]:d[x],j=Ql(v),C=x===c?y.isActive:null;C===!1&&(b=w);let S=v===d[x]&&v!==u[x]&&j;if(S&&n&&e.manuallyAnimateOnMount&&(S=!1),y.protectedKeys={...p},!y.isActive&&C===null||!v&&!y.prevProp||Lh(v)||typeof v=="boolean")continue;const N=K9(y.prevProp,v);let R=N||x===c&&y.isActive&&!S&&j||w>b&&j,k=!1;const T=Array.isArray(v)?v:[v];let O=T.reduce(s(x),{});C===!1&&(O={});const{prevResolvedValues:A={}}=y,q={...A,...O},I=z=>{R=!0,m.has(z)&&(k=!0,m.delete(z)),y.needsAnimating[z]=!0;const P=e.getValue(z);P&&(P.liveStyle=!1)};for(const z in q){const P=O[z],_=A[z];if(p.hasOwnProperty(z))continue;let D=!1;jg(P)&&jg(_)?D=!yT(P,_):D=P!==_,D?P!=null?I(z):m.add(z):P!==void 0&&m.has(z)?I(z):y.protectedKeys[z]=!0}y.prevProp=v,y.prevResolvedValues=O,y.isActive&&(p={...p,...O}),n&&e.blockInitialAnimation&&(R=!1);const X=S&&N;R&&(!X||k)&&h.push(...T.map(z=>{const P={type:x};if(typeof z=="string"&&n&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:_}=e,D=$o(_,z);if(_.enteringChildren&&D){const{delayChildren:Q}=D.transition||{};P.delay=xT(_.enteringChildren,e,Q)}}return{animation:z,options:P}}))}if(m.size){const w={};if(typeof u.initial!="boolean"){const x=$o(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(w.transition=x.transition)}m.forEach(x=>{const y=e.getBaseTarget(x),v=e.getValue(x);v&&(v.liveStyle=!0),w[x]=y??null}),h.push({animation:w})}let g=!!h.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),n=!1,g?t(h):Promise.resolve()}function l(c,u){var h;if(r[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var p;return(p=m.animationState)==null?void 0:p.setActive(c,u)}),r[c].isActive=u;const d=a(c);for(const m in r)r[m].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>r,reset:()=>{r=Kw()}}}function K9(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yT(t,e):!1}function Ks(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kw(){return{animate:Ks(!0),whileInView:Ks(),whileHover:Ks(),whileTap:Ks(),whileDrag:Ks(),whileFocus:Ks(),exit:Ks()}}class Bs{constructor(t){this.isMounted=!1,this.node=t}update(){}}class J9 extends Bs{constructor(t){super(t),t.animationState||(t.animationState=G9(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Lh(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Y9=0;class X9 extends Bs{constructor(){super(...arguments),this.id=Y9++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const s=this.node.animationState.setActive("exit",!t);r&&!t&&s.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Q9={animation:{Feature:J9},exit:{Feature:X9}};function Zl(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function Rc(e){return{point:{x:e.pageX,y:e.pageY}}}const Z9=e=>t=>ry(t)&&e(t,Rc(t));function gl(e,t,r,n){return Zl(e,t,Z9(r),n)}const wT=1e-4,e7=1-wT,t7=1+wT,jT=.01,r7=0-jT,n7=0+jT;function Tt(e){return e.max-e.min}function s7(e,t,r){return Math.abs(e-t)<=r}function Jw(e,t,r,n=.5){e.origin=n,e.originPoint=ze(t.min,t.max,e.origin),e.scale=Tt(r)/Tt(t),e.translate=ze(r.min,r.max,e.origin)-e.originPoint,(e.scale>=e7&&e.scale<=t7||isNaN(e.scale))&&(e.scale=1),(e.translate>=r7&&e.translate<=n7||isNaN(e.translate))&&(e.translate=0)}function vl(e,t,r,n){Jw(e.x,t.x,r.x,n?n.originX:void 0),Jw(e.y,t.y,r.y,n?n.originY:void 0)}function Yw(e,t,r){e.min=r.min+t.min,e.max=e.min+Tt(t)}function i7(e,t,r){Yw(e.x,t.x,r.x),Yw(e.y,t.y,r.y)}function Xw(e,t,r){e.min=t.min-r.min,e.max=e.min+Tt(t)}function Od(e,t,r){Xw(e.x,t.x,r.x),Xw(e.y,t.y,r.y)}function sr(e){return[e("x"),e("y")]}const CT=({current:e})=>e?e.ownerDocument.defaultView:null,Qw=(e,t)=>Math.abs(e-t);function o7(e,t){const r=Qw(e.x,t.x),n=Qw(e.y,t.y);return Math.sqrt(r**2+n**2)}const Zw=new Set(["auto","scroll"]);class ST{constructor(t,r,{transformPagePoint:n,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=ef(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,g=o7(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!g)return;const{point:w}=p,{timestamp:x}=ft;this.history.push({...w,timestamp:x});const{onStart:y,onMove:v}=this.handlers;b||(y&&y(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,b)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Zm(b,this.transformPagePoint),Me.update(this.updatePoint,!0)},this.handlePointerUp=(p,b)=>{this.end();const{onEnd:g,onSessionEnd:w,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=ef(p.type==="pointercancel"?this.lastMoveEventInfo:Zm(b,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,y),w&&w(p,y)},!ry(t))return;this.dragSnapToOrigin=o,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=s||window;const c=Rc(t),u=Zm(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=ft;this.history=[{...d,timestamp:h}];const{onSessionStart:m}=r;m&&m(t,ef(u,this.history)),this.removeListeners=Cc(gl(this.contextWindow,"pointermove",this.handlePointerMove),gl(this.contextWindow,"pointerup",this.handlePointerUp),gl(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let r=t.parentElement;for(;r;){const n=getComputedStyle(r);(Zw.has(n.overflowX)||Zw.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const n=t===window,s=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-r.x,y:s.y-r.y};o.x===0&&o.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),Me.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Is(this.updatePoint)}}function Zm(e,t){return t?{point:t(e.point)}:e}function ej(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ef({point:e},t){return{point:e,delta:ej(e,NT(t)),offset:ej(e,a7(t)),velocity:l7(t,.1)}}function a7(e){return e[0]}function NT(e){return e[e.length-1]}function l7(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const s=NT(e);for(;r>=0&&(n=e[r],!(s.timestamp-n.timestamp>on(t)));)r--;if(!n)return{x:0,y:0};const o=dr(s.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const a={x:(s.x-n.x)/o,y:(s.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function c7(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?ze(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?ze(r,e,n.max):Math.min(e,r)),e}function tj(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function u7(e,{top:t,left:r,bottom:n,right:s}){return{x:tj(e.x,r,s),y:tj(e.y,t,n)}}function rj(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function d7(e,t){return{x:rj(e.x,t.x),y:rj(e.y,t.y)}}function h7(e,t){let r=.5;const n=Tt(e),s=Tt(t);return s>n?r=Jl(t.min,t.max-n,e.min):n>s&&(r=Jl(e.min,e.max-s,t.min)),un(0,1,r)}function m7(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const Ng=.35;function f7(e=Ng){return e===!1?e=0:e===!0&&(e=Ng),{x:nj(e,"left","right"),y:nj(e,"top","bottom")}}function nj(e,t,r){return{min:sj(e,t),max:sj(e,r)}}function sj(e,t){return typeof e=="number"?e:e[t]||0}const p7=new WeakMap;class g7{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=rt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=h=>{r?(this.stopAnimation(),this.snapToCursor(Rc(h).point)):this.pauseAnimation()},a=(h,m)=>{this.stopAnimation();const{drag:p,dragPropagation:b,onDragStart:g}=this.getProps();if(p&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Eq(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sr(x=>{let y=this.getAxisMotionValue(x).get()||0;if(an.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const j=v.layout.layoutBox[x];j&&(y=Tt(j)*(parseFloat(y)/100))}}this.originPoint[x]=y}),g&&Me.postRender(()=>g(h,m)),Cg(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},l=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m;const{dragPropagation:p,dragDirectionLock:b,onDirectionLock:g,onDrag:w}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:x}=m;if(b&&this.currentDirection===null){this.currentDirection=v7(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",m.point,x),this.updateAxis("y",m.point,x),this.visualElement.render(),w&&w(h,m)},c=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m,this.stop(h,m),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>sr(h=>{var m;return this.getAnimationState(h)==="paused"&&((m=this.getAxisMotionValue(h).animation)==null?void 0:m.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new ST(t,{onSessionStart:o,onStart:a,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:n,contextWindow:CT(this.visualElement),element:this.visualElement.current})}stop(t,r){const n=t||this.latestPointerEvent,s=r||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!n)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:l}=this.getProps();l&&Me.postRender(()=>l(n,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:s}=this.getProps();if(!n||!du(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=c7(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&el(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=u7(n.layoutBox,t):this.constraints=!1,this.elastic=f7(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&sr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=m7(n.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!el(t))return!1;const n=t.current;ua(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=x9(n,s.root,this.visualElement.getTransformPagePoint());let a=d7(s.layout.layoutBox,o);if(r){const l=r(p9(a));this.hasMutatedConstraints=!!l,l&&(a=lT(l))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=sr(d=>{if(!du(d,r,this.currentDirection))return;let h=c&&c[d]||{};a&&(h={min:0,max:0});const m=s?200:1e6,p=s?40:1e7,b={type:"inertia",velocity:n?t[d]:0,bounceStiffness:m,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(d,b)});return Promise.all(u).then(l)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return Cg(this.visualElement,t),n.start(dy(t,n,0,r,this.visualElement,!1))}stopAnimation(){sr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){sr(t=>{var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),s=n[r];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){sr(r=>{const{drag:n}=this.getProps();if(!du(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(r);if(s&&s.layout){const{min:a,max:l}=s.layout.layoutBox[r],c=o.get()||0;o.set(t[r]-ze(a,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!el(r)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};sr(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();s[a]=h7({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),sr(a=>{if(!du(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(ze(c,u,s[a]))})}addListeners(){if(!this.visualElement.current)return;p7.set(this.visualElement,this);const t=this.visualElement.current,r=gl(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&!Wk(c.target)&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();el(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Me.read(n);const a=Zl(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(sr(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),r(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:a=Ng,dragMomentum:l=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:o,dragElastic:a,dragMomentum:l}}}function du(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function v7(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class x7 extends Bs{constructor(t){super(t),this.removeGroupControls=pr,this.removeListeners=pr,this.controls=new g7(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const ij=e=>(t,r)=>{e&&Me.postRender(()=>e(t,r))};class y7 extends Bs{constructor(){super(...arguments),this.removePointerDownListener=pr}onPointerDown(t){this.session=new ST(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:CT(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:ij(t),onStart:ij(r),onMove:n,onEnd:(o,a)=>{delete this.session,s&&Me.postRender(()=>s(o,a))}}}mount(){this.removePointerDownListener=gl(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const $u={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let tf=!1;class b7 extends f.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:o}=t;o&&(r.group&&r.group.add(o),n&&n.register&&s&&n.register(o),tf&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),$u.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:s,isPresent:o}=this.props,{projection:a}=n;return a&&(a.isPresent=o,tf=!0,s||t.layoutDependency!==r||r===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Me.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ty.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=t;tf=!0,s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function RT(e){const[t,r]=Iq(),n=f.useContext(rk);return i.jsx(b7,{...e,layoutGroup:n,switchLayoutGroup:f.useContext(oT),isPresent:t,safeToRemove:r})}function w7(e,t,r){const n=jt(e)?e:da(e);return n.start(dy("",n,t,r)),n.animation}const j7=(e,t)=>e.depth-t.depth;class C7{constructor(){this.children=[],this.isDirty=!1}add(t){$x(this.children,t),this.isDirty=!0}remove(t){Fx(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(j7),this.isDirty=!1,this.children.forEach(t)}}function S7(e,t){const r=kt.now(),n=({timestamp:s})=>{const o=s-r;o>=t&&(Is(n),e(o-t))};return Me.setup(n,!0),()=>Is(n)}const ET=["TopLeft","TopRight","BottomLeft","BottomRight"],N7=ET.length,oj=e=>typeof e=="string"?parseFloat(e):e,aj=e=>typeof e=="number"||J.test(e);function R7(e,t,r,n,s,o){s?(e.opacity=ze(0,r.opacity??1,E7(n)),e.opacityExit=ze(t.opacity??1,0,_7(n))):o&&(e.opacity=ze(t.opacity??1,r.opacity??1,n));for(let a=0;a<N7;a++){const l=`border${ET[a]}Radius`;let c=lj(t,l),u=lj(r,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||aj(c)===aj(u)?(e[l]=Math.max(ze(oj(c),oj(u),n),0),(an.test(u)||an.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||r.rotate)&&(e.rotate=ze(t.rotate||0,r.rotate||0,n))}function lj(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const E7=_T(0,.5,mk),_7=_T(.5,.95,pr);function _T(e,t,r){return n=>n<e?0:n>t?1:r(Jl(e,t,n))}function cj(e,t){e.min=t.min,e.max=t.max}function Nr(e,t){cj(e.x,t.x),cj(e.y,t.y)}function uj(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function dj(e,t,r,n,s){return e-=t,e=Md(e,1/r,n),s!==void 0&&(e=Md(e,1/s,n)),e}function k7(e,t=0,r=1,n=.5,s,o=e,a=e){if(an.test(t)&&(t=parseFloat(t),t=ze(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=ze(o.min,o.max,n);e===o&&(l-=t),e.min=dj(e.min,t,r,l,s),e.max=dj(e.max,t,r,l,s)}function hj(e,t,[r,n,s],o,a){k7(e,t[r],t[n],t[s],t.scale,o,a)}const T7=["x","scaleX","originX"],P7=["y","scaleY","originY"];function mj(e,t,r,n){hj(e.x,t,T7,r?r.x:void 0,n?n.x:void 0),hj(e.y,t,P7,r?r.y:void 0,n?n.y:void 0)}function fj(e){return e.translate===0&&e.scale===1}function kT(e){return fj(e.x)&&fj(e.y)}function pj(e,t){return e.min===t.min&&e.max===t.max}function A7(e,t){return pj(e.x,t.x)&&pj(e.y,t.y)}function gj(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function TT(e,t){return gj(e.x,t.x)&&gj(e.y,t.y)}function vj(e){return Tt(e.x)/Tt(e.y)}function xj(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class M7{constructor(){this.members=[]}add(t){$x(this.members,t),t.scheduleRender()}remove(t){if(Fx(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(s=>t===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function O7(e,t,r){let n="";const s=e.x.translate/t.x,o=e.y.translate/t.y,a=(r==null?void 0:r.z)||0;if((s||o||a)&&(n=`translate3d(${s}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:m,skewX:p,skewY:b}=r;u&&(n=`perspective(${u}px) ${n}`),d&&(n+=`rotate(${d}deg) `),h&&(n+=`rotateX(${h}deg) `),m&&(n+=`rotateY(${m}deg) `),p&&(n+=`skewX(${p}deg) `),b&&(n+=`skewY(${b}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(n+=`scale(${l}, ${c})`),n||"none"}const rf=["","X","Y","Z"],I7=1e3;let D7=0;function nf(e,t,r,n){const{latestValues:s}=t;s[e]&&(r[e]=s[e],t.setStaticValue(e,0),n&&(n[e]=0))}function PT(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=gT(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Me,!(s||o))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&PT(n)}function AT({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(a={},l=t==null?void 0:t()){this.id=D7++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(F7),this.nodes.forEach(B7),this.nodes.forEach(q7),this.nodes.forEach(z7)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new C7)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Vx),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Gk(a)&&!Aq(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const m=()=>this.root.updateBlockedByResize=!1;Me.read(()=>{h=window.innerWidth}),e(a,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,d&&d(),d=S7(m,250),$u.hasAnimatedSinceResize&&($u.hasAnimatedSinceResize=!1,this.nodes.forEach(wj)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||u.getDefaultTransition()||J7,{onLayoutAnimationStart:g,onLayoutAnimationComplete:w}=u.getProps(),x=!this.targetLayout||!TT(this.targetLayout,p),y=!h&&m;if(this.options.layoutRoot||this.resumeFrom||y||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Zx(b,"layout"),onPlay:g,onComplete:w};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(d,y)}else h||wj(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Is(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(H7),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&PT(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(yj);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(bj);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(U7),this.nodes.forEach(L7),this.nodes.forEach($7)):this.nodes.forEach(bj),this.clearAllSnapshots();const l=kt.now();ft.delta=un(0,1e3/60,l-ft.timestamp),ft.timestamp=l,ft.isProcessing=!0,qm.update.process(ft),qm.preRender.process(ft),qm.render.process(ft),ft.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ty.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(V7),this.sharedNodes.forEach(W7)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Me.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Me.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Tt(this.snapshot.measuredBox.x)&&!Tt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=rt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!kT(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&this.instance&&(l||Qs(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),Y7(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return rt();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(X7))){const{scroll:d}=this.root;d&&(jo(l.x,d.offset.x),jo(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=rt();if(Nr(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:m}=d;d!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&Nr(l,a),jo(l.x,h.offset.x),jo(l.y,h.offset.y))}return l}applyTransform(a,l=!1){const c=rt();Nr(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Co(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Qs(d.latestValues)&&Co(c,d.latestValues)}return Qs(this.latestValues)&&Co(c,this.latestValues),c}removeTransform(a){const l=rt();Nr(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Qs(u.latestValues))continue;yg(u.latestValues)&&u.updateSnapshot();const d=rt(),h=u.measurePageBox();Nr(d,h),mj(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Qs(this.latestValues)&&mj(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ft.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=ft.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=rt(),this.targetWithTransforms=rt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),i7(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Nr(this.target,this.layout.layoutBox),uT(this.target,this.targetDelta)):Nr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||yg(this.parent.latestValues)||cT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,l,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=rt(),this.relativeTargetOrigin=rt(),Od(this.relativeTargetOrigin,l,c),Nr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var b;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(b=this.parent)!=null&&b.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ft.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Nr(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;v9(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=rt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(uj(this.prevProjectionDelta.x,this.projectionDelta.x),uj(this.prevProjectionDelta.y,this.projectionDelta.y)),vl(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!xj(this.projectionDelta.x,this.prevProjectionDelta.x)||!xj(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=So(),this.projectionDelta=So(),this.projectionDeltaWithTransform=So()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=So();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=rt(),p=c?c.source:void 0,b=this.layout?this.layout.source:void 0,g=p!==b,w=this.getStack(),x=!w||w.members.length<=1,y=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(K7));this.animationProgress=0;let v;this.mixTargetDelta=j=>{const C=j/1e3;jj(h.x,a.x,C),jj(h.y,a.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Od(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),G7(this.relativeTarget,this.relativeTargetOrigin,m,C),v&&A7(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=rt()),Nr(v,this.relativeTarget)),g&&(this.animationValues=d,R7(d,u,this.latestValues,C,y,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Is(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Me.update(()=>{$u.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=da(0)),this.currentAnimation=w7(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),a.onUpdate&&a.onUpdate(d)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(I7),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&MT(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||rt();const h=Tt(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+h;const m=Tt(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+m}Nr(l,c),Co(l,d),vl(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new M7),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&nf("z",a,u,this.animationValues);for(let d=0;d<rf.length;d++)nf(`rotate${rf[d]}`,a,u,this.animationValues),nf(`skew${rf[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}applyProjectionStyles(a,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=Lu(l==null?void 0:l.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=Lu(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Qs(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=O7(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),a.transform=h;const{x:m,y:p}=this.projectionDelta;a.transformOrigin=`${m.origin*100}% ${p.origin*100}% 0`,u.animationValues?a.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const b in xg){if(d[b]===void 0)continue;const{correct:g,applyTo:w,isCSSVariable:x}=xg[b],y=h==="none"?d[b]:g(d[b],u);if(w){const v=w.length;for(let j=0;j<v;j++)a[w[j]]=y}else x?this.options.visualElement.renderState.vars[b]=y:a[b]=y}this.options.layoutId&&(a.pointerEvents=u===this?Lu(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(yj),this.root.sharedNodes.clear()}}}function L7(e){e.updateLayout()}function $7(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:o}=e.options,a=t.source!==e.layout.source;o==="size"?sr(h=>{const m=a?t.measuredBox[h]:t.layoutBox[h],p=Tt(m);m.min=n[h].min,m.max=m.min+p}):MT(o,t.layoutBox,n)&&sr(h=>{const m=a?t.measuredBox[h]:t.layoutBox[h],p=Tt(n[h]);m.max=m.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+p)});const l=So();vl(l,n,t.layoutBox);const c=So();a?vl(c,e.applyTransform(s,!0),t.measuredBox):vl(c,n,t.layoutBox);const u=!kT(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:p}=h;if(m&&p){const b=rt();Od(b,t.layoutBox,m.layoutBox);const g=rt();Od(g,n,p.layoutBox),TT(b,g)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=b,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function F7(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function z7(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function V7(e){e.clearSnapshot()}function yj(e){e.clearMeasurements()}function bj(e){e.isLayoutDirty=!1}function U7(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wj(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function B7(e){e.resolveTargetDelta()}function q7(e){e.calcProjection()}function H7(e){e.resetSkewAndRotation()}function W7(e){e.removeLeadSnapshot()}function jj(e,t,r){e.translate=ze(t.translate,0,r),e.scale=ze(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function Cj(e,t,r,n){e.min=ze(t.min,r.min,n),e.max=ze(t.max,r.max,n)}function G7(e,t,r,n){Cj(e.x,t.x,r.x,n),Cj(e.y,t.y,r.y,n)}function K7(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const J7={duration:.45,ease:[.4,0,.1,1]},Sj=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Nj=Sj("applewebkit/")&&!Sj("chrome/")?Math.round:pr;function Rj(e){e.min=Nj(e.min),e.max=Nj(e.max)}function Y7(e){Rj(e.x),Rj(e.y)}function MT(e,t,r){return e==="position"||e==="preserve-aspect"&&!s7(vj(t),vj(r),.2)}function X7(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Q7=AT({attachResizeListener:(e,t)=>Zl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),sf={current:void 0},OT=AT({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!sf.current){const e=new Q7({});e.mount(window),e.setOptions({layoutScroll:!0}),sf.current=e}return sf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Z7={pan:{Feature:y7},drag:{Feature:x7,ProjectionNode:OT,MeasureLayout:RT}};function Ej(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const s="onHover"+r,o=n[s];o&&Me.postRender(()=>o(t,Rc(t)))}class eH extends Bs{mount(){const{current:t}=this.node;t&&(this.unmount=_q(t,(r,n)=>(Ej(this.node,n,"Start"),s=>Ej(this.node,s,"End"))))}unmount(){}}class tH extends Bs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Cc(Zl(this.node.current,"focus",()=>this.onFocus()),Zl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function _j(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const s="onTap"+(r==="End"?"":r),o=n[s];o&&Me.postRender(()=>o(t,Rc(t)))}class rH extends Bs{mount(){const{current:t}=this.node;t&&(this.unmount=Pq(t,(r,n)=>(_j(this.node,n,"Start"),(s,{success:o})=>_j(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Rg=new WeakMap,of=new WeakMap,nH=e=>{const t=Rg.get(e.target);t&&t(e)},sH=e=>{e.forEach(nH)};function iH({root:e,...t}){const r=e||document;of.has(r)||of.set(r,{});const n=of.get(r),s=JSON.stringify(t);return n[s]||(n[s]=new IntersectionObserver(sH,{root:e,...t})),n[s]}function oH(e,t,r){const n=iH(t);return Rg.set(e,r),n.observe(e),()=>{Rg.delete(e),n.unobserve(e)}}const aH={some:0,all:1};class lH extends Bs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:s="some",once:o}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:aH[s]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),m=u?d:h;m&&m(c)};return oH(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(cH(t,r))&&this.startObserver()}unmount(){}}function cH({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const uH={inView:{Feature:lH},tap:{Feature:rH},focus:{Feature:tH},hover:{Feature:eH}},dH={layout:{ProjectionNode:OT,MeasureLayout:RT}},hH={...Q9,...uH,...Z7,...dH},Kr=f9(hH,E9),mH=()=>{const e=Na();f.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]);const t=[{icon:_i,title:"Accueil",description:"Retour à la page d'accueil",href:"/"},{icon:vt,title:"CRM Métiers",description:"Découvrez nos solutions par secteur",href:"/crm-metiers"},{icon:mc,title:"Nous contacter",description:"Démarrez votre projet CRM",href:"/#contact-form"},{icon:HO,title:"Blog",description:"Conseils et actualités CRM",href:"/blog"}],r={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1,delayChildren:.2}}},n={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:[.25,.46,.45,.94]}}},s={hidden:{opacity:0,scale:.95},visible:{opacity:1,scale:1,transition:{duration:.4,ease:[.25,.46,.45,.94]}}};return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"Page non trouvée | CRM Sur Mesure"}),i.jsx("meta",{name:"description",content:"La page que vous recherchez n'existe pas ou a été déplacée."}),i.jsx("meta",{name:"robots",content:"noindex, follow"})]}),i.jsx(Ke,{}),i.jsxs("main",{className:"min-h-screen bg-background relative overflow-hidden",children:[i.jsx(Kr.div,{className:"absolute inset-0 bg-hero-gradient opacity-30",initial:{opacity:0},animate:{opacity:.3},transition:{duration:1}}),i.jsx(Kr.div,{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-primary/10 rounded-full blur-[128px]",initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},transition:{duration:1.2,ease:"easeOut"}}),i.jsx(Kr.div,{className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-full blur-[128px]",initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},transition:{duration:1.2,delay:.2,ease:"easeOut"}}),i.jsx(Kr.div,{className:"relative z-10 container mx-auto px-4 sm:px-6 lg:px-8 pt-32 pb-20",variants:r,initial:"hidden",animate:"visible",children:i.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[i.jsx(Kr.div,{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full glass border border-primary/20 mb-8",variants:n,children:i.jsx("span",{className:"text-primary font-semibold",children:"Erreur 404"})}),i.jsx(Kr.h1,{className:"text-5xl sm:text-6xl lg:text-7xl font-display font-bold mb-6",variants:n,children:i.jsx("span",{className:"text-gradient",children:"Page introuvable"})}),i.jsxs(Kr.p,{className:"text-xl text-muted-foreground mb-12 max-w-xl mx-auto",variants:n,children:["La page ",i.jsx("span",{className:"text-foreground font-mono bg-secondary px-2 py-1 rounded",children:e.pathname})," n'existe pas ou a été déplacée."]}),i.jsx(Kr.div,{variants:n,children:i.jsx(F,{asChild:!0,size:"lg",className:"mb-16 group",children:i.jsxs(G,{to:"/",children:[i.jsx(_i,{className:"mr-2 h-5 w-5"}),"Retour à l'accueil",i.jsx(ve,{className:"ml-2 h-4 w-4 transition-transform group-hover:translate-x-1"})]})})}),i.jsx(Kr.div,{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",variants:r,children:t.map((o,a)=>i.jsx(Kr.div,{variants:s,whileHover:{scale:1.02,y:-4},whileTap:{scale:.98},transition:{duration:.2},children:i.jsx(G,{to:o.href,className:"group p-6 rounded-xl glass border border-border/50 hover:border-primary/30 transition-all text-left block h-full",children:i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("div",{className:"p-3 rounded-lg bg-primary/10 text-primary group-hover:bg-primary/20 transition-colors",children:i.jsx(o.icon,{className:"h-6 w-6"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:o.title}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:o.description})]})]})})},o.href))})]})})]}),i.jsx(Je,{})]})},fn=({faqs:e,sectorName:t})=>i.jsx("section",{className:"py-20 px-4",children:i.jsxs("div",{className:"container mx-auto max-w-4xl",children:[i.jsxs("div",{className:"text-center mb-12",children:[i.jsxs("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:["Questions fréquentes - ",t]}),i.jsx("p",{className:"text-muted-foreground text-lg",children:"Tout ce que vous devez savoir sur notre solution CRM pour votre secteur."})]}),i.jsx(bE,{type:"single",collapsible:!0,className:"space-y-4",children:e.map((r,n)=>i.jsxs(Ex,{value:`item-${n}`,className:"glass rounded-xl px-6 border-none",children:[i.jsx(_x,{className:"text-left font-medium text-foreground hover:text-primary py-5",children:r.question}),i.jsx(kx,{className:"text-muted-foreground pb-5",children:r.answer})]},n))})]})}),pn=e=>({"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(t=>({"@type":"Question",name:t.question,acceptedAnswer:{"@type":"Answer",text:t.answer}}))}),gn=({currentMetier:e,relatedMetiers:t})=>i.jsx("section",{className:"py-16 px-4 bg-secondary/20",children:i.jsxs("div",{className:"container mx-auto max-w-6xl",children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold mb-8 text-center",children:"Découvrez nos autres solutions CRM"}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:t.map((r,n)=>i.jsxs(G,{to:r.slug,className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group",children:[i.jsx("h3",{className:"font-display font-semibold text-lg mb-2 group-hover:text-primary transition-colors",children:r.name}),i.jsx("p",{className:"text-muted-foreground text-sm mb-4",children:r.description}),i.jsxs("span",{className:"inline-flex items-center text-primary text-sm font-medium",children:["En savoir plus",i.jsx(ve,{className:"ml-1 h-4 w-4 group-hover:translate-x-1 transition-transform"})]})]},n))}),i.jsx("div",{className:"text-center mt-8",children:i.jsxs(G,{to:"/crm-metiers",className:"text-primary hover:underline inline-flex items-center gap-1",children:["Voir tous nos CRM par métier",i.jsx(ve,{className:"h-4 w-4"})]})})]})}),fH=[{name:"CRM Courtage",slug:"/crm-courtage",description:"Gestion des dossiers de crédit immobilier et conformité pour courtiers."},{name:"CRM Assurance",slug:"/crm-assurance",description:"Solution pour courtiers et agents généraux en assurance."},{name:"CRM Marketing",slug:"/crm-marketing",description:"Gestion de campagnes et projets pour agences de communication."}],pH=[{icon:_i,title:"Gestion du Portefeuille Biens",description:"Centralisez tous vos mandats : vente, location, gestion locative avec fiches détaillées et photos."},{icon:vt,title:"Suivi Acquéreurs & Locataires",description:"Qualifiez vos prospects, suivez leurs critères de recherche et automatisez les alertes nouveaux biens."},{icon:xr,title:"Agenda & Visites",description:"Planifiez vos visites, synchronisez avec votre agenda et envoyez des rappels automatiques."},{icon:mr,title:"Génération de Documents",description:"Créez automatiquement mandats, compromis, états des lieux avec vos modèles personnalisés."},{icon:dI,title:"Diffusion Multi-portails",description:"Publiez vos annonces sur SeLoger, LeBonCoin, Logic-Immo en un clic depuis votre CRM."},{icon:JO,title:"Visite Virtuelle Intégrée",description:"Intégrez vos visites virtuelles et photos HDR directement dans les fiches biens."}],gH=["Gain de 50% sur la saisie des annonces","Meilleur matching acquéreurs/biens","Réduction des délais de transaction","Suivi automatisé des leads portails","Reporting complet par négociateur","Conformité loi Hoguet & RGPD"],kj=[{question:"Comment un CRM immobilier améliore-t-il la gestion des mandats ?",answer:"Notre CRM centralise toutes les informations de vos mandats (vente, location, gestion) avec photos, documents et historique. Les alertes automatiques vous rappellent les échéances de mandat, les relances propriétaires et les actions à mener pour chaque bien."},{question:"Le CRM permet-il la diffusion automatique sur les portails immobiliers ?",answer:"Oui, notre CRM peut s'intégrer avec les principaux portails (SeLoger, LeBonCoin, Logic-Immo, Bien'ici) pour une diffusion en un clic. Les modifications de prix ou de disponibilité sont synchronisées automatiquement sur tous les supports."},{question:"Comment fonctionne le matching acquéreurs/biens ?",answer:"Le système enregistre les critères de recherche de chaque acquéreur (budget, surface, localisation, caractéristiques). Dès qu'un nouveau bien correspond, une alerte est envoyée automatiquement au négociateur et/ou directement à l'acquéreur selon vos paramètres."},{question:"Le CRM est-il conforme à la loi Hoguet et au RGPD ?",answer:"Absolument. Notre solution intègre la gestion des mandats conforme à la loi Hoguet, le registre des mandats, la traçabilité des transactions et la gestion des consentements RGPD. Tous les documents légaux peuvent être générés automatiquement."},{question:"Peut-on gérer plusieurs agences avec le même CRM ?",answer:"Oui, notre CRM est conçu pour gérer un réseau d'agences avec des droits d'accès par agence, des tableaux de bord consolidés et une gestion centralisée ou décentralisée selon vos besoins. Idéal pour les groupes immobiliers et réseaux de mandataires."}],vH=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM Immobilier Sur Mesure | Logiciel Agence Immobilière"}),i.jsx("meta",{name:"description",content:"CRM spécialisé pour agences immobilières et mandataires. Gestion des biens, acquéreurs, visites. Solution 100% personnalisable dès 3000€."}),i.jsx("meta",{name:"keywords",content:"CRM immobilier, logiciel agence immobilière, CRM mandataire, gestion locative, logiciel transaction immobilière"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/crm-immobilier"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/crm-immobilier"}),i.jsx("meta",{property:"og:title",content:"CRM Immobilier Sur Mesure | Logiciel Agence"}),i.jsx("meta",{property:"og:description",content:"CRM spécialisé pour agences immobilières et mandataires. Gestion des biens, acquéreurs, visites."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-crm-immobilier.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"CRM Immobilier Sur Mesure | Logiciel Agence"}),i.jsx("meta",{name:"twitter:description",content:"CRM spécialisé pour agences immobilières et mandataires. Gestion des biens, acquéreurs, visites."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-crm-immobilier.png"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"CRM Immobilier Sur Mesure",applicationCategory:"BusinessApplication",description:"Logiciel CRM spécialisé pour les professionnels de l'immobilier",offers:{"@type":"Offer",price:"3000",priceCurrency:"EUR"}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:"Développement CRM Sur Mesure",name:"CRM Immobilier Sur Mesure",description:"Développement de CRM personnalisé pour agences immobilières, réseaux de mandataires et promoteurs. Gestion des biens, acquéreurs et transactions.",provider:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com"},areaServed:{"@type":"Country",name:"France"},hasOfferCatalog:{"@type":"OfferCatalog",name:"Services CRM Immobilier",itemListElement:[{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion du Portefeuille Biens"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Suivi Acquéreurs & Locataires"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Diffusion Multi-portails"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Conformité loi Hoguet & RGPD"}}]}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(pn(kj))}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"CRM par Métier",item:"https://crmsurmesure.com/crm-metiers"},{"@type":"ListItem",position:3,name:"CRM Immobilier",item:"https://crmsurmesure.com/crm-immobilier"}]})})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("section",{className:"pt-32 pb-20 px-4 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 via-transparent to-transparent"}),i.jsx("div",{className:"container mx-auto max-w-6xl relative z-10",children:i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"CRM Spécialisé Immobilier"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Le CRM pensé pour les",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-accent",children:" professionnels de l'immobilier"})]}),i.jsxs("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto mb-8",children:["Agences immobilières, réseaux de mandataires, promoteurs : gérez vos biens, prospects et transactions avec un outil adapté à votre métier. Besoin d'intégrer le financement ? Découvrez notre"," ",i.jsx(G,{to:"/crm-courtage",className:"text-primary hover:underline",children:"CRM pour courtiers en crédit"}),"."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Demander une démo",i.jsx(ve,{className:"ml-2 h-5 w-5"})]}),i.jsx(F,{variant:"outline",size:"lg",asChild:!0,children:i.jsx("a",{href:"#fonctionnalites",children:"Voir les fonctionnalités"})})]})]})})]}),i.jsx("section",{id:"fonctionnalites",className:"py-20 px-4 bg-secondary/30",children:i.jsxs("div",{className:"container mx-auto max-w-6xl",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Fonctionnalités métier immobilier"}),i.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Chaque fonctionnalité est conçue pour optimiser le quotidien des professionnels de l'immobilier."})]}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:pH.map((r,n)=>i.jsxs("div",{className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:i.jsx(r.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:r.title}),i.jsx("p",{className:"text-muted-foreground",children:r.description})]},n))})]})}),i.jsx("section",{className:"py-20 px-4",children:i.jsx("div",{className:"container mx-auto max-w-6xl",children:i.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Pourquoi un CRM sur mesure pour l'immobilier ?"}),i.jsxs("p",{className:"text-muted-foreground text-lg mb-8",children:["Les logiciels immobiliers classiques sont rigides et coûteux. Notre approche vous offre un outil parfaitement adapté à VOS process, comme nous le faisons pour d'autres"," ",i.jsx(G,{to:"/crm-metiers",className:"text-primary hover:underline",children:"secteurs d'activité spécialisés"}),"."]}),i.jsx("ul",{className:"space-y-4",children:gH.map((r,n)=>i.jsxs("li",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0",children:i.jsx(At,{className:"w-4 h-4 text-primary"})}),i.jsx("span",{className:"text-foreground",children:r})]},n))})]}),i.jsx("div",{className:"glass p-8 rounded-2xl",children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-5xl font-display font-bold text-primary mb-2",children:"50%"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"de gain sur la saisie annonces"}),i.jsxs("div",{className:"border-t border-border/30 pt-6",children:[i.jsx("p",{className:"text-3xl font-display font-bold text-foreground mb-2",children:"À partir de 3 000€"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"Vous êtes propriétaire du code"}),i.jsx(F,{variant:"hero",className:"w-full",onClick:()=>t(!0),children:"Obtenir un devis personnalisé"})]})]})})]})})}),i.jsx(fn,{faqs:kj,sectorName:"CRM Immobilier"}),i.jsx(gn,{currentMetier:"immobilier",relatedMetiers:fH}),i.jsx("section",{className:"py-20 px-4 bg-gradient-to-b from-primary/10 to-transparent",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Prêt à transformer votre agence immobilière ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Discutons de vos besoins spécifiques et créons ensemble le CRM qui boostera vos performances commerciales."}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Planifier un appel découverte",i.jsx(ve,{className:"ml-2 h-5 w-5"})]})]})}),i.jsx(Je,{})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},xH=[{name:"CRM Courtage",slug:"/crm-courtage",description:"Gestion des dossiers de financement et conformité DDA pour courtiers."},{name:"CRM Automobile",slug:"/crm-automobile",description:"Solution pour concessions et garages avec suivi après-vente."},{name:"CRM Immobilier",slug:"/crm-immobilier",description:"Gestion des biens, acquéreurs et transactions immobilières."}],yH=[{icon:vt,title:"Gestion des Clients & Prospects",description:"Centralisez toutes les informations de vos assurés : contrats, sinistres, échéances, historique des échanges."},{icon:mr,title:"Suivi des Contrats",description:"Gérez l'ensemble de vos polices d'assurance avec alertes automatiques pour les renouvellements et échéances."},{icon:$i,title:"Automatisation des Relances",description:"Programmez des campagnes de relance automatiques pour les renouvellements et les impayés."},{icon:Fi,title:"Analyse de Performance",description:"Tableaux de bord sur mesure : taux de conversion, primes encaissées, sinistralité par portefeuille."},{icon:xa,title:"Conformité RGPD & ACPR",description:"Respect des normes réglementaires avec traçabilité complète et gestion des consentements."},{icon:In,title:"Intégration Téléphonie",description:"Connectez votre CRM à votre système téléphonique pour un historique complet des appels."}],bH=["Réduction de 40% du temps administratif","Amélioration du taux de renouvellement","Vision 360° de chaque assuré","Automatisation des tâches répétitives","Meilleure réactivité sur les sinistres","Augmentation du panier moyen client"],Tj=[{question:"Quelles sont les fonctionnalités essentielles d'un CRM pour l'assurance ?",answer:"Un CRM assurance doit inclure la gestion centralisée des clients et contrats, le suivi des sinistres, les alertes de renouvellement automatiques, la conformité RGPD/ACPR, et des tableaux de bord de performance. Notre solution intègre toutes ces fonctionnalités de manière personnalisable."},{question:"Comment le CRM aide-t-il à la conformité ACPR et DDA ?",answer:"Notre CRM intègre des fonctionnalités de traçabilité complète des échanges, de gestion des consentements clients, d'archivage des documents réglementaires et de suivi des obligations de conseil. Chaque action est horodatée pour répondre aux exigences des audits."},{question:"Le CRM peut-il se connecter à mes outils existants (comparateurs, extranets) ?",answer:"Oui, notre approche sur mesure permet d'intégrer votre CRM avec vos outils métier : comparateurs de tarifs, extranets compagnies, logiciels de comptabilité, et systèmes téléphoniques. Nous développons les connecteurs adaptés à votre environnement."},{question:"Combien de temps faut-il pour déployer un CRM assurance sur mesure ?",answer:"Le délai moyen de déploiement est de 4 à 8 semaines selon la complexité du projet. Cela inclut l'analyse des besoins, le développement, les tests et la formation de vos équipes. Nous procédons par itérations pour vous livrer rapidement une première version fonctionnelle."},{question:"Quel est le coût d'un CRM sur mesure pour un cabinet d'assurance ?",answer:"Nos solutions démarrent à partir de 3 000€ pour un CRM de base. Le prix final dépend des fonctionnalités souhaitées, des intégrations nécessaires et du nombre d'utilisateurs. Contrairement aux solutions SaaS, vous êtes propriétaire du code sans abonnement mensuel récurrent."}],wH=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM Assurance Sur Mesure | Logiciel Courtier & Agent Général"}),i.jsx("meta",{name:"description",content:"CRM spécialisé pour courtiers en assurance et agents généraux. Gestion des contrats, sinistres, renouvellements. Solution 100% personnalisable dès 3000€."}),i.jsx("meta",{name:"keywords",content:"CRM assurance, logiciel courtier assurance, CRM agent général, gestion contrats assurance, logiciel cabinet assurance"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/crm-assurance"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/crm-assurance"}),i.jsx("meta",{property:"og:title",content:"CRM Assurance Sur Mesure | Logiciel Courtier"}),i.jsx("meta",{property:"og:description",content:"CRM spécialisé pour courtiers en assurance et agents généraux. Gestion des contrats, sinistres, renouvellements."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-crm-assurance.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"CRM Assurance Sur Mesure | Logiciel Courtier"}),i.jsx("meta",{name:"twitter:description",content:"CRM spécialisé pour courtiers en assurance et agents généraux. Gestion des contrats, sinistres, renouvellements."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-crm-assurance.png"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"CRM Assurance Sur Mesure",applicationCategory:"BusinessApplication",description:"Logiciel CRM spécialisé pour les professionnels de l'assurance",offers:{"@type":"Offer",price:"3000",priceCurrency:"EUR"}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:"Développement CRM Sur Mesure",name:"CRM Assurance Sur Mesure",description:"Développement de CRM personnalisé pour courtiers en assurance, agents généraux et cabinets de courtage. Gestion des contrats, sinistres et renouvellements.",provider:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com"},areaServed:{"@type":"Country",name:"France"},hasOfferCatalog:{"@type":"OfferCatalog",name:"Services CRM Assurance",itemListElement:[{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion des Clients & Prospects"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Suivi des Contrats"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Automatisation des Relances"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Conformité RGPD & ACPR"}}]}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(pn(Tj))}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"CRM par Métier",item:"https://crmsurmesure.com/crm-metiers"},{"@type":"ListItem",position:3,name:"CRM Assurance",item:"https://crmsurmesure.com/crm-assurance"}]})})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("section",{className:"pt-32 pb-20 px-4 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 via-transparent to-transparent"}),i.jsx("div",{className:"container mx-auto max-w-6xl relative z-10",children:i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"CRM Spécialisé Assurance"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Le CRM conçu pour les",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-accent",children:" professionnels de l'assurance"})]}),i.jsxs("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto mb-8",children:["Courtiers, agents généraux, cabinets de courtage : gérez vos clients, contrats et sinistres avec un outil 100% adapté à votre métier. Notre solution s'intègre aussi parfaitement aux activités de"," ",i.jsx(G,{to:"/crm-courtage",className:"text-primary hover:underline",children:"courtage en crédit"})," pour une gestion unifiée."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Demander une démo",i.jsx(ve,{className:"ml-2 h-5 w-5"})]}),i.jsx(F,{variant:"outline",size:"lg",asChild:!0,children:i.jsx("a",{href:"#fonctionnalites",children:"Voir les fonctionnalités"})})]})]})})]}),i.jsx("section",{id:"fonctionnalites",className:"py-20 px-4 bg-secondary/30",children:i.jsxs("div",{className:"container mx-auto max-w-6xl",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Fonctionnalités métier assurance"}),i.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Chaque fonctionnalité est pensée pour répondre aux besoins spécifiques des professionnels de l'assurance."})]}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:yH.map((r,n)=>i.jsxs("div",{className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:i.jsx(r.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:r.title}),i.jsx("p",{className:"text-muted-foreground",children:r.description})]},n))})]})}),i.jsx("section",{className:"py-20 px-4",children:i.jsx("div",{className:"container mx-auto max-w-6xl",children:i.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Pourquoi choisir un CRM sur mesure pour l'assurance ?"}),i.jsxs("p",{className:"text-muted-foreground text-lg mb-8",children:["Les CRM génériques ne comprennent pas les spécificités de votre métier. Notre solution est conçue par et pour des professionnels de l'assurance, avec des fonctionnalités inspirées de nos"," ",i.jsx(G,{to:"/crm-metiers",className:"text-primary hover:underline",children:"solutions sectorielles"}),"."]}),i.jsx("ul",{className:"space-y-4",children:bH.map((r,n)=>i.jsxs("li",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0",children:i.jsx(At,{className:"w-4 h-4 text-primary"})}),i.jsx("span",{className:"text-foreground",children:r})]},n))})]}),i.jsx("div",{className:"glass p-8 rounded-2xl",children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-5xl font-display font-bold text-primary mb-2",children:"40%"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"de temps gagné en moyenne"}),i.jsxs("div",{className:"border-t border-border/30 pt-6",children:[i.jsx("p",{className:"text-3xl font-display font-bold text-foreground mb-2",children:"À partir de 3 000€"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"Propriété totale du code source"}),i.jsx(F,{variant:"hero",className:"w-full",onClick:()=>t(!0),children:"Obtenir un devis personnalisé"})]})]})})]})})}),i.jsx(fn,{faqs:Tj,sectorName:"CRM Assurance"}),i.jsx(gn,{currentMetier:"assurance",relatedMetiers:xH}),i.jsx("section",{className:"py-20 px-4 bg-gradient-to-b from-primary/10 to-transparent",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Prêt à digitaliser votre cabinet d'assurance ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Discutons de vos besoins spécifiques et créons ensemble le CRM qui fera la différence pour votre activité."}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Planifier un appel découverte",i.jsx(ve,{className:"ml-2 h-5 w-5"})]})]})}),i.jsx(Je,{})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},jH=[{name:"CRM Assurance",slug:"/crm-assurance",description:"Solution pour la gestion des contrats et sinistres en assurance."},{name:"CRM Immobilier",slug:"/crm-immobilier",description:"Gestion des biens et transactions pour agences immobilières."},{name:"CRM Comptable",slug:"/crm-comptable",description:"Gestion des dossiers et missions pour cabinets comptables."}],CH=[{icon:vt,title:"Gestion Clients & Patrimoine",description:"Vision 360° de vos clients : situation patrimoniale, objectifs, profil de risque, historique des investissements."},{icon:mr,title:"Suivi des Dossiers",description:"Gérez chaque dossier de financement ou d'investissement avec workflow personnalisé et alertes automatiques."},{icon:pI,title:"Simulation & Comparaison",description:"Intégrez vos outils de simulation et comparez les offres des partenaires directement dans le CRM."},{icon:va,title:"Reporting Commissionnements",description:"Suivi automatisé des commissions, rétrocessions et objectifs par partenaire et par conseiller."},{icon:xa,title:"Conformité DDA & AMF",description:"Questionnaires de connaissance client, archivage des conseils, traçabilité réglementaire complète."},{icon:Fi,title:"Pipe Commercial",description:"Visualisez votre pipeline d'affaires, taux de transformation et prévisions de chiffre d'affaires."}],SH=["Centralisation de toute l'activité commerciale","Gain de temps sur le reporting partenaires","Conformité réglementaire automatisée","Meilleur suivi des relances clients","Analyse précise de la rentabilité","Historique complet pour les audits"],Pj=[{question:"Comment le CRM aide-t-il à respecter la directive DDA ?",answer:"Notre CRM intègre les questionnaires de connaissance client (KYC), l'archivage des conseils donnés, la traçabilité des échanges et la documentation des recommandations. Chaque étape du parcours client est horodatée pour répondre aux exigences de la DDA."},{question:"Le CRM gère-t-il le suivi des commissions multi-partenaires ?",answer:"Oui, notre solution permet de paramétrer les grilles de commissionnement par partenaire, de suivre les commissions attendues et reçues, de gérer les rétrocessions et de générer des rapports de performance par conseiller et par partenaire."},{question:"Peut-on intégrer des outils de simulation de crédit ou d'investissement ?",answer:"Absolument. Le CRM peut s'interfacer avec vos outils de simulation existants ou intégrer des modules de calcul personnalisés. Les simulations sont automatiquement archivées dans le dossier client pour traçabilité."},{question:"Le CRM est-il adapté aux IOBSP et aux CGP ?",answer:"Oui, notre solution est conçue pour les deux métiers. Pour les IOBSP : suivi des dossiers de financement, gestion des pièces, workflow bancaire. Pour les CGP : gestion patrimoniale, suivi des investissements, reporting client personnalisé."},{question:"Comment gérer la conformité ORIAS et les formations obligatoires ?",answer:"Le CRM peut intégrer le suivi des habilitations ORIAS, les dates de renouvellement, les heures de formation DDA effectuées par collaborateur et les alertes de mise à jour. Vous gardez une vision claire de la conformité de votre équipe."}],NH=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM Courtage Sur Mesure | Logiciel Courtier Crédit"}),i.jsx("meta",{name:"description",content:"CRM spécialisé pour courtiers en crédit, IOBSP, CGP et courtiers en assurance. Gestion des dossiers, conformité DDA, commissions. Solution dès 3000€."}),i.jsx("meta",{name:"keywords",content:"CRM courtage, logiciel courtier crédit, CRM IOBSP, CRM CGP, logiciel courtier patrimoine, gestion cabinet courtage"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/crm-courtage"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/crm-courtage"}),i.jsx("meta",{property:"og:title",content:"CRM Courtage Sur Mesure | Logiciel Courtier"}),i.jsx("meta",{property:"og:description",content:"CRM spécialisé pour courtiers en crédit, IOBSP, CGP. Gestion des dossiers, conformité DDA, commissions."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-crm-courtage.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"CRM Courtage Sur Mesure | Logiciel Courtier"}),i.jsx("meta",{name:"twitter:description",content:"CRM spécialisé pour courtiers en crédit, IOBSP, CGP. Gestion des dossiers, conformité DDA, commissions."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-crm-courtage.png"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"CRM Courtage Sur Mesure",applicationCategory:"BusinessApplication",description:"Logiciel CRM spécialisé pour les professionnels du courtage",offers:{"@type":"Offer",price:"3000",priceCurrency:"EUR"}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:"Développement CRM Sur Mesure",name:"CRM Courtage Sur Mesure",description:"Développement de CRM personnalisé pour courtiers en crédit, IOBSP, CGP et courtiers en assurance. Gestion des dossiers, conformité DDA et commissions.",provider:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com"},areaServed:{"@type":"Country",name:"France"},hasOfferCatalog:{"@type":"OfferCatalog",name:"Services CRM Courtage",itemListElement:[{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion Clients & Patrimoine"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Suivi des Dossiers"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Conformité DDA & AMF"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Reporting Commissionnements"}}]}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(pn(Pj))}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"CRM par Métier",item:"https://crmsurmesure.com/crm-metiers"},{"@type":"ListItem",position:3,name:"CRM Courtage",item:"https://crmsurmesure.com/crm-courtage"}]})})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("section",{className:"pt-32 pb-20 px-4 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 via-transparent to-transparent"}),i.jsx("div",{className:"container mx-auto max-w-6xl relative z-10",children:i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"CRM Spécialisé Courtage"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Le CRM dédié aux",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-accent",children:" professionnels du courtage"})]}),i.jsxs("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto mb-8",children:["Courtiers en crédit (IOBSP), CGP, courtiers en assurance : pilotez votre activité avec un outil adapté aux exigences de votre métier. Pour le volet assurance, consultez notre"," ",i.jsx(G,{to:"/crm-assurance",className:"text-primary hover:underline",children:"solution dédiée aux assureurs"}),"."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Demander une démo",i.jsx(ve,{className:"ml-2 h-5 w-5"})]}),i.jsx(F,{variant:"outline",size:"lg",asChild:!0,children:i.jsx("a",{href:"#fonctionnalites",children:"Voir les fonctionnalités"})})]})]})})]}),i.jsx("section",{id:"fonctionnalites",className:"py-20 px-4 bg-secondary/30",children:i.jsxs("div",{className:"container mx-auto max-w-6xl",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Fonctionnalités métier courtage"}),i.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Chaque fonctionnalité répond aux besoins spécifiques des intermédiaires financiers et en assurance."})]}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:CH.map((r,n)=>i.jsxs("div",{className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:i.jsx(r.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:r.title}),i.jsx("p",{className:"text-muted-foreground",children:r.description})]},n))})]})}),i.jsx("section",{className:"py-20 px-4",children:i.jsx("div",{className:"container mx-auto max-w-6xl",children:i.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Pourquoi un CRM sur mesure pour le courtage ?"}),i.jsxs("p",{className:"text-muted-foreground text-lg mb-8",children:["Les logiciels standards ne comprennent pas la complexité de votre métier : multi-partenaires, conformité réglementaire, gestion des commissions. Vous travaillez avec des agents"," ",i.jsx(G,{to:"/crm-immobilier",className:"text-primary hover:underline",children:"immobiliers"})," ? Notre CRM peut aussi gérer cette relation."]}),i.jsx("ul",{className:"space-y-4",children:SH.map((r,n)=>i.jsxs("li",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0",children:i.jsx(At,{className:"w-4 h-4 text-primary"})}),i.jsx("span",{className:"text-foreground",children:r})]},n))})]}),i.jsx("div",{className:"glass p-8 rounded-2xl",children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-5xl font-display font-bold text-primary mb-2",children:"100%"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"conformité réglementaire"}),i.jsxs("div",{className:"border-t border-border/30 pt-6",children:[i.jsx("p",{className:"text-3xl font-display font-bold text-foreground mb-2",children:"À partir de 3 000€"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"Code source vous appartient"}),i.jsx(F,{variant:"hero",className:"w-full",onClick:()=>t(!0),children:"Obtenir un devis personnalisé"})]})]})})]})})}),i.jsx(fn,{faqs:Pj,sectorName:"CRM Courtage"}),i.jsx(gn,{currentMetier:"courtage",relatedMetiers:jH}),i.jsx("section",{className:"py-20 px-4 bg-gradient-to-b from-primary/10 to-transparent",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Prêt à optimiser votre cabinet de courtage ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Discutons de vos besoins spécifiques et créons ensemble le CRM qui structurera votre croissance."}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Planifier un appel découverte",i.jsx(ve,{className:"ml-2 h-5 w-5"})]})]})}),i.jsx(Je,{})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},RH=[{name:"CRM Avocat",slug:"/crm-avocat",description:"Gestion des dossiers juridiques et facturation pour cabinets d'avocats."},{name:"CRM Courtage",slug:"/crm-courtage",description:"Solution pour courtiers en crédit avec conformité DDA."},{name:"CRM Santé",slug:"/crm-sante",description:"Gestion des patients et RDV pour établissements de santé."}],EH=[{icon:vt,title:"Gestion Dossiers Clients",description:"Centralisez tous vos dossiers : coordonnées, interlocuteurs, documents, historique des missions."},{icon:xr,title:"Planning & Échéances",description:"Calendrier des obligations fiscales et sociales avec alertes automatiques par collaborateur."},{icon:mr,title:"Suivi des Missions",description:"Gérez vos lettres de mission, temps passés et facturation par dossier et par collaborateur."},{icon:$i,title:"Timesheet Intégré",description:"Saisie des temps simplifiée pour un suivi précis de la rentabilité de chaque mission."},{icon:sa,title:"Facturation Automatisée",description:"Génération des factures basée sur les honoraires fixes ou le temps passé, avec relances automatiques."},{icon:va,title:"Tableaux de Bord Cabinet",description:"KPIs en temps réel : charge collaborateurs, CA par client, rentabilité, récurrence."}],_H=["Réduction de 35% du temps administratif","Meilleure visibilité sur la charge de travail","Automatisation des relances échéances","Suivi précis de la rentabilité client","Conformité documentation missions","Amélioration de la relation client"],Aj=[{question:"Comment le CRM s'intègre-t-il avec mes logiciels de production comptable ?",answer:"Notre CRM est conçu pour compléter vos outils de production (Cegid, Sage, ACD, etc.) sans les remplacer. Il se concentre sur la gestion de la relation client, le suivi des missions et la facturation. Des passerelles peuvent être développées pour synchroniser les données essentielles."},{question:"Le timesheet permet-il une facturation au temps passé ?",answer:"Oui, le module timesheet permet à chaque collaborateur de saisir ses temps par dossier et par type de mission. La facturation peut ensuite être générée automatiquement selon vos taux horaires ou vos forfaits, avec détail des temps passés."},{question:"Comment gérer les échéances fiscales et sociales de tous mes clients ?",answer:"Le CRM intègre un calendrier des obligations avec alertes personnalisables. Vous définissez les échéances récurrentes (TVA, IS, DSN, liasses fiscales...) par client et recevez des rappels automatiques. Un tableau de bord synthétise les échéances à venir par période."},{question:"Peut-on suivre la rentabilité par client et par mission ?",answer:"Absolument. En croisant les temps passés (timesheet), les honoraires facturés et les coûts par collaborateur, le CRM calcule la rentabilité de chaque dossier. Vous identifiez rapidement les clients sous-facturés et optimisez votre portefeuille."},{question:"Le CRM permet-il de gérer les lettres de mission ?",answer:"Oui, vous pouvez créer vos modèles de lettres de mission, les personnaliser par client et suivre leur statut (envoyée, signée, à renouveler). Les alertes de renouvellement annuel sont automatiques pour assurer la conformité ordinal."}],kH=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM Cabinet Comptable Sur Mesure | Logiciel Expert-Comptable"}),i.jsx("meta",{name:"description",content:"CRM spécialisé pour cabinets comptables et experts-comptables. Gestion des dossiers, échéances fiscales, timesheet, facturation. Solution dès 3000€."}),i.jsx("meta",{name:"keywords",content:"CRM cabinet comptable, logiciel expert comptable, CRM expertise comptable, gestion cabinet comptable, logiciel gestion dossiers comptables"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/crm-comptable"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/crm-comptable"}),i.jsx("meta",{property:"og:title",content:"CRM Cabinet Comptable | Logiciel Expert-Comptable"}),i.jsx("meta",{property:"og:description",content:"CRM spécialisé pour cabinets comptables. Gestion des dossiers, échéances fiscales, timesheet, facturation."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-crm-comptable.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"CRM Cabinet Comptable | Logiciel Expert-Comptable"}),i.jsx("meta",{name:"twitter:description",content:"CRM spécialisé pour cabinets comptables. Gestion des dossiers, échéances fiscales, timesheet, facturation."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-crm-comptable.png"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"CRM Cabinet Comptable Sur Mesure",applicationCategory:"BusinessApplication",description:"Logiciel CRM spécialisé pour les cabinets d'expertise comptable",offers:{"@type":"Offer",price:"3000",priceCurrency:"EUR"}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:"Développement CRM Sur Mesure",name:"CRM Cabinet Comptable Sur Mesure",description:"Développement de CRM personnalisé pour cabinets comptables et experts-comptables. Gestion des dossiers, échéances fiscales, timesheet et facturation.",provider:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com"},areaServed:{"@type":"Country",name:"France"},hasOfferCatalog:{"@type":"OfferCatalog",name:"Services CRM Comptable",itemListElement:[{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion Dossiers Clients"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Planning & Échéances"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Timesheet Intégré"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Facturation Automatisée"}}]}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(pn(Aj))}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"CRM par Métier",item:"https://crmsurmesure.com/crm-metiers"},{"@type":"ListItem",position:3,name:"CRM Comptable",item:"https://crmsurmesure.com/crm-comptable"}]})})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("section",{className:"pt-32 pb-20 px-4 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 via-transparent to-transparent"}),i.jsx("div",{className:"container mx-auto max-w-6xl relative z-10",children:i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"CRM Spécialisé Expertise Comptable"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Le CRM conçu pour les",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-accent",children:" cabinets d'expertise comptable"})]}),i.jsxs("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto mb-8",children:["Experts-comptables, commissaires aux comptes : gérez vos dossiers, missions et collaborateurs avec un outil parfaitement adapté à votre organisation. Vous accompagnez des"," ",i.jsx(G,{to:"/crm-avocat",className:"text-primary hover:underline",children:"cabinets d'avocats"})," ? Nous avons aussi une solution pour eux."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Demander une démo",i.jsx(ve,{className:"ml-2 h-5 w-5"})]}),i.jsx(F,{variant:"outline",size:"lg",asChild:!0,children:i.jsx("a",{href:"#fonctionnalites",children:"Voir les fonctionnalités"})})]})]})})]}),i.jsx("section",{id:"fonctionnalites",className:"py-20 px-4 bg-secondary/30",children:i.jsxs("div",{className:"container mx-auto max-w-6xl",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Fonctionnalités métier expertise comptable"}),i.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Chaque fonctionnalité est pensée pour optimiser le fonctionnement de votre cabinet."})]}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:EH.map((r,n)=>i.jsxs("div",{className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:i.jsx(r.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:r.title}),i.jsx("p",{className:"text-muted-foreground",children:r.description})]},n))})]})}),i.jsx("section",{className:"py-20 px-4",children:i.jsx("div",{className:"container mx-auto max-w-6xl",children:i.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Pourquoi un CRM sur mesure pour votre cabinet ?"}),i.jsxs("p",{className:"text-muted-foreground text-lg mb-8",children:["Les logiciels de production comptable ne couvrent pas la gestion relation client. Notre CRM vient compléter votre environnement de travail, avec le même niveau de rigueur que notre"," ",i.jsx(G,{to:"/crm-courtage",className:"text-primary hover:underline",children:"outil pour le courtage financier"}),"."]}),i.jsx("ul",{className:"space-y-4",children:_H.map((r,n)=>i.jsxs("li",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0",children:i.jsx(At,{className:"w-4 h-4 text-primary"})}),i.jsx("span",{className:"text-foreground",children:r})]},n))})]}),i.jsx("div",{className:"glass p-8 rounded-2xl",children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-5xl font-display font-bold text-primary mb-2",children:"35%"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"de temps administratif gagné"}),i.jsxs("div",{className:"border-t border-border/30 pt-6",children:[i.jsx("p",{className:"text-3xl font-display font-bold text-foreground mb-2",children:"À partir de 3 000€"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"Propriété totale du code"}),i.jsx(F,{variant:"hero",className:"w-full",onClick:()=>t(!0),children:"Obtenir un devis personnalisé"})]})]})})]})})}),i.jsx(fn,{faqs:Aj,sectorName:"CRM Cabinet Comptable"}),i.jsx(gn,{currentMetier:"comptable",relatedMetiers:RH}),i.jsx("section",{className:"py-20 px-4 bg-gradient-to-b from-primary/10 to-transparent",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Prêt à moderniser la gestion de votre cabinet ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Discutons de vos besoins spécifiques et créons ensemble le CRM qui améliorera votre productivité."}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Planifier un appel découverte",i.jsx(ve,{className:"ml-2 h-5 w-5"})]})]})}),i.jsx(Je,{})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},TH=[{name:"CRM Comptable",slug:"/crm-comptable",description:"Gestion des missions et facturation pour experts-comptables."},{name:"CRM Courtage",slug:"/crm-courtage",description:"Solution pour courtiers avec suivi conformité réglementaire."},{name:"CRM Recrutement",slug:"/crm-recrutement",description:"Gestion des candidats et placements pour cabinets RH."}],PH=[{icon:nI,title:"Gestion des Dossiers",description:"Centralisez tous vos dossiers : parties, pièces, échéances procédurales, correspondances et notes."},{icon:vt,title:"Fichier Clients & Contacts",description:"Base clients complète avec historique des affaires, conflits d'intérêts et relations entre parties."},{icon:xr,title:"Agenda & Audiences",description:"Planifiez RDV, audiences, délais de procédure avec alertes automatiques et synchronisation."},{icon:$i,title:"Timesheet & Facturation",description:"Saisie des temps par dossier, génération des factures selon honoraires ou temps passé."},{icon:mr,title:"Modèles de Documents",description:"Bibliothèque de modèles personnalisables : conclusions, assignations, courriers types."},{icon:oh,title:"Conformité & Déontologie",description:"Vérification conflits d'intérêts, traçabilité RGPD, archivage sécurisé des dossiers."}],AH=["Gain de 40% sur la gestion administrative","Meilleur suivi des délais procéduraux","Facturation précise au temps passé","Vérification automatique des conflits","Archivage conforme et sécurisé","Collaboration facilitée entre associés"],Mj=[{question:"Comment le CRM gère-t-il les conflits d'intérêts ?",answer:"Le CRM vérifie automatiquement les conflits potentiels lors de l'ouverture d'un nouveau dossier. Il analyse les parties impliquées, les parties adverses historiques et les relations entre clients. Vous êtes alerté immédiatement en cas de conflit détecté."},{question:"Le CRM permet-il de facturer au temps passé et au forfait ?",answer:"Oui, les deux modes de facturation sont supportés. Le timesheet permet de saisir les temps par dossier et par type d'acte. La facturation peut ensuite être générée au taux horaire, au forfait ou en mode mixte selon vos conventions d'honoraires."},{question:"Comment sont gérés les délais de procédure et audiences ?",answer:"Le calendrier intègre tous les délais procéduraux avec des alertes personnalisables (J-30, J-15, J-7...). Les audiences sont planifiées avec rappels automatiques. Vous pouvez synchroniser avec vos agendas externes (Outlook, Google Calendar)."},{question:"Le CRM est-il conforme au secret professionnel et au RGPD ?",answer:"Absolument. L'accès aux dossiers est sécurisé par des droits granulaires. L'hébergement est réalisé en France sur des serveurs sécurisés. La traçabilité des accès est complète pour répondre aux exigences de l'Ordre et du RGPD."},{question:"Peut-on gérer un cabinet avec plusieurs associés et collaborateurs ?",answer:"Oui, le CRM gère les droits d'accès par utilisateur, le partage de dossiers entre associés, les statistiques individuelles et consolidées, et la répartition des honoraires. Idéal pour les cabinets structurés ou en croissance."}],MH=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM Avocat Sur Mesure | Logiciel Cabinet Juridique"}),i.jsx("meta",{name:"description",content:"CRM spécialisé pour avocats et cabinets juridiques. Gestion dossiers, timesheet, facturation, conflits d'intérêts. Solution personnalisable dès 3000€."}),i.jsx("meta",{name:"keywords",content:"CRM avocat, logiciel cabinet avocat, CRM juridique, gestion cabinet avocats, logiciel avocats, facturation avocat"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/crm-avocat"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/crm-avocat"}),i.jsx("meta",{property:"og:title",content:"CRM Avocat Sur Mesure | Logiciel Cabinet Juridique"}),i.jsx("meta",{property:"og:description",content:"CRM spécialisé pour avocats et cabinets juridiques. Gestion dossiers, timesheet, facturation."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-crm-avocat.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"CRM Avocat Sur Mesure | Logiciel Cabinet Juridique"}),i.jsx("meta",{name:"twitter:description",content:"CRM spécialisé pour avocats et cabinets juridiques. Gestion dossiers, timesheet, facturation."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-crm-avocat.png"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"CRM Avocat Sur Mesure",applicationCategory:"BusinessApplication",description:"Logiciel CRM spécialisé pour les cabinets d'avocats",offers:{"@type":"Offer",price:"3000",priceCurrency:"EUR"}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:"Développement CRM Sur Mesure",name:"CRM Avocat Sur Mesure",description:"Développement de CRM personnalisé pour avocats, notaires et cabinets juridiques. Gestion des dossiers, timesheet, facturation et conflits d'intérêts.",provider:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com"},areaServed:{"@type":"Country",name:"France"},hasOfferCatalog:{"@type":"OfferCatalog",name:"Services CRM Avocat",itemListElement:[{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion des Dossiers"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Timesheet & Facturation"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Conformité & Déontologie"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Vérification Conflits d'Intérêts"}}]}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(pn(Mj))}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"CRM par Métier",item:"https://crmsurmesure.com/crm-metiers"},{"@type":"ListItem",position:3,name:"CRM Avocat",item:"https://crmsurmesure.com/crm-avocat"}]})})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("section",{className:"pt-32 pb-20 px-4 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 via-transparent to-transparent"}),i.jsx("div",{className:"container mx-auto max-w-6xl relative z-10",children:i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"CRM Spécialisé Avocats"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Le CRM conçu pour les",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-accent",children:" cabinets d'avocats"})]}),i.jsxs("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto mb-8",children:["Avocats, notaires, juristes d'entreprise : gérez vos dossiers, clients et facturation avec un outil respectueux de vos obligations déontologiques. Nos"," ",i.jsx(G,{to:"/crm-comptable",className:"text-primary hover:underline",children:"solutions pour experts-comptables"})," partagent cette même exigence."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Demander une démo",i.jsx(ve,{className:"ml-2 h-5 w-5"})]}),i.jsx(F,{variant:"outline",size:"lg",asChild:!0,children:i.jsx("a",{href:"#fonctionnalites",children:"Voir les fonctionnalités"})})]})]})})]}),i.jsx("section",{id:"fonctionnalites",className:"py-20 px-4 bg-secondary/30",children:i.jsxs("div",{className:"container mx-auto max-w-6xl",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Fonctionnalités métier juridique"}),i.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Chaque fonctionnalité est pensée pour répondre aux exigences spécifiques de la profession."})]}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:PH.map((r,n)=>i.jsxs("div",{className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:i.jsx(r.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:r.title}),i.jsx("p",{className:"text-muted-foreground",children:r.description})]},n))})]})}),i.jsx("section",{className:"py-20 px-4",children:i.jsx("div",{className:"container mx-auto max-w-6xl",children:i.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Pourquoi un CRM sur mesure pour votre cabinet ?"}),i.jsxs("p",{className:"text-muted-foreground text-lg mb-8",children:["Les logiciels juridiques standards sont souvent complexes et coûteux. Notre approche vous offre un outil adapté à VOTRE pratique, explorez nos autres"," ",i.jsx(G,{to:"/crm-metiers",className:"text-primary hover:underline",children:"CRM par secteur d'activité"}),"."]}),i.jsx("ul",{className:"space-y-4",children:AH.map((r,n)=>i.jsxs("li",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0",children:i.jsx(At,{className:"w-4 h-4 text-primary"})}),i.jsx("span",{className:"text-foreground",children:r})]},n))})]}),i.jsx("div",{className:"glass p-8 rounded-2xl",children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-5xl font-display font-bold text-primary mb-2",children:"40%"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"de temps administratif gagné"}),i.jsxs("div",{className:"border-t border-border/30 pt-6",children:[i.jsx("p",{className:"text-3xl font-display font-bold text-foreground mb-2",children:"À partir de 3 000€"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"Propriété totale du code"}),i.jsx(F,{variant:"hero",className:"w-full",onClick:()=>t(!0),children:"Obtenir un devis personnalisé"})]})]})})]})})}),i.jsx(fn,{faqs:Mj,sectorName:"CRM Avocat"}),i.jsx(gn,{currentMetier:"avocat",relatedMetiers:TH}),i.jsx("section",{className:"py-20 px-4 bg-gradient-to-b from-primary/10 to-transparent",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Prêt à moderniser votre cabinet juridique ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Discutons de vos besoins spécifiques et créons ensemble le CRM qui optimisera votre pratique."}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Planifier un appel découverte",i.jsx(ve,{className:"ml-2 h-5 w-5"})]})]})}),i.jsx(Je,{})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},OH=[{name:"CRM Marketing",slug:"/crm-marketing",description:"Gestion de campagnes et projets pour agences digitales."},{name:"CRM Avocat",slug:"/crm-avocat",description:"Solution pour cabinets juridiques avec gestion des dossiers."},{name:"CRM Santé",slug:"/crm-sante",description:"Gestion des patients et RDV pour professionnels de santé."}],IH=[{icon:vt,title:"Vivier de Candidats",description:"Base de données candidats avec CV, compétences, historique des entretiens et disponibilités."},{icon:WO,title:"Gestion des Missions",description:"Suivez chaque mission de recrutement : brief client, profil recherché, short-list, placements."},{icon:KS,title:"Matching Intelligent",description:"Retrouvez instantanément les candidats correspondant aux critères de vos clients."},{icon:xr,title:"Planning Entretiens",description:"Organisez les entretiens, envoyez les convocations et synchronisez avec vos agendas."},{icon:mr,title:"Suivi Contrats & Facturation",description:"Gérez les contrats de placement, calculez les honoraires et suivez la facturation."},{icon:va,title:"KPIs Recrutement",description:"Tableaux de bord : time-to-hire, taux de placement, performance par consultant."}],DH=["Réduction de 45% du time-to-hire","Vivier candidats exploitable et à jour","Meilleur suivi des missions en cours","Automatisation des relances candidats","Visibilité sur la performance consultants","Relation client renforcée"],Oj=[{question:"Quelle est la différence entre un CRM recrutement et un ATS ?",answer:"Un ATS (Applicant Tracking System) se concentre sur le traitement des candidatures entrantes. Notre CRM recrutement va plus loin : gestion de la relation client, suivi des missions commerciales, vivier candidats proactif, facturation et reporting. C'est un outil complet pour piloter votre cabinet."},{question:"Comment fonctionne le matching candidats/postes ?",answer:"Le système indexe les compétences, expériences et préférences de chaque candidat. Lors d'une nouvelle mission, vous définissez les critères recherchés et le CRM suggère automatiquement les profils correspondants, classés par pertinence. Vous pouvez affiner avec des filtres avancés."},{question:"Le CRM permet-il d'envoyer des campagnes de sourcing ?",answer:"Oui, vous pouvez créer des campagnes email ou SMS ciblées vers votre vivier. Le CRM track les ouvertures, clics et réponses. Idéal pour réactiver des candidats dormants ou informer votre vivier de nouvelles opportunités correspondant à leur profil."},{question:"Comment gérer les honoraires et la facturation des placements ?",answer:"Le CRM intègre un module de facturation paramétrable : pourcentage du salaire, forfait, garantie de remplacement. Vous générez automatiquement les factures à chaque placement et suivez les encaissements. Les commissions consultants peuvent aussi être calculées automatiquement."},{question:"Peut-on intégrer les candidatures provenant de jobboards ?",answer:"Oui, notre CRM peut récupérer automatiquement les candidatures de vos annonces sur les jobboards (Indeed, LinkedIn, Monster...) via API ou parsing email. Les candidats sont créés dans votre vivier avec la source identifiée pour mesurer le ROI de chaque canal."}],LH=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM Recrutement Sur Mesure | Logiciel Cabinet RH"}),i.jsx("meta",{name:"description",content:"CRM spécialisé pour cabinets de recrutement, chasseurs de têtes et agences d'intérim. Gestion candidats, missions, placements. Solution dès 3000€."}),i.jsx("meta",{name:"keywords",content:"CRM recrutement, logiciel cabinet recrutement, CRM chasseur de têtes, ATS sur mesure, logiciel agence interim, gestion candidats"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/crm-recrutement"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/crm-recrutement"}),i.jsx("meta",{property:"og:title",content:"CRM Recrutement Sur Mesure | Logiciel Cabinet RH"}),i.jsx("meta",{property:"og:description",content:"CRM spécialisé pour cabinets de recrutement et chasseurs de têtes. Gestion candidats, missions, placements."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-crm-recrutement.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"CRM Recrutement Sur Mesure | Logiciel Cabinet RH"}),i.jsx("meta",{name:"twitter:description",content:"CRM spécialisé pour cabinets de recrutement et chasseurs de têtes. Gestion candidats, missions, placements."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-crm-recrutement.png"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"CRM Recrutement Sur Mesure",applicationCategory:"BusinessApplication",description:"Logiciel CRM spécialisé pour les professionnels du recrutement",offers:{"@type":"Offer",price:"3000",priceCurrency:"EUR"}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:"Développement CRM Sur Mesure",name:"CRM Recrutement Sur Mesure",description:"Développement de CRM personnalisé pour cabinets de recrutement, chasseurs de têtes et agences d'intérim. Gestion des candidats, missions et placements.",provider:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com"},areaServed:{"@type":"Country",name:"France"},hasOfferCatalog:{"@type":"OfferCatalog",name:"Services CRM Recrutement",itemListElement:[{"@type":"Offer",itemOffered:{"@type":"Service",name:"Vivier de Candidats"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion des Missions"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Matching Intelligent"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"KPIs Recrutement"}}]}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(pn(Oj))}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"CRM par Métier",item:"https://crmsurmesure.com/crm-metiers"},{"@type":"ListItem",position:3,name:"CRM Recrutement",item:"https://crmsurmesure.com/crm-recrutement"}]})})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("section",{className:"pt-32 pb-20 px-4 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 via-transparent to-transparent"}),i.jsx("div",{className:"container mx-auto max-w-6xl relative z-10",children:i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"CRM Spécialisé Recrutement"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Le CRM pensé pour les",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-accent",children:" professionnels du recrutement"})]}),i.jsxs("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto mb-8",children:["Cabinets de recrutement, chasseurs de têtes, agences d'intérim : gérez vos candidats, missions et placements avec un outil adapté à votre métier. Besoin de gérer votre marque employeur ? Consultez notre"," ",i.jsx(G,{to:"/crm-marketing",className:"text-primary hover:underline",children:"CRM pour agences marketing"}),"."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Demander une démo",i.jsx(ve,{className:"ml-2 h-5 w-5"})]}),i.jsx(F,{variant:"outline",size:"lg",asChild:!0,children:i.jsx("a",{href:"#fonctionnalites",children:"Voir les fonctionnalités"})})]})]})})]}),i.jsx("section",{id:"fonctionnalites",className:"py-20 px-4 bg-secondary/30",children:i.jsxs("div",{className:"container mx-auto max-w-6xl",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Fonctionnalités métier recrutement"}),i.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Chaque fonctionnalité est conçue pour optimiser vos processus de recrutement."})]}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:IH.map((r,n)=>i.jsxs("div",{className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:i.jsx(r.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:r.title}),i.jsx("p",{className:"text-muted-foreground",children:r.description})]},n))})]})}),i.jsx("section",{className:"py-20 px-4",children:i.jsx("div",{className:"container mx-auto max-w-6xl",children:i.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Pourquoi un CRM sur mesure pour le recrutement ?"}),i.jsxs("p",{className:"text-muted-foreground text-lg mb-8",children:["Les ATS standards sont rigides et coûteux. Notre approche vous offre un outil parfaitement adapté à VOS méthodes de travail, avec la même philosophie que nos"," ",i.jsx(G,{to:"/crm-metiers",className:"text-primary hover:underline",children:"autres solutions métiers"}),"."]}),i.jsx("ul",{className:"space-y-4",children:DH.map((r,n)=>i.jsxs("li",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0",children:i.jsx(At,{className:"w-4 h-4 text-primary"})}),i.jsx("span",{className:"text-foreground",children:r})]},n))})]}),i.jsx("div",{className:"glass p-8 rounded-2xl",children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-5xl font-display font-bold text-primary mb-2",children:"45%"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"réduction du time-to-hire"}),i.jsxs("div",{className:"border-t border-border/30 pt-6",children:[i.jsx("p",{className:"text-3xl font-display font-bold text-foreground mb-2",children:"À partir de 3 000€"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"Propriété totale du code"}),i.jsx(F,{variant:"hero",className:"w-full",onClick:()=>t(!0),children:"Obtenir un devis personnalisé"})]})]})})]})})}),i.jsx(fn,{faqs:Oj,sectorName:"CRM Recrutement"}),i.jsx(gn,{currentMetier:"recrutement",relatedMetiers:OH}),i.jsx("section",{className:"py-20 px-4 bg-gradient-to-b from-primary/10 to-transparent",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Prêt à booster votre cabinet de recrutement ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Discutons de vos besoins spécifiques et créons ensemble le CRM qui accélérera vos placements."}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Planifier un appel découverte",i.jsx(ve,{className:"ml-2 h-5 w-5"})]})]})}),i.jsx(Je,{})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},$H=[{name:"CRM Courtage",slug:"/crm-courtage",description:"Gestion du financement véhicule avec conformité DDA."},{name:"CRM Assurance",slug:"/crm-assurance",description:"Solution pour courtiers en assurance auto et habitation."},{name:"CRM Immobilier",slug:"/crm-immobilier",description:"Gestion des biens et transactions pour agences."}],FH=[{icon:th,title:"Gestion du Parc Véhicules",description:"Inventaire complet : VN, VO, véhicules de démonstration avec photos, équipements et historique."},{icon:vt,title:"Suivi Prospects & Clients",description:"Base clients unifiée : préférences, historique d'achats, véhicules possédés, échéances de renouvellement."},{icon:xr,title:"Planning Essais & Livraisons",description:"Gérez les essais routiers, les livraisons et les rendez-vous avec synchronisation agenda."},{icon:jI,title:"Suivi Après-Vente",description:"Planifiez les entretiens, rappels constructeurs et gérez les interventions atelier."},{icon:mr,title:"Devis & Financement",description:"Générez des propositions commerciales avec options de financement et reprises."},{icon:va,title:"Performance Commerciale",description:"Tableaux de bord : ventes par vendeur, marges, stock, objectifs mensuels."}],zH=["Vision 360° de chaque client automobile","Meilleur taux de transformation des leads","Suivi optimisé des reprises et trades","Relances automatiques renouvellement","Pilotage précis de l'activité commerciale","Fidélisation client renforcée"],Ij=[{question:"Le CRM peut-il s'interfacer avec mon DMS existant ?",answer:"Oui, notre CRM est conçu pour compléter votre DMS (Dealer Management System) sans le remplacer. Il se concentre sur la relation client et le commercial, tandis que le DMS gère la facturation et l'administratif. Des passerelles peuvent synchroniser les données clés."},{question:"Comment gérer le stock de véhicules neufs et occasions ?",answer:"Le CRM intègre un module de gestion de parc complet : fiches véhicules avec photos et équipements, statut (en stock, réservé, vendu), prix d'achat et de vente, jours en stock. Vous suivez la rotation de votre stock et optimisez votre pricing."},{question:"Peut-on automatiser les relances pour les entretiens et contrôles techniques ?",answer:"Absolument. Le CRM enregistre les véhicules de chaque client avec leurs échéances (entretien, CT, garantie). Des campagnes automatiques sont déclenchées pour relancer les clients au bon moment et remplir votre atelier."},{question:"Comment suivre la performance de chaque vendeur ?",answer:"Des tableaux de bord personnalisés affichent les KPIs par vendeur : nombre de leads traités, essais réalisés, ventes conclues, marge moyenne, objectifs vs réalisé. Vous pilotez votre équipe commerciale avec des données fiables."},{question:"Le CRM gère-t-il les leads provenant des sites constructeurs ?",answer:"Oui, nous pouvons interfacer le CRM avec les plateformes constructeurs et les sites d'annonces (La Centrale, Leboncoin Auto) pour récupérer automatiquement les leads. Chaque lead est assigné et tracké jusqu'à la vente."}],VH=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM Automobile Sur Mesure | Logiciel Concession & Garage"}),i.jsx("meta",{name:"description",content:"CRM spécialisé pour concessions automobiles, garages et distributeurs. Gestion parc véhicules, clients, après-vente. Solution dès 3000€."}),i.jsx("meta",{name:"keywords",content:"CRM automobile, logiciel concession auto, CRM garage, logiciel vente véhicules, DMS automobile, gestion concession"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/crm-automobile"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/crm-automobile"}),i.jsx("meta",{property:"og:title",content:"CRM Automobile Sur Mesure | Logiciel Concession"}),i.jsx("meta",{property:"og:description",content:"CRM spécialisé pour concessions automobiles et garages. Gestion parc véhicules, clients, après-vente."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-crm-automobile.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"CRM Automobile Sur Mesure | Logiciel Concession"}),i.jsx("meta",{name:"twitter:description",content:"CRM spécialisé pour concessions automobiles et garages. Gestion parc véhicules, clients, après-vente."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-crm-automobile.png"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"CRM Automobile Sur Mesure",applicationCategory:"BusinessApplication",description:"Logiciel CRM spécialisé pour les professionnels de l'automobile",offers:{"@type":"Offer",price:"3000",priceCurrency:"EUR"}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:"Développement CRM Sur Mesure",name:"CRM Automobile Sur Mesure",description:"Développement de CRM personnalisé pour concessions automobiles, garages et distributeurs. Gestion du parc véhicules, clients et après-vente.",provider:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com"},areaServed:{"@type":"Country",name:"France"},hasOfferCatalog:{"@type":"OfferCatalog",name:"Services CRM Automobile",itemListElement:[{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion du Parc Véhicules"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Suivi Prospects & Clients"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Suivi Après-Vente"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Performance Commerciale"}}]}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(pn(Ij))}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"CRM par Métier",item:"https://crmsurmesure.com/crm-metiers"},{"@type":"ListItem",position:3,name:"CRM Automobile",item:"https://crmsurmesure.com/crm-automobile"}]})})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("section",{className:"pt-32 pb-20 px-4 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 via-transparent to-transparent"}),i.jsx("div",{className:"container mx-auto max-w-6xl relative z-10",children:i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"CRM Spécialisé Automobile"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Le CRM conçu pour les",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-accent",children:" professionnels de l'automobile"})]}),i.jsxs("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto mb-8",children:["Concessions, distributeurs, garages indépendants : gérez vos véhicules, clients et après-vente avec un outil adapté à votre activité. Pour les solutions de financement auto, découvrez notre"," ",i.jsx(G,{to:"/crm-courtage",className:"text-primary hover:underline",children:"CRM dédié aux courtiers"}),"."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Demander une démo",i.jsx(ve,{className:"ml-2 h-5 w-5"})]}),i.jsx(F,{variant:"outline",size:"lg",asChild:!0,children:i.jsx("a",{href:"#fonctionnalites",children:"Voir les fonctionnalités"})})]})]})})]}),i.jsx("section",{id:"fonctionnalites",className:"py-20 px-4 bg-secondary/30",children:i.jsxs("div",{className:"container mx-auto max-w-6xl",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Fonctionnalités métier automobile"}),i.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Chaque fonctionnalité est pensée pour optimiser la gestion de votre concession ou garage."})]}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:FH.map((r,n)=>i.jsxs("div",{className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:i.jsx(r.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:r.title}),i.jsx("p",{className:"text-muted-foreground",children:r.description})]},n))})]})}),i.jsx("section",{className:"py-20 px-4",children:i.jsx("div",{className:"container mx-auto max-w-6xl",children:i.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Pourquoi un CRM sur mesure pour l'automobile ?"}),i.jsxs("p",{className:"text-muted-foreground text-lg mb-8",children:["Les DMS classiques sont lourds et coûteux. Notre CRM s'intègre à votre environnement existant tout en apportant la flexibilité dont vous avez besoin, comme nos solutions pour"," ",i.jsx(G,{to:"/crm-assurance",className:"text-primary hover:underline",children:"l'assurance automobile"}),"."]}),i.jsx("ul",{className:"space-y-4",children:zH.map((r,n)=>i.jsxs("li",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0",children:i.jsx(At,{className:"w-4 h-4 text-primary"})}),i.jsx("span",{className:"text-foreground",children:r})]},n))})]}),i.jsx("div",{className:"glass p-8 rounded-2xl",children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-5xl font-display font-bold text-primary mb-2",children:"+30%"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"de leads convertis en moyenne"}),i.jsxs("div",{className:"border-t border-border/30 pt-6",children:[i.jsx("p",{className:"text-3xl font-display font-bold text-foreground mb-2",children:"À partir de 3 000€"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"Code source vous appartient"}),i.jsx(F,{variant:"hero",className:"w-full",onClick:()=>t(!0),children:"Obtenir un devis personnalisé"})]})]})})]})})}),i.jsx(fn,{faqs:Ij,sectorName:"CRM Automobile"}),i.jsx(gn,{currentMetier:"automobile",relatedMetiers:$H}),i.jsx("section",{className:"py-20 px-4 bg-gradient-to-b from-primary/10 to-transparent",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Prêt à digitaliser votre concession ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Discutons de vos besoins spécifiques et créons ensemble le CRM qui boostera vos ventes."}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Planifier un appel découverte",i.jsx(ve,{className:"ml-2 h-5 w-5"})]})]})}),i.jsx(Je,{})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},UH=[{name:"CRM Comptable",slug:"/crm-comptable",description:"Gestion des missions et facturation pour cabinets."},{name:"CRM Recrutement",slug:"/crm-recrutement",description:"Gestion des candidats pour le recrutement médical."},{name:"CRM Avocat",slug:"/crm-avocat",description:"Solution pour cabinets juridiques spécialisés santé."}],BH=[{icon:vt,title:"Dossiers Patients",description:"Fiches patients complètes : antécédents, traitements, allergies, documents médicaux et historique."},{icon:xr,title:"Gestion des RDV",description:"Planning multi-praticiens, rappels SMS/email automatiques, gestion des absences et urgences."},{icon:WS,title:"Suivi des Soins",description:"Protocoles de soins, prescriptions, suivi des traitements en cours et alertes personnalisées."},{icon:mr,title:"Facturation & Tiers Payant",description:"Génération des factures, télétransmission, suivi des remboursements et impayés."},{icon:BO,title:"Tableaux de Bord Activité",description:"Statistiques consultations, actes réalisés, CA par praticien, taux de remplissage."},{icon:sh,title:"Conformité RGPD Santé",description:"Hébergement HDS compatible, consentements patients, traçabilité des accès aux données."}],qH=["Réduction de 50% des RDV manqués","Meilleure coordination entre praticiens","Suivi patient personnalisé et complet","Facturation simplifiée et automatisée","Conformité réglementaire assurée","Gain de temps sur l'administratif"],Dj=[{question:"Le CRM est-il compatible avec l'hébergement de données de santé (HDS) ?",answer:"Oui, nous pouvons déployer votre CRM sur une infrastructure certifiée HDS (Hébergeur de Données de Santé) pour garantir la conformité réglementaire. Les données patients sont chiffrées et les accès sont tracés conformément aux exigences de l'ASIP Santé."},{question:"Comment fonctionnent les rappels de rendez-vous automatiques ?",answer:"Le système envoie automatiquement des rappels par SMS et/ou email selon vos paramètres (J-2, J-1, H-2...). Les patients peuvent confirmer ou annuler directement, libérant le créneau pour d'autres patients. Vous réduisez drastiquement les RDV manqués."},{question:"Le CRM peut-il gérer plusieurs praticiens et spécialités ?",answer:"Oui, le CRM est conçu pour les cabinets de groupe et centres de santé. Chaque praticien a son agenda, ses patients, ses statistiques. La coordination est facilitée par le partage de dossiers patients et la vision globale de l'activité du centre."},{question:"Comment gérer le consentement patient et le RGPD santé ?",answer:"Le CRM intègre la gestion des consentements (soins, données, communication), la traçabilité des accès aux dossiers, le droit à l'oubli et la portabilité des données. Chaque action est horodatée pour démontrer votre conformité."},{question:"Peut-on intégrer la télétransmission des feuilles de soins ?",answer:"Oui, selon votre profession, nous pouvons interfacer le CRM avec les solutions de télétransmission existantes (lecteur Vitale, logiciels agréés). La facturation et le suivi des remboursements sont alors automatisés."}],HH=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM Santé Sur Mesure | Logiciel Clinique & Cabinet Médical"}),i.jsx("meta",{name:"description",content:"CRM spécialisé pour cliniques, cabinets médicaux et professionnels de santé. Gestion patients, RDV, facturation. Solution RGPD compatible dès 3000€."}),i.jsx("meta",{name:"keywords",content:"CRM santé, logiciel cabinet médical, CRM clinique, gestion patients, logiciel médical, agenda médical"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/crm-sante"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/crm-sante"}),i.jsx("meta",{property:"og:title",content:"CRM Santé Sur Mesure | Logiciel Cabinet Médical"}),i.jsx("meta",{property:"og:description",content:"CRM spécialisé pour cliniques et cabinets médicaux. Gestion patients, RDV, facturation. RGPD compatible."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-crm-sante.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"CRM Santé Sur Mesure | Logiciel Cabinet Médical"}),i.jsx("meta",{name:"twitter:description",content:"CRM spécialisé pour cliniques et cabinets médicaux. Gestion patients, RDV, facturation. RGPD compatible."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-crm-sante.png"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"CRM Santé Sur Mesure",applicationCategory:"BusinessApplication",description:"Logiciel CRM spécialisé pour les professionnels de santé",offers:{"@type":"Offer",price:"3000",priceCurrency:"EUR"}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:"Développement CRM Sur Mesure",name:"CRM Santé Sur Mesure",description:"Développement de CRM personnalisé pour cliniques, cabinets médicaux et centres de soins. Gestion patients, RDV et facturation conforme RGPD.",provider:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com"},areaServed:{"@type":"Country",name:"France"},hasOfferCatalog:{"@type":"OfferCatalog",name:"Services CRM Santé",itemListElement:[{"@type":"Offer",itemOffered:{"@type":"Service",name:"Dossiers Patients"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion des RDV"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Facturation & Tiers Payant"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Conformité RGPD Santé"}}]}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(pn(Dj))}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"CRM par Métier",item:"https://crmsurmesure.com/crm-metiers"},{"@type":"ListItem",position:3,name:"CRM Santé",item:"https://crmsurmesure.com/crm-sante"}]})})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("section",{className:"pt-32 pb-20 px-4 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 via-transparent to-transparent"}),i.jsx("div",{className:"container mx-auto max-w-6xl relative z-10",children:i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"CRM Spécialisé Santé"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Le CRM pensé pour les",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-accent",children:" professionnels de santé"})]}),i.jsxs("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto mb-8",children:["Cliniques, cabinets médicaux, centres de soins : gérez vos patients, rendez-vous et facturation avec un outil conforme aux exigences du secteur santé. Pour la gestion administrative, explorez notre"," ",i.jsx(G,{to:"/crm-comptable",className:"text-primary hover:underline",children:"solution pour cabinets comptables"}),"."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Demander une démo",i.jsx(ve,{className:"ml-2 h-5 w-5"})]}),i.jsx(F,{variant:"outline",size:"lg",asChild:!0,children:i.jsx("a",{href:"#fonctionnalites",children:"Voir les fonctionnalités"})})]})]})})]}),i.jsx("section",{id:"fonctionnalites",className:"py-20 px-4 bg-secondary/30",children:i.jsxs("div",{className:"container mx-auto max-w-6xl",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Fonctionnalités métier santé"}),i.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Chaque fonctionnalité est conçue pour répondre aux besoins spécifiques des établissements de santé."})]}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:BH.map((r,n)=>i.jsxs("div",{className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:i.jsx(r.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:r.title}),i.jsx("p",{className:"text-muted-foreground",children:r.description})]},n))})]})}),i.jsx("section",{className:"py-20 px-4",children:i.jsx("div",{className:"container mx-auto max-w-6xl",children:i.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Pourquoi un CRM sur mesure pour la santé ?"}),i.jsxs("p",{className:"text-muted-foreground text-lg mb-8",children:["Les logiciels médicaux standards sont souvent rigides et ne s'adaptent pas à votre organisation. Notre solution s'intègre parfaitement à vos process, découvrez tous nos"," ",i.jsx(G,{to:"/crm-metiers",className:"text-primary hover:underline",children:"CRM spécialisés par profession"}),"."]}),i.jsx("ul",{className:"space-y-4",children:qH.map((r,n)=>i.jsxs("li",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0",children:i.jsx(At,{className:"w-4 h-4 text-primary"})}),i.jsx("span",{className:"text-foreground",children:r})]},n))})]}),i.jsx("div",{className:"glass p-8 rounded-2xl",children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-5xl font-display font-bold text-primary mb-2",children:"50%"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"de RDV manqués en moins"}),i.jsxs("div",{className:"border-t border-border/30 pt-6",children:[i.jsx("p",{className:"text-3xl font-display font-bold text-foreground mb-2",children:"À partir de 3 000€"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"Code source vous appartient"}),i.jsx(F,{variant:"hero",className:"w-full",onClick:()=>t(!0),children:"Obtenir un devis personnalisé"})]})]})})]})})}),i.jsx(fn,{faqs:Dj,sectorName:"CRM Santé"}),i.jsx(gn,{currentMetier:"sante",relatedMetiers:UH}),i.jsx("section",{className:"py-20 px-4 bg-gradient-to-b from-primary/10 to-transparent",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Prêt à digitaliser votre établissement de santé ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Discutons de vos besoins spécifiques et créons ensemble le CRM qui améliorera votre prise en charge patient."}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Planifier un appel découverte",i.jsx(ve,{className:"ml-2 h-5 w-5"})]})]})}),i.jsx(Je,{})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},WH=[{name:"CRM Recrutement",slug:"/crm-recrutement",description:"Gestion des candidats et marque employeur."},{name:"CRM Restauration",slug:"/crm-restauration",description:"Fidélisation et gestion clients pour restaurants."},{name:"CRM Immobilier",slug:"/crm-immobilier",description:"Marketing et gestion des biens immobiliers."}],GH=[{icon:vt,title:"Gestion Multi-Clients",description:"Fiches clients complètes avec historique des campagnes, budgets, contacts et documents partagés."},{icon:yI,title:"Suivi des Campagnes",description:"Planifiez et suivez toutes vos campagnes : SEO, SEA, Social Ads, avec budgets et KPIs dédiés."},{icon:ih,title:"Pipeline Commercial",description:"Gérez vos prospects et propositions commerciales avec suivi automatique des relances."},{icon:xr,title:"Planning Éditorial",description:"Calendrier partagé pour la production de contenus : articles, posts, newsletters, vidéos."},{icon:fI,title:"Gestion de Projets",description:"Suivez chaque projet créatif : briefs, validations, livrables, avec workflow d'approbation."},{icon:va,title:"Reporting & Rentabilité",description:"Tableaux de bord : temps passé par client, rentabilité par projet, performance des équipes."}],KH=["Vision 360° de chaque client et ses campagnes","Meilleure rentabilité par projet","Collaboration fluide avec vos clients","Suivi précis du temps et de la facturation","Automatisation des tâches récurrentes","Reporting client en quelques clics"],Lj=[{question:"Le CRM peut-il gérer plusieurs marques pour un même client ?",answer:"Oui, notre CRM permet de créer des sous-entités par client. Chaque marque peut avoir ses propres contacts, campagnes et budgets tout en étant rattachée à la maison mère. Parfait pour les groupes multi-marques."},{question:"Comment suivre le temps passé et la rentabilité des projets ?",answer:"Le CRM intègre un module timesheet permettant à chaque collaborateur de saisir son temps par client/projet. Vous visualisez en temps réel la rentabilité : temps prévu vs réel, marge brute, et pouvez ajuster vos devis futurs."},{question:"Peut-on automatiser les reportings clients ?",answer:"Absolument. Configurez des templates de reporting personnalisés par client. Le CRM agrège automatiquement les KPIs (performances campagnes, heures consommées, budget restant) et génère des rapports PDF ou liens de partage."},{question:"Le CRM s'intègre-t-il avec les outils marketing existants ?",answer:"Oui, nous développons des intégrations avec vos outils : Google Ads, Meta Ads, HubSpot, Mailchimp, Semrush... Les données remontent automatiquement dans les fiches clients pour centraliser toute l'information."},{question:"Comment gérer les briefs et validations créatives ?",answer:"Le CRM inclut un workflow de brief : le client remplit un formulaire structuré, votre équipe créa reçoit une notification, propose des créations, et le client valide en ligne. Tout l'historique est conservé."}],JH=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM Marketing Sur Mesure | Logiciel Agence"}),i.jsx("meta",{name:"description",content:"CRM spécialisé pour agences marketing et communication. Gestion clients, campagnes, projets créatifs et reporting. Solution dès 3000€."}),i.jsx("meta",{name:"keywords",content:"CRM agence marketing, CRM agence communication, logiciel agence pub, CRM agence digitale, gestion projets créatifs, CRM production"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/crm-marketing"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/crm-marketing"}),i.jsx("meta",{property:"og:title",content:"CRM Marketing Sur Mesure | Logiciel Agence"}),i.jsx("meta",{property:"og:description",content:"CRM spécialisé pour agences marketing et communication. Gestion clients, campagnes, projets créatifs."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-crm-marketing.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"CRM Marketing Sur Mesure | Logiciel Agence"}),i.jsx("meta",{name:"twitter:description",content:"CRM spécialisé pour agences marketing et communication. Gestion clients, campagnes, projets créatifs."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-crm-marketing.png"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"CRM Agence Marketing Sur Mesure",applicationCategory:"BusinessApplication",description:"Logiciel CRM spécialisé pour les agences marketing et communication",offers:{"@type":"Offer",price:"3000",priceCurrency:"EUR"}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:"Développement CRM Sur Mesure",name:"CRM Agence Marketing Sur Mesure",description:"Développement de CRM personnalisé pour agences marketing, digitales et de communication. Gestion multi-clients, campagnes et projets créatifs.",provider:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com"},areaServed:{"@type":"Country",name:"France"},hasOfferCatalog:{"@type":"OfferCatalog",name:"Services CRM Marketing",itemListElement:[{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion Multi-Clients"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Suivi des Campagnes"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion de Projets"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Reporting & Rentabilité"}}]}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(pn(Lj))}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"CRM par Métier",item:"https://crmsurmesure.com/crm-metiers"},{"@type":"ListItem",position:3,name:"CRM Marketing",item:"https://crmsurmesure.com/crm-marketing"}]})})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("section",{className:"pt-32 pb-20 px-4 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 via-transparent to-transparent"}),i.jsx("div",{className:"container mx-auto max-w-6xl relative z-10",children:i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"CRM Spécialisé Agences"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Le CRM conçu pour les",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-accent",children:" agences marketing & communication"})]}),i.jsxs("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto mb-8",children:["Agences digitales, agences de pub, studios créatifs : gérez vos clients, campagnes et projets avec un outil adapté à votre métier. Vous travaillez dans le"," ",i.jsx(G,{to:"/crm-recrutement",className:"text-primary hover:underline",children:"recrutement et la marque employeur"})," ? Nous avons aussi une solution."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Demander une démo",i.jsx(ve,{className:"ml-2 h-5 w-5"})]}),i.jsx(F,{variant:"outline",size:"lg",asChild:!0,children:i.jsx("a",{href:"#fonctionnalites",children:"Voir les fonctionnalités"})})]})]})})]}),i.jsx("section",{id:"fonctionnalites",className:"py-20 px-4 bg-secondary/30",children:i.jsxs("div",{className:"container mx-auto max-w-6xl",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Fonctionnalités métier agence"}),i.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Chaque fonctionnalité est pensée pour optimiser la gestion de votre agence et de vos clients."})]}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:GH.map((r,n)=>i.jsxs("div",{className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:i.jsx(r.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:r.title}),i.jsx("p",{className:"text-muted-foreground",children:r.description})]},n))})]})}),i.jsx("section",{className:"py-20 px-4",children:i.jsx("div",{className:"container mx-auto max-w-6xl",children:i.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Pourquoi un CRM sur mesure pour votre agence ?"}),i.jsxs("p",{className:"text-muted-foreground text-lg mb-8",children:["Les outils génériques ne comprennent pas la complexité d'une agence : multi-clients, multi-projets, gestion du temps et créativité. Notre CRM s'adapte à VOS process, comme pour la"," ",i.jsx(G,{to:"/crm-restauration",className:"text-primary hover:underline",children:"gestion de la restauration"})," où la fidélisation est clé."]}),i.jsx("ul",{className:"space-y-4",children:KH.map((r,n)=>i.jsxs("li",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0",children:i.jsx(At,{className:"w-4 h-4 text-primary"})}),i.jsx("span",{className:"text-foreground",children:r})]},n))})]}),i.jsx("div",{className:"glass p-8 rounded-2xl",children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-5xl font-display font-bold text-primary mb-2",children:"+25%"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"de rentabilité sur les projets"}),i.jsxs("div",{className:"border-t border-border/30 pt-6",children:[i.jsx("p",{className:"text-3xl font-display font-bold text-foreground mb-2",children:"À partir de 3 000€"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"Code source vous appartient"}),i.jsx(F,{variant:"hero",className:"w-full",onClick:()=>t(!0),children:"Obtenir un devis personnalisé"})]})]})})]})})}),i.jsx(fn,{faqs:Lj,sectorName:"CRM Agence Marketing"}),i.jsx(gn,{currentMetier:"marketing",relatedMetiers:WH}),i.jsx("section",{className:"py-20 px-4 bg-gradient-to-b from-primary/10 to-transparent",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Prêt à optimiser la gestion de votre agence ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Discutons de vos besoins spécifiques et créons ensemble le CRM qui boostera votre productivité."}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Planifier un appel découverte",i.jsx(ve,{className:"ml-2 h-5 w-5"})]})]})}),i.jsx(Je,{})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},YH=[{name:"CRM Marketing",slug:"/crm-marketing",description:"Campagnes de fidélisation et communication digitale."},{name:"CRM Santé",slug:"/crm-sante",description:"Gestion des allergies et préférences alimentaires clients."},{name:"CRM Comptable",slug:"/crm-comptable",description:"Gestion comptable et facturation pour restaurateurs."}],XH=[{icon:vt,title:"Fichier Clients & Fidélité",description:"Base clients avec historique commandes, préférences alimentaires, allergies et programme fidélité."},{icon:xr,title:"Gestion Réservations",description:"Système de réservation en ligne intégré avec gestion des tables, capacités et créneaux horaires."},{icon:ah,title:"Gestion Événements",description:"Organisez réceptions privées, traiteur et événements avec devis, menus et suivi logistique."},{icon:WS,title:"Commandes & Click & Collect",description:"Gérez les commandes en ligne, livraisons et retraits avec synchronisation temps réel."},{icon:tI,title:"Gestion Fournisseurs",description:"Suivi des fournisseurs, commandes d'approvisionnement et négociations tarifaires."},{icon:va,title:"Analytics & Performances",description:"Tableaux de bord : CA par service, panier moyen, taux de remplissage, fidélisation."}],QH=["Connaissance approfondie de chaque client","Optimisation du taux de remplissage","Fidélisation clients renforcée","Gestion simplifiée des événements privés","Automatisation des relances marketing","Pilotage précis de l'activité"],$j=[{question:"Le CRM peut-il s'intégrer à ma caisse enregistreuse ?",answer:"Oui, nous développons des passerelles avec les principales caisses du marché (Lightspeed, Zelty, Tiller, etc.). L'historique des commandes remonte automatiquement dans la fiche client pour une vision 360° de leurs habitudes."},{question:"Comment gérer les allergies et préférences alimentaires des clients ?",answer:"Chaque fiche client intègre un champ dédié aux allergies et régimes alimentaires (végan, halal, sans gluten...). Ces informations sont visibles lors de la réservation et peuvent déclencher des alertes en cuisine."},{question:"Le système de réservation gère-t-il les no-shows ?",answer:"Oui, le CRM peut exiger une empreinte bancaire ou un prépaiement pour les réservations. Il trace les no-shows récurrents et peut bloquer les récidivistes. Des rappels SMS/email automatiques réduisent fortement les absences."},{question:"Peut-on créer un programme de fidélité personnalisé ?",answer:"Absolument. Créez votre système de points, récompenses et paliers. Le CRM suit automatiquement les dépenses cumulées et déclenche les avantages. Vos clients peuvent consulter leur solde via une interface dédiée."},{question:"Comment gérer les demandes de traiteur et événements ?",answer:"Un module dédié permet de créer des devis événementiels : choix du menu, nombre de convives, logistique. Le suivi inclut les validations client, la production cuisine et la facturation finale."}],ZH=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM Restauration Sur Mesure | Logiciel Restaurant"}),i.jsx("meta",{name:"description",content:"CRM spécialisé pour restaurants, brasseries et traiteurs. Gestion clients, réservations, fidélité et événements. Solution dès 3000€."}),i.jsx("meta",{name:"keywords",content:"CRM restaurant, logiciel restauration, CRM traiteur, gestion réservations restaurant, fidélité restaurant, CRM brasserie"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/crm-restauration"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/crm-restauration"}),i.jsx("meta",{property:"og:title",content:"CRM Restauration Sur Mesure | Logiciel Restaurant"}),i.jsx("meta",{property:"og:description",content:"CRM spécialisé pour restaurants, brasseries et traiteurs. Gestion clients, réservations, fidélité."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-crm-restauration.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"CRM Restauration Sur Mesure | Logiciel Restaurant"}),i.jsx("meta",{name:"twitter:description",content:"CRM spécialisé pour restaurants, brasseries et traiteurs. Gestion clients, réservations, fidélité."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-crm-restauration.png"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"CRM Restauration Sur Mesure",applicationCategory:"BusinessApplication",description:"Logiciel CRM spécialisé pour les professionnels de la restauration",offers:{"@type":"Offer",price:"3000",priceCurrency:"EUR"}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:"Développement CRM Sur Mesure",name:"CRM Restauration Sur Mesure",description:"Développement de CRM personnalisé pour restaurants, brasseries et traiteurs. Gestion clients, réservations, fidélité et événements.",provider:{"@type":"Organization",name:"CRM sur Mesure",url:"https://crmsurmesure.com"},areaServed:{"@type":"Country",name:"France"},hasOfferCatalog:{"@type":"OfferCatalog",name:"Services CRM Restauration",itemListElement:[{"@type":"Offer",itemOffered:{"@type":"Service",name:"Fichier Clients & Fidélité"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion Réservations"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Gestion Événements"}},{"@type":"Offer",itemOffered:{"@type":"Service",name:"Analytics & Performances"}}]}})}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(pn($j))}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"CRM par Métier",item:"https://crmsurmesure.com/crm-metiers"},{"@type":"ListItem",position:3,name:"CRM Restauration",item:"https://crmsurmesure.com/crm-restauration"}]})})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("section",{className:"pt-32 pb-20 px-4 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 via-transparent to-transparent"}),i.jsx("div",{className:"container mx-auto max-w-6xl relative z-10",children:i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"CRM Spécialisé Restauration"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Le CRM conçu pour les",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-accent",children:" professionnels de la restauration"})]}),i.jsxs("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto mb-8",children:["Restaurants, brasseries, traiteurs : fidélisez vos clients, optimisez vos réservations et gérez vos événements avec un outil adapté à votre métier. Pour vos campagnes marketing, consultez notre"," ",i.jsx(G,{to:"/crm-marketing",className:"text-primary hover:underline",children:"CRM pour agences de communication"}),"."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Demander une démo",i.jsx(ve,{className:"ml-2 h-5 w-5"})]}),i.jsx(F,{variant:"outline",size:"lg",asChild:!0,children:i.jsx("a",{href:"#fonctionnalites",children:"Voir les fonctionnalités"})})]})]})})]}),i.jsx("section",{id:"fonctionnalites",className:"py-20 px-4 bg-secondary/30",children:i.jsxs("div",{className:"container mx-auto max-w-6xl",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Fonctionnalités métier restauration"}),i.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Chaque fonctionnalité est pensée pour optimiser la gestion de votre établissement."})]}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:XH.map((r,n)=>i.jsxs("div",{className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:i.jsx(r.icon,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:r.title}),i.jsx("p",{className:"text-muted-foreground",children:r.description})]},n))})]})}),i.jsx("section",{className:"py-20 px-4",children:i.jsx("div",{className:"container mx-auto max-w-6xl",children:i.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Pourquoi un CRM sur mesure pour la restauration ?"}),i.jsxs("p",{className:"text-muted-foreground text-lg mb-8",children:["Les systèmes de caisse ne gèrent pas la relation client. Notre CRM complète votre équipement en apportant la connaissance client et la fidélisation dont vous avez besoin, explorez nos"," ",i.jsx(G,{to:"/crm-metiers",className:"text-primary hover:underline",children:"solutions CRM par secteur"}),"."]}),i.jsx("ul",{className:"space-y-4",children:QH.map((r,n)=>i.jsxs("li",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0",children:i.jsx(At,{className:"w-4 h-4 text-primary"})}),i.jsx("span",{className:"text-foreground",children:r})]},n))})]}),i.jsx("div",{className:"glass p-8 rounded-2xl",children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-5xl font-display font-bold text-primary mb-2",children:"+20%"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"de clients fidélisés"}),i.jsxs("div",{className:"border-t border-border/30 pt-6",children:[i.jsx("p",{className:"text-3xl font-display font-bold text-foreground mb-2",children:"À partir de 3 000€"}),i.jsx("p",{className:"text-muted-foreground mb-6",children:"Code source vous appartient"}),i.jsx(F,{variant:"hero",className:"w-full",onClick:()=>t(!0),children:"Obtenir un devis personnalisé"})]})]})})]})})}),i.jsx(fn,{faqs:$j,sectorName:"CRM Restauration"}),i.jsx(gn,{currentMetier:"restauration",relatedMetiers:YH}),i.jsx("section",{className:"py-20 px-4 bg-gradient-to-b from-primary/10 to-transparent",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Prêt à transformer votre relation client ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Discutons de vos besoins spécifiques et créons ensemble le CRM qui fidélisera vos clients."}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Planifier un appel découverte",i.jsx(ve,{className:"ml-2 h-5 w-5"})]})]})}),i.jsx(Je,{})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},af=[{icon:xa,name:"CRM Assurance",slug:"/crm-assurance",description:"Solution CRM pour courtiers en assurance et agents généraux. Gérez contrats, sinistres et renouvellements avec un outil adapté aux exigences du secteur.",keyFeatures:["Gestion des contrats","Suivi sinistres","Conformité ACPR"]},{icon:_i,name:"CRM Immobilier",slug:"/crm-immobilier",description:"CRM spécialisé pour agences immobilières et mandataires. Optimisez la gestion de vos biens, acquéreurs et transactions.",keyFeatures:["Portefeuille biens","Matching acquéreurs","Multi-portails"]},{icon:Fi,name:"CRM Courtage",slug:"/crm-courtage",description:"Outil CRM dédié aux courtiers en crédit (IOBSP) et CGP. Pilotez vos dossiers, commissions et conformité réglementaire.",keyFeatures:["Suivi dossiers","Commissionnements","Conformité DDA"]},{icon:sa,name:"CRM Cabinet Comptable",slug:"/crm-comptable",description:"CRM conçu pour les experts-comptables. Gérez dossiers clients, échéances fiscales et facturation au temps passé.",keyFeatures:["Gestion missions","Timesheet intégré","Échéances fiscales"]},{icon:vt,name:"CRM Recrutement",slug:"/crm-recrutement",description:"Solution CRM pour cabinets de recrutement et chasseurs de têtes. Gérez candidats, missions et placements efficacement.",keyFeatures:["Vivier candidats","Matching intelligent","Suivi missions"]},{icon:th,name:"CRM Automobile",slug:"/crm-automobile",description:"CRM spécialisé pour concessions et garages automobiles. Gérez parc véhicules, clients et après-vente.",keyFeatures:["Gestion parc","Suivi après-vente","Planning essais"]},{icon:oh,name:"CRM Avocat",slug:"/crm-avocat",description:"Outil CRM pour cabinets d'avocats et juristes. Gérez dossiers, timesheet et facturation en toute conformité.",keyFeatures:["Gestion dossiers","Conflits d'intérêts","Facturation"]},{icon:sh,name:"CRM Santé",slug:"/crm-sante",description:"CRM dédié aux professionnels de santé : cliniques, cabinets médicaux. Gérez patients, RDV et facturation.",keyFeatures:["Dossiers patients","Agenda multi-praticiens","Conformité RGPD"]},{icon:ih,name:"CRM Agence Marketing",slug:"/crm-marketing",description:"CRM pour agences marketing et communication. Gérez clients, campagnes, projets créatifs et rentabilité.",keyFeatures:["Gestion multi-clients","Suivi campagnes","Reporting"]},{icon:ah,name:"CRM Restauration",slug:"/crm-restauration",description:"CRM pour restaurants, brasseries et traiteurs. Fidélisez clients, gérez réservations et événements.",keyFeatures:["Fichier clients","Réservations","Programme fidélité"]}],eW=()=>{const[e,t]=f.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"CRM par Métier | Solutions CRM Sectorielles Sur Mesure"}),i.jsx("meta",{name:"description",content:"Découvrez nos CRM spécialisés par secteur d'activité : assurance, immobilier, courtage, comptabilité, recrutement, automobile, avocat, santé. Solutions 100% personnalisables."}),i.jsx("meta",{name:"keywords",content:"CRM métier, CRM sectoriel, CRM sur mesure, logiciel professionnel, CRM personnalisé, solution CRM entreprise"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/crm-metiers"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:url",content:"https://crmsurmesure.com/crm-metiers"}),i.jsx("meta",{property:"og:title",content:"CRM par Métier | Solutions Sectorielles Sur Mesure"}),i.jsx("meta",{property:"og:description",content:"CRM spécialisés par secteur : assurance, immobilier, courtage, comptabilité, recrutement, automobile, avocat, santé."}),i.jsx("meta",{property:"og:image",content:"https://crmsurmesure.com/og-image.png"}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:"CRM par Métier | Solutions Sectorielles Sur Mesure"}),i.jsx("meta",{name:"twitter:description",content:"CRM spécialisés par secteur : assurance, immobilier, courtage, comptabilité, recrutement, automobile, avocat, santé."}),i.jsx("meta",{name:"twitter:image",content:"https://crmsurmesure.com/og-image.png"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"ItemList",name:"CRM par Métier",description:"Solutions CRM spécialisées par secteur d'activité",numberOfItems:af.length,itemListElement:af.map((r,n)=>({"@type":"ListItem",position:n+1,name:r.name,url:`https://crmsurmesure.com${r.slug}`}))})})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("section",{className:"pt-32 pb-16 px-4 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 via-transparent to-transparent"}),i.jsx("div",{className:"container mx-auto max-w-6xl relative z-10",children:i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("span",{className:"inline-block px-4 py-2 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"Solutions par Secteur"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Un CRM adapté à",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-accent",children:" votre métier"})]}),i.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"Chaque secteur a ses spécificités. Découvrez nos solutions CRM conçues pour répondre aux besoins précis de votre profession."})]})})]}),i.jsx("section",{className:"py-12 px-4",children:i.jsx("div",{className:"container mx-auto max-w-6xl",children:i.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:af.map(r=>i.jsx("a",{href:r.slug,className:"glass p-6 rounded-2xl hover:border-primary/50 transition-all duration-300 group block",children:i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("div",{className:"w-14 h-14 rounded-xl bg-primary/10 flex items-center justify-center flex-shrink-0 group-hover:bg-primary/20 transition-colors",children:i.jsx(r.icon,{className:"w-7 h-7 text-primary"})}),i.jsxs("div",{className:"flex-1",children:[i.jsx("h2",{className:"font-display font-semibold text-xl mb-2 group-hover:text-primary transition-colors",children:r.name}),i.jsx("p",{className:"text-muted-foreground mb-4",children:r.description}),i.jsx("div",{className:"flex flex-wrap gap-2",children:r.keyFeatures.map(n=>i.jsx("span",{className:"px-3 py-1 rounded-full bg-secondary text-sm text-muted-foreground",children:n},n))})]}),i.jsx(ve,{className:"w-5 h-5 text-muted-foreground group-hover:text-primary group-hover:translate-x-1 transition-all flex-shrink-0 mt-1"})]})},r.slug))})})}),i.jsx("section",{className:"py-20 px-4 bg-secondary/30",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Pourquoi choisir un CRM sur mesure ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Les CRM génériques vous obligent à adapter vos process à l'outil. Avec CRMSurMesure, c'est l'outil qui s'adapte à VOUS."}),i.jsxs("div",{className:"grid sm:grid-cols-3 gap-6 mt-12",children:[i.jsxs("div",{className:"glass p-6 rounded-2xl",children:[i.jsx("p",{className:"text-4xl font-display font-bold text-primary mb-2",children:"100%"}),i.jsx("p",{className:"text-muted-foreground",children:"Personnalisable"})]}),i.jsxs("div",{className:"glass p-6 rounded-2xl",children:[i.jsx("p",{className:"text-4xl font-display font-bold text-primary mb-2",children:"3 000€"}),i.jsx("p",{className:"text-muted-foreground",children:"À partir de"})]}),i.jsxs("div",{className:"glass p-6 rounded-2xl",children:[i.jsx("p",{className:"text-4xl font-display font-bold text-primary mb-2",children:"∞"}),i.jsx("p",{className:"text-muted-foreground",children:"Propriété du code"})]})]})]})}),i.jsx("section",{className:"py-20 px-4",children:i.jsxs("div",{className:"container mx-auto max-w-4xl text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:"Votre métier n'est pas dans la liste ?"}),i.jsx("p",{className:"text-muted-foreground text-lg mb-8 max-w-2xl mx-auto",children:"Nous créons des CRM pour tous les secteurs d'activité. Contactez-nous pour discuter de vos besoins spécifiques."}),i.jsxs(F,{variant:"hero",size:"lg",onClick:()=>t(!0),children:["Discuter de mon projet",i.jsx(ve,{className:"ml-2 h-5 w-5"})]})]})}),i.jsx(Je,{})]}),i.jsx(ut,{open:e,onOpenChange:t})]})},tW=()=>i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"Mentions Légales | CRM Sur Mesure"}),i.jsx("meta",{name:"description",content:"Mentions légales du site CRMSurMesure.com - Informations sur l'éditeur, l'hébergeur et les conditions d'utilisation."}),i.jsx("meta",{name:"robots",content:"noindex, follow"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/mentions-legales"})]}),i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsx("section",{className:"pt-32 pb-20 px-4",children:i.jsxs("div",{className:"container mx-auto max-w-4xl",children:[i.jsx("h1",{className:"font-display text-4xl md:text-5xl font-bold mb-8",children:"Mentions Légales"}),i.jsxs("div",{className:"prose prose-invert max-w-none space-y-8",children:[i.jsxs("div",{className:"glass p-6 rounded-2xl",children:[i.jsx("h2",{className:"font-display text-2xl font-semibold mb-4 text-foreground",children:"Éditeur du site"}),i.jsxs("p",{className:"text-muted-foreground mb-4",children:["Le site ",i.jsx("strong",{className:"text-foreground",children:"CRMSurMesure.com"})," est édité par :"]}),i.jsxs("address",{className:"not-italic text-muted-foreground space-y-1",children:[i.jsx("p",{className:"text-foreground font-semibold",children:"WPSOLUTION LLC"}),i.jsx("p",{children:"16192 Coastal Highway"}),i.jsx("p",{children:"Lewes, DE 19958"}),i.jsx("p",{children:"USA"}),i.jsxs("p",{className:"mt-3",children:[i.jsx("strong",{className:"text-foreground",children:"Téléphone :"})," ",i.jsx("a",{href:"tel:+33756819438",className:"text-primary hover:underline",children:"+33 7 56 81 94 38"})]}),i.jsxs("p",{children:[i.jsx("strong",{className:"text-foreground",children:"Email :"})," ",i.jsx("a",{href:"mailto:contact@wpsolution.io",className:"text-primary hover:underline",children:"contact@wpsolution.io"})]})]})]}),i.jsxs("div",{className:"glass p-6 rounded-2xl",children:[i.jsx("h2",{className:"font-display text-2xl font-semibold mb-4 text-foreground",children:"Technologie utilisée"}),i.jsxs("p",{className:"text-muted-foreground",children:["CRMSurMesure utilise une technologie américaine intégrant des solutions d","'","intelligence artificielle sous licence et propriétaires. Ces technologies sont exploitées par la société WPSOLUTION LLC dans le cadre de la fourniture des services de développement CRM sur mesure."]})]}),i.jsxs("div",{className:"glass p-6 rounded-2xl",children:[i.jsx("h2",{className:"font-display text-2xl font-semibold mb-4 text-foreground",children:"Hébergement"}),i.jsx("p",{className:"text-muted-foreground",children:"Le site est hébergé par des prestataires cloud professionnels assurant la sécurité, la disponibilité et la performance des services."})]}),i.jsxs("div",{className:"glass p-6 rounded-2xl",children:[i.jsx("h2",{className:"font-display text-2xl font-semibold mb-4 text-foreground",children:"Propriété intellectuelle"}),i.jsxs("p",{className:"text-muted-foreground",children:["L","'","ensemble des contenus présents sur le site CRMSurMesure.com (textes, images, logos, graphismes, icônes, logiciels) est la propriété exclusive de WPSOLUTION LLC ou de ses partenaires et est protégé par les lois françaises et internationales relatives à la propriété intellectuelle."]}),i.jsxs("p",{className:"text-muted-foreground mt-3",children:["Toute reproduction, représentation, modification, publication ou adaptation de tout ou partie des éléments du site, quel que soit le moyen ou le procédé utilisé, est interdite sans l","'","autorisation écrite préalable de WPSOLUTION LLC."]})]}),i.jsxs("div",{className:"glass p-6 rounded-2xl",children:[i.jsx("h2",{className:"font-display text-2xl font-semibold mb-4 text-foreground",children:"Protection des données personnelles"}),i.jsxs("p",{className:"text-muted-foreground",children:["Conformément au Règlement Général sur la Protection des Données (RGPD) et à la loi Informatique et Libertés, vous disposez d","'","un droit d","'","accès, de rectification, de suppression et de portabilité de vos données personnelles."]}),i.jsxs("p",{className:"text-muted-foreground mt-3",children:["Pour exercer ces droits ou pour toute question relative à la protection de vos données, vous pouvez nous contacter à l","'","adresse :"," ",i.jsx("a",{href:"mailto:contact@wpsolution.io",className:"text-primary hover:underline",children:"contact@wpsolution.io"})]})]}),i.jsxs("div",{className:"glass p-6 rounded-2xl",children:[i.jsx("h2",{className:"font-display text-2xl font-semibold mb-4 text-foreground",children:"Cookies"}),i.jsxs("p",{className:"text-muted-foreground",children:["Le site CRMSurMesure.com peut utiliser des cookies pour améliorer l","'","expérience utilisateur et analyser le trafic. Vous pouvez configurer votre navigateur pour refuser les cookies ou être alerté lors de leur utilisation."]})]}),i.jsxs("div",{className:"glass p-6 rounded-2xl",children:[i.jsx("h2",{className:"font-display text-2xl font-semibold mb-4 text-foreground",children:"Limitation de responsabilité"}),i.jsxs("p",{className:"text-muted-foreground",children:["WPSOLUTION LLC s","'","efforce de fournir des informations exactes et à jour sur le site CRMSurMesure.com. Toutefois, elle ne peut garantir l","'","exactitude, la complétude ou l","'","actualité des informations diffusées."]}),i.jsxs("p",{className:"text-muted-foreground mt-3",children:["L","'","utilisateur reconnaît utiliser ces informations sous sa responsabilité exclusive."]})]}),i.jsx("p",{className:"text-sm text-muted-foreground text-center pt-8",children:"Dernière mise à jour : Janvier 2025"})]})]})}),i.jsx(Je,{})]})]}),rW=()=>{const e={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com/"},{"@type":"ListItem",position:2,name:"Politique de Confidentialité",item:"https://crmsurmesure.com/politique-confidentialite"}]};return i.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"Politique de Confidentialité | CRMSurMesure"}),i.jsx("meta",{name:"description",content:"Politique de confidentialité de CRMSurMesure. Découvrez comment nous collectons, utilisons et protégeons vos données personnelles conformément au RGPD."}),i.jsx("meta",{name:"robots",content:"index, follow"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/politique-confidentialite"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(e)})]}),i.jsx(Ke,{}),i.jsxs("main",{className:"flex-grow container mx-auto px-4 pt-32 pb-16 max-w-4xl",children:[i.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground mb-8",children:"Politique de Confidentialité"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground space-y-8",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Dernière mise à jour : Janvier 2025"}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"1. Introduction"}),i.jsx("p",{children:"WPSOLUTION LLC (« nous », « notre », « nos ») s'engage à protéger la vie privée des utilisateurs de CRMSurMesure. Cette politique de confidentialité explique comment nous collectons, utilisons, stockons et protégeons vos données personnelles conformément au Règlement Général sur la Protection des Données (RGPD) et aux autres lois applicables."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"2. Responsable du traitement"}),i.jsx("p",{children:"Le responsable du traitement des données est :"}),i.jsxs("address",{className:"not-italic bg-muted/50 p-4 rounded-lg mt-2",children:[i.jsx("strong",{children:"WPSOLUTION LLC"}),i.jsx("br",{}),"16192 Coastal Highway",i.jsx("br",{}),"Lewes, DE 19958",i.jsx("br",{}),"USA",i.jsx("br",{}),"Email : ",i.jsx("a",{href:"mailto:contact@wpsolution.io",className:"text-primary hover:underline",children:"contact@wpsolution.io"}),i.jsx("br",{}),"Téléphone : +33 7 56 81 94 38"]})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"3. Données collectées"}),i.jsx("p",{children:"Nous collectons les types de données suivants :"}),i.jsx("h3",{className:"text-xl font-medium text-foreground mt-4 mb-2",children:"3.1 Données fournies directement"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Données d'identification :"})," nom, prénom, adresse email, numéro de téléphone"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Données professionnelles :"})," nom de l'entreprise, taille de l'entreprise, secteur d'activité"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Données de projet :"})," besoins CRM, budget estimé, délais souhaités"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Communications :"})," messages envoyés via nos formulaires de contact"]})]}),i.jsx("h3",{className:"text-xl font-medium text-foreground mt-4 mb-2",children:"3.2 Données collectées automatiquement"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Données de navigation :"})," adresse IP, type de navigateur, pages visitées, durée de visite"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Cookies :"})," identifiants de session, préférences utilisateur"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Données techniques :"})," type d'appareil, système d'exploitation"]})]})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"4. Finalités du traitement"}),i.jsx("p",{children:"Vos données sont traitées pour les finalités suivantes :"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsx("li",{children:"Répondre à vos demandes de contact et de devis"}),i.jsx("li",{children:"Fournir nos services de conception de CRM sur mesure"}),i.jsx("li",{children:"Améliorer notre site web et nos services"}),i.jsx("li",{children:"Envoyer des communications commerciales (avec votre consentement)"}),i.jsx("li",{children:"Respecter nos obligations légales"}),i.jsx("li",{children:"Établir, exercer ou défendre des droits légaux"})]})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"5. Base légale du traitement"}),i.jsx("p",{children:"Nous traitons vos données sur les bases légales suivantes :"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Consentement :"})," pour l'envoi de communications marketing"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Exécution d'un contrat :"})," pour fournir nos services"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Intérêts légitimes :"})," pour améliorer nos services et sécuriser notre site"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Obligation légale :"})," pour respecter les lois applicables"]})]})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"6. Durée de conservation"}),i.jsx("p",{children:"Nous conservons vos données personnelles pendant les durées suivantes :"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Données de contact :"})," 3 ans après le dernier contact"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Données clients :"})," durée de la relation commerciale + 5 ans"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Données de navigation :"})," 13 mois maximum"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Cookies :"})," 13 mois maximum"]})]})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"7. Partage des données"}),i.jsx("p",{children:"Vos données peuvent être partagées avec :"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Prestataires techniques :"})," hébergement, outils d'analyse, services de messagerie"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Partenaires commerciaux :"})," uniquement avec votre consentement explicite"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Autorités :"})," en cas d'obligation légale"]})]}),i.jsx("p",{className:"mt-4",children:"Nous ne vendons jamais vos données personnelles à des tiers."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"8. Transferts internationaux"}),i.jsx("p",{children:"Vos données peuvent être transférées vers les États-Unis où se situe notre siège social. Ces transferts sont encadrés par des garanties appropriées, notamment les clauses contractuelles types approuvées par la Commission européenne."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"9. Sécurité des données"}),i.jsx("p",{children:"Nous mettons en œuvre des mesures de sécurité appropriées pour protéger vos données :"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsx("li",{children:"Chiffrement des données en transit (HTTPS/TLS)"}),i.jsx("li",{children:"Chiffrement des données au repos"}),i.jsx("li",{children:"Contrôle d'accès strict aux données"}),i.jsx("li",{children:"Surveillance et audit des systèmes"}),i.jsx("li",{children:"Formation du personnel à la protection des données"})]})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"10. Vos droits"}),i.jsx("p",{children:"Conformément au RGPD, vous disposez des droits suivants :"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Droit d'accès :"})," obtenir une copie de vos données"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Droit de rectification :"})," corriger des données inexactes"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Droit à l'effacement :"})," demander la suppression de vos données"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Droit à la limitation :"})," restreindre le traitement de vos données"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Droit à la portabilité :"})," recevoir vos données dans un format structuré"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Droit d'opposition :"})," vous opposer au traitement de vos données"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Droit de retrait du consentement :"})," retirer votre consentement à tout moment"]})]}),i.jsxs("p",{className:"mt-4",children:["Pour exercer ces droits, contactez-nous à :",i.jsx("a",{href:"mailto:contact@wpsolution.io",className:"text-primary hover:underline ml-1",children:"contact@wpsolution.io"})]})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"11. Cookies"}),i.jsx("p",{children:"Notre site utilise des cookies pour améliorer votre expérience. Les cookies sont de petits fichiers texte stockés sur votre appareil. Vous pouvez gérer vos préférences de cookies dans les paramètres de votre navigateur."}),i.jsx("p",{className:"mt-2",children:"Types de cookies utilisés :"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Cookies essentiels :"})," nécessaires au fonctionnement du site"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Cookies analytiques :"})," pour comprendre l'utilisation du site"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Cookies de préférences :"})," pour mémoriser vos choix"]})]})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"12. Réclamations"}),i.jsx("p",{children:"Si vous estimez que vos droits ne sont pas respectés, vous pouvez déposer une réclamation auprès de l'autorité de contrôle compétente. En France, il s'agit de la Commission Nationale de l'Informatique et des Libertés (CNIL) :"}),i.jsxs("address",{className:"not-italic bg-muted/50 p-4 rounded-lg mt-2",children:[i.jsx("strong",{children:"CNIL"}),i.jsx("br",{}),"3 Place de Fontenoy",i.jsx("br",{}),"TSA 80715",i.jsx("br",{}),"75334 PARIS CEDEX 07",i.jsx("br",{}),"Site web : ",i.jsx("a",{href:"https://www.cnil.fr",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"www.cnil.fr"})]})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"13. Modifications"}),i.jsx("p",{children:"Nous nous réservons le droit de modifier cette politique de confidentialité à tout moment. Les modifications seront publiées sur cette page avec une nouvelle date de mise à jour. Nous vous encourageons à consulter régulièrement cette page."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:"14. Contact"}),i.jsx("p",{children:"Pour toute question concernant cette politique de confidentialité ou vos données personnelles, contactez-nous :"}),i.jsxs("address",{className:"not-italic bg-muted/50 p-4 rounded-lg mt-2",children:[i.jsx("strong",{children:"WPSOLUTION LLC"}),i.jsx("br",{}),"Email : ",i.jsx("a",{href:"mailto:contact@wpsolution.io",className:"text-primary hover:underline",children:"contact@wpsolution.io"}),i.jsx("br",{}),"Téléphone : +33 7 56 81 94 38"]})]})]})]}),i.jsx(Je,{})]})},nW="/assets/htc-sante-c_hXsX2O.svg",sW="/assets/je-suis-bien-dans-ma-peau-CxcyekER.png",iW="/assets/turf-fr-B1H7Ih7d.svg",oW="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAAAyCAYAAACJbi9rAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAkISURBVHgB7ZoLkFdVHcd/+xCxtgAhBXqoE1gD6WilpWlCNhlmaj4zkxjLRqeHk0021DRjyUAvZSIH1JEB3/gGURzf4gNBUBFFQUUURVARXNBFloXj97vne93D8d67d9dVgTnfmc/c/d/z+p3375y7ZklJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSR+VnHM14tOgN+gBavmuJM354ExLylWtfcJS5x0D7gKLwHNiARiD8F0KOvi7YHdLylV9UYAa8zTwA+u8WsDImpqapQVl7ILHZLA/uBKcDl4HDWBfcA4YAU4Bd1pSZdWXhB0ExoFGwE6+IwjrBn6isM+Al8Ec4BS+KzjUfCf9Fx14HDrXhZlzqcXjYvAtcAhYGMRhvssR51Y8J4Gb8fd3EP5YkbEaiMTFZXVlfGizVVBH82+vjGzVqppXTUEBn8XjUfPL42Q9DwMPg95ghvnZeAI4Evwf/A5caL7Tp4GNgHvgXPAnGDQxMvKn4Aqln1FkMPddPGYpv/2zSuP9PDweAGeB/uAo8wNqrexblJenBtSB4GDQHSwD14F1OYOPdtaBH4PBaq/Zao+e4KvgEaTbFKVpkD0DwAZwO3g8J/+98VgNloMfga+DZjAdcRcG9nISfQ2sB1MR9qx1VHJixoLFYCf9Ple/DwbLwLUMC+IfClaCC+jQgJfBzgr7NXgVDIjKmA0eKnOQgvjHgU1gaPBunuw8A6wCt4DxYCZ4F0wBdVE+tOle8Aa4ClwIFgKuDoeFtsjGw2X78+BSMEl1mxPY9LkozXCwGswHE8ANoBFMBQ1R3Gdk83S1Bf9+AGwAI0E9uAk8qLC54G3Vud12ixtxKGgCB7o2b7VWDcn3o+W91kQMBi+A9eBopcnCbgc3B2X0VuP/o6JN9JKbwaisQrJnmjpyUNBYtarDa2qw+iDsMtk4MLCtTgN1YU6nsr7/AT2D+N3BReBJsDnrWIWdojTD1SlZmt3BEjAxsJ/vn3Z+woxzbZOI6caofc5Te++gsG7OnwY2gl5WVeqwF9U5KzVaX3F+lq5WRdaWsFEVe8n5kc2ZsML5EcvR/UeVsy9oAT+saFfWCNOijmWe3yxIc6oa5xD97iUbR+TEHSJ7+uo3G3ARmFFiz4MumLHqcA6asS5nNtEOtc83ojqxnXaI4u6qvF8Hn4rC+oE14HgrUew8cR97Rc+/gibzRyLG2wOMMr+nrc3Ji5X5FeBIGgO472zWc5jCFijuzor/qlXXm6BPtE89Yd4XyNPlYCw4EY1wP55vg++bP0q1KuiAdbKHvsVKwL1vIPhNXsa0Aboefx4Q5MM6fhFMKPAX6FyybY9B/MwJdLK/JYpLp3MNmGl+Xw21RnXZjeUW+Sb1kcHNmkWLzR9zTssSOu/EnKl418YZIXxHPM4FoxB+Q/B+PzxOVthdes2Bw8boZtXF/XJT9G5uUcXwnrOD5+JBisMyH9FM4V5Hu/Y07wT1lz1ZR3/bvGf+uBWLeYdlc+WgI/QmZ29OfMZluw6I3r+mcl1gOwcOB9vinPqxHnSwSu8gPhCIjDga2LlHm78gyCrL2Uvv8XiXv3HvY76BbmmthW/AL+FPjmwOhNGBkZwVnM17WDXVKO7SqOymdtKxnIZgr+NSO4X5gPPNz7g+5js3FL1rNt6GkrxbZFd2BOmpvJ4HK3JYqfLqonoVleEKwiodd3LPsTCUjsFw8x3CzX2yRtGN+P178x24/P2SfGP/wvzxY41ecwZPBXRKzopG3gvgXXAAl7QKZzOOcu5ls6O47XmGPcBa2c5jGpe2F8H3ZJdTGC9Dfh6k46yoVR3eKcibYdlqRju4ZLLzeJQqG3BNKrNjXm0HVTadbzO/L/KMOkSG8By7BJwQGcYBwnPuRBnN0cuZy4ofi3dbNA5+c7RfA+gAdC+xIbxy5DJ8TxQ8oKiB5JBwQDzn/FnwbPMz8UQOXJ6Hg0Gyk205E+abn4FfLrGJnnhY9lKlYf3eiDHvI3Df7msfgwo7VpVm459jfubRoeA7XirwYqLVk1Mlh5i/uLhbv+k88fB+JPJZX1DEBPMz6s8lncP3bAx2ymXm96hQ9Hj7FOTPWdkPXCW7ucqwcRtz4vKWjWVl7cEBxKX41JKZNSz7Q201Q3kcVBB/T+W790c9WyvJ+XPhxTq69AW7OX8cGhjE4fnscsX9t/NHpcEV8v6D3Pq/OJ3VgjBO/b3AAnqROW7/PB0VrgudlWxvd/6oxsuBOr37u44b8YXCQNd2dNoveM/4vCjIu7g43flLivgcy3Z6S8eVMM2Ozp/lH9XqER53xmXvovrx6PQ3y+8PnonPLhsgZXfFreKShQx+iz8/b/6qkDOB14S8CjxPexevB39mfiafAU7KrsTayZtnPrr2/zPvrHHG0/ngsYN71eHgPjACceN9i5Wi982ZcCfScemnk7KX+f3+MaVr9aQRPl728YaHHxy4pXwF0Jfg+fpS0zKp7YTOFZ0/+hUcINyfuUrxyERHkcfBq01LuNKMNH/k4XUnBxy96n5qG8Y7uepds5X7D+3O+MpLAoxkx95t3ul4yPyXGDbMseAS8/sxL/W3uBeumDeXU97HstHYuOxENg73ed6xbsxJcwQeq8BT5vdqpueA4HLNzrg/Tuf8bQ2PbDzOZD4DvXZ2Mu9j5yDNEsXN2mYoOMn8fsvy7lCaIXr2Qpp1QRlMd5TahW3GwTaddUG8xsgeTo5VeD8rp36cLLzvnh+9r5GtyxA2z7pCyPQLzt8kXaMlZxA9ZefvM7n8jrYPoXjJs07IdcH+xWXf+du2I4rKAP8ES7uivK1Czt8J8xDeov2tSfvTpLy9YluV8x8HpsQd59r+04P73L9se5EqRofiHXUoudf5m6ntRs5/BKDzNF7bkMkRGyonaJHryEX8tiJU6pfqVH56arDtTBrAw8As5y/dudXwQwg/ioyVX7DVqtP7g2v715mZ2MQXdzI9z8Zb+/LNK8Aezc3NDXV1dTwhNNbX16+zrU9L0A/vf5z5UBu/K/m6UCEtjwVP25Z3p0mdE/txn3CCfWIenWZsf0vqKq3owBk5KSkpKSkpKSkpKSkpKSkpKSkpKSkpKWlb1Xtu1bj9rQ3dAQAAAABJRU5ErkJggg==",aW="/assets/forum-competences-CdFBqVuv.webp",lW=()=>{const e={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"Qui Sommes-Nous",item:"https://crmsurmesure.com/qui-sommes-nous"}]},t=[{name:"HTC Santé",logo:nW,bgClass:"bg-white"},{name:"Je Suis Bien Dans Ma Peau (Point Soleil)",logo:sW,bgClass:"bg-white"},{name:"Forum des Compétences",logo:aW,bgClass:"bg-white"},{name:"TURF FR",logo:iW,bgClass:"bg-white"},{name:"Obagem",logo:oW,bgClass:"bg-slate-800"}],r=[{icon:sI,title:"WordPress Expert",description:"Développement de sites sur mesure, optimisation de performances et maintenance pour des milliers de sites dans le monde."},{icon:xa,title:"Cybersécurité",description:"Protection, nettoyage de sites piratés et mise en place de protocoles de sécurité avancés pour sites WordPress."},{icon:qO,title:"Partenaire Reconnu",description:"Recommandé par les plus grands hébergeurs comme IONOS et Monarobase pour notre expertise technique."},{icon:vt,title:"Grands Comptes",description:"Nous accompagnons des entreprises de toutes tailles, des PME aux grandes enseignes nationales."}];return i.jsxs(i.Fragment,{children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"Qui Sommes-Nous | CRM Sur Mesure - Experts WordPress & Cybersécurité"}),i.jsx("meta",{name:"description",content:"Découvrez WP SOLUTION, l'équipe derrière CRM Sur Mesure. Experts WordPress et cybersécurité reconnus mondialement, partenaires IONOS et Monarobase."}),i.jsx("meta",{name:"robots",content:"index, follow"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/qui-sommes-nous"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(e)})]}),i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsx("main",{className:"pt-32 pb-20",children:i.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"max-w-4xl mx-auto text-center mb-16",children:[i.jsxs("h1",{className:"text-4xl md:text-5xl font-display font-bold text-foreground mb-6",children:["Qui Sommes-",i.jsx("span",{className:"text-primary",children:"Nous"})," ?"]}),i.jsxs("p",{className:"text-xl text-muted-foreground leading-relaxed",children:["Derrière ",i.jsx(G,{to:"/",className:"text-primary hover:underline",children:"CRM Sur Mesure"})," se trouve ",i.jsx("strong",{children:"WP SOLUTION"}),", une entreprise reconnue mondialement pour son expertise en solutions WordPress et en cybersécurité."]})]}),i.jsx("section",{className:"max-w-4xl mx-auto mb-20",children:i.jsxs("div",{className:"glass rounded-2xl p-8 md:p-12",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-display font-bold text-foreground mb-6",children:"WP SOLUTION : L'Excellence WordPress & Cybersécurité"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground",children:[i.jsxs("p",{className:"mb-4",children:["Depuis des années, ",i.jsx("strong",{className:"text-foreground",children:"WP SOLUTION"})," accompagne des entreprises du monde entier dans la création, l'optimisation et la sécurisation de leurs sites WordPress. Notre expertise technique et notre approche sur mesure nous ont permis de devenir un acteur incontournable du secteur."]}),i.jsxs("p",{className:"mb-4",children:["Forts de cette expérience, nous avons créé ",i.jsx("strong",{className:"text-foreground",children:"CRM Sur Mesure"})," pour apporter la même qualité de service et d'expertise au monde des CRM. Notre objectif : offrir des ",i.jsx(G,{to:"/crm-metiers",className:"text-primary hover:underline",children:"solutions personnalisées par métier"})," qui s'adaptent parfaitement aux besoins de chaque activité."]}),i.jsxs("p",{className:"mb-4",children:["Avec des milliers de sites internet gérés à travers le monde, nous comprenons les enjeux des entreprises modernes et proposons des solutions à la fois performantes, sécurisées et évolutives. Découvrez ",i.jsx(G,{to:"/comment-ca-marche",className:"text-primary hover:underline",children:"comment nous créons votre CRM"})," en seulement 3 étapes."]})]}),i.jsx("div",{className:"mt-8",children:i.jsxs("a",{href:"https://www.wpsolution.io/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-primary hover:text-primary/80 transition-colors font-medium",children:["Découvrir WP SOLUTION ",i.jsx(Jc,{className:"w-4 h-4"})]})})]})}),i.jsxs("section",{className:"mb-20",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-display font-bold text-foreground text-center mb-12",children:"Nos Domaines d'Expertise"}),i.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:r.map((n,s)=>i.jsxs("div",{className:"glass rounded-xl p-6 text-center",children:[i.jsx("div",{className:"w-14 h-14 rounded-xl bg-primary/10 flex items-center justify-center mx-auto mb-4",children:i.jsx(n.icon,{className:"w-7 h-7 text-primary"})}),i.jsx("h3",{className:"text-lg font-display font-semibold text-foreground mb-2",children:n.title}),i.jsx("p",{className:"text-sm text-muted-foreground",children:n.description})]},s))})]}),i.jsxs("section",{className:"mb-20",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-display font-bold text-foreground text-center mb-4",children:"Ils Nous Font Confiance"}),i.jsx("p",{className:"text-center text-muted-foreground mb-12 max-w-2xl mx-auto",children:"Nous travaillons pour de grands comptes et des entreprises de renom à travers le monde."}),i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-6",children:t.map((n,s)=>i.jsx("div",{className:`${n.bgClass} rounded-xl p-6 flex items-center justify-center h-24 transition-transform hover:scale-105`,children:i.jsx("img",{src:n.logo,alt:`Logo ${n.name}`,className:"max-h-16 max-w-full object-contain"})},s))}),i.jsx("div",{className:"text-center mt-8",children:i.jsxs("a",{href:"https://www.wpsolution.io/portfolio/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-primary hover:text-primary/80 transition-colors font-medium",children:["Voir tous nos clients ",i.jsx(Jc,{className:"w-4 h-4"})]})})]}),i.jsxs("section",{className:"max-w-4xl mx-auto mb-20",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-display font-bold text-foreground text-center mb-12",children:"Recommandés par les Experts"}),i.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[i.jsxs("div",{className:"glass rounded-xl p-6",children:[i.jsx("h3",{className:"text-lg font-display font-semibold text-foreground mb-3",children:"Partenaire IONOS"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"IONOS, l'un des plus grands hébergeurs européens, recommande officiellement WP SOLUTION pour la maintenance et la sécurisation des sites WordPress de leurs clients."}),i.jsxs("a",{href:"https://partnernetwork.ionos.fr/partner/benjamin.bueno...textone.agency",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-primary hover:text-primary/80 transition-colors text-sm",children:["Voir notre profil partenaire ",i.jsx(Jc,{className:"w-3 h-3"})]})]}),i.jsxs("div",{className:"glass rounded-xl p-6",children:[i.jsx("h3",{className:"text-lg font-display font-semibold text-foreground mb-3",children:"Référencé par Monarobase"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"Monarobase recommande notre expertise pour le nettoyage et la sécurisation des sites WordPress piratés dans leurs procédures officielles d'assistance."}),i.jsxs("a",{href:"https://assistance.monarobase.net/procedure-pour-nettoyer-un-wordpress-pirate/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-primary hover:text-primary/80 transition-colors text-sm",children:["Voir la procédure ",i.jsx(Jc,{className:"w-3 h-3"})]})]})]})]}),i.jsx("section",{className:"max-w-3xl mx-auto text-center mb-16",children:i.jsxs("div",{className:"glass rounded-2xl p-8 md:p-12",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-display font-bold text-foreground mb-4",children:"Prêt à Créer Votre CRM Sur Mesure ?"}),i.jsxs("p",{className:"text-muted-foreground mb-8",children:["Bénéficiez de notre expertise pour développer un CRM parfaitement adapté à votre métier. Consultez ",i.jsx(G,{to:"/comment-ca-marche",className:"text-primary hover:underline",children:"notre processus en 3 étapes"})," pour en savoir plus."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsx(G,{to:"/#contact",className:"inline-flex items-center justify-center px-6 py-3 rounded-lg bg-primary text-primary-foreground font-medium hover:bg-primary/90 transition-colors",children:"Demander une Démo"}),i.jsx(G,{to:"/crm-metiers",className:"inline-flex items-center justify-center px-6 py-3 rounded-lg border border-border text-foreground font-medium hover:bg-muted transition-colors",children:"Voir Nos CRM Métiers"})]})]})}),i.jsxs("section",{className:"max-w-4xl mx-auto",children:[i.jsx("h3",{className:"text-lg font-semibold text-center mb-6",children:"Explorez nos solutions"}),i.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-center",children:[i.jsxs(G,{to:"/crm-assurance",className:"glass rounded-xl p-4 hover:bg-primary/5 transition-colors",children:[i.jsx("span",{className:"font-medium",children:"CRM Assurance"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Gestion des polices et sinistres"})]}),i.jsxs(G,{to:"/crm-immobilier",className:"glass rounded-xl p-4 hover:bg-primary/5 transition-colors",children:[i.jsx("span",{className:"font-medium",children:"CRM Immobilier"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Suivi des mandats et transactions"})]}),i.jsxs(G,{to:"/crm-sante",className:"glass rounded-xl p-4 hover:bg-primary/5 transition-colors",children:[i.jsx("span",{className:"font-medium",children:"CRM Santé"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Gestion des patients et rendez-vous"})]})]}),i.jsx("div",{className:"text-center mt-6",children:i.jsx(G,{to:"/blog",className:"text-primary hover:underline",children:"Lire nos articles sur les CRM →"})})]})]})}),i.jsx(Je,{})]})]})},cW=()=>{const e=[{number:"01",icon:kn,title:"Vous expliquez votre besoin",description:"Lors d'un premier échange avec votre chef de projet dédié, vous décrivez en détail votre vision et vos besoins spécifiques.",details:[{icon:mI,title:"Interface sur mesure",text:"Décrivez l'interface telle que vous l'imaginez : tableaux de bord, vues personnalisées, ergonomie adaptée à votre équipe."},{icon:wI,title:"Processus métier",text:"Expliquez vos processus de vente, de traitement des clients, prospects, commandes ou tout autre flux propre à votre activité."},{icon:YS,title:"Automatisations",text:"Identifiez les tâches répétitives à automatiser : relances, notifications, mises à jour de statuts, génération de documents..."},{icon:aI,title:"Intégrations externes",text:"Connectez votre CRM à vos outils existants : Facebook Ads, Google Ads, TikTok, logiciels de logistique, facturation, emailing..."}]},{number:"02",icon:sa,title:"Estimation et validation",description:"Votre chef de projet analyse vos besoins et vous propose un devis détaillé avec un planning précis.",details:[{icon:HS,title:"Cahier des charges",text:"Nous formalisons ensemble toutes vos exigences dans un document clair et exhaustif."},{icon:sa,title:"Devis transparent",text:"Vous recevez une estimation précise sans surprise, avec le détail de chaque fonctionnalité."},{icon:Fi,title:"Planning réaliste",text:"Un calendrier de développement vous est communiqué avec les jalons clés du projet."}]},{number:"03",icon:cp,title:"Livraison et accompagnement",description:"Votre CRM sur mesure est livré en moins d'un mois, et nos équipes restent à vos côtés pour la suite.",details:[{icon:cp,title:"Livraison rapide",text:"En moyenne, votre CRM personnalisé est opérationnel en 4 semaines, prêt à transformer votre activité."},{icon:iI,title:"Support permanent",text:"Notre équipe reste disponible en permanence pour répondre à vos questions et vous accompagner."},{icon:GO,title:"Corrections et évolutions",text:"Bugs, ajustements, nouvelles fonctionnalités : nous faisons évoluer votre CRM selon vos besoins."}]}],t=[{name:"CRM Assurance",href:"/crm-assurance"},{name:"CRM Immobilier",href:"/crm-immobilier"},{name:"CRM Courtage",href:"/crm-courtage"},{name:"CRM Recrutement",href:"/crm-recrutement"},{name:"CRM Automobile",href:"/crm-automobile"},{name:"CRM Santé",href:"/crm-sante"}],r={"@context":"https://schema.org","@type":"HowTo",name:"Comment obtenir un CRM sur mesure",description:"Découvrez en 3 étapes simples comment nous créons votre CRM personnalisé adapté à votre métier.",step:e.map((s,o)=>({"@type":"HowToStep",position:o+1,name:s.title,text:s.description}))},n={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://crmsurmesure.com"},{"@type":"ListItem",position:2,name:"Comment ça marche",item:"https://crmsurmesure.com/comment-ca-marche"}]};return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsxs(Ye,{children:[i.jsx("title",{children:"Comment ça marche | CRM Sur Mesure - Processus de création en 3 étapes"}),i.jsx("meta",{name:"description",content:"Découvrez notre processus de création de CRM sur mesure en 3 étapes : expression de vos besoins, estimation du projet, livraison et accompagnement permanent."}),i.jsx("meta",{property:"og:title",content:"Comment ça marche | CRM Sur Mesure"}),i.jsx("meta",{property:"og:description",content:"Créez votre CRM personnalisé en 3 étapes simples avec un accompagnement dédié."}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("link",{rel:"canonical",href:"https://crmsurmesure.com/comment-ca-marche"}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(r)}),i.jsx("script",{type:"application/ld+json",children:JSON.stringify(n)})]}),i.jsx(Ke,{}),i.jsxs("main",{className:"pt-24 pb-16",children:[i.jsx("section",{className:"container mx-auto px-4 mb-16",children:i.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[i.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6",children:"Comment ça marche ?"}),i.jsxs("p",{className:"text-xl text-muted-foreground",children:["Un processus simple et transparent pour obtenir un ",i.jsx("strong",{children:"CRM sur mesure"})," adapté à votre activité, livré en moins d'un mois avec un accompagnement permanent par ",i.jsx(G,{to:"/qui-sommes-nous",className:"text-primary hover:underline",children:"notre équipe experte"}),"."]})]})}),i.jsx("section",{className:"container mx-auto px-4",children:i.jsx("div",{className:"space-y-24",children:e.map((s,o)=>i.jsxs("div",{className:"relative",children:[o<e.length-1&&i.jsx("div",{className:"hidden lg:block absolute left-1/2 top-full w-0.5 h-24 bg-gradient-to-b from-primary/50 to-transparent -translate-x-1/2"}),i.jsxs("div",{className:`grid lg:grid-cols-2 gap-12 items-center ${o%2===1?"lg:flex-row-reverse":""}`,children:[i.jsxs("div",{className:`${o%2===1?"lg:order-2":""}`,children:[i.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[i.jsx("span",{className:"text-6xl font-bold text-primary/20",children:s.number}),i.jsx("div",{className:"w-16 h-16 rounded-2xl bg-primary/10 flex items-center justify-center",children:i.jsx(s.icon,{className:"w-8 h-8 text-primary"})})]}),i.jsx("h2",{className:"text-3xl font-bold mb-4",children:s.title}),i.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:s.description})]}),i.jsx("div",{className:`${o%2===1?"lg:order-1":""}`,children:i.jsx("div",{className:"bg-card border border-border rounded-2xl p-8 space-y-6",children:s.details.map((a,l)=>i.jsxs("div",{className:"flex gap-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center flex-shrink-0",children:i.jsx(a.icon,{className:"w-6 h-6 text-primary"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-semibold mb-1",children:a.title}),i.jsx("p",{className:"text-muted-foreground text-sm",children:a.text})]})]},l))})})]})]},o))})}),i.jsx("section",{className:"container mx-auto px-4 mt-24",children:i.jsxs("div",{className:"bg-gradient-to-br from-primary/10 via-primary/5 to-transparent rounded-3xl p-12 text-center",children:[i.jsx("h2",{className:"text-3xl font-bold mb-4",children:"Prêt à démarrer votre projet ?"}),i.jsxs("p",{className:"text-lg text-muted-foreground mb-8 max-w-2xl mx-auto",children:["Prenez rendez-vous avec notre équipe pour discuter de votre ",i.jsx(G,{to:"/crm-metiers",className:"text-primary hover:underline",children:"CRM métier"})," et obtenir une estimation personnalisée."]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsx(F,{asChild:!0,size:"lg",className:"text-lg px-8",children:i.jsx(G,{to:"/discovery",children:"Démarrer mon projet"})}),i.jsx(F,{asChild:!0,variant:"outline",size:"lg",className:"text-lg px-8",children:i.jsx("a",{href:"/#contact",children:"Nous contacter"})})]})]})}),i.jsxs("section",{className:"container mx-auto px-4 mt-16",children:[i.jsx("div",{className:"text-center mb-8",children:i.jsxs("p",{className:"text-muted-foreground mb-4",children:["Découvrez ",i.jsx(G,{to:"/qui-sommes-nous",className:"text-primary hover:underline",children:"qui nous sommes"})," et pourquoi des centaines d'entreprises nous font confiance pour leur ",i.jsx(G,{to:"/crm-metiers",className:"text-primary hover:underline",children:"solution CRM"}),"."]})}),i.jsxs("div",{className:"max-w-4xl mx-auto",children:[i.jsx("h3",{className:"text-lg font-semibold text-center mb-6",children:"Découvrez nos solutions CRM par métier"}),i.jsxs("div",{className:"flex flex-wrap justify-center gap-3",children:[t.map(s=>i.jsx(G,{to:s.href,className:"px-4 py-2 rounded-full bg-primary/10 text-primary hover:bg-primary/20 transition-colors text-sm font-medium",children:s.name},s.href)),i.jsx(G,{to:"/crm-metiers",className:"px-4 py-2 rounded-full bg-primary text-primary-foreground hover:bg-primary/90 transition-colors text-sm font-medium",children:"Tous les métiers →"})]})]}),i.jsx("div",{className:"text-center mt-12",children:i.jsxs("p",{className:"text-muted-foreground",children:["Consultez notre ",i.jsx(G,{to:"/blog",className:"text-primary hover:underline",children:"blog"})," pour des conseils sur l'optimisation de votre gestion client et les dernières tendances CRM."]})})]})]}),i.jsx(Je,{})]})},uW=new LL,dW=()=>i.jsx(UL,{client:uW,children:i.jsxs(bL,{children:[i.jsx(sD,{}),i.jsx(DD,{}),i.jsx(Y3,{children:i.jsxs(U3,{children:[i.jsx(Ne,{path:"/",element:i.jsx(Iz,{})}),i.jsx(Ne,{path:"/auth",element:i.jsx(hU,{})}),i.jsx(Ne,{path:"/dashboard",element:i.jsx(pU,{})}),i.jsx(Ne,{path:"/project/:id",element:i.jsx(vU,{})}),i.jsx(Ne,{path:"/discovery",element:i.jsx(gU,{})}),i.jsx(Ne,{path:"/blog",element:i.jsx(Wz,{})}),i.jsx(Ne,{path:"/blog/:slug",element:i.jsx(mV,{})}),i.jsx(Ne,{path:"/blog/admin",element:i.jsx(_V,{})}),i.jsx(Ne,{path:"/blog/admin/:id",element:i.jsx(dU,{})}),i.jsx(Ne,{path:"/admin",element:i.jsx(xU,{})}),i.jsx(Ne,{path:"/admin/contacts",element:i.jsx(jU,{})}),i.jsx(Ne,{path:"/admin/interactions",element:i.jsx(DU,{})}),i.jsx(Ne,{path:"/crm-assurance",element:i.jsx(wH,{})}),i.jsx(Ne,{path:"/crm-immobilier",element:i.jsx(vH,{})}),i.jsx(Ne,{path:"/crm-courtage",element:i.jsx(NH,{})}),i.jsx(Ne,{path:"/crm-comptable",element:i.jsx(kH,{})}),i.jsx(Ne,{path:"/crm-recrutement",element:i.jsx(LH,{})}),i.jsx(Ne,{path:"/crm-automobile",element:i.jsx(VH,{})}),i.jsx(Ne,{path:"/crm-avocat",element:i.jsx(MH,{})}),i.jsx(Ne,{path:"/crm-sante",element:i.jsx(HH,{})}),i.jsx(Ne,{path:"/crm-marketing",element:i.jsx(JH,{})}),i.jsx(Ne,{path:"/crm-restauration",element:i.jsx(ZH,{})}),i.jsx(Ne,{path:"/crm-metiers",element:i.jsx(eW,{})}),i.jsx(Ne,{path:"/mentions-legales",element:i.jsx(tW,{})}),i.jsx(Ne,{path:"/politique-confidentialite",element:i.jsx(rW,{})}),i.jsx(Ne,{path:"/qui-sommes-nous",element:i.jsx(lW,{})}),i.jsx(Ne,{path:"/comment-ca-marche",element:i.jsx(cW,{})}),i.jsx(Ne,{path:"*",element:i.jsx(mH,{})})]})})]})});lS(document.getElementById("root")).render(i.jsx(pS,{children:i.jsx(dW,{})}));