PageSourceSearch

https://connecting-sponsors.fr/assets/index-QDUiFdkZ.js

js connecting-sponsors.fr collected 2026-10-07 22:39:20 UTC 599,972 bytes, 302 lines download raw bytes

vendor: 5,783 bytes, lines 1-9
1function lv(t,s){for(var a=0;a<s.length;a++){const l=s[a];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in t)){const u=Object.getOwnPropertyDescriptor(l,o);u&&Object.defineProperty(t,o,u.get?u:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const m of u.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&l(m)}).observe(document,{childList:!0,subtree:!0});function a(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(o){if(o.ep)return;o.ep=!0;const u=a(o);fetch(o.href,u)}})();function ov(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Vu={exports:{}},zi={},Hu={exports:{}},Ye={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Tf;function cv(){if(Tf)return Ye;Tf=1;var t=Symbol.for("react.element"),s=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),m=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=b&&N[b]||N["@@iterator"],typeof N=="function"?N:null)}var I={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,E={};function _(N,F,we){this.props=N,this.context=F,this.refs=E,this.updater=we||I}_.prototype.isReactComponent={},_.prototype.setState=function(N,F){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,F,"setState")},_.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function T(){}T.prototype=_.prototype;function C(N,F,we){this.props=N,this.context=F,this.refs=E,this.updater=we||I}var M=C.prototype=new T;M.constructor=C,z(M,_.prototype),M.isPureReactComponent=!0;var O=Array.isArray,W=Object.prototype.hasOwnProperty,ae={current:null},ge={key:!0,ref:!0,__self:!0,__source:!0};function De(N,F,we){var te,Be={},pe=null,q=null;if(F!=null)for(te in F.ref!==void 0&&(q=F.ref),F.key!==void 0&&(pe=""+F.key),F)W.call(F,te)&&!ge.hasOwnProperty(te)&&(Be[te]=F[te]);var Oe=arguments.length-2;if(Oe===1)Be.children=we;else if(1<Oe){for(var We=Array(Oe),tt=0;tt<Oe;tt++)We[tt]=arguments[tt+2];Be.children=We}if(N&&N.defaultProps)for(te in Oe=N.defaultProps,Oe)Be[te]===void 0&&(Be[te]=Oe[te]);return{$$typeof:t,type:N,key:pe,ref:q,props:Be,_owner:ae.current}}function Ne(N,F){return{$$typeof:t,type:N.type,key:F,ref:N.ref,props:N.props,_owner:N._owner}}function G(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function ke(N){var F={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(we){return F[we]})}var Y=/\/+/g;function fe(N,F){return typeof N=="object"&&N!==null&&N.key!=null?ke(""+N.key):F.toString(36)}function Ee(N,F,we,te,Be){var pe=typeof N;(pe==="undefined"||pe==="boolean")&&(N=null);var q=!1;if(N===null)q=!0;else switch(pe){case"string":case"number":q=!0;break;case"object":switch(N.$$typeof){case t:case s:q=!0}}if(q)return q=N,Be=Be(q),N=te===""?"."+fe(q,0):te,O(Be)?(we="",N!=null&&(we=N.replace(Y,"$&/")+"/"),Ee(Be,F,we,"",function(tt){return tt})):Be!=null&&(G(Be)&&(Be=Ne(Be,we+(!Be.key||q&&q.key===Be.key?"":(""+Be.key).replace(Y,"$&/")+"/")+N)),F.push(Be)),1;if(q=0,te=te===""?".":te+":",O(N))for(var Oe=0;Oe<N.length;Oe++){pe=N[Oe];var We=te+fe(pe,Oe);q+=Ee(pe,F,we,We,Be)}else if(We=w(N),typeof We=="function")for(N=We.call(N),Oe=0;!(pe=N.next()).done;)pe=pe.value,We=te+fe(pe,Oe++),q+=Ee(pe,F,we,We,Be);else if(pe==="object")throw F=String(N),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.");return q}function le(N,F,we){if(N==null)return N;var te=[],Be=0;return Ee(N,te,"","",function(pe){return F.call(we,pe,Be++)}),te}function Te(N){if(N._status===-1){var F=N._result;F=F(),F.then(function(we){(N._status===0||N._status===-1)&&(N._status=1,N._result=we)},function(we){(N._status===0||N._status===-1)&&(N._status=2,N._result=we)}),N._status===-1&&(N._status=0,N._result=F)}if(N._status===1)return N._result.default;throw N._result}var Fe={current:null},Z={transition:null},oe={ReactCurrentDispatcher:Fe,ReactCurrentBatchConfig:Z,ReactCurrentOwner:ae};function Q(){throw Error("act(...) is not supported in production builds of React.")}return Ye.Children={map:le,forEach:function(N,F,we){le(N,function(){F.apply(this,arguments)},we)},count:function(N){var F=0;return le(N,function(){F++}),F},toArray:function(N){return le(N,function(F){return F})||[]},only:function(N){if(!G(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},Ye.Component=_,Ye.Fragment=a,Ye.Profiler=o,Ye.PureComponent=C,Ye.StrictMode=l,Ye.Suspense=x,Ye.__SECRET_INT
vendor: 5,025 bytes, lines 9-25
9ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,Ye.act=Q,Ye.cloneElement=function(N,F,we){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var te=z({},N.props),Be=N.key,pe=N.ref,q=N._owner;if(F!=null){if(F.ref!==void 0&&(pe=F.ref,q=ae.current),F.key!==void 0&&(Be=""+F.key),N.type&&N.type.defaultProps)var Oe=N.type.defaultProps;for(We in F)W.call(F,We)&&!ge.hasOwnProperty(We)&&(te[We]=F[We]===void 0&&Oe!==void 0?Oe[We]:F[We])}var We=arguments.length-2;if(We===1)te.children=we;else if(1<We){Oe=Array(We);for(var tt=0;tt<We;tt++)Oe[tt]=arguments[tt+2];te.children=Oe}return{$$typeof:t,type:N.type,key:Be,ref:pe,props:te,_owner:q}},Ye.createContext=function(N){return N={$$typeof:m,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:u,_context:N},N.Consumer=N},Ye.createElement=De,Ye.createFactory=function(N){var F=De.bind(null,N);return F.type=N,F},Ye.createRef=function(){return{current:null}},Ye.forwardRef=function(N){return{$$typeof:f,render:N}},Ye.isValidElement=G,Ye.lazy=function(N){return{$$typeof:v,_payload:{_status:-1,_result:N},_init:Te}},Ye.memo=function(N,F){return{$$typeof:h,type:N,compare:F===void 0?null:F}},Ye.startTransition=function(N){var F=Z.transition;Z.transition={};try{N()}finally{Z.transition=F}},Ye.unstable_act=Q,Ye.useCallback=function(N,F){return Fe.current.useCallback(N,F)},Ye.useContext=function(N){return Fe.current.useContext(N)},Ye.useDebugValue=function(){},Ye.useDeferredValue=function(N){return Fe.current.useDeferredValue(N)},Ye.useEffect=function(N,F){return Fe.current.useEffect(N,F)},Ye.useId=function(){return Fe.current.useId()},Ye.useImperativeHandle=function(N,F,we){return Fe.current.useImperativeHandle(N,F,we)},Ye.useInsertionEffect=function(N,F){return Fe.current.useInsertionEffect(N,F)},Ye.useLayoutEffect=function(N,F){return Fe.current.useLayoutEffect(N,F)},Ye.useMemo=function(N,F){return Fe.current.useMemo(N,F)},Ye.useReducer=function(N,F,we){return Fe.current.useReducer(N,F,we)},Ye.useRef=function(N){return Fe.current.useRef(N)},Ye.useState=function(N){return Fe.current.useState(N)},Ye.useSyncExternalStore=function(N,F,we){return Fe.current.useSyncExternalStore(N,F,we)},Ye.useTransition=function(){return Fe.current.useTransition()},Ye.version="18.3.1",Ye}var Pf;function Md(){return Pf||(Pf=1,Hu.exports=cv()),Hu.exports}/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var Rf;function uv(){if(Rf)return zi;Rf=1;var t=Md(),s=Symbol.for("react.element"),a=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function m(f,x,h){var v,b={},w=null,I=null;h!==void 0&&(w=""+h),x.key!==void 0&&(w=""+x.key),x.ref!==void 0&&(I=x.ref);for(v in x)l.call(x,v)&&!u.hasOwnProperty(v)&&(b[v]=x[v]);if(f&&f.defaultProps)for(v in x=f.defaultProps,x)b[v]===void 0&&(b[v]=x[v]);return{$$typeof:s,type:f,key:w,ref:I,props:b,_owner:o.current}}return zi.Fragment=a,zi.jsx=m,zi.jsxs=m,zi}var Af;function dv(){return Af||(Af=1,Vu.exports=uv()),Vu.exports}var r=dv(),g=Md();const mv=ov(g),pv=lv({__proto__:null,default:mv},[g]);var yo={},Wu={exports:{}},Cn={},Gu={exports:{}},Zu={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var Of;function fv(){return Of||(Of=1,(function(t){function s(Z,oe){var Q=Z.length;Z.push(oe);e:for(;0<Q;){var N=Q-1>>>1,F=Z[N];if(0<o(F,oe))Z[N]=oe,Z[Q]=F,Q=N;else break e}}function a(Z){return Z.length===0?null:Z[0]}function l(Z){if(Z.length===0)return null;var oe=Z[0],Q=Z.pop();if(Q!==oe){Z[0]=Q;e:for(var N=0,F=Z.length,we=F>>>1;N<we;){var te=2*(N+1)-1,Be=Z[te],pe=te+1,q=Z[pe];if(0>o(Be,Q))pe<F&&0>o(q,Be)?(Z[N]=q,Z[pe]=Q,N=pe):(Z[N]=Be,Z[te]=Q,N=te);else if(pe<F&&0>o(q,Q))Z[N]=q,Z[pe]=Q,N=pe;else break e}}return oe}function o(Z,oe){var Q=Z.sortIndex-oe.sortIndex;return Q!==0?Q:Z.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var m=Date,f=m.now();t.unstable_now=function(){return m.now()-f}}var x=[],h=[],v=1,b=null,w=3,I=!1,z=!1,E=!1,_=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(Z){for(var oe=a(h);oe!==null;){if(oe.callback===null)l(h);else if(oe.startTime<=Z)l(h),oe.sortIndex=oe.expirationTime,s(x,oe);else break;
vendor: 52,148 bytes, lines 25-38
25oe=a(h)}}function O(Z){if(E=!1,M(Z),!z)if(a(x)!==null)z=!0,Te(W);else{var oe=a(h);oe!==null&&Fe(O,oe.startTime-Z)}}function W(Z,oe){z=!1,E&&(E=!1,T(De),De=-1),I=!0;var Q=w;try{for(M(oe),b=a(x);b!==null&&(!(b.expirationTime>oe)||Z&&!ke());){var N=b.callback;if(typeof N=="function"){b.callback=null,w=b.priorityLevel;var F=N(b.expirationTime<=oe);oe=t.unstable_now(),typeof F=="function"?b.callback=F:b===a(x)&&l(x),M(oe)}else l(x);b=a(x)}if(b!==null)var we=!0;else{var te=a(h);te!==null&&Fe(O,te.startTime-oe),we=!1}return we}finally{b=null,w=Q,I=!1}}var ae=!1,ge=null,De=-1,Ne=5,G=-1;function ke(){return!(t.unstable_now()-G<Ne)}function Y(){if(ge!==null){var Z=t.unstable_now();G=Z;var oe=!0;try{oe=ge(!0,Z)}finally{oe?fe():(ae=!1,ge=null)}}else ae=!1}var fe;if(typeof C=="function")fe=function(){C(Y)};else if(typeof MessageChannel<"u"){var Ee=new MessageChannel,le=Ee.port2;Ee.port1.onmessage=Y,fe=function(){le.postMessage(null)}}else fe=function(){_(Y,0)};function Te(Z){ge=Z,ae||(ae=!0,fe())}function Fe(Z,oe){De=_(function(){Z(t.unstable_now())},oe)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Z){Z.callback=null},t.unstable_continueExecution=function(){z||I||(z=!0,Te(W))},t.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ne=0<Z?Math.floor(1e3/Z):5},t.unstable_getCurrentPriorityLevel=function(){return w},t.unstable_getFirstCallbackNode=function(){return a(x)},t.unstable_next=function(Z){switch(w){case 1:case 2:case 3:var oe=3;break;default:oe=w}var Q=w;w=oe;try{return Z()}finally{w=Q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(Z,oe){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var Q=w;w=Z;try{return oe()}finally{w=Q}},t.unstable_scheduleCallback=function(Z,oe,Q){var N=t.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?N+Q:N):Q=N,Z){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=Q+F,Z={id:v++,callback:oe,priorityLevel:Z,startTime:Q,expirationTime:F,sortIndex:-1},Q>N?(Z.sortIndex=Q,s(h,Z),a(x)===null&&Z===a(h)&&(E?(T(De),De=-1):E=!0,Fe(O,Q-N))):(Z.sortIndex=F,s(x,Z),z||I||(z=!0,Te(W))),Z},t.unstable_shouldYield=ke,t.unstable_wrapCallback=function(Z){var oe=w;return function(){var Q=w;w=oe;try{return Z.apply(this,arguments)}finally{w=Q}}}})(Zu)),Zu}var Lf;function hv(){return Lf||(Lf=1,Gu.exports=fv()),Gu.exports}/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var If;function xv(){if(If)return Cn;If=1;var t=Md(),s=hv();function a(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,o={};function u(e,n){m(e,n),m(e+"Capture",n)}function m(e,n){for(o[e]=n,e=0;e<n.length;e++)l.add(n[e])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),x=Object.prototype.hasOwnProperty,h=/^[: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]*$/,v={},b={};function w(e){return x.call(b,e)?!0:x.call(v,e)?!1:h.test(e)?b[e]=!0:(v[e]=!0,!1)}function I(e,n,i,c){if(i!==null&&i.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return c?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function z(e,n,i,c){if(n===null||typeof n>"u"||I(e,n,i,c))return!0;if(c)return!1;if(i!==null)switch(i.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function E(e,n,i,c,d,p,y){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=c,this.attributeNamespace=d,this.mustUseProperty=i,this.propertyName=e,this.type=n,this.sanitizeURL=p,this.removeEmptyString=y}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_[e]=new E(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];_[n]=new E(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){_[e]=new E(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_[e]=new E(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){_[e]=new E(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){_[e]=new E(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){_[e]=new E(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){_[e]=new E(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){_[e]=new E(e,5,!1,e.toLowerCase(),null,!1,!1)});var T=/[\-:]([a-z])/g;function C(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 n=e.replace(T,C);_[n]=new E(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(T,C);_[n]=new E(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(T,C);_[n]=new E(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){_[e]=new E(e,1,!1,e.toLowerCase(),null,!1,!1)}),_.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){_[e]=new E(e,1,!1,e.toLowerCase(),null,!0,!0)});function M(e,n,i,c){var d=_.hasOwnProperty(n)?_[n]:null;(d!==null?d.type!==0:c||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(z(n,i,d,c)&&(i=null),c||d===null?w(n)&&(i===null?e.removeAttribute(n):e.setAttribute(n,""+i)):d.mustUseProperty?e[d.propertyName]=i===null?d.type===3?!1:"":i:(n=d.attributeName,c=d.attributeNamespace,i===null?e.removeAttribute(n):(d=d.type,i=d===3||d===4&&i===!0?"":""+i,c?e.setAttributeNS(c,n,i):e.setAttribute(n,i))))}var O=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),ae=Symbol.for("react.portal"),ge=Symbol.for("react.fragment"),De=Symbol.for("react.strict_mode"),Ne=Symbol.for("react.profiler"),G=Symbol.for("react.provider"),ke=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),Ee=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),Fe=Symbol.for("react.offscreen"),Z=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=Z&&e[Z]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Object.assign,N;function F(e){if(N===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);N=n&&n[1]||""}return`
34`+N+e}var we=!1;function te(e,n){if(!e||we)return"";we=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch($){var c=$}Reflect.construct(e,[],n)}else{try{n.call()}catch($){c=$}e.call(n.prototype)}else{try{throw Error()}catch($){c=$}e()}}catch($){if($&&c&&typeof $.stack=="string"){for(var d=$.stack.split(`
35`),p=c.stack.split(`
36`),y=d.length-1,S=p.length-1;1<=y&&0<=S&&d[y]!==p[S];)S--;for(;1<=y&&0<=S;y--,S--)if(d[y]!==p[S]){if(y!==1||S!==1)do if(y--,S--,0>S||d[y]!==p[S]){var k=`
37`+d[y].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=y&&0<=S);break}}}finally{we=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?F(e):""}function Be(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=te(e.type,!1),e;case 11:return e=te(e.type.render,!1),e;case 1:return e=te(e.type,!0),e;default:return""}}function pe(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 ge:return"Fragment";case ae:return"Portal";case Ne:return"Profiler";case De:return"StrictMode";case fe:return"Suspense";case Ee:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ke:return(e.displayName||"Context")+".Consumer";case G:return(e._context.displayName||"Context")+".Provider";case Y:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case le:return n=e.displayName||null,n!==null?n:pe(e.type)||"Memo";case Te:n=e._payload,e=e._init;try{return pe(e(n))}catch{}}return null}function q(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(n);case 8:return n===De?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Oe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function We(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function tt(e){var n=We(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),c=""+e[n];if(!e.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var d=i.get,p=i.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(y){c=""+y,p.call(this,y)}}),Object.defineProperty(e,n,{enumerable:i.enumerable}),{getValue:function(){return c},setValue:function(y){c=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ue(e){e._valueTracker||(e._valueTracker=tt(e))}function nt(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),c="";return e&&(c=We(e)?e.checked?"true":"false":e.value),e=c,e!==i?(n.setValue(e),!0):!1}function yt(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 Le(e,n){var i=n.checked;return Q({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function ut(e,n){var i=n.defaultValue==null?"":n.defaultValue,c=n.checked!=null?n.checked:n.defaultChecked;i=Oe(n.value!=null?n.value:i),e._wrapperState={initialChecked:c,initialValue:i,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function ue(e,n){n=n.checked,n!=null&&M(e,"checked",n,!1)}function dt(e,n){ue(e,n);var i=Oe(n.value),c=n.type;if(i!=null)c==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(c==="submit"||c==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Et(e,n.type,i):n.hasOwnProperty("defaultValue")&&Et(e,n.type,Oe(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function mt(e,n,i){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var c=n.type;if(!(c!=="submit"&&c!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,i||n===e.value||(e.value=n),e.defaultValue=n}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function Et(e,n,i){(n!=="number"||yt(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var Ht=Array.isArray;function vt(e,n,i,c){if(e=e.options,n){n={};for(var d=0;d<i.length;d++)n["$"+i[d]]=!0;for(i=0;i<e.length;i++)d=n.hasOwnProperty("$"+e[i].value),e[i].selected!==d&&(e[i].selected=d),d&&c&&(e[i].defaultSelected=!0)}else{for(i=""+Oe(i),n=null,d=0;d<e.length;d++){if(e[d].value===i){e[d].selected=!0,c&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function Wt(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(a(91));return Q({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function es(e,n){var i=n.value;if(i==null){if(i=n.children,n=n.defaultValue,i!=null){if(n!=null)throw Error(a(92));if(Ht(i)){if(1<i.length)throw Error(a(93));i=i[0]}n=i}n==null&&(n=""),i=n}e._wrapperState={initialValue:Oe(i)}}function ps(e,n){var i=Oe(n.value),c=Oe(n.defaultValue);i!=null&&(i=""+i,i!==e.value&&(e.value=i),n.defaultValue==null&&e.defaultValue!==i&&(e.defaultValue=i)),c!=null&&(e.defaultValue=""+c)}function B(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function J(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 Pe(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?J(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var rt,Jt=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,i,c,d){MSApp.execUnsafeLocalFunction(function(){return e(n,i,c,d)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(rt=rt||document.createElement("div"),rt.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=rt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function xn(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var Ut={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},ts=["Webkit","ms","Moz","O"];Object.keys(Ut).forEach(function(e){ts.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Ut[n]=Ut[e]})});function rn(e,n,i){return n==null||typeof n=="boolean"||n===""?"":i||typeof n!="number"||n===0||Ut.hasOwnProperty(e)&&Ut[e]?(""+n).trim():n+"px"}function Pn(e,n){e=e.style;for(var i in n)if(n.hasOwnProperty(i)){var c=i.indexOf("--")===0,d=rn(i,n[i],c);i==="float"&&(i="cssFloat"),c?e.setProperty(i,d):e[i]=d}}var an=Q({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 Es(e,n){if(n){if(an[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(a(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(a(61))}if(n.style!=null&&typeof n.style!="object")throw Error(a(62))}}function fs(e,n){if(e.indexOf("-")===-1)return typeof n.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 hs=null;function ns(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ts=null,ln=null,on=null;function Ws(e){if(e=Ni(e)){if(typeof Ts!="function")throw Error(a(280));var n=e.stateNode;n&&(n=Al(n),Ts(e.stateNode,e.type,n))}}function Gs(e){ln?on?on.push(e):on=[e]:ln=e}function ra(){if(ln){var e=ln,n=on;if(on=ln=null,Ws(e),n)for(e=0;e<n.length;e++)Ws(n[e])}}function Ps(e,n){return e(n)}function Zs(){}var xs=!1;function gs(e,n,i){if(xs)return e(n,i);xs=!0;try{return Ps(e,n,i)}finally{xs=!1,(ln!==null||on!==null)&&(Zs(),ra())}}function Ft(e,n){var i=e.stateNode;if(i===null)return null;var c=Al(i);if(c===null)return null;i=c[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(e=e.type,c=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!c;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(a(231,n,typeof i));return i}var Rn=!1;if(f)try{var ss={};Object.defineProperty(ss,"passive",{get:function(){Rn=!0}}),window.addEventListener("test",ss,ss),window.removeEventListener("test",ss,ss)}catch{Rn=!1}function Cr(e,n,i,c,d,p,y,S,k){var $=Array.prototype.slice.call(arguments,3);try{n.apply(i,$)}catch(X){this.onError(X)}}var re=!1,Ze=null,Xe=!1,bt=null,Ot={onError:function(e){re=!0,Ze=e}};function kr(e,n,i,c,d,p,y,S,k){re=!1,Ze=null,Cr.apply(Ot,arguments)}function Er(e,n,i,c,d,p,y,S,k){if(kr.apply(this,arguments),re){if(re){var $=Ze;re=!1,Ze=null}else throw Error(a(198));Xe||(Xe=!0,bt=$)}}function Rs(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function cl(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function jt(e){if(Rs(e)!==e)throw Error(a(188))}function Ks(e){var n=e.alternate;if(!n){if(n=Rs(e),n===null)throw Error(a(188));return n!==e?null:e}for(var i=e,c=n;;){var d=i.return;if(d===null)break;var p=d.alternate;if(p===null){if(c=d.return,c!==null){i=c;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===i)return jt(d),e;if(p===c)return jt(d),n;p=p.sibling}throw Error(a(188))}if(i.return!==c.return)i=d,c=p;else{for(var y=!1,S=d.child;S;){if(S===i){y=!0,i=d,c=p;break}if(S===c){y=!0,c=d,i=p;break}S=S.sibling}if(!y){for(S=p.child;S;){if(S===i){y=!0,i=p,c=d;break}if(S===c){y=!0,c=p,i=d;break}S=S.sibling}if(!y)throw Error(a(189))}}if(i.alternate!==c)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?e:n}function ul(e){return e=Ks(e),e!==null?ni(e):null}function ni(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=ni(e);if(n!==null)return n;e=e.sibling}return null}var aa=s.unstable_scheduleCallback,si=s.unstable_cancelCallback,dl=s.unstable_shouldYield,pc=s.unstable_requestPaint,wt=s.unstable_now,fc=s.unstable_getCurrentPriorityLevel,ri=s.unstable_ImmediatePriority,rs=s.unstable_UserBlockingPriority,Tr=s.unstable_NormalPriority,ia=s.unstable_LowPriority,ys=s.unstable_IdlePriority,la=null,gn=null;function ml(e){if(gn&&typeof gn.onCommitFiberRoot=="function")try{gn.onCommitFiberRoot(la,e,void 0,(e.current.flags&128)===128)}catch{}}var An=Math.clz32?Math.clz32:oa,pl=Math.log,fl=Math.LN2;function oa(e){return e>>>=0,e===0?32:31-(pl(e)/fl|0)|0}var Ys=64,As=4194304;function Vn(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 vs(e,n){var i=e.pendingLanes;if(i===0)return 0;var c=0,d=e.suspendedLanes,p=e.pingedLanes,y=i&268435455;if(y!==0){var S=y&~d;S!==0?c=Vn(S):(p&=y,p!==0&&(c=Vn(p)))}else y=i&~d,y!==0?c=Vn(y):p!==0&&(c=Vn(p));if(c===0)return 0;if(n!==0&&n!==c&&(n&d)===0&&(d=c&-c,p=n&-n,d>=p||d===16&&(p&4194240)!==0))return n;if((c&4)!==0&&(c|=i&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=c;0<n;)i=31-An(n),d=1<<i,c|=e[i],n&=~d;return c}function Hn(e,n){switch(e){case 1:case 2:case 4:return n+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 n+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 hc(e,n){for(var i=e.suspendedLanes,c=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes;0<p;){var y=31-An(p),S=1<<y,k=d[y];k===-1?((S&i)===0||(S&c)!==0)&&(d[y]=Hn(S,n)):k<=n&&(e.expiredLanes|=S),p&=~S}}function Qs(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function hl(){var e=Ys;return Ys<<=1,(Ys&4194240)===0&&(Ys=64),e}function ca(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function Xs(e,n,i){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-An(n),e[n]=i}function xl(e,n){var i=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var c=e.eventTimes;for(e=e.expirationTimes;0<i;){var d=31-An(i),p=1<<d;n[d]=0,c[d]=-1,e[d]=-1,i&=~p}}function ua(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var c=31-An(i),d=1<<c;d&n|e[c]&n&&(e[c]|=n),i&=~d}}var ct=0;function ai(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var gl,ii,li,Pr,da,se=!1,j=[],L=null,H=null,ce=null,ve=new Map,Ie=new Map,Je=[],ht="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 en(e,n){switch(e){case"focusin":case"focusout":L=null;break;case"dragenter":case"dragleave":H=null;break;case"mouseover":case"mouseout":ce=null;break;case"pointerover":case"pointerout":ve.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ie.delete(n.pointerId)}}function Lt(e,n,i,c,d,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:i,eventSystemFlags:c,nativeEvent:p,targetContainers:[d]},n!==null&&(n=Ni(n),n!==null&&ii(n)),e):(e.eventSystemFlags|=c,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function oi(e,n,i,c,d){switch(n){case"focusin":return L=Lt(L,e,n,i,c,d),!0;case"dragenter":return H=Lt(H,e,n,i,c,d),!0;case"mouseover":return ce=Lt(ce,e,n,i,c,d),!0;case"pointerover":var p=d.pointerId;return ve.set(p,Lt(ve.get(p)||null,e,n,i,c,d)),!0;case"gotpointercapture":return p=d.pointerId,Ie.set(p,Lt(Ie.get(p)||null,e,n,i,c,d)),!0}return!1}function Gt(e){var n=Rr(e.target);if(n!==null){var i=Rs(n);if(i!==null){if(n=i.tag,n===13){if(n=cl(i),n!==null){e.blockedOn=n,da(e.priority,function(){li(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yl(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=gc(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(i===null){i=e.nativeEvent;var c=new i.constructor(i.type,i);hs=c,i.target.dispatchEvent(c),hs=null}else return n=Ni(i),n!==null&&ii(n),e.blockedOn=i,!1;n.shift()}return!0}function pm(e,n,i){yl(e)&&i.delete(n)}function R0(){se=!1,L!==null&&yl(L)&&(L=null),H!==null&&yl(H)&&(H=null),ce!==null&&yl(ce)&&(ce=null),ve.forEach(pm),Ie.forEach(pm)}function ci(e,n){e.blockedOn===n&&(e.blockedOn=null,se||(se=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,R0)))}function ui(e){function n(d){return ci(d,e)}if(0<j.length){ci(j[0],e);for(var i=1;i<j.length;i++){var c=j[i];c.blockedOn===e&&(c.blockedOn=null)}}for(L!==null&&ci(L,e),H!==null&&ci(H,e),ce!==null&&ci(ce,e),ve.forEach(n),Ie.forEach(n),i=0;i<Je.length;i++)c=Je[i],c.blockedOn===e&&(c.blockedOn=null);for(;0<Je.length&&(i=Je[0],i.blockedOn===null);)Gt(i),i.blockedOn===null&&Je.shift()}var ma=O.ReactCurrentBatchConfig,vl=!0;function A0(e,n,i,c){var d=ct,p=ma.transition;ma.transition=null;try{ct=1,xc(e,n,i,c)}finally{ct=d,ma.transition=p}}function O0(e,n,i,c){var d=ct,p=ma.transition;ma.transition=null;try{ct=4,xc(e,n,i,c)}finally{ct=d,ma.transition=p}}function xc(e,n,i,c){if(vl){var d=gc(e,n,i,c);if(d===null)Lc(e,n,c,bl,i),en(e,c);else if(oi(d,e,n,i,c))c.stopPropagation();else if(en(e,c),n&4&&-1<ht.indexOf(e)){for(;d!==null;){var p=Ni(d);if(p!==null&&gl(p),p=gc(e,n,i,c),p===null&&Lc(e,n,c,bl,i),p===d)break;d=p}d!==null&&c.stopPropagation()}else Lc(e,n,c,null,i)}}var bl=null;function gc(e,n,i,c){if(bl=null,e=ns(c),e=Rr(e),e!==null)if(n=Rs(e),n===null)e=null;else if(i=n.tag,i===13){if(e=cl(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return bl=e,null}function fm(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(fc()){case ri:return 1;case rs:return 4;case Tr:case ia:return 16;case ys:return 536870912;default:return 16}default:return 16}}var Js=null,yc=null,jl=null;function hm(){if(jl)return jl;var e,n=yc,i=n.length,c,d="value"in Js?Js.value:Js.textContent,p=d.length;for(e=0;e<i&&n[e]===d[e];e++);var y=i-e;for(c=1;c<=y&&n[i-c]===d[p-c];c++);return jl=d.slice(e,1<c?1-c:void 0)}function Nl(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function wl(){return!0}function xm(){return!1}function On(e){function n(i,c,d,p,y){this._reactName=i,this._targetInst=d,this.type=c,this.nativeEvent=p,this.target=y,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(i=e[S],this[S]=i?i(p):p[S]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?wl:xm,this.isPropagationStopped=xm,this}return Q(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=wl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),n}var pa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vc=On(pa),di=Q({},pa,{view:0,detail:0}),L0=On(di),bc,jc,mi,Sl=Q({},di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wc,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!==mi&&(mi&&e.type==="mousemove"?(bc=e.screenX-mi.screenX,jc=e.screenY-mi.screenY):jc=bc=0,mi=e),bc)},movementY:function(e){return"movementY"in e?e.movementY:jc}}),gm=On(Sl),I0=Q({},Sl,{dataTransfer:0}),D0=On(I0),z0=Q({},di,{relatedTarget:0}),Nc=On(z0),M0=Q({},pa,{animationName:0,elapsedTime:0,pseudoElement:0}),U0=On(M0),F0=Q({},pa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$0=On(F0),B0=Q({},pa,{data:0}),ym=On(B0),q0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},V0={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"},H0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=H0[e])?!!n[e]:!1}function wc(){return W0}var G0=Q({},di,{key:function(e){if(e.key){var n=q0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Nl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?V0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wc,charCode:function(e){return e.type==="keypress"?Nl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Nl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Z0=On(G0),K0=Q({},Sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vm=On(K0),Y0=Q({},di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wc}),Q0=On(Y0),X0=Q({},pa,{propertyName:0,elapsedTime:0,pseudoElement:0}),J0=On(X0),ey=Q({},Sl,{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}),ty=On(ey),ny=[9,13,27,32],Sc=f&&"CompositionEvent"in window,pi=null;f&&"documentMode"in document&&(pi=document.documentMode);var sy=f&&"TextEvent"in window&&!pi,bm=f&&(!Sc||pi&&8<pi&&11>=pi),jm=" ",Nm=!1;function wm(e,n){switch(e){case"keyup":return ny.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fa=!1;function ry(e,n){switch(e){case"compositionend":return Sm(n);case"keypress":return n.which!==32?null:(Nm=!0,jm);case"textInput":return e=n.data,e===jm&&Nm?null:e;default:return null}}function ay(e,n){if(fa)return e==="compositionend"||!Sc&&wm(e,n)?(e=hm(),jl=yc=Js=null,fa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return bm&&n.locale!=="ko"?null:n.data;default:return null}}var iy={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 _m(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!iy[e.type]:n==="textarea"}function Cm(e,n,i,c){Gs(c),n=Tl(n,"onChange"),0<n.length&&(i=new vc("onChange","change",null,i,c),e.push({event:i,listeners:n}))}var fi=null,hi=null;function ly(e){Vm(e,0)}function _l(e){var n=va(e);if(nt(n))return e}function oy(e,n){if(e==="change")return n}var km=!1;if(f){var _c;if(f){var Cc="oninput"in document;if(!Cc){var Em=document.createElement("div");Em.setAttribute("oninput","return;"),Cc=typeof Em.oninput=="function"}_c=Cc}else _c=!1;km=_c&&(!document.documentMode||9<document.documentMode)}function Tm(){fi&&(fi.detachEvent("onpropertychange",Pm),hi=fi=null)}function Pm(e){if(e.propertyName==="value"&&_l(hi)){var n=[];Cm(n,hi,e,ns(e)),gs(ly,n)}}function cy(e,n,i){e==="focusin"?(Tm(),fi=n,hi=i,fi.attachEvent("onpropertychange",Pm)):e==="focusout"&&Tm()}function uy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _l(hi)}function dy(e,n){if(e==="click")return _l(n)}function my(e,n){if(e==="input"||e==="change")return _l(n)}function py(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var as=typeof Object.is=="function"?Object.is:py;function xi(e,n){if(as(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),c=Object.keys(n);if(i.length!==c.length)return!1;for(c=0;c<i.length;c++){var d=i[c];if(!x.call(n,d)||!as(e[d],n[d]))return!1}return!0}function Rm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Am(e,n){var i=Rm(e);e=0;for(var c;i;){if(i.nodeType===3){if(c=e+i.textContent.length,e<=n&&c>=n)return{node:i,offset:n-e};e=c}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Rm(i)}}function Om(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Om(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Lm(){for(var e=window,n=yt();n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=yt(e.document)}return n}function kc(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function fy(e){var n=Lm(),i=e.focusedElem,c=e.selectionRange;if(n!==i&&i&&i.ownerDocument&&Om(i.ownerDocument.documentElement,i)){if(c!==null&&kc(i)){if(n=c.start,e=c.end,e===void 0&&(e=n),"selectionStart"in i)i.selectionStart=n,i.selectionEnd=Math.min(e,i.value.length);else if(e=(n=i.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var d=i.textContent.length,p=Math.min(c.start,d);c=c.end===void 0?p:Math.min(c.end,d),!e.extend&&p>c&&(d=c,c=p,p=d),d=Am(i,p);var y=Am(i,c);d&&y&&(e.rangeCount!==1||e.anchorNode!==d.node||e.anchorOffset!==d.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(n=n.createRange(),n.setStart(d.node,d.offset),e.removeAllRanges(),p>c?(e.addRange(n),e.extend(y.node,y.offset)):(n.setEnd(y.node,y.offset),e.addRange(n)))}}for(n=[],e=i;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<n.length;i++)e=n[i],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var hy=f&&"documentMode"in document&&11>=document.documentMode,ha=null,Ec=null,gi=null,Tc=!1;function Im(e,n,i){var c=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Tc||ha==null||ha!==yt(c)||(c=ha,"selectionStart"in c&&kc(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),gi&&xi(gi,c)||(gi=c,c=Tl(Ec,"onSelect"),0<c.length&&(n=new vc("onSelect","select",null,n,i),e.push({event:n,listeners:c}),n.target=ha)))}function Cl(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var xa={animationend:Cl("Animation","AnimationEnd"),animationiteration:Cl("Animation","AnimationIteration"),animationstart:Cl("Animation","AnimationStart"),transitionend:Cl("Transition","TransitionEnd")},Pc={},Dm={};f&&(Dm=document.createElement("div").style,"AnimationEvent"in window||(delete xa.animationend.animation,delete xa.animationiteration.animation,delete xa.animationstart.animation),"TransitionEvent"in window||delete xa.transitionend.transition);function kl(e){if(Pc[e])return Pc[e];if(!xa[e])return e;var n=xa[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in Dm)return Pc[e]=n[i];return e}var zm=kl("animationend"),Mm=kl("animationiteration"),Um=kl("animationstart"),Fm=kl("transitionend"),$m=new Map,Bm="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 er(e,n){$m.set(e,n),u(n,[e])}for(var Rc=0;Rc<Bm.length;Rc++){var Ac=Bm[Rc],xy=Ac.toLowerCase(),gy=Ac[0].toUpperCase()+Ac.slice(1);er(xy,"on"+gy)}er(zm,"onAnimationEnd"),er(Mm,"onAnimationIteration"),er(Um,"onAnimationStart"),er("dblclick","onDoubleClick"),er("focusin","onFocus"),er("focusout","onBlur"),er(Fm,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yi="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(" "),yy=new Set("cancel close invalid load scroll toggle".split(" ").concat(yi));function qm(e,n,i){var c=e.type||"unknown-event";e.currentTarget=i,Er(c,n,void 0,e),e.currentTarget=null}function Vm(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var c=e[i],d=c.event;c=c.listeners;e:{var p=void 0;if(n)for(var y=c.length-1;0<=y;y--){var S=c[y],k=S.instance,$=S.currentTarget;if(S=S.listener,k!==p&&d.isPropagationStopped())break e;qm(d,S,$),p=k}else for(y=0;y<c.length;y++){if(S=c[y],k=S.instance,$=S.currentTarget,S=S.listener,k!==p&&d.isPropagationStopped())break e;qm(d,S,$),p=k}}}if(Xe)throw e=bt,Xe=!1,bt=null,e}function xt(e,n){var i=n[Fc];i===void 0&&(i=n[Fc]=new Set);var c=e+"__bubble";i.has(c)||(Hm(n,e,2,!1),i.add(c))}function Oc(e,n,i){var c=0;n&&(c|=4),Hm(i,e,c,n)}var El="_reactListening"+Math.random().toString(36).slice(2);function vi(e){if(!e[El]){e[El]=!0,l.forEach(function(i){i!=="selectionchange"&&(yy.has(i)||Oc(i,!1,e),Oc(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[El]||(n[El]=!0,Oc("selectionchange",!1,n))}}function Hm(e,n,i,c){switch(fm(n)){case 1:var d=A0;break;case 4:d=O0;break;default:d=xc}i=d.bind(null,n,i,e),d=void 0,!Rn||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),c?d!==void 0?e.addEventListener(n,i,{capture:!0,passive:d}):e.addEventListener(n,i,!0):d!==void 0?e.addEventListener(n,i,{passive:d}):e.addEventListener(n,i,!1)}function Lc(e,n,i,c,d){var p=c;if((n&1)===0&&(n&2)===0&&c!==null)e:for(;;){if(c===null)return;var y=c.tag;if(y===3||y===4){var S=c.stateNode.containerInfo;if(S===d||S.nodeType===8&&S.parentNode===d)break;if(y===4)for(y=c.return;y!==null;){var k=y.tag;if((k===3||k===4)&&(k=y.stateNode.containerInfo,k===d||k.nodeType===8&&k.parentNode===d))return;y=y.return}for(;S!==null;){if(y=Rr(S),y===null)return;if(k=y.tag,k===5||k===6){c=p=y;continue e}S=S.parentNode}}c=c.return}gs(function(){var $=p,X=ns(i),ne=[];e:{var K=$m.get(e);if(K!==void 0){var xe=vc,be=e;switch(e){case"keypress":if(Nl(i)===0)break e;case"keydown":case"keyup":xe=Z0;break;case"focusin":be="focus",xe=Nc;break;case"focusout":be="blur",xe=Nc;break;case"beforeblur":case"afterblur":xe=Nc;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":xe=gm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=D0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=Q0;break;case zm:case Mm:case Um:xe=U0;break;case Fm:xe=J0;break;case"scroll":xe=L0;break;case"wheel":xe=ty;break;case"copy":case"cut":case"paste":xe=$0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=vm}var Se=(n&4)!==0,Rt=!Se&&e==="scroll",D=Se?K!==null?K+"Capture":null:K;Se=[];for(var R=$,U;R!==null;){U=R;var ie=U.stateNode;if(U.tag===5&&ie!==null&&(U=ie,D!==null&&(ie=Ft(R,D),ie!=null&&Se.push(bi(R,ie,U)))),Rt)break;R=R.return}0<Se.length&&(K=new xe(K,be,null,i,X),ne.push({event:K,listeners:Se}))}}if((n&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",xe=e==="mouseout"||e==="pointerout",K&&i!==hs&&(be=i.relatedTarget||i.fromElement)&&(Rr(be)||be[Os]))break e;if((xe||K)&&(K=X.window===X?X:(K=X.ownerDocument)?K.defaultView||K.parentWindow:window,xe?(be=i.relatedTarget||i.toElement,xe=$,be=be?Rr(be):null,be!==null&&(Rt=Rs(be),be!==Rt||be.tag!==5&&be.tag!==6)&&(be=null)):(xe=null,be=$),xe!==be)){if(Se=gm,ie="onMouseLeave",D="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(Se=vm,ie="onPointerLeave",D="onPointerEnter",R="pointer"),Rt=xe==null?K:va(xe),U=be==null?K:va(be),K=new Se(ie,R+"leave",xe,i,X),K.target=Rt,K.relatedTarget=U,ie=null,Rr(X)===$&&(Se=new Se(D,R+"enter",be,i,X),Se.target=U,Se.relatedTarget=Rt,ie=Se),Rt=ie,xe&&be)t:{for(Se=xe,D=be,R=0,U=Se;U;U=ga(U))R++;for(U=0,ie=D;ie;ie=ga(ie))U++;for(;0<R-U;)Se=ga(Se),R--;for(;0<U-R;)D=ga(D),U--;for(;R--;){if(Se===D||D!==null&&Se===D.alternate)break t;Se=ga(Se),D=ga(D)}Se=null}else Se=null;xe!==null&&Wm(ne,K,xe,Se,!1),be!==null&&Rt!==null&&Wm(ne,Rt,be,Se,!0)}}e:{if(K=$?va($):window,xe=K.nodeName&&K.nodeName.toLowerCase(),xe==="select"||xe==="input"&&K.type==="file")var _e=oy;else if(_m(K))if(km)_e=my;else{_e=uy;var ze=cy}else(xe=K.nodeName)&&xe.toLowerCase()==="input"&&(K.type==="checkbox"||K.type==="radio")&&(_e=dy);if(_e&&(_e=_e(e,$))){Cm(ne,_e,i,X);break e}ze&&ze(e,K,$),e==="focusout"&&(ze=K._wrapperState)&&ze.controlled&&K.type==="number"&&Et(K,"number",K.value)}switch(ze=$?va($):window,e){case"focusin":(_m(ze)||ze.contentEditable==="true")&&(ha=ze,Ec=$,gi=null);break;case"focusout":gi=Ec=ha=null;break;case"mousedown":Tc=!0;break;case"contextmenu":case"mouseup":case"dragend":Tc=!1,Im(ne,i,X);break;case"selectionchange":if(hy)break;case"keydown":case"keyup":Im(ne,i,X)}var Me;if(Sc)e:{switch(e){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else fa?wm(e,i)&&($e="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&($e="onCompositionStart");$e&&(bm&&i.locale!=="ko"&&(fa||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&fa&&(Me=hm()):(Js=X,yc="value"in Js?Js.value:Js.textContent,fa=!0)),ze=Tl($,$e),0<ze.length&&($e=new ym($e,e,null,i,X),ne.push({event:$e,listeners:ze}),Me?$e.data=Me:(Me=Sm(i),Me!==null&&($e.data=Me)))),(Me=sy?ry(e,i):ay(e,i))&&($=Tl($,"onBeforeInput"),0<$.length&&(X=new ym("onBeforeInput","beforeinput",null,i,X),ne.push({event:X,listeners:$}),X.data=Me))}Vm(ne,n)})}function bi(e,n,i){return{instance:e,listener:n,currentTarget:i}}function Tl(e,n){for(var i=n+"Capture",c=[];e!==null;){var d=e,p=d.stateNode;d.tag===5&&p!==null&&(d=p,p=Ft(e,i),p!=null&&c.unshift(bi(e,p,d)),p=Ft(e,n),p!=null&&c.push(bi(e,p,d))),e=e.return}return c}function ga(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Wm(e,n,i,c,d){for(var p=n._reactName,y=[];i!==null&&i!==c;){var S=i,k=S.alternate,$=S.stateNode;if(k!==null&&k===c)break;S.tag===5&&$!==null&&(S=$,d?(k=Ft(i,p),k!=null&&y.unshift(bi(i,k,S))):d||(k=Ft(i,p),k!=null&&y.push(bi(i,k,S)))),i=i.return}y.length!==0&&e.push({event:n,listeners:y})}var vy=/\r\n?/g,by=/\u0000|\uFFFD/g;function Gm(e){return(typeof e=="string"?e:""+e).replace(vy,`
38`).replace(by,"")}function Pl(e,n,i){if(n=Gm(n),Gm(e)!==n&&i)throw Error(a(425))}function Rl(){}var Ic=null,Dc=null;function zc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Mc=typeof setTimeout=="function"?setTimeout:void 0,jy=typeof clearTimeout=="function"?clearTimeout:void 0,Zm=typeof Promise=="function"?Promise:void 0,Ny=typeof queueMicrotask=="function"?queueMicrotask:typeof Zm<"u"?function(e){return Zm.resolve(null).then(e).catch(wy)}:Mc;function wy(e){setTimeout(function(){throw e})}function Uc(e,n){var i=n,c=0;do{var d=i.nextSibling;if(e.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"){if(c===0){e.removeChild(d),ui(n);return}c--}else i!=="$"&&i!=="$?"&&i!=="$!"||c++;i=d}while(i);ui(n)}function tr(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Km(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"){if(n===0)return e;n--}else i==="/$"&&n++}e=e.previousSibling}return null}var ya=Math.random().toString(36).slice(2),bs="__reactFiber$"+ya,ji="__reactProps$"+ya,Os="__reactContainer$"+ya,Fc="__reactEvents$"+ya,Sy="__reactListeners$"+ya,_y="__reactHandles$"+ya;function Rr(e){var n=e[bs];if(n)return n;for(var i=e.parentNode;i;){if(n=i[Os]||i[bs]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=Km(e);e!==null;){if(i=e[bs])return i;e=Km(e)}return n}e=i,i=e.parentNode}return null}function Ni(e){return e=e[bs]||e[Os],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function va(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(a(33))}function Al(e){return e[ji]||null}var $c=[],ba=-1;function nr(e){return{current:e}}function gt(e){0>ba||(e.current=$c[ba],$c[ba]=null,ba--)}function pt(e,n){ba++,$c[ba]=e.current,e.current=n}var sr={},cn=nr(sr),jn=nr(!1),Ar=sr;function ja(e,n){var i=e.type.contextTypes;if(!i)return sr;var c=e.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===n)return c.__reactInternalMemoizedMaskedChildContext;var d={},p;for(p in i)d[p]=n[p];return c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=d),d}function Nn(e){return e=e.childContextTypes,e!=null}function Ol(){gt(jn),gt(cn)}function Ym(e,n,i){if(cn.current!==sr)throw Error(a(168));pt(cn,n),pt(jn,i)}function Qm(e,n,i){var c=e.stateNode;if(n=n.childContextTypes,typeof c.getChildContext!="function")return i;c=c.getChildContext();for(var d in c)if(!(d in n))throw Error(a(108,q(e)||"Unknown",d));return Q({},i,c)}function Ll(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sr,Ar=cn.current,pt(cn,e),pt(jn,jn.current),!0}function Xm(e,n,i){var c=e.stateNode;if(!c)throw Error(a(169));i?(e=Qm(e,n,Ar),c.__reactInternalMemoizedMergedChildContext=e,gt(jn),gt(cn),pt(cn,e)):gt(jn),pt(jn,i)}var Ls=null,Il=!1,Bc=!1;function Jm(e){Ls===null?Ls=[e]:Ls.push(e)}function Cy(e){Il=!0,Jm(e)}function rr(){if(!Bc&&Ls!==null){Bc=!0;var e=0,n=ct;try{var i=Ls;for(ct=1;e<i.length;e++){var c=i[e];do c=c(!0);while(c!==null)}Ls=null,Il=!1}catch(d){throw Ls!==null&&(Ls=Ls.slice(e+1)),aa(ri,rr),d}finally{ct=n,Bc=!1}}return null}var Na=[],wa=0,Dl=null,zl=0,Wn=[],Gn=0,Or=null,Is=1,Ds="";function Lr(e,n){Na[wa++]=zl,Na[wa++]=Dl,Dl=e,zl=n}function ep(e,n,i){Wn[Gn++]=Is,Wn[Gn++]=Ds,Wn[Gn++]=Or,Or=e;var c=Is;e=Ds;var d=32-An(c)-1;c&=~(1<<d),i+=1;var p=32-An(n)+d;if(30<p){var y=d-d%5;p=(c&(1<<y)-1).toString(32),c>>=y,d-=y,Is=1<<32-An(n)+d|i<<d|c,Ds=p+e}else Is=1<<p|i<<d|c,Ds=e}function qc(e){e.return!==null&&(Lr(e,1),ep(e,1,0))}function Vc(e){for(;e===Dl;)Dl=Na[--wa],Na[wa]=null,zl=Na[--wa],Na[wa]=null;for(;e===Or;)Or=Wn[--Gn],Wn[Gn]=null,Ds=Wn[--Gn],Wn[Gn]=null,Is=Wn[--Gn],Wn[Gn]=null}var Ln=null,In=null,Nt=!1,is=null;function tp(e,n){var i=Qn(5,null,null,0);i.elementType="DELETED",i.stateNode=n,i.return=e,n=e.deletions,n===null?(e.deletions=[i],e.flags|=16):n.push(i)}function np(e,n){switch(e.tag){case 5:var i=e.type;return n=n.nodeType!==1||i.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Ln=e,In=tr(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Ln=e,In=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(i=Or!==null?{id:Is,overflow:Ds}:null,e.memoizedState={dehydrated:n,treeContext:i,retryLane:1073741824},i=Qn(18,null,null,0),i.stateNode=n,i.return=e,e.child=i,Ln=e,In=null,!0):!1;default:return!1}}function Hc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Wc(e){if(Nt){var n=In;if(n){var i=n;
vendor: 4,133 bytes, line 38
38if(!np(e,n)){if(Hc(e))throw Error(a(418));n=tr(i.nextSibling);var c=Ln;n&&np(e,n)?tp(c,i):(e.flags=e.flags&-4097|2,Nt=!1,Ln=e)}}else{if(Hc(e))throw Error(a(418));e.flags=e.flags&-4097|2,Nt=!1,Ln=e}}}function sp(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ln=e}function Ml(e){if(e!==Ln)return!1;if(!Nt)return sp(e),Nt=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!zc(e.type,e.memoizedProps)),n&&(n=In)){if(Hc(e))throw rp(),Error(a(418));for(;n;)tp(e,n),n=tr(n.nextSibling)}if(sp(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"){if(n===0){In=tr(e.nextSibling);break e}n--}else i!=="$"&&i!=="$!"&&i!=="$?"||n++}e=e.nextSibling}In=null}}else In=Ln?tr(e.stateNode.nextSibling):null;return!0}function rp(){for(var e=In;e;)e=tr(e.nextSibling)}function Sa(){In=Ln=null,Nt=!1}function Gc(e){is===null?is=[e]:is.push(e)}var ky=O.ReactCurrentBatchConfig;function wi(e,n,i){if(e=i.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(a(309));var c=i.stateNode}if(!c)throw Error(a(147,e));var d=c,p=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===p?n.ref:(n=function(y){var S=d.refs;y===null?delete S[p]:S[p]=y},n._stringRef=p,n)}if(typeof e!="string")throw Error(a(284));if(!i._owner)throw Error(a(290,e))}return e}function Ul(e,n){throw e=Object.prototype.toString.call(n),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function ap(e){var n=e._init;return n(e._payload)}function ip(e){function n(D,R){if(e){var U=D.deletions;U===null?(D.deletions=[R],D.flags|=16):U.push(R)}}function i(D,R){if(!e)return null;for(;R!==null;)n(D,R),R=R.sibling;return null}function c(D,R){for(D=new Map;R!==null;)R.key!==null?D.set(R.key,R):D.set(R.index,R),R=R.sibling;return D}function d(D,R){return D=mr(D,R),D.index=0,D.sibling=null,D}function p(D,R,U){return D.index=U,e?(U=D.alternate,U!==null?(U=U.index,U<R?(D.flags|=2,R):U):(D.flags|=2,R)):(D.flags|=1048576,R)}function y(D){return e&&D.alternate===null&&(D.flags|=2),D}function S(D,R,U,ie){return R===null||R.tag!==6?(R=Mu(U,D.mode,ie),R.return=D,R):(R=d(R,U),R.return=D,R)}function k(D,R,U,ie){var _e=U.type;return _e===ge?X(D,R,U.props.children,ie,U.key):R!==null&&(R.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===Te&&ap(_e)===R.type)?(ie=d(R,U.props),ie.ref=wi(D,R,U),ie.return=D,ie):(ie=co(U.type,U.key,U.props,null,D.mode,ie),ie.ref=wi(D,R,U),ie.return=D,ie)}function $(D,R,U,ie){return R===null||R.tag!==4||R.stateNode.containerInfo!==U.containerInfo||R.stateNode.implementation!==U.implementation?(R=Uu(U,D.mode,ie),R.return=D,R):(R=d(R,U.children||[]),R.return=D,R)}function X(D,R,U,ie,_e){return R===null||R.tag!==7?(R=Br(U,D.mode,ie,_e),R.return=D,R):(R=d(R,U),R.return=D,R)}function ne(D,R,U){if(typeof R=="string"&&R!==""||typeof R=="number")return R=Mu(""+R,D.mode,U),R.return=D,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case W:return U=co(R.type,R.key,R.props,null,D.mode,U),U.ref=wi(D,null,R),U.return=D,U;case ae:return R=Uu(R,D.mode,U),R.return=D,R;case Te:var ie=R._init;return ne(D,ie(R._payload),U)}if(Ht(R)||oe(R))return R=Br(R,D.mode,U,null),R.return=D,R;Ul(D,R)}return null}function K(D,R,U,ie){var _e=R!==null?R.key:null;if(typeof U=="string"&&U!==""||typeof U=="number")return _e!==null?null:S(D,R,""+U,ie);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case W:return U.key===_e?k(D,R,U,ie):null;case ae:return U.key===_e?$(D,R,U,ie):null;case Te:return _e=U._init,K(D,R,_e(U._payload),ie)}if(Ht(U)||oe(U))return _e!==null?null:X(D,R,U,ie,null);Ul(D,U)}return null}function xe(D,R,U,ie,_e){if(typeof ie=="string"&&ie!==""||typeof ie=="number")return D=D.get(U)||null,S(R,D,""+ie,_e);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case W:return D=D.get(ie.key===null?U:ie.key)||null,k(R,D,ie,_e);case ae:return D=D.get(ie.key===null?U:ie.key)||null,$(R,D,ie,_e);case Te:var ze=ie._init;return xe(D,R,U,ze(ie._payload),_e)}
vendor: 1,363 bytes, line 38
38if(Ht(ie)||oe(ie))return D=D.get(U)||null,X(R,D,ie,_e,null);Ul(R,ie)}return null}function be(D,R,U,ie){for(var _e=null,ze=null,Me=R,$e=R=0,Yt=null;Me!==null&&$e<U.length;$e++){Me.index>$e?(Yt=Me,Me=null):Yt=Me.sibling;var lt=K(D,Me,U[$e],ie);if(lt===null){Me===null&&(Me=Yt);break}e&&Me&&lt.alternate===null&&n(D,Me),R=p(lt,R,$e),ze===null?_e=lt:ze.sibling=lt,ze=lt,Me=Yt}if($e===U.length)return i(D,Me),Nt&&Lr(D,$e),_e;if(Me===null){for(;$e<U.length;$e++)Me=ne(D,U[$e],ie),Me!==null&&(R=p(Me,R,$e),ze===null?_e=Me:ze.sibling=Me,ze=Me);return Nt&&Lr(D,$e),_e}for(Me=c(D,Me);$e<U.length;$e++)Yt=xe(Me,D,$e,U[$e],ie),Yt!==null&&(e&&Yt.alternate!==null&&Me.delete(Yt.key===null?$e:Yt.key),R=p(Yt,R,$e),ze===null?_e=Yt:ze.sibling=Yt,ze=Yt);return e&&Me.forEach(function(pr){return n(D,pr)}),Nt&&Lr(D,$e),_e}function Se(D,R,U,ie){var _e=oe(U);if(typeof _e!="function")throw Error(a(150));if(U=_e.call(U),U==null)throw Error(a(151));for(var ze=_e=null,Me=R,$e=R=0,Yt=null,lt=U.next();Me!==null&&!lt.done;$e++,lt=U.next()){Me.index>$e?(Yt=Me,Me=null):Yt=Me.sibling;var pr=K(D,Me,lt.value,ie);if(pr===null){Me===null&&(Me=Yt);break}e&&Me&&pr.alternate===null&&n(D,Me),R=p(pr,R,$e),ze===null?_e=pr:ze.sibling=pr,ze=pr,Me=Yt}if(lt.done)return i(D,Me),Nt&&Lr(D,$e),_e;if(Me===null){for(;!lt.done;$e++,lt=U.next())lt=ne(D,lt.value,ie),lt!==null&&(R=p(lt,R,$e),ze===null?_e=lt
vendor: 10,814 bytes, line 38
38:ze.sibling=lt,ze=lt);return Nt&&Lr(D,$e),_e}for(Me=c(D,Me);!lt.done;$e++,lt=U.next())lt=xe(Me,D,$e,lt.value,ie),lt!==null&&(e&&lt.alternate!==null&&Me.delete(lt.key===null?$e:lt.key),R=p(lt,R,$e),ze===null?_e=lt:ze.sibling=lt,ze=lt);return e&&Me.forEach(function(iv){return n(D,iv)}),Nt&&Lr(D,$e),_e}function Rt(D,R,U,ie){if(typeof U=="object"&&U!==null&&U.type===ge&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case W:e:{for(var _e=U.key,ze=R;ze!==null;){if(ze.key===_e){if(_e=U.type,_e===ge){if(ze.tag===7){i(D,ze.sibling),R=d(ze,U.props.children),R.return=D,D=R;break e}}else if(ze.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===Te&&ap(_e)===ze.type){i(D,ze.sibling),R=d(ze,U.props),R.ref=wi(D,ze,U),R.return=D,D=R;break e}i(D,ze);break}else n(D,ze);ze=ze.sibling}U.type===ge?(R=Br(U.props.children,D.mode,ie,U.key),R.return=D,D=R):(ie=co(U.type,U.key,U.props,null,D.mode,ie),ie.ref=wi(D,R,U),ie.return=D,D=ie)}return y(D);case ae:e:{for(ze=U.key;R!==null;){if(R.key===ze)if(R.tag===4&&R.stateNode.containerInfo===U.containerInfo&&R.stateNode.implementation===U.implementation){i(D,R.sibling),R=d(R,U.children||[]),R.return=D,D=R;break e}else{i(D,R);break}else n(D,R);R=R.sibling}R=Uu(U,D.mode,ie),R.return=D,D=R}return y(D);case Te:return ze=U._init,Rt(D,R,ze(U._payload),ie)}if(Ht(U))return be(D,R,U,ie);if(oe(U))return Se(D,R,U,ie);Ul(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"?(U=""+U,R!==null&&R.tag===6?(i(D,R.sibling),R=d(R,U),R.return=D,D=R):(i(D,R),R=Mu(U,D.mode,ie),R.return=D,D=R),y(D)):i(D,R)}return Rt}var _a=ip(!0),lp=ip(!1),Fl=nr(null),$l=null,Ca=null,Zc=null;function Kc(){Zc=Ca=$l=null}function Yc(e){var n=Fl.current;gt(Fl),e._currentValue=n}function Qc(e,n,i){for(;e!==null;){var c=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,c!==null&&(c.childLanes|=n)):c!==null&&(c.childLanes&n)!==n&&(c.childLanes|=n),e===i)break;e=e.return}}function ka(e,n){$l=e,Zc=Ca=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(wn=!0),e.firstContext=null)}function Zn(e){var n=e._currentValue;if(Zc!==e)if(e={context:e,memoizedValue:n,next:null},Ca===null){if($l===null)throw Error(a(308));Ca=e,$l.dependencies={lanes:0,firstContext:e}}else Ca=Ca.next=e;return n}var Ir=null;function Xc(e){Ir===null?Ir=[e]:Ir.push(e)}function op(e,n,i,c){var d=n.interleaved;return d===null?(i.next=i,Xc(n)):(i.next=d.next,d.next=i),n.interleaved=i,zs(e,c)}function zs(e,n){e.lanes|=n;var i=e.alternate;for(i!==null&&(i.lanes|=n),i=e,e=e.return;e!==null;)e.childLanes|=n,i=e.alternate,i!==null&&(i.childLanes|=n),i=e,e=e.return;return i.tag===3?i.stateNode:null}var ar=!1;function Jc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cp(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ms(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function ir(e,n,i){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(at&2)!==0){var d=c.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),c.pending=n,zs(e,i)}return d=c.interleaved,d===null?(n.next=n,Xc(c)):(n.next=d.next,d.next=n),c.interleaved=n,zs(e,i)}function Bl(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194240)!==0)){var c=n.lanes;c&=e.pendingLanes,i|=c,n.lanes=i,ua(e,i)}}function up(e,n){var i=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,i===c)){var d=null,p=null;if(i=i.firstBaseUpdate,i!==null){do{var y={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};p===null?d=p=y:p=p.next=y,i=i.next}while(i!==null);p===null?d=p=n:p=p.next=n}else d=p=n;i={baseState:c.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:c.shared,effects:c.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}function ql(e,n,i,c){var d=e.updateQueue;ar=!1;var p=d.firstBaseUpdate,y=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var k=S,$=k.next;k.next=null,y===null?p=$:y.next=$,y=k;var X=e.alternate;X!==null&&(X=X.updateQueue,S=X.lastBaseUpdate,S!==y&&(S===null?X.firstBaseUpdate=$:S.next=$,X.lastBaseUpdate=k))}if(p!==null){var ne=d.baseState;y=0,X=$=k=null,S=p;do{var K=S.lane,xe=S.eventTime;if((c&K)===K){X!==null&&(X=X.next={eventTime:xe,lane:0,tag:S.tag,payload:S.payload,callback:S.callback,next:null});e:{var be=e,Se=S;switch(K=n,xe=i,Se.tag){case 1:if(be=Se.payload,typeof be=="function"){ne=be.call(xe,ne,K);break e}ne=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Se.payload,K=typeof be=="function"?be.call(xe,ne,K):be,K==null)break e;ne=Q({},ne,K);break e;case 2:ar=!0}}S.callback!==null&&S.lane!==0&&(e.flags|=64,K=d.effects,K===null?d.effects=[S]:K.push(S))}else xe={eventTime:xe,lane:K,tag:S.tag,payload:S.payload,callback:S.callback,next:null},X===null?($=X=xe,k=ne):X=X.next=xe,y|=K;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;K=S,S=K.next,K.next=null,d.lastBaseUpdate=K,d.shared.pending=null}}while(!0);if(X===null&&(k=ne),d.baseState=k,d.firstBaseUpdate=$,d.lastBaseUpdate=X,n=d.shared.interleaved,n!==null){d=n;do y|=d.lane,d=d.next;while(d!==n)}else p===null&&(d.shared.lanes=0);Mr|=y,e.lanes=y,e.memoizedState=ne}}function dp(e,n,i){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var c=e[n],d=c.callback;if(d!==null){if(c.callback=null,c=i,typeof d!="function")throw Error(a(191,d));d.call(c)}}}var Si={},js=nr(Si),_i=nr(Si),Ci=nr(Si);function Dr(e){if(e===Si)throw Error(a(174));return e}function eu(e,n){switch(pt(Ci,n),pt(_i,e),pt(js,Si),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Pe(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Pe(n,e)}gt(js),pt(js,n)}function Ea(){gt(js),gt(_i),gt(Ci)}function mp(e){Dr(Ci.current);var n=Dr(js.current),i=Pe(n,e.type);n!==i&&(pt(_i,e),pt(js,i))}function tu(e){_i.current===e&&(gt(js),gt(_i))}var St=nr(0);function Vl(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var nu=[];function su(){for(var e=0;e<nu.length;e++)nu[e]._workInProgressVersionPrimary=null;nu.length=0}var Hl=O.ReactCurrentDispatcher,ru=O.ReactCurrentBatchConfig,zr=0,_t=null,$t=null,Zt=null,Wl=!1,ki=!1,Ei=0,Ey=0;function un(){throw Error(a(321))}function au(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!as(e[i],n[i]))return!1;return!0}function iu(e,n,i,c,d,p){if(zr=p,_t=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Hl.current=e===null||e.memoizedState===null?Ay:Oy,e=i(c,d),ki){p=0;do{if(ki=!1,Ei=0,25<=p)throw Error(a(301));p+=1,Zt=$t=null,n.updateQueue=null,Hl.current=Ly,e=i(c,d)}while(ki)}if(Hl.current=Kl,n=$t!==null&&$t.next!==null,zr=0,Zt=$t=_t=null,Wl=!1,n)throw Error(a(300));return e}function lu(){var e=Ei!==0;return Ei=0,e}function Ns(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?_t.memoizedState=Zt=e:Zt=Zt.next=e,Zt}function Kn(){if($t===null){var e=_t.alternate;e=e!==null?e.memoizedState:null}else e=$t.next;var n=Zt===null?_t.memoizedState:Zt.next;if(n!==null)Zt=n,$t=e;else{if(e===null)throw Error(a(310));$t=e,e={memoizedState:$t.memoizedState,baseState:$t.baseState,baseQueue:$t.baseQueue,queue:$t.queue,next:null},Zt===null?_t.memoizedState=Zt=e:Zt=Zt.next=e}return Zt}function Ti(e,n){return typeof n=="function"?n(e):n}function ou(e){var n=Kn(),i=n.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=e;var c=$t,d=c.baseQueue,p=i.pending;if(p!==null){if(d!==null){var y=d.next;d.next=p.next,p.next=y}c.baseQueue=d=p,i.pending=null}if(d!==null){p=d.next,c=c.baseState;var S=y=null,k=null,$=p;do{var X=$.lane;if((zr&X)===X)k!==null&&(k=k.next={lane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),c=$.hasEagerState?$.eagerState:e(c,$.action);else{var ne={lane:X,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null};k===null?(S=k=ne,y=c):k=k.next=ne,_t.lanes|=X,Mr|=X}$=$.next}while($!==null&&$!==p);k===null?y=c:k.next=S,as(c,n.memoizedState)||(wn=!0),n.memoizedState=c,n.baseState=y,n.baseQueue=k,i.lastRenderedState=c}if(e=i.interleaved,e!==null){d=e;do p=d.lane,_t.lanes|=p,Mr|=p,d=d.next;while(d!==e)}else d===null&&(i.lanes=0);return[n.memoizedState,i.dispatch]}function cu(e){var n=Kn(),i=n.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=e;var c=i.dispatch,d=i.pending,p=n.memoizedState;if(d!==null){i.pending=null;var y=d=d.next;do p=e(p,y.action),y=y.next;while(y!==d);as(p,n.memoizedState)||(wn=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),i.lastRenderedState=p}return[p,c]}function pp(){}function fp(e,n){var i=_t,c=Kn(),d=n(),p=!as(c.memoizedState,d);if(p&&(c.memoizedState=d,wn=!0),c=c.queue,uu(gp.bind(null,i,c,e),[e]),c.getSnapshot!==n||p||Zt!==null&&Zt.memoizedState.tag&1){if(i.flags|=2048,Pi(9,xp.bind(null,i,c,d,n),void 0,null),Kt===null)throw Error(a(349));(zr&30)!==0||hp(i,n,d)}return d}function hp(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=_t.updateQueue,n===null?(n={lastEffect:null,stores:null},_t.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function xp(e,n,i,c){n.value=i,n.getSnapshot=c,yp(n)&&vp(e)}function gp(e,n,i){return i(function(){yp(n)&&vp(e)})}function yp(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!as(e,i)}catch{return!0}}function vp(e){var n=zs(e,1);n!==null&&us(n,e,1,-1)}function bp(e){var n=Ns();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:e},n.queue=e,e=e.dispatch=Ry.bind(null,_t,e),[n.memoizedState,e]}function Pi(e,n,i,c){return e={tag:e,create:n,destroy:i,deps:c,next:null},n=_t.updateQueue,n===null?(n={lastEffect:null,stores:null},_t.updateQueue=n,n.lastEffect=e.next=e):(i=n.lastEffect,i===null?n.lastEffect=e.next=e:(c=i.next,i.next=e,e.next=c,n.lastEffect=e)),e}function jp(){return Kn().memoizedState}function Gl(e,n,i,c){var d=Ns();_t.flags|=e,d.memoizedState=Pi(1|n,i,void 0,c===void 0?null:c)}function Zl(e,n,i,c){var d=Kn();c=c===void 0?null:c;var p=void 0;if($t!==null){var y=$t.memoizedState;if(p=y.destroy,c!==null&&au(c,y.deps)){d.memoizedState=Pi(n,i,p,c);return}}_t.flags|=e,d.memoizedState=Pi(1|n,i,p,c)}
vendor: 2,433 bytes, line 38
38function Np(e,n){return Gl(8390656,8,e,n)}function uu(e,n){return Zl(2048,8,e,n)}function wp(e,n){return Zl(4,2,e,n)}function Sp(e,n){return Zl(4,4,e,n)}function _p(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Cp(e,n,i){return i=i!=null?i.concat([e]):null,Zl(4,4,_p.bind(null,n,e),i)}function du(){}function kp(e,n){var i=Kn();n=n===void 0?null:n;var c=i.memoizedState;return c!==null&&n!==null&&au(n,c[1])?c[0]:(i.memoizedState=[e,n],e)}function Ep(e,n){var i=Kn();n=n===void 0?null:n;var c=i.memoizedState;return c!==null&&n!==null&&au(n,c[1])?c[0]:(e=e(),i.memoizedState=[e,n],e)}function Tp(e,n,i){return(zr&21)===0?(e.baseState&&(e.baseState=!1,wn=!0),e.memoizedState=i):(as(i,n)||(i=hl(),_t.lanes|=i,Mr|=i,e.baseState=!0),n)}function Ty(e,n){var i=ct;ct=i!==0&&4>i?i:4,e(!0);var c=ru.transition;ru.transition={};try{e(!1),n()}finally{ct=i,ru.transition=c}}function Pp(){return Kn().memoizedState}function Py(e,n,i){var c=ur(e);if(i={lane:c,action:i,hasEagerState:!1,eagerState:null,next:null},Rp(e))Ap(n,i);else if(i=op(e,n,i,c),i!==null){var d=vn();us(i,e,c,d),Op(i,n,c)}}function Ry(e,n,i){var c=ur(e),d={lane:c,action:i,hasEagerState:!1,eagerState:null,next:null};if(Rp(e))Ap(n,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var y=n.lastRenderedState,S=p(y,i);if(d.hasEagerState=!0,d.eagerState=S,as(S,y)){var k=n.interleaved;k===null?(d.next=d,Xc(n)):(d.next=k.next,k.next=d),n.interleaved=d;return}}catch{}finally{}i=op(e,n,d,c),i!==null&&(d=vn(),us(i,e,c,d),Op(i,n,c))}}function Rp(e){var n=e.alternate;return e===_t||n!==null&&n===_t}function Ap(e,n){ki=Wl=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function Op(e,n,i){if((i&4194240)!==0){var c=n.lanes;c&=e.pendingLanes,i|=c,n.lanes=i,ua(e,i)}}var Kl={readContext:Zn,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useInsertionEffect:un,useLayoutEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useMutableSource:un,useSyncExternalStore:un,useId:un,unstable_isNewReconciler:!1},Ay={readContext:Zn,useCallback:function(e,n){return Ns().memoizedState=[e,n===void 0?null:n],e},useContext:Zn,useEffect:Np,useImperativeHandle:function(e,n,i){return i=i!=null?i.concat([e]):null,Gl(4194308,4,_p.bind(null,n,e),i)}
vendor: 7,910 bytes, lines 38-40
38,useLayoutEffect:function(e,n){return Gl(4194308,4,e,n)},useInsertionEffect:function(e,n){return Gl(4,2,e,n)},useMemo:function(e,n){var i=Ns();return n=n===void 0?null:n,e=e(),i.memoizedState=[e,n],e},useReducer:function(e,n,i){var c=Ns();return n=i!==void 0?i(n):n,c.memoizedState=c.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},c.queue=e,e=e.dispatch=Py.bind(null,_t,e),[c.memoizedState,e]},useRef:function(e){var n=Ns();return e={current:e},n.memoizedState=e},useState:bp,useDebugValue:du,useDeferredValue:function(e){return Ns().memoizedState=e},useTransition:function(){var e=bp(!1),n=e[0];return e=Ty.bind(null,e[1]),Ns().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,i){var c=_t,d=Ns();if(Nt){if(i===void 0)throw Error(a(407));i=i()}else{if(i=n(),Kt===null)throw Error(a(349));(zr&30)!==0||hp(c,n,i)}d.memoizedState=i;var p={value:i,getSnapshot:n};return d.queue=p,Np(gp.bind(null,c,p,e),[e]),c.flags|=2048,Pi(9,xp.bind(null,c,p,i,n),void 0,null),i},useId:function(){var e=Ns(),n=Kt.identifierPrefix;if(Nt){var i=Ds,c=Is;i=(c&~(1<<32-An(c)-1)).toString(32)+i,n=":"+n+"R"+i,i=Ei++,0<i&&(n+="H"+i.toString(32)),n+=":"}else i=Ey++,n=":"+n+"r"+i.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Oy={readContext:Zn,useCallback:kp,useContext:Zn,useEffect:uu,useImperativeHandle:Cp,useInsertionEffect:wp,useLayoutEffect:Sp,useMemo:Ep,useReducer:ou,useRef:jp,useState:function(){return ou(Ti)},useDebugValue:du,useDeferredValue:function(e){var n=Kn();return Tp(n,$t.memoizedState,e)},useTransition:function(){var e=ou(Ti)[0],n=Kn().memoizedState;return[e,n]},useMutableSource:pp,useSyncExternalStore:fp,useId:Pp,unstable_isNewReconciler:!1},Ly={readContext:Zn,useCallback:kp,useContext:Zn,useEffect:uu,useImperativeHandle:Cp,useInsertionEffect:wp,useLayoutEffect:Sp,useMemo:Ep,useReducer:cu,useRef:jp,useState:function(){return cu(Ti)},useDebugValue:du,useDeferredValue:function(e){var n=Kn();return $t===null?n.memoizedState=e:Tp(n,$t.memoizedState,e)},useTransition:function(){var e=cu(Ti)[0],n=Kn().memoizedState;return[e,n]},useMutableSource:pp,useSyncExternalStore:fp,useId:Pp,unstable_isNewReconciler:!1};function ls(e,n){if(e&&e.defaultProps){n=Q({},n),e=e.defaultProps;for(var i in e)n[i]===void 0&&(n[i]=e[i]);return n}return n}function mu(e,n,i,c){n=e.memoizedState,i=i(c,n),i=i==null?n:Q({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Yl={isMounted:function(e){return(e=e._reactInternals)?Rs(e)===e:!1},enqueueSetState:function(e,n,i){e=e._reactInternals;var c=vn(),d=ur(e),p=Ms(c,d);p.payload=n,i!=null&&(p.callback=i),n=ir(e,p,d),n!==null&&(us(n,e,d,c),Bl(n,e,d))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var c=vn(),d=ur(e),p=Ms(c,d);p.tag=1,p.payload=n,i!=null&&(p.callback=i),n=ir(e,p,d),n!==null&&(us(n,e,d,c),Bl(n,e,d))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=vn(),c=ur(e),d=Ms(i,c);d.tag=2,n!=null&&(d.callback=n),n=ir(e,d,c),n!==null&&(us(n,e,c,i),Bl(n,e,c))}};function Lp(e,n,i,c,d,p,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(c,p,y):n.prototype&&n.prototype.isPureReactComponent?!xi(i,c)||!xi(d,p):!0}function Ip(e,n,i){var c=!1,d=sr,p=n.contextType;return typeof p=="object"&&p!==null?p=Zn(p):(d=Nn(n)?Ar:cn.current,c=n.contextTypes,p=(c=c!=null)?ja(e,d):sr),n=new n(i,p),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Yl,e.stateNode=n,n._reactInternals=e,c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=d,e.__reactInternalMemoizedMaskedChildContext=p),n}function Dp(e,n,i,c){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,c),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,c),n.state!==e&&Yl.enqueueReplaceState(n,n.state,null)}function pu(e,n,i,c){var d=e.stateNode;d.props=i,d.state=e.memoizedState,d.refs={},Jc(e);var p=n.contextType;typeof p=="object"&&p!==null?d.context=Zn(p):(p=Nn(n)?Ar:cn.current,d.context=ja(e,p)),d.state=e.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(mu(e,n,p,i),d.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(n=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),n!==d.state&&Yl.enqueueReplaceState(d,d.state,null),ql(e,i,d,c),d.state=e.memoizedState),typeof d.componentDidMount=="function"&&(e.flags|=4194308)}function Ta(e,n){try{var i="",c=n;do i+=Be(c),c=c.return;while(c);var d=i}catch(p){d=`
39Error generating stack: `+p.message+`
40`+p.stack}return{value:e,source:n,stack:d,digest:null}}function fu(e,n,i){return{value:e,source:null,stack:i??null,digest:n??null}}function hu(e,n){try{console.error(n.value)}catch(i){setTimeout(function(){throw i})}}var Iy=typeof WeakMap=="function"?WeakMap:Map;function zp(e,n,i){i=Ms(-1,i),i.tag=3,i.payload={element:null};var c=n.value;return i.callback=function(){so||(so=!0,Pu=c),hu(e,n)},i}function Mp(e,n,i){i=Ms(-1,i),i.tag=3;var c=e.type.getDerivedStateFromError;if(typeof c=="function"){var d=n.value;i.payload=function(){return c(d)},i.callback=function(){hu(e,n)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(i.callback=function(){hu(e,n),typeof c!="function"&&(or===null?or=new Set([this]):or.add(this));var y=n.stack;this.componentDidCatch(n.value,{componentStack:y!==null?y:""})}),i}function Up(e,n,i){var c=e.pingCache;if(c===null){c=e.pingCache=new Iy;var d=new Set;c.set(n,d)}else d=c.get(n),d===void 0&&(d=new Set,c.set(n,d));d.has(i)||(d.add(i),e=Ky.bind(null,e,n,i),n.then(e,e))}function Fp(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function $p(e,n,i,c,d){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(n=Ms(-1,1),n.tag=2,ir(i,n,1))),i.lanes|=1),e):(e.flags|=65536,e.lanes=d,e)}var Dy=O.ReactCurrentOwner,wn=!1;function yn(e,n,i,c){n.child=e===null?lp(n,null,i,c):_a(n,e.child,i,c)}function Bp(e,n,i,c,d){i=i.render;var p=n.ref;return ka(n,d),c=iu(e,n,i,c,p,d),i=lu(),e!==null&&!wn?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,Us(e,n,d)):(Nt&&i&&qc(n),n.flags|=1,yn(e,n,c,d),n.child)}function qp(e,n,i,c,d){if(e===null){var p=i.type;return typeof p=="function"&&!zu(p)&&p.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(n.tag=15,n.type=p,Vp(e,n,p,c,d)):(e=co(i.type,null,c,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,(e.lanes&d)===0){var y=p.memoizedProps;if(i=i.compare,i=i!==null?i:xi,i(y,c)&&e.ref===n.ref)return Us(e,n,d)}return n.flags|=1,e=mr(p,c),e.ref=n.ref,e.return=n,n.child=e}function Vp(e,n,i,c,d){if(e!==null){var p=e.memoizedProps;if(xi(p,c)&&e.ref===n.ref)if(wn=!1,n.pendingProps=c=p,(e.lanes&d)!==0)(e.flags&131072)!==0&&(wn=!0);else return n.lanes=e.lanes,Us(e,n,d)}return xu(e,n,i,c,d)}function Hp(e,n,i){var c=n.pendingProps,d=c.children,p=e!==null?e.memoizedState:null;if(c.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},pt(Ra,Dn),Dn|=i;else{if((i&1073741824)===0)return e=p!==null?p.baseLanes|i:i,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,pt(Ra,Dn),Dn|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=p!==null?p.baseLanes:i,pt(Ra,Dn),Dn|=c}else p!==null?(c=p.baseLanes|i,n.memoizedState=null):c=i,pt(Ra,Dn),Dn|=c;return yn(e,n,d,i),n.child}function Wp(e,n){var i=n.ref;(e===null&&i!==null||e!==null&&e.ref!==i)&&(n.flags|=512,n.flags|=2097152)}
vendor: 13,706 bytes, line 40
40function xu(e,n,i,c,d){var p=Nn(i)?Ar:cn.current;return p=ja(n,p),ka(n,d),i=iu(e,n,i,c,p,d),c=lu(),e!==null&&!wn?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,Us(e,n,d)):(Nt&&c&&qc(n),n.flags|=1,yn(e,n,i,d),n.child)}function Gp(e,n,i,c,d){if(Nn(i)){var p=!0;Ll(n)}else p=!1;if(ka(n,d),n.stateNode===null)Xl(e,n),Ip(n,i,c),pu(n,i,c,d),c=!0;else if(e===null){var y=n.stateNode,S=n.memoizedProps;y.props=S;var k=y.context,$=i.contextType;typeof $=="object"&&$!==null?$=Zn($):($=Nn(i)?Ar:cn.current,$=ja(n,$));var X=i.getDerivedStateFromProps,ne=typeof X=="function"||typeof y.getSnapshotBeforeUpdate=="function";ne||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==c||k!==$)&&Dp(n,y,c,$),ar=!1;var K=n.memoizedState;y.state=K,ql(n,c,y,d),k=n.memoizedState,S!==c||K!==k||jn.current||ar?(typeof X=="function"&&(mu(n,i,X,c),k=n.memoizedState),(S=ar||Lp(n,i,S,c,K,k,$))?(ne||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(n.flags|=4194308)):(typeof y.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=c,n.memoizedState=k),y.props=c,y.state=k,y.context=$,c=S):(typeof y.componentDidMount=="function"&&(n.flags|=4194308),c=!1)}else{y=n.stateNode,cp(e,n),S=n.memoizedProps,$=n.type===n.elementType?S:ls(n.type,S),y.props=$,ne=n.pendingProps,K=y.context,k=i.contextType,typeof k=="object"&&k!==null?k=Zn(k):(k=Nn(i)?Ar:cn.current,k=ja(n,k));var xe=i.getDerivedStateFromProps;(X=typeof xe=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==ne||K!==k)&&Dp(n,y,c,k),ar=!1,K=n.memoizedState,y.state=K,ql(n,c,y,d);var be=n.memoizedState;S!==ne||K!==be||jn.current||ar?(typeof xe=="function"&&(mu(n,i,xe,c),be=n.memoizedState),($=ar||Lp(n,i,$,c,K,be,k)||!1)?(X||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,be,k),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,be,k)),typeof y.componentDidUpdate=="function"&&(n.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof y.componentDidUpdate!="function"||S===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),n.memoizedProps=c,n.memoizedState=be),y.props=c,y.state=be,y.context=k,c=$):(typeof y.componentDidUpdate!="function"||S===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),c=!1)}return gu(e,n,i,c,p,d)}function gu(e,n,i,c,d,p){Wp(e,n);var y=(n.flags&128)!==0;if(!c&&!y)return d&&Xm(n,i,!1),Us(e,n,p);c=n.stateNode,Dy.current=n;var S=y&&typeof i.getDerivedStateFromError!="function"?null:c.render();return n.flags|=1,e!==null&&y?(n.child=_a(n,e.child,null,p),n.child=_a(n,null,S,p)):yn(e,n,S,p),n.memoizedState=c.state,d&&Xm(n,i,!0),n.child}function Zp(e){var n=e.stateNode;n.pendingContext?Ym(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Ym(e,n.context,!1),eu(e,n.containerInfo)}function Kp(e,n,i,c,d){return Sa(),Gc(d),n.flags|=256,yn(e,n,i,c),n.child}var yu={dehydrated:null,treeContext:null,retryLane:0};function vu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Yp(e,n,i){var c=n.pendingProps,d=St.current,p=!1,y=(n.flags&128)!==0,S;if((S=y)||(S=e!==null&&e.memoizedState===null?!1:(d&2)!==0),S?(p=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(d|=1),pt(St,d&1),e===null)return Wc(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(y=c.children,e=c.fallback,p?(c=n.mode,p=n.child,y={mode:"hidden",children:y},(c&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=y):p=uo(y,c,0,null),e=Br(e,c,i,null),p.return=n,e.return=n,p.sibling=e,n.child=p,n.child.memoizedState=vu(i),n.memoizedState=yu,e):bu(n,y));if(d=e.memoizedState,d!==null&&(S=d.dehydrated,S!==null))return zy(e,n,y,c,S,d,i);if(p){p=c.fallback,y=n.mode,d=e.child,S=d.sibling;var k={mode:"hidden",children:c.children};return(y&1)===0&&n.child!==d?(c=n.child,c.childLanes=0,c.pendingProps=k,n.deletions=null):(c=mr(d,k),c.subtreeFlags=d.subtreeFlags&14680064),S!==null?p=mr(S,p):(p=Br(p,y,i,null),p.flags|=2),p.return=n,c.return=n,c.sibling=p,n.child=c,c=p,p=n.child,y=e.child.memoizedState,y=y===null?vu(i):{baseLanes:y.baseLanes|i,cachePool:null,transitions:y.transitions},p.memoizedState=y,p.childLanes=e.childLanes&~i,n.memoizedState=yu,c}return p=e.child,e=p.sibling,c=mr(p,{mode:"visible",children:c.children}),(n.mode&1)===0&&(c.lanes=i),c.return=n,c.sibling=null,e!==null&&(i=n.deletions,i===null?(n.deletions=[e],n.flags|=16):i.push(e)),n.child=c,n.memoizedState=null,c}function bu(e,n){return n=uo({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Ql(e,n,i,c){return c!==null&&Gc(c),_a(n,e.child,null,i),e=bu(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function zy(e,n,i,c,d,p,y){if(i)return n.flags&256?(n.flags&=-257,c=fu(Error(a(422))),Ql(e,n,y,c)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(p=c.fallback,d=n.mode,c=uo({mode:"visible",children:c.children},d,0,null),p=Br(p,d,y,null),p.flags|=2,c.return=n,p.return=n,c.sibling=p,n.child=c,(n.mode&1)!==0&&_a(n,e.child,null,y),n.child.memoizedState=vu(y),n.memoizedState=yu,p);if((n.mode&1)===0)return Ql(e,n,y,null);if(d.data==="$!"){if(c=d.nextSibling&&d.nextSibling.dataset,c)var S=c.dgst;return c=S,p=Error(a(419)),c=fu(p,c,void 0),Ql(e,n,y,c)}if(S=(y&e.childLanes)!==0,wn||S){if(c=Kt,c!==null){switch(y&-y){case 4:d=2;break;case 16:d=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:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(c.suspendedLanes|y))!==0?0:d,d!==0&&d!==p.retryLane&&(p.retryLane=d,zs(e,d),us(c,e,d,-1))}return Du(),c=fu(Error(a(421))),Ql(e,n,y,c)}return d.data==="$?"?(n.flags|=128,n.child=e.child,n=Yy.bind(null,e),d._reactRetry=n,null):(e=p.treeContext,In=tr(d.nextSibling),Ln=n,Nt=!0,is=null,e!==null&&(Wn[Gn++]=Is,Wn[Gn++]=Ds,Wn[Gn++]=Or,Is=e.id,Ds=e.overflow,Or=n),n=bu(n,c.children),n.flags|=4096,n)}function Qp(e,n,i){e.lanes|=n;var c=e.alternate;c!==null&&(c.lanes|=n),Qc(e.return,n,i)}function ju(e,n,i,c,d){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:c,tail:i,tailMode:d}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=c,p.tail=i,p.tailMode=d)}function Xp(e,n,i){var c=n.pendingProps,d=c.revealOrder,p=c.tail;if(yn(e,n,c.children,i),c=St.current,(c&2)!==0)c=c&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qp(e,i,n);else if(e.tag===19)Qp(e,i,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}c&=1}if(pt(St,c),(n.mode&1)===0)n.memoizedState=null;else switch(d){case"forwards":for(i=n.child,d=null;i!==null;)e=i.alternate,e!==null&&Vl(e)===null&&(d=i),i=i.sibling;i=d,i===null?(d=n.child,n.child=null):(d=i.sibling,i.sibling=null),ju(n,!1,d,i,p);break;case"backwards":for(i=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&Vl(e)===null){n.child=d;break}e=d.sibling,d.sibling=i,i=d,d=e}ju(n,!0,i,null,p);break;case"together":ju(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Xl(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Us(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),Mr|=n.lanes,(i&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(a(153));if(n.child!==null){for(e=n.child,i=mr(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=mr(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function My(e,n,i){switch(n.tag){case 3:Zp(n),Sa();break;case 5:mp(n);break;case 1:Nn(n.type)&&Ll(n);break;case 4:eu(n,n.stateNode.containerInfo);break;case 10:var c=n.type._context,d=n.memoizedProps.value;pt(Fl,c._currentValue),c._currentValue=d;break;case 13:if(c=n.memoizedState,c!==null)return c.dehydrated!==null?(pt(St,St.current&1),n.flags|=128,null):(i&n.child.childLanes)!==0?Yp(e,n,i):(pt(St,St.current&1),e=Us(e,n,i),e!==null?e.sibling:null);pt(St,St.current&1);break;case 19:if(c=(i&n.childLanes)!==0,(e.flags&128)!==0){if(c)return Xp(e,n,i);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),pt(St,St.current),c)break;return null;case 22:case 23:return n.lanes=0,Hp(e,n,i)}return Us(e,n,i)}var Jp,Nu,ef,tf;Jp=function(e,n){for(var i=n.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},Nu=function(){},ef=function(e,n,i,c){var d=e.memoizedProps;if(d!==c){e=n.stateNode,Dr(js.current);var p=null;switch(i){case"input":d=Le(e,d),c=Le(e,c),p=[];break;case"select":d=Q({},d,{value:void 0}),c=Q({},c,{value:void 0}),p=[];break;case"textarea":d=Wt(e,d),c=Wt(e,c),p=[];break;default:typeof d.onClick!="function"&&typeof c.onClick=="function"&&(e.onclick=Rl)}Es(i,c);var y;i=null;for($ in d)if(!c.hasOwnProperty($)&&d.hasOwnProperty($)&&d[$]!=null)if($==="style"){var S=d[$];for(y in S)S.hasOwnProperty(y)&&(i||(i={}),i[y]="")}else $!=="dangerouslySetInnerHTML"&&$!=="children"&&$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&$!=="autoFocus"&&(o.hasOwnProperty($)?p||(p=[]):(p=p||[]).push($,null));for($ in c){var k=c[$];if(S=d!=null?d[$]:void 0,c.hasOwnProperty($)&&k!==S&&(k!=null||S!=null))if($==="style")if(S){for(y in S)!S.hasOwnProperty(y)||k&&k.hasOwnProperty(y)||(i||(i={}),i[y]="");for(y in k)k.hasOwnProperty(y)&&S[y]!==k[y]&&(i||(i={}),i[y]=k[y])}else i||(p||(p=[]),p.push($,i)),i=k;else $==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,S=S?S.__html:void 0,k!=null&&S!==k&&(p=p||[]).push($,k)):$==="children"?typeof k!="string"&&typeof k!="number"||(p=p||[]).push($,""+k):$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&(o.hasOwnProperty($)?(k!=null&&$==="onScroll"&&xt("scroll",e),p||S===k||(p=[])):(p=p||[]).push($,k))}i&&(p=p||[]).push("style",i);var $=p;(n.updateQueue=$)&&(n.flags|=4)}},tf=function(e,n,i,c){i!==c&&(n.flags|=4)};function Ri(e,n){if(!Nt)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var c=null;i!==null;)i.alternate!==null&&(c=i),i=i.sibling;c===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:c.sibling=null}}function dn(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,c=0;if(n)for(var d=e.child;d!==null;)i|=d.lanes|d.childLanes,c|=d.subtreeFlags&14680064,c|=d.flags&14680064,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)i|=d.lanes|d.childLanes,c|=d.subtreeFlags,c|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=c,e.childLanes=i,n}function Uy(e,n,i){var c=n.pendingProps;switch(Vc(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dn(n),null;case 1:return Nn(n.type)&&Ol(),dn(n),null;case 3:return c=n.stateNode,Ea(),gt(jn),gt(cn),su(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(e===null||e.child===null)&&(Ml(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,is!==null&&(Ou(is),is=null))),Nu(e,n),dn(n),null;case 5:tu(n);var d=Dr(Ci.current);if(i=n.type,e!==null&&n.stateNode!=null)ef(e,n,i,c,d),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!c){if(n.stateNode===null)throw Error(a(166));return dn(n),null}if(e=Dr(js.current),Ml(n)){c=n.stateNode,i=n.type;var p=n.memoizedProps;switch(c[bs]=n,c[ji]=p,e=(n.mode&1)!==0,i){case"dialog":xt("cancel",c),xt("close",c);break;case"iframe":case"object":case"embed":xt("load",c);break;case"video":case"audio":for(d=0;d<yi.length;d++)xt(yi[d],c);break;case"source":xt("error",c);break;case"img":case"image":case"link":xt("error",c),xt("load",c);break;case"details":xt("toggle",c);break;case"input":ut(c,p),xt("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!p.multiple},xt("invalid",c);break;case"textarea":es(c,p),xt("invalid",c)}Es(i,p),d=null;for(var y in p)if(p.hasOwnProperty(y)){var S=p[y];y==="children"?typeof S=="string"?c.textContent!==S&&(p.suppressHydrationWarning!==!0&&Pl(c.textContent,S,e),d=["children",S]):typeof S=="number"&&c.textContent!==""+S&&(p.suppressHydrationWarning!==!0&&Pl(c.textContent,S,e),d=["children",""+S]):o.hasOwnProperty(y)&&S!=null&&y==="onScroll"&&xt("scroll",c)}switch(i){case"input":Ue(c),mt(c,p,!0);break;case"textarea":Ue(c),B(c);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(c.onclick=Rl)}c=d,n.updateQueue=c,c!==null&&(n.flags|=4)}else{y=d.nodeType===9?d:d.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=J(i)),e==="http://www.w3.org/1999/xhtml"?i==="script"?(e=y.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof c.is=="string"?e=y.createElement(i,{is:c.is}):(e=y.createElement(i),i==="select"&&(y=e,c.multiple?y.multiple=!0:c.size&&(y.size=c.size))):e=y.createElementNS(e,i),e[bs]=n,e[ji]=c,Jp(e,n,!1,!1),n.stateNode=e;e:{switch(y=fs(i,c),i){case"dialog":xt("cancel",e),xt("close",e),d=c;break;case"iframe":case"object":case"embed":xt("load",e),d=c;break;case"video":case"audio":for(d=0;d<yi.length;d++)xt(yi[d],e);d=c;break;case"source":xt("error",e),d=c;break;case"img":case"image":case"link":xt("error",e),xt("load",e),d=c;break;case"details":xt("toggle",e),d=c;break;case"input":ut(e,c),d=Le(e,c),xt("invalid",e);break;case"option":d=c;break;case"select":e._wrapperState={wasMultiple:!!c.multiple},d=Q({},c,{value:void 0}),xt("invalid",e);break;case"textarea":es(e,c),d=Wt(e,c),xt("invalid",e);break;default:d=c}Es(i,d),S=d;for(p in S)if(S.hasOwnProperty(p)){var k=S[p];p==="style"?Pn(e,k):p==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,k!=null&&Jt(e,k)):p==="children"?typeof k=="string"?(i!=="textarea"||k!=="")&&xn(e,k):typeof k=="number"&&xn(e,""+k):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(o.hasOwnProperty(p)?k!=null&&p==="onScroll"&&xt("scroll",e):k!=null&&M(e,p,k,y))}switch(i){case"input":Ue(e),mt(e,c,!1);break;case"textarea":Ue(e),B(e);break;case"option":c.value!=null&&e.setAttribute("value",""+Oe(c.value));break;case"select":e.multiple=!!c.multiple,p=c.value,p!=null?vt(e,!!c.multiple,p,!1):c.defaultValue!=null&&vt(e,!!c.multiple,c.defaultValue,!0);break;default:typeof d.onClick=="function"&&(e.onclick=Rl)}switch(i){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return dn(n),null;case 6:if(e&&n.stateNode!=null)tf(e,n,e.memoizedProps,c);else{if(typeof c!="string"&&n.stateNode===null)throw Error(a(166));if(i=Dr(Ci.current),Dr(js.current),Ml(n)){if(c=n.stateNode,i=n.memoizedProps,c[bs]=n,(p=c.nodeValue!==i)&&(e=Ln,e!==null))switch(e.tag){case 3:Pl(c.nodeValue,i,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Pl(c.nodeValue,i,(e.mode&1)!==0)}p&&(n.flags|=4)}else c=(i.nodeType===9?i:i.ownerDocument).createTextNode(c),c[bs]=n,n.stateNode=c}return dn(n),null;case 13:if(gt(St),c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Nt&&In!==null&&(n.mode&1)!==0&&(n.flags&128)===0)rp(),Sa(),n.flags|=98560,p=!1;else if(p=Ml(n),c!==null&&c.dehydrated!==null){if(e===null){if(!p)throw Error(a(318));if(p=n.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[bs]=n}else Sa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dn(n),p=!1}else is!==null&&(Ou(is),is=null),p=!0;if(!p)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=i,n):(c=c!==null,c!==(e!==null&&e.memoizedState!==null)&&c&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(St.current&1)!==0?Bt===0&&(Bt=3):Du())),n.updateQueue!==null&&(n.flags|=4),dn(n),null);case 4:return Ea(),Nu(e,n),e===null&&vi(n.stateNode.containerInfo),dn(n),null;case 10:return Yc(n.type._context),dn(n),null;case 17:return Nn(n.type)&&Ol(),dn(n),null;case 19:if(gt(St),p=n.memoizedState,p===null)return dn(n),null;if(c=(n.flags&128)!==0,y=p.rendering,y===null)if(c)Ri(p,!1);else{if(Bt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(y=Vl(e),y!==null){for(n.flags|=128,Ri(p,!1),c=y.updateQueue,c!==null&&(n.updateQueue=c,n.flags|=4),n.subtreeFlags=0,c=i,i=n.child;i!==null;)p=i,e=c,p.flags&=14680066,y=p.alternate,y===null?(p.childLanes=0,p.lanes=e,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=y.childLanes,p.lanes=y.lanes,p.child=y.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=y.memoizedProps,p.memoizedState=y.memoizedState,p.updateQueue=y.updateQueue,p.type=y.type,e=y.dependencies,p.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),i=i.sibling;return pt(St,St.current&1|2),n.child}e=e.sibling}p.tail!==null&&wt()>Aa&&(n.flags|=128,c=!0,Ri(p,!1),n.lanes=4194304)}else{if(!c)if(e=Vl(y),e!==null){if(n.flags|=128,c=!0,i=e.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),Ri(p,!0),p.tail===null&&p.tailMode==="hidden"&&!y.alternate&&!Nt)return dn(n),null}else 2*wt()-p.renderingStartTime>Aa&&i!==1073741824&&(n.flags|=128,c=!0,Ri(p,!1),n.lanes=4194304);p.isBackwards?(y.sibling=n.child,n.child=y):(i=p.last,i!==null?i.sibling=y:n.child=y,p.last=y)}return p.tail!==null?(n=p.tail,p.rendering=n,p.tail=n.sibling,p.renderingStartTime=wt(),n.sibling=null,i=St.current,pt(St,c?i&1|2:i&1),n):(dn(n),null);case 22:case 23:return Iu(),c=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==c&&(n.flags|=8192),c&&(n.mode&1)!==0?(Dn&1073741824)!==0&&(dn(n),n.subtreeFlags&6&&(n.flags|=8192)):dn(n),null;case 24:return null;case 25:return null}throw Error(a(156,n.tag))}function Fy(e,n){switch(Vc(n),n.tag){case 1:return Nn(n.type)&&Ol(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Ea(),gt(jn),gt(cn),su(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return tu(n),null;case 13:if(gt(St),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(a(340));Sa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return gt(St),null;case 4:return Ea(),null;case 10:return Yc(n.type._context),null;case 22:case 23:return Iu(),null;case 24:return null;default:return null}}var Jl=!1,mn=!1,$y=typeof WeakSet=="function"?WeakSet:Set,ye=null;function Pa(e,n){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(c){Tt(e,n,c)}else i.current=null}function wu(e,n,i){try{i()}catch(c){Tt(e,n,c)}}var nf=!1;function By(e,n){if(Ic=vl,e=Lm(),kc(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var c=i.getSelection&&i.getSelection();if(c&&c.rangeCount!==0){i=c.anchorNode;
vendor: 17,031 bytes, line 40
40var d=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{i.nodeType,p.nodeType}catch{i=null;break e}var y=0,S=-1,k=-1,$=0,X=0,ne=e,K=null;t:for(;;){for(var xe;ne!==i||d!==0&&ne.nodeType!==3||(S=y+d),ne!==p||c!==0&&ne.nodeType!==3||(k=y+c),ne.nodeType===3&&(y+=ne.nodeValue.length),(xe=ne.firstChild)!==null;)K=ne,ne=xe;for(;;){if(ne===e)break t;if(K===i&&++$===d&&(S=y),K===p&&++X===c&&(k=y),(xe=ne.nextSibling)!==null)break;ne=K,K=ne.parentNode}ne=xe}i=S===-1||k===-1?null:{start:S,end:k}}else i=null}i=i||{start:0,end:0}}else i=null;for(Dc={focusedElem:e,selectionRange:i},vl=!1,ye=n;ye!==null;)if(n=ye,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ye=e;else for(;ye!==null;){n=ye;try{var be=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(be!==null){var Se=be.memoizedProps,Rt=be.memoizedState,D=n.stateNode,R=D.getSnapshotBeforeUpdate(n.elementType===n.type?Se:ls(n.type,Se),Rt);D.__reactInternalSnapshotBeforeUpdate=R}break;case 3:var U=n.stateNode.containerInfo;U.nodeType===1?U.textContent="":U.nodeType===9&&U.documentElement&&U.removeChild(U.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(ie){Tt(n,n.return,ie)}if(e=n.sibling,e!==null){e.return=n.return,ye=e;break}ye=n.return}return be=nf,nf=!1,be}function Ai(e,n,i){var c=n.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var d=c=c.next;do{if((d.tag&e)===e){var p=d.destroy;d.destroy=void 0,p!==void 0&&wu(n,i,p)}d=d.next}while(d!==c)}}function eo(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var c=i.create;i.destroy=c()}i=i.next}while(i!==n)}}function Su(e){var n=e.ref;if(n!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof n=="function"?n(e):n.current=e}}function sf(e){var n=e.alternate;n!==null&&(e.alternate=null,sf(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[bs],delete n[ji],delete n[Fc],delete n[Sy],delete n[_y])),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 rf(e){return e.tag===5||e.tag===3||e.tag===4}function af(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rf(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 _u(e,n,i){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?i.nodeType===8?i.parentNode.insertBefore(e,n):i.insertBefore(e,n):(i.nodeType===8?(n=i.parentNode,n.insertBefore(e,i)):(n=i,n.appendChild(e)),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=Rl));else if(c!==4&&(e=e.child,e!==null))for(_u(e,n,i),e=e.sibling;e!==null;)_u(e,n,i),e=e.sibling}function Cu(e,n,i){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(c!==4&&(e=e.child,e!==null))for(Cu(e,n,i),e=e.sibling;e!==null;)Cu(e,n,i),e=e.sibling}var tn=null,os=!1;function lr(e,n,i){for(i=i.child;i!==null;)lf(e,n,i),i=i.sibling}function lf(e,n,i){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount(la,i)}catch{}switch(i.tag){case 5:mn||Pa(i,n);case 6:var c=tn,d=os;tn=null,lr(e,n,i),tn=c,os=d,tn!==null&&(os?(e=tn,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):tn.removeChild(i.stateNode));break;case 18:tn!==null&&(os?(e=tn,i=i.stateNode,e.nodeType===8?Uc(e.parentNode,i):e.nodeType===1&&Uc(e,i),ui(e)):Uc(tn,i.stateNode));break;case 4:c=tn,d=os,tn=i.stateNode.containerInfo,os=!0,lr(e,n,i),tn=c,os=d;break;case 0:case 11:case 14:case 15:if(!mn&&(c=i.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){d=c=c.next;do{var p=d,y=p.destroy;p=p.tag,y!==void 0&&((p&2)!==0||(p&4)!==0)&&wu(i,n,y),d=d.next}while(d!==c)}lr(e,n,i);break;case 1:if(!mn&&(Pa(i,n),c=i.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=i.memoizedProps,c.state=i.memoizedState,c.componentWillUnmount()}catch(S){Tt(i,n,S)}lr(e,n,i);break;case 21:lr(e,n,i);break;case 22:i.mode&1?(mn=(c=mn)||i.memoizedState!==null,lr(e,n,i),mn=c):lr(e,n,i);break;default:lr(e,n,i)}}function of(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new $y),n.forEach(function(c){var d=Qy.bind(null,e,c);i.has(c)||(i.add(c),c.then(d,d))})}}function cs(e,n){var i=n.deletions;if(i!==null)for(var c=0;c<i.length;c++){var d=i[c];try{var p=e,y=n,S=y;e:for(;S!==null;){switch(S.tag){case 5:tn=S.stateNode,os=!1;break e;case 3:tn=S.stateNode.containerInfo,os=!0;break e;case 4:tn=S.stateNode.containerInfo,os=!0;break e}S=S.return}if(tn===null)throw Error(a(160));lf(p,y,d),tn=null,os=!1;var k=d.alternate;k!==null&&(k.return=null),d.return=null}catch($){Tt(d,n,$)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)cf(n,e),n=n.sibling}function cf(e,n){var i=e.alternate,c=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(cs(n,e),ws(e),c&4){try{Ai(3,e,e.return),eo(3,e)}catch(Se){Tt(e,e.return,Se)}try{Ai(5,e,e.return)}catch(Se){Tt(e,e.return,Se)}}break;case 1:cs(n,e),ws(e),c&512&&i!==null&&Pa(i,i.return);break;case 5:if(cs(n,e),ws(e),c&512&&i!==null&&Pa(i,i.return),e.flags&32){var d=e.stateNode;try{xn(d,"")}catch(Se){Tt(e,e.return,Se)}}if(c&4&&(d=e.stateNode,d!=null)){var p=e.memoizedProps,y=i!==null?i.memoizedProps:p,S=e.type,k=e.updateQueue;if(e.updateQueue=null,k!==null)try{S==="input"&&p.type==="radio"&&p.name!=null&&ue(d,p),fs(S,y);var $=fs(S,p);for(y=0;y<k.length;y+=2){var X=k[y],ne=k[y+1];X==="style"?Pn(d,ne):X==="dangerouslySetInnerHTML"?Jt(d,ne):X==="children"?xn(d,ne):M(d,X,ne,$)}switch(S){case"input":dt(d,p);break;case"textarea":ps(d,p);break;case"select":var K=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!p.multiple;var xe=p.value;xe!=null?vt(d,!!p.multiple,xe,!1):K!==!!p.multiple&&(p.defaultValue!=null?vt(d,!!p.multiple,p.defaultValue,!0):vt(d,!!p.multiple,p.multiple?[]:"",!1))}d[ji]=p}catch(Se){Tt(e,e.return,Se)}}break;case 6:if(cs(n,e),ws(e),c&4){if(e.stateNode===null)throw Error(a(162));d=e.stateNode,p=e.memoizedProps;try{d.nodeValue=p}catch(Se){Tt(e,e.return,Se)}}break;case 3:if(cs(n,e),ws(e),c&4&&i!==null&&i.memoizedState.isDehydrated)try{ui(n.containerInfo)}catch(Se){Tt(e,e.return,Se)}break;case 4:cs(n,e),ws(e);break;case 13:cs(n,e),ws(e),d=e.child,d.flags&8192&&(p=d.memoizedState!==null,d.stateNode.isHidden=p,!p||d.alternate!==null&&d.alternate.memoizedState!==null||(Tu=wt())),c&4&&of(e);break;case 22:if(X=i!==null&&i.memoizedState!==null,e.mode&1?(mn=($=mn)||X,cs(n,e),mn=$):cs(n,e),ws(e),c&8192){if($=e.memoizedState!==null,(e.stateNode.isHidden=$)&&!X&&(e.mode&1)!==0)for(ye=e,X=e.child;X!==null;){for(ne=ye=X;ye!==null;){switch(K=ye,xe=K.child,K.tag){case 0:case 11:case 14:case 15:Ai(4,K,K.return);break;case 1:Pa(K,K.return);var be=K.stateNode;if(typeof be.componentWillUnmount=="function"){c=K,i=K.return;try{n=c,be.props=n.memoizedProps,be.state=n.memoizedState,be.componentWillUnmount()}catch(Se){Tt(c,i,Se)}}break;case 5:Pa(K,K.return);break;case 22:if(K.memoizedState!==null){mf(ne);continue}}xe!==null?(xe.return=K,ye=xe):mf(ne)}X=X.sibling}e:for(X=null,ne=e;;){if(ne.tag===5){if(X===null){X=ne;try{d=ne.stateNode,$?(p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(S=ne.stateNode,k=ne.memoizedProps.style,y=k!=null&&k.hasOwnProperty("display")?k.display:null,S.style.display=rn("display",y))}catch(Se){Tt(e,e.return,Se)}}}else if(ne.tag===6){if(X===null)try{ne.stateNode.nodeValue=$?"":ne.memoizedProps}catch(Se){Tt(e,e.return,Se)}}else if((ne.tag!==22&&ne.tag!==23||ne.memoizedState===null||ne===e)&&ne.child!==null){ne.child.return=ne,ne=ne.child;continue}if(ne===e)break e;for(;ne.sibling===null;){if(ne.return===null||ne.return===e)break e;X===ne&&(X=null),ne=ne.return}X===ne&&(X=null),ne.sibling.return=ne.return,ne=ne.sibling}}break;case 19:cs(n,e),ws(e),c&4&&of(e);break;case 21:break;default:cs(n,e),ws(e)}}function ws(e){var n=e.flags;if(n&2){try{e:{for(var i=e.return;i!==null;){if(rf(i)){var c=i;break e}i=i.return}throw Error(a(160))}switch(c.tag){case 5:var d=c.stateNode;c.flags&32&&(xn(d,""),c.flags&=-33);var p=af(e);Cu(e,p,d);break;case 3:case 4:var y=c.stateNode.containerInfo,S=af(e);_u(e,S,y);break;default:throw Error(a(161))}}catch(k){Tt(e,e.return,k)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function qy(e,n,i){ye=e,uf(e)}function uf(e,n,i){for(var c=(e.mode&1)!==0;ye!==null;){var d=ye,p=d.child;if(d.tag===22&&c){var y=d.memoizedState!==null||Jl;if(!y){var S=d.alternate,k=S!==null&&S.memoizedState!==null||mn;S=Jl;var $=mn;if(Jl=y,(mn=k)&&!$)for(ye=d;ye!==null;)y=ye,k=y.child,y.tag===22&&y.memoizedState!==null?pf(d):k!==null?(k.return=y,ye=k):pf(d);for(;p!==null;)ye=p,uf(p),p=p.sibling;ye=d,Jl=S,mn=$}df(e)}else(d.subtreeFlags&8772)!==0&&p!==null?(p.return=d,ye=p):df(e)}}function df(e){for(;ye!==null;){var n=ye;if((n.flags&8772)!==0){var i=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:mn||eo(5,n);break;case 1:var c=n.stateNode;if(n.flags&4&&!mn)if(i===null)c.componentDidMount();else{var d=n.elementType===n.type?i.memoizedProps:ls(n.type,i.memoizedProps);c.componentDidUpdate(d,i.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var p=n.updateQueue;p!==null&&dp(n,p,c);break;case 3:var y=n.updateQueue;if(y!==null){if(i=null,n.child!==null)switch(n.child.tag){case 5:i=n.child.stateNode;break;case 1:i=n.child.stateNode}dp(n,y,i)}break;case 5:var S=n.stateNode;if(i===null&&n.flags&4){i=S;var k=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":k.autoFocus&&i.focus();break;case"img":k.src&&(i.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var $=n.alternate;if($!==null){var X=$.memoizedState;if(X!==null){var ne=X.dehydrated;ne!==null&&ui(ne)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}mn||n.flags&512&&Su(n)}catch(K){Tt(n,n.return,K)}}if(n===e){ye=null;break}if(i=n.sibling,i!==null){i.return=n.return,ye=i;break}ye=n.return}}function mf(e){for(;ye!==null;){var n=ye;if(n===e){ye=null;break}var i=n.sibling;if(i!==null){i.return=n.return,ye=i;break}ye=n.return}}function pf(e){for(;ye!==null;){var n=ye;try{switch(n.tag){case 0:case 11:case 15:var i=n.return;try{eo(4,n)}catch(k){Tt(n,i,k)}break;case 1:var c=n.stateNode;if(typeof c.componentDidMount=="function"){var d=n.return;try{c.componentDidMount()}catch(k){Tt(n,d,k)}}var p=n.return;try{Su(n)}catch(k){Tt(n,p,k)}break;case 5:var y=n.return;try{Su(n)}catch(k){Tt(n,y,k)}}}catch(k){Tt(n,n.return,k)}if(n===e){ye=null;break}var S=n.sibling;if(S!==null){S.return=n.return,ye=S;break}ye=n.return}}var Vy=Math.ceil,to=O.ReactCurrentDispatcher,ku=O.ReactCurrentOwner,Yn=O.ReactCurrentBatchConfig,at=0,Kt=null,It=null,nn=0,Dn=0,Ra=nr(0),Bt=0,Oi=null,Mr=0,no=0,Eu=0,Li=null,Sn=null,Tu=0,Aa=1/0,Fs=null,so=!1,Pu=null,or=null,ro=!1,cr=null,ao=0,Ii=0,Ru=null,io=-1,lo=0;function vn(){return(at&6)!==0?wt():io!==-1?io:io=wt()}function ur(e){return(e.mode&1)===0?1:(at&2)!==0&&nn!==0?nn&-nn:ky.transition!==null?(lo===0&&(lo=hl()),lo):(e=ct,e!==0||(e=window.event,e=e===void 0?16:fm(e.type)),e)}function us(e,n,i,c){if(50<Ii)throw Ii=0,Ru=null,Error(a(185));Xs(e,i,c),((at&2)===0||e!==Kt)&&(e===Kt&&((at&2)===0&&(no|=i),Bt===4&&dr(e,nn)),_n(e,c),i===1&&at===0&&(n.mode&1)===0&&(Aa=wt()+500,Il&&rr()))}function _n(e,n){var i=e.callbackNode;hc(e,n);var c=vs(e,e===Kt?nn:0);if(c===0)i!==null&&si(i),e.callbackNode=null,e.callbackPriority=0;else if(n=c&-c,e.callbackPriority!==n){if(i!=null&&si(i),n===1)e.tag===0?Cy(hf.bind(null,e)):Jm(hf.bind(null,e)),Ny(function(){(at&6)===0&&rr()}),i=null;else{switch(ai(c)){case 1:i=ri;break;case 4:i=rs;break;case 16:i=Tr;break;case 536870912:i=ys;break;default:i=Tr}i=wf(i,ff.bind(null,e))}e.callbackPriority=n,e.callbackNode=i}}function ff(e,n){if(io=-1,lo=0,(at&6)!==0)throw Error(a(327));var i=e.callbackNode;if(Oa()&&e.callbackNode!==i)return null;var c=vs(e,e===Kt?nn:0);if(c===0)return null;if((c&30)!==0||(c&e.expiredLanes)!==0||n)n=oo(e,c);else{n=c;var d=at;at|=2;var p=gf();(Kt!==e||nn!==n)&&(Fs=null,Aa=wt()+500,Fr(e,n));do try{Gy();break}catch(S){xf(e,S)}while(!0);Kc(),to.current=p,at=d,It!==null?n=0:(Kt=null,nn=0,n=Bt)}if(n!==0){if(n===2&&(d=Qs(e),d!==0&&(c=d,n=Au(e,d))),n===1)throw i=Oi,Fr(e,0),dr(e,c),_n(e,wt()),i;if(n===6)dr(e,c);else{if(d=e.current.alternate,(c&30)===0&&!Hy(d)&&(n=oo(e,c),n===2&&(p=Qs(e),p!==0&&(c=p,n=Au(e,p))),n===1))throw i=Oi,Fr(e,0),dr(e,c),_n(e,wt()),i;switch(e.finishedWork=d,e.finishedLanes=c,n){case 0:case 1:throw Error(a(345));case 2:$r(e,Sn,Fs);break;case 3:if(dr(e,c),(c&130023424)===c&&(n=Tu+500-wt(),10<n)){if(vs(e,0)!==0)break;if(d=e.suspendedLanes,(d&c)!==c){vn(),e.pingedLanes|=e.suspendedLanes&d;break}e.timeoutHandle=Mc($r.bind(null,e,Sn,Fs),n);break}$r(e,Sn,Fs);break;case 4:if(dr(e,c),(c&4194240)===c)break;for(n=e.eventTimes,d=-1;0<c;){var y=31-An(c);p=1<<y,y=n[y],y>d&&(d=y),c&=~p}if(c=d,c=wt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*Vy(c/1960))-c,10<c){e.timeoutHandle=Mc($r.bind(null,e,Sn,Fs),c);break}$r(e,Sn,Fs);break;case 5:$r(e,Sn,Fs);break;default:throw Error(a(329))}}}return _n(e,wt()),e.callbackNode===i?ff.bind(null,e):null}function Au(e,n){var i=Li;return e.current.memoizedState.isDehydrated&&(Fr(e,n).flags|=256),e=oo(e,n),e!==2&&(n=Sn,Sn=i,n!==null&&Ou(n)),e}function Ou(e){Sn===null?Sn=e:Sn.push.apply(Sn,e)}function Hy(e){for(var n=e;;){if(n.flags&16384){var i=n.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var c=0;c<i.length;c++){var d=i[c],p=d.getSnapshot;d=d.value;try{if(!as(p(),d))return!1}catch{return!1}}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function dr(e,n){for(n&=~Eu,n&=~no,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var i=31-An(n),c=1<<i;e[i]=-1,n&=~c}}function hf(e){if((at&6)!==0)throw Error(a(327));Oa();var n=vs(e,0);if((n&1)===0)return _n(e,wt()),null;var i=oo(e,n);if(e.tag!==0&&i===2){var c=Qs(e);c!==0&&(n=c,i=Au(e,c))}if(i===1)throw i=Oi,Fr(e,0),dr(e,n),_n(e,wt()),i;if(i===6)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,$r(e,Sn,Fs),_n(e,wt()),null}function Lu(e,n){var i=at;at|=1;try{return e(n)}finally{at=i,at===0&&(Aa=wt()+500,Il&&rr())}}function Ur(e){cr!==null&&cr.tag===0&&(at&6)===0&&Oa();var n=at;at|=1;var i=Yn.transition,c=ct;try{if(Yn.transition=null,ct=1,e)return e()}finally{ct=c,Yn.transition=i,at=n,(at&6)===0&&rr()}}function Iu(){Dn=Ra.current,gt(Ra)}function Fr(e,n){e.finishedWork=null,e.finishedLanes=0;var i=e.timeoutHandle;if(i!==-1&&(e.timeoutHandle=-1,jy(i)),It!==null)for(i=It.return;i!==null;){var c=i;switch(Vc(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Ol();break;case 3:Ea(),gt(jn),gt(cn),su();break;case 5:tu(c);break;case 4:Ea();break;case 13:gt(St);break;case 19:gt(St);break;case 10:Yc(c.type._context);break;case 22:case 23:Iu()}i=i.return}if(Kt=e,It=e=mr(e.current,null),nn=Dn=n,Bt=0,Oi=null,Eu=no=Mr=0,Sn=Li=null,Ir!==null){for(n=0;n<Ir.length;n++)if(i=Ir[n],c=i.interleaved,c!==null){i.interleaved=null;var d=c.next,p=i.pending;if(p!==null){var y=p.next;p.next=d,c.next=y}i.pending=c}Ir=null}return e}function xf(e,n){do{var i=It;try{if(Kc(),Hl.current=Kl,Wl){for(var c=_t.memoizedState;c!==null;){var d=c.queue;d!==null&&(d.pending=null),c=c.next}Wl=!1}if(zr=0,Zt=$t=_t=null,ki=!1,Ei=0,ku.current=null,i===null||i.return===null){Bt=1,Oi=n,It=null;break}e:{var p=e,y=i.return,S=i,k=n;if(n=nn,S.flags|=32768,k!==null&&typeof k=="object"&&typeof k.then=="function"){var $=k,X=S,ne=X.tag;if((X.mode&1)===0&&(ne===0||ne===11||ne===15)){var K=X.alternate;K?(X.updateQueue=K.updateQueue,X.memoizedState=K.memoizedState,X.lanes=K.lanes):(X.updateQueue=null,X.memoizedState=null)}var xe=Fp(y);if(xe!==null){xe.flags&=-257,$p(xe,y,S,p,n),xe.mode&1&&Up(p,$,n),n=xe,k=$;var be=n.updateQueue;if(be===null){var Se=new Set;Se.add(k),n.updateQueue=Se}else be.add(k);break e}else{if((n&1)===0){Up(p,$,n),Du();break e}k=Error(a(426))}}else if(Nt&&S.mode&1){var Rt=Fp(y);if(Rt!==null){(Rt.flags&65536)===0&&(Rt.flags|=256),$p(Rt,y,S,p,n),Gc(Ta(k,S));break e}}p=k=Ta(k,S),Bt!==4&&(Bt=2),Li===null?Li=[p]:Li.push(p),p=y;do{switch(p.tag){case 3:p.flags|=65536,n&=-n,p.lanes|=n;var D=zp(p,k,n);up(p,D);break e;case 1:S=k;var R=p.type,U=p.stateNode;if((p.flags&128)===0&&(typeof R.getDerivedStateFromError=="function"||U!==null&&typeof U.componentDidCatch=="function"&&(or===null||!or.has(U)))){p.flags|=65536,n&=-n,p.lanes|=n;var ie=Mp(p,S,n);up(p,ie);break e}}p=p.return}while(p!==null)}vf(i)}catch(_e){n=_e,It===i&&i!==null&&(It=i=i.return);continue}break}while(!0)}function gf(){var e=to.current;return to.current=Kl,e===null?Kl:e}function Du(){(Bt===0||Bt===3||Bt===2)&&(Bt=4),Kt===null||(Mr&268435455)===0&&(no&268435455)===0||dr(Kt,nn)}
vendor: 6,834 bytes, line 40
40function oo(e,n){var i=at;at|=2;var c=gf();(Kt!==e||nn!==n)&&(Fs=null,Fr(e,n));do try{Wy();break}catch(d){xf(e,d)}while(!0);if(Kc(),at=i,to.current=c,It!==null)throw Error(a(261));return Kt=null,nn=0,Bt}function Wy(){for(;It!==null;)yf(It)}function Gy(){for(;It!==null&&!dl();)yf(It)}function yf(e){var n=Nf(e.alternate,e,Dn);e.memoizedProps=e.pendingProps,n===null?vf(e):It=n,ku.current=null}function vf(e){var n=e;do{var i=n.alternate;if(e=n.return,(n.flags&32768)===0){if(i=Uy(i,n,Dn),i!==null){It=i;return}}else{if(i=Fy(i,n),i!==null){i.flags&=32767,It=i;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Bt=6,It=null;return}}if(n=n.sibling,n!==null){It=n;return}It=n=e}while(n!==null);Bt===0&&(Bt=5)}function $r(e,n,i){var c=ct,d=Yn.transition;try{Yn.transition=null,ct=1,Zy(e,n,i,c)}finally{Yn.transition=d,ct=c}return null}function Zy(e,n,i,c){do Oa();while(cr!==null);if((at&6)!==0)throw Error(a(327));i=e.finishedWork;var d=e.finishedLanes;if(i===null)return null;if(e.finishedWork=null,e.finishedLanes=0,i===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var p=i.lanes|i.childLanes;if(xl(e,p),e===Kt&&(It=Kt=null,nn=0),(i.subtreeFlags&2064)===0&&(i.flags&2064)===0||ro||(ro=!0,wf(Tr,function(){return Oa(),null})),p=(i.flags&15990)!==0,(i.subtreeFlags&15990)!==0||p){p=Yn.transition,Yn.transition=null;var y=ct;ct=1;var S=at;at|=4,ku.current=null,By(e,i),cf(i,e),fy(Dc),vl=!!Ic,Dc=Ic=null,e.current=i,qy(i),pc(),at=S,ct=y,Yn.transition=p}else e.current=i;if(ro&&(ro=!1,cr=e,ao=d),p=e.pendingLanes,p===0&&(or=null),ml(i.stateNode),_n(e,wt()),n!==null)for(c=e.onRecoverableError,i=0;i<n.length;i++)d=n[i],c(d.value,{componentStack:d.stack,digest:d.digest});if(so)throw so=!1,e=Pu,Pu=null,e;return(ao&1)!==0&&e.tag!==0&&Oa(),p=e.pendingLanes,(p&1)!==0?e===Ru?Ii++:(Ii=0,Ru=e):Ii=0,rr(),null}function Oa(){if(cr!==null){var e=ai(ao),n=Yn.transition,i=ct;try{if(Yn.transition=null,ct=16>e?16:e,cr===null)var c=!1;else{if(e=cr,cr=null,ao=0,(at&6)!==0)throw Error(a(331));var d=at;for(at|=4,ye=e.current;ye!==null;){var p=ye,y=p.child;if((ye.flags&16)!==0){var S=p.deletions;if(S!==null){for(var k=0;k<S.length;k++){var $=S[k];for(ye=$;ye!==null;){var X=ye;switch(X.tag){case 0:case 11:case 15:Ai(8,X,p)}var ne=X.child;if(ne!==null)ne.return=X,ye=ne;else for(;ye!==null;){X=ye;var K=X.sibling,xe=X.return;if(sf(X),X===$){ye=null;break}if(K!==null){K.return=xe,ye=K;break}ye=xe}}}var be=p.alternate;if(be!==null){var Se=be.child;if(Se!==null){be.child=null;do{var Rt=Se.sibling;Se.sibling=null,Se=Rt}while(Se!==null)}}ye=p}}if((p.subtreeFlags&2064)!==0&&y!==null)y.return=p,ye=y;else e:for(;ye!==null;){if(p=ye,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:Ai(9,p,p.return)}var D=p.sibling;if(D!==null){D.return=p.return,ye=D;break e}ye=p.return}}var R=e.current;for(ye=R;ye!==null;){y=ye;var U=y.child;if((y.subtreeFlags&2064)!==0&&U!==null)U.return=y,ye=U;else e:for(y=R;ye!==null;){if(S=ye,(S.flags&2048)!==0)try{switch(S.tag){case 0:case 11:case 15:eo(9,S)}}catch(_e){Tt(S,S.return,_e)}if(S===y){ye=null;break e}var ie=S.sibling;if(ie!==null){ie.return=S.return,ye=ie;break e}ye=S.return}}if(at=d,rr(),gn&&typeof gn.onPostCommitFiberRoot=="function")try{gn.onPostCommitFiberRoot(la,e)}catch{}c=!0}return c}finally{ct=i,Yn.transition=n}}return!1}function bf(e,n,i){n=Ta(i,n),n=zp(e,n,1),e=ir(e,n,1),n=vn(),e!==null&&(Xs(e,1,n),_n(e,n))}function Tt(e,n,i){if(e.tag===3)bf(e,e,i);else for(;n!==null;){if(n.tag===3){bf(n,e,i);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(or===null||!or.has(c))){e=Ta(i,e),e=Mp(n,e,1),n=ir(n,e,1),e=vn(),n!==null&&(Xs(n,1,e),_n(n,e));break}}n=n.return}}function Ky(e,n,i){var c=e.pingCache;c!==null&&c.delete(n),n=vn(),e.pingedLanes|=e.suspendedLanes&i,Kt===e&&(nn&i)===i&&(Bt===4||Bt===3&&(nn&130023424)===nn&&500>wt()-Tu?Fr(e,0):Eu|=i),_n(e,n)}function jf(e,n){n===0&&((e.mode&1)===0?n=1:(n=As,As<<=1,(As&130023424)===0&&(As=4194304)));var i=vn();e=zs(e,n),e!==null&&(Xs(e,n,i),_n(e,i))}function Yy(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),jf(e,i)}function Qy(e,n){var i=0;switch(e.tag){case 13:var c=e.stateNode,d=e.memoizedState;d!==null&&(i=d.retryLane);break;case 19:c=e.stateNode;break;default:throw Error(a(314))}c!==null&&c.delete(n),jf(e,i)}var Nf;Nf=function(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps||jn.current)wn=!0;else{if((e.lanes&i)===0&&(n.flags&128)===0)return wn=!1,My(e,n,i);wn=(e.flags&131072)!==0}else wn=!1,Nt&&(n.flags&1048576)!==0&&ep(n,zl,n.index);switch(n.lanes=0,n.tag){case 2:var c=n.type;Xl(e,n),e=n.pendingProps;var d=ja(n,cn.current);ka(n,i),d=iu(null,n,c,e,d,i);var p=lu();return n.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,Nn(c)?(p=!0,Ll(n)):p=!1,n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,Jc(n),d.updater=Yl,n.stateNode=d,d._reactInternals=n,pu(n,c,e,i),n=gu(null,n,c,!0,p,i)):(n.tag=0,Nt&&p&&qc(n),yn(null,n,d,i),n=n.child),n;case 16:c=n.elementType;e:{switch(Xl(e,n),e=n.pendingProps,d=c._init,c=d(c._payload),n.type=c,d=n.tag=Jy(c),e=ls(c,e),d){case 0:n=xu(null,n,c,e,i);break e;case 1:n=Gp(null,n,c,e,i);break e;case 11:n=Bp(null,n,c,e,i);break e;case 14:n=qp(null,n,c,ls(c.type,e),i);break e}throw Error(a(306,c,""))}return n;case 0:return c=n.type,d=n.pendingProps,d=n.elementType===c?d:ls(c,d),xu(e,n,c,d,i);case 1:return c=n.type,d=n.pendingProps,d=n.elementType===c?d:ls(c,d),Gp(e,n,c,d,i);case 3:e:{if(Zp(n),e===null)throw Error(a(387));c=n.pendingProps,p=n.memoizedState,d=p.element,cp(e,n),ql(n,c,null,i);var y=n.memoizedState;if(c=y.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){d=Ta(Error(a(423)),n),n=Kp(e,n,c,i,d);break e}else if(c!==d){d=Ta(Error(a(424)),n),n=Kp(e,n,c,i,d);break e}else for(In=tr(n.stateNode.containerInfo.firstChild),Ln=n,Nt=!0,is=null,i=lp(n,null,c,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Sa(),c===d){n=Us(e,n,i);break e}yn(e,n,c,i)}n=n.child}return n;case 5:return mp(n),e===null&&Wc(n),c=n.type,d=n.pendingProps,p=e!==null?e.memoizedProps:null,y=d.children,zc(c,d)?y=null:p!==null&&zc(c,p)&&(n.flags|=32),Wp(e,n),yn(e,n,y,i),n.child;case 6:return e===null&&Wc(n),null;case 13:return Yp(e,n,i);case 4:return eu(n,n.stateNode.containerInfo),c=n.pendingProps,e===null?n.child=_a(n,null,c,i):yn(e,n,c,i),n.child;case 11:return c=n.type,d=n.pendingProps,d=n.elementType===c?d:ls(c,d),Bp(e,n,c,d,i);case 7:return yn(e,n,n.pendingProps,i),n.child;case 8:return yn(e,n,n.pendingProps.children,i),n.child;case 12:return yn(e,n,n.pendingProps.children,i),n.child;
vendor: 9,139 bytes, line 40
40case 10:e:{if(c=n.type._context,d=n.pendingProps,p=n.memoizedProps,y=d.value,pt(Fl,c._currentValue),c._currentValue=y,p!==null)if(as(p.value,y)){if(p.children===d.children&&!jn.current){n=Us(e,n,i);break e}}else for(p=n.child,p!==null&&(p.return=n);p!==null;){var S=p.dependencies;if(S!==null){y=p.child;for(var k=S.firstContext;k!==null;){if(k.context===c){if(p.tag===1){k=Ms(-1,i&-i),k.tag=2;var $=p.updateQueue;if($!==null){$=$.shared;var X=$.pending;X===null?k.next=k:(k.next=X.next,X.next=k),$.pending=k}}p.lanes|=i,k=p.alternate,k!==null&&(k.lanes|=i),Qc(p.return,i,n),S.lanes|=i;break}k=k.next}}else if(p.tag===10)y=p.type===n.type?null:p.child;else if(p.tag===18){if(y=p.return,y===null)throw Error(a(341));y.lanes|=i,S=y.alternate,S!==null&&(S.lanes|=i),Qc(y,i,n),y=p.sibling}else y=p.child;if(y!==null)y.return=p;else for(y=p;y!==null;){if(y===n){y=null;break}if(p=y.sibling,p!==null){p.return=y.return,y=p;break}y=y.return}p=y}yn(e,n,d.children,i),n=n.child}return n;case 9:return d=n.type,c=n.pendingProps.children,ka(n,i),d=Zn(d),c=c(d),n.flags|=1,yn(e,n,c,i),n.child;case 14:return c=n.type,d=ls(c,n.pendingProps),d=ls(c.type,d),qp(e,n,c,d,i);case 15:return Vp(e,n,n.type,n.pendingProps,i);case 17:return c=n.type,d=n.pendingProps,d=n.elementType===c?d:ls(c,d),Xl(e,n),n.tag=1,Nn(c)?(e=!0,Ll(n)):e=!1,ka(n,i),Ip(n,c,d),pu(n,c,d,i),gu(null,n,c,!0,e,i);case 19:return Xp(e,n,i);case 22:return Hp(e,n,i)}throw Error(a(156,n.tag))};function wf(e,n){return aa(e,n)}function Xy(e,n,i,c){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qn(e,n,i,c){return new Xy(e,n,i,c)}function zu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jy(e){if(typeof e=="function")return zu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Y)return 11;if(e===le)return 14}return 2}function mr(e,n){var i=e.alternate;return i===null?(i=Qn(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function co(e,n,i,c,d,p){var y=2;if(c=e,typeof e=="function")zu(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case ge:return Br(i.children,d,p,n);case De:y=8,d|=8;break;case Ne:return e=Qn(12,i,n,d|2),e.elementType=Ne,e.lanes=p,e;case fe:return e=Qn(13,i,n,d),e.elementType=fe,e.lanes=p,e;case Ee:return e=Qn(19,i,n,d),e.elementType=Ee,e.lanes=p,e;case Fe:return uo(i,d,p,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:y=10;break e;case ke:y=9;break e;case Y:y=11;break e;case le:y=14;break e;case Te:y=16,c=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return n=Qn(y,i,n,d),n.elementType=e,n.type=c,n.lanes=p,n}function Br(e,n,i,c){return e=Qn(7,e,c,n),e.lanes=i,e}function uo(e,n,i,c){return e=Qn(22,e,c,n),e.elementType=Fe,e.lanes=i,e.stateNode={isHidden:!1},e}function Mu(e,n,i){return e=Qn(6,e,null,n),e.lanes=i,e}function Uu(e,n,i){return n=Qn(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function ev(e,n,i,c,d){this.tag=n,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=ca(0),this.expirationTimes=ca(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ca(0),this.identifierPrefix=c,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function Fu(e,n,i,c,d,p,y,S,k){return e=new ev(e,n,i,S,k),n===1?(n=1,p===!0&&(n|=8)):n=0,p=Qn(3,null,null,n),e.current=p,p.stateNode=e,p.memoizedState={element:c,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jc(p),e}function tv(e,n,i){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ae,key:c==null?null:""+c,children:e,containerInfo:n,implementation:i}}function Sf(e){if(!e)return sr;e=e._reactInternals;e:{if(Rs(e)!==e||e.tag!==1)throw Error(a(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(Nn(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(a(171))}if(e.tag===1){var i=e.type;if(Nn(i))return Qm(e,i,n)}return n}function _f(e,n,i,c,d,p,y,S,k){return e=Fu(i,c,!0,e,d,p,y,S,k),e.context=Sf(null),i=e.current,c=vn(),d=ur(i),p=Ms(c,d),p.callback=n??null,ir(i,p,d),e.current.lanes=d,Xs(e,d,c),_n(e,c),e}function mo(e,n,i,c){var d=n.current,p=vn(),y=ur(d);return i=Sf(i),n.context===null?n.context=i:n.pendingContext=i,n=Ms(p,y),n.payload={element:e},c=c===void 0?null:c,c!==null&&(n.callback=c),e=ir(d,n,y),e!==null&&(us(e,d,y,p),Bl(e,d,y)),y}function po(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 Cf(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function $u(e,n){Cf(e,n),(e=e.alternate)&&Cf(e,n)}function nv(){return null}var kf=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bu(e){this._internalRoot=e}fo.prototype.render=Bu.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(a(409));mo(e,n,null,null)},fo.prototype.unmount=Bu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Ur(function(){mo(null,e,null,null)}),n[Os]=null}};function fo(e){this._internalRoot=e}fo.prototype.unstable_scheduleHydration=function(e){if(e){var n=Pr();e={blockedOn:null,target:e,priority:n};for(var i=0;i<Je.length&&n!==0&&n<Je[i].priority;i++);Je.splice(i,0,e),i===0&&Gt(e)}};function qu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ho(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ef(){}function sv(e,n,i,c,d){if(d){if(typeof c=="function"){var p=c;c=function(){var $=po(y);p.call($)}}var y=_f(n,c,e,0,null,!1,!1,"",Ef);return e._reactRootContainer=y,e[Os]=y.current,vi(e.nodeType===8?e.parentNode:e),Ur(),y}for(;d=e.lastChild;)e.removeChild(d);if(typeof c=="function"){var S=c;c=function(){var $=po(k);S.call($)}}var k=Fu(e,0,!1,null,null,!1,!1,"",Ef);return e._reactRootContainer=k,e[Os]=k.current,vi(e.nodeType===8?e.parentNode:e),Ur(function(){mo(n,k,i,c)}),k}function xo(e,n,i,c,d){var p=i._reactRootContainer;if(p){var y=p;if(typeof d=="function"){var S=d;d=function(){var k=po(y);S.call(k)}}mo(n,y,e,d)}else y=sv(i,n,e,d,c);return po(y)}gl=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var i=Vn(n.pendingLanes);i!==0&&(ua(n,i|1),_n(n,wt()),(at&6)===0&&(Aa=wt()+500,rr()))}break;case 13:Ur(function(){var c=zs(e,1);if(c!==null){var d=vn();us(c,e,1,d)}}),$u(e,1)}},ii=function(e){if(e.tag===13){var n=zs(e,134217728);if(n!==null){var i=vn();us(n,e,134217728,i)}$u(e,134217728)}},li=function(e){if(e.tag===13){var n=ur(e),i=zs(e,n);if(i!==null){var c=vn();us(i,e,n,c)}$u(e,n)}},Pr=function(){return ct},da=function(e,n){var i=ct;try{return ct=e,n()}finally{ct=i}},Ts=function(e,n,i){switch(n){case"input":if(dt(e,i),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<i.length;n++){var c=i[n];if(c!==e&&c.form===e.form){var d=Al(c);if(!d)throw Error(a(90));nt(c),dt(c,d)}}}break;case"textarea":ps(e,i);break;case"select":n=i.value,n!=null&&vt(e,!!i.multiple,n,!1)}},Ps=Lu,Zs=Ur;var rv={usingClientEntryPoint:!1,Events:[Ni,va,Al,Gs,ra,Lu]},Di={findFiberByHostInstance:Rr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},av={bundleType:Di.bundleType,version:Di.version,rendererPackageName:Di.rendererPackageName,rendererConfig:Di.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ul(e),e===null?null:e.stateNode},findFiberByHostInstance:Di.findFiberByHostInstance||nv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var go=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!go.isDisabled&&go.supportsFiber)try{la=go.inject(av),gn=go}catch{}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rv,Cn.createPortal=function(e,n){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qu(n))throw Error(a(200));return tv(e,n,null,i)},Cn.createRoot=function(e,n){if(!qu(e))throw Error(a(299));var i=!1,c="",d=kf;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onRecoverableError!==void 0&&(d=n.onRecoverableError)),n=Fu(e,1,!1,null,null,i,!1,c,d),e[Os]=n.current,vi(e.nodeType===8?e.parentNode:e),new Bu(n)},Cn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=ul(n),e=e===null?null:e.stateNode,e},Cn.flushSync=function(e){return Ur(e)},Cn.hydrate=function(e,n,i){if(!ho(n))throw Error(a(200));return xo(null,e,n,!0,i)},Cn.hydrateRoot=function(e,n,i){if(!qu(e))throw Error(a(405));var c=i!=null&&i.hydratedSources||null,d=!1,p="",y=kf;if(i!=null&&(i.unstable_strictMode===!0&&(d=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),n=_f(n,null,e,1,i??null,d,!1,p,y),e[Os]=n.current,vi(e),c)for(e=0;e<c.length;e++)i=c[e],d=i._getVersion,d=d(i._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[i,d]:n.mutableSourceEagerHydrationData.push(i,d);return new fo(n)},Cn.render=function(e,n,i){if(!ho(n))throw Error(a(200));return xo(null,e,n,!1,i)},Cn.unmountComponentAtNode=function(e){if(!ho(e))throw Error(a(40));return e._reactRootContainer?(Ur(function(){xo(null,null,e,!1,function(){e._reactRootContainer=null,e[Os]=null})}),!0):!1},Cn.unstable_batchedUpdates=Lu,Cn.unstable_renderSubtreeIntoContainer=function(e,n,i,c){if(!ho(i))throw Error(a(200));if(e==null||e._reactInternals===void 0)throw Error(a(38));return xo(e,n,i,!1,c)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var Df;function Sx(){if(Df)return Wu.exports;Df=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(s){console.error(s)}}return t(),Wu.exports=xv(),Wu.exports}var zf;function gv(){if(zf)return yo;zf=1;var t=Sx();return yo.createRoot=t.createRoot,yo.hydrateRoot=t.hydrateRoot,yo}var yv=gv();Sx();/**
41 * @remix-run/router v1.23.3
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */function Gi(){return Gi=Object.assign?Object.assign.bind():function(t){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var l in a)({}).hasOwnProperty.call(a,l)&&(t[l]=a[l])}return t},Gi.apply(null,arguments)}var yr;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(yr||(yr={}));const Mf="popstate";function vv(t){t===void 0&&(t={});function s(l,o){let{pathname:u,search:m,hash:f}=l.location;return pd("",{pathname:u,search:m,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function a(l,o){return typeof o=="string"?o:Ao(o)}return jv(s,a,null,t)}function kt(t,s){if(t===!1||t===null||typeof t>"u")throw new Error(s)}function Ud(t,s){if(!t){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function bv(){return Math.random().toString(36).substr(2,8)}function Uf(t,s){return{usr:t.state,key:t.key,idx:s}}function pd(t,s,a,l){return a===void 0&&(a=null),Gi({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof s=="string"?Ya(s):s,{state:a,key:s&&s.key||l||bv()})}function Ao(t){let{pathname:s="/",search:a="",hash:l=""}=t;return a&&a!=="?"&&(s+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(s+=l.charAt(0)==="#"?l:"#"+l),s}function Ya(t){let s={};if(t){let a=t.indexOf("#");a>=0&&(s.hash=t.substr(a),t=t.substr(0,a));let l=t.indexOf("?");l>=0&&(s.search=t.substr(l),t=t.substr(0,l)),t&&(s.pathname=t)}return s}function jv(t,s,a,l){l===void 0&&(l={});let{window:o=document.defaultView,v5Compat:u=!1}=l,m=o.history,f=yr.Pop,x=null,h=v();h==null&&(h=0,m.replaceState(Gi({},m.state,{idx:h}),""));function v(){return(m.state||{idx:null}).idx}function b(){f=yr.Pop;let _=v(),T=_==null?null:_-h;h=_,x&&x({action:f,location:E.location,delta:T})}function w(_,T){f=yr.Push;let C=pd(E.location,_,T);h=v()+1;let M=Uf(C,h),O=E.createHref(C);try{m.pushState(M,"",O)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;o.location.assign(O)}u&&x&&x({action:f,location:E.location,delta:1})}function I(_,T){f=yr.Replace;let C=pd(E.location,_,T);h=v();let M=Uf(C,h),O=E.createHref(C);m.replaceState(M,"",O),u&&x&&x({action:f,location:E.location,delta:0})}function z(_){let T=o.location.origin!=="null"?o.location.origin:o.location.href,C=typeof _=="string"?_:Ao(_);return C=C.replace(/ $/,"%20"),kt(T,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,T)}let E={get action(){return f},get location(){return t(o,m)},listen(_){if(x)throw new Error("A history only accepts one active listener");return o.addEventListener(Mf,b),x=_,()=>{o.removeEventListener(Mf,b),x=null}},createHref(_){return s(o,_)},createURL:z,encodeLocation(_){let T=z(_);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:w,replace:I,go(_){return m.go(_)}};return E}var Ff;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Ff||(Ff={}));function Nv(t,s,a){return a===void 0&&(a="/"),wv(t,s,a)}function wv(t,s,a,l){let o=typeof s=="string"?Ya(s):s,u=Fa(o.pathname||"/",a);if(u==null)return null;let m=_x(t);Sv(m);let f=null,x=Iv(u);for(let h=0;f==null&&h<m.length;++h)f=Ov(m[h],x);return f}function _x(t,s,a,l){s===void 0&&(s=[]),a===void 0&&(a=[]),l===void 0&&(l="");let o=(u,m,f)=>{let x={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:m,route:u};x.relativePath.startsWith("/")&&(kt(x.relativePath.startsWith(l),'Absolute route path "'+x.relativePath+'" nested under path '+('"'+l+'" is not val
49id. An absolute child route path ')+"must start with the combined path of all its parent routes."),x.relativePath=x.relativePath.slice(l.length));let h=vr([l,x.relativePath]),v=a.concat(x);u.children&&u.children.length>0&&(kt(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),_x(u.children,s,v,h)),!(u.path==null&&!u.index)&&s.push({path:h,score:Rv(h,u.index),routesMeta:v})};return t.forEach((u,m)=>{var f;if(u.path===""||!((f=u.path)!=null&&f.includes("?")))o(u,m);else for(let x of Cx(u.path))o(u,m,x)}),s}function Cx(t){let s=t.split("/");if(s.length===0)return[];let[a,...l]=s,o=a.endsWith("?"),u=a.replace(/\?$/,"");if(l.length===0)return o?[u,""]:[u];let m=Cx(l.join("/")),f=[];return f.push(...m.map(x=>x===""?u:[u,x].join("/"))),o&&f.push(...m),f.map(x=>t.startsWith("/")&&x===""?"/":x)}function Sv(t){t.sort((s,a)=>s.score!==a.score?a.score-s.score:Av(s.routesMeta.map(l=>l.childrenIndex),a.routesMeta.map(l=>l.childrenIndex)))}const _v=/^:[\w-]+$/,Cv=3,kv=2,Ev=1,Tv=10,Pv=-2,$f=t=>t==="*";function Rv(t,s){let a=t.split("/"),l=a.length;return a.some($f)&&(l+=Pv),s&&(l+=kv),a.filter(o=>!$f(o)).reduce((o,u)=>o+(_v.test(u)?Cv:u===""?Ev:Tv),l)}function Av(t,s){return t.length===s.length&&t.slice(0,-1).every((l,o)=>l===s[o])?t[t.length-1]-s[s.length-1]:0}function Ov(t,s,a){let{routesMeta:l}=t,o={},u="/",m=[];for(let f=0;f<l.length;++f){let x=l[f],h=f===l.length-1,v=u==="/"?s:s.slice(u.length)||"/",b=fd({path:x.relativePath,caseSensitive:x.caseSensitive,end:h},v),w=x.route;if(!b)return null;
vendor: 7,279 bytes, lines 49-58
49Object.assign(o,b.params),m.push({params:o,pathname:vr([u,b.pathname]),pathnameBase:Fv(vr([u,b.pathnameBase])),route:w}),b.pathnameBase!=="/"&&(u=vr([u,b.pathnameBase]))}return m}function fd(t,s){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[a,l]=Lv(t.path,t.caseSensitive,t.end),o=s.match(a);if(!o)return null;let u=o[0],m=u.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:l.reduce((h,v,b)=>{let{paramName:w,isOptional:I}=v;if(w==="*"){let E=f[b]||"";m=u.slice(0,u.length-E.length).replace(/(.)\/+$/,"$1")}const z=f[b];return I&&!z?h[w]=void 0:h[w]=(z||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:m,pattern:t}}function Lv(t,s,a){s===void 0&&(s=!1),a===void 0&&(a=!0),Ud(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let l=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,f,x)=>(l.push({paramName:f,isOptional:x!=null}),x?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(l.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,s?void 0:"i"),l]}function Iv(t){try{return t.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return Ud(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+s+").")),t}}function Fa(t,s){if(s==="/")return t;if(!t.toLowerCase().startsWith(s.toLowerCase()))return null;let a=s.endsWith("/")?s.length-1:s.length,l=t.charAt(a);return l&&l!=="/"?null:t.slice(a)||"/"}const Dv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zv=t=>Dv.test(t);function Mv(t,s){s===void 0&&(s="/");let{pathname:a,search:l="",hash:o=""}=typeof t=="string"?Ya(t):t,u;if(a)if(zv(a))u=a;else{if(a.includes("//")){let m=a;a=kx(a),Ud(!1,"Pathnames cannot have embedded double slashes - normalizing "+(m+" -> "+a))}a.startsWith("/")?u=Bf(a.substring(1),"/"):u=Bf(a,s)}else u=s;return{pathname:u,search:$v(l),hash:Bv(o)}}function Bf(t,s){let a=s.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function Ku(t,s,a,l){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+s+"` field ["+JSON.stringify(l)+"].  Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Uv(t){return t.filter((s,a)=>a===0||s.route.path&&s.route.path.length>0)}function Fd(t,s){let a=Uv(t);return s?a.map((l,o)=>o===a.length-1?l.pathname:l.pathnameBase):a.map(l=>l.pathnameBase)}function $d(t,s,a,l){l===void 0&&(l=!1);let o;typeof t=="string"?o=Ya(t):(o=Gi({},t),kt(!o.pathname||!o.pathname.includes("?"),Ku("?","pathname","search",o)),kt(!o.pathname||!o.pathname.includes("#"),Ku("#","pathname","hash",o)),kt(!o.search||!o.search.includes("#"),Ku("#","search","hash",o)));let u=t===""||o.pathname==="",m=u?"/":o.pathname,f;if(m==null)f=a;else{let b=s.length-1;if(!l&&m.startsWith("..")){let w=m.split("/");for(;w[0]==="..";)w.shift(),b-=1;o.pathname=w.join("/")}f=b>=0?s[b]:"/"}let x=Mv(o,f),h=m&&m!=="/"&&m.endsWith("/"),v=(u||m===".")&&a.endsWith("/");return!x.pathname.endsWith("/")&&(h||v)&&(x.pathname+="/"),x}const kx=t=>t.replace(/\/\/+/g,"/"),vr=t=>kx(t.join("/")),Fv=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),$v=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Bv=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function qv(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Ex=["post","put","patch","delete"];new Set(Ex);const Vv=["get",...Ex];new Set(Vv);/**
50 * React Router v6.30.4
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */function Zi(){return Zi=Object.assign?Object.assign.bind():function(t){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var l in a)({}).hasOwnProperty.call(a,l)&&(t[l]=a[l])}return t},Zi.apply(null,arguments)}const Yo=g.createContext(null),Tx=g.createContext(null),Vs=g.createContext(null),Qo=g.createContext(null),ks=g.createContext({outlet:null,matches:[],isDataRoute:!1}),Px=g.createContext(null);function Hv(t,s){let{relative:a}=s===void 0?{}:s;Qa()||kt(!1);let{basename:l,navigator:o}=g.useContext(Vs),{hash:u,pathname:m,search:f}=Xo(t,{relative:a}),x=m;return l!=="/"&&(x=m==="/"?l:vr([l,m])),o.createHref({pathname:x,search:f,hash:u})}function Qa(){return g.useContext(Qo)!=null}function $n(){return Qa()||kt(!1),g.useContext(Qo).location}function Rx(t){g.useContext(Vs).static||g.useLayoutEffect(t)}function Bn(){let{isDataRoute:t}=g.useContext(ks);return t?ib():Wv()}function Wv(){Qa()||kt(!1);let t=g.useContext(Yo),{basename:s,future:a,navigator:l}=g.useContext(Vs),{matches:o}=g.useContext(ks),{pathname:u}=$n(),m=JSON.stringify(Fd(o,a.v7_relativeSplatPath)),f=g.useRef(!1);return Rx(()=>{f.current=!0}),g.useCallback(function(h,v){if(v===void 0&&(v={}),!f.current)return;if(typeof h=="number"){l.go(h);return}let b=$d(h,JSON.parse(m),u,v.relative==="path");t==null&&s!=="/"&&(b.pathname=b.pathname==="/"?s:vr([s,b.pathname])),(v.replace?l.replace:l.push)(b,v.state,v)},[s,l,m,u,t])}const Gv=g.createContext(null);function Zv(t){let s=g.useContext(ks).outlet;return s&&g.createElement(Gv.Provider,{value:t},s)}function _r(){let{matches:t}=g.useContext(ks),s=t[t.length-1];return s?s.params:{}}function Xo(t,s){let{relative:a}=s===void 0?{}:s,{future:l}=g.useContext(Vs),{matches:o}=g.useContext(ks),{pathname:u}=$n(),m=JSON.stringify(Fd(o,l.v7_relativeSplatPath));return g.useMemo(()=>$d(t,JSON.parse(m),u,a==="path"),[t,m,u,a])}function Kv(t,s){return Yv(t,s)}function Yv(t,s,a,l){Qa()||kt(!1);let{navigator:o}=g.useContext(Vs),{matches:u}=g.useContext(ks),m=u[u.length-1],f=m?m.params:{};m&&m.pathname;let x=m?m.pathnameBase:"/";m&&m.route;let h=$n(),v;if(s){var b;let _=typeof s=="string"?Ya(s):s;x==="/"||(b=_.pathname)!=null&&b.startsWith(x)||kt(!1),v=_}else v=h;let w=v.pathname||"/",I=w;if(x!=="/"){let _=x.replace(/^\//,"").split("/");I="/"+w.replace(/^\//,"").split("/").slice(_.length).join("/")}let z=Nv(t,{pathname:I}),E=tb(z&&z.map(_=>Object.assign({},_,{params:Object.assign({},f,_.params),pathname:vr([x,o.encodeLocation?o.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?x:vr([x,o.encodeLocation?o.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),u,a,l);return s&&E?g.createElement(Qo.Provider,{value:{location:Zi({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:yr.Pop}},E):E}function Qv(){let t=ab(),s=qv(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application 
58Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},s),a?g.createElement("pre",{style:o},a):null,null)}const Xv=g.createElement(Qv,null);class Jv extends g.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,a){return a.location!==s.location||a.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:a.error,location:a.location,revalidation:s.revalidation||a.revalidation}}componentDidCatch(s,a){console.error("React Router caught the following error during render",s,a)}render(){return this.state.error!==void 0?g.createElement(ks.Provider,{value:this.props.routeContext},g.createElement(Px.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function eb(t){let{routeContext:s,match:a,children:l}=t,o=g.useContext(Yo);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),g.createElement(ks.Provider,{value:s},l)}function tb(t,s,a,l){var o;if(s===void 0&&(s=[]),a===void 0&&(a=null),l===void 0&&(l=null),t==null){var u;if(!a)return null;if(a.errors)t=a.matches;else if((u=l)!=null&&u.v7_partialHydration&&s.length===0&&!a.initialized&&a.matches.length>0)t=a.matches;else return null}let m=t,f=(o=a)==null?void 0:o.errors;if(f!=null){let v=m.findIndex(b=>b.route.id&&(f==null?void 0:f[b.route.id])!==void 0);v>=0||kt(!1),m=m.slice(0,Math.min(m.length,v+1))}let x=!1,h=-1;if(a&&l&&l.v7_partialHydration)for(let v=0;v<m.length;v++){let b=m[v];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(h=v),b.route.id){let{loaderData:w,errors:I}=a,z=b.route.loader&&w[b.route.id]===void 0&&(!I||I[b.route.id]===void 0);if(b.route.lazy||z){x=!0,h>=0?m=m.slice(0,h+1):m=[m[0]];break}}}return m.reduceRight((v,b,w)=>{let I,z=!1,E=null,_=null;a&&(I=f&&b.route.id?f[b.route.id]:void 0,E=b.route.errorElement||Xv,x&&(h<0&&w===0?(lb("route-fallback"),z=!0,_=null):h===w&&(z=!0,_=b.route.hydrateFallbackElement||null)));let T=s.concat(m.slice(0,w+1)),C=()=>{let M;return I?M=E:z?M=_:b.route.Component?M=g.createElement(b.route.Component,null):b.route.element?M=b.route.element:M=v,g.createElement(eb,{match:b,routeContext:{outlet:v,matches:T,isDataRoute:a!=null},children:M})};return a&&(b.route.ErrorBoundary||b.route.errorElement||w===0)?g.createElement(Jv,{location:a.location,revalidation:a.revalidation,component:E,error:I,children:C(),routeContext:{outlet:null,matches:T,isDataRoute:!0}}):C()},null)}var Ax=(function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t})(Ax||{}),Ox=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(Ox||{});function nb(t){let s=g.useContext(Yo);return s||kt(!1),s}function sb(t){let s=g.useContext(Tx);return s||kt(!1),s}function rb(t){let s=g.useContext(ks);return s||kt(!1),s}function Lx(t){let s=rb(),a=s.matches[s.matches.length-1];return a.route.id||kt(!1),a.route.id}function ab(){var t;let s=g.useContext(Px),a=sb(),l=Lx();return s!==void 0?s:(t=a.errors)==null?void 0:t[l]}function ib(){let{router:t}=nb(Ax.UseNavigateStable),s=Lx(Ox.UseNavigateStable),a=g.useRef(!1);return Rx(()=>{a.current=!0}),g.useCallback(function(o,u){u===void 0&&(u={}),a.current&&(typeof o=="number"?t.navigate(o):t.navigate(o,Zi({fromRouteId:s},u)))},[t,s])}const qf={};function lb(t,s,a){qf[t]||(qf[t]=!0)}function ob(t,s){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function sa(t){let{to:s,replace:a,state:l,relative:o}=t;Qa()||kt(!1);let{future:u,static:m}=g.useContext(Vs),{matches:f}=g.useContext(ks),{pathname:x}=$n(),h=Bn(),v=$d(s,Fd(f,u.v7_relativeSplatPath),x,o==="path"),b=JSON.stringify(v);return g.useEffect(()=>h(JSON.parse(b),{replace:a,state:l,relative:o}),[h,b,o,a,l]),null}function Ix(t){return Zv(t.context)}function st(t){kt(!1)}function cb(t){let{basename:s="/",children:a=null,location:l,navigationType:o=yr.Po
58p,navigator:u,static:m=!1,future:f}=t;Qa()&&kt(!1);let x=s.replace(/^\/*/,"/"),h=g.useMemo(()=>({basename:x,navigator:u,static:m,future:Zi({v7_relativeSplatPath:!1},f)}),[x,f,u,m]);typeof l=="string"&&(l=Ya(l));let{pathname:v="/",search:b="",hash:w="",state:I=null,key:z="default"}=l,E=g.useMemo(()=>{let _=Fa(v,x);return _==null?null:{location:{pathname:_,search:b,hash:w,state:I,key:z},navigationType:o}},[x,v,b,w,I,z,o]);return E==null?null:g.createElement(Vs.Provider,{value:h},g.createElement(Qo.Provider,{children:a,value:E}))}function ub(t){let{children:s,location:a}=t;return Kv(hd(s),a)}new Promise(()=>{});function hd(t,s){s===void 0&&(s=[]);let a=[];return g.Children.forEach(t,(l,o)=>{if(!g.isValidElement(l))return;let u=[...s,o];if(l.type===g.Fragment){a.push.apply(a,hd(l.props.children,u));return}l.type!==st&&kt(!1),!l.props.index||!l.props.children||kt(!1);let m={id:l.props.id||u.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,loader:l.props.loader,action:l.props.action,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(m.children=hd(l.props.children,u)),a.push(m)}),a}/**
59 * React Router DOM v6.30.4
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function Oo(){return Oo=Object.assign?Object.assign.bind():function(t){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var l in a)({}).hasOwnProperty.call(a,l)&&(t[l]=a[l])}return t},Oo.apply(null,arguments)}function Dx(t,s){if(t==null)return{};var a={};for(var l in t)if({}.hasOwnProperty.call(t,l)){if(s.indexOf(l)!==-1)continue;a[l]=t[l]}return a}function db(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function mb(t,s){return t.button===0&&(!s||s==="_self")&&!db(t)}function xd(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((s,a)=>{let l=t[a];return s.concat(Array.isArray(l)?l.map(o=>[a,o]):[[a,l]])},[]))}function pb(t,s){let a=xd(t);return s&&s.forEach((l,o)=>{a.has(o)||s.getAll(o).forEach(u=>{a.append(o,u)})}),a}const fb=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],hb=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],xb="6";try{window.__reactRouterVersion=xb}catch{}const gb=g.createContext({isTransitioning:!1}),yb="startTransition",Vf=pv[yb];function vb(t){let{basename:s,children:a,future:l,window:o}=t,u=g.useRef();u.current==null&&(u.current=vv({window:o,v5Compat:!0}));let m=u.current,[f,x]=g.useState({action:m.action,location:m.location}),{v7_startTransition:h}=l||{},v=g.useCallback(b=>{h&&Vf?Vf(()=>x(b)):x(b)},[x,h]);return g.useLayoutEffect(()=>m.listen(v),[m,v]),g.useEffect(()=>ob(l),[l]),g.createElement(cb,{basename:s,children:a,location:f.location,navigationType:f.action,navigator:m,future:l})}const bb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,V=g.forwardRef(function(s,a){let{onClick:l,relative:o,reloadDocument:u,replace:m,state:f,target:x,to:h,preventScrollReset:v,viewTransition:b}=s,w=Dx(s,fb),{basename:I}=g.useContext(Vs),z,E=!1;if(typeof h=="string"&&jb.test(h)&&(z=h,bb))try{let M=new URL(window.location.href),O=h.startsWith("//")?new URL(M.protocol+h):new URL(h),W=Fa(O.pathname,I);O.origin===M.origin&&W!=null?h=W+O.search+O.hash:E=!0}catch{}let _=Hv(h,{relative:o}),T=Sb(h,{replace:m,state:f,target:x,preventScrollReset:v,relative:o,viewTransition:b});function C(M){l&&l(M),M.defaultPrevented||T(M)}return g.createElement("a",Oo({},w,{href:z||_,onClick:E||u?l:C,ref:a,target:x}))}),Nb=g.forwardRef(function(s,a){let{"aria-current":l="page",caseSensitive:o=!1,className:u="",end:m=!1,style:f,to:x,viewTransition:h,children:v}=s,b=Dx(s,hb),w=Xo(x,{relative:b.relative}),I=$n(),z=g.useContext(Tx),{navigator:E,basename:_}=g.useContext(Vs),T=z!=null&&_b(w)&&h===!0,C=E.encodeLocation?E.encodeLocation(w).pathname:w.pathname,M=I.pathname,O=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;o||(M=M.toLowerCase(),O=O?O.toLowerCase():null,C=C.toLowerCase()),O&&_&&(O=Fa(O,_)||O);const W=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let ae=M===C||!m&&M.startsWith(C)&&M.charAt(W)==="/",ge=O!=null&&(O===C||!m&&O.startsWith(C)&&O.charAt(C.length)==="/"),De={isActive:ae,isPending:ge,isTransitioning:T},Ne=ae?l:void 0,G;typeof u=="function"?G=u(De):G=[u,ae?"active":null,ge?"pending":null,T?"transitioning":null].filter(
67Boolean).join(" ");let ke=typeof f=="function"?f(De):f;return g.createElement(V,Oo({},b,{"aria-current":Ne,className:G,ref:a,style:ke,to:x,viewTransition:h}),typeof v=="function"?v(De):v)});var gd;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(gd||(gd={}));var Hf;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Hf||(Hf={}));function wb(t){let s=g.useContext(Yo);return s||kt(!1),s}function Sb(t,s){let{target:a,replace:l,state:o,preventScrollReset:u,relative:m,viewTransition:f}=s===void 0?{}:s,x=Bn(),h=$n(),v=Xo(t,{relative:m});return g.useCallback(b=>{if(mb(b,a)){b.preventDefault();let w=l!==void 0?l:Ao(h)===Ao(v);x(t,{replace:w,state:o,preventScrollReset:u,relative:m,viewTransition:f})}},[h,x,v,l,o,a,t,u,m,f])}function Hs(t){let s=g.useRef(xd(t)),a=g.useRef(!1),l=$n(),o=g.useMemo(()=>pb(l.search,a.current?null:s.current),[l.search]),u=Bn(),m=g.useCallback((f,x)=>{const h=xd(typeof f=="function"?f(o):f);a.current=!0,u("?"+h,x)},[u,o]);return[o,m]}function _b(t,s){s===void 0&&(s={});let a=g.useContext(gb);a==null&&kt(!1);let{basename:l}=wb(gd.useViewTransitionState),o=Xo(t,{relative:s.relative});if(!a.isTransitioning)return!1;let u=Fa(a.currentLocation.pathname,l)||a.currentLocation.pathname,m=Fa(a.nextLocation.pathname,l)||a.nextLocation.pathname;return fd(o.pathname,m)!=null||fd(o.pathname,u)!=null}/**
68 * @license lucide-react v0.468.0 - ISC
69 *
70 * This source code is licensed under the ISC license.
71 * See the LICENSE file in the root directory of this source tree.
72 */const Cb=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zx=(...t)=>t.filter((s,a,l)=>!!s&&s.trim()!==""&&l.indexOf(s)===a).join(" ").trim();/**
73 * @license lucide-react v0.468.0 - ISC
74 *
75 * This source code is licensed under the ISC license.
76 * See the LICENSE file in the root directory of this source tree.
77 */var kb={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"};/**
78 * @license lucide-react v0.468.0 - ISC
79 *
80 * This source code is licensed under the ISC license.
81 * See the LICENSE file in the root directory of this source tree.
82 */const Eb=g.forwardRef(({color:t="currentColor",size:s=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:u,iconNode:m,...f},x)=>g.createElement("svg",{ref:x,...kb,width:s,height:s,stroke:t,strokeWidth:l?Number(a)*24/Number(s):a,className:zx("lucide",o),...f},[...m.map(([h,v])=>g.createElement(h,v)),...Array.isArray(u)?u:[u]]));/**
83 * @license lucide-react v0.468.0 - ISC
84 *
85 * This source code is licensed under the ISC license.
86 * See the LICENSE file in the root directory of this source tree.
87 */const Ge=(t,s)=>{const a=g.forwardRef(({className:l,...o},u)=>g.createElement(Eb,{ref:u,iconNode:s,className:zx(`lucide-${Cb(t)}`,l),...o}));return a.displayName=`${t}`,a};/**
88 * @license lucide-react v0.468.0 - ISC
89 *
90 * This source code is licensed under the ISC license.
91 * See the LICENSE file in the root directory of this source tree.
92 */const Tb=Ge("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
93 * @license lucide-react v0.468.0 - ISC
94 *
95 * This source code is licensed under the ISC license.
96 * See the LICENSE file in the root directory of this source tree.
97 */const Mx=Ge("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
98 * @license lucide-react v0.468.0 - ISC
99 *
100 * This source code is licensed under the ISC license.
101 * See the LICENSE file in the root directory of this source tree.
102 */const At=Ge("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
103 * @license lucide-react v0.468.0 - ISC
104 *
105 * This source code is licensed under the ISC license.
106 * See the LICENSE file in the root directory of this source tree.
107 */const Ux=Ge("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"}
107],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
108 * @license lucide-react v0.468.0 - ISC
109 *
110 * This source code is licensed under the ISC license.
111 * See the LICENSE file in the root directory of this source tree.
112 */const Jo=Ge("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"}]]);/**
113 * @license lucide-react v0.468.0 - ISC
114 *
115 * This source code is licensed under the ISC license.
116 * See the LICENSE file in the root directory of this source tree.
117 */const Pb=Ge("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"}]]);/**
118 * @license lucide-react v0.468.0 - ISC
119 *
120 * This source code is licensed under the ISC license.
121 * See the LICENSE file in the root directory of this source tree.
122 */const Rb=Ge("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"}]]);/**
123 * @license lucide-react v0.468.0 - ISC
124 *
125 * This source code is licensed under the ISC license.
126 * See the LICENSE file in the root directory of this source tree.
127 */const Ab=Ge("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
128 * @license lucide-react v0.468.0 - ISC
129 *
130 * This source code is licensed under the ISC license.
131 * See the LICENSE file in the root directory of this source tree.
132 */const Ob=Ge("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
133 * @license lucide-react v0.468.0 - ISC
134 *
135 * This source code is licensed under the ISC license.
136 * See the LICENSE file in the root directory of this source tree.
137 */const Bd=Ge("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
138 * @license lucide-react v0.468.0 - ISC
139 *
140 * This source code is licensed under the ISC license.
141 * See the LICENSE file in the root directory of this source tree.
142 */const Lb=Ge("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
143 * @license lucide-react v0.468.0 - ISC
144 *
145 * This source code is licensed under the ISC license.
146 * See the LICENSE file in the root directory of this source tree.
147 */const Ib=Ge("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"}]]);/**
148 * @license lucide-react v0.468.0 - ISC
149 *
150 * This source code is licensed under the ISC license.
151 * See the LICENSE file in the root directory of this source tree.
152 */const Fx=Ge("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
153 * @license lucide-react v0.468.0 - ISC
154 *
155 * This source code is licensed under the ISC license.
156 * See the LICENSE file in the root directory of this source tree.
157 */const el=Ge("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"}]]);/**
158 * @license lucide-react v0.468.0 - ISC
159 *
160 * This source code is licensed under the ISC license.
161 * See the LICENSE file in the root directory of this source tree.
162 */const Kr=Ge("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"}]]);/**
163 * @license lucide-react v0.468.0 - ISC
164 *
165 * This source code is licensed under the ISC license.
166 * See the LICENSE file in the root directory of this source tree.
167 */const Db=Ge("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"}]]);/**
168 * @license lucide-react v0.468.0 - ISC
169 *
170 * This source code is licensed under the ISC license.
171 * See the LICENSE file in the root directory of this source tree.
172 */const zb=Ge("FileCheck",[["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:"m9 15 2 2 4-4",key:"1grp1n"}]]);/**
173 * @license lucide-react v0.468.0 - ISC
174 *
175 * This source code is licensed under the ISC license.
176 * See the LICENSE file in the root directory of this source tree.
177 */const Mb=Ge("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",ke
177y:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]);/**
178 * @license lucide-react v0.468.0 - ISC
179 *
180 * This source code is licensed under the ISC license.
181 * See the LICENSE file in the root directory of this source tree.
182 */const $x=Ge("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"}]]);/**
183 * @license lucide-react v0.468.0 - ISC
184 *
185 * This source code is licensed under the ISC license.
186 * See the LICENSE file in the root directory of this source tree.
187 */const Ub=Ge("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"}]]);/**
188 * @license lucide-react v0.468.0 - ISC
189 *
190 * This source code is licensed under the ISC license.
191 * See the LICENSE file in the root directory of this source tree.
192 */const Nr=Ge("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/**
193 * @license lucide-react v0.468.0 - ISC
194 *
195 * This source code is licensed under the ISC license.
196 * See the LICENSE file in the root directory of this source tree.
197 */const Bx=Ge("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"}]]);/**
198 * @license lucide-react v0.468.0 - ISC
199 *
200 * This source code is licensed under the ISC license.
201 * See the LICENSE file in the root directory of this source tree.
202 */const Fb=Ge("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
203 * @license lucide-react v0.468.0 - ISC
204 *
205 * This source code is licensed under the ISC license.
206 * See the LICENSE file in the root directory of this source tree.
207 */const Xn=Ge("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
208 * @license lucide-react v0.468.0 - ISC
209 *
210 * This source code is licensed under the ISC license.
211 * See the LICENSE file in the root directory of this source tree.
212 */const $b=Ge("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"}]]);/**
213 * @license lucide-react v0.468.0 - ISC
214 *
215 * This source code is licensed under the ISC license.
216 * See the LICENSE file in the root directory of this source tree.
217 */const Wf=Ge("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"}]]);/**
218 * @license lucide-react v0.468.0 - ISC
219 *
220 * This source code is licensed under the ISC license.
221 * See the LICENSE file in the root directory of this source tree.
222 */const tl=Ge("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"}]]);/**
223 * @license lucide-react v0.468.0 - ISC
224 *
225 * This source code is licensed under the ISC license.
226 * See the LICENSE file in the root directory of this source tree.
227 */const Bb=Ge("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"}]]);/**
228 * @license lucide-react v0.468.0 - ISC
229 *
230 * This source code is licensed under the ISC license.
231 * See the LICENSE file in the root directory of this source tree.
232 */const $a=Ge("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"}]]);/**
233 * @license lucide-react v0.468.0 - ISC
234 *
235 * This source code is licensed under the ISC license.
236 * See the LICENSE file in the root directory of this source tree.
237 */const Gf=Ge("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"}]]);/**
238 * @license lucide-react v0.468.0 - ISC
239 *
240 * This source code is licensed under the ISC license.
241 * See the LICENSE file in the root directory of this source tree.
242 */const Ki=Ge("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
243 * @license lucide-react v0.468.0 - ISC
244 *
245 * This source code is licensed under the ISC license.
246 * See the LICENSE file in the root directory of this source tree.
247 */const qb=Ge("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
248 * @license lucide-react v0.468.0 - ISC
249 *
250 * This source code is licensed under the ISC license.
251 * See the LICENSE file in the root directory of this source tree.
252 */const qx=Ge("ShieldCheck",[["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",ke
vendor: 6,333 bytes, lines 252-292
252y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
253 * @license lucide-react v0.468.0 - ISC
254 *
255 * This source code is licensed under the ISC license.
256 * See the LICENSE file in the root directory of this source tree.
257 */const Xa=Ge("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"}]]);/**
258 * @license lucide-react v0.468.0 - ISC
259 *
260 * This source code is licensed under the ISC license.
261 * See the LICENSE file in the root directory of this source tree.
262 */const br=Ge("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
263 * @license lucide-react v0.468.0 - ISC
264 *
265 * This source code is licensed under the ISC license.
266 * See the LICENSE file in the root directory of this source tree.
267 */const Vb=Ge("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"}]]);/**
268 * @license lucide-react v0.468.0 - ISC
269 *
270 * This source code is licensed under the ISC license.
271 * See the LICENSE file in the root directory of this source tree.
272 */const Hb=Ge("TimerOff",[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7",key:"10he05"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2",key:"15f7sh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M12 12v-2",key:"fwoke6"}]]);/**
273 * @license lucide-react v0.468.0 - ISC
274 *
275 * This source code is licensed under the ISC license.
276 * See the LICENSE file in the root directory of this source tree.
277 */const Zf=Ge("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"}]]);/**
278 * @license lucide-react v0.468.0 - ISC
279 *
280 * This source code is licensed under the ISC license.
281 * See the LICENSE file in the root directory of this source tree.
282 */const Vx=Ge("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"}]]);/**
283 * @license lucide-react v0.468.0 - ISC
284 *
285 * This source code is licensed under the ISC license.
286 * See the LICENSE file in the root directory of this source tree.
287 */const qd=Ge("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
288 * @license lucide-react v0.468.0 - ISC
289 *
290 * This source code is licensed under the ISC license.
291 * See the LICENSE file in the root directory of this source tree.
292 */const Wb=Ge("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"}]]);function Hx(t,s){return function(){return t.apply(s,arguments)}}const{toString:Gb}=Object.prototype,{getPrototypeOf:Ba}=Object,{iterator:nl,toStringTag:Wx}=Symbol,Lo=(({hasOwnProperty:t})=>(s,a)=>t.call(s,a))(Object.prototype),Yi=(t,s)=>{let a=t;const l=[];for(;a!=null&&a!==Object.prototype;){if(l.indexOf(a)!==-1)return!1;if(l.push(a),Lo(a,s))return!0;a=Ba(a)}return!1},Zb=(t,s)=>t!=null&&Yi(t,s)?t[s]:void 0,Vd=(t=>s=>{const a=Gb.call(s);return t[a]||(t[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),ms=t=>(t=t.toLowerCase(),s=>Vd(s)===t),ec=t=>s=>typeof s===t,{isArray:Yr}=Array,qa=ec("undefined");function Ja(t){return t!==null&&!qa(t)&&t.constructor!==null&&!qa(t.constructor)&&Tn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Gx=ms("ArrayBuffer");function Kb(t){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(t):s=t&&t.buffer&&Gx(t.buffer),s}const Yb=ec("string"),Tn=ec("function"),Zx=ec("number"),ei=t=>t!==null&&typeof t=="object",Qb=t=>t===!0||t===!1,Co=t=>{if(!ei(t))return!1;const s=Ba(t);return(s===null||s===Object.prototype||Ba(s)===null)&&!Yi(t,Wx)&&!Yi(t,nl)},Xb=t=>{if(!ei(t)||Ja(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Jb=ms("Date"),ej=ms("File"),tj=t=>!!(t&&typeof t.uri<"u"),nj=t=>t&&typeof t.getParts<"u",sj=ms("Blob"),rj=ms("FileList"),aj=t=>ei(t)&&Tn(t.pipe);function ij(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Kf=ij(),Yf=typeof Kf.FormData<"u"?Kf.FormData:void 0,lj=t=>{if(!t)return!1;if(Yf&&t instanceof Yf)return!0;const s=Ba(t);if(!s||s===Object.prototype||!Tn(t.append))return!1;const a=Vd(t);return a==="formdata"||a==="object"&&Tn(t.toString)&&t.toString()==="[object FormData]"},oj=ms("URLSearchParams"),[cj,uj,dj,mj]=["ReadableStream","Request","Response","Headers"].map(ms),pj=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sl(t,s,{allOwnKeys:a=!1}={}){if(t===null||typeof t>"u")return;let l,o;if(typeof t!="object"&&(t=[t]),Yr(t))for(l=0,o=t.length;l<o;l++)s.call(null,t[l],l,t);else{if(Ja(t))return;const u=a?Object.getOwnPropertyNames(t):Object.keys(t),m=u.length;let f;for(l=0;l<m;l++)f=u[l],s.call(null,t[f],f,t)}}function Kx(t,s){if(Ja(t))return null;s=s.toLowerCase();const a=Object.keys(t);let l=a.length,o;for(;l-- >0;)if(o=a[l],s===o.toLowerCase())return o;return null}const Wr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yx=t=>!qa(t)&&t!==Wr;function yd(...t){const{caseless:s,skipUndefined:a}=Yx(this)&&this||{},l={},o=(u,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")return;const f=s&&typeof m=="string"&&Kx(l,m)||m,x=Lo(l,f)?l[f]:void 0;Co(x)&&Co(u)?l[f]=yd(x,u):Co(u)?l[f]=yd({},u):Yr(u)?l[f]=u.slice():(!a||!qa(u))&&(l[f]=u)};for(let u=0,m=t.length;u<m;
vendor: 9,042 bytes, lines 292-294
292u++){const f=t[u];if(!f||Ja(f)||(sl(f,o),typeof f!="object"||Yr(f)))continue;const x=Object.getOwnPropertySymbols(f);for(let h=0;h<x.length;h++){const v=x[h];_j.call(f,v)&&o(f[v],v)}}return l}const fj=(t,s,a,{allOwnKeys:l}={})=>(sl(s,(o,u)=>{a&&Tn(o)?Object.defineProperty(t,u,{__proto__:null,value:Hx(o,a),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,u,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:l}),t),hj=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),xj=(t,s,a,l)=>{t.prototype=Object.create(s.prototype,l),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:s.prototype}),a&&Object.assign(t.prototype,a)},gj=(t,s,a,l)=>{let o,u,m;const f={};if(s=s||{},t==null)return s;do{for(o=Object.getOwnPropertyNames(t),u=o.length;u-- >0;)m=o[u],(!l||l(m,t,s))&&!f[m]&&(s[m]=t[m],f[m]=!0);t=a!==!1&&Ba(t)}while(t&&(!a||a(t,s))&&t!==Object.prototype);return s},yj=(t,s,a)=>{t=String(t),(a===void 0||a>t.length)&&(a=t.length),a-=s.length;const l=t.indexOf(s,a);return l!==-1&&l===a},vj=t=>{if(!t)return null;if(Yr(t))return t;let s=t.length;if(!Zx(s))return null;const a=new Array(s);for(;s-- >0;)a[s]=t[s];return a},bj=(t=>s=>t&&s instanceof t)(typeof Uint8Array<"u"&&Ba(Uint8Array)),jj=(t,s)=>{const l=(t&&t[nl]).call(t);let o;for(;(o=l.next())&&!o.done;){const u=o.value;s.call(t,u[0],u[1])}},Nj=(t,s)=>{let a;const l=[];for(;(a=t.exec(s))!==null;)l.push(a);return l},wj=ms("HTMLFormElement"),Sj=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,l,o){return l.toUpperCase()+o}),{propertyIsEnumerable:_j}=Object.prototype,Cj=ms("RegExp"),Qx=(t,s)=>{const a=Object.getOwnPropertyDescriptors(t),l={};sl(a,(o,u)=>{let m;(m=s(o,u,t))!==!1&&(l[u]=m||o)}),Object.defineProperties(t,l)},kj=t=>{Qx(t,(s,a)=>{if(Tn(t)&&["arguments","caller","callee"].includes(a))return!1;const l=t[a];if(Tn(l)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},Ej=(t,s)=>{const a={},l=o=>{o.forEach(u=>{a[u]=!0})};return Yr(t)?l(t):l(String(t).split(s)),a},Tj=()=>{},Pj=(t,s)=>t!=null&&Number.isFinite(t=+t)?t:s;function Rj(t){return!!(t&&Tn(t.append)&&t[Wx]==="FormData"&&t[nl])}const Aj=t=>{const s=new WeakSet,a=l=>{if(ei(l)){if(s.has(l))return;if(Ja(l))return l;if(!("toJSON"in l)){s.add(l);const o=Yr(l)?[]:{};return sl(l,(u,m)=>{const f=a(u);!qa(f)&&(o[m]=f)}),s.delete(l),o}}return l};return a(t)},Oj=ms("AsyncFunction"),Lj=t=>t&&(ei(t)||Tn(t))&&Tn(t.then)&&Tn(t.catch),Xx=((t,s)=>t?setImmediate:s?((a,l)=>(Wr.addEventListener("message",({source:o,data:u})=>{o===Wr&&u===a&&l.length&&l.shift()()},!1),o=>{l.push(o),Wr.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",Tn(Wr.postMessage)),Ij=typeof queueMicrotask<"u"?queueMicrotask.bind(Wr):typeof process<"u"&&process.nextTick||Xx,Jx=t=>t!=null&&Tn(t[nl]),Dj=t=>t!=null&&Yi(t,nl)&&Jx(t),A={isArray:Yr,isArrayBuffer:Gx,isBuffer:Ja,isFormData:lj,isArrayBufferView:Kb,isString:Yb,isNumber:Zx,isBoolean:Qb,isObject:ei,isPlainObject:Co,isEmptyObject:Xb,isReadableStream:cj,isRequest:uj,isResponse:dj,isHeaders:mj,isUndefined:qa,isDate:Jb,isFile:ej,isReactNativeBlob:tj,isReactNative:nj,isBlob:sj,isRegExp:Cj,isFunction:Tn,isStream:aj,isURLSearchParams:oj,isTypedArray:bj,isFileList:rj,forEach:sl,merge:yd,extend:fj,trim:pj,stripBOM:hj,inherits:xj,toFlatObject:gj,kindOf:Vd,kindOfTest:ms,endsWith:yj,toArray:vj,forEachEntry:jj,matchAll:Nj,isHTMLForm:wj,hasOwnProperty:Lo,hasOwnProp:Lo,hasOwnInPrototypeChain:Yi,getSafeProp:Zb,reduceDescriptors:Qx,freezeMethods:kj,toObjectSet:Ej,toCamelCase:Sj,noop:Tj,toFiniteNumber:Pj,findKey:Kx,global:Wr,isContextDefined:Yx,isSpecCompliantForm:Rj,toJSONObject:Aj,isAsyncFn:Oj,isThenable:Lj,setImmediate:Xx,asap:Ij,isIterable:Jx,isSafeIterable:Dj},zj=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Mj=t=>{const s={};let a,l,o;return t&&t.split(`
293`).forEach(function(m){o=m.indexOf(":"),a=m.substring(0,o).trim().toLowerCase(),l=m.substring(o+1).trim(),!(!a||s[a]&&zj[a])&&(a==="set-cookie"?s[a]?s[a].push(l):s[a]=[l]:s[a]=s[a]?s[a]+", "+l:l)}),s};function Uj(t){let s=0,a=t.length;for(;s<a;){const l=t.charCodeAt(s);if(l!==9&&l!==32)break;s+=1}for(;a>s;){const l=t.charCodeAt(a-1);if(l!==9&&l!==32)break;a-=1}return s===0&&a===t.length?t:t.slice(s,a)}const Fj=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),$j=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Hd(t,s){return A.isArray(t)?t.map(a=>Hd(a,s)):Uj(String(t).replace(s,""))}const Bj=t=>Hd(t,Fj),qj=t=>Hd(t,$j);function eg(t){const s=Object.create(null);return A.forEach(t.toJSON(),(a,l)=>{s[l]=qj(a)}),s}const Qf=Symbol("internals");function Mi(t){return t&&String(t).trim().toLowerCase()}function ko(t){return t===!1||t==null?t:A.isArray(t)?t.map(ko):Bj(String(t))}function Vj(t){const s=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let l;for(;l=a.exec(t);)s[l[1]]=l[2];return s}const Hj=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Yu(t,s,a,l,o){if(A.isFunction(l))return l.call(this,s,a);if(o&&(s=a),!!A.isString(s)){if(A.isString(l))return s.indexOf(l)!==-1;if(A.isRegExp(l))return l.test(s)}}function Wj(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,a,l)=>a.toUpperCase()+l)}function Gj(t,s){const a=A.toCamelCase(" "+s);["get","set","has"].forEach(l=>{Object.defineProperty(t,l+a,{__proto__:null,value:function(o,u,m){return this[l].call(this,s,o,u,m)},configurable:!0})})}let hn=class{constructor(s){s&&this.set(s)}set(s,a,l){const o=this;function u(f,x,h){const v=Mi(x);if(!v)return;const b=A.findKey(o,v);(!b||o[b]===void 0||h===!0||h===void 0&&o[b]!==!1)&&(o[b||x]=ko(f))}const m=(f,x)=>A.forEach(f,(h,v)=>u(h,v,x));if(A.isPlainObject(s)||s instanceof this.constructor)m(s,a);else if(A.isString(s)&&(s=s.trim())&&!Hj(s))m(Mj(s),a);else if(A.isObject(s)&&A.isSafeIterable(s)){let f=Object.create(null),x,h;for(const v of s){if(!A.isArray(v))throw new TypeError("Object iterator must return a key-value pair");h=v[0],A.hasOwnProp(f,h)?(x=f[h],f[h]=A.isArray(x)?[...x,v[1]]:[x,v[1]]):f[h]=v[1]}m(f,a)}else s!=null&&u(a,s,l);return this}get(s,a){if(s=Mi(s),s){const l=A.findKey(this,s);if(l){const o=this[l];if(!a)return o;if(a===!0)return Vj(o);if(A.isFunction(a))return a.call(this,o,l);if(A.isRegExp(a))return a.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,a){if(s=Mi(s),s){const l=A.findKey(this,s);return!!(l&&this[l]!==void 0&&(!a||Yu(this,this[l],l,a)))}return!1}delete(s,a){const l=this;let o=!1;function u(m){if(m=Mi(m),m){const f=A.findKey(l,m);f&&(!a||Yu(l,l[f],f,a))&&(delete l[f],o=!0)}}return A.isArray(s)?s.forEach(u):u(s),o}clear(s){const a=Object.keys(this);let l=a.length,o=!1;for(;l--;){const u=a[l];(!s||Yu(this,this[u],u,s,!0))&&(delete this[u],o=!0)}return o}normalize(s){const a=this,l={};return A.forEach(this,(o,u)=>{const m=A.findKey(l,u);if(m){a[m]=ko(o),delete a[u];return}const f=s?Wj(u):String(u).trim();f!==u&&delete a[u],a[f]=ko(o),l[f]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const a=Object.create(null);return A.forEach(this,(l,o)=>{l!=null&&l!==!1&&(a[o]=s&&A.isArray(l)?l.join(", "):l)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,a])=>s+": "+a).join(`
294`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...a){const l=new this(s);return a.forEach(o=>l.set(o)),l}static accessor(s){const l=(this[Qf]=this[Qf]={accessors:{}}).accessors,o=this.prototype;function u(m){const f=Mi(m);l[f]||(Gj(o,m),l[f]=!0)}return A.isArray(s)?s.forEach(u):u(s),this}};hn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors(hn.prototype,({value:t},s)=>{let a=s[0].toUpperCase()+s.slice(1);return{get:()=>t,set(l){this[a]=l}}});A.freezeMethods(hn);const Zj="[REDACTED ****]";function Kj(t){if(A.hasOwnProp(t,"toJSON"))return!0;let s=Object.getPrototypeOf(t);for(;s&&s!==Object.prototype;){if(A.hasOwnProp(s,"toJSON"))return!0;s=Object.getPrototypeOf(s)}return!1}function Yj(t,s){const a=new Set(s.map(u=>String(u).toLowerCase())),l=[],o=u=>{if(u===null||typeof u!="object"||A.isBuffer(u))return u;if(l.indexOf(u)!==-1)return;u instanceof hn&&(u=u.toJSON()),l.push(u);let m;if(A.isArray(u))m=[],u.forEach((f,x)=>{const h=o(f);A.isUndefined(h)||(m[x]=h)});else{if(!A.isPlainObject(u)&&Kj(u))return l.pop(),u;m=Object.create(null);for(const[f,x]of Object.entries(u)){const h=a.has(f.toLowerCase())?Zj:o(x);A.isUndefined(h)||(m[f]=h)}}return l.pop(),m};return o(t)}
vendor: 4,712 bytes, line 294
294let me=class tg extends Error{static from(s,a,l,o,u,m){const f=new tg(s.message,a||s.code,l,o,u);return Object.defineProperty(f,"cause",{__proto__:null,value:s,writable:!0,enumerable:!1,configurable:!0}),f.name=s.name,s.status!=null&&f.status==null&&(f.status=s.status),m&&Object.assign(f,m),f}constructor(s,a,l,o,u){super(s),Object.defineProperty(this,"message",{__proto__:null,value:s,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,a&&(this.code=a),l&&(this.config=l),o&&(this.request=o),u&&(this.response=u,this.status=u.status)}toJSON(){const s=this.config,a=s&&A.hasOwnProp(s,"redact")?s.redact:void 0,l=A.isArray(a)&&a.length>0?Yj(s,a):A.toJSONObject(s);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l,code:this.code,status:this.status}}};me.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";me.ERR_BAD_OPTION="ERR_BAD_OPTION";me.ECONNABORTED="ECONNABORTED";me.ETIMEDOUT="ETIMEDOUT";me.ECONNREFUSED="ECONNREFUSED";me.ERR_NETWORK="ERR_NETWORK";me.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";me.ERR_DEPRECATED="ERR_DEPRECATED";me.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";me.ERR_BAD_REQUEST="ERR_BAD_REQUEST";me.ERR_CANCELED="ERR_CANCELED";me.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";me.ERR_INVALID_URL="ERR_INVALID_URL";me.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Qj=null,ng=100;function vd(t){return A.isPlainObject(t)||A.isArray(t)}function sg(t){return A.endsWith(t,"[]")?t.slice(0,-2):t}function Qu(t,s,a){return t?t.concat(s).map(function(o,u){return o=sg(o),!a&&u?"["+o+"]":o}).join(a?".":""):s}function Xj(t){return A.isArray(t)&&!t.some(vd)}const Jj=A.toFlatObject(A,{},null,function(s){return/^is[A-Z]/.test(s)});function tc(t,s,a){if(!A.isObject(t))throw new TypeError("target must be an object");s=s||new FormData,a=A.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,M){return!A.isUndefined(M[C])});const l=a.metaTokens,o=a.visitor||z,u=a.dots,m=a.indexes,f=a.Blob||typeof Blob<"u"&&Blob,x=a.maxDepth===void 0?ng:a.maxDepth,h=f&&A.isSpecCompliantForm(s),v=[];if(!A.isFunction(o))throw new TypeError("visitor must be a function");function b(T){if(T===null)return"";if(A.isDate(T))return T.toISOString();if(A.isBoolean(T))return T.toString();if(!h&&A.isBlob(T))throw new me("Blob is not supported. Use a Buffer instead.");if(A.isArrayBuffer(T)||A.isTypedArray(T)){if(h&&typeof f=="function")return new f([T]);if(typeof Buffer<"u")return Buffer.from(T);throw new me("Blob is not supported. Use a Buffer instead.",me.ERR_NOT_SUPPORT)}return T}function w(T){if(T>x)throw new me("Object is too deeply nested ("+T+" levels). Max depth: "+x,me.ERR_FORM_DATA_DEPTH_EXCEEDED)}function I(T,C){if(x===1/0)return JSON.stringify(T);const M=[];return JSON.stringify(T,function(W,ae){if(!A.isObject(ae))return ae;for(;M.length&&M[M.length-1]!==this;)M.pop();return M.push(ae),w(C+M.length-1),ae})}function z(T,C,M){let O=T;if(A.isReactNative(s)&&A.isReactNativeBlob(T))return s.append(Qu(M,C,u),b(T)),!1;if(T&&!M&&typeof T=="object"){if(A.endsWith(C,"{}"))C=l?C:C.slice(0,-2),T=I(T,1);else if(A.isArray(T)&&Xj(T)||(A.isFileList(T)||A.endsWith(C,"[]"))&&(O=A.toArray(T)))return C=sg(C),O.forEach(function(ae,ge){!(A.isUndefined(ae)||ae===null)&&s.append(m===!0?Qu([C],ge,u):m===null?C:C+"[]",b(ae))}),!1}return vd(T)?!0:(s.append(Qu(M,C,u),b(T)),!1)}const E=Object.assign(Jj,{defaultVisitor:z,convertValue:b,isVisitable:vd});function _(T,C,M=0){if(!A.isUndefined(T)){if(w(M),v.indexOf(T)!==-1)throw new Error("Circular reference detected in "+C.join("."));v.push(T),A.forEach(T,function(W,ae){(!(A.isUndefined(W)||W===null)&&o.call(s,W,A.isString(ae)?ae.trim():ae,C,E))===!0&&_(W,C?C.concat(ae):[ae],M+1)}),v.pop()}}if(!A.isObject(t))throw new TypeError("data must be an object");return _(t),s}function Xf(t){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(l){return s[l]})}function Wd(t,s){this._pairs=[],t&&tc(t,this,s)}const rg=Wd.prototype;rg.append=function(s,a){this._pairs.push([s,a])};rg.toString=function(s){const a=s?l=>s.call(this,l,Xf):Xf;return this._pairs.map(function(o){return a(o[0])+"="+a(o[1])},"").join("&")};function e1(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ag(t,s,a){if(!s)return t;t=t||"";const l=A.isFunction(a)?{serialize:a}:a,o=A.getSafeProp(l,"encode")||e1,u=A.getSafeProp(l,"serialize");let m;if(u?m=u(s,l):m=A.isURLSearchParams(s)?s.toString():new Wd(s,l).toString(o),m){const f=t.indexOf("#");
vendor: 3,154 bytes, line 294
294f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+m}return t}class Jf{constructor(){this.handlers=[]}use(s,a,l){return this.handlers.push({fulfilled:s,rejected:a,synchronous:l?l.synchronous:!1,runWhen:l?l.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){A.forEach(this.handlers,function(l){l!==null&&s(l)})}}const Gd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},t1=typeof URLSearchParams<"u"?URLSearchParams:Wd,n1=typeof FormData<"u"?FormData:null,s1=typeof Blob<"u"?Blob:null,r1={isBrowser:!0,classes:{URLSearchParams:t1,FormData:n1,Blob:s1},protocols:["http","https","file","blob","url","data"]},Zd=typeof window<"u"&&typeof document<"u",bd=typeof navigator=="object"&&navigator||void 0,a1=Zd&&(!bd||["ReactNative","NativeScript","NS"].indexOf(bd.product)<0),i1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",l1=Zd&&window.location.href||"http://localhost",o1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Zd,hasStandardBrowserEnv:a1,hasStandardBrowserWebWorkerEnv:i1,navigator:bd,origin:l1},Symbol.toStringTag,{value:"Module"})),sn={...o1,...r1};function c1(t,s){return tc(t,new sn.classes.URLSearchParams,{visitor:function(a,l,o,u){return sn.isNode&&A.isBuffer(a)?(this.append(l,a.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...s})}const eh=ng;function ig(t){if(t>eh)throw new me("FormData field is too deeply nested ("+t+" levels). Max depth: "+eh,me.ERR_FORM_DATA_DEPTH_EXCEEDED)}function u1(t){const s=[],a=/\w+|\[(\w*)]/g;let l;for(;(l=a.exec(t))!==null;)ig(s.length),s.push(l[0]==="[]"?"":l[1]||l[0]);return s}function d1(t){const s={},a=Object.keys(t);let l;const o=a.length;let u;for(l=0;l<o;l++)u=a[l],s[u]=t[u];return s}function lg(t){function s(a,l,o,u){ig(u);let m=a[u++];if(m==="__proto__")return!0;const f=Number.isFinite(+m),x=u>=a.length;return m=!m&&A.isArray(o)?o.length:m,x?(A.hasOwnProp(o,m)?o[m]=A.isArray(o[m])?o[m].concat(l):[o[m],l]:o[m]=l,!f):((!A.hasOwnProp(o,m)||!A.isObject(o[m]))&&(o[m]=[]),s(a,l,o[m],u)&&A.isArray(o[m])&&(o[m]=d1(o[m])),!f)}if(A.isFormData(t)&&A.isFunction(t.entries)){const a={};return A.forEachEntry(t,(l,o)=>{s(u1(l),o,a,0)}),a}return null}const La=(t,s)=>t!=null&&A.hasOwnProp(t,s)?t[s]:void 0;function m1(t,s,a){if(A.isString(t))try{return(s||JSON.parse)(t),A.trim(t)}catch(l){if(l.name!=="SyntaxError")throw l}return(a||JSON.stringify)(t)}const rl={transitional:Gd,adapter:["xhr","http","fetch"],transformRequest:[function(s,a){const l=a.getContentType()||"",o=l.indexOf("application/json")>-1,u=A.isObject(s);if(u&&A.isHTMLForm(s)&&(s=new FormData(s)),A.isFormData(s))return o?JSON.stringify(lg(s)):s;if(A.isArrayBuffer(s)||A.isBuffer(s)||A.isStream(s)||A.isFile(s)||A.isBlob(s)||A.isReadableStream(s))return s;if(A.isArrayBufferView(s))return s.buffer;if(A.isURLSearchParams(s))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let f;
vendor: 11,560 bytes, line 294
294if(u){const x=La(this,"formSerializer");if(l.indexOf("application/x-www-form-urlencoded")>-1)return c1(s,x).toString();if((f=A.isFileList(s))||l.indexOf("multipart/form-data")>-1){const h=La(this,"env"),v=h&&h.FormData;return tc(f?{"files[]":s}:s,v&&new v,x)}}return u||o?(a.setContentType("application/json",!1),m1(s)):s}],transformResponse:[function(s){const a=La(this,"transitional")||rl.transitional,l=a&&a.forcedJSONParsing,o=La(this,"responseType"),u=o==="json";if(A.isResponse(s)||A.isReadableStream(s))return s;if(s&&A.isString(s)&&(l&&!o||u)){const f=!(a&&a.silentJSONParsing)&&u;try{return JSON.parse(s,La(this,"parseReviver"))}catch(x){if(f)throw x.name==="SyntaxError"?me.from(x,me.ERR_BAD_RESPONSE,this,null,La(this,"response")):x}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch","query"],t=>{rl.headers[t]={}});function Xu(t,s){const a=this||rl,l=s||a,o=hn.from(l.headers);let u=l.data;return A.forEach(t,function(f){u=f.call(a,u,o.normalize(),s?s.status:void 0)}),o.normalize(),u}function og(t){return!!(t&&t.__CANCEL__)}let al=class extends me{constructor(s,a,l){super(s??"canceled",me.ERR_CANCELED,a,l),this.name="CanceledError",this.__CANCEL__=!0}};function cg(t,s,a){const l=a.config.validateStatus;!a.status||!l||l(a.status)?t(a):s(new me("Request failed with status code "+a.status,a.status>=400&&a.status<500?me.ERR_BAD_REQUEST:me.ERR_BAD_RESPONSE,a.config,a.request,a))}function p1(t){const s=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return s&&s[1]||""}function f1(t,s){t=t||10;const a=new Array(t),l=new Array(t);let o=0,u=0,m;return s=s!==void 0?s:1e3,function(x){const h=Date.now(),v=l[u];m||(m=h),a[o]=x,l[o]=h;let b=u,w=0;for(;b!==o;)w+=a[b++],b=b%t;if(o=(o+1)%t,o===u&&(u=(u+1)%t),h-m<s)return;const I=v&&h-v;return I?Math.round(w*1e3/I):void 0}}function h1(t,s){let a=0,l=1e3/s,o,u;const m=(h,v=Date.now())=>{a=v,o=null,u&&(clearTimeout(u),u=null),t(...h)};return[(...h)=>{const v=Date.now(),b=v-a;b>=l?m(h,v):(o=h,u||(u=setTimeout(()=>{u=null,m(o)},l-b)))},()=>o&&m(o)]}const Io=(t,s,a=3)=>{let l=0;const o=f1(50,250);return h1(u=>{if(!u||typeof u.loaded!="number")return;const m=u.loaded,f=u.lengthComputable?u.total:void 0,x=f!=null?Math.min(m,f):m,h=Math.max(0,x-l),v=o(h);l=Math.max(l,x);const b={loaded:x,total:f,progress:f?x/f:void 0,bytes:h,rate:v||void 0,estimated:v&&f?(f-x)/v:void 0,event:u,lengthComputable:f!=null,[s?"download":"upload"]:!0};t(b)},a)},th=(t,s)=>{const a=t!=null;return[l=>s[0]({lengthComputable:a,total:t,loaded:l}),s[1]]},nh=t=>(...s)=>A.asap(()=>t(...s)),x1=sn.hasStandardBrowserEnv?((t,s)=>a=>(a=new URL(a,sn.origin),t.protocol===a.protocol&&t.host===a.host&&(s||t.port===a.port)))(new URL(sn.origin),sn.navigator&&/(msie|trident)/i.test(sn.navigator.userAgent)):()=>!0,g1=sn.hasStandardBrowserEnv?{write(t,s,a,l,o,u,m){if(typeof document>"u")return;const f=[`${t}=${encodeURIComponent(s)}`];A.isNumber(a)&&f.push(`expires=${new Date(a).toUTCString()}`),A.isString(l)&&f.push(`path=${l}`),A.isString(o)&&f.push(`domain=${o}`),u===!0&&f.push("secure"),A.isString(m)&&f.push(`SameSite=${m}`),document.cookie=f.join("; ")},read(t){if(typeof document>"u")return null;const s=document.cookie.split(";");for(let a=0;a<s.length;a++){const l=s[a].replace(/^\s+/,""),o=l.indexOf("=");if(o!==-1&&l.slice(0,o)===t)try{return decodeURIComponent(l.slice(o+1))}catch{return l.slice(o+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function y1(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function v1(t,s){return s?t.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):t}const b1=/^https?:(?!\/\/)/i,j1=/[\t\n\r]/g;function N1(t){let s=0;for(;s<t.length&&t.charCodeAt(s)<=32;)s++;return t.slice(s)}function w1(t){return N1(t).replace(j1,"")}function sh(t,s){if(typeof t=="string"&&b1.test(w1(t)))throw new me('Invalid URL: missing "//" after protocol',me.ERR_INVALID_URL,s)}function ug(t,s,a,l){sh(s,l);let o=!y1(s);return t&&(o||a===!1)?(sh(t,l),v1(t,s)):s}const rh=t=>t instanceof hn?{...t}:t;function Qr(t,s){t=t||{},s=s||{};const a=Object.create(null);Object.defineProperty(a,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function l(v,b,w,I){return A.isPlainObject(v)&&A.isPlainObject(b)?A.merge.call({caseless:I},v,b):A.isPlainObject(b)?A.merge({},b):A.isArray(b)?b.slice():b}function o(v,b,w,I){if(A.isUndefined(b)){if(!A.isUndefined(v))return l(void 0,v,w,I)}else return l(v,b,w,I)}function u(v,b){if(!A.isUndefined(b))return l(void 0,b)}function m(v,b){if(A.isUndefined(b)){if(!A.isUndefined(v))return l(void 0,v)}else return l(void 0,b)}function f(v){const b=A.hasOwnProp(s,"transitional")?s.transitional:void 0;if(!A.isUndefined(b))if(A.isPlainObject(b)){if(A.hasOwnProp(b,v))return b[v]}else return;const w=A.hasOwnProp(t,"transitional")?t.transitional:void 0;if(A.isPlainObject(w)&&A.hasOwnProp(w,v))return w[v]}function x(v,b,w){if(A.hasOwnProp(s,w))return l(v,b);if(A.hasOwnProp(t,w))return l(void 0,v)}const h={url:u,method:u,data:u,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,allowedSocketPaths:m,responseEncoding:m,validateStatus:x,headers:(v,b,w)=>o(rh(v),rh(b),w,!0)};return A.forEach(Object.keys({...t,...s}),function(b){if(b==="__proto__"||b==="constructor"||b==="prototype")return;const w=A.hasOwnProp(h,b)?h[b]:o,I=A.hasOwnProp(t,b)?t[b]:void 0,z=A.hasOwnProp(s,b)?s[b]:void 0,E=w(I,z,b);A.isUndefined(E)&&w!==x||(a[b]=E)}),A.hasOwnProp(s,"validateStatus")&&A.isUndefined(s.validateStatus)&&f("validateStatusUndefinedResolves")===!1&&(A.hasOwnProp(t,"validateStatus")?a.validateStatus=l(void 0,t.validateStatus):delete a.validateStatus),a}const S1=["content-type","content-length"];function _1(t,s,a){if(a!=="content-only"){t.set(s);return}Object.entries(s||{}).forEach(([l,o])=>{S1.includes(l.toLowerCase())&&t.set(l,o)})}const C1=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(s,a)=>String.fromCharCode(parseInt(a,16)));function dg(t){const s=Qr({},t),a=w=>A.hasOwnProp(s,w)?s[w]:void 0,l=a("data");let o=a("withXSRFToken");const u=a("xsrfHeaderName"),m=a("xsrfCookieName");let f=a("headers");const x=a("auth"),h=a("baseURL"),v=a("allowAbsoluteUrls"),b=a("url");if(s.headers=f=hn.from(f),s.url=ag(ug(h,b,v,s),a("params"),a("paramsSerializer")),x){const w=A.getSafeProp(x,"username")||"",I=A.getSafeProp(x,"password")||"";try{f.set("Authorization","Basic "+btoa(w+":"+(I?C1(I):"")))}catch(z){throw me.from(z,me.ERR_BAD_OPTION_VALUE,t)}}if(A.isFormData(l)&&(sn.hasStandardBrowserEnv||sn.hasStandardBrowserWebWorkerEnv||A.isReactNative(l)?f.setContentType(void 0):A.isFunction(l.getHeaders)&&_1(f,l.getHeaders(),a("formDataHeaderPolicy"))),sn.hasStandardBrowserEnv&&(A.isFunction(o)&&(o=o(s)),o===!0||o==null&&x1(s.url))){const I=u&&m&&g1.read(m);I&&f.set(u,I)}return s}const k1=typeof XMLHttpRequest<"u",E1=k1&&function(t){return new Promise(function(a,l){const o=dg(t);let u=o.data;const m=hn.from(o.headers).normalize();let{responseType:f,onUploadProgress:x,onDownloadProgress:h}=o,v,b,w,I,z;function E(){I&&I(),z&&z(),o.cancelToken&&o.cancelToken.unsubscribe(v),o.signal&&o.signal.removeEventListener("abort",v)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function T(){if(!_)return;const M=hn.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),W={data:!f||f==="text"||f==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:M,config:t,request:_};cg(function(ge){a(ge),E()},function(ge){l(ge),E()},W),_=null}"onloadend"in _?_.onloadend=T:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.startsWith("file:"))||setTimeout(T)},_.onabort=function(){_&&(l(new me("Request aborted",me.ECONNABORTED,t,_)),E(),_=null)},_.onerror=function(O){const W=O&&O.message?O.message:"Network Error",ae=new me(W,me.ERR_NETWORK,t,_);ae.event=O||null,l(ae),E(),_=null},_.ontimeout=function(){let O=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const W=o.transitional||Gd;o.timeoutErrorMessage&&(O=o.timeoutErrorMessage),l(new me(O,W.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,t,_)),E(),_=null},u===void 0&&m.setContentType(null),"setRequestHeader"in _&&A.forEach(eg(m),function(O,W){_.setRequestHeader(W,O)}),A.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),f&&f!=="json"&&(_.responseType=o.responseType),h&&([w,z]=Io(h,!0),_.addEventListener("progress",w)),x&&_.upload&&([b,I]=Io(x),_.upload.addEventListener("progress",b),_.upload.addEventListener("loadend",I)),(o.cancelToken||o.signal)&&(v=M=>{_&&(l(!M||M.type?new al(null,t,_):M),_.abort(),E(),_=null)},o.cancelToken&&o.cancelToken.subscribe(v),o.signal&&(o.signal.aborted?v():o.signal.addEventListener("abort",v)));const C=p1(o.url);if(C&&!sn.protocols.includes(C)){l(new me("Unsupported protocol "+C+":",me.ERR_BAD_REQUEST,t)),E();return}_.send(u||null)})},T1=(t,s)=>{if(t=t?t.filter(Boolean):[],!s&&!t.length)return;const a=new AbortController;let l=!1;const o=function(x){if(!l){l=!0,m();const h=x instanceof Error?x:this.reason;a.abort(h instanceof me?h:new al(h instanceof Error?h.message:h))}};let u=s&&setTimeout(()=>{u=null,o(new me(`timeout of ${s}ms exceeded`,me.ETIMEDOUT))},s);const m=()=>{t&&(u&&clearTimeout(u),u=null,t.forEach(x=>{x.unsubscribe?x.unsubscribe(o):x.removeEventListener("abort",o)}),t=null)};t.forEach(x=>x.addEventListener("abort",o,{once:!0}));const{signal:f}=a;return f.unsubscribe=()=>A.asap(m),f},P1=function*(t,s){let a=t.byteLength;if(a<s){yield t;return}let l=0,o;for(;l<a;)o=l+s,yield t.slice(l,o),l=o},R1=async function*(t,s){for await(const a of A1(t))yield*P1(a,s)},A1=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const s=t.getReader();try{for(;;){const{done:a,value:l}=await s.read();if(a)break;yield l}}finally{await s.cancel()}},ah=(t,s,a,l)=>{const o=R1(t,s);let u=0,m,f=x=>{m||(m=!0,l&&l(x))};return new ReadableStream({async pull(x){try{const{done:h,value:v}=await o.next();if(h){f(),x.close();return}let b=v.byteLength;if(a){let w=u+=b;a(w)}x.enqueue(new Uint8Array(v))}catch(h){throw f(h),h}},cancel(x){return f(x),o.return()}},{highWaterMark:2})},Do=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,O1=(t,s,a)=>s+2<a&&Do(t.charCodeAt(s+1))&&Do(t.charCodeAt(s+2));function L1(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const s=t.indexOf(",");if(s<0)return 0;const a=t.slice(5,s),l=t.slice(s+1);if(/;base64/i.test(a)){let m=l.length;const f=l.length;for(let I=0;I<f;I++)if(l.charCodeAt(I)===37&&I+2<f){const z=l.charCodeAt(I+1),E=l.charCodeAt(I+2);Do(z)&&Do(E)&&(m-=2,I+=2)}let x=0,h=f-1;const v=I=>I>=2&&l.charCodeAt(I-2)===37&&l.charCodeAt(I-1)===51&&(l.charCodeAt(I)===68||l.charCodeAt(I)===100);h>=0&&(l.charCodeAt(h)===61?(x++,h--):v(h)&&(x++,h-=3)),x===1&&h>=0&&(l.charCodeAt(h)===61||v(h))&&x++;const w=Math.floor(m/4)*3-(x||0);return w>0?w:0}let u=0;for(let m=0,f=l.length;m<f;m++){const x=l.charCodeAt(m);
vendor: 1,487 bytes, line 294
294if(x===37&&O1(l,m,f))u+=1,m+=2;else if(x<128)u+=1;else if(x<2048)u+=2;else if(x>=55296&&x<=56319&&m+1<f){const h=l.charCodeAt(m+1);h>=56320&&h<=57343?(u+=4,m++):u+=3}else u+=3}return u}const Kd="1.18.1",ih=64*1024,{isFunction:vo}=A,I1=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(s,a)=>String.fromCharCode(parseInt(a,16))),lh=t=>{if(!A.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},oh=(t,...s)=>{try{return!!t(...s)}catch{return!1}},D1=t=>{const s=t.indexOf("://");let a=t;return s!==-1&&(a=a.slice(s+3)),a.includes("@")||a.includes(":")},z1=t=>{const s=A.global!==void 0&&A.global!==null?A.global:globalThis,{ReadableStream:a,TextEncoder:l}=s;t=A.merge.call({skipUndefined:!0},{Request:s.Request,Response:s.Response},t);const{fetch:o,Request:u,Response:m}=t,f=o?vo(o):typeof fetch=="function",x=vo(u),h=vo(m);if(!f)return!1;const v=f&&vo(a),b=f&&(typeof l=="function"?(T=>C=>T.encode(C))(new l):async T=>new Uint8Array(await new u(T).arrayBuffer())),w=x&&v&&oh(()=>{let T=!1;const C=new u(sn.origin,{body:new a,method:"POST",get duplex(){return T=!0,"half"}}),M=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),T&&!M}),I=h&&v&&oh(()=>A.isReadableStream(new m("").body)),z={stream:I&&(T=>T.body)};f&&["text","arrayBuffer","blob","formData","stream"].forEach(T=>{!z[T]&&(z[T]=(C,M)=>{let O=C&&C[T];if(O)return O.call(C);throw new me(`Response type '${T}' is not supported`,me.ERR_NOT_SUPPORT,M)})});const E=async T=>{if(T==null)return 0;
vendor: 10,875 bytes, lines 294-300
294if(A.isBlob(T))return T.size;if(A.isSpecCompliantForm(T))return(await new u(sn.origin,{method:"POST",body:T}).arrayBuffer()).byteLength;if(A.isArrayBufferView(T)||A.isArrayBuffer(T))return T.byteLength;if(A.isURLSearchParams(T)&&(T=T+""),A.isString(T))return(await b(T)).byteLength},_=async(T,C)=>{const M=A.toFiniteNumber(T.getContentLength());return M??E(C)};return async T=>{let{url:C,method:M,data:O,signal:W,cancelToken:ae,timeout:ge,onDownloadProgress:De,onUploadProgress:Ne,responseType:G,headers:ke,withCredentials:Y="same-origin",fetchOptions:fe,maxContentLength:Ee,maxBodyLength:le}=dg(T);const Te=A.isNumber(Ee)&&Ee>-1,Fe=A.isNumber(le)&&le>-1,Z=pe=>A.hasOwnProp(T,pe)?T[pe]:void 0;let oe=o||fetch;G=G?(G+"").toLowerCase():"text";let Q=T1([W,ae&&ae.toAbortSignal()],ge),N=null;const F=Q&&Q.unsubscribe&&(()=>{Q.unsubscribe()});let we,te=null;const Be=()=>new me("Request body larger than maxBodyLength limit",me.ERR_BAD_REQUEST,T,N);try{let pe;const q=Z("auth");if(q){const ue=A.getSafeProp(q,"username")||"",dt=A.getSafeProp(q,"password")||"";pe={username:ue,password:dt}}if(D1(C)){const ue=new URL(C,sn.origin);if(!pe&&(ue.username||ue.password)){const dt=lh(ue.username),mt=lh(ue.password);pe={username:dt,password:mt}}(ue.username||ue.password)&&(ue.username="",ue.password="",C=ue.href)}if(pe&&(ke.delete("authorization"),ke.set("Authorization","Basic "+btoa(I1((pe.username||"")+":"+(pe.password||""))))),Te&&typeof C=="string"&&C.startsWith("data:")&&L1(C)>Ee)throw new me("maxContentLength size of "+Ee+" exceeded",me.ERR_BAD_RESPONSE,T,N);if(Fe&&M!=="get"&&M!=="head"){const ue=await E(O);if(typeof ue=="number"&&isFinite(ue)&&(we=ue,ue>le))throw Be()}const Oe=Fe&&(A.isReadableStream(O)||A.isStream(O)),We=(ue,dt,mt)=>ah(ue,ih,Et=>{if(Fe&&Et>le)throw te=Be();dt&&dt(Et)},mt);if(w&&M!=="get"&&M!=="head"&&(Ne||Oe)){if(we=we??await _(ke,O),we!==0||Oe){let ue=new u(C,{method:"POST",body:O,duplex:"half"}),dt;if(A.isFormData(O)&&(dt=ue.headers.get("content-type"))&&ke.setContentType(dt),ue.body){const[mt,Et]=Ne&&th(we,Io(nh(Ne)))||[];O=We(ue.body,mt,Et)}}}else if(Oe&&!x&&v&&M!=="get"&&M!=="head")O=We(O);else if(Oe&&x&&!w&&M!=="get"&&M!=="head")throw new me("Stream request bodies are not supported by the current fetch implementation",me.ERR_NOT_SUPPORT,T,N);A.isString(Y)||(Y=Y?"include":"omit");const tt=x&&"credentials"in u.prototype;if(A.isFormData(O)){const ue=ke.getContentType();ue&&/^multipart\/form-data/i.test(ue)&&!/boundary=/i.test(ue)&&ke.delete("content-type")}ke.set("User-Agent","axios/"+Kd,!1);const Ue={...fe,signal:Q,method:M.toUpperCase(),headers:eg(ke.normalize()),body:O,duplex:"half",credentials:tt?Y:void 0};N=x&&new u(C,Ue);let nt=await(x?oe(N,fe):oe(C,Ue));const yt=hn.from(nt.headers);if(Te){const ue=A.toFiniteNumber(yt.getContentLength());if(ue!=null&&ue>Ee)throw new me("maxContentLength size of "+Ee+" exceeded",me.ERR_BAD_RESPONSE,T,N)}const Le=I&&(G==="stream"||G==="response");if(I&&nt.body&&(De||Te||Le&&F)){const ue={};["status","statusText","headers"].forEach(Wt=>{ue[Wt]=nt[Wt]});const dt=A.toFiniteNumber(yt.getContentLength()),[mt,Et]=De&&th(dt,Io(nh(De),!0))||[];let Ht=0;const vt=Wt=>{if(Te&&(Ht=Wt,Ht>Ee))throw new me("maxContentLength size of "+Ee+" exceeded",me.ERR_BAD_RESPONSE,T,N);mt&&mt(Wt)};nt=new m(ah(nt.body,ih,vt,()=>{Et&&Et(),F&&F()}),ue)}G=G||"text";let ut=await z[A.findKey(z,G)||"text"](nt,T);if(Te&&!I&&!Le){let ue;if(ut!=null&&(typeof ut.byteLength=="number"?ue=ut.byteLength:typeof ut.size=="number"?ue=ut.size:typeof ut=="string"&&(ue=typeof l=="function"?new l().encode(ut).byteLength:ut.length)),typeof ue=="number"&&ue>Ee)throw new me("maxContentLength size of "+Ee+" exceeded",me.ERR_BAD_RESPONSE,T,N)}return!Le&&F&&F(),await new Promise((ue,dt)=>{cg(ue,dt,{data:ut,headers:hn.from(nt.headers),status:nt.status,statusText:nt.statusText,config:T,request:N})})}catch(pe){if(F&&F(),Q&&Q.aborted&&Q.reason instanceof me){const q=Q.reason;throw q.config=T,N&&(q.request=N),pe!==q&&Object.defineProperty(q,"cause",{__proto__:null,value:pe,writable:!0,enumerable:!1,configurable:!0}),q}if(te)throw N&&!te.request&&(te.request=N),te;if(pe instanceof me)throw N&&!pe.request&&(pe.request=N),pe;if(pe&&pe.name==="TypeError"&&/Load failed|fetch/i.test(pe.message)){const q=new me("Network Error",me.ERR_NETWORK,T,N,pe&&pe.response);throw Object.defineProperty(q,"cause",{__proto__:null,value:pe.cause||pe,writable:!0,enumerable:!1,configurable:!0}),q}throw me.from(pe,pe&&pe.code,T,N,pe&&pe.response)}}},M1=new Map,mg=t=>{let s=t&&t.env||{};const{fetch:a,Request:l,Response:o}=s,u=[l,o,a];let m=u.length,f=m,x,h,v=M1;for(;f--;)x=u[f],h=v.get(x),h===void 0&&v.set(x,h=f?new Map:z1(s)),v=h;return h};mg();const Yd={http:Qj,xhr:E1,fetch:{get:mg}};A.forEach(Yd,(t,s)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:s})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:s})}});const ch=t=>`- ${t}`,U1=t=>A.isFunction(t)||t===null||t===!1;function F1(t,s){t=A.isArray(t)?t:[t];const{length:a}=t;let l,o;const u={};for(let m=0;m<a;m++){l=t[m];let f;if(o=l,!U1(l)&&(o=Yd[(f=String(l)).toLowerCase()],o===void 0))throw new me(`Unknown adapter '${f}'`);if(o&&(A.isFunction(o)||(o=o.get(s))))break;u[f||"#"+m]=o}if(!o){const m=Object.entries(u).map(([x,h])=>`adapter ${x} `+(h===!1?"is not supported by the environment":"is not available in the build"));let f=a?m.length>1?`since :
295`+m.map(ch).join(`
296`):" "+ch(m[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+f,me.ERR_NOT_SUPPORT)}return o}const pg={getAdapter:F1,adapters:Yd};function Ju(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new al(null,t)}function uh(t){return Ju(t),t.headers=hn.from(t.headers),t.data=Xu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),pg.getAdapter(t.adapter||rl.adapter,t)(t).then(function(l){Ju(t),t.response=l;try{l.data=Xu.call(t,t.transformResponse,l)}finally{delete t.response}return l.headers=hn.from(l.headers),l},function(l){if(!og(l)&&(Ju(t),l&&l.response)){t.response=l.response;try{l.response.data=Xu.call(t,t.transformResponse,l.response)}finally{delete t.response}l.response.headers=hn.from(l.response.headers)}return Promise.reject(l)})}const nc={};["object","boolean","number","function","string","symbol"].forEach((t,s)=>{nc[t]=function(l){return typeof l===t||"a"+(s<1?"n ":" ")+t}});const dh={};nc.transitional=function(s,a,l){function o(u,m){return"[Axios v"+Kd+"] Transitional option '"+u+"'"+m+(l?". "+l:"")}return(u,m,f)=>{if(s===!1)throw new me(o(m," has been removed"+(a?" in "+a:"")),me.ERR_DEPRECATED);return a&&!dh[m]&&(dh[m]=!0,console.warn(o(m," has been deprecated since v"+a+" and will be removed in the near future"))),s?s(u,m,f):!0}};nc.spelling=function(s){return(a,l)=>(console.warn(`${l} is likely a misspelling of ${s}`),!0)};function $1(t,s,a){if(typeof t!="object"||t===null)throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const l=Object.keys(t);let o=l.length;for(;o-- >0;){const u=l[o],m=Object.prototype.hasOwnProperty.call(s,u)?s[u]:void 0;if(m){const f=t[u],x=f===void 0||m(f,u,t);if(x!==!0)throw new me("option "+u+" must be "+x,me.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new me("Unknown option "+u,me.ERR_BAD_OPTION)}}const Eo={assertOptions:$1,validators:nc},pn=Eo.validators;let Gr=class{constructor(s){this.defaults=s||{},this.interceptors={request:new Jf,response:new Jf}}async request(s,a){try{return await this._request(s,a)}catch(l){if(l instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const u=(()=>{if(!o.stack)return"";const m=o.stack.indexOf(`
297`);return m===-1?"":o.stack.slice(m+1)})();try{if(!l.stack)l.stack=u;else if(u){const m=u.indexOf(`
298`),f=m===-1?-1:u.indexOf(`
299`,m+1),x=f===-1?"":u.slice(f+1);String(l.stack).endsWith(x)||(l.stack+=`
300`+u)}}catch{}}throw l}}_request(s,a){typeof s=="string"?(a=a||{},a.url=s):a=s||{},a=Qr(this.defaults,a);const{transitional:l,paramsSerializer:o,headers:u}=a;l!==void 0&&Eo.assertOptions(l,{silentJSONParsing:pn.transitional(pn.boolean),forcedJSONParsing:pn.transitional(pn.boolean),clarifyTimeoutError:pn.transitional(pn.boolean),legacyInterceptorReqResOrdering:pn.transitional(pn.boolean),advertiseZstdAcceptEncoding:pn.transitional(pn.boolean),validateStatusUndefinedResolves:pn.transitional(pn.boolean)},!1),o!=null&&(A.isFunction(o)?a.paramsSerializer={serialize:o}:Eo.assertOptions(o,{encode:pn.function,serialize:pn.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),Eo.assertOptions(a,{baseUrl:pn.spelling("baseURL"),withXsrfToken:pn.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let m=u&&A.merge(u.common,u[a.method]);u&&A.forEach(["delete","get","head","post","put","patch","query","common"],z=>{delete u[z]}),a.headers=hn.concat(m,u);const f=[];let x=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(a)===!1)return;x=x&&E.synchronous;const _=a.transitional||Gd;_&&_.legacyInterceptorReqResOrdering?f.unshift(E.fulfilled,E.rejected):f.push(E.fulfilled,E.rejected)});const h=[];this.interceptors.response.forEach(function(E){h.push(E.fulfilled,E.rejected)});let v,b=0,w;if(!x){const z=[uh.bind(this),void 0];for(z.unshift(...f),z.push(...h),w=z.length,v=Promise.resolve(a);b<w;)v=v.then(z[b++],z[b++]);return v}w=f.length;let I=a;for(;b<w;){const z=f[b++],E=f[b++];try{I=z(I)}catch(_){E.call(this,_);break}}try{v=uh.call(this,I)}catch(z){return Promise.reject(z)}for(b=0,w=h.length;b<w;)v=v.then(h[b++],h[b++]);return v}getUri(s){s=Qr(this.defaults,s);const a=ug(s.baseURL,s.url,s.allowAbsoluteUrls,s);return ag(a,s.params,s.paramsSerializer)}};A.forEach(["delete","get","head","options"],function(s){Gr.prototype[s]=function(a,l){return this.request(Qr(l||{},{method:s,url:a,data:l&&A.hasOwnProp(l,"data")?l.data:void 0}))}});A.forEach(["post","put","patch","query"],function(s){function a(l){return function(u,m,f){return this.request(Qr(f||{},{method:s,headers:l?{"Content-Type":"multipart/form-data"}:{},url:u,data:m}))}}Gr.prototype[s]=a(),s!=="query"&&(Gr.prototype[s+"Form"]=a(!0))});let B1=class fg{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(u){a=u});const l=this;this.promise.then(o=>{if(!l._listeners)return;let u=l._listeners.length;for(;u-- >0;)l._listeners[u](o);l._listeners=null}),this.promise.then=o=>{let u;const m=new Promise(f=>{l.subscribe(f),u=f}).then(o);return m.cancel=function(){l.unsubscribe(u)},m},s(function(u,m,f){l.reason||(l.reason=new al(u,m,f),a(l.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
300subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const a=this._listeners.indexOf(s);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const s=new AbortController,a=l=>{s.abort(l)};return this.subscribe(a),s.signal.unsubscribe=()=>this.unsubscribe(a),s.signal}static source(){let s;return{token:new fg(function(o){s=o}),cancel:s}}};function q1(t){return function(a){return t.apply(null,a)}}function V1(t){return A.isObject(t)&&t.isAxiosError===!0}const jd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(jd).forEach(([t,s])=>{jd[s]=t});function hg(t){const s=new Gr(t),a=Hx(Gr.prototype.request,s);return A.extend(a,Gr.prototype,s,{allOwnKeys:!0}),A.extend(a,s,null,{allOwnKeys:!0}),a.create=function(o){return hg(Qr(t,o))},a}const Pt=hg(rl);Pt.Axios=Gr;Pt.CanceledError=al;Pt.CancelToken=B1;Pt.isCancel=og;Pt.VERSION=Kd;Pt.toFormData=tc;Pt.AxiosError=me;Pt.Cancel=Pt.CanceledError;Pt.all=function(s){return Promise.all(s)};Pt.spread=q1;Pt.isAxiosError=V1;Pt.mergeConfig=Qr;Pt.AxiosHeaders=hn;Pt.formToJSON=t=>lg(A.isHTMLForm(t)?new FormData(t):t);Pt.getAdapter=pg.getAdapter;Pt.HttpStatusCode=jd;Pt.default=Pt;const{Axios:gC,AxiosError:yC,CanceledError:vC,isCancel:bC,CancelToken:jC,VERSION:NC,all:wC,Cancel:SC,isAxiosError:_C,spread:CC,toFormData:kC,AxiosHeaders:H1,HttpStatusCode:EC,formToJSON:TC,getAdapter:PC,mergeConfig:RC,create:AC}=Pt,W1="/v1",sc="cs_portal_token",mh="sponsor";function G1(t){return t?t.startsWith("/portal/projects")||t.startsWith("/portal/invoices")||t.startsWith("/portal/payments/config")||t.startsWith("/portal/checkout")||t.startsWith("/auth/portal/"):!1}const Ae=Pt.create({baseURL:W1});Ae.interceptors.request.use(t=>{const s=H1.from(t.headers),a=localStorage.getItem(sc);return a&&s.set("Authorization",`Bearer ${a}`),G1(t.url)&&(s.set("X-Site-Context",mh),t.params={...t.params,site:mh}),t.headers=s,t});function Z1(){return localStorage.getItem(sc)}function Qd(t){localStorage.setItem(sc,t)}function ph(){localStorage.removeItem(sc)}async function K1(t,s){const{data:a}=await Ae.post("/auth/portal/login",{email:t,password:s});return Qd(a.token),a}async function Y1(t,s,a,l="client"){const{data:o}=await Ae.post("/auth/portal/register",{email:t,password:s,displayName:a,intent:l});if(o.needsActivation)return{needsActivation:!0,message:o.message};if(!o.token||!o.user)throw new Error("Réponse d'inscription invalide");return Qd(o.token),{needsActivation:!1,token:o.token,user:o.user}}async function Q1(t){const{data:s}=await Ae.post("/auth/portal/request-activation",{email:t});return s}async function X1(t,s){const{data:a}=await Ae.post("/auth/portal/activate",{token:t,password:s});return Qd(a.token),a}async function J1(t){const{data:s}=await Ae.post("/auth/portal/forgot-password",{email:t});return s}async function eN(t,s){const{data:a}=await Ae.post("/auth/portal/reset-password",{token:t,password:s});return a}function Va(t,s){var a,l;if(t&&typeof t=="object"&&"response"in t){const o=t.response;if((a=o==null?void 0:o.data)!=null&&a.message)return o.data.message;if((l=o==null?void 0:o.data)!=null&&l.error)return o.data.error}return t instanceof Error&&t.message?t.message:s}async function tN(){const{data:t}=await Ae.get("/auth/me");return t.user}async function Xd(){const{data:t}=await Ae.get("/portal/services");return t}async function nN(){const{data:t}=await Ae.get("/portal/projects");return t}async function sN(t){const{data:s}=await Ae.get(`/portal/projects/${t}`);return s}async function xg(t,s){const{data:a}=await Ae.patch(`/portal/projects/${t}`,s);return a}
300async function rN(t){const{data:s}=await Ae.post("/portal/projects",t);return s}async function fh(t,s=!1){const{data:a}=await Ae.post("/portal/projects/suggest-metadata",{description:t,slugAnonymous:s});return a}async function aN(t,s){const{data:a}=await Ae.post(`/portal/projects/${t}/service-orders`,s);return a}async function iN(){const{data:t}=await Ae.get("/portal/payments/config");return t}async function lN(t){const{data:s}=await Ae.post(`/portal/projects/${t}/checkout`);return s}async function oN(t){const{data:s}=await Ae.post("/portal/checkout/sync",{sessionId:t});return s}async function cN(t){const{data:s}=await Ae.get(`/portal/projects/${t}/ai-status`);return s}async function hh(t,s){const{data:a}=await Ae.post(`/portal/projects/${t}/ai/suggest`,s);return a}async function uN(t,s){const{data:a}=await Ae.post(`/portal/projects/${t}/ai/apply`,s);return a}async function Jd(){const{data:t}=await Ae.get("/categories");return t}async function dN(){const{data:t}=await Ae.get("/audiences",{params:{active:"true"}});return t}async function em(){const{data:t}=await Ae.get("/regions");return t.filter(s=>s.level==="region")}async function rc(){const{data:t}=await Ae.get("/portal/billing");return t}async function mN(t){const{data:s}=await Ae.patch("/portal/billing",t);return s}async function pN(){const{data:t}=await Ae.get("/portal/invoices");return t}async function fN(t){const{data:s}=await Ae.get(`/portal/invoices/${t}/pdf`,{responseType:"blob"});return s}async function hN(){const{data:t}=await Ae.get("/portal/documents");return t}async function xN(t){const{data:s}=await Ae.get(`/portal/documents/${t}/download`);return s}async function gg(t,s){const a=new FormData;a.append("kind",t),a.append("file",s);const{data:l}=await Ae.post("/portal/uploads",a);return l}async function gN(){const{data:t}=await Ae.get("/portal/contributor-program");return t}async function yN(t){const{data:s}=await Ae.get(`/portal/projects/${t}/matches`);return s}async function vN(t,s,a){const{data:l}=await Ae.patch(`/portal/projects/${t}/matches/${s}`,a);return l}async function bN(){const{data:t}=await Ae.get("/portal/sponsor/memberships");return t}async function jN(){const{data:t}=await Ae.get("/portal/sponsor/claims");return t}async function NN(t){const{data:s}=await Ae.get("/portal/sponsor/companies/search",{params:{q:t,limit:15}});return s}async function wN(t){const{data:s}=await Ae.post("/portal/sponsor/claims",{companyId:t.companyId,message:t.message||null,siren:t.siren||null,evidenceDocumentUrl:t.evidenceDocumentUrl||null});return s}async function SN(t){const{data:s}=await Ae.get(`/portal/sponsor/companies/${t}`);return s}async function _N(t,s){const{data:a}=await Ae.patch(`/portal/sponsor/companies/${t}`,s);return a}async function CN(t){const{data:s}=await Ae.get(`/portal/sponsor/companies/${t}/themes`);return s.themes}async function kN(t,s){const{data:a}=await Ae.patch(`/portal/sponsor/companies/${t}/themes`,{themes:s});return a.themes}async function EN(t){const{data:s}=await Ae.get(`/portal/sponsor/companies/${t}/categories`);return s.categoryIds}async function TN(t,s){const{data:a}=await Ae.put(`/portal/sponsor/companies/${t}/categories`,{categoryIds:s});return a.categoryIds}async function PN(t){const{data:s}=await Ae.get(`/portal/sponsor/companies/${t}/audiences`);return s.audienceIds}async function RN(t,s){const{data:a}=await Ae.put(`/portal/sponsor/companies/${t}/audiences`,{audienceIds:s});return a.audienceIds}async function AN(t){const{data:s}=await Ae.get(`/portal/sponsor/companies/${t}/eligibility`);return s}async function ON(t,s){const{data:a}=await Ae.patch(`/portal/sponsor/companies/${t}/eligibility`,s);return a}async function LN(t){const{data:s}=await Ae.get(`/portal/sponsor/companies/${t}/required-documents`);return s}async function IN(t,s){const{data:a}=await Ae.patch(`/portal/sponsor/companies/${t}/required-documents`,s);return a}async function DN(t){const{data:s}=await Ae.get(`/portal/sponsor/companies/${t}/feedback`);return s}async function zN(t,s,a){const{data:l}=await Ae.post(`/portal/sponsor/companies/${t}/feedback/${s}/reply`,{reply:a});return l}async function MN(){const{data:t}=await Ae.get("/portal/company-suggestions");return t}async function UN(t){const{data:s}=await Ae.get("/portal/company-suggestions/search",{params:{q:t,limit:8}});return s}async function FN(t){const{data:s}=await Ae.post("/portal/company-suggestions",t);return s}const zo="cs_portal_debug_mode";function $N(){try{return localStorage.getItem(zo)==="true"}catch{return!1}}function xh(t){try{t?localStorage.setItem(zo,"true"):localStorage.removeItem(zo)}catch{}}const yg=g.createContext(null);function BN({children:t}){const[s,a]=g.useState(null),[l,o]=g.useState(!0),u=g.useCallback(async()=>
300{if(!Z1()){a(null),o(!1);return}try{const v=await tN();a(v)}catch{ph(),a(null)}finally{o(!1)}},[]);g.useEffect(()=>{u()},[u]);const m=g.useCallback(async(v,b)=>{const{user:w}=await K1(v,b);a(w)},[]),f=g.useCallback(async(v,b,w,I="client")=>{const z=await Y1(v,b,w,I);return z.needsActivation?{needsActivation:!0,message:z.message}:(a(z.user),{needsActivation:!1})},[]),x=g.useCallback(()=>{ph(),localStorage.removeItem(zo),a(null)},[]),h=g.useMemo(()=>({user:s,loading:l,login:m,register:f,logout:x,refresh:u}),[s,l,m,f,x,u]);return r.jsx(yg.Provider,{value:h,children:t})}function qn(){const t=g.useContext(yg);if(!t)throw new Error("usePortalAuth must be used within PortalAuthProvider");return t}const vg=g.createContext(null);function qN({children:t}){const{user:s}=qn(),a=(s==null?void 0:s.role)==="admin",[l,o]=g.useState(()=>$N());g.useEffect(()=>{a||(o(!1),xh(!1))},[a]);const u=g.useCallback(f=>{a&&(o(f),xh(f))},[a]),m=g.useMemo(()=>({debugEnabled:a&&l,canToggleDebug:a,setDebugEnabled:u}),[l,a,u]);return r.jsx(vg.Provider,{value:m,children:t})}function tm(){const t=g.useContext(vg);if(!t)throw new Error("useAdminDebugMode must be used within DebugModeProvider");return t}const VN="/v1",ft=Pt.create({baseURL:VN});function HN(t){return t==null?void 0:Array.isArray(t)?t.map(String).map(l=>l.trim()).filter(Boolean).join(",")||void 0:String(t).trim()||void 0}async function bg(t){const{data:s}=await ft.get("/search/sponsors",{params:{...t,audience:HN(t.audience),structureType:"SPONSOR,BOTH"}});return s}async function WN(t){const{data:s}=await ft.get(`/companies/slug/${t}`);return s}async function GN(t){const{data:s}=await ft.get(`/companies/${t}/score`);return s}async function ZN(t){const{data:s}=await ft.get(`/companies/${t}/eligibility`);return s}async function KN(t){const{data:s}=await ft.get(`/companies/${t}/campaigns`);return s}async function YN(t){const s=[];let a=1,l=1;for(;a<=l;){const{data:o}=await ft.get(`/companies/${t}/foundations`,{params:{page:a,limit:100}});s.push(...o.data),l=o.meta.totalPages,a+=1}return s}async function QN(t){const{data:s}=await ft.get(`/companies/${t}/categories`);return s.map(a=>a.category)}async function XN(t){const{data:s}=await ft.get(`/companies/${t}/audiences`);return s.map(a=>a.audience)}async function gh(t){const{data:s}=await ft.get(`/companies/${t}/feedback`);return s.filter(a=>a.isPublished)}async function JN(t,s){const{data:a}=await Ae.post(`/companies/${t}/feedback`,s);return a}async function jg(){const{data:t}=await ft.get("/categories");return t}async function ew(){const{data:t}=await ft.get("/audiences",{params:{active:"true"}});return t}async function Ng(){const{data:t}=await ft.get("/regions");return t}async function nm(t){const{data:s}=await ft.get("/public/projects",{params:{...t,site:"sponsor"}});return s}async function tw(t=5){const{data:s}=await ft.get("/public/categories/top",{params:{limit:t,site:"sponsor"}});return s}async function nw(t){const{data:s}=await ft.get(`/public/projects/slug/${t}`,{params:{site:"sponsor"}});return s}async function wg(){const{data:t}=await ft.get("/public/contributor-program/tier-discounts");return t}async function Sg(){const{data:t}=await ft.get("/public/contributor-program/point-settings");return t}async function sw(){const{data:t}=await ft.get("/portal/services");return t}async function rw(t,s="sponsor"){const{data:a}=await ft.get(`/public/legal-documents/${t}`,{params:{site:s}});return a}async function aw(t="sponsor"){const{data:s}=await ft.get("/public/site-settings",{params:{site:t}});return s}async function yh(t){const{data:s}=await ft.get(`/public/pages/${encodeURIComponent(t)}`,{params:{site:"sponsor"}});return s}async function iw(t){const{data:s}=await ft.get("/public/resolve-path",{params:{path:t,site:"sponsor"}});return s&&typeof s=="object"&&"type"in s?s:{type:"miss"}}async function lw(t="header"){const{data:s}=await ft.get("/public/nav-menu",{params:{zone:t,site:"sponsor"}});return s}async function _g(t={}){const{data:s}=await ft.get("/public/news",{params:{site:"sponsor",page:t.page??1,limit:t.limit??12}});return s}async function ow(t){const{data:s}=await ft.get(`/public/news/${encodeURIComponent(t)}`,{params:{site:"sponsor"}});return s}async function cw(){const{data:t}=await ft.get("/public/redirects",{params:{site:"sponsor"}});return t}const Ia={};function Cg(t){const[s,a]=g.useState(Ia[t]??[]),[l,o]=g.useState(!Ia[t]);return g.useEffect(()=>{let u=!1;return Ia[t]&&(a(Ia[t]),o(!1)),lw(t).then(m=>{u||(Ia[t]=m,a(m))}).catch(()=>{!u&&!Ia[t]&&a([])}).finally(()=>{u||o(!1)}),()=>{u=!0}},[t]),{items:s,loading:l}}const vh=({isActive:t})=>`text-sm font-medium transition ${t?"text-brand":"text-slate-600 hover:text-brand"}`,kg=({isActive:t})=>`block rounded-lg px-3 py-2 text-sm transition ${t?"bg-brand/10 font-medium text-brand":"text-slate-700 hover:bg-slate-50 hover:text-brand"}`,uw=[{id:"f-home",label:"Accueil",href:"/",external:!1,children:[]},{id:"f-projets",label:"Projets",href:"/projets",external:!1,children:[]},{id:"f-recherche",label:"Rechercher",href:"/recherche",external:!1,children:[]},{id:"f-rewards",label:"Récompenses",href:"/programme-contributeur",external:!1,children:[]},{id:"f-publier",label:"Publier",href:"/publier",external:!1,children:[]}];function dw(t,s){return t?t==="/"?s==="/":s===t||s.startsWith(`${t}/`):!1}function To({item:t,className:s,onClick:a}){return t.external&&t.href?r.jsx("a",{href:t.href,className:typeof s=="function"?s({isActive:!1}):s,target:"_blank",rel:"noopener noreferrer",onClick:a,children:t.label}):t.href?r.jsx(Nb,{to:t.href,className:s,end:t.href==="/",onClick:a,children:t.label}):r.jsx("span",{className:"text-sm font-medium text-slate-600",children:t.label})}function mw({item:t}){const{pathname:s}=$n(),[a,l]=g.useState(!1),o=g.useRef(null),u=g.useId(),m=t.children.some(h=>dw(h.href,s)),f=()=>{o.current&&(clearTimeout(o.current),o.current=null)},x=()=>{f(),o.current=setTimeout(()=>l(!1),120)};return g.useEffect(()=>()=>f(),[]),r.jsxs("div",{className:"relative",onMouseEnter:()=>{f(),l(!0)},onMouseLeave:x,children:[r.jsxs("button",{type:"button",className:`inline-flex items-center gap-1 text-sm font-medium transition hover:text-brand ${a||m?"text-brand":"text-slate-600"}`,"aria-expanded":a,"aria-controls":u,onClick:()=>l(h=>!h),children:[t.label,r.jsx(Ob,{size:14,className:`transition ${a?"rotate-180":""}`})]}),r.jsxs("div",{id:u,className:`absolute left-0 top-full z-[60] min-w-[240px] ${a?"visible":"invisible pointer-events-none"}`,role:"menu",children:[r.jsx("div",{className:"h-2","aria-hidden":!0}),r.jsx("div",{className:"rounded-xl border border-slate-100 bg-white py-2 shadow-lg",children:t.children.map(h=>r.jsx("div",{className:"px-1",role:"none",children:r.jsx(To,{item:h,className:kg})}
300,h.id))})]})]})}function pw(){const[t,s]=g.useState(!1),{user:a}=qn(),{debugEnabled:l}=tm(),{items:o}=Cg("header"),u=o.length>0?o:uw;return r.jsxs("header",{className:"sticky top-0 z-50 overflow-visible border-b border-slate-100 bg-white/95 backdrop-blur-md",children:[r.jsxs("div",{className:"mx-auto flex max-w-7xl items-center justify-between gap-4 px-4 py-4 sm:px-6 lg:px-8",children:[r.jsxs(V,{to:"/",className:"flex shrink-0 items-center gap-3",children:[r.jsx("img",{src:"/brand/logo-mark-256.png",alt:"Connecting Sponsors",className:"h-10 w-10 rounded-xl object-contain",width:40,height:40}),r.jsxs("div",{className:"hidden sm:block",children:[r.jsx("div",{className:"text-sm font-bold text-slate-900",children:"Connecting Sponsors"}),r.jsx("div",{className:"text-xs text-slate-500",children:"Trouvez votre sponsor"})]})]}),r.jsx("nav",{className:"hidden items-center gap-5 lg:flex xl:gap-7",children:u.map(m=>m.children.length>0?r.jsx(mw,{item:m},m.id):r.jsx(To,{item:m,className:vh},m.id))}),r.jsxs("div",{className:"hidden shrink-0 items-center gap-3 md:flex",children:[l&&r.jsxs(V,{to:"/portail",className:"inline-flex items-center gap-1.5 rounded-full border border-violet-300 bg-violet-50 px-3 py-1.5 text-xs font-semibold text-violet-800",children:[r.jsx(Ux,{size:14}),"Debug actif"]}),r.jsxs(V,{to:"/recherche",className:"btn-secondary",children:[r.jsx(Ki,{size:16}),"Trouver un sponsor"]}),a?r.jsxs(V,{to:"/portail",className:"btn-primary",children:[r.jsx(Zf,{size:16}),"Mon espace"]}):r.jsx(V,{to:"/portail/connexion",className:"btn-primary",children:"Connexion"})]}),r.jsx("button",{type:"button",className:"rounded-lg p-2 text-slate-600 lg:hidden",onClick:()=>s(m=>!m),"aria-label":"Menu",children:t?r.jsx(qd,{size:22}):r.jsx(Bb,{size:22})})]}),t&&r.jsx("div",{className:"border-t border-slate-100 bg-white px-4 py-4 lg:hidden",children:r.jsxs("nav",{className:"flex flex-col gap-3",children:[u.map(m=>r.jsx("div",{className:"flex flex-col gap-2",children:m.children.length>0?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"text-sm font-semibold text-slate-900",children:m.label}),r.jsx("div",{className:"ml-3 flex flex-col gap-1 border-l border-slate-100 pl-3",children:m.children.map(f=>r.jsx(To,{item:f,className:kg,onClick:()=>s(!1)},f.id))})]}):r.jsx(To,{item:m,className:vh,onClick:()=>s(!1)})},m.id)),r.jsxs(V,{to:"/recherche",className:"btn-secondary",onClick:()=>s(!1),children:[r.jsx(Ki,{size:16}),"Trouver un sponsor"]}),r.jsxs(V,{to:a?"/portail":"/portail/connexion",className:"btn-primary",onClick:()=>s(!1),children:[r.jsx(Zf,{size:16}),a?"Mon espace":"Connexion"]})]})})]})}const fw=["mentions-legales","cgu","politique-confidentialite","cookies"],hw=[{code:"mentions-legales",label:"Mentions légales"},{code:"cgu",label:"CGU"},{code:"politique-confidentialite",label:"Confidentialité"},{code:"cookies",label:"Cookies"}],Eg="cs_cookie_consent",Tg=1,Hi="gestion-cookies",bh={necessary:{label:"Strictement nécessaires",description:"Indispensables au fonctionnement du site (connexion, sécurité, mémorisation de vos choix cookies). Toujours actifs.",required:!0},analytics:{label:"Mesure d’audience",description:"Aident à comprendre l’utilisation du site pour l’améliorer. Aucun traceur n’est déposé sans votre accord.",required:!1},marketing:{label:"Marketing / personnalisation",description:"Utilisés pour des contenus personnalisés ou des campagnes. Non utilisés actuellement sans activation explicite.",required:!1}};function jh(t){return{necessary:!0,analytics:t,marketing:t}}function Nh(){try{const t=localStorage.getItem(Eg);if(!t)return null;const s=JSON.parse(t);return!(s!=null&&s.preferences)||s.version!==Tg?null:{version:s.version,decidedAt:s.decidedAt,preferences:{necessary:!0,analytics:!!s.preferences.analytics,marketing:!!s.preferences.marketing}}}catch{return null}}function xw(t){const s={version:Tg,decidedAt:new Date().toISOString(),preferences:{necessary:!0,analytics:!!t.analytics,marketing:!!t.marketing}};return localStorage.setItem(Eg,JSON.stringify(s)),window.dispatchEvent(new CustomEvent("cs:cookie-consent-changed",{detail:s})),s}function Pg(){window.dispatchEvent(new CustomEvent("cs:open-cookie-preferences")),window.location.hash!==`#${Hi}`&&window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}#${Hi}`)}let Da=null;function Rg(t=5){const[s,a]=g.useState(Da??[]),[l,o]=g.useState(!Da);return g.useEffect(()=>{let u=!1;return Da&&(a(Da),o(!1)),tw(t).then(m=>{u||(Da=m,a(m))}).catch(()=>{!u&&!Da&&a([])}).finally(()=>{u||o(!1)}),()=>{u=!0}},[t]),{categories:s,loading:l}}const gw=[{id:"ff-home",label:"Accueil",href:"/",external:!1,children:[]},{id:"ff-projets",label:"Projets",href:"/projets",external:!1,children:[]},{id:"ff-recherche",label:"Rechercher un sponsor",href:"/recherche",external:!1,children:[]},{id:"ff-publier",label:"Publier une annonce",href:"/publier",external:!1,children:[]}];function yw({item:t}){return t.href?t.external?r.jsx("a",{href:t.href,className:"hover:text-white",target:"_blank",rel:"noopener noreferrer",children:t.label}):r.jsx(V,{to:t.href,className:"hover:text-white",children:t.label}):null}function vw({wide:t=!1}){const s=t?"max-w-screen-2xl":"max-w-7xl",{items:a}=Cg("footer"),{categories:l}=Rg(5),o=(a.length>0?a:gw).flatMap(u=>u.children.length>0?[u,...u.children]:[u]);return r.jsxs("footer",{className:"mt-auto border-t border-slate-200 bg-slate-900 text-slate-300",children:[r.jsxs("div",{className:`mx-auto grid ${s} gap-8 px-4 py-12 sm:px-6 sm:grid-cols-2 lg:grid-cols-4 lg:px-8`,children:[r.jsxs("div",{children:[r.jsxs("div",{className:"mb-3 flex items-center gap-3",children:[r.jsx("img",{src:"/brand/logo-mark-256.png",alt:"",className:"h-10 w-10 rounded-xl bg-white object-contain p-0.5",width:40,height:40}),r.jsx("div",{className:"text-lg font-bold text-white",children:"Connecting Sponsors"})]}),r.jsx("p",{className:"text-sm leading-relaxed text-slate-400",children:"La plateforme collaborative pour mettre en relation projets associatifs, sportifs et culturels avec des entreprises sponsors."})]}),r.jsxs("div",{children:[r.jsx("div",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-white",children:"Navigation"}),r.jsx("ul",{className:"space-y-2 text-sm",children:o.filter(u=>u.href).map(u=>r.jsx("li",{children:r.jsx(yw,{item:u})},u.id))})]}),l.length>0&&r.jsxs("div",{children:[r.jsx("div",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-white",children:"Catégories populaires"}),r.jsx("ul",{className:"space-y-2 text-sm",children:l.map(u=>r.jsx("li",{children:r.jsx(V,{to:`/projets/categorie/${encodeURIComponent(u.slug)}`,className:"hover:text-white",children:u.name})},u.id))})]}),r.jsxs("div",{children:[r.jsx("div",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-white",children:"Informations légales"}),r.jsxs("ul",{className:"space-y-2 text-sm",children:[hw.map(u=>r.jsx("li",{children:r.jsx(V,{to:`/${u.code}`,className:"hover:text-white",children:u.label})},u.code)),r.jsx("li",{children:r.jsx("button",{type:"button",className:"hover:text-white",onClick:()=>Pg(),children:"Gérer les cookies"})})]})]})]}),r.jsxs("div",{className:"border-t border-slate-800 py-4 text-center text-xs text-slate-500",children:["© ",new Date().getFullYear()," Connecting Sponsors — Tous droits réservés"]})]})}const wh=new Set(["admin.connecting-mecenat.fr","admin.connecting-sponsors.fr","www.connecting-mecenat.fr","www.connecting-sponsors.fr","connecting-mecenat.fr","connecting-sponsors.fr"]),bw=/\.(jpe?g|png|gif|webp|svg|pdf|docx?)$/i;function jw(t){const s=t.toLowerCase();return wh.has(s)?!0:wh.has(s.replace(/^www\./,""))}function Nw(t){if(t==null)return null;const s=t.trim();if(!s)return null;const a=s.match(/^(https?):\/\/([^/?#]+)([^?#]*)(\?[^#]*)?/i);if(a){const o=a[2],u=a[3]||"/",m=a[4]||"",f=u.indexOf("/uploads/");if(f===0)return`${u}${m}`;if(jw(o)){if(f!==-1)return`${u.slice(f)}${m}`;
300const x=u.split("/").filter(Boolean).pop();if(x&&bw.test(x))return`/uploads/${x}${m}`}return s}const l=s.indexOf("/uploads/");return l!==-1?s.slice(l):s.startsWith("uploads/")?`/${s}`:s.startsWith("/")?s:`/${s}`}const sm=["sponsor","mecenat"];function rm(t){return t==="mecenat"?"mecenat":"sponsor"}const ww=["communication","marketing","foundation","patronage","csr","hr","management","partnership","press"],Sw=["national","regional","departmental","local","international"],Ag=["draft","published","archived"],am=["SPONSOR","MECENE","BOTH","UNKNOWN"],_w=["manual","inferred","import_profile"],ac=["SPONSOR","MECENE","BOTH"],Cw="SPONSOR",Og=["company","foundation","association","brand","other"],Qi=["facebook","linkedin","instagram","twitter","youtube","tiktok"],Lg={facebook:"Facebook",linkedin:"LinkedIn",instagram:"Instagram",twitter:"X (Twitter)",youtube:"YouTube",tiktok:"TikTok"},kw=["draft","pending_review","published","requested_offline","rejected","expired","archived"],Ew=["daily","weekly","monthly"],Nd=["promotion","enhancement","matching"],wd=["featured_homepage_7d","featured_homepage_30d","premium_listing","boost_daily_7d","boost_daily_30d","boost_weekly_60d","urgent_badge","dossier_deposit","sponsor_matching","ai_title_slug","logo_image","premium_matching_pack","enrichment_pack","enrichment_matching_pack"],Tw=["featured_homepage_7d","featured_homepage_30d"],Pw=["boost_daily_7d","boost_daily_30d","boost_weekly_60d"],Rw="boost_weekly_60d",ic=["financial","material","skills","communication"],Ig=20,Dg=100,Aw=[{name:"verification",label:"Vérification des URLs",description:"Contrôle HTTP des URLs entreprises enregistrées",defaultCron:"0 3 * * 1",triggerJobName:"manual-verification"},{name:"sponsor-scores",label:"Scores sponsors",description:"Recalcul des scores communautaires",defaultCron:"0 4 * * *",triggerJobName:"manual-scores"},{name:"search-index",label:"Index de recherche",description:"Reconstruction de l'index full-text",defaultCron:"0 5 * * *",triggerJobName:"manual-search-index"},{name:"ke-sync",label:"Sync Knowledge Engine",description:"Import des assertions KE publiées vers les companies CRM",defaultCron:"0 */6 * * *",triggerJobName:"manual-ke-sync"},{name:"project-republish",label:"Republication des projets",description:"Remontée en tête des annonces avec boost actif selon leur fréquence",defaultCron:"0 * * * *",triggerJobName:"manual-project-republish"},{name:"company-enrichment",label:"Enrichissement entreprises (KE)",description:"Lance des missions discovery KE pour enrichir les fiches entreprises",defaultCron:"0 2 * * *",triggerJobName:"manual-company-enrichment"},{name:"enrichment-status",label:"Suivi enrichissement KE",description:"Synchronise le statut des missions KE actives et déclenche la publication automatique",defaultCron:"*/5 * * * *",triggerJobName:"manual-enrichment-status"},{name:"project-moderation",label:"Modération des annonces",description:"Analyse OpenAI des annonces gratuites en attente de validation",defaultCron:"*/5 * * * *",triggerJobName:"manual-project-moderation"}],Ow=["manual","scheduled","batch","ke_sync"];Aw.map(t=>t.name);const Lw=[{key:"company_sponsors",label:"Sponsors — recherche publique",description:"Index full-text (français) sur le nom, la description, les catégories et les mots-clés des entreprises",entityLabel:"entreprise",workerQueueName:"search-index"}];Lw.map(t=>t.key);const Mo="Partagez votre expérience de sponsoring, boostez vos annonces et débloquez des options premium offertes.",$s={feedbackPublished:50,feedbackDetailed:25,enrichmentApproved:30,loyaltyMilestone:40,paidSpendingPerEuro:10,sponsorSuggestionApproved:50},Iw=[{id:"feedback",label:"Avis publié sur un sponsor",points:$s.feedbackPublished,description:"Note et retour d'expérience validés par notre équipe."},{id:"feedback_detailed",label:"Avis détaillé",points:$s.feedbackDetailed,description:"Commentaire enrichi (montant obtenu, délai de réponse, contexte du projet)."},{id:"contribution",label:"Enrichissement d'une fiche sponsor",points:$s.enrichmentApproved,description:"Suggestion d'information utile à la communauté, approuvée en modération."},{id:"sponsor_suggestion",label:"Suggestion d'une fiche sponsor",points:$s.sponsorSuggestionApproved,description:"Proposition d'un sponsor manquant, validée en modération (100 %). Si la fiche existe déjà en brouillon, 50 % des points sont crédités automatiquement."},{id:"loyalty",label:"Fidélité",points:$s.loyaltyMilestone,description:"Bonus lors de votre 3ᵉ contribution validée sur la plateforme."},{id:"paid_spending",label:"Options payantes sur vos annonces",points:$s.paidSpendingPerEuro,pointsLabel:`${$s.paidSpendingPerEuro} pts / €`,description:"Boost, format premium, badge Urgent, matching… Chaque euro dépensé en options de visibilité vous rapporte des points, dè
300s confirmation du paiement."}],Ha=[{id:"explorateur",name:"Explorateur",minPoints:0,reward:"Accès gratuit au dépôt d'annonce et à la recherche de sponsors."},{id:"contributeur",name:"Contributeur",minPoints:100,reward:"1 semaine de remontée hebdomadaire offerte sur une annonce."},{id:"ambassadeur",name:"Ambassadeur",minPoints:250,reward:"Format premium liste pendant 1 mois ou badge Urgent pendant 1 mois.",highlight:!0},{id:"expert",name:"Expert communauté",minPoints:500,reward:"Matching sponsor offert ou pack visibilité premium sur 3 mois."}],Dw=[{question:"Dois-je avoir trouvé le sponsor via Connecting Sponsors ?",answer:"Non. Tout retour sincère sur une expérience de sponsoring réelle est éligible, que le contact ait été initié sur la plateforme ou non."},{question:"Quand mes points sont-ils crédités ?",answer:"Après validation de votre avis, enrichissement ou suggestion de fiche par notre équipe. Si vous proposez un sponsor déjà présent en brouillon, 50 % des points sont crédités immédiatement. Les points liés aux options payantes sont crédités automatiquement dès confirmation du paiement."},{question:"Les récompenses sont-elles cumulables ?",answer:"Oui. Vos points s'accumulent (avis, enrichissements, suggestions de fiches et dépenses en options payantes) et vous permettent d'atteindre des paliers successifs. Chaque palier débloque une option sur l'une de vos annonces actives."},{question:"Comment fonctionnent les réductions sur les options payantes ?",answer:"Votre palier Programme Contributeur vous fait bénéficier d'un pourcentage de réduction automatique sur les options payantes de visibilité. Plus votre palier est élevé, plus la réduction est importante."}],zw=/^[A-Z][A-Z0-9_]*$/,Mw=[{code:"ATHLETE",label:"Athlète",description:"Sportifs et athlètes individuels",sortOrder:10},{code:"DRIVER",label:"Pilote",description:"Pilotes (auto, moto, etc.)",sortOrder:20},{code:"EXPLORER",label:"Explorateur",description:"Explorateurs et aventuriers",sortOrder:30},{code:"TRAVELER",label:"Voyageur",description:"Voyageurs et nomades",sortOrder:40}
300,{code:"CONTENT_CREATOR",label:"Créateur de contenu",sortOrder:50},{code:"TEAM",label:"Équipe",description:"Équipes sportives ou collectives",sortOrder:60},{code:"EVENT",label:"Événement",description:"Organisateurs d'événements",sortOrder:70},{code:"STUDENT",label:"Étudiant",sortOrder:80},{code:"ASSOCIATION",label:"Association",sortOrder:90},{code:"STARTUP",label:"Startup",sortOrder:100},{code:"RESEARCHER",label:"Chercheur",sortOrder:110},{code:"ARTIST",label:"Artiste",sortOrder:120},{code:"VIDEOGRAPHER",label:"Vidéaste",sortOrder:130},{code:"PHOTOGRAPHER",label:"Photographe",sortOrder:140},{code:"INFLUENCER",label:"Influenceur",sortOrder:150},{code:"INDIVIDUAL",label:"Particulier",description:"Personnes physiques / porteurs individuels (ex-flag « particuliers »)",sortOrder:200},{code:"CLUB",label:"Club",sortOrder:210},{code:"COMPANY",label:"Entreprise",description:"Entreprises (hors startup)",sortOrder:220},{code:"FOUNDATION",label:"Fondation",sortOrder:230},{code:"SCHOOL",label:"École",sortOrder:240},{code:"UNIVERSITY",label:"Université",sortOrder:250},{code:"MUSEUM",label:"Musée",sortOrder:260},{code:"LOCAL_AUTHORITY",label:"Collectivité",sortOrder:270},{code:"NGO",label:"ONG",sortOrder:280},{code:"SOCIAL_ENTERPRISE",label:"Entreprise sociale",sortOrder:290},{code:"MEDICAL_INSTITUTION",label:"Institution médicale",sortOrder:300}];Object.fromEntries(Mw.map(t=>[t.code,t.label]));const Uw=[{field:"acceptsAssociations",column:"accepts_associations",code:"ASSOCIATION"},{field:"acceptsIndividuals",column:"accepts_individuals",code:"INDIVIDUAL"},{field:"acceptsClubs",column:"accepts_clubs",code:"CLUB"},{field:"acceptsCompanies",column:"accepts_companies",code:"COMPANY"},{field:"acceptsFoundations",column:"accepts_foundations",code:"FOUNDATION"},{field:"acceptsSchools",column:"accepts_schools",code:"SCHOOL"},{field:"acceptsUniversities",column:"accepts_universities",code:"UNIVERSITY"},{field:"acceptsMuseums",column:"accepts_museums",code:"MUSEUM"},{field:"acceptsLocalAuthorities",column:"accepts_local_authorities",code:"LOCAL_AUTHORITY"},{field:"acceptsNgos",column:"accepts_ngos",code:"NGO"},{field:"acceptsSocialEnterprises",column:"accepts_social_enterprises",code:"SOCIAL_ENTERPRISE"},{field:"acceptsResearchers",column:"accepts_researchers",code:"RESEARCHER"},{field:"acceptsMedicalInstitutions",column:"accepts_medical_institutions",code:"MEDICAL_INSTITUTION"}],Xr=[{key:"supportsProjectEducation",label:"Éducation"},{key:"supportsProjectCulture",label:"Culture"},{key:"supportsProjectResearch",label:"Recherche"},{key:"supportsProjectHumanitarian",label:"Humanitaire"},{key:"supportsProjectEnvironment",label:"Environnement"},{key:"supportsProjectHealth",label:"Santé"},{key:"supportsProjectInclusion",label:"Inclusion"},{key:"supportsProjectInnovation",label:"Innovation"},{key:"supportsProjectHeritage",label:"Patrimoine"},{key:"supportsProjectSport",label:"Sport"}];Xr.map(({key:t})=>t);const Fw=["projets","recherche","portail","sponsors","publier","programme-contributeur","actualites","mentions-legales","cgu","politique-confidentialite","cookies","v1","uploads","docs","health","login","api","robots.txt","sitemap.xml","favicon.svg","assets"];function zg(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,160)}function Mg(t){const s=t.toLowerCase();return Fw.includes(s)}function lc(t){return t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi," ").replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi," ").replace(/<[^>]+>/g," ").replace(/&nbsp;/gi," ").replace(/\s+/g," ").trim()}function oc(t){const s=[],a=/<h([1-6])\b[^>]*>/gi,l=[];let o;for(;(o=a.exec(t))!==null;)l.push(Number(o[1]));const u=l.filter(h=>h===1).length;u>1&&s.push(`Plusieurs balises H1 détectées (${u}). Une seule H1 est autorisée (idéalement via le champ Titre).`);let m=u>=1?0:1;for(const h of l){if(m===0){h!==1&&s.push(`Le contenu commence par H${h} alors qu'un H1 est présent plus loin, ou mal ordonné.`),m=h;continue}h>m+1&&s.push(`Saut de titre : H${m} suivi de H${h}. Insérez un H${m+1} intermédiaire.`),m=h}const f=l.some(h=>h===2);return l.some(h=>h>=3)&&!f&&s.push("Des H3 (ou plus) sont présents sans H2. Ajoutez des H2 pour structurer les sections."),{ok:s.length===0,errors:[...new Set(s)],h1Count:u}}var ot;(function(t){t.assertEqual=o=>{};function s(o){}t.assertIs=s;function a(o){throw new Error}t.assertNever=a,t.arrayToEnum=o=>{const u={};for(const m of o)u[m]=m;return u},t.getValidEnumValues=o=>{const u=t.objectKeys(o).filter(f=>typeof o[o[f]]!="number"),m={};for(const f of u)m[f]=o[f];return t.objectValues(m)},t.objectValues=o=>t.objectKeys(o).map(function(u){return o[u]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const u=[];for(const m in o)Object.prototype.hasOwnProperty.call(o,m)&&u.push(m);return u},t.find=(o,u)=>{for(const m of o)if(u(m))return m},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function l(o,u=" | "){return o.map(m=>typeof m=="string"?`'${m}'`:m).join(u)}t.joinValues=l,t.jsonStringifyReplacer=(o,u)=>typeof u=="bigint"?u.toString():u})(ot||(ot={}));var Sh;(function(t){t.mergeShapes=(s,a)=>({...s,...a}
vendor: 5,168 bytes, line 300
300)})(Sh||(Sh={}));const je=ot.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xr=t=>{switch(typeof t){case"undefined":return je.undefined;case"string":return je.string;case"number":return Number.isNaN(t)?je.nan:je.number;case"boolean":return je.boolean;case"function":return je.function;case"bigint":return je.bigint;case"symbol":return je.symbol;case"object":return Array.isArray(t)?je.array:t===null?je.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?je.promise:typeof Map<"u"&&t instanceof Map?je.map:typeof Set<"u"&&t instanceof Set?je.set:typeof Date<"u"&&t instanceof Date?je.date:je.object;default:return je.unknown}},ee=ot.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class qs extends Error{get errors(){return this.issues}constructor(s){super(),this.issues=[],this.addIssue=l=>{this.issues=[...this.issues,l]},this.addIssues=(l=[])=>{this.issues=[...this.issues,...l]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=s}format(s){const a=s||function(u){return u.message},l={_errors:[]},o=u=>{for(const m of u.issues)if(m.code==="invalid_union")m.unionErrors.map(o);else if(m.code==="invalid_return_type")o(m.returnTypeError);else if(m.code==="invalid_arguments")o(m.argumentsError);else if(m.path.length===0)l._errors.push(a(m));else{let f=l,x=0;for(;x<m.path.length;){const h=m.path[x];x===m.path.length-1?(f[h]=f[h]||{_errors:[]},f[h]._errors.push(a(m))):f[h]=f[h]||{_errors:[]},f=f[h],x++}}};return o(this),l}static assert(s){if(!(s instanceof qs))throw new Error(`Not a ZodError: ${s}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ot.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(s=a=>a.message){const a={},l=[];for(const o of this.issues)if(o.path.length>0){const u=o.path[0];a[u]=a[u]||[],a[u].push(s(o))}else l.push(s(o));return{formErrors:l,fieldErrors:a}}get formErrors(){return this.flatten()}}qs.create=t=>new qs(t);const Sd=(t,s)=>{let a;switch(t.code){case ee.invalid_type:t.received===je.undefined?a="Required":a=`Expected ${t.expected}, received ${t.received}`;break;case ee.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(t.expected,ot.jsonStringifyReplacer)}`;break;case ee.unrecognized_keys:a=`Unrecognized key(s) in object: ${ot.joinValues(t.keys,", ")}`;break;case ee.invalid_union:a="Invalid input";break;case ee.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${ot.joinValues(t.options)}`;break;case ee.invalid_enum_value:a=`Invalid enum value. Expected ${ot.joinValues(t.options)}, received '${t.received}'`;break;case ee.invalid_arguments:a="Invalid function arguments";break;case ee.invalid_return_type:a="Invalid function return type";break;case ee.invalid_date:a="Invalid date";break;case ee.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(a=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(a=`${a} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?a=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?a=`Invalid input: must end with "${t.validation.endsWith}"`:ot.assertNever(t.validation):t.validation!=="regex"?a=`Invalid ${t.validation}`:a="Invalid";break;case ee.too_small:t.type==="array"?a=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?a=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?a=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?a=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?a=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:a="Invalid input";break;case ee.too_big:t.type==="array"?a=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?a=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?a=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?a=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?a=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:a="Invalid input";break;case ee.custom:a="Invalid input";break;
vendor: 4,980 bytes, line 300
300case ee.invalid_intersection_types:a="Intersection results could not be merged";break;case ee.not_multiple_of:a=`Number must be a multiple of ${t.multipleOf}`;break;case ee.not_finite:a="Number must be finite";break;default:a=s.defaultError,ot.assertNever(t)}return{message:a}};let $w=Sd;function Bw(){return $w}const qw=t=>{const{data:s,path:a,errorMaps:l,issueData:o}=t,u=[...a,...o.path||[]],m={...o,path:u};if(o.message!==void 0)return{...o,path:u,message:o.message};let f="";const x=l.filter(h=>!!h).slice().reverse();for(const h of x)f=h(m,{data:s,defaultError:f}).message;return{...o,path:u,message:f}};function he(t,s){const a=Bw(),l=qw({issueData:s,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,a,a===Sd?void 0:Sd].filter(o=>!!o)});t.common.issues.push(l)}class bn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(s,a){const l=[];for(const o of a){if(o.status==="aborted")return He;o.status==="dirty"&&s.dirty(),l.push(o.value)}return{status:s.value,value:l}}static async mergeObjectAsync(s,a){const l=[];for(const o of a){const u=await o.key,m=await o.value;l.push({key:u,value:m})}return bn.mergeObjectSync(s,l)}static mergeObjectSync(s,a){const l={};for(const o of a){const{key:u,value:m}=o;if(u.status==="aborted"||m.status==="aborted")return He;u.status==="dirty"&&s.dirty(),m.status==="dirty"&&s.dirty(),u.value!=="__proto__"&&(typeof m.value<"u"||o.alwaysSet)&&(l[u.value]=m.value)}return{status:s.value,value:l}}}const He=Object.freeze({status:"aborted"}),qi=t=>({status:"dirty",value:t}),Jn=t=>({status:"valid",value:t}),_h=t=>t.status==="aborted",Ch=t=>t.status==="dirty",Wa=t=>t.status==="valid",Uo=t=>typeof Promise<"u"&&t instanceof Promise;var Ce;(function(t){t.errToObj=s=>typeof s=="string"?{message:s}:s||{},t.toString=s=>typeof s=="string"?s:s==null?void 0:s.message})(Ce||(Ce={}));class Cs{constructor(s,a,l,o){this._cachedPath=[],this.parent=s,this.data=a,this._path=l,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const kh=(t,s)=>{if(Wa(s))return{success:!0,data:s.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const a=new qs(t.common.issues);return this._error=a,this._error}}};function Ke(t){if(!t)return{};const{errorMap:s,invalid_type_error:a,required_error:l,description:o}=t;if(s&&(a||l))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return s?{errorMap:s,description:o}:{errorMap:(m,f)=>{const{message:x}=t;return m.code==="invalid_enum_value"?{message:x??f.defaultError}:typeof f.data>"u"?{message:x??l??f.defaultError}:m.code!=="invalid_type"?{message:f.defaultError}:{message:x??a??f.defaultError}},description:o}}class et{get description(){return this._def.description}_getType(s){return xr(s.data)}_getOrReturnCtx(s,a){return a||{common:s.parent.common,data:s.data,parsedType:xr(s.data),schemaErrorMap:this._def.errorMap,path:s.path,parent:s.parent}}_processInputParams(s){return{status:new bn,ctx:{common:s.parent.common,data:s.data,parsedType:xr(s.data),schemaErrorMap:this._def.errorMap,path:s.path,parent:s.parent}}}_parseSync(s){const a=this._parse(s);if(Uo(a))throw new Error("Synchronous parse encountered promise.");return a}_parseAsync(s){const a=this._parse(s);return Promise.resolve(a)}parse(s,a){const l=this.safeParse(s,a);if(l.success)return l.data;throw l.error}safeParse(s,a){const l={common:{issues:[],async:(a==null?void 0:a.async)??!1,contextualErrorMap:a==null?void 0:a.errorMap},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:s,parsedType:xr(s)},o=this._parseSync({data:s,path:l.path,parent:l});return kh(l,o)}"~validate"(s){var l,o;const a={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:s,parsedType:xr(s)};if(!this["~standard"].async)try{const u=this._parseSync({data:s,path:[],parent:a});return Wa(u)?{value:u.value}:{issues:a.common.issues}}catch(u){(o=(l=u==null?void 0:u.message)==null?void 0:l.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),a.common={issues:[],async:!0}}return this._parseAsync({data:s,path:[],parent:a}).then(u=>Wa(u)?{value:u.value}:{issues:a.common.issues})}async parseAsync(s,a){const l=await this.safeParseAsync(s,a);if(l.success)return l.data;throw l.error}async safeParseAsync(s,a){const l={common:{issues:[],contextualErrorMap:a==null?void 0:a.errorMap,async:!0},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:s,parsedType:xr(s)},o=this._parse({data:s,path:l.path,parent:l}),u=await(Uo(o)?o:Promise.resolve(o));return kh(l,u)}refine(s,a){const l=o=>
vendor: 5,468 bytes, line 300
300typeof a=="string"||typeof a>"u"?{message:a}:typeof a=="function"?a(o):a;return this._refinement((o,u)=>{const m=s(o),f=()=>u.addIssue({code:ee.custom,...l(o)});return typeof Promise<"u"&&m instanceof Promise?m.then(x=>x?!0:(f(),!1)):m?!0:(f(),!1)})}refinement(s,a){return this._refinement((l,o)=>s(l)?!0:(o.addIssue(typeof a=="function"?a(l,o):a),!1))}_refinement(s){return new na({schema:this,typeName:qe.ZodEffects,effect:{type:"refinement",refinement:s}})}superRefine(s){return this._refinement(s)}constructor(s){this.spa=this.safeParseAsync,this._def=s,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:a=>this["~validate"](a)}}optional(){return jr.create(this,this._def)}nullable(){return Ka.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _s.create(this)}promise(){return Vo.create(this,this._def)}or(s){return $o.create([this,s],this._def)}and(s){return Bo.create(this,s,this._def)}transform(s){return new na({...Ke(this._def),schema:this,typeName:qe.ZodEffects,effect:{type:"transform",transform:s}})}default(s){const a=typeof s=="function"?s:()=>s;return new Td({...Ke(this._def),innerType:this,defaultValue:a,typeName:qe.ZodDefault})}brand(){return new mS({typeName:qe.ZodBranded,type:this,...Ke(this._def)})}catch(s){const a=typeof s=="function"?s:()=>s;return new Pd({...Ke(this._def),innerType:this,catchValue:a,typeName:qe.ZodCatch})}describe(s){const a=this.constructor;return new a({...this._def,description:s})}pipe(s){return im.create(this,s)}readonly(){return Rd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Vw=/^c[^\s-]{8,}$/i,Hw=/^[0-9a-z]+$/,Ww=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Gw=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Zw=/^[a-z0-9_-]{21}$/i,Kw=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Yw=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Qw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ed;const Jw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,eS=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,tS=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,nS=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,sS=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rS=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ug="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",aS=new RegExp(`^${Ug}$`);function Fg(t){let s="[0-5]\\d";t.precision?s=`${s}\\.\\d{${t.precision}}`:t.precision==null&&(s=`${s}(\\.\\d+)?`);const a=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${s})${a}`}function iS(t){return new RegExp(`^${Fg(t)}
300$`)}function lS(t){let s=`${Ug}T${Fg(t)}`;const a=[];return a.push(t.local?"Z?":"Z"),t.offset&&a.push("([+-]\\d{2}:?\\d{2})"),s=`${s}(${a.join("|")})`,new RegExp(`^${s}$`)}function oS(t,s){return!!((s==="v4"||!s)&&Jw.test(t)||(s==="v6"||!s)&&tS.test(t))}function cS(t,s){if(!Kw.test(t))return!1;try{const[a]=t.split(".");if(!a)return!1;const l=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),o=JSON.parse(atob(l));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||s&&o.alg!==s)}catch{return!1}}function uS(t,s){return!!((s==="v4"||!s)&&eS.test(t)||(s==="v6"||!s)&&nS.test(t))}class Ss extends et{_parse(s){if(this._def.coerce&&(s.data=String(s.data)),this._getType(s)!==je.string){const u=this._getOrReturnCtx(s);return he(u,{code:ee.invalid_type,expected:je.string,received:u.parsedType}),He}const l=new bn;let o;for(const u of this._def.checks)if(u.kind==="min")s.data.length<u.value&&(o=this._getOrReturnCtx(s,o),he(o,{code:ee.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),l.dirty());else if(u.kind==="max")s.data.length>u.value&&(o=this._getOrReturnCtx(s,o),he(o,{code:ee.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),l.dirty());else if(u.kind==="length"){const m=s.data.length>u.value,f=s.data.length<u.value;(m||f)&&(o=this._getOrReturnCtx(s,o),m?he(o,{code:ee.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}):f&&he(o,{code:ee.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}),l.dirty())}else if(u.kind==="email")Qw.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"email",code:ee.invalid_string,message:u.message}),l.dirty());else if(u.kind==="emoji")ed||(ed=new RegExp(Xw,"u")),ed.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"emoji",code:ee.invalid_string,message:u.message}),l.dirty());else if(u.kind==="uuid")Gw.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"uuid",code:ee.invalid_string,message:u.message}),l.dirty());else if(u.kind==="nanoid")Zw.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"nanoid",code:ee.invalid_string,message:u.message}),l.dirty());else if(u.kind==="cuid")Vw.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"cuid",code:ee.invalid_string,message:u.message}),l.dirty());else if(u.kind==="cuid2")Hw.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"cuid2",code:ee.invalid_string,message:u.message}),l.dirty());else if(u.kind==="ulid")Ww.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"ulid",code:ee.invalid_string,message:u.message}),l.dirty());else if(u.kind==="url")try{new URL(s.data)}catch{o=this._getOrReturnCtx(s,o),he(o,{validation:"url",code:ee.invalid_string,message:u.message}),l.dirty()}else u.kind==="regex"?(u.regex.lastIndex=0,u.regex.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"regex",code:ee.invalid_string,message:u.message}),l.dirty())):u.kind==="trim"?s.data=s.data.trim():u.kind==="includes"?s.data.includes(u.value,u.position)||(o=this._getOrReturnCtx(s,o),he(o,{code:ee.invalid_string,validation:{includes:u.value,position:u.position},message:u.message}),l.dirty()):u.kind==="toLowerCase"?s.data=s.data.toLowerCase():u.kind==="toUpperCase"?s.data=s.data.toUpperCase():u.kind==="startsWith"?s.data.startsWith(u.value)||(o=this._getOrReturnCtx(s,o),he(o,{code:ee.invalid_string,validation:{startsWith:u.value},message:u.message}),l.dirty()):u.kind==="endsWith"?s.data.endsWith(u.value)||(o=this._getOrReturnCtx(s,o),he(o,{code:ee.invalid_string,validation:{endsWith:u.value},message:u.message}),l.dirty()):u.kind==="datetime"?lS(u).test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{code:ee.invalid_string,validation:"datetime",message:u.message}),l.dirty()):u.kind==="date"?aS.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{code:ee.invalid_string,validation:"date",message:u.message}),l.dirty()):u.kind==="time"?iS(u).test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{code:ee.invalid_string,validation:"time",message:u.message}),l.dirty()):u.kind==="duration"?Yw.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"duration",code:ee.invali
vendor: 13,454 bytes, line 300
300d_string,message:u.message}),l.dirty()):u.kind==="ip"?oS(s.data,u.version)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"ip",code:ee.invalid_string,message:u.message}),l.dirty()):u.kind==="jwt"?cS(s.data,u.alg)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"jwt",code:ee.invalid_string,message:u.message}),l.dirty()):u.kind==="cidr"?uS(s.data,u.version)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"cidr",code:ee.invalid_string,message:u.message}),l.dirty()):u.kind==="base64"?sS.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"base64",code:ee.invalid_string,message:u.message}),l.dirty()):u.kind==="base64url"?rS.test(s.data)||(o=this._getOrReturnCtx(s,o),he(o,{validation:"base64url",code:ee.invalid_string,message:u.message}),l.dirty()):ot.assertNever(u);return{status:l.value,value:s.data}}_regex(s,a,l){return this.refinement(o=>s.test(o),{validation:a,code:ee.invalid_string,...Ce.errToObj(l)})}_addCheck(s){return new Ss({...this._def,checks:[...this._def.checks,s]})}email(s){return this._addCheck({kind:"email",...Ce.errToObj(s)})}url(s){return this._addCheck({kind:"url",...Ce.errToObj(s)})}emoji(s){return this._addCheck({kind:"emoji",...Ce.errToObj(s)})}uuid(s){return this._addCheck({kind:"uuid",...Ce.errToObj(s)})}nanoid(s){return this._addCheck({kind:"nanoid",...Ce.errToObj(s)})}cuid(s){return this._addCheck({kind:"cuid",...Ce.errToObj(s)})}cuid2(s){return this._addCheck({kind:"cuid2",...Ce.errToObj(s)})}ulid(s){return this._addCheck({kind:"ulid",...Ce.errToObj(s)})}base64(s){return this._addCheck({kind:"base64",...Ce.errToObj(s)})}base64url(s){return this._addCheck({kind:"base64url",...Ce.errToObj(s)})}jwt(s){return this._addCheck({kind:"jwt",...Ce.errToObj(s)})}ip(s){return this._addCheck({kind:"ip",...Ce.errToObj(s)})}cidr(s){return this._addCheck({kind:"cidr",...Ce.errToObj(s)})}datetime(s){return typeof s=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:s}):this._addCheck({kind:"datetime",precision:typeof(s==null?void 0:s.precision)>"u"?null:s==null?void 0:s.precision,offset:(s==null?void 0:s.offset)??!1,local:(s==null?void 0:s.local)??!1,...Ce.errToObj(s==null?void 0:s.message)})}date(s){return this._addCheck({kind:"date",message:s})}time(s){return typeof s=="string"?this._addCheck({kind:"time",precision:null,message:s}):this._addCheck({kind:"time",precision:typeof(s==null?void 0:s.precision)>"u"?null:s==null?void 0:s.precision,...Ce.errToObj(s==null?void 0:s.message)})}duration(s){return this._addCheck({kind:"duration",...Ce.errToObj(s)})}regex(s,a){return this._addCheck({kind:"regex",regex:s,...Ce.errToObj(a)})}includes(s,a){return this._addCheck({kind:"includes",value:s,position:a==null?void 0:a.position,...Ce.errToObj(a==null?void 0:a.message)})}startsWith(s,a){return this._addCheck({kind:"startsWith",value:s,...Ce.errToObj(a)})}endsWith(s,a){return this._addCheck({kind:"endsWith",value:s,...Ce.errToObj(a)})}min(s,a){return this._addCheck({kind:"min",value:s,...Ce.errToObj(a)})}max(s,a){return this._addCheck({kind:"max",value:s,...Ce.errToObj(a)})}length(s,a){return this._addCheck({kind:"length",value:s,...Ce.errToObj(a)})}nonempty(s){return this.min(1,Ce.errToObj(s))}trim(){return new Ss({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ss({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ss({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(s=>s.kind==="datetime")}get isDate(){return!!this._def.checks.find(s=>s.kind==="date")}get isTime(){return!!this._def.checks.find(s=>s.kind==="time")}get isDuration(){return!!this._def.checks.find(s=>s.kind==="duration")}get isEmail(){return!!this._def.checks.find(s=>s.kind==="email")}get isURL(){return!!this._def.checks.find(s=>s.kind==="url")}get isEmoji(){return!!this._def.checks.find(s=>s.kind==="emoji")}get isUUID(){return!!this._def.checks.find(s=>s.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(s=>s.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(s=>s.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(s=>s.kind==="cuid2")}get isULID(){return!!this._def.checks.find(s=>s.kind==="ulid")}get isIP(){return!!this._def.checks.find(s=>s.kind==="ip")}get isCIDR(){return!!this._def.checks.find(s=>s.kind==="cidr")}get isBase64(){return!!this._def.checks.find(s=>s.kind==="base64")}get isBase64url(){return!!this._def.checks.find(s=>s.kind==="base64url")}get minLength(){let s=null;for(const a of this._def.checks)a.kind==="min"&&(s===null||a.value>s)&&(s=a.value);return s}get maxLength(){let s=null;for(const a of this._def.checks)a.kind==="max"&&(s===null||a.value<s)&&(s=a.value);return s}}Ss.create=t=>new Ss({checks:[],typeName:qe.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...Ke(t)});function dS(t,s){const a=(t.toString().split(".")[1]||"").length,l=(s.toString().split(".")[1]||"").length,o=a>l?a:l,u=Number.parseInt(t.toFixed(o).replace(".","")),m=Number.parseInt(s.toFixed(o).replace(".",""));return u%m/10**o}class Jr extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(s){if(this._def.coerce&&(s.data=Number(s.data)),this._getType(s)!==je.number){const u=this._getOrReturnCtx(s);return he(u,{code:ee.invalid_type,expected:je.number,received:u.parsedType}),He}let l;const o=new bn;for(const u of this._def.checks)u.kind==="int"?ot.isInteger(s.data)||(l=this._getOrReturnCtx(s,l),he(l,{code:ee.invalid_type,expected:"integer",received:"float",message:u.message}),o.dirty()):u.kind==="min"?(u.inclusive?s.data<u.value:s.data<=u.value)&&(l=this._getOrReturnCtx(s,l),he(l,{code:ee.too_small,minimum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),o.dirty()):u.kind==="max"?(u.inclusive?s.data>u.value:s.data>=u.value)&&(l=this._getOrReturnCtx(s,l),he(l,{code:ee.too_big,maximum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),o.dirty()):u.kind==="multipleOf"?dS(s.data,u.value)!==0&&(l=this._getOrReturnCtx(s,l),he(l,{code:ee.not_multiple_of,multipleOf:u.value,message:u.message}),o.dirty()):u.kind==="finite"?Number.isFinite(s.data)||(l=this._getOrReturnCtx(s,l),he(l,{code:ee.not_finite,message:u.message}),o.dirty()):ot.assertNever(u);return{status:o.value,value:s.data}}gte(s,a){return this.setLimit("min",s,!0,Ce.toString(a))}gt(s,a){return this.setLimit("min",s,!1,Ce.toString(a))}lte(s,a){return this.setLimit("max",s,!0,Ce.toString(a))}lt(s,a){return this.setLimit("max",s,!1,Ce.toString(a))}setLimit(s,a,l,o){return new Jr({...this._def,checks:[...this._def.checks,{kind:s,value:a,inclusive:l,message:Ce.toString(o)}]})}_addCheck(s){return new Jr({...this._def,checks:[...this._def.checks,s]})}int(s){return this._addCheck({kind:"int",message:Ce.toString(s)})}positive(s){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(s)})}negative(s){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(s)})}nonpositive(s){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(s)})}nonnegative(s){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(s)})}multipleOf(s,a){return this._addCheck({kind:"multipleOf",value:s,message:Ce.toString(a)})}finite(s){return this._addCheck({kind:"finite",message:Ce.toString(s)})}safe(s){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(s)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(s)})}get minValue(){let s=null;for(const a of this._def.checks)a.kind==="min"&&(s===null||a.value>s)&&(s=a.value);return s}get maxValue(){let s=null;for(const a of this._def.checks)a.kind==="max"&&(s===null||a.value<s)&&(s=a.value);return s}get isInt(){return!!this._def.checks.find(s=>s.kind==="int"||s.kind==="multipleOf"&&ot.isInteger(s.value))}get isFinite(){let s=null,a=null;for(const l of this._def.checks){if(l.kind==="finite"||l.kind==="int"||l.kind==="multipleOf")return!0;l.kind==="min"?(a===null||l.value>a)&&(a=l.value):l.kind==="max"&&(s===null||l.value<s)&&(s=l.value)}return Number.isFinite(a)&&Number.isFinite(s)}}Jr.create=t=>new Jr({checks:[],typeName:qe.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ke(t)});class ea extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(s){if(this._def.coerce)try{s.data=BigInt(s.data)}catch{return this._getInvalidInput(s)}if(this._getType(s)!==je.bigint)return this._getInvalidInput(s);let l;const o=new bn;for(const u of this._def.checks)u.kind==="min"?(u.inclusive?s.data<u.value:s.data<=u.value)&&(l=this._getOrReturnCtx(s,l),he(l,{code:ee.too_small,type:"bigint",minimum:u.value,inclusive:u.inclusive,message:u.message}),o.dirty()):u.kind==="max"?(u.inclusive?s.data>u.value:s.data>=u.value)&&(l=this._getOrReturnCtx(s,l),he(l,{code:ee.too_big,type:"bigint",maximum:u.value,inclusive:u.inclusive,message:u.message}),o.dirty()):u.kind==="multipleOf"?s.data%u.value!==BigInt(0)&&(l=this._getOrReturnCtx(s,l),he(l,{code:ee.not_multiple_of,multipleOf:u.value,message:u.message}),o.dirty()):ot.assertNever(u);return{status:o.value,value:s.data}}_getInvalidInput(s){const a=this._getOrReturnCtx(s);return he(a,{code:ee.invalid_type,expected:je.bigint,received:a.parsedType}),He}gte(s,a){return this.setLimit("min",s,!0,Ce.toString(a))}gt(s,a){return this.setLimit("min",s,!1,Ce.toString(a))}lte(s,a){return this.setLimit("max",s,!0,Ce.toString(a))}lt(s,a){return this.setLimit("max",s,!1,Ce.toString(a))}setLimit(s,a,l,o){return new ea({...this._def,checks:[...this._def.checks,{kind:s,value:a,inclusive:l,message:Ce.toString(o)}]})}_addCheck(s){return new ea({...this._def,checks:[...this._def.checks,s]})}positive(s){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(s)})}negative(s){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(s)})}nonpositive(s){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(s)})}nonnegative(s){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(s)})}multipleOf(s,a){return this._addCheck({kind:"multipleOf",value:s,message:Ce.toString(a)})}get minValue(){let s=null;for(const a of this._def.checks)a.kind==="min"&&(s===null||a.value>s)&&(s=a.value);return s}get maxValue(){let s=null;for(const a of this._def.checks)a.kind==="max"&&(s===null||a.value<s)&&(s=a.value);return s}}ea.create=t=>new ea({checks:[],typeName:qe.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...Ke(t)});class Fo extends et{_parse(s){if(this._def.coerce&&(s.data=!!s.data),this._getType(s)!==je.boolean){const l=this._getOrReturnCtx(s);return he(l,{code:ee.invalid_type,expected:je.boolean,received:l.parsedType}),He}return Jn(s.data)}}Fo.create=t=>new Fo({typeName:qe.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ke(t)});class Ga extends et{_parse(s){if(this._def.coerce&&(s.data=new Date(s.data)),this._getType(s)!==je.date){const u=this._getOrReturnCtx(s);return he(u,{code:ee.invalid_type,expected:je.date,received:u.parsedType}),He}if(Number.isNaN(s.data.getTime())){const u=this._getOrReturnCtx(s);return he(u,{code:ee.invalid_date}),He}const l=new bn;let o;for(const u of this._def.checks)u.kind==="min"?s.data.getTime()<u.value&&(o=this._getOrReturnCtx(s,o),he(o,{code:ee.too_small,message:u.message,inclusive:!0,exact:!1,minimum:u.value,type:"date"}),l.dirty()):u.kind==="max"?s.data.getTime()>u.value&&(o=this._getOrReturnCtx(s,o),he(o,{code:ee.too_big,message:u.message,inclusive:!0,exact:!1,maximum:u.value,type:"date"}),l.dirty()):ot.assertNever(u);return{status:l.value,value:new Date(s.data.getTime())}}_addCheck(s){return new Ga({...this._def,checks:[...this._def.checks,s]})}min(s,a){return this._addCheck({kind:"min",value:s.getTime(),message:Ce.toString(a)})}max(s,a){return this._addCheck({kind:"max",value:s.getTime(),message:Ce.toString(a)})}get minDate(){let s=null;for(const a of this._def.checks)a.kind==="min"&&(s===null||a.value>s)&&(s=a.value);return s!=null?new Date(s):null}get maxDate(){let s=null;for(const a of this._def.checks)a.kind==="max"&&(s===null||a.value<s)&&(s=a.value);return s!=null?new Date(s):null}}Ga.create=t=>new Ga({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:qe.ZodDate,...Ke(t)});class Eh extends et{_parse(s){if(this._getType(s)!==je.symbol){const l=this._getOrReturnCtx(s);return he(l,{code:ee.invalid_type,expected:je.symbol,received:l.parsedType}),He}return Jn(s.data)}}Eh.create=t=>new Eh({typeName:qe.ZodSymbol,...Ke(t)});class Th extends et{_parse(s){if(this._getType(s)!==je.undefined){const l=this._getOrReturnCtx(s);return he(l,{code:ee.invalid_type,expected:je.undefined,received:l.parsedType}),He}return Jn(s.data)}}Th.create=t=>new Th({typeName:qe.ZodUndefined,...Ke(t)});class _d extends et{_parse(s){if(this._getType(s)!==je.null){const l=this._getOrReturnCtx(s);return he(l,{code:ee.invalid_type,expected:je.null,received:l.parsedType}),He}return Jn(s.data)}}_d.create=t=>new _d({typeName:qe.ZodNull,...Ke(t)});class Ph extends et{constructor(){super(...arguments),this._any=!0}_parse(s){return Jn(s.data)}}Ph.create=t=>new Ph({typeName:qe.ZodAny,...Ke(t)});class Cd extends et{constructor(){super(...arguments),this._unknown=!0}_parse(s){return Jn(s.data)}}Cd.create=t=>new Cd({typeName:qe.ZodUnknown,...Ke(t)});class wr extends et{_parse(s){const a=this._getOrReturnCtx(s);
vendor: 17,868 bytes, line 300
300return he(a,{code:ee.invalid_type,expected:je.never,received:a.parsedType}),He}}wr.create=t=>new wr({typeName:qe.ZodNever,...Ke(t)});class Rh extends et{_parse(s){if(this._getType(s)!==je.undefined){const l=this._getOrReturnCtx(s);return he(l,{code:ee.invalid_type,expected:je.void,received:l.parsedType}),He}return Jn(s.data)}}Rh.create=t=>new Rh({typeName:qe.ZodVoid,...Ke(t)});class _s extends et{_parse(s){const{ctx:a,status:l}=this._processInputParams(s),o=this._def;if(a.parsedType!==je.array)return he(a,{code:ee.invalid_type,expected:je.array,received:a.parsedType}),He;if(o.exactLength!==null){const m=a.data.length>o.exactLength.value,f=a.data.length<o.exactLength.value;(m||f)&&(he(a,{code:m?ee.too_big:ee.too_small,minimum:f?o.exactLength.value:void 0,maximum:m?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),l.dirty())}if(o.minLength!==null&&a.data.length<o.minLength.value&&(he(a,{code:ee.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),l.dirty()),o.maxLength!==null&&a.data.length>o.maxLength.value&&(he(a,{code:ee.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),l.dirty()),a.common.async)return Promise.all([...a.data].map((m,f)=>o.type._parseAsync(new Cs(a,m,a.path,f)))).then(m=>bn.mergeArray(l,m));const u=[...a.data].map((m,f)=>o.type._parseSync(new Cs(a,m,a.path,f)));return bn.mergeArray(l,u)}get element(){return this._def.type}min(s,a){return new _s({...this._def,minLength:{value:s,message:Ce.toString(a)}})}max(s,a){return new _s({...this._def,maxLength:{value:s,message:Ce.toString(a)}})}length(s,a){return new _s({...this._def,exactLength:{value:s,message:Ce.toString(a)}})}nonempty(s){return this.min(1,s)}}_s.create=(t,s)=>new _s({type:t,minLength:null,maxLength:null,exactLength:null,typeName:qe.ZodArray,...Ke(s)});function za(t){if(t instanceof Dt){const s={};for(const a in t.shape){const l=t.shape[a];s[a]=jr.create(za(l))}return new Dt({...t._def,shape:()=>s})}else return t instanceof _s?new _s({...t._def,type:za(t.element)}):t instanceof jr?jr.create(za(t.unwrap())):t instanceof Ka?Ka.create(za(t.unwrap())):t instanceof ta?ta.create(t.items.map(s=>za(s))):t}class Dt extends et{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const s=this._def.shape(),a=ot.objectKeys(s);return this._cached={shape:s,keys:a},this._cached}_parse(s){if(this._getType(s)!==je.object){const h=this._getOrReturnCtx(s);return he(h,{code:ee.invalid_type,expected:je.object,received:h.parsedType}),He}const{status:l,ctx:o}=this._processInputParams(s),{shape:u,keys:m}=this._getCached(),f=[];if(!(this._def.catchall instanceof wr&&this._def.unknownKeys==="strip"))for(const h in o.data)m.includes(h)||f.push(h);const x=[];for(const h of m){const v=u[h],b=o.data[h];x.push({key:{status:"valid",value:h},value:v._parse(new Cs(o,b,o.path,h)),alwaysSet:h in o.data})}if(this._def.catchall instanceof wr){const h=this._def.unknownKeys;if(h==="passthrough")for(const v of f)x.push({key:{status:"valid",value:v},value:{status:"valid",value:o.data[v]}});else if(h==="strict")f.length>0&&(he(o,{code:ee.unrecognized_keys,keys:f}),l.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const v of f){const b=o.data[v];x.push({key:{status:"valid",value:v},value:h._parse(new Cs(o,b,o.path,v)),alwaysSet:v in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const h=[];for(const v of x){const b=await v.key,w=await v.value;h.push({key:b,value:w,alwaysSet:v.alwaysSet})}return h}).then(h=>bn.mergeObjectSync(l,h)):bn.mergeObjectSync(l,x)}get shape(){return this._def.shape()}strict(s){return Ce.errToObj,new Dt({...this._def,unknownKeys:"strict",...s!==void 0?{errorMap:(a,l)=>{var u,m;const o=((m=(u=this._def).errorMap)==null?void 0:m.call(u,a,l).message)??l.defaultError;return a.code==="unrecognized_keys"?{message:Ce.errToObj(s).message??o}:{message:o}}}:{}})}strip(){return new Dt({...this._def,unknownKeys:"strip"})}passthrough(){return new Dt({...this._def,unknownKeys:"passthrough"})}extend(s){return new Dt({...this._def,shape:()=>({...this._def.shape(),...s})})}merge(s){return new Dt({unknownKeys:s._def.unknownKeys,catchall:s._def.catchall,shape:()=>({...this._def.shape(),...s._def.shape()}),typeName:qe.ZodObject})}setKey(s,a){return this.augment({[s]:a})}catchall(s){return new Dt({...this._def,catchall:s})}pick(s){const a={};for(const l of ot.objectKeys(s))s[l]&&this.shape[l]&&(a[l]=this.shape[l]);return new Dt({...this._def,shape:()=>a})}omit(s){const a={};for(const l of ot.objectKeys(this.shape))s[l]||(a[l]=this.shape[l]);return new Dt({...this._def,shape:()=>a})}deepPartial(){return za(this)}partial(s){const a={};for(const l of ot.objectKeys(this.shape)){const o=this.shape[l];s&&!s[l]?a[l]=o:a[l]=o.optional()}return new Dt({...this._def,shape:()=>a})}required(s){const a={};for(const l of ot.objectKeys(this.shape))if(s&&!s[l])a[l]=this.shape[l];else{let u=this.shape[l];for(;u instanceof jr;)u=u._def.innerType;a[l]=u}return new Dt({...this._def,shape:()=>a})}keyof(){return $g(ot.objectKeys(this.shape))}}Dt.create=(t,s)=>new Dt({shape:()=>t,unknownKeys:"strip",catchall:wr.create(),typeName:qe.ZodObject,...Ke(s)});Dt.strictCreate=(t,s)=>new Dt({shape:()=>t,unknownKeys:"strict",catchall:wr.create(),typeName:qe.ZodObject,...Ke(s)});Dt.lazycreate=(t,s)=>new Dt({shape:t,unknownKeys:"strip",catchall:wr.create(),typeName:qe.ZodObject,...Ke(s)});class $o extends et{_parse(s){const{ctx:a}=this._processInputParams(s),l=this._def.options;function o(u){for(const f of u)if(f.result.status==="valid")return f.result;for(const f of u)if(f.result.status==="dirty")return a.common.issues.push(...f.ctx.common.issues),f.result;const m=u.map(f=>new qs(f.ctx.common.issues));return he(a,{code:ee.invalid_union,unionErrors:m}),He}if(a.common.async)return Promise.all(l.map(async u=>{const m={...a,common:{...a.common,issues:[]},parent:null};return{result:await u._parseAsync({data:a.data,path:a.path,parent:m}),ctx:m}})).then(o);{let u;const m=[];for(const x of l){const h={...a,common:{...a.common,issues:[]},parent:null},v=x._parseSync({data:a.data,path:a.path,parent:h});if(v.status==="valid")return v;v.status==="dirty"&&!u&&(u={result:v,ctx:h}),h.common.issues.length&&m.push(h.common.issues)}if(u)return a.common.issues.push(...u.ctx.common.issues),u.result;const f=m.map(x=>new qs(x));return he(a,{code:ee.invalid_union,unionErrors:f}),He}}get options(){return this._def.options}}$o.create=(t,s)=>new $o({options:t,typeName:qe.ZodUnion,...Ke(s)});function kd(t,s){const a=xr(t),l=xr(s);if(t===s)return{valid:!0,data:t};if(a===je.object&&l===je.object){const o=ot.objectKeys(s),u=ot.objectKeys(t).filter(f=>o.indexOf(f)!==-1),m={...t,...s};for(const f of u){const x=kd(t[f],s[f]);if(!x.valid)return{valid:!1};m[f]=x.data}return{valid:!0,data:m}}else if(a===je.array&&l===je.array){if(t.length!==s.length)return{valid:!1};const o=[];for(let u=0;u<t.length;u++){const m=t[u],f=s[u],x=kd(m,f);if(!x.valid)return{valid:!1};o.push(x.data)}return{valid:!0,data:o}}else return a===je.date&&l===je.date&&+t==+s?{valid:!0,data:t}:{valid:!1}}class Bo extends et{_parse(s){const{status:a,ctx:l}=this._processInputParams(s),o=(u,m)=>{if(_h(u)||_h(m))return He;const f=kd(u.value,m.value);return f.valid?((Ch(u)||Ch(m))&&a.dirty(),{status:a.value,value:f.data}):(he(l,{code:ee.invalid_intersection_types}),He)};return l.common.async?Promise.all([this._def.left._parseAsync({data:l.data,path:l.path,parent:l}),this._def.right._parseAsync({data:l.data,path:l.path,parent:l})]).then(([u,m])=>o(u,m)):o(this._def.left._parseSync({data:l.data,path:l.path,parent:l}),this._def.right._parseSync({data:l.data,path:l.path,parent:l}))}}Bo.create=(t,s,a)=>new Bo({left:t,right:s,typeName:qe.ZodIntersection,...Ke(a)});class ta extends et{_parse(s){const{status:a,ctx:l}=this._processInputParams(s);if(l.parsedType!==je.array)return he(l,{code:ee.invalid_type,expected:je.array,received:l.parsedType}),He;if(l.data.length<this._def.items.length)return he(l,{code:ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),He;!this._def.rest&&l.data.length>this._def.items.length&&(he(l,{code:ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());const u=[...l.data].map((m,f)=>{const x=this._def.items[f]||this._def.rest;return x?x._parse(new Cs(l,m,l.path,f)):null}).filter(m=>!!m);return l.common.async?Promise.all(u).then(m=>bn.mergeArray(a,m)):bn.mergeArray(a,u)}get items(){return this._def.items}rest(s){return new ta({...this._def,rest:s})}}ta.create=(t,s)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ta({items:t,typeName:qe.ZodTuple,rest:null,...Ke(s)})};class qo extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(s){const{status:a,ctx:l}=this._processInputParams(s);if(l.parsedType!==je.object)return he(l,{code:ee.invalid_type,expected:je.object,received:l.parsedType}),He;const o=[],u=this._def.keyType,m=this._def.valueType;for(const f in l.data)o.push({key:u._parse(new Cs(l,f,l.path,f)),value:m._parse(new Cs(l,l.data[f],l.path,f)),alwaysSet:f in l.data});return l.common.async?bn.mergeObjectAsync(a,o):bn.mergeObjectSync(a,o)}get element(){return this._def.valueType}static create(s,a,l){return a instanceof et?new qo({keyType:s,valueType:a,typeName:qe.ZodRecord,...Ke(l)}):new qo({keyType:Ss.create(),valueType:s,typeName:qe.ZodRecord,...Ke(a)})}}class Ah extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(s){const{status:a,ctx:l}=this._processInputParams(s);if(l.parsedType!==je.map)return he(l,{code:ee.invalid_type,expected:je.map,received:l.parsedType}),He;const o=this._def.keyType,u=this._def.valueType,m=[...l.data.entries()].map(([f,x],h)=>({key:o._parse(new Cs(l,f,l.path,[h,"key"])),value:u._parse(new Cs(l,x,l.path,[h,"value"]))}));if(l.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const x of m){const h=await x.key,v=await x.value;if(h.status==="aborted"||v.status==="aborted")return He;(h.status==="dirty"||v.status==="dirty")&&a.dirty(),f.set(h.value,v.value)}return{status:a.value,value:f}})}else{const f=new Map;for(const x of m){const h=x.key,v=x.value;if(h.status==="aborted"||v.status==="aborted")return He;(h.status==="dirty"||v.status==="dirty")&&a.dirty(),f.set(h.value,v.value)}return{status:a.value,value:f}}}}Ah.create=(t,s,a)=>new Ah({valueType:s,keyType:t,typeName:qe.ZodMap,...Ke(a)});class Xi extends et{_parse(s){const{status:a,ctx:l}=this._processInputParams(s);if(l.parsedType!==je.set)return he(l,{code:ee.invalid_type,expected:je.set,received:l.parsedType}),He;const o=this._def;o.minSize!==null&&l.data.size<o.minSize.value&&(he(l,{code:ee.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),a.dirty()),o.maxSize!==null&&l.data.size>o.maxSize.value&&(he(l,{code:ee.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),a.dirty());const u=this._def.valueType;function m(x){const h=new Set;for(const v of x){if(v.status==="aborted")return He;v.status==="dirty"&&a.dirty(),h.add(v.value)}return{status:a.value,value:h}}const f=[...l.data.values()].map((x,h)=>u._parse(new Cs(l,x,l.path,h)));return l.common.async?Promise.all(f).then(x=>m(x)):m(f)}min(s,a){return new Xi({...this._def,minSize:{value:s,message:Ce.toString(a)}})}max(s,a){return new Xi({...this._def,maxSize:{value:s,message:Ce.toString(a)}})}size(s,a){return this.min(s,a).max(s,a)}nonempty(s){return this.min(1,s)}}Xi.create=(t,s)=>new Xi({valueType:t,minSize:null,maxSize:null,typeName:qe.ZodSet,...Ke(s)});class Oh extends et{get schema(){return this._def.getter()}_parse(s){const{ctx:a}=this._processInputParams(s);return this._def.getter()._parse({data:a.data,path:a.path,parent:a})}}Oh.create=(t,s)=>new Oh({getter:t,typeName:qe.ZodLazy,...Ke(s)});class Ed extends et{_parse(s){if(s.data!==this._def.value){const a=this._getOrReturnCtx(s);return he(a,{received:a.data,code:ee.invalid_literal,expected:this._def.value}),He}return{status:"valid",value:s.data}}get value(){return this._def.value}}Ed.create=(t,s)=>new Ed({value:t,typeName:qe.ZodLiteral,...Ke(s)});function $g(t,s){return new Za({values:t,typeName:qe.ZodEnum,...Ke(s)})}class Za extends et{_parse(s){if(typeof s.data!="string"){const a=this._getOrReturnCtx(s),l=this._def.values;return he(a,{expected:ot.joinValues(l),received:a.parsedType,code:ee.invalid_type}),He}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(s.data)){const a=this._getOrReturnCtx(s),l=this._def.values;return he(a,{received:a.data,code:ee.invalid_enum_value,options:l}),He}return Jn(s.data)}get options(){return this._def.values}get enum(){const s={};for(const a of this._def.values)s[a]=a;return s}get Values(){const s={};for(const a of this._def.values)s[a]=a;return s}get Enum(){const s={};for(const a of this._def.values)s[a]=a;return s}extract(s,a=this._def){return Za.create(s,{...this._def,...a})}exclude(s,a=this._def){return Za.create(this.options.filter(l=>!s.includes(l)),{...this._def,...a})}}Za.create=$g;class Lh extends et{_parse(s){const a=ot.getValidEnumValues(this._def.values),l=this._getOrReturnCtx(s);if(l.parsedType!==je.string&&l.parsedType!==je.number){const o=ot.objectValues(a);return he(l,{expected:ot.joinValues(o),received:l.parsedType,code:ee.invalid_type}),He}if(this._cache||(this._cache=new Set(ot.getValidEnumValues(this._def.values))),!this._cache.has(s.data)){const o=ot.objectValues(a);return he(l,{received:l.data,code:ee.invalid_enum_value,options:o}),He}return Jn(s.data)}get enum(){return this._def.values}}Lh.create=(t,s)=>new Lh({values:t,typeName:qe.ZodNativeEnum,...Ke(s)});class Vo extends et{unwrap(){return this._def.type}_parse(s){const{ctx:a}=this._processInputParams(s);if(a.parsedType!==je.promise&&a.common.async===!1)return he(a,{code:ee.invalid_type,expected:je.promise,received:a.parsedType}),He;const l=a.parsedType===je.promise?a.data:Promise.resolve(a.data);return Jn(l.then(o=>this._def.type.parseAsync(o,{path:a.path,errorMap:a.common.contextualErrorMap})))}}Vo.create=(t,s)=>new Vo({type:t,typeName:qe.ZodPromise,...Ke(s)});class na extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(s){const{status:a,ctx:l}=this._processInputParams(s),o=this._def.effect||null,u={addIssue:m=>{he(l,m),m.fatal?a.abort():a.dirty()},get path(){return l.path}};if(u.addIssue=u.addIssue.bind(u),o.type==="preprocess"){const m=o.transform(l.data,u);if(l.common.async)return Promise.resolve(m).then(async f=>{if(a.value==="aborted")return He;const x=await this._def.schema._parseAsync({data:f,path:l.path,parent:l});return x.status==="aborted"?He:x.status==="dirty"||a.value==="dirty"?qi(x.value):x});{if(a.value==="aborted")return He;const f=this._def.schema._parseSync({data:m,path:l.path,parent:l});return f.status==="aborted"?He:f.status==="dirty"||a.value==="dirty"?qi(f.value):f}}if(o.type==="refinement"){const m=f=>{const x=o.refinement(f,u);if(l.common.async)return Promise.resolve(x);if(x instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(l.common.async===!1){const f=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});return f.status==="aborted"?He:(f.status==="dirty"&&a.dirty(),m(f.value),{status:a.value,value:f.value})}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(f=>f.status==="aborted"?He:(f.status==="dirty"&&a.dirty(),m(f.value).then(()=>({status:a.value,value:f.value}))))}if(o.type==="transform")if(l.common.async===!1){const m=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});if(!Wa(m))return He;const f=o.transform(m.value,u);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:f}}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(m=>Wa(m)?Promise.resolve(o.transform(m.value,u)).then(f=>({status:a.value,value:f})):He);ot.assertNever(o)}}na.create=(t,s,a)=>new na({schema:t,typeName:qe.ZodEffects,effect:s,...Ke(a)});na.createWithPreprocess=(t,s,a)=>new na({schema:s,effect:{type:"preprocess",transform:t},typeName:qe.ZodEffects,...Ke(a)});class jr extends et{_parse(s){return this._getType(s)===je.undefined?Jn(void 0):this._def.innerType._parse(s)}unwrap(){return this._def.innerType}}jr.create=(t,s)=>new jr({innerType:t,typeName:qe.ZodOptional,...Ke(s)});class Ka extends et{_parse(s){return this._getType(s)===je.null?Jn(null):this._def.innerType._parse(s)}unwrap(){return this._def.innerType}}Ka.create=(t,s)=>new Ka({innerType:t,typeName:qe.ZodNullable,...Ke(s)});class Td extends et{_parse(s){const{ctx:a}=this._processInputParams(s);let l=a.data;return a.parsedType===je.undefined&&(l=this._def.defaultValue()),this._def.innerType._parse({data:l,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}Td.create=(t,s)=>new Td({innerType:t,typeName:qe.ZodDefault,defaultValue:typeof s.default=="function"?s.default:()=>s.default,...Ke(s)});class Pd extends et{_parse(s){const{ctx:a}=this._processInputParams(s),l={...a,common:{...a.common,issues:[]}},o=this._def.innerType._parse({data:l.data,path:l.path,parent:{...l}});return Uo(o)?o.then(u=>({status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new qs(l.common.issues)},input:l.data})}
300)):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new qs(l.common.issues)},input:l.data})}}removeCatch(){return this._def.innerType}}Pd.create=(t,s)=>new Pd({innerType:t,typeName:qe.ZodCatch,catchValue:typeof s.catch=="function"?s.catch:()=>s.catch,...Ke(s)});class Ih extends et{_parse(s){if(this._getType(s)!==je.nan){const l=this._getOrReturnCtx(s);return he(l,{code:ee.invalid_type,expected:je.nan,received:l.parsedType}),He}return{status:"valid",value:s.data}}}Ih.create=t=>new Ih({typeName:qe.ZodNaN,...Ke(t)});class mS extends et{_parse(s){const{ctx:a}=this._processInputParams(s),l=a.data;return this._def.type._parse({data:l,path:a.path,parent:a})}unwrap(){return this._def.type}}class im extends et{_parse(s){const{status:a,ctx:l}=this._processInputParams(s);if(l.common.async)return(async()=>{const u=await this._def.in._parseAsync({data:l.data,path:l.path,parent:l});return u.status==="aborted"?He:u.status==="dirty"?(a.dirty(),qi(u.value)):this._def.out._parseAsync({data:u.value,path:l.path,parent:l})})();{const o=this._def.in._parseSync({data:l.data,path:l.path,parent:l});return o.status==="aborted"?He:o.status==="dirty"?(a.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:l.path,parent:l})}}static create(s,a){return new im({in:s,out:a,typeName:qe.ZodPipeline})}}class Rd extends et{_parse(s){const a=this._def.innerType._parse(s),l=o=>(Wa(o)&&(o.value=Object.freeze(o.value)),o);return Uo(a)?a.then(o=>l(o)):l(a)}unwrap(){return this._def.innerType}}Rd.create=(t,s)=>new Rd({innerType:t,typeName:qe.ZodReadonly,...Ke(s)});var qe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(qe||(qe={}));const P=Ss.create,Vt=Jr.create;ea.create;const Qe=Fo.create;Ga.create;const pS=_d.create,Bg=Cd.create;wr.create;const Ct=_s.create,de=Dt.create,Qt=$o.create;Bo.create;ta.create;const cc=qo.create,zt=Ed.create,Re=Za.create;Vo.create;jr.create;Ka.create;const uc=na.createWithPreprocess,Ve={string:(t=>Ss.create({...t,coerce:!0})),number:(t=>Jr.create({...t,coerce:!0})),boolean:(t=>Fo.create({...t,coerce:!0})),bigint:(t=>ea.create({...t,coerce:!0})),date:(t=>Ga.create({...t,coerce:!0}))},qg=P().uuid(),Vg=de({page:Ve.number().int().min(1).default(1),limit:Ve.number().int().min(1).max(Dg).default(Ig),sort:P().optional(),order:Re(["asc","desc"]).default("desc")}),fS=Vg.extend({q:P().trim().optional()}),Dh=Re(["true","false"]).optional().transform(t=>t==="true"?!0:t==="false"?!1:void 0),hS="unset",xS=[...am,hS];function gS(t){return t==null||t===""?[]:(Array.isArray(t)?t:[t]).flatMap(a=>String(a).split(",")).map(a=>a.trim()).filter(Boolean)}function Ad(t){return uc(s=>{const a=gS(s);return a.length>0?a:void 0},Ct(Re(t)).optional())}fS.extend({status:Ad([...Ag]),companyType:Re(Og).optional(),importedFromKe:Dh,hasHost:Dh,structureType:Ad([...xS]),minQuality:Ve.number().int().min(0).max(100).optional(),maxQuality:Ve.number().int().min(0).max(100).optional()});de({themes:Ct(P().trim().min(1).max(255))});de({categoryIds:Ct(P().uuid())});de({audienceIds:Ct(P().uuid())});const yS=de({code:P().min(1).max(50).transform(t=>t.trim().toUpperCase().replace(/[^A-Z0-9]+/g,"_").replace(/^_+|_+$/g,"")).refine(t=>zw.test(t),"Code audience invalide (slug uppercase)"),label:P().min(1).max(100),description:P().max(2e3).nullish(),sortOrder:Ve.number().int().min(0).max(1e4).default(0),active:Ve.boolean().default(!0)});yS.partial();const Od=Qt([P().url(),zt("")]).nullish(),vS=de({name:P().min(1).max(255),legalName:P().max(255).nullish(),slug:P().min(1).max(255).regex(/^[a-z0-9-]+$/),siren:P().length(9).nullish(),description:P().nullish(),website:Od,contactFormUrl:Od,email:Qt([P().email(),zt("")]).nullish(),phone:P().max(30).nullish(),status:Re(Ag).default("draft"),companyType:Re(Og).default("
300company"),structureType:Re(am).nullish(),structureTypeSource:Re(_w).nullish(),structureTypeConfidence:Vt().min(0).max(1).nullish(),metadata:cc(Bg()).nullish()}),Hg=de(Object.fromEntries(Qi.map(t=>[t,Od])));vS.partial().extend({postalAddress:P().max(2e3).nullish(),socialNetworks:Hg.partial().optional()});const bS=de({name:P().min(1).max(255),website:Qt([P().url(),zt("")]).nullish(),email:Qt([P().email(),zt("")]).nullish(),phone:P().max(30).nullish(),description:P().nullish()});bS.partial();de({companyId:qg});de({hostCompanyId:qg.nullable()});Vg.extend({q:P().trim().optional()});de({dryRun:Qe().default(!1),since:P().datetime().optional()});const jS=de({firstName:P().max(100).nullish(),lastName:P().max(100).nullish(),email:Qt([P().email(),zt("")]).nullish(),phone:P().max(30).nullish(),role:Re(ww),isPrimary:Qe().default(!1),notes:P().nullish()});jS.partial();const zh=uc(t=>t===""?null:t,Qt([P().datetime(),P().date()]).nullish()),NS=de({openingDate:Qt([P().datetime(),P().date()]),closingDate:zh,depositDeadlineDate:zh,budget:Vt().int().min(0).nullish(),theme:P().max(255).nullish(),url:Qt([P().url(),zt("")]).nullish(),isActive:Qe().default(!0)});NS.partial();de({supportsProjectEducation:Ve.boolean().default(!1),supportsProjectCulture:Ve.boolean().default(!1),supportsProjectResearch:Ve.boolean().default(!1),supportsProjectHumanitarian:Ve.boolean().default(!1),supportsProjectEnvironment:Ve.boolean().default(!1),supportsProjectHealth:Ve.boolean().default(!1),supportsProjectInclusion:Ve.boolean().default(!1),supportsProjectInnovation:Ve.boolean().default(!1),supportsProjectHeritage:Ve.boolean().default(!1),supportsProjectSport:Ve.boolean().default(!1),minBudget:Ve.number().int().min(0).nullish(),maxBudget:Ve.number().int().min(0).nullish(),minAge:Ve.number().int().min(0).nullish(),geoScope:Re(Sw).nullish(),acceptsLocalProjects:Ve.boolean().default(!0),acceptsInternationalProjects:Ve.boolean().default(!1),avgResponseDays:Ve.number().int().min(0).nullish(),guaranteedResponseDays:Ve.number().int().min(0).nullish(),regionIds:Ct(P().uuid()).optional(),description:P().max(5e3).nullish().transform(t=>{if(t==null)return null;const s=t.trim();return s.length>0?s:null})});de({associationStatutes:Qe().default(!1),budget:Qe().default(!1),projectFile:Qe().default(!1),photos:Qe().default(!1),video:Qe().default(!1),taxReceipt:Qe().default(!1),extraDocuments:cc(Qe()).optional()});const wS=de({name:P().min(1).max(100),slug:P().min(1).max(100),parentId:P().uuid().nullish(),description:P().nullish()});wS.partial();de({name:P().min(1).max(100),slug:P().min(1).max(100)});de({rating:Vt().int().min(1).max(5),amountReceived:Vt().int().min(0).nullish(),responseDays:Vt().int().min(0).nullish(),wasFunded:Qe().default(!1),comment:P().max(5e3).nullish()});de({field:P().min(1).max(100),suggestedValue:P().optional(),comment:P().max(2e3).optional()});de({name:P().trim().min(2).max(255),website:P().trim().max(500).nullish(),comment:P().trim().max(2e3).nullish()});de({action:Re(["approve","reject"]),notes:P().max(2e3).nullish(),publish:Qe().optional().default(!0)});de({settings:Ct(de({key:P().min(1).max(100),value:Vt().int().min(0).max(1e4)})).min(1)});const SS=de({...Object.fromEntries(Xr.map(({key:t})=>[t,Ve.boolean().optional()])),...Object.fromEntries(Uw.map(({field:t})=>[t,Ve.boolean().optional()]))}),_S=de({q:P().optional(),category:P().optional(),keyword:P().optional(),region:P().optional(),audience:uc(t=>t==null||t===""?[]:(Array.isArray(t)?t:[t]).flatMap(a=>String(a).split(",")).map(a=>a.trim()).filter(Boolean),Ct(P())).optional(),structureType:Ad([...am]),minBudget:Ve.number().int().min(0).optional(),maxBudget:Ve.number().int().min(0).optional(),supportType:Re(ic).optional(),maxResponseDays:Ve.number().int().min(0).optional(),page:Ve.number().int().min(1).default(1),limit:Ve.number().int().min(1).max(100).default(20)});_S.merge(SS);de({title:P().min(1).max(255),description:P().min(10),budget:Vt().int().min(0).optional(),regionId:P().uuid().optional(),categoryIds:Ct(P().uuid()).optional(),keywordIds:Ct(P().uuid()).optional(),supportTypes:Ct(Re(ic)).optional(),fundingChannel:Re(ac).default(Cw)});const td=Qt([P().url(),P().regex(/^\/uploads\/.+/),zt("")]);de({title:P().min(1).max(255).optional(),slug:P().min(1).max(255).optional(),description:P().min(10).optional(),budget:Vt().int().min(0).nullable().optional(),regionId:P().uuid().nullable().optional(),status:Re(kw).optional(),logoUrl:td.nullable().optional(),imageUrl:td.nullable().optional(),dossierUrl:td.nullable().optional(),isFeatured:Qe().optional(),featuredUntil:P().nullable().optional(),isPremiumListing:Qe().optional(),isUrgent:Qe().optional(),matchingEnabled:Qe().optional(),logoImageEnabled:Qe().optional(),boostFrequency:uc(t=>t===""||t===void 0?null:t,Re(Ew).nullable().optional()),boostUntil:P().nullable().optional(),premiumListingUntil:P().nullable().optional(),categoryIds:Ct(P().uuid()).optional(),keywordIds:Ct(P().uuid()).optional(),fundingChannel:Re(ac).optional()});de({action:Re(["approve","reject"]),notes:P().max(2e3).nullish()});const CS=["title","slug","budget","createdAt","republishAt"];de({site:Re(["sponsor","mecenat"]).optional(),orderBy:Re(CS).default("
300createdAt"),order:Re(["asc","desc"]).default("desc")});de({email:P().email(),password:P().min(6)});const Mh=["description","themes","project_domains"],kS=["single_field","missing_fields_batch"];de({question:P().min(5).max(2e3).optional(),useWebSearch:Qe().optional(),restrictToEntryHost:Qe().optional(),restrictToEntryPage:Qe().optional(),runDiscovery:Qe().default(!1),runFullPipeline:Qe().default(!0),requestMode:Re(kS).default("single_field"),fieldTarget:Re(Mh).optional(),fieldTargets:Ct(Re(Mh)).max(10).optional()});de({limit:Ve.number().int().min(1).max(100).optional(),minDaysSinceLastRun:Ve.number().int().min(0).max(365).optional(),dryRun:Qe().default(!1),runKeSyncAfter:Qe().default(!0)});de({page:Ve.number().int().min(1).default(1),limit:Ve.number().int().min(1).max(Dg).default(Ig),companyId:P().uuid().optional(),status:Re(["pending","running","completed","failed","rejected"]).optional(),trigger:Re(Ow).optional()});const Wg=["day","week","month","year"],Gg=Re(sm).optional().transform(t=>rm(t));de({site:Gg,granularity:Re(Wg).default("month"),from:Ve.date().optional(),to:Ve.date().optional()});de({granularity:Re(Wg).default("month"),from:Ve.date().optional(),to:Ve.date().optional(),site:Gg});const Bs=Qt([P().url(),P().regex(/^\/uploads\/.+/),zt("")]);de({email:P().email(),password:P().min(6).max(128),displayName:P().min(1).max(255).optional(),intent:Re(["client","sponsor"]).default("client")});de({email:P().email()});de({token:P().min(20).max(200),password:P().min(6).max(128)});de({token:P().min(20).max(200),password:P().min(6).max(128)});de({title:P().min(1).max(255).optional(),description:P().min(10),budget:Vt().int().min(0).optional(),regionId:P().uuid().optional(),categoryIds:Ct(P().uuid()).optional(),keywordIds:Ct(P().uuid()).optional(),supportTypes:Ct(Re(ic)).optional(),logoUrl:Bs.optional(),imageUrl:Bs.optional(),dossierUrl:Bs.optional(),serviceCodes:Ct(Re(wd)).optional(),useAiTitleSlug:Qe().optional(),slugAnonymous:Qe().optional(),fundingChannel:Re(ac).optional()});de({target:Re(["title","description"]),mode:Re(["rewrite","proofread"]).optional()});de({target:Re(["title","description"]),value:P().min(1).max(2e4)});de({description:P().min(10),slugAnonymous:Qe().optional()});de({serviceCodes:Ct(Re(wd)).default([]),contributorRewards:Ct(de({tierId:P().min(1),serviceCode:Re(wd)})).optional(),logoUrl:Bs.optional(),imageUrl:Bs.optional(),dossierUrl:Bs.optional()}).refine(t=>{var s;return t.serviceCodes.length+(((s=t.contributorRewards)==null?void 0:s.length)??0)>0},{message:"Sélectionnez au moins une option"});de({label:P().min(1).max(255).optional(),description:P().nullish(),category:Re(Nd).optional(),priceCents:Vt().int().min(0).optional(),isActive:Qe().optional(),sortOrder:Vt().int().optional(),config:cc(Bg()).nullish()});de({label:P().min(1).max(255).optional(),triggerCategory:Re(Nd).optional(),targetCategory:Re(Nd).optional(),discountPercent:Vt().int().min(0).max(100).optional(),isActive:Qe().optional()});de({status:Re(["pending_payment","active","expired","cancelled"]).optional()});de({discounts:Ct(de({tierId:P().min(1).max(50),discountPercent:Vt().int().min(0).max(100)})).min(1)});de({description:P().min(10).optional(),budget:Vt().int().min(0).nullable().optional(),regionId:P().uuid().nullable().optional(),categoryIds:Ct(P().uuid()).optional(),keywordIds:Ct(P().uuid()).optional(),supportTypes:Ct(Re(ic)).optional(),logoUrl:Bs.nullable().optional(),imageUrl:Bs.nullable().optional(),dossierUrl:Bs.nullable().optional(),fundingChannel:Re(ac).optional(),status:Re(["published","requested_offline"]).optional()});de({email:P().email().optional(),displayName:P().min(1).max(255).nullable().optional(),password:P().min(6).max(128).optional(),billing:de({firstName:P().max(100).nullable().optional(),lastName:P().max(100).nullable().optional(),organization:P().max(255).nullable().optional(),addressLine1:P().max(255).nullable().optional(),addressLine2:P().max(255).nullable().optional(),postalCode:P().max(20).nullable().optional(),city:P().max(100).nullable().optional(),country:P().max(2).nullable().optional()}).optional()});de({firstName:P().min(1).max(100),lastName:P().min(1).max(100),organization:P().max(255).nullable().optional(),addressLine1:P().min(1).max(255),addressLine2:P().max(255).nullable().optional(),postalCode:P().min(1).max(20),city:P().min(1).max(100),country:P().length(2).default("FR")});de({site:Re(sm).optional().transform(t=>rm(t))});de({q:P().optional(),urgent:Ve.boolean().optional(),featured:Ve.boolean().optional(),category:P().optional(),region:P().uuid().optional(),page:Ve.number().int().min(1).default(1),limit:Ve.number().int().min(1).max(50).default(8),packBuffer:Ve.number().int().min(0).max(20).optional(),offset:Ve.number().int().min(0).optional(),site:Re(sm).optional().transform(t=>rm(t))});de({clientStatus:Re(["new","interested","dismissed","contacted"]).optional(),requestIntro:zt(!0).optional(),clientNote:P().max(2e3).nullable().optional()}).refine(t=>t.clientStatus!==void 0||t.requestIntro!==void 0||t.clientNote!==void 0,{message:"Aucune modification fournie"});de({companyId:P().uuid(),message:P().max(2e3).nullish().transform(t=>{if(t==null)return null;const s=t.trim();return s.length>0?s:null}),siren:P().nullish().transform(t=>{if(t==null)return null;const s=t.replace(/\D/g,"");return s.length>0?s:null}).refine(t=>t==null||/^\d{9}$/.test(t),{message:"Le SIREN doit contenir 9 chiffres"}),evidenceDocumentUrl:Qt([P().url(),P().regex(/^\/uploads\/.+/),zt("")]).nullish().transform(t=>t==null||t===""?null:t)}).refine(t=>!!t.siren||!!t.evidenceDocumentUrl,{message:"Indiquez un SIREN ou joignez un justificatif pour accélérer la vérification"});de({action:Re(["approve","reject"]),notes:P().max(2e3).nullish()});de({q:P().min(1).max(200),limit:Ve.number().int().min(1).max(30).default(15)});de({description:P().nullish(),website:Qt([P().url(),zt("")]).nullish(),email:Qt([P().email(),zt("")]).nullish(),phone:P().max(100).nullish(),postalAddress:P().max(2e3).nullish(),socialNetworks:Hg.partial().optional()});de({reply:P().trim().min(1).max(5e3)});de({sessionId:P().min(1).max(255)});de({introStatus:Re(["in_progress","done"])});de({title:P().min(1).max(255).optional(),description:P().max(2e3).nullable().optional(),sortOrder:Vt().int().min(0).optional()});de({content:P().default(""),title:P().min(1).max(255).nullable().optional(),notes:P().max(2e3).nullable().optional(),contentFormat:Re(["html","markdown"]).optional(),fromVersionId:P().uuid().nullable().optional()});de({content:P().min(1).optional(),title:P().min(1).max(255).nullable().optional(),notes:P().max(2e3).nullable().optional()});const Uh=P().max(2e3).nullable().optional(),zn=P().max(255).nullable().optional(),Fh=Qt([P().email(),zt("")]).nullable().optional();de({legalName:zn,legalForm:zn,shareCapital:zn,headOfficeAddress:Uh,siret:P().max(20).nullable().optional(),rcsCity:zn,rcsNumber:zn,vatNumber:zn,contactEmail:Fh,dpoEmail:Fh,phone:zn,publicationDirectorName:zn,publicationDirectorTitle:zn,hostingName:zn,hostingAddress:Uh,hostingContact:zn,siteName:zn,siteDomain:zn,allowSearchIndexing:Qe().optional(),allowSearchIndexingSponsor:Qe().optional(),allowSearchIndexingMecenat:Qe().optional(),extra:cc(P()).nullable().optional()});const Zg=Re(["draft","published"]),Kg=P().min(1).max(160).transform(t=>zg(t)).refine(t=>t.length>0,"Slug invalide").refine(t=>!Mg(t),"Ce slug est réservé par l'application"),Yg=Qt([P().url(),P().regex(/^\/uploads\/.+/),zt("")]).nullable().optional();de({slug:Kg,title:P().min(1).max(255),metaTitle:P().max(255).nullable().optional(),metaDescription:P().max(500).nullable().optional(),heroImageUrl:Yg,heroImageAlt:P().max(255).nullable().optional(),content:P().default(""),status:Zg.optional(),sortOrder:Vt().int().min(0).optional()}).superRefine((t,s)=>{const a=oc(t.content??"");if(!a.ok)for(const l of a.errors)s.addIssue({code:ee.custom,message:l,path:["content"]})});de({slug:Kg.optional(),title:P().min(1).max(255).optional(),metaTitle:P().max(255).nullable().optional(),metaDescription:P().max(500).nullable().optional(),heroImageUrl:Yg,heroImageAlt:P().max(255).nullable().optional(),content:P().optional(),status:Zg.optional(),sortOrder:Vt().int().min(0).optional()}).superRefine((t,s)=>{if(t.content!==void 0){const a=oc(t.content);if(!a.ok)for(const l of a.errors)s.addIssue({code:ee.custom,message:l,path:["content"]})}});const Qg=Re(["draft","published"]),Xg=P().min(1).max(160).transform(t=>zg(t)).refine(t=>t.length>0,"Slug invalide").refine(t=>!Mg(t),"Ce slug est réservé par l'application"),Jg=Qt([P().url(),P().regex(/^\/uploads\/.+/),zt("")]).nullable().optional(),e0=Qt([P().datetime({offset:!0}),P().datetime(),zt(""),pS()]).optional();de({slug:Xg,title:P().min(1).max(255),excerpt:P().max(2e3).nullable().optional(),metaTitle:P().max(255).nullable().optional(),metaDescription:P().max(500).nullable().optional(),heroImageUrl:Jg,heroImageAlt:P().max(255).nullable().optional(),content:P().default(""),status:Qg.optional(),publishedAt:e0}).superRefine((t,s)=>{const a=oc(t.content??"");if(!a.ok)for(const l of a.errors)s.addIssue({code:ee.custom,message:l,path:["content"]})});
300de({slug:Xg.optional(),title:P().min(1).max(255).optional(),excerpt:P().max(2e3).nullable().optional(),metaTitle:P().max(255).nullable().optional(),metaDescription:P().max(500).nullable().optional(),heroImageUrl:Jg,heroImageAlt:P().max(255).nullable().optional(),content:P().optional(),status:Qg.optional(),publishedAt:e0}).superRefine((t,s)=>{if(t.content!==void 0){const a=oc(t.content);if(!a.ok)for(const l of a.errors)s.addIssue({code:ee.custom,message:l,path:["content"]})}});const t0=Re(["sponsor","mecenat"]),Ho=P().min(1).max(255).transform(t=>{var a;let s=t.trim();return s.startsWith("/")||(s=`/${s}`),s=((a=s.split("?")[0])==null?void 0:a.split("#")[0])??s,s.length>1&&s.endsWith("/")&&(s=s.slice(0,-1)),s}).refine(t=>t.startsWith("/"),"Le chemin doit commencer par /").refine(t=>!/^https?:\/\//i.test(t)&&!t.includes("://")&&!/^\/\//.test(t),"Indiquez un chemin relatif (pas d’URL avec domaine)").refine(t=>!/\s/.test(t),"Le chemin ne doit pas contenir d’espaces"),n0=Qt([zt(301),zt(302),zt(307),zt(308)]);de({fromPath:Ho,toPath:Ho,site:t0.optional(),statusCode:n0.optional(),enabled:Qe().optional()}).superRefine((t,s)=>{t.fromPath===t.toPath&&s.addIssue({code:ee.custom,message:"La source et la destination doivent être différentes",path:["toPath"]})});de({fromPath:Ho.optional(),toPath:Ho.optional(),site:t0.optional(),statusCode:n0.optional(),enabled:Qe().optional()}).superRefine((t,s)=>{t.fromPath!==void 0&&t.toPath!==void 0&&t.fromPath===t.toPath&&s.addIssue({code:ee.custom,message:"La source et la destination doivent être différentes",path:["toPath"]})});const s0=Re(["header","footer"]),r0=Re(["path","page","external"]),ES={zone:s0,parentId:P().uuid().nullable().optional(),label:P().min(1).max(120),linkType:r0,path:P().max(255).nullable().optional(),pageId:P().uuid().nullable().optional(),externalUrl:P().max(500).nullable().optional(),sortOrder:Vt().int().min(0).optional(),visible:Qe().optional()};function a0(t,s){var a;if(t.linkType==="page"&&!t.pageId&&s.addIssue({code:ee.custom,message:"Sélectionnez une page de contenu",path:["pageId"]}),t.linkType==="external"){const l=(a=t.externalUrl)==null?void 0:a.trim();l?/^https?:\/\//i.test(l)||s.addIssue({code:ee.custom,message:"L'URL doit commencer par http:// ou https://",path:["externalUrl"]}):s.addIssue({code:ee.custom,message:"URL externe requise",path:["externalUrl"]})}}de(ES).superRefine(a0);de({zone:s0.optional(),parentId:P().uuid().nullable().optional(),label:P().min(1).max(120).optional(),linkType:r0.optional(),path:P().max(255).nullable().optional(),pageId:P().uuid().nullable().optional(),externalUrl:P().max(500).nullable().optional(),sortOrder:Vt().int().min(0).optional(),visible:Qe().optional()}).superRefine((t,s)=>{t.linkType&&a0({...t,linkType:t.linkType},s)});function Fn(t){const s=Nw(t);if(s)return/^https?:\/\//i.test(s)?s:`/${s.replace(/^\/+/,"")}`}function lm(t){const{isPremiumListing:s=!1,isFeatured:a=!1,isUrgent:l=!1,base:o="card group flex h-full flex-col overflow-hidden transition hover:-translate-y-0.5"}=t,u=[o];return s?u.push("ring-2 ring-amber-300/60 hover:shadow-xl"):l?u.push("ring-1 ring-red-200/80 hover:shadow-lg"):a?u.push("ring-2 ring-brand/20 hover:shadow-lg"):u.push("hover:shadow-lg"),s?u.push("bg-[linear-gradient(to_top,rgb(255_251_235/0.95)_0%,transparent_18%)]"):l&&u.push("bg-[linear-gradient(to_top,rgb(254_242_242/0.9)_0%,transparent_18%)]"),u.join(" ")}const nd=["/project-default.svg","/project-default-2.svg","/project-default-3.svg","/project-default-4.svg","/project-default-5.svg","/project-default-6.svg","/project-default-7.svg","/project-default-8.svg","/project-default-9.svg","/project-default-10.svg","/project-default-11.svg","/project-default-12.svg","/project-default-13.svg","/project-default-14.svg","/project-default-15.svg","/project-default-16.svg"],TS="/brand/logo-mark-256.png";function PS(t){let s=0;for(let a=0;a<t.length;a+=1)s=s*31+t.charCodeAt(a)>>>0;return s}function RS(t){return t?nd[PS(t)%nd.length]:nd[0]}function AS({aspectClass:t="aspect-[16/9]",className:s="",seed:a}){const l=RS(a);return r.jsxs("div",{className:`relative overflow-hidden bg-slate-100 ${t} ${s}
300`.trim(),"aria-hidden":!0,children:[r.jsx("img",{src:l,alt:"",className:"absolute inset-0 h-full w-full object-cover",loading:"lazy"}),r.jsx("img",{src:TS,alt:"",className:"absolute left-1/2 top-1/2 h-8 w-8 -translate-x-1/2 -translate-y-1/2 object-contain",width:32,height:32,loading:"lazy"})]})}function dc({imageUrl:t,aspectClass:s="aspect-[16/9]",className:a="",imgClassName:l="",seed:o}){return t?r.jsx("div",{className:`overflow-hidden bg-slate-100 ${s} ${a}`.trim(),children:r.jsx("img",{src:t,alt:"",className:`h-full w-full object-cover ${l}`.trim()})}):r.jsx(AS,{aspectClass:s,className:a,seed:o})}const OS={premium:{label:"Format premium",portalClassName:"bg-amber-100 text-amber-800 font-medium",publicClassName:"bg-gradient-to-r from-amber-500 to-amber-600 text-white font-semibold",icon:Xa},featured:{label:"À la une",portalClassName:"bg-brand/10 text-brand font-medium",publicClassName:"bg-brand text-white font-semibold",icon:br},urgent:{label:"Urgent",portalClassName:"bg-red-100 text-red-700 font-medium",publicClassName:"border border-red-200/80 bg-red-50 text-red-700 font-medium",icon:Wb},matching:{label:"Matching",portalClassName:"bg-emerald-100 text-emerald-700 font-medium",publicClassName:"bg-emerald-100 text-emerald-700 font-semibold",icon:Vb}},LS={sm:{badge:"px-2 py-0.5 text-[10px]",icon:10},md:{badge:"px-2.5 py-1 text-xs",icon:12}};function bo({type:t,variant:s="portal",size:a="md",label:l,className:o=""}){const u=OS[t],m=u.icon,f=LS[a],x=s==="public"?u.publicClassName:u.portalClassName;return r.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full ${f.badge} ${x} ${o}`,children:[r.jsx(m,{size:f.icon,className:"shrink-0","aria-hidden":!0}),l??u.label]})}function il({isPremiumListing:t,isFeatured:s,isUrgent:a,matchingEnabled:l,variant:o="portal",size:u="md",matchingLabel:m,className:f=""}){return r.jsxs("span",{className:`inline-flex flex-wrap items-center gap-2 ${f}`,children:[t&&r.jsx(bo,{type:"premium",variant:o,size:u}),s&&r.jsx(bo,{type:"featured",variant:o,size:u}),a&&r.jsx(bo,{type:"urgent",variant:o,size:u}),l&&r.jsx(bo,{type:"matching",variant:o,size:u,label:m})]})}function IS({project:t}){const s=Fn(t.imageUrl);return r.jsxs(V,{to:`/projets/${t.slug}`,className:lm({isPremiumListing:t.isPremiumListing,isFeatured:!0,isUrgent:t.isUrgent,base:"group block overflow-hidden rounded-xl border border-brand/15 bg-white shadow-sm transition hover:border-brand/40 hover:shadow-md"}),children:[r.jsx(dc,{imageUrl:s,seed:t.id,aspectClass:"aspect-[5/3]"}),r.jsxs("div",{className:"p-3",children:[r.jsx("div",{className:"mb-1.5 flex flex-wrap gap-1",children:r.jsx(il,{variant:"public",size:"sm",isFeatured:!0,isUrgent:t.isUrgent})}),r.jsx("h3",{className:"line-clamp-2 text-sm font-semibold leading-snug text-slate-900 group-hover:text-brand",children:t.title}),t.region&&r.jsxs("p",{className:"mt-1 inline-flex items-center gap-1 text-[11px] text-slate-500",children:[r.jsx(tl,{size:11}),t.region.name]}),r.jsx("p",{className:"mt-1.5 line-clamp-2 text-xs leading-relaxed text-slate-600",children:lc(t.description)}),r.jsxs("span",{className:"mt-2 inline-flex items-center gap-1 text-xs font-medium text-brand",children:["Voir l'annonce",r.jsx(At,{size:12,className:"transition group-hover:translate-x-0.5"})]})]})]})}const $h=8;function ll(){const t=$n(),[s,a]=g.useState([]),[l,o]=g.useState(!0),u=t.pathname.startsWith("/projets/")?t.pathname.replace("/projets/","").split("/")[0]:null;g.useEffect(()=>{nm({featured:!0,limit:$h*2,page:1}).then(f=>a(f.data.slice(0,$h))).catch(()=>a([])).finally(()=>o(!1))},[]);const m=s.filter(f=>f.slug!==u);return!l&&m.length===0?null:r.jsx("aside",{className:"hidden w-80 shrink-0 border-l border-brand/20 bg-gradient-to-b from-brand/10 via-brand/5 to-white xl:block",children:r.jsxs("div",{className:"flex flex-col px-5 py-6",children:[r.jsxs("div",{className:"mb-4 rounded-xl border border-brand/15 bg-white/80 p-4 shadow-sm",children:[r.jsxs("div",{className:"flex items-center gap-2 text-brand",children:[r.jsx(Xa,{size:18}),r.jsx("h2",{className:"text-sm font-bold uppercase tracking-wide text-slate-900",children:"À la une"})]}),r.jsx("p",{className:"mt-1 text-xs leading-relaxed text-slate-600",children:"Projets mis en avant par la communauté Connecting Sponsors"})]}),r.jsxs("div",{className:"space-y-3",children:[l&&r.jsx("p",{className:"text-xs text-slate-500",children:"Chargement…"}),m.map(f=>r.jsx(IS,{project:f},f.id))]}),r.jsx(V,{to:"/projets?featured=true",className:"mt-4 rounded-lg bg-brand/10 px-3 py-2 text-center text-xs font-semibold text-brand transition hover:bg-brand/15",children:"Toutes les annonces à la une"})]})})}const i0=g.createContext(null);function DS({children:t}){const[s,a]=g.useState(!1),[l,o]=g.useState(null),[u,m]=g.useState(!1);g.useEffect(()=>{o(Nh()),a(!0);const b=()=>m(!0),w=()=>{window.location.hash===`#${Hi}`&&m(!0)},I=z=>{const E=z.detail;o(E??Nh())};return window.addEventListener("cs:open-cookie-preferences",b),window.addEventListener("hashchange",w),window.addEventListener("cs:cookie-consent-changed",I),w(),()=>{window.removeEventListener("cs:open-cookie-preferences",b),window.removeEventListener("hashchange",w),window.removeEventListener("cs:cookie-consent-changed",I)}},[]);const f=g.useCallback(b=>{const w=xw(b);o(w),m(!1),window.location.hash===`#${Hi}`&&window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}`)},[]),x=g.useCallback(()=>{m(!0)},[]),h=g.useCallback(()=>{m(!1),window.location.hash===`#${Hi}`&&window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}`)},[]),v=g.useMemo(()=>({ready:s,consent:l,hasDecided:!!l,preferencesOpen:u,openPreferences:x,closePreferences:h,acceptAll:()=>f(jh(!0)),refuseOptional:()=>f(jh(!1)),savePreferences:f,allowsAnalytics:!!(l!=null&&l.preferences.analytics),allowsMarketing:!!(l!=null&&l.preferences.marketing)}),[s,l,u,x,h,f]);return g.createElement(i0.Provider,{value:v},t)}function zS(){const t=g.useContext(i0);if(!t)throw new Error("useCookieConsent must be used within CookieConsentProvider");return t}function MS({initial:t,onSave:s,onClose:a}){const[l,o]=g.useState(t);g.useEffect(()=>{o(t)},[t]);const u=m=>{o(f=>({...f,[m]:!f[m]}))};return r.jsx("div",{className:"fixed inset-0 z-[80] flex items-end justify-center bg-slate-900/40 p-4 sm:items-center",children:r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"
300cookie-preferences-title",className:"max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl bg-white shadow-2xl",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3 border-b border-slate-100 px-5 py-4",children:[r.jsxs("div",{children:[r.jsx("h2",{id:"cookie-preferences-title",className:"text-lg font-semibold text-slate-900",children:"Paramètres des cookies"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Choisissez les catégories autorisées. Les cookies nécessaires restent actifs."})]}),r.jsx("button",{type:"button",className:"rounded-lg p-1.5 text-slate-500 hover:bg-slate-100",onClick:a,"aria-label":"Fermer",children:r.jsx(qd,{size:18})})]}),r.jsx("div",{className:"space-y-3 px-5 py-4",children:Object.keys(bh).map(m=>{const f=bh[m],x=l[m],h=m==="analytics"||m==="marketing";return r.jsxs("label",{className:`flex gap-3 rounded-xl border p-4 ${f.required?"border-slate-100 bg-slate-50":"border-slate-200"}`,children:[r.jsx("input",{type:"checkbox",className:"mt-1",checked:x,disabled:f.required,onChange:()=>{h&&u(m)}}),"                ",r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsxs("span",{className:"flex flex-wrap items-center gap-2 font-medium text-slate-900",children:[f.label,f.required&&r.jsx("span",{className:"rounded-full bg-slate-200 px-2 py-0.5 text-xs font-semibold text-slate-700",children:"Obligatoire"})]}),r.jsx("span",{className:"mt-1 block text-sm leading-relaxed text-slate-600",children:f.description})]})]},m)})}),r.jsxs("div",{className:"flex flex-col gap-2 border-t border-slate-100 px-5 py-4 sm:flex-row sm:justify-end",children:[r.jsx("button",{type:"button",className:"btn-secondary",onClick:a,children:"Annuler"}),r.jsx("button",{type:"button",className:"btn-primary",onClick:()=>s(l),children:"Enregistrer mes choix"})]})]})})}function US(){const{ready:t,hasDecided:s,consent:a,preferencesOpen:l,openPreferences:o,closePreferences:u,acceptAll:m,refuseOptional:f,savePreferences:x}=zS();if(!t)return null;const h=!s,v=(a==null?void 0:a.preferences)??{necessary:!0,analytics:!1,marketing:!1};return r.jsxs(r.Fragment,{children:[h&&r.jsx("div",{role:"dialog","aria-live":"polite","aria-label":"Consentement cookies",className:"fixed inset-x-0 bottom-0 z-[70] border-t border-slate-200 bg-white/95 p-4 shadow-[0_-8px_30px_rgba(15,23,42,0.12)] backdrop-blur-md sm:p-5",children:r.jsxs("div",{className:"mx-auto flex max-w-7xl flex-col gap-4 lg:flex-row lg:items-end lg:justify-between",children:[r.jsxs("div",{className:"max-w-3xl",children:[r.jsxs("div",{className:"mb-2 flex items-center gap-2 text-sm font-semibold text-slate-900",children:[r.jsx(qx,{size:18,className:"text-brand"}),"Respect de votre vie privée"]}),r.jsxs("p",{className:"text-sm leading-relaxed text-slate-600",children:["Nous utilisons des cookies nécessaires au fonctionnement du site, et éventuellement des cookies de mesure d’audience ou marketing avec votre accord. Vous pouvez accepter, refuser les cookies optionnels, ou personnaliser vos choix."," ",r.jsx(V,{to:"/cookies",className:"font-medium text-brand hover:underline",children:"Politique de cookies"})]})]}),r.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:justify-end",children:[r.jsx("button",{type:"button",className:"btn-secondary",onClick:o,children:"Personnaliser"}),r.jsx("button",{type:"button",className:"btn-secondary",onClick:f,children:"Tout refuser"}),r.jsx("button",{type:"button",className:"btn-primary",onClick:m,children:"Tout accepter"})]})]})}),s&&!l&&r.jsxs("button",{type:"button",onClick:o,className:"fixed bottom-4 left-4 z-[60] inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-3 py-2 text-xs font-semibold text-slate-700 shadow-lg transition hover:border-brand hover:text-brand","aria-label":"Gérer les cookies",children:[r.jsx(qb,{size:14}),"Cookies"]}),l&&r.jsx(MS,{initial:v,onSave:x,onClose:u})]})}const Bh="cs-robots-meta";function qh(t){let s=document.getElementById(Bh);s||(s=document.createElement("meta"),s.id=Bh,s.name="robots",document.head.appendChild(s)),s.content=t}function FS(){return g.useEffect(()=>{let t=!1;return aw("sponsor").then(s=>{t||qh(s.allowSearchIndexing?"index, follow":"noindex, nofollow")}).catch(()=>{t||qh("noindex, nofollow")}),()=>{t=!0}},[]),null}const $S=new Set(["/mentions-legales","/cgu","/politique-confidentialite","/cookies"]);function BS(){const{pathname:t}=$n();return t==="/"||t.startsWith("/portail")||$S.has(t)?!1:t.startsWith("/projets")||t.startsWith("/sponsors")||t==="/recherche"||t==="/publier"||t==="/programme-contributeur"}function qS(){const t=BS();return r.jsxs("div",{className:"flex min-h-screen flex-col",children:[r.jsx(FS,{}),r.jsx(pw,{}),r.jsx("div",{className:"flex flex-1 justify-center px-4 sm:px-6 lg:px-8",children:r.jsxs("div",{className:`flex w-full min-w-0 items-start ${t?"max-w-screen-2xl gap-6 xl:gap-8":"max-w-7xl"}`,children:[r.jsx("main",{className:"min-w-0 flex-1",children:r.jsx(Ix,{})}),t&&r.jsx(ll,{})]})}),r.jsx(vw,{wide:t}),r.jsx(US,{})]})}function Ld({value:t,max:s=5,size:a=16,showValue:l=!1}){const o=Math.round(t*2)/2;return r.jsxs("div",{className:"inline-flex items-center gap-1",children:[Array.from({length:s},(u,m)=>{const f=o>=m+1,x=!f&&o>=m+.5;return r.jsx(br,{size:a,className:f?"fill-accent-yellow text-accent-yellow":x?"fill-accent-yellow/50 text-accent-yellow":"text-slate-200"},m)}),l&&r.jsx("span",{className:"ml-1 text-sm font-medium text-slate-600",children:t.toFixed(1)})]})}function l0({sponsor:t}){var a;const s=(a=t.description)==null?void 0:a.trim();return r.jsxs("article",{className:"card group flex flex-col overflow-hidden transition hover:-translate-y-0.5 hover:shadow-lg",children:[r.jsx("div",{className:"h-2 bg-gradient-to-r from-brand to-brand-dark"}),r.jsxs("div",{className:"flex flex-1 flex-col p-5",children:[r.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-semibold text-slate-900 group-hover:text-brand",children:t.name}),t.avgRating!=null&&r.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[r.jsx(Ld,{value:t.avgRating,size:14}),r.jsxs("span",{className:"text-xs text-slate-500",children:[t.reviewCount??0," avis"]})]})]}),r.jsxs("span",{className:"shrink-0 rounded-full bg-brand-50 px-2.5 py-1 text-xs font-medium text-brand",children:[t.dataQualityScore,"% complétude"]})]}),s&&r.jsx("p",{className:"mb-4 line-clamp-3 flex-1 text-sm leading-relaxed text-slate-600",children:s}),r.jsxs("div",{className:"mb-4 flex flex-wrap gap-3 text-xs text-slate-500",children:[t.avgBudget!=null&&r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(el,{size:14}
300),"~",t.avgBudget.toLocaleString("fr-FR")," €"]}),t.avgResponseDays!=null&&r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(Fx,{size:14}),t.avgResponseDays," j. de réponse"]}),t.website&&r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(Bx,{size:14}),"Site web"]})]}),r.jsxs(V,{to:`/sponsors/${t.slug}`,className:"btn-secondary w-full text-center",children:["Voir la fiche",r.jsx(At,{size:16})]})]})]})}const qr={featured_homepage:"À la une",featured_homepage_7d:"À la une (7 jours)",featured_homepage_30d:"À la une (30 jours)",premium_listing:"Pack visibilité premium",boost_daily:"Boost quotidien",boost_daily_7d:"Boost quotidien (7 j)",boost_daily_30d:"Boost quotidien (30 j)",boost_weekly:"Boost hebdo",boost_weekly_60d:"Boost hebdo (60 j)",boost_monthly:"Boost mensuel",urgent_badge:"Urgent",sponsor_matching:"Matching",logo_image:"Logo",dossier_deposit:"Dossier sponsoring"};function VS(t){return t.boostUntil?new Date(t.boostUntil)>new Date:!1}function HS(t){const s=[];if(t.isFeatured&&s.push(qr.featured_homepage),t.isPremiumListing&&s.push(qr.premium_listing),t.isUrgent&&s.push(qr.urgent_badge),t.matchingEnabled&&s.push(qr.sponsor_matching),VS(t)&&t.boostFrequency){const a=qr[`boost_${t.boostFrequency}`],l=t.isPremiumListing&&t.boostFrequency==="weekly";a&&!l&&s.push(a)}return t.logoUrl&&s.push(qr.logo_image),t.dossierUrl&&s.push(qr.dossier_deposit),s}const Vh="inline-flex rounded border border-violet-300 bg-violet-50 px-2 py-0.5 font-mono text-[10px] font-medium text-violet-900";function o0({project:t}){const s=new Date(t.republishAt).toLocaleString("fr-FR",{dateStyle:"short",timeStyle:"short"}),a=HS(t);return r.jsxs("div",{className:"w-full space-y-1",children:[r.jsxs("span",{className:Vh,title:`republishAt: ${t.republishAt}`,children:["Republication : ",s]}),r.jsxs("span",{className:`${Vh} block w-fit`,title:a.length>0?a.join(", "):"Aucune option active",children:["Options : ",a.length>0?a.join(" · "):"aucune"]})]})}function c0(){return r.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-gradient-to-r from-teal-600 to-cyan-600 px-2.5 py-1 text-xs font-semibold text-white shadow-sm ring-1 ring-teal-400/50",title:"Annonce complète avec dossier de sponsoring disponible",children:[r.jsx(zb,{size:12,"aria-hidden":!0}),"Dossier sponsoring"]})}function WS({project:t,featured:s=!1,compact:a=!1,debug:l=!1}){const o=Fn(t.imageUrl);return r.jsxs("article",{className:lm({isPremiumListing:t.isPremiumListing,isFeatured:s||t.isFeatured,isUrgent:t.isUrgent}),children:[r.jsx(dc,{imageUrl:o,seed:t.id,aspectClass:a?"aspect-square":void 0,imgClassName:"transition group-hover:scale-105"}),r.jsxs("div",{className:`flex flex-1 flex-col ${a?"p-4":"p-5"}`,children:[r.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[r.jsx(il,{variant:"public",isPremiumListing:t.isPremiumListing,isFeatured:t.isFeatured,isUrgent:t.isUrgent,matchingEnabled:t.matchingEnabled}),t.dossierUrl&&r.jsx(c0,{}),l&&r.jsx("div",{className:"w-full basis-full border-t border-violet-200 pt-2",children:r.jsx(o0,{project:t})})]}),r.jsx("h3",{className:`font-semibold text-slate-900 group-hover:text-brand ${a?"text-base":"text-lg"}`,children:t.title}),r.jsx("p",{className:`mt-2 flex-1 leading-relaxed text-slate-600 ${a?"line-clamp-2 text-xs":"line-clamp-3 text-sm"}`,children:lc(t.description)}),r.jsxs("div",{className:"mt-4 flex flex-wrap gap-3 text-xs text-slate-500",children:[t.budget!=null&&r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(el,{size:14}),t.budget.toLocaleString("fr-FR")," €"]}),t.region&&r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(tl,{size:14}),t.region.name]})]}),t.categories.length>0&&r.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:t.categories.slice(0,a?2:3).map(u=>r.jsx("span",{className:"rounded-full bg-slate-100 px-2 py-0.5 text-xs text-slate-600",children:u},u))}),r.jsxs(V,{to:`/projets/${t.slug}`,className:`btn-secondary mt-4 w-full text-center ${a?"text-sm":""}`,children:["Voir l'annonce",r.jsx(At,{size:16})]})]})]})}function GS({project:t,spanClass:s="col-span-2",debug:a=!1}){const l=Fn(t.imageUrl);return r.jsxs("article",{className:`${lm({isPremiumListing:!0,isFeatured:t.isFeatured,isUrgent:t.isUrgent})} ${s}`,children:[r.jsx(dc,{imageUrl:l,seed:t.id,aspectClass:"aspect-[2/1]",imgClassName:"transition group-hover:scale-105"}),r.jsxs("div",{className:"flex flex-1 flex-col p-4",children:[r.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[r.jsx(il,{variant:"public",isPremiumListing:!0,isFeatured:t.isFeatured,isUrgent:t.isUrgent,matchingEnabled:t.matchingEnabled}),t.dossierUrl&&r.jsx(c0,{}),a&&r.jsx("div",{className:"w-full basis-full border-t border-violet-200 pt-2",children:r.jsx(o0,{project:t})})]}),r.jsx("h3",{className:"text-lg font-bold leading-snug text-slate-900 group-hover:text-brand",children:t.title}),r.jsx("p",{className:"mt-1.5 flex-1 line-clamp-2 text-sm leading-relaxed text-slate-600",children:lc(t.description)}),r.jsxs("div",{className:"mt-3 flex flex-wrap gap-3 text-xs text-slate-500",children:[t.budget!=null&&r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(el,{size:14}
300),t.budget.toLocaleString("fr-FR")," €"]}),t.region&&r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(tl,{size:14}),t.region.name]})]}),t.categories.length>0&&r.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:t.categories.slice(0,3).map(o=>r.jsx("span",{className:"rounded-full bg-slate-100 px-2 py-0.5 text-xs text-slate-600",children:o},o))}),r.jsxs(V,{to:`/projets/${t.slug}`,className:"btn-primary mt-4 w-full text-center text-sm",children:["Voir l'annonce",r.jsx(At,{size:16})]})]})]})}function u0({project:t,layout:s="list",debug:a=!1}){return t.isPremiumListing&&s!=="grid-3"?r.jsx(GS,{project:t,spanClass:"col-span-2",debug:a}):r.jsx(WS,{project:t,featured:t.isFeatured,compact:s==="list",debug:a})}function om({variant:t="banner",className:s="",embedded:a=!1}){const l=Ha.find(o=>o.highlight)??Ha[2];return t==="card"?r.jsxs("div",{className:`card overflow-hidden border-violet-200 bg-gradient-to-br from-violet-50 to-white p-5 ${s}`,children:[r.jsxs("div",{className:"mb-3 flex items-center gap-2 text-sm font-semibold text-violet-800",children:[r.jsx(Nr,{size:18}),"Programme Contributeur"]}),r.jsx("p",{className:"text-sm leading-relaxed text-slate-700",children:Mo}),r.jsxs("p",{className:"mt-3 text-sm text-slate-600",children:["Dès ",r.jsxs("span",{className:"font-semibold text-violet-800",children:[l.minPoints," points"]})," :"," ",l.reward]}),r.jsx("div",{className:"mt-4",children:r.jsxs(V,{to:"/programme-contributeur",className:"btn-primary text-sm",children:["Voir les récompenses",r.jsx(At,{size:16})]})})]}):r.jsxs("section",{className:`relative overflow-hidden bg-gradient-to-r from-violet-700 via-brand to-brand-light text-white ${s}`,children:[r.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_bottom_left,rgba(255,255,255,0.15),transparent_55%)]"}),r.jsx("div",{className:`relative ${a?"px-4 py-10 sm:px-6 lg:px-8":"mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8"}`,children:r.jsxs("div",{className:"grid items-center gap-8 lg:grid-cols-[1.4fr_1fr]",children:[r.jsxs("div",{children:[r.jsxs("p",{className:"mb-3 inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-xs font-semibold uppercase tracking-wider",children:[r.jsx(Xa,{size:14}),"Programme Contributeur"]}),r.jsx("h2",{className:"text-2xl font-bold sm:text-3xl",children:"Votre retour d'expérience vaut des options premium"}),r.jsx("p",{className:"mt-4 max-w-2xl text-base text-white/90 sm:text-lg",children:Mo}),r.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[r.jsxs(V,{to:"/recherche",className:"inline-flex items-center gap-2 rounded-xl bg-white px-5 py-3 text-sm font-semibold text-brand shadow-lg transition hover:brightness-105",children:[r.jsx($a,{size:16}),"Partager mon expérience"]}),r.jsxs(V,{to:"/programme-contributeur",className:"inline-flex items-center gap-2 rounded-xl border border-white/40 px-5 py-3 text-sm font-semibold text-white transition hover:bg-white/10",children:["Découvrir les paliers",r.jsx(At,{size:16})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-white/20 bg-white/10 p-5 backdrop-blur-sm",children:[r.jsx("p",{className:"text-sm font-medium text-white/80",children:"Exemple de palier"}),r.jsx("p",{className:"mt-2 text-xl font-bold",children:l.name}),r.jsxs("p",{className:"mt-1 text-sm text-white/90",children:["À partir de ",l.minPoints," points validés"]}),r.jsxs("p",{className:"mt-4 rounded-xl bg-white/15 p-4 text-sm leading-relaxed text-white",children:[r.jsx(Nr,{size:16,className:"mb-2 inline"})," ",l.reward]})]})]})})]})}function ZS({categories:t}){return t.length===0?null:r.jsxs("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm",children:[r.jsxs("div",{className:"border-b border-slate-100 bg-slate-50 px-5 py-4",children:[r.jsx("h2",{className:"text-lg font-bold text-slate-900",children:"Top 5 des catégories"}),r.jsx("p",{className:"mt-0.5 text-sm text-slate-500",children:"Accédez aux annonces projets les plus représentées"})]}),r.jsx("ol",{className:"divide-y divide-slate-100",children:t.map(s=>r.jsx("li",{children:r.jsxs(V,{to:`/projets/categorie/${encodeURIComponent(s.slug)}`,className:"group flex items-center gap-4 px-5 py-3.5 transition hover:bg-brand-50/60",children:[r.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-brand text-sm font-bold text-white",children:s.rank}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate font-medium text-slate-900 group-hover:text-brand",children:s.name}),r.jsxs("span",{className:"text-xs text-slate-500",children:[s.projectCount," annonce",s.projectCount>1?"s":""]})]}),r.jsx(At,{size:16,className:"shrink-0 text-slate-300 transition group-hover:translate-x-0.5 group-hover:text-brand"})]})},s.id))}),r.jsx("div",{className:"border-t border-slate-100 px-5 py-3",children:r.jsxs(V,{to:"/projets",className:"inline-flex items-center gap-1.5 text-sm font-medium text-brand hover:underline",children:["Voir toutes les annonces",r.jsx(At,{size:14})]})})]})}const KS=3;function YS(t){return t?new Date(t).toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"}):null}function QS({subtitle:t="Conseils, analyses et actualités du sponsoring"}){const[s,a]=g.useState([]);return g.useEffect(()=>{let l=!1;return _g({page:1,limit:KS}).then(o=>{l||a(o.data)}).catch(()=>{l||a([])}),()=>{l=!0}},[]),s.length===0?null:r.jsx("section",{className:"border-t border-slate-100 bg-white py-16",children:r.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[r.jsxs("div",{className:"mb-8 flex items-end justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Actualités"}),r.jsx("p",{className:"mt-1 text-slate-600",children:t})]}),r.jsxs(V,{to:"/actualites",className:"btn-secondary shrink-0",children:["Voir toutes les actualités",r.jsx(At,{size:16})]})]}),r.jsx("ul",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:s.map(l=>{var m,f;const o=Fn(l.heroImageUrl),u=YS(l.publishedAt);return r.jsx("li",{children:r.jsxs("article",{className:"card flex h-full flex-col overflow-hidden",children:[o&&r.jsx(V,{to:`/actualites/${l.slug}`,className:"block overflow-hidden bg-slate-100",children:r.jsx("img",{src:o,alt:((m=l.heroImageAlt)==null?void 0:m.trim())||l.title,className:"aspect-[16/10] w-full object-cover"})}),r.jsxs("div",{className:"flex flex-1 flex-col p-5",children:[u&&r.jsx("time",{dateTime:l.publishedAt??void 0,className:"text-sm text-slate-500",children:u}),r.jsx("h3",{className:"mt-1 text-lg font-semibold text-slate-900",children:r.jsx(V,{to:`/actualites/${l.slug}`,className:"hover:text-brand hover:underline",children:l.title})}),((f=l.excerpt)==null?void 0:f.trim())&&r.jsx("p",{className:"mt-2 line-clamp-3 flex-1 text-sm text-slate-600",children:l.excerpt}),r.jsx(V,{to:`/actualites/${l.slug}`,className:"mt-4 inline-flex text-sm font-medium text-brand hover:underline",children:"Lire la suite →"})]})]})},l.id)})})]})})}const Hh=3;function XS(){const t=Bn(),[s,a]=g.useState(""),[l,o]=g.useState([]),[u,m]=g.useState([]),{categories:f}=Rg(5);g.useEffect(()=>{Promise.all([bg({limit:3,page:1}),nm({limit:Hh*2,page:1})]).then(([h,v])=>{o(h.data),m(v.data.slice(0,Hh))}).catch(()=>{o([]),m([])})},[]);const x=h=>{h.preventDefault();const v=new URLSearchParams;s.trim()&&v.set("q",s.trim()),t(`/recherche${v.toString()?`?${v}`:""}`)};return r.jsxs("div",{children:[r.jsxs("section",{className:"relative w-full overflow-hidden bg-gradient-to-br from-brand-dark via-brand to-brand-light text-white",children:[r.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_top_right,rgba(255,255,255,0.12),transparent_50%)]"}),r.jsx("div",{className:"relative mx-auto max-w-7xl px-4 py-20 sm:px-6 lg:px-8 lg:py-28",children:r.jsxs("div",{className:"mx-auto max-w-3xl text-center",children:[r.jsx("p",{className:"mb-4 text-sm font-semibold uppercase tracking-widest text-white/80",children:"Plateforme collaborative"}),r.jsx("h1",{className:"mb-6 text-4xl font-bold leading-tight sm:text-5xl lg:text-6xl",children:"Trouvez le sponsor idéal pour votre projet"}),r.jsx("p",{className:"mb-10 text-lg text-white/90 sm:text-xl",children:"Explorez des entreprises mécènes qualifiées, leur
300s critères d'éligibilité et les retours de la communauté."}),r.jsxs("form",{onSubmit:x,className:"mx-auto flex max-w-2xl flex-col gap-3 sm:flex-row",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx(Ki,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400",size:20}),r.jsx("input",{className:"w-full rounded-xl border-0 py-3.5 pl-12 pr-4 text-slate-900 shadow-lg focus:outline-none focus:ring-2 focus:ring-white/50",placeholder:"Nom d'entreprise, secteur, mot-clé…",value:s,onChange:h=>a(h.target.value)})]}),r.jsx("button",{type:"submit",className:"rounded-xl bg-accent-yellow px-8 py-3.5 font-semibold text-slate-900 shadow-lg transition hover:brightness-110",children:"Rechercher"})]})]})})]}),r.jsxs("div",{className:"flex flex-1 items-start gap-6 xl:gap-8",children:[r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsxs("section",{className:"mx-auto max-w-7xl px-4 py-16 sm:px-6 lg:px-8",children:[r.jsx("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:[{icon:qx,title:"Données qualifiées",text:"Fiches entreprises enrichies et vérifiées régulièrement."},{icon:Rb,title:"Sponsor Score",text:"Notes et retours d'expérience de la communauté."},{icon:Vx,title:"Éligibilité claire",text:"Budgets, délais et types de porteurs acceptés."}].map(({icon:h,title:v,text:b})=>r.jsxs("div",{className:"card p-6",children:[r.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-brand-50 text-brand",children:r.jsx(h,{size:24})}),r.jsx("h3",{className:"mb-2 font-semibold text-slate-900",children:v}),r.jsx("p",{className:"text-sm leading-relaxed text-slate-600",children:b})]},v))}),f.length>0&&r.jsx("div",{className:"mt-10 max-w-xl",children:r.jsx(ZS,{categories:f})})]}),u.length>0&&r.jsx("section",{className:"border-t border-slate-100 bg-slate-50 py-16",children:r.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[r.jsxs("div",{className:"mb-8 flex items-end justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Projets en recherche de sponsors"}),r.jsx("p",{className:"mt-1 text-slate-600",children:"Les 3 dernières annonces déposées par la communauté"})]}),r.jsxs(V,{to:"/projets",className:"btn-secondary shrink-0",children:["Voir toutes les annonces",r.jsx(At,{size:16})]})]}),r.jsx("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:u.map(h=>r.jsx(u0,{project:h,layout:"grid-3"},h.id))})]})}),r.jsx(QS,{}),r.jsx("section",{className:"border-t border-slate-100 bg-white py-16",children:r.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:r.jsxs("div",{className:"flex flex-col gap-6 rounded-2xl bg-gradient-to-br from-brand-dark via-brand to-brand-light px-6 py-10 text-white sm:flex-row sm:items-center sm:justify-between sm:px-10",children:[r.jsxs("div",{className:"max-w-xl",children:[r.jsx("h2",{className:"text-2xl font-bold",children:"Déposez votre annonce gratuitement"}),r.jsx("p",{className:"mt-2 text-white/90",children:"Conditions de mise en ligne et tarifs des options de visibilité : tout est transparent avant même de créer un compte."})]}),r.jsxs(V,{to:"/publier",className:"inline-flex shrink-0 items-center gap-2 rounded-xl bg-accent-yellow px-6 py-3 font-semibold text-slate-900 transition hover:brightness-110",children:["Voir les conditions et tarifs",r.jsx(At,{size:16})]})]})})}),l.length>0&&r.jsx("section",{className:"bg-white py-16",children:r.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[r.jsxs("div",{className:"mb-8 flex items-end justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Sponsors à découvrir"}),r.jsx("p",{className:"mt-1 text-slate-600",children:"Les entreprises les mieux notées par la communauté"})]}),r.jsxs(V,{to:"/recherche",className:"btn-secondary shrink-0",children:["Voir tout",r.jsx(At,{size:16})]})]}),r.jsx("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:l.map(h=>r.jsx(l0,{sponsor:h}
300,h.id))})]})}),r.jsx("section",{className:"mx-auto max-w-7xl px-4 py-16 sm:px-6 lg:px-8",children:r.jsx("div",{className:"card overflow-hidden bg-gradient-to-r from-brand-50 to-white p-8 sm:p-12",children:r.jsxs("div",{className:"max-w-2xl",children:[r.jsx("h2",{className:"mb-3 text-2xl font-bold text-slate-900",children:"Affinez votre recherche"}),r.jsx("p",{className:"mb-6 text-slate-600",children:"Filtrez par catégorie, région, budget ou délai de réponse pour cibler les sponsors les plus pertinents pour votre projet."}),r.jsxs(V,{to:"/recherche",className:"btn-primary",children:["Lancer une recherche avancée",r.jsx(At,{size:16})]})]})})}),r.jsx("section",{className:"mx-auto max-w-7xl px-4 pb-16 sm:px-6 lg:px-8",children:r.jsx(om,{embedded:!0,className:"overflow-hidden rounded-2xl"})})]}),r.jsx(ll,{})]})]})}function JS({filters:t,categories:s,regions:a,audiences:l=[],showMemberFilters:o=!1,memberUnlockHref:u,onChange:m,onSubmit:f}){const x=h=>m({...t,...h});return r.jsxs("form",{className:"card p-5",onSubmit:h=>{h.preventDefault(),f()},children:[r.jsx("h2",{className:"mb-4 text-sm font-semibold uppercase tracking-wide text-slate-500",children:"Filtres"}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"mb-1.5 block text-sm font-medium text-slate-700",htmlFor:"filter-q",children:"Mot-clé"}),r.jsx("input",{id:"filter-q",className:"input-field",placeholder:"Nom, activité…",value:t.q,onChange:h=>x({q:h.target.value})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1.5 block text-sm font-medium text-slate-700",htmlFor:"filter-category",children:"Catégorie"}),r.jsxs("select",{id:"filter-category",className:"input-field",value:t.category,onChange:h=>x({category:h.target.value}),children:[r.jsx("option",{value:"",children:"Toutes"}),s.map(h=>r.jsx("option",{value:h.slug,children:h.name},h.id))]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1.5 block text-sm font-medium text-slate-700",htmlFor:"filter-region",children:"Région"}),r.jsxs("select",{id:"filter-region",className:"input-field",value:t.region,onChange:h=>x({region:h.target.value}),children:[r.jsx("option",{value:"",children:"Toutes"}),a.map(h=>r.jsx("option",{value:h.code,children:h.name},h.id))]})]}),o?r.jsxs("div",{className:"space-y-4 border-t border-slate-200 pt-4",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-400",children:"Pour les membres"}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1.5 block text-sm font-medium text-slate-700",htmlFor:"filter-theme",children:"Domaine soutenu"}),r.jsxs("select",{id:"filter-theme",className:"input-field",value:t.theme,onChange:h=>x({theme:h.target.value}),children:[r.jsx("option",{value:"",children:"Tous"}),Xr.map(({key:h,label:v})=>r.jsx("option",{value:h,children:v},h))]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1.5 block text-sm font-medium text-slate-700",htmlFor:"filter-audience",children:"Public cible"}),r.jsxs("select",{id:"filter-audience",className:"input-field",value:t.audience,onChange:h=>x({audience:h.target.value}),children:[r.jsx("option",{value:"",children:"Tous"}),l.map(h=>r.jsx("option",{value:h.code,children:h.label},h.id))]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1.5 block text-sm font-medium text-slate-700",htmlFor:"filter-response",children:"Délai max. de réponse (jours)"}),r.jsx("input",{id:"filter-response",type:"number",min:0,className:"input-field",placeholder:"Ex. 30",value:t.maxResponseDays,onChange:h=>x({maxResponseDays:h.target.value})})]})]}):u?r.jsxs("p",{className:"border-t border-slate-200 pt-4 text-sm text-slate-500",children:[r.jsx(V,{to:u,className:"font-medium text-brand hover:underline",children:"Créez un compte"})," ","pour débloquer plus de filtres."]}):null,r.jsx("button",{type:"submit",className:"btn-primary w-full",children:"Appliquer"})]})]})}function d0({context:t="projects"}){const s=Ha.find(a=>a.highlight)??Ha[2];return r.jsxs("div",{className:"card relative overflow-hidden border-violet-200/80 shadow-md",children:[r.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-violet-600 via-violet-700 to-brand"}),r.jsx("div",{className:"absolute -right-6 -top-6 h-24 w-24 rounded-full bg-white/10"}),r.jsx("div",{className:"absolute -bottom-8 -left-4 h-20 w-20 rounded-full bg-white/5"}),r.jsxs("div",{className:"relative p-5",children:[r.jsxs("p",{className:"inline-flex items-center gap-1.5 rounded-full bg-white/15 px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wide text-white",children:[r.jsx(Xa,{size:12,"aria-hidden":!0}),"Programme Contributeur"]}),r.jsx("h3",{className:"mt-3 text-base font-bold leading-snug text-white",children:"Votre expérience vaut des options premium"}),r.jsx("p",{className:"mt-2 text-xs leading-relaxed text-white/85",children:Mo}),r.jsxs("div",{className:"mt-4 rounded-xl border border-white/20 bg-white/10 p-3 backdrop-blur-sm",children:[r.jsxs("p",{className:"text-[10px] font-semibold uppercase tracking-wide text-white/70",children:["Palier ",s.name]}),r.jsxs("p",{className:"mt-1.5 text-xs font-medium text-white",children:["Dès ",s.minPoints," points validés"]}),r.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-xs leading-relaxed text-white/90",children:[r.jsx(Nr,{size:14,className:"mt-0.5 shrink-0","aria-hidden":!0}),r.jsx("span",{children:s.reward})]})]}),r.jsx("div",{className:"mt-4 flex flex-col gap-2",children:t==="search"?r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"text-xs leading-relaxed text-white/80",children:"Sélectionnez un sponsor dans les résultats pour publier votre retour d'expérience."}),r.jsxs(V,{to:"/programme-contributeur",className:"inline-flex w-full items-center justify-center gap-2 rounded-xl bg-white px-3 py-2.5 text-sm font-semibold text-brand transition hover:brightness-105",children:["Voir les récompenses",r.jsx(At,{size:15})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs(V,{to:"/programme-contributeur",className:"inline-flex w-full items-center justify-center gap-2 rounded-xl bg-white px-3 py-2.5 text-sm font-semibold text-brand transition hover:brightness-105",children:["Découvrir le programme",r.jsx(At,{size:15})]}),r.jsxs(V,{to:"/recherche",className:"inline-flex w-full items-center justify-center gap-2 rounded-xl border border-white/35 px-3 py-2.5 text-sm font-semibold text-white transition hover:bg-white/10",children:[r.jsx($a,{size:15}),"Donner un avis"]})]})})]})]})}const e_=new Set(Xr.map(({key:t})=>t));function t_(t){return!t||!e_.has(t)?"":t}function Wh(t){return{q:t.get("q")??"",category:t.get("category")??"",region:t.get("region")??"",maxResponseDays:t.get("maxResponseDays")??"",theme:t_(t.get("theme")),audience:t.get("audience")??""}}function Gh(t,s,a){const l=new URLSearchParams;return t.q&&l.set("q",t.q),t.category&&l.set("category",t.category),t.region&&l.set("region",t.region),a&&t.maxResponseDays&&l.set("maxResponseDays",t.maxResponseDays),a&&t.theme&&l.set("theme",t.theme),a&&t.audience&&l.set("audience",t.audience),s>1&&l.set("page",String(s)),l}function n_(){const{user:t,loading:s}=qn(),a=!!t,[l,o]=Hs(),[u,m]=g.useState(()=>Wh(l)),[f,x]=g.useState([]),[h,v]=g.useState([]),[b,w]=g.useState([]),[I,z]=g.useState([]),[E,_]=g.useState(null),[T,C]=g.useState(!0),[M,O]=g.useState(null),W=Number(l.get("page")??"1"),ae=`/portail/inscription?redirect=${encodeURIComponent(`/recherche${l.toString()?`?${l}`:""}`)}`,ge=g.useCallback(async(G,ke,Y)=>{C(!0),O(null);try{const fe=Y&&G.theme?G.theme:void 0,Ee=await bg({q:G.q||void 0,category:G.category||void 0,region:G.region||void 0,maxResponseDays:Y&&G.maxResponseDays?Number(G.maxResponseDays):void 0,audience:Y&&G.audience?[G.audience]:void 0,...fe?{[fe]:!0}:{},page:ke,limit:12});z(Ee.data),_(Ee.meta)}catch(fe){console.error("[searchSponsors]",fe),O("Impossible de charger les résultats. Vérifiez que l'API est démarrée."),z([]),_(null)}finally{C(!1)}},[]);g.useEffect(()=>{Promise.all([jg(),Ng(),ew()]).then(([G,ke,Y])=>{x(G),v(ke),w(Y)}).catch(()=>{})},[]),g.useEffect(()=>{if(s)return;const G=Wh(l);a||(G.theme="",G.maxResponseDays="",G.audience=""),m(G),ge(G,W,a)},[l,W,ge,a,s]);const De=()=>{o(Gh(u,1,a))},Ne=G=>{o(Gh(u,G,a)),window.scrollTo({top:0,behavior:"smooth"})};return r.jsxs("div",{className:"w-full py-10",children:[r.jsxs("div",{className:"mb-8",children:[r.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:"Rechercher un sponsor"}),r.jsx("p",{className:"mt-2 text-slate-600",children:E?`${E.total} entreprise${E.total>1?"s":""} trouvée${E.total>1?"s":""}`:"Explorez le référentiel"})]}),r.jsxs("div",{className:"grid gap-8 lg:grid-cols-[280px_1fr]",children:[r.jsxs("aside",{className:"space-y-4 lg:sticky lg:top-24 lg:self-start",children:[r.jsx(JS,{filters:u,categories:f,regions:h,audiences:b,showMemberFilters:a,memberUnlockHref:ae,onChange:m,onSubmit:De}),r.jsx(d0,{context:"search"})]}),r.jsxs("div",{children:[(T||s)&&r.jsxs("div",{className:"flex items-center justify-center py-20 text-slate-500",children:[r.jsx(Xn,{className:"mr-2 animate-spin",size:24}),"Chargement…"]}),!T&&!s&&M&&r.jsx("div",{className:"card border-accent-red/20 bg-red-50 p-6 text-center text-accent-red",children:M}),!T&&!s&&!M&&I.length===0&&r.jsx("div",{className:"card p-12 text-center",children:a?r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"text-lg font-medium text-slate-900",children:"Aucun résultat"}),r.jsx("p",{className:"mt-2 text-slate-600",children:"Essayez d'élargir vos critères, ou affinez avec Domaine soutenu / Public cible."}),u.q&&r.jsx("p",{className:"mt-4",children:r.jsxs(V,{to:`/proposer-sponsor?q=${encodeURIComponent(u.q)}`,className:"text-brand hover:underline",children:["Proposer « ",u.q," » comme nouvelle fiche"]}
300)})]}):r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"text-lg font-medium text-slate-900",children:"Aucun résultat"}),r.jsx("p",{className:"mt-2 text-slate-600",children:"Pour une recherche plus fine, inscrivez-vous. L'inscription est gratuite."}),r.jsx("p",{className:"mt-4",children:r.jsx(V,{to:ae,className:"btn-primary inline-flex",children:"Créer un compte gratuitement"})}),u.q?r.jsx("p",{className:"mt-3",children:r.jsxs(V,{to:`/proposer-sponsor?q=${encodeURIComponent(u.q)}`,className:"text-sm text-brand hover:underline",children:["Proposer « ",u.q," » comme nouvelle fiche"]})}):r.jsx("p",{className:"mt-3",children:r.jsx(V,{to:"/proposer-sponsor",className:"text-sm text-brand hover:underline",children:"Proposer un sponsor manquant"})})]})}),!T&&!s&&!M&&I.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"grid gap-6 sm:grid-cols-2 xl:grid-cols-3",children:I.map(G=>r.jsx(l0,{sponsor:G},G.id))}),E&&E.totalPages>1&&r.jsxs("div",{className:"mt-10 flex items-center justify-center gap-2",children:[r.jsx("button",{type:"button",className:"btn-secondary",disabled:W<=1,onClick:()=>Ne(W-1),children:"Précédent"}),r.jsxs("span",{className:"px-4 text-sm text-slate-600",children:["Page ",W," / ",E.totalPages]}),r.jsx("button",{type:"button",className:"btn-secondary",disabled:W>=E.totalPages,onClick:()=>Ne(W+1),children:"Suivant"})]})]})]})]})]})}function s_(){const{slug:t}=_r(),s=$n(),{user:a,loading:l}=qn(),[o,u]=g.useState(null),[m,f]=g.useState(null),[x,h]=g.useState(null),[v,b]=g.useState([]),[w,I]=g.useState([]),[z,E]=g.useState([]),[_,T]=g.useState([]),[C,M]=g.useState([]),[O,W]=g.useState(!0),[ae,ge]=g.useState(!1),[De,Ne]=g.useState(4),[G,ke]=g.useState(""),[Y,fe]=g.useState(""),[Ee,le]=g.useState(""),[Te,Fe]=g.useState(!1),[Z,oe]=g.useState(!1),[Q,N]=g.useState(null);g.useEffect(()=>{t&&(W(!0),ge(!1),WN(t).then(async q=>{const[Oe,We,tt,Ue,nt,yt,Le]=await Promise.all([GN(q.id).catch(()=>null),q.eligibility?Promise.resolve(q.eligibility):ZN(q.id).catch(()=>null),QN(q.id).catch(()=>
300[]),q.audiences?Promise.resolve(q.audiences):XN(q.id).catch(()=>[]),YN(q.id).catch(()=>[]),KN(q.id).catch(()=>[]),gh(q.id).catch(()=>[])]);u(q),f(Oe),h(We),b(tt),I(Ue),E(nt),T(yt),M(Le)}).catch(()=>{ge(!0),u(null)}).finally(()=>W(!1)))},[t]);const F=async q=>{if(q.preventDefault(),!!o){oe(!0),N(null);try{await JN(o.id,{rating:De,comment:G||void 0,amountReceived:Y!==""?Number(Y):void 0,responseDays:Ee!==""?Number(Ee):void 0,wasFunded:Te}),ke(""),fe(""),le(""),Fe(!1),N("Merci ! Votre avis sera publié après modération. Une fois validé, il comptera pour le Programme Contributeur et vous rapprochera d'options premium offertes.");const Oe=await gh(o.id);M(Oe)}catch{N("Erreur lors de l'envoi. Connectez-vous pour laisser un avis, puis réessayez.")}finally{oe(!1)}}};if(O)return r.jsxs("div",{className:"flex items-center justify-center py-32 text-slate-500",children:[r.jsx(Xn,{className:"mr-2 animate-spin",size:24}),"Chargement de la fiche…"]});if(ae||!o)return r.jsxs("div",{className:"mx-auto max-w-lg px-4 py-20 text-center",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Sponsor introuvable"}),r.jsx("p",{className:"mt-2 text-slate-600",children:"Cette fiche n'existe pas ou n'est pas publiée."}),r.jsx(V,{to:"/recherche",className:"btn-primary mt-6 inline-flex",children:"Retour à la recherche"})]});const we=m==null?void 0:m.avgRating,te=`/portail/connexion?redirect=${encodeURIComponent(s.pathname)}`,Be=`/portail/inscription?redirect=${encodeURIComponent(s.pathname)}`,pe=`/portail/inscription?type=sponsor&redirect=${encodeURIComponent("/portail")}`;return r.jsxs("div",{className:"w-full py-10",children:[r.jsxs(V,{to:"/recherche",className:"mb-6 inline-flex items-center gap-2 text-sm font-medium text-brand hover:underline",children:[r.jsx(Mx,{size:16}),"Retour aux résultats"]}),r.jsxs("div",{className:"card overflow-hidden",children:[r.jsxs("div",{className:"bg-gradient-to-r from-brand to-brand-dark px-6 py-10 text-white sm:px-10",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-3xl font-bold sm:text-4xl",children:o.name}),o.legalName&&r.jsx("p",{className:"mt-1 text-white/80",children:o.legalName}),we!=null&&r.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[r.jsx(Ld,{value:we,size:20,showValue:!0}),r.jsxs("span",{className:"text-sm text-white/80",children:[m==null?void 0:m.reviewCount," avis communautaires"]})]})]}),r.jsxs("div",{className:"flex flex-col gap-2 sm:items-end",children:[r.jsxs("div",{className:"rounded-xl bg-white/15 px-4 py-2 text-sm backdrop-blur",children:["Complétude de la fiche : ",r.jsxs("strong",{children:[o.dataQualityScore,"%"]})]}),o.organizationActivity&&r.jsxs("div",{className:"rounded-xl bg-white/15 px-4 py-2 text-sm backdrop-blur",children:["Organisation active :"," ",r.jsxs("strong",{children:[o.organizationActivity.activityScore,"%"]})]})]})]}),v.length>0&&r.jsx("div",{className:"mt-6 flex flex-wrap gap-2",children:v.map(q=>r.jsx("span",{className:"rounded-full bg-white/20 px-3 py-1 text-xs font-medium",children:q.name},q.id))})]}),r.jsxs("div",{className:"grid gap-8 p-6 sm:p-10 lg:grid-cols-3",children:[r.jsxs("div",{className:"space-y-8 lg:col-span-2",children:[o.description&&r.jsxs("section",{children:[r.jsx("h2",{className:"mb-3 text-lg font-semibold text-slate-900",children:"Présentation"}),r.jsx("p",{className:"leading-relaxed text-slate-600 whitespace-pre-line",children:o.description})]}),x&&r.jsxs("section",{children:[r.jsx("h2",{className:"mb-3 text-lg font-semibold text-slate-900",children:"Éligibilité"}),r.jsx("p",{className:"mb-3 text-sm text-slate-500",children:"Audiences visées"}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[w.map(q=>r.jsx("span",{className:"rounded-full bg-brand/10 px-3 py-1 text-xs font-medium text-brand",children:q.label},q.id)),w.length===0&&r.jsx("span",{className:"text-sm text-slate-500",children:"Non renseigné"})]}),r.jsx("h3",{className:"mb-3 mt-6 text-base font-semibold text-slate-900",children:"Types de projets compatibles"}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[Xr.filter(({key:q})=>x[q]).map(({key:q,label:Oe})=>r.jsx("span",{className:"rounded-full bg-brand/10 px-3 py-1 text-xs font-medium text-brand",children:Oe},q)),Xr.every(({key:q})=>!x[q])&&r.jsx("span",{className:"text-sm text-slate-500",children:"Non renseigné"})]}),r.jsxs("div",{className:"mt-4 flex flex-wrap gap-4 text-sm text-slate-600",children:[x.minBudget!=null&&r.jsxs("span",{children:["Budget min. : ",x.minBudget," €"]}),x.maxBudget!=null&&r.jsxs("span",{children:["Budget max. : ",x.maxBudget," €"]}),x.avgResponseDays!=null&&r.jsxs("span",{children:["Délai moyen : ",x.avgRe
300sponseDays," jours"]})]})]}),z.length>0&&r.jsxs("section",{children:[r.jsx("h2",{className:"mb-3 text-lg font-semibold text-slate-900",children:"Fondations"}),r.jsx("ul",{className:"space-y-3",children:z.map(q=>r.jsxs("li",{className:"rounded-xl border border-slate-100 p-4",children:[r.jsx("div",{className:"font-medium text-slate-900",children:q.name}),typeof q.website=="string"&&q.website?r.jsxs("a",{href:q.website,target:"_blank",rel:"noreferrer",className:"mt-1 inline-flex items-center gap-1 text-sm text-brand hover:underline",children:["Site web ",r.jsx(Kr,{size:14})]}):null]},q.id))})]}),_.length>0&&r.jsxs("section",{children:[r.jsx("h2",{className:"mb-3 text-lg font-semibold text-slate-900",children:"Campagnes"}),r.jsx("ul",{className:"space-y-3",children:_.map(q=>r.jsxs("li",{className:"rounded-xl border border-slate-100 p-4",children:[r.jsx("div",{className:"font-medium text-slate-900",children:q.theme||"Campagne"}),r.jsxs("div",{className:"mt-1 flex flex-wrap gap-3 text-sm text-slate-500",children:[r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(Pb,{size:14}),"Ouverture : ",new Date(q.openingDate).toLocaleDateString("fr")]}),typeof q.depositDeadlineDate=="string"&&q.depositDeadlineDate?r.jsxs("span",{children:["Dépôt : ",new Date(q.depositDeadlineDate).toLocaleDateString("fr")]}):null,typeof q.closingDate=="string"&&q.closingDate?r.jsxs("span",{children:["Fermeture : ",new Date(q.closingDate).toLocaleDateString("fr")]}):null,q.budget!=null&&r.jsxs("span",{children:[q.budget," €"]})]})]},q.id))})]}),C.length>0&&r.jsxs("section",{children:[r.jsx("h2",{className:"mb-3 text-lg font-semibold text-slate-900",children:"Avis de la communauté"}),r.jsx("ul",{className:"space-y-4",children:C.map(q=>r.jsxs("li",{className:"rounded-xl bg-slate-50 p-4",children:[r.jsx(Ld,{value:q.rating,size:16}),typeof q.comment=="string"&&q.comment?r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:q.comment}):null,typeof q.sponsorReply=="string"&&q.sponsorReply?r.jsxs("div",{className:"mt-3 rounded-lg border border-slate-200 bg-white p-3",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Réponse de l'organisation"}),r.jsx("p",{className:"mt-1 text-sm text-slate-700",children:q.sponsorReply}),typeof q.sponsorRepliedAt=="string"&&q.sponsorRepliedAt?r.jsx("p",{className:"mt-2 text-xs text-slate-400",children:new Date(q.sponsorRepliedAt).toLocaleDateString("fr-FR")}):null]}):null]},q.id))})]})]}),r.jsxs("aside",{className:"space-y-6",children:[r.jsxs("div",{className:"card p-5",children:[r.jsx("h3",{className:"mb-4 font-semibold text-slate-900",children:"Coordonnées"}),r.jsxs("ul",{className:"space-y-3 text-sm text-slate-600",children:[o.website&&r.jsx("li",{children:r.jsxs("a",{href:o.website,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 text-brand hover:underline",children:[r.jsx(Bx,{size:16})," Site web"]})}),Qi.filter(q=>{var Oe,We;return!!((We=(Oe=o.socialNetworks)==null?void 0:Oe[q])!=null&&We.trim())}).map(q=>r.jsx("li",{children:r.jsxs("a",{href:o.socialNetworks[q],target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 text-brand hover:underline",children:[r.jsx(Kr,{size:16})," ",Lg[q]]})},q))]})]}),r.jsxs("div",{className:"card p-5",children:[r.jsx("h3",{className:"mb-4 font-semibold text-slate-900",children:"Fiabilité de la fiche"}),r.jsxs("dl",{className:"space-y-3 text-sm",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"mb-1 flex justify-between",children:[r.jsx("dt",{className:"text-slate-500",children:"Complétude"}),r.jsxs("dd",{className:"font-semibold text-slate-900",children:[o.dataQualityScore,"%"]})]}),r.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-slate-100",children:r.jsx("div",{className:"h-full rounded-full bg-brand",style:{width:`${Math.min(100,o.dataQualityScore)}%`}})})]}),o.organizationActivity&&r.jsxs("div",{children:[r.jsxs("div",{className:"mb-1 flex justify-between",children:[r.jsx("dt",{className:"text-slate-500",children:"Organisation active"}),r.jsxs("dd",{className:"font-semibold text-slate-900",children:[o.organizationActivity.activityScore,"%"]})]}),r.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-slate-100",children:r.jsx("div",{className:"h-full rounded-full bg-emerald-500",style:{width:`${Math.min(100,o.organizationActivity.activityScore)}%`}})}),r.jsxs("ul",{className:"mt-3 space-y-1.5 text-slate-600",children:[r.jsxs("li",{className:"flex items-center gap-2",children:[r.jsx(Bd,{size:14,className:o.organizationActivity.isClaimed?"text-emerald-600":"text-slate-300"}),o.organizationActivity.isClaimed?"Fiche revendiquée par l'organisation":"Fiche non encore revendiquée"]}),r.jsxs("li",{className:"flex items-center gap-2",children:[r.jsx($a,{size:14,className:"text-slate-400"}),o.organizationActivity.publishedFeedbackCount===0?"Aucun avis publié pour l'instant":`${o.organizationActivity.repliedFeedbackCount}/${o.organizationActivity.publishedFeedbackCount} avis répondus${o.organizationActivity.replyRatePercent!=null?` (${o.organizationActivity.replyRatePercent}%)`:""}`]})]})]})]})]}),!a&&r.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-4 text-sm text-slate-600",children:[r.jsx("p",{className:"font-medium text-slate-900",children:"Vous représentez cette organisation ?"}),r.jsx("p",{className:"mt-1",children:"Créez un compte sponsor pour gérer la fiche et répondre aux avis."}),r.jsx(V,{to:pe,className:"btn-secondary mt-3 inline-flex text-center",children:"Espace sponsor — créer un compte"})]}),m&&r.jsxs("div",{className:"card p-5",children:[r.jsx("h3",{className:"mb-4 font-semibold text-slate-900",children:"Sponsor Score"}),r.jsxs("dl",{className:"space-y-2 text-sm",children:[m.avgResponseDays!=null&&r.jsxs("div",{className:"flex justify-between",children:[r.jsx("dt",{className:"text-slate-500",children:"Délai moyen"}),r.jsxs("dd",{children:[m.avgResponseDays," j."]})]}),m.avgAmount!=null&&r.jsxs("div",{className:"flex justify-between",children:[r.jsx("dt",{className:"text-slate-500",children:"Montant moyen"}),r.jsxs("dd",{children:[m.avgAmount," €"]})]}),m.acceptanceRate!=null&&r.jsxs("div",{className:"flex justify-between",children:[r.jsx("dt",{className:"text-slate-500",children:"Taux d'acceptation"}),r.jsxs("dd",{children:[Math.round(m.acceptanceRate*100),"%"]})]})]})]}),r.jsx(om,{variant:"card",className:"mb-4"}),r.jsxs("div",{className:"card p-5",children:[r.jsxs("h3",{className:"mb-2 flex items-center gap-2 font-semibold text-slate-900",children:[r.jsx($a,{size:18}),"Donner votre avis"]}),r.jsxs("p",{className:"mb-4 text-xs text-slate-500",children:["Votre retour aide la communauté (modération avant publication). Même si vous n'avez pas trouvé ce sponsor via Connecting Sponsors, votre expérience compte pour le"," ",r.jsx(V,{to:"/programme-contributeur",className:"font-medium text-violet-700 hover:underline",children:"Programme Contributeur"}),"."]}),l?r.jsx("p",{className:"text-sm text-slate-500",children:"Vérification de votre session…"}):a?r.jsxs("form",{onSubmit:F,className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"mb-2 block text-sm font-medium text-slate-700",children:"Note"}),r.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(q=>r.jsx("button",{type:"button",onClick:()=>Ne(q),className:`h-9 w-9 rounded-lg text-sm font-semibold transition ${q<=De?"bg-brand text-white":"bg-slate-100 text-slate-500"}`,children:q},q))})]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"checkbox",checked:Te,onChange:q=>Fe(q.target.checked)}),"J'ai obtenu un financement de ce sponsor"]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1.5 block text-sm font-medium text-slate-700",htmlFor:"amount-received",children:"Montant obtenu (€)"}),r.jsx("input",{id:"amount-received",type:"number",min:0,step:1,className:"input-field",value:Y,onChange:q=>fe(q.target.value),placeholder:"Ex. 500"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1.5 block text-sm font-medium text-slate-700",htmlFor:"response-days",children:"Délai de réponse (jours)"}),r.jsx("input",{id:"response-days",type:"number",min:0,step:1,className:"input-field",value:Ee,onChange:q=>le(q.target.value),placeholder:"Ex. 15"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1.5 block text-sm font-medium text-slate-700",htmlFor:"comment",children:"Commentaire"}),r.jsx("textarea",{id:"comment",className:"input-field min-h-[80px] resize-y",value:G,onChange:q=>ke(q.target.value),placeholder:"Votre expérience avec ce sponsor…"})]}),Q&&r.jsx("p",{className:`text-sm ${Q.startsWith("Merci")?"text-brand":"text-accent-red"}`,children:Q}),r.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:Z,children:Z?"Envoi…":"Envoyer mon avis"})]}):r.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-4 text-sm text-slate-600",children:[r.jsx("p",{className:"font-medium text-slate-900",children:"Connexion requise"}),r.jsx("p",{className:"mt-1",children:"Seuls les utilisateurs connectés peuvent laisser un avis sur un sponsor."}),r.jsxs("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row",children:[r.jsx(V,{to:te,className:"btn-primary text-center",children:"Se connecter"}),r.jsx(V,{to:Be,className:"btn-secondary text-center",children:"Créer un compte"})]})]})]})]})]})]})]})}const r_=8;function sd(t,s,a){document.title=t;let l=document.querySelector('meta[name="description"]');l||(l=document.createElement("meta"),l.name="description",document.head.appendChild(l)),s&&(l.content=s);let o=document.querySelector('link[rel="canonical"]');o||(o=document.createElement("link"),o.rel="canonical",document.head.appendChild(o)),o.href=a}function Zh(t,s){return{q:t.get("q")??"",category:s??t.get("category")??"",region:t.get("region")??"",urgent:t.get("urgent")==="true",featured:t.get("featured")==="true"}}function a_(t,s){const a=new URLSearchParams;return t.q&&a.set("q",t.q),t.region&&a.set("region",t.region),t.urgent&&a.set("urgent","true"),t.featured&&a.set("featured","true"),s>1&&a.set("page",String(s)),a}function Kh(t,s){const a=t.category?`/projets/categorie/${encodeURIComponent(t.category)}`:"/projets",o=a_(t,s).toString();return o?`${a}?${o}`:a}function Yh(){const{categorySlug:t}=_r(),[s]=Hs(),a=Bn(),{debugEnabled:l}=tm(),[o,u]=g.useState(()=>Zh(s,t)),[m,f]=g.useState([]),[x,h]=g.useState([]),[v,b]=g.useState([]),[w,I]=g.useState(null),[z,E]=g.useState(!0),[_,T]=g.useState(null),C=Number(s.get("page")??"1"),M=t??"",O=t?null:s.get("category"),W=g.useMemo(()=>m.find(Y=>Y.slug===M||Y.id===M),[m,M]),ae=!!(O&&(m.length===0||m.some(Y=>Y.id===O||Y.slug===O))),ge=g.useCallback(async(Y,fe)=>{E(!0),T(null);try{const Ee=await nm({q:Y.q||void 0,category:Y.category||void 0,region:Y.region||void 0,urgent:Y.urgent||void 0,featured:Y.featured||void 0,page:fe,limit:r_});b(Ee.data),I(Ee.meta)}catch{T("Impossible de charger les annonces. Vérifiez que l'API est démarrée."),b([]),I(null)}finally{E(!1)}},[]);g.useEffect(()=>{Promise.all([jg(),Ng()]).then(([Y,fe])=>{f(Y),h(fe.filter(Ee=>Ee.level==="region"))}).catch(()=>{})},[]),g.useEffect(()=>{if(!O||m.length===0)return;const Y=m.find(le=>le.id===O||le.slug===O);if(!Y)return;const fe=new URLSearchParams(s);fe.delete("category");const Ee=fe.toString();a(Ee?`/projets/categorie/${encodeURIComponent(Y.slug)}?${Ee}`:`/projets/categorie/${encodeURIComponent(Y.slug)}`,{replace:!0})},[m,O,a,s]),g.useEffect(()=>{if(ae)return;const Y=Zh(s,t);u(Y),ge(Y,C)},[s,C,ge,t,ae]),g.useEffect(()=>{const Y=W==null?void 0:W.name;if(M&&Y){sd(`Projets — ${Y} | Connecting Sponsors`,`Annonces projets dans la catégorie ${Y} en recherche de sponsors.`,`/projets/categorie/${encodeURIComponent(M)}`);return}if(M){sd(`Projets — ${M} | Connecting Sponsors`,"Annonces projets filtrées par catégorie en recherche de sponsors.",`/projets/categorie/${encodeURIComponent(M)}`);return}sd("Projets en recherche de sponsors | Connecting Sponsors","Découvrez les projets qui cherchent un sponsor.","/projets")},[M,W==null?void 0:W.name]);const De=Y=>{Y==null||Y.preventDefault(),a(Kh(o,1))},Ne=Y=>{a(Kh(o,Y)),window.scrollTo({top:0,behavior:"smooth"})},G=v.length>0,ke=o.featured?"Annonces à la une":W!=null&&W.name?`Projets — ${W.name}`:M?`Projets — ${M}`:"Projets en recherche de sponsors";return r.jsxs("div",{className:"w-full py-10",children:[r.jsxs("div",{className:"mb-8 flex flex-wrap items-end justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:ke}),r.jsx("p",{className:"mt-2 text-slate-600",children:w?`${w.total} annonce${w.total>1?"s":""} publiée${w.total>1?"s":""}`:"Découvrez les projets qui cherchent un mécène"}),l&&r.jsx("p",{className:"mt-1 text-xs font-medium text-violet-700",children:"Mode debug actif — republication et options visibles sur chaque annonce"})]}),r.jsxs("div",{className:"flex flex-wrap gap-3",children:[r.jsx(V,{to:"/publier",className:"btn-secondary",children:"Conditions & tarifs"}),r.jsx(V,{to:"/portail/projets/nouveau",className:"btn-primary",children:"Déposer mon projet"})]})]}),r.jsxs("div",{className:"grid gap-8 lg:grid-cols-[280px_1fr]",children:[r.jsxs("aside",{className:"space-y-4 lg:sticky lg:top-24 lg:self-start",children:[r.jsxs("form",{onSubmit:De,className:"card space-y-4 p-5",children:[r.jsx("h2",{className:"font-semibold text-slate-900",children:"Filtrer"}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"q",children:"Recherche"}),r.jsx("input",{id:"q",className:"input-field",placeholder:"Titre, description…",value:o.q,onChange:Y=>u(fe=>({...fe,q:Y.target.value}))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"category",children:"Catégorie"}),r.jsxs("select",{id:"category",className:"input-field",value:o.category,onChange:Y=>u(fe=>({...fe,category:Y.target.value})),children:[r.jsx("option",{value:"",children:"Toutes"}),m.map(Y=>r.jsx("option",{value:Y.slug,children:Y.name},Y.id))]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"region",children:"Région"}),r.jsxs("select",{id:"region",className:"input-field",value:o.region,onChange:Y=>u(fe=>
300({...fe,region:Y.target.value})),children:[r.jsx("option",{value:"",children:"Toutes"}),x.map(Y=>r.jsx("option",{value:Y.id,children:Y.name},Y.id))]})]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"checkbox",checked:o.featured,onChange:Y=>u(fe=>({...fe,featured:Y.target.checked}))}),"À la une uniquement"]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"checkbox",checked:o.urgent,onChange:Y=>u(fe=>({...fe,urgent:Y.target.checked}))}),"Urgents uniquement"]}),r.jsx("button",{type:"submit",className:"btn-primary w-full",children:"Appliquer"})]}),r.jsx(d0,{context:"projects"})]}),r.jsxs("div",{children:[z&&r.jsxs("div",{className:"flex items-center justify-center py-20 text-slate-500",children:[r.jsx(Xn,{className:"mr-2 animate-spin",size:24}),"Chargement…"]}),!z&&_&&r.jsx("div",{className:"card border-red-200 bg-red-50 p-6 text-center text-red-700",children:_}),!z&&!_&&!G&&r.jsxs("div",{className:"card p-12 text-center",children:[r.jsx("p",{className:"text-lg font-medium text-slate-900",children:"Aucune annonce trouvée"}),r.jsx("p",{className:"mt-2 text-slate-600",children:"Essayez d'élargir vos critères ou déposez la première annonce."}),r.jsx(V,{to:"/portail/projets/nouveau",className:"btn-primary mt-6 inline-flex",children:"Déposer un projet"})]}),!z&&!_&&G&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"grid grid-cols-2 items-stretch gap-4 sm:gap-6",children:v.map(Y=>r.jsx(u0,{project:Y,layout:"list",debug:l},Y.id))}),w&&w.totalPages>1&&r.jsxs("div",{className:"mt-10 flex items-center justify-center gap-2",children:[r.jsx("button",{type:"button",className:"btn-secondary",disabled:C<=1,onClick:()=>Ne(C-1),children:"Précédent"}),r.jsxs("span",{className:"px-4 text-sm text-slate-600",children:["Page ",C," / ",w.totalPages]}),r.jsx("button",{type:"button",className:"btn-secondary",disabled:C>=w.totalPages,onClick:()=>Ne(C+1),children:"Suivant"})]})]})]})]})]})}/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function Qh(t,s){(s==null||s>t.length)&&(s=t.length);for(var a=0,l=Array(s);a<s;a++)l[a]=t[a];return l}function i_(t){if(Array.isArray(t))return t}function l_(t,s){var a=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(a!=null){var l,o,u,m,f=[],x=!0,h=!1;try{if(u=(a=a.call(t)).next,s!==0)for(;!(x=(l=u.call(a)).done)&&(f.push(l.value),f.length!==s);x=!0);}catch(v){h=!0,o=v}finally{try{if(!x&&a.return!=null&&(m=a.return(),Object(m)!==m))return}finally{if(h)throw o}}return f}}function o_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
301In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c_(t,s){return i_(t)||l_(t,s)||u_(t,s)||o_()}function u_(t,s){if(t){if(typeof t=="string")return Qh(t,s);var a={}.toString.call(t).slice(8,-1);return a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set"?Array.from(t):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Qh(t,s):void 0}}const m0=Object.entries,Xh=Object.setPrototypeOf,d_=Object.isFrozen,m_=Object.getPrototypeOf,p_=Object.getOwnPropertyDescriptor;let qt=Object.freeze,Xt=Object.seal,Ma=Object.create,p0=typeof Reflect<"u"&&Reflect,Id=p0.apply,Dd=p0.construct;qt||(qt=function(s){return s});Xt||(Xt=function(s){return s});Id||(Id=function(s,a){for(var l=arguments.length,o=new Array(l>2?l-2:0),u=2;u<l;u++)o[u-2]=arguments[u];return s.apply(a,o)});Dd||(Dd=function(s){for(var a=arguments.length,l=new Array(a>1?a-1:0),o=1;o<a;o++)l[o-1]=arguments[o];return new s(...l)});const Hr=Mt(Array.prototype.forEach),f_=Mt(Array.prototype.lastIndexOf),Jh=Mt(Array.prototype.pop),Ui=Mt(Array.prototype.push),h_=Mt(Array.prototype.splice),Ua=Array.isArray,Vi=Mt(String.prototype.toLowerCase),rd=Mt(String.prototype.toString),ex=Mt(String.prototype.match),Fi=Mt(String.prototype.replace),tx=Mt(String.prototype.indexOf),x_=Mt(String.prototype.trim),g_=Mt(Number.prototype.toString),y_=Mt(Boolean.prototype.toString),nx=typeof BigInt>"u"?null:Mt(BigInt.prototype.toString),sx=typeof Symbol>"u"?null:Mt(Symbol.prototype.toString),En=Mt(Object.prototype.hasOwnProperty),$i=Mt(Object.prototype.toString),fn=Mt(RegExp.prototype.test),Vr=v_(TypeError);function Mt(t){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var a=arguments.length,l=new Array(a>1?a-1:0),o=1;o<a;o++)l[o-1]=arguments[o];return Id(t,s,l)}}function v_(t){return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return Dd(t,a)}}function it(t,s){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vi;if(Xh&&Xh(t,null),!Ua(s))return t;let l=s.length;for(;l--;){let o=s[l];
vendor: 4,406 bytes, line 301
301if(typeof o=="string"){const u=a(o);u!==o&&(d_(s)||(s[l]=u),o=u)}t[o]=!0}return t}function b_(t){for(let s=0;s<t.length;s++)En(t,s)||(t[s]=null);return t}function Un(t){const s=Ma(null);for(const l of m0(t)){var a=c_(l,2);const o=a[0],u=a[1];En(t,o)&&(Ua(u)?s[o]=b_(u):u&&typeof u=="object"&&u.constructor===Object?s[o]=Un(u):s[o]=u)}return s}function j_(t){switch(typeof t){case"string":return t;case"number":return g_(t);case"boolean":return y_(t);case"bigint":return nx?nx(t):"0";case"symbol":return sx?sx(t):"Symbol()";case"undefined":return $i(t);case"function":case"object":{if(t===null)return $i(t);const s=t,a=ds(s,"toString");if(typeof a=="function"){const l=a(s);return typeof l=="string"?l:$i(l)}return $i(t)}default:return $i(t)}}function ds(t,s){for(;t!==null;){const l=p_(t,s);if(l){if(l.get)return Mt(l.get);if(typeof l.value=="function")return Mt(l.value)}t=m_(t)}function a(){return null}return a}function N_(t){try{return fn(t,""),!0}catch{return!1}}const rx=qt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ad=qt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),id=qt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),w_=qt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ld=qt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),S_=qt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ax=qt(["#text"]),ix=qt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
301spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),od=qt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),lx=qt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jo=qt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),__=Xt(/{{[\w\W]*|^[\w\W]*}}/g),C_=Xt(/<%[\w\W]*|^[\w\W]*%>/g),k_=Xt(/\${[\w\W]*/g),E_=Xt(/^data-[\-\w.\u00B7-\uFFFF]+$/),T_=Xt(/^aria-[\-\w]+$/),ox=Xt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),P_=Xt(/^(?:\w+script|data):/i),R_=Xt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),A_=Xt(/^html$/i),O_=Xt(/^[a-z][.\w]*(-[.\w]+)+$/i),cx=Xt(/<[/\w!]/g),ux=Xt(/<[/\w]/g),L_=Xt(/<\/no(script|embed|frames)/i),I_=Xt(/\/>/i),Mn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},f0=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],D_=qt(it({},f0)),z_=(function(){const t={};return Hr(f0,s=>{t[s]=Xt(new RegExp("</"+s+"(?=[\\t\\n\\f\\r />])","i"))}),qt(t)})(),M_=function(){return typeof window>"u"?null:window},U_=function(s,a){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let l=null;
vendor: 15,569 bytes, line 301
301const o="data-tt-policy-suffix";a&&a.hasAttribute(o)&&(l=a.getAttribute(o));const u="dompurify"+(l?"#"+l:"");try{return s.createPolicy(u,{createHTML(m){return m},createScriptURL(m){return m}})}catch{return console.warn("TrustedTypes policy "+u+" could not be created."),null}},dx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},fr=function(s,a,l,o){return En(s,a)&&Ua(s[a])?it(o.base?Un(o.base):{},s[a],o.transform):l},cd=function(s,a,l){const o=En(s,a)?s[a]:void 0;return o&&typeof o=="object"?Un(o):l()};function h0(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:M_();const s=se=>h0(se);if(s.version="3.4.14",s.removed=[],!t||!t.document||t.document.nodeType!==Mn.document||!t.Element)return s.isSupported=!1,s;let a=t.document;const l=a,o=l.currentScript;t.DocumentFragment;const u=t.HTMLTemplateElement,m=t.Node,f=t.Element,x=t.NodeFilter,h=t.NamedNodeMap;h===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const v=t.DOMParser,b=t.trustedTypes,w=f.prototype,I=ds(w,"cloneNode"),z=ds(w,"remove"),E=ds(w,"nextSibling"),_=ds(w,"childNodes"),T=ds(w,"parentNode"),C=ds(w,"shadowRoot"),M=ds(w,"attributes"),O=m&&m.prototype?ds(m.prototype,"nodeType"):null,W=m&&m.prototype?ds(m.prototype,"nodeName"):null,ae=m&&m.prototype?ds(m.prototype,"ownerDocument"):null,ge=function(j){return O?O(j):j.nodeType},De=function(j){return W?W(j):j.nodeName};if(typeof u=="function"){const se=a.createElement("template");se.content&&se.content.ownerDocument&&(a=se.content.ownerDocument)}let Ne,G="",ke,Y=!1,fe=0;const Ee=function(){if(fe>0)throw Vr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},le=function(j){Ee(),fe++;try{return Ne.createHTML(j)}finally{fe--}},Te=function(j){Ee(),fe++;try{return Ne.createScriptURL(j)}finally{fe--}},Fe=function(){return Y||(ke=U_(b,o),Y=!0),ke},Z=a,oe=Z.implementation,Q=Z.createNodeIterator,N=Z.createDocumentFragment,F=Z.getElementsByTagName,we=l.importNode;let te=dx();s.isSupported=typeof m0=="function"&&typeof T=="function"&&oe&&oe.createHTMLDocument!==void 0;const Be=__,pe=C_,q=k_,Oe=E_,We=T_,tt=P_,Ue=R_,nt=O_;let yt=ox,Le=null;const ut=it({},[...rx,...ad,...id,...ld,...ax]);let ue=null;const dt=it({},[...ix,...od,...lx,...jo]);let mt=Object.seal(Ma(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Et=null,Ht=null;const vt=Object.seal(Ma(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Wt=!0,es=!0,ps=!1,B=!0,J=!1,Pe=!0,rt=!1,Jt=!1,xn=null,Ut=null,ts=!1,rn=!1,Pn=!1,an=!1,Es=!0,fs=!1;const hs="user-content-";let ns=!0,Ts=!1,ln={},on=null;const Ws=it({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Gs=null;const ra=it({},["audio","video","img","source","image","track"]);let Ps=null;const Zs=it({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xs="http://www.w3.org/1998/Math/MathML",gs="http://www.w3.org/2000/svg",Ft="http://www.w3.org/1999/xhtml";let Rn=Ft,ss=!1,Cr=null;const re=it({},[xs,gs,Ft],rd),Ze=qt(["mi","mo","mn","ms","mtext"]);let Xe=it({},Ze);const bt=qt(["annotation-xml"]);let Ot=it({},bt);const kr=it({},["title","style","font","a","script"]);let Er=null;const Rs=["application/xhtml+xml","text/html"],cl="text/html";let jt=null,Ks=null;const ul=a.createElement("form"),ni=function(j){return j instanceof RegExp||j instanceof Function},aa=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ks&&Ks===j)return;(!j||typeof j!="object")&&(j={}),j=Un(j),Er=Rs.indexOf(j.PARSER_MEDIA_TYPE)===-1?cl:j.PARSER_MEDIA_TYPE,jt=Er==="application/xhtml+xml"?rd:Vi,Le=fr(j,"ALLOWED_TAGS",ut,{transform:jt}),ue=fr(j,"ALLOWED_ATTR",dt,{transform:jt}),Cr=fr(j,"ALLOWED_NAMESPACES",re,{transform:rd}),Ps=fr(j,"ADD_URI_SAFE_ATTR",Zs,{transform:jt,base:Zs}),Gs=fr(j,"ADD_DATA_URI_TAGS",ra,{transform:jt,base:ra}),on=fr(j,"FORBID_CONTENTS",Ws,{transform:jt}),Et=fr(j,"FORBID_TAGS",Un({}),{transform:jt}),Ht=fr(j,"FORBID_ATTR",Un({}),{transform:jt}),ln=En(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?Un(j.USE_PROFILES):j.USE_PROFILES:!1,Wt=j.ALLOW_ARIA_ATTR!==!1,es=j.ALLOW_DATA_ATTR!==!1,ps=j.ALLOW_UNKNOWN_PROTOCOLS||!1,B=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,J=j.SAFE_FOR_TEMPLATES||!1,Pe=j.SAFE_FOR_XML!==!1,rt=j.WHOLE_DOCUMENT||!1,rn=j.RETURN_DOM||!1,Pn=j.RETURN_DOM_FRAGMENT||!1,an=j.RETURN_TRUSTED_TYPE||!1,ts=j.FORCE_BODY||!1,Es=j.SANITIZE_DOM!==!1,fs=j.SANITIZE_NAMED_PROPS||!1,ns=j.KEEP_CONTENT!==!1,Ts=j.IN_PLACE||!1,yt=N_(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:ox,Rn=typeof j.NAMESPACE=="string"?j.NAMESPACE:Ft,Xe=cd(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>it({},Ze)),Ot=cd(j,"HTML_INTEGRATION_POINTS",()=>it({},bt));const L=cd(j,"CUSTOM_ELEMENT_HANDLING",()=>Ma(null));if(mt=Ma(null),En(L,"tagNameCheck")&&ni(L.tagNameCheck)&&(mt.tagNameCheck=L.tagNameCheck),En(L,"attributeNameCheck")&&ni(L.attributeNameCheck)&&(mt.attributeNameCheck=L.attributeNameCheck),En(L,"allowCustomizedBuiltInElements")&&typeof L.allowCustomizedBuiltInElements=="boolean"&&(mt.allowCustomizedBuiltInElements=L.allowCustomizedBuiltInElements),Xt(mt),J&&(es=!1),Pn&&(rn=!0),ln&&(Le=it({},ax),ue=Ma(null),ln.html===!0&&(it(Le,rx),it(ue,ix)),ln.svg===!0&&(it(Le,ad),it(ue,od),it(ue,jo)),ln.svgFilters===!0&&(it(Le,id),it(ue,od),it(ue,jo)),ln.mathMl===!0&&(it(Le,ld),it(ue,lx),it(ue,jo))),vt.tagCheck=null,vt.attributeCheck=null,En(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?vt.tagCheck=j.ADD_TAGS:Ua(j.ADD_TAGS)&&(Le===ut&&(Le=Un(Le)),it(Le,j.ADD_TAGS,jt))),En(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?vt.attributeCheck=j.ADD_ATTR:Ua(j.ADD_ATTR)&&(ue===dt&&(ue=Un(ue)),it(ue,j.ADD_ATTR,jt))),En(j,"ADD_FORBID_CONTENTS")&&Ua(j.ADD_FORBID_CONTENTS)&&(on===Ws&&(on=Un(on)),it(on,j.ADD_FORBID_CONTENTS,jt)),ns&&(Le["#text"]=!0),rt&&it(Le,["html","head","body"]),Le.table&&(it(Le,["tbody"]),delete Et.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw Vr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Vr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const H=Ne;Ne=j.TRUSTED_TYPES_POLICY;try{G=le("")}catch(ce){throw Ne=H,ce}}else j.TRUSTED_TYPES_POLICY===null?(Ne=void 0,G=""):(Ne===void 0&&(Ne=Fe()),Ne&&typeof G=="string"&&(G=le("")));qt&&qt(j),Ks=j},si=it({},[...ad,...id,...w_]),dl=it({},[...ld,...S_]),pc=function(j,L,H){return L.namespaceURI===Ft?j==="svg":L.namespaceURI===xs?j==="svg"&&(H==="annotation-xml"||Xe[H]):!!si[j]},wt=function(j,L,H){return L.namespaceURI===Ft?j==="math":L.namespaceURI===gs?j==="math"&&Ot[H]:!!dl[j]},fc=function(j,L,H){return L.namespaceURI===gs&&!Ot[H]||L.namespaceURI===xs&&!Xe[H]?!1:!dl[j]&&(kr[j]||!si[j])},ri=function(j){let L=T(j);(!L||!L.tagName)&&(L={namespaceURI:Rn,tagName:"template"});const H=Vi(j.tagName),ce=Vi(L.tagName);return Cr[j.namespaceURI]?j.namespaceURI===gs?pc(H,L,ce):j.namespaceURI===xs?wt(H,L,ce):j.namespaceURI===Ft?fc(H,L,ce):!!(Er==="application/xhtml+xml"&&Cr[j.namespaceURI]):!1},rs=function(j){Ui(s.removed,{element:j});try{T(j).removeChild(j)}catch{if(z(j),!T(j))throw Vr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Tr=function(j,L,H){try{j.removeAttributeNode(L)}catch{try{j.removeAttribute(H)}catch{}}},ia=function(j){gn(j);const L=_(j);if(L){const ce=[];Hr(L,ve=>{Ui(ce,ve)}),Hr(ce,ve=>{try{z(ve)}catch{}})}const H=M(j);if(H)for(let ce=H.length-1;ce>=0;--ce){const ve=H[ce],Ie=ve&&ve.name;typeof Ie=="string"&&Tr(j,ve,Ie)}},ys=function(j,L,H){if(!H)try{H=L.getAttributeNode(j)}catch{H=null}Ui(s.removed,{attribute:H||null,from:L});try{H?L.removeAttributeNode(H):L.removeAttribute(j)}catch{try{L.removeAttribute(j)}catch{}}if(j==="is")if(rn||Pn)try{rs(L)}catch{}else try{L.setAttribute(j,"")}catch{}},la=function(j){const L=M(j);if(L)for(let H=L.length-1;H>=0;--H){const ce=L[H],ve=ce&&ce.name;typeof ve!="string"||ue[jt(ve)]||Tr(j,ce,ve)}},gn=function(j){const L=[j];for(;L.length>0;){const H=L.pop();ge(H)===Mn.element&&la(H);const ve=_(H);if(ve)for(let Ie=ve.length-1;Ie>=0;--Ie)L.push(ve[Ie])}},ml=function(j,L){return Pe?j==="patchsrc"?!0:j==="for"&&L!=="label"&&L!=="output":!1},An=function(j){if(!Pe)return;const L=[j];for(;L.length>0;){const H=L.pop(),ce=ge(H);if(ce===Mn.processingInstruction||ce===Mn.comment&&fn(ux,H.data)){try{z(H)}catch{}continue}if(ce===Mn.element){const Ie=H,Je=jt(De(H));try{Ie.hasAttribute&&Ie.hasAttribute("patchsrc")&&Ie.removeAttribute("patchsrc"),Ie.hasAttribute&&Ie.hasAttribute("for")&&ml("for",Je)&&Ie.removeAttribute("for")}catch{}}const ve=_(H);if(ve)for(let Ie=ve.length-1;Ie>=0;--Ie)L.push(ve[Ie])}},pl=function(j){let L=null,H=null;if(ts)j="<remove></remove>"+j;else{const Ie=ex(j,/^[\r\n\t ]+/);H=Ie&&Ie[0]}Er==="application/xhtml+xml"&&Rn===Ft&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const ce=Ne?le(j):j;if(Rn===Ft)try{L=new v().parseFromString(ce,Er)}catch{}if(!L||!L.documentElement){L=oe.createDocument(Rn,"template",null);try{L.documentElement.innerHTML=ss?G:ce}catch{}}const ve=L.body||L.documentElement;return j&&H&&ve.insertBefore(a.createTextNode(H),ve.childNodes[0]||null),Rn===Ft?F.call(L,rt?"html":"body")[0]:rt?L.documentElement:ve},fl=function(j){const L=ae?ae(j):j.ownerDocument;return Q.call(L||j,j,x.SHOW_ELEMENT|x.SHOW_COMMENT|x.SHOW_TEXT|x.SHOW_PROCESSING_INSTRUCTION|x.SHOW_CDATA_SECTION,null)},oa=function(j){return j=Fi(j,Be," "),j=Fi(j,pe," "),j=Fi(j,q," "),j},Ys=function(j){var L;j.normalize();const H=ae?ae(j):j.ownerDocument,ce=Q.call(H||j,j,x.SHOW_TEXT|x.SHOW_COMMENT|x.SHOW_CDATA_SECTION|x.SHOW_PROCESSING_INSTRUCTION,null);let ve=ce.nextNode();for(;ve;)ve.data=oa(ve.data),ve=ce.nextNode();const Ie=(L=j.querySelectorAll)===null||L===void 0?void 0:L.call(j,"template");Ie&&Hr(Ie,Je=>{Vn(Je.content)&&Ys(Je.content)})},As=function(j){const L=W?W(j):null;return typeof L!="string"||jt(L)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==M(j)||typeof j.removeAttribute!="function"||typeof j.setAttribute!="function"||typeof j.namespaceURI!="string"||typeof j.insertBefore!="function"||typeof j.hasChildNodes!="function"||j.nodeType!==O(j)||j.childNodes!==_(j)},Vn=function(j){if(!O||typeof j!="object"||j===null)return!1;try{return O(j)===Mn.documentFragment}catch{return!1}},vs=function(j){if(!O||typeof j!="object"||j===null)return!1;try{return typeof O(j)=="number"}catch{return!1}};function Hn(se,j,L){se.length!==0&&Hr(se,H=>{H.call(s,j,L,Ks)})}const hc=function(j,L){return!!(Pe&&j.hasChildNodes()&&!vs(j.firstElementChild)&&fn(cx,j.textContent)&&fn(cx,j.innerHTML)||Pe&&j.namespaceURI===Ft&&D_[L]&&(vs(j.firstElementChild)||typeof j.textContent=="string"&&fn(z_[L],j.textContent))||j.nodeType===Mn.processingInstruction||Pe&&j.nodeType===Mn.comment&&fn(ux,j.data))},Qs=function(j,L){if(j instanceof RegExp)return fn(j,L);if(j instanceof Function){for(var H=arguments.length,ce=new Array(H>2?H-2:0),ve=2;ve<H;ve++)ce[ve-2]=arguments[ve];return!!j(L,...ce)}return!1},hl=function(j,L,H){if(!Et[L]&&ai(L)&&Qs(mt.tagNameCheck,L))return!1;if(ns&&!on[L]){const ce=T(j),ve=_(j);if(ve&&ce){const Ie=ve.length;for(let Je=Ie-1;Je>=0;--Je){const ht=j===H?I(ve[Je],!0):ve[Je];ce.insertBefore(ht,E(j))}}}return rs(j),!0},ca=function(j,L,H,ce){return j.length===0?L:L===H||L===ce?Un(L):L},Xs=function(j,L){return j===L||T(j)!==null?!1:(Ts&&gn(j),!0)},xl=function(j,L){if(Hn(te.beforeSanitizeElements,j,null),Xs(j,L))return!0;if(As(j))return rs(j),!0;const H=jt(De(j));if(Le=ca(te.uponSanitizeElement,Le,ut,xn),Hn(te.uponSanitizeElement,j,{tagName:H,allowedTags:Le}),Xs(j,L))return!0;if(hc(j,H))return rs(j),!0;if(Et[H]||!(vt.tagCheck instanceof Function&&vt.tagCheck(H))&&!Le[H]){const ve=hl(j,H,L);return ve===!1&&Hn(te.afterSanitizeElements,j,null),ve}if(ge(j)===Mn.element&&!ri(j)||(H==="noscript"||H==="noembed"||H==="noframes")&&fn(L_,j.innerHTML))return rs(j),!0;if(J&&j.nodeType===Mn.text){const ve=oa(j.textContent);j.textContent!==ve&&(Ui(s.removed,{element:j.cloneNode()}),j.textContent=ve)}return Hn(te.afterSanitizeElements,j,null),!1},ua=function(j,L,H){if(Ht[L]||ml(L,j)||Es&&(L==="id"||L==="name")&&(H in a||H in ul))return!1;const ce=ue[L]||vt.attributeCheck instanceof Function&&vt.attributeCheck(L,j);return es&&fn(Oe,L)||Wt&&fn(We,L)?!0:ce?Ps[L]||fn(yt,Fi(H,Ue,""))||(L==="src"||L==="xlink:href"||L==="href")&&j!=="script"&&tx(H,"data:")===0&&Gs[j]||ps&&!fn(tt,Fi(H,Ue,""))?!0:!H:ai(j)&&Qs(mt.tagNameCheck,j)&&Qs(mt.attributeNameCheck,L,j)||L==="is"&&mt.allowCustomizedBuiltInElements&&Qs(mt.tagNameCheck,H)},ct=it({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ai=function(j){return!ct[Vi(j)]&&fn(nt,j)},gl=function(j,L,H,ce){if(Ne&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!H)switch(b.getAttributeType(j,L)){case"TrustedHTML":return le(ce);case"TrustedScriptURL":return Te(ce)}return ce},ii=function(j,L,H,ce){try{H?j.setAttributeNS(H,L,ce):j.setAttribute(L,ce),As(j)?rs(j):Jh(s.removed)}catch{ys(L,j)}},li=function(j){Hn(te.beforeSanitizeAttributes,j,null);const L=j.attributes;if(!L||As(j))return;ue=ca(te.uponSanitizeAttribute,ue,dt,Ut);const H={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ue,forceKeepAttr:void 0};let ce=L.length;const ve=jt(j.nodeName);for(;ce--;){const Ie=L[ce],Je=Ie.name,ht=Ie.namespaceURI,en=Ie.value,Lt=jt(Je),oi=en;let Gt=Je==="value"?oi:x_(oi);if(H.attrName=Lt,H.attrValue=Gt,H.keepAttr=!0,H.forceKeepAttr=void 0,Hn(te.uponSanitizeAttribute,j,H),Gt=H.attrValue,fs&&(Lt==="id"||Lt==="name")&&tx(Gt,hs)!==0&&(ys(Je,j,Ie),Gt=hs+Gt),Pe&&fn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Gt)){ys(Je,j,Ie);continue}if(Lt==="attributename"&&ex(Gt,"href")){ys(Je,j,Ie);continue}if(!H.forceKeepAttr){if(!H.keepAttr){ys(Je,j,Ie);continue}if(!B&&fn(I_,Gt)){ys(Je,j,Ie);continue}if(J&&(Gt=oa(Gt)),!ua(ve,Lt,Gt)){ys(Je,j,Ie);continue}Gt=gl(ve,Lt,ht,Gt),Gt!==oi&&ii(j,Je,ht,Gt)}}Hn(te.afterSanitizeAttributes,j,null)},Pr=function(j){let L=null;const H=fl(j);for(Hn(te.beforeSanitizeShadowDOM,j,null);L=H.nextNode();)if(Hn(te.uponSanitizeShadowNode,L,null),xl(L,j),li(L),Vn(L.content)&&Pr(L.content),ge(L)===Mn.element){const ce=C(L);Vn(ce)&&(da(ce),Pr(ce))}Hn(te.afterSanitizeShadowDOM,j,null)},da=function(j){const L=[{node:j,shadow:null}];for(;L.length>0;){const H=L.pop();if(H.shadow){Pr(H.shadow);continue}const ce=H.node,Ie=ge(ce)===Mn.element,Je=_(ce);if(Je)for(let ht=Je.length-1;ht>=0;--ht)L.push({node:Je[ht],shadow:null});if(Ie){const ht=W?W(ce):null;
301if(typeof ht=="string"&&jt(ht)==="template"){const en=ce.content;Vn(en)&&L.push({node:en,shadow:null})}}if(Ie){const ht=C(ce);Vn(ht)&&L.push({node:null,shadow:ht},{node:ht,shadow:null})}}};return s.sanitize=function(se){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=null,H=null,ce=null,ve=null;if(ss=!se,ss&&(se="<!-->"),typeof se!="string"&&!vs(se)&&(se=j_(se),typeof se!="string"))throw Vr("dirty is not a string, aborting");if(!s.isSupported)return se;Jt?(Le=xn,ue=Ut):aa(j),(te.uponSanitizeElement.length>0||te.uponSanitizeAttribute.length>0)&&(Le=Un(Le)),te.uponSanitizeAttribute.length>0&&(ue=Un(ue)),s.removed=[];const Ie=Ts&&typeof se!="string"&&vs(se);if(Ie){An(se);const en=De(se);if(typeof en=="string"){const Lt=jt(en);if(!Le[Lt]||Et[Lt])throw ia(se),Vr("root node is forbidden and cannot be sanitized in-place")}if(As(se))throw ia(se),Vr("root node is clobbered and cannot be sanitized in-place");try{da(se)}catch(Lt){throw ia(se),Lt}}else if(vs(se))L=pl("<!---->"),H=L.ownerDocument.importNode(se,!0),H.nodeType===Mn.element&&H.nodeName==="BODY"||H.nodeName==="HTML"?L=H:L.appendChild(H),da(H);else{if(!rn&&!J&&!rt&&se.indexOf("<")===-1)return Ne&&an?le(se):se;if(L=pl(se),!L)return rn?null:an?G:""}L&&ts&&rs(L.firstChild);const Je=Ie?se:L;try{const en=fl(Je);for(;ce=en.nextNode();)xl(ce,Je),li(ce),Vn(ce.content)&&Pr(ce.content)}catch(en){throw Ie&&(ia(se),Hr(s.removed,Lt=>{Lt.element&&gn(Lt.element)})),en}if(Ie)return Hr(s.removed,en=>{en.element&&gn(en.element)}),J&&Ys(se),se;if(rn){if(J&&Ys(L),Pn)for(ve=N.call(L.ownerDocument);L.firstChild;)ve.appendChild(L.firstChild);else ve=L;return(ue.shadowroot||ue.shadowrootmode)&&(ve=we.call(l,ve,!0)),ve}let ht=rt?L.outerHTML:L.innerHTML;return rt&&Le["!doctype"]&&L.ownerDocument&&L.ownerDocument.doctype&&L.ownerDocument.doctype.name&&fn(A_,L.ownerDocument.doctype.name)&&(ht="<!DOCTYPE "+L.ownerDocument.doctype.name+`>
302`+ht),J&&(ht=oa(ht)),Ne&&an?le(ht):ht},s.setConfig=function(){let se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};aa(se),Jt=!0,xn=Le,Ut=ue},s.clearConfig=function(){Ks=null,Jt=!1,xn=null,Ut=null,Ne=ke,G=""},s.isValidAttribute=function(se,j,L){Ks||aa({});const H=jt(se),ce=jt(j);return ua(H,ce,L)},s.addHook=function(se,j){typeof j=="function"&&En(te,se)&&Ui(te[se],j)},s.removeHook=function(se,j){if(En(te,se)){if(j!==void 0){const L=f_(te[se],j);return L===-1?void 0:h_(te[se],L,1)[0]}return Jh(te[se])}},s.removeHooks=function(se){En(te,se)&&(te[se]=[])},s.removeAllHooks=function(){te=dx()},s}var F_=h0();const $_=/<[a-z][\s\S]*>/i;function B_(t){return $_.test(t)}function q_(t){return F_.sanitize(t,{USE_PROFILES:{html:!0}})}function V_({content:t,className:s="cms-prose"}){return t.trim()?B_(t)?r.jsx("div",{className:s,dangerouslySetInnerHTML:{__html:q_(t)}}):r.jsx("div",{className:s,children:r.jsx("p",{className:"whitespace-pre-wrap text-base leading-relaxed text-slate-700",children:t})}):null}function H_(){const{slug:t}=_r(),s=Bn(),[a,l]=g.useState(null),[o,u]=g.useState(!0),[m,f]=g.useState(!1);if(g.useEffect(()=>{t&&(u(!0),f(!1),nw(t).then(b=>{(b.slug!==t||b.redirectedFrom)&&s(`/projets/${b.slug}`,{replace:!0}),l(b)}).catch(()=>{f(!0),l(null)}).finally(()=>u(!1)))},[t,s]),o)return r.jsxs("div",{className:"flex items-center justify-center py-24 text-slate-500",children:[r.jsx(Xn,{className:"mr-2 animate-spin",size:24}),"Chargement…"]});if(m||!a)return r.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-16 text-center",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Annonce introuvable"}),r.jsx("p",{className:"mt-2 text-slate-600",children:"Cette annonce n'existe pas ou n'est plus publiée."}),r.jsx(V,{to:"/projets",className:"btn-primary mt-6 inline-flex",children:"Retour aux annonces"})]});const x=Fn(a.imageUrl),h=Fn(a.logoUrl),v=Fn(a.dossierUrl??void 0);return r.jsxs("div",{className:"w-full px-0 py-10 sm:px-0",children:[r.jsxs(V,{to:"/projets",className:"inline-flex items-center gap-2 text-sm font-medium text-brand hover:underline",children:[r.jsx(Mx,{size:16}),"Retour aux annonces"]}),r.jsxs("article",{className:`mt-6 overflow-hidden rounded-2xl bg-white shadow-card ${a.isPremiumListing?"border border-amber-100 ring-1 ring-amber-300/40 bg-[linear-gradient(to_top,rgb(255_251_235/0.95)_0%,transparent_18%)]":a.isUrgent?"border border-red-100 ring-1 ring-red-200/70 bg-[linear-gradient(to_top,rgb(254_242_242/0.9)_0%,transparent_18%)]":"border border-slate-100"}`,children:[r.jsx(dc,{imageUrl:x,seed:a.id,aspectClass:"aspect-[21/9]"}),r.jsxs("div",{className:"p-6 sm:p-8",children:[r.jsxs("div",{className:"mb-4 flex flex-wrap items-start gap-4",children:[h&&r.jsx("img",{src:h,alt:"",className:"h-16 w-16 rounded-xl border border-slate-200 object-cover"}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:r.jsx(il,{variant:"public",isPremiumListing:a.isPremiumListing,isFeatured:a.isFeatured,isUrgent:a.isUrgent,matchingEnabled:a.matchingEnabled,matchingLabel:"Matching sponsor actif"})}),r.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:a.title}),r.jsxs("div",{className:"mt-2 space-y-1 text-sm text-slate-500",children:[r.jsxs("p",{children:["Publié initialement le ",new Date(a.createdAt).toLocaleDateString("fr-FR")]}),a.republishAt!==a.createdAt&&r.jsxs("p",{children:["Dernière remont
302ée en tête le ",new Date(a.republishAt).toLocaleDateString("fr-FR")]})]})]})]}),r.jsxs("div",{className:"mb-6 flex flex-wrap gap-4 text-sm text-slate-600",children:[a.budget!=null&&r.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[r.jsx(el,{size:16}),"Budget : ",a.budget.toLocaleString("fr-FR")," €"]}),a.region&&r.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[r.jsx(tl,{size:16}),a.region.name]})]}),a.categories.length>0&&r.jsx("div",{className:"mb-6 flex flex-wrap gap-2",children:a.categories.map(b=>r.jsx("span",{className:"rounded-full bg-brand/10 px-3 py-1 text-sm text-brand",children:b},b))}),r.jsx(V_,{content:a.description}),v&&r.jsxs("div",{className:"mt-8 rounded-xl border border-slate-200 bg-slate-50 p-4",children:[r.jsx("p",{className:"text-sm font-medium text-slate-900",children:"Dossier de sponsoring disponible"}),r.jsxs("a",{href:v,target:"_blank",rel:"noreferrer",className:"mt-2 inline-flex items-center gap-2 text-sm font-medium text-brand hover:underline",children:["Consulter le dossier",r.jsx(Kr,{size:14})]})]})]})]})]})}function W_(){const{user:t,login:s}=qn(),a=Bn(),[l]=Hs(),o=l.get("redirect"),u=o!=null&&o.startsWith("/")&&!o.startsWith("//")?o:"/portail",[m,f]=g.useState(""),[x,h]=g.useState(""),[v,b]=g.useState(null),[w,I]=g.useState(!1);if(t)return r.jsx(sa,{to:u,replace:!0});const z=async E=>{E.preventDefault(),I(!0),b(null);try{await s(m,x),a(u)}catch(_){b(Va(_,"Identifiants incorrects"))}finally{I(!1)}};return r.jsxs("div",{className:"mx-auto max-w-md px-4 py-16",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Connexion"}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:"Accédez à votre espace pour déposer un projet et activer des options de visibilité."}),r.jsxs("div",{className:"mt-6 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-950",children:[r.jsx("p",{className:"font-medium",children:"Nouveau portail Connecting Sponsors"}),r.jsxs("p",{className:"mt-1 text-amber-900/90",children:["Les comptes migrés doivent définir un nouveau mot de passe via"," ",r.jsx(V,{to:"/portail/activer",className:"font-semibold underline",children:"Activer mon compte"}),". L'ancien mot de passe ne fonctionne plus."]})]}),r.jsxs("form",{onSubmit:z,className:"card mt-8 space-y-4 p-6",children:[r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"email",children:"Email"}),r.jsx("input",{id:"email",type:"email",className:"input-field",value:m,onChange:E=>f(E.target.value),required:!0})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"password",children:"Mot de passe"}),r.jsx("input",{id:"password",type:"password",className:"input-field",value:x,onChange:E=>h(E.target.value),required:!0,minLength:6})]}),v&&r.jsx("p",{className:"text-sm text-accent-red",children:v}),r.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:w,children:w?"Connexion…":"Se connecter"})]}),r.jsxs("p",{className:"mt-4 text-center text-sm text-slate-600",children:[r.jsx(V,{to:"/portail/mot-de-passe-oublie",className:"font-medium text-brand hover:underline",children:"Mot de passe oublié"})," · ",r.jsx(V,{to:"/portail/activer",className:"font-medium text-brand hover:underline",children:"Activer mon compte"})]}),r.jsxs("p",{className:"mt-3 text-center text-sm text-slate-600",children:["Pas encore de compte ?"," ",r.jsx(V,{to:`/portail/inscription?redirect=${encodeURIComponent(u)}`,className:"font-medium text-brand hover:underline",children:"Créer un compte"})," · ",r.jsx(V,{to:`/portail/inscription?type=sponsor&redirect=${encodeURIComponent(u)}`,className:"font-medium text-brand hover:underline",children:"Espace sponsor"})]})]})}function G_(){const{user:t,register:s}=qn(),a=Bn(),[l]=Hs(),o=l.get("redirect"),u=o!=null&&o.startsWith("/")&&!o.startsWith("//")?o:"/portail",m=l.get("type")==="sponsor"?"sponsor":"client",[f,x]=g.useState(m),[h,v]=g.useState(""),[b,w]=g.useState(""),[I,z]=g.useState(""),[E,_]=g.useState(null),[T,C]=g.useState(null),[M,O]=g.useState(!1);if(t)return r.jsx(sa,{to:u,replace:!0});const W=async ae=>{ae.preventDefault(),O(!0),_(null),C(null);try{const ge=await s(b,I,h||void 0,f);if(ge.needsActivation){C(ge.message??"Un lien d'activation vient de vous être envoyé. Consultez votre boîte mail.");return}a(u)}catch{_("Impossible de créer le compte (email déjà utilisé ?)")}finally{O(!1)}};return r.jsxs("div",{className:"mx-auto max-w-md px-4 py-16",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Créer un compte"}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:f==="sponsor"?r.jsx(r.Fragment,{children:"Créez un compte sponsor / mécène pour gérer votre présence sur Connecting Sponsors. Vous pourrez aussi déposer une annonce de projet si besoin."}):r.jsxs(r.Fragment,{children:["Le dépôt d'annonce est gratuit. Les options de mise en avant sont activées après validation du paiement."," ",r.jsx(V,{to:"/publier",className:"font-medium text-brand hover:underline",children:"Voir conditions et tarifs"})]})}),r.jsxs("form",{onSubmit:W,className:"card mt-8 space-y-4 p-6",children:[r.jsxs("fieldset",{children:[r.jsx("legend",{className:"mb-2 block text-sm font-medium text-slate-700",children:"Je m'inscris en tant que"}),r.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[r.jsxs("label",{className:`curs
302or-pointer rounded-lg border px-3 py-3 text-sm ${f==="client"?"border-brand bg-brand/5 text-slate-900":"border-slate-200 text-slate-600"}`,children:[r.jsx("input",{type:"radio",name:"intent",value:"client",checked:f==="client",onChange:()=>x("client"),className:"sr-only"}),r.jsx("span",{className:"font-semibold",children:"Porteur de projet"}),r.jsx("span",{className:"mt-1 block text-xs opacity-80",children:"Déposer et booster mon annonce"})]}),r.jsxs("label",{className:`cursor-pointer rounded-lg border px-3 py-3 text-sm ${f==="sponsor"?"border-brand bg-brand/5 text-slate-900":"border-slate-200 text-slate-600"}`,children:[r.jsx("input",{type:"radio",name:"intent",value:"sponsor",checked:f==="sponsor",onChange:()=>x("sponsor"),className:"sr-only"}),r.jsx("span",{className:"font-semibold",children:"Sponsor / mécène"}),r.jsx("span",{className:"mt-1 block text-xs opacity-80",children:"Revendiquer votre organisation"})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"displayName",children:"Nom affiché"}),r.jsx("input",{id:"displayName",className:"input-field",value:h,onChange:ae=>v(ae.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"email",children:"Email"}),r.jsx("input",{id:"email",type:"email",className:"input-field",value:b,onChange:ae=>w(ae.target.value),required:!0})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"password",children:"Mot de passe"}),r.jsx("input",{id:"password",type:"password",className:"input-field",value:I,onChange:ae=>z(ae.target.value),required:!0,minLength:6})]}),E&&r.jsx("p",{className:"text-sm text-accent-red",children:E}),T&&r.jsx("p",{className:"text-sm text-emerald-700",children:T}),r.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:M,children:M?"Création…":"Créer mon compte"})]}),r.jsxs("p",{className:"mt-4 text-center text-sm text-slate-600",children:["Déjà inscrit ?"," ",r.jsx(V,{to:`/portail/connexion?redirect=${encodeURIComponent(u)}`,className:"font-medium text-brand hover:underline",children:"Se connecter"})]})]})}function Z_(){const{user:t,refresh:s}=qn(),a=Bn(),[l]=Hs(),o=l.get("token")??"",[u,m]=g.useState(""),[f,x]=g.useState(o),[h,v]=g.useState(""),[b,w]=g.useState(null),[I,z]=g.useState(null),[E,_]=g.useState(!1);if(t&&!o)return r.jsx(sa,{to:"/portail",replace:!0});const T=async M=>{M.preventDefault(),_(!0),z(null),w(null);try{const O=await Q1(u);w(O.message)}catch(O){z(Va(O,"Impossible d'envoyer le lien"))}finally{_(!1)}},C=async M=>{M.preventDefault(),_(!0),z(null),w(null);try{await X1(f,h),await s(),a("/portail")}catch(O){z(Va(O,"Activation impossible"))}finally{_(!1)}};return r.jsxs("div",{className:"mx-auto max-w-md px-4 py-16",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Activer mon compte"}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:"Pour les comptes migrés sans mot de passe : recevez un lien, puis choisissez un nouveau mot de passe."}),o?r.jsxs("form",{onSubmit:C,className:"card mt-8 space-y-4 p-6",children:[r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"password",children:"Nouveau mot de passe"}),r.jsx("input",{id:"password",type:"password",className:"input-field",value:h,onChange:M=>v(M.target.value),required:!0,minLength:6})]}),I&&r.jsx("p",{className:"text-sm text-accent-red",children:I}),r.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:E,children:E?"Activation…":"Activer mon compte"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("form",{onSubmit:T,className:"card mt-8 space-y-4 p-6",children:[r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"email",children:"Email du compte"}),r.jsx("input",{id:"email",type:"email",className:"input-field",value:u,onChange:M=>m(M.target.value),required:!0})]}),I&&r.jsx("p",{className:"text-sm text-accent-red",children:I}),b&&r.jsx("p",{className:"text-sm text-emerald-700",children:b}),r.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:E,children:E?"Envoi…":"Recevoir le lien d'activation"})]}),r.jsxs("form",{onSubmit:C,className:"card mt-4 space-y-4 p-6",children:[r.jsx("p",{className:"text-sm text-slate-600",children:"Déjà un jeton ? Définissez votre mot de passe :"}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"token",children:"Jeton d'activation"}),r.jsx("input",{id:"token",className:"input-field",value:f,onChange:M=>x(M.target.value),required:!0})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"password2",children:"Nouveau mot de passe"}),r.jsx("input",{id:"password2",type:"password",className:"input-field",value:h,onChange:M=>v(M.target.value),required:!0,minLength:6})]}),r.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:E,children:E?"Activation…":"Valider"})]})]}),r.jsx("p",{className:"mt-4 text-center text-sm text-slate-600",children:r.jsx(V,{to:"/portail/connexion",className:"font-medium text-brand hover:underline",children:"Retour à la connexion"})})]})}function K_(){const[t,s]=g.useState(""),[a,l]=g.useState(null),[o,u]=g.useState(null),[m,f]=g.useState(!1),x=async h=>{h.preventDefault(),f(!0),u(null),l(null);try{const v=await J1(t);l(v.message)}catch(v){u(Va(v,"Impossible d'envoyer l'email"))}finally{f(!1)}};return r.jsxs("div",{className:"mx-auto max-w-md px-4 py-16",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Mot de passe oublié"}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:"Saisissez votre email : nous vous enverrons un lien pour choisir un nouveau mot de passe."}),r.jsxs("form",{onSubmit:x,className:"card mt-8 space-y-4 p-6",children:[r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"email",children:"Email"}),r.jsx("input",{id:"email",type:"email",className:"input-field",value:t,onChange:h=>s(h.target.value),required:!0})]}),o&&r.jsx("p",{className:"text-sm text-accent-red",children:o}),a&&r.jsx("p",{className:"text-sm text-emerald-700",children:a}),r.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:m,children:m?"Envoi…":"Envoyer le lien"})]}),r.jsxs("p",{className:"mt-4 text-center text-sm text-slate-600",children:[r.jsx(V,{to:"/portail/connexion",className:"font-medium text-brand hover:underline",children:"Retour à la connexion"})," · ",r.jsx(V,{to:"/portail/activer",className:"font-medium text-brand hover:underline",children:"Activer mon compte"})]})]})}function Y_(){const t=Bn(),[s]=Hs(),a=s.get("token")??"",[l,o]=g.useState(a),[u,m]=g.useState(""),[f,x]=g.useState(null),[h,v]=g.useState(null),[b,w]=g.useState(!1),I=async z=>{z.preventDefault(),w(!0),v(null),x(null);try{const E=await eN(l,u);x(E.message),setTimeout(()=>t("/portail/connexion"),1200)}catch(E){v(Va(E,"Réinitialisation impossible"))}finally{w(!1)}};return r.jsxs("div",{className:"mx-auto max-w-md px-4 py-16",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Nouveau mot de passe"}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:"Choisissez un mot de passe pour retrouver l'accès à votre espace."}),r.jsxs("form",{onSubmit:I,className:"card mt-8 space-y-4 p-6",children:[a?null:r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"token",children:"Jeton"}),r.jsx("input",{id:"token",className:"input-field",value:l,onCh
302ange:z=>o(z.target.value),required:!0})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"password",children:"Nouveau mot de passe"}),r.jsx("input",{id:"password",type:"password",className:"input-field",value:u,onChange:z=>m(z.target.value),required:!0,minLength:6})]}),h&&r.jsx("p",{className:"text-sm text-accent-red",children:h}),f&&r.jsx("p",{className:"text-sm text-emerald-700",children:f}),r.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:b,children:b?"Enregistrement…":"Enregistrer"})]}),r.jsx("p",{className:"mt-4 text-center text-sm text-slate-600",children:r.jsx(V,{to:"/portail/connexion",className:"font-medium text-brand hover:underline",children:"Retour à la connexion"})})]})}function Q_(){const{user:t,loading:s}=qn();return s?r.jsxs("div",{className:"flex items-center justify-center py-24 text-slate-500",children:[r.jsx(Xn,{className:"mr-2 animate-spin",size:22}),"Chargement de votre espace…"]}):t?r.jsx("div",{className:"mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8",children:r.jsx(Ix,{})}):r.jsx(sa,{to:"/portail/connexion",replace:!0})}const X_="client",J_="sponsor";function e2(t){return t?Array.isArray(t.roles)&&t.roles.length>0?t.roles:t.role?[t.role]:[]:[]}function t2(t){return e2(t).includes(J_)}function n2(){const{debugEnabled:t,setDebugEnabled:s}=tm();return r.jsxs("section",{className:"card border-violet-200 bg-violet-50/60 p-6",children:[r.jsxs("div",{className:"flex flex-col gap-5 sm:flex-row sm:items-start sm:justify-between",children:[r.jsxs("div",{className:"flex gap-4",children:[r.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-xl bg-violet-100 text-violet-700",children:r.jsx(Ux,{size:24})}),r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Outils administrateur"}),r.jsx("p",{className:"mt-1 max-w-2xl text-sm text-slate-600",children:"Activez le mode debug pour afficher sur le site public la date de republication et les options actives de chaque annonce. Réservé aux comptes administrateur."})]})]}),r.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-3 rounded-xl border border-violet-200 bg-white px-4 py-3",children:[r.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-violet-300 text-violet-700 focus:ring-violet-500",checked:t,onChange:a=>s(a.target.checked)}),r.jsx("span",{className:"text-sm font-medium text-slate-900",children:"Mode debug"})]})]}),r.jsxs("div",{className:"mt-5 flex flex-wrap gap-3",children:[r.jsxs(V,{to:"/projets",className:"btn-primary",children:[r.jsx(Kr,{size:16}),"Voir le listing public"]}),t&&r.jsx("p",{className:"self-center text-sm font-medium text-violet-800",children:"Le mode debug est actif sur les pages publiques."})]})]})}function s2(t){switch(t){case"pending":return"En attente de validation";case"approved":return"Approuvée";case"rejected":return"Rejetée";default:return t}}function ud(t,s){var a;if(t&&typeof t=="object"&&"response"in t){const l=t.response;if((a=l==null?void 0:l.data)!=null&&a.message)return l.data.message}return s}function r2(){const[t,s]=g.useState(!0),[a,l]=g.useState([]),[o,u]=g.useState([]),[m,f]=g.useState(""),[x,h]=g.useState([]),[v,b]=g.useState(!1),[w,I]=g.useState(null),[z,E]=g.useState(""),[_,T]=g.useState(""),[C,M]=g.useState(null),[O,W]=g.useState(!1),[ae,ge]=g.useState(null),[De,Ne]=g.useState(null),G=g.useCallback(async()=>{s(!0),ge(null);try{const[le,Te]=await Promise.all([bN(),jN()]);l(le),u(Te)}catch(le){ge(ud(le,"Impossible de charger l'espace sponsor"))}finally{s(!1)}},[]);g.useEffect(()=>{G()},[G]);const ke=o.filter(le=>le.status==="pending"),Y=a.length>0,fe=async le=>{if(le.preventDefault(),!!m.trim()){b(!0),ge(null),Ne(null);try{const Te=await NN(m.trim());h(Te),Te.length===0&&I(null)}catch(Te){ge(ud(Te,"Recherche impossible"))}finally{b(!1)}}},Ee=async le=>{if(le.preventDefault(),!!w){W(!0),ge(null),Ne(null);try{let Te=null;C&&(Te=(await gg("claim_evidence",C)).url),await wN({companyId:w.id,message:z,siren:_,evidenceDocumentUrl:Te}),Ne("Demande envoyée — un administrateur la validera prochainement."),I(null),E(""),T(""),M(null),h([]),f(""),await G()}catch(Te){ge(ud(Te,"Impossible d'envoyer la demande"))}finally{W(!1)}}};return t?r.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500",children:[r.jsx(Xn,{className:"animate-spin",size:16}),"Chargement de l'espace sponsor…"]}):r.jsxs("section",{className:"space-y-4",children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Espace sponsor"}),ae&&r.jsx("p",{className:"rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700",children:ae}),De&&r.jsx("p",{className:"rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-800",children:De}),Y?r.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:a.map(le=>r.jsxs("div",{className:"card p-6",children:[r.jsx("div",{className:"mb-3 flex h-12 w-12 items-center justify-center rounded-xl bg-brand/10 text-brand",children:r.jsx(Jo,{size:24})}),r.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:le.companyName}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Vous êtes responsable de cette organisation."}),r.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[r.jsx(V,{to:`/portail/organisation/${le.companyId}`,className:"btn-primary inline-flex",children:"Gérer la fiche"}),r.jsx(V,{to:`/sponsors/${le.companySlug}`,className:"btn-secondary inline-flex",children:"Voir la fiche publique"})]})]},le.id))}):null,ke.length>0?r.jsxs("div",{className:"space-y-3",children:[r.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-slate-500",children:"Demandes en cours"}),ke.map(le=>r.jsxs("div",{className:"rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-950",children:[r.jsx("p",{className:"font-medium",children:le.companyName??"Organisation"}),r.jsx("p",{className:"mt-1",children:s2(le.status)}),le.siren?r.jsxs("p",{className:"mt-1",children:["SIREN : ",le.siren]}):null,le.message?r.jsx("p",{className:"mt-2 text-amber-900/80",children:le.message}):null,le.evidenceDocumentUrl?r.jsx("a",{href:Fn(le.evidenceDocumentUrl),target:"_blank",rel:"noreferrer",className:"mt-2 inline-block font-medium underline",children:"Voir le justificatif"}):null]},le.id))]}):null,Y?null:r.jsxs("div",{className:"card space-y-4 p-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Revendiquer une organisation"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Recherchez la fiche publiée de votre organisation. Un administrateur validera votre demande avant de vous en confier la responsabilité."})]}),r.jsxs("form",{onSubmit:fe,className:"flex flex-col gap-2 sm:flex-row",children:[r.jsx("input",{className:"input-field flex-1",placeholder:"Nom, site web ou email…",value:m,onChange:le=>f(le.target.value),required:!0}),r.jsxs("button",{type:"submit",className:"btn-secondary inline-flex items-center justify-center gap-2",disabled:v,children:[v?r.jsx(Xn,{className:"animate-spin",size:16}):r.jsx(Ki,{size:16}),"Rechercher"]})]}),x.length>0?r.jsx("ul",{className:"divide-y divide-slate-100 rounded-xl border border-slate-200",children:x.map(le=>{const Te=(w==null?void 0:w.id)===le.id;return r.jsx("li",{children:r.jsxs("button",{type:"button",className:`flex w-full flex-col items-start px-4 py-3 text-left text-sm transition ${Te?"bg-brand/5":"hover:bg-slate-50"}`,onClick:()=>I(le),children:[r.jsx("span",{className:"font-medium text-slate-900",children:le.name}),r.jsx("span",{className:"text-slate-500",children:[le.website,le.email].filter(
302Boolean).join(" · ")||le.slug})]})},le.id)})}):null,w?r.jsxs("form",{onSubmit:Ee,className:"space-y-3 rounded-xl border border-slate-200 bg-slate-50 p-4",children:[r.jsxs("p",{className:"text-sm text-slate-700",children:["Demande pour ",r.jsx("strong",{children:w.name})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"claim-siren",children:"SIREN"}),r.jsx("input",{id:"claim-siren",className:"input-field",inputMode:"numeric",placeholder:"9 chiffres",value:_,onChange:le=>T(le.target.value),maxLength:14})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"claim-evidence",children:"Justificatif"}),r.jsx("input",{id:"claim-evidence",type:"file",accept:".pdf,image/jpeg,image/png,image/webp,application/pdf",className:"block w-full text-sm text-slate-600 file:mr-3 file:rounded-lg file:border-0 file:bg-white file:px-3 file:py-2 file:text-sm file:font-medium file:text-slate-700",onChange:le=>{var Te;return M(((Te=le.target.files)==null?void 0:Te[0])??null)}}),r.jsx("p",{className:"mt-2 text-xs text-slate-500",children:"Joignez un justificatif de votre organisation (Kbis, récépissé RNA, extrait INSEE/SIREN, ou document officiel équivalent) et/ou indiquez le SIREN. Ces éléments permettent d'accélérer la procédure de vérification par l'administrateur."})]}),r.jsx("textarea",{className:"input-field min-h-[96px]",placeholder:"Précisez votre rôle dans l'organisation (optionnel)",value:z,onChange:le=>E(le.target.value),maxLength:2e3}),r.jsx("button",{type:"submit",className:"btn-primary",disabled:O,children:O?"Envoi…":"Envoyer la demande"})]}):null]})]})}function a2(){const{user:t,logout:s}=qn(),a=(t==null?void 0:t.role)==="admin",l=(t==null?void 0:t.role)===X_,o=t2(t),[u,m]=g.useState(null);return g.useEffect(()=>{l&&rc().then(f=>m(f.isComplete)).catch(()=>m(null))},[l]),r.jsxs("div",{className:"space-y-8",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:a?"Espace administrateur":o?"Mon espace":"Mon espace client"}),r.jsx("p",{className:"mt-2 text-slate-600",children:a?`Connecté en tant qu'administrateur (${t==null?void 0:t.email}).`:o?`Bienvenue ${(t==null?void 0:t.displayName)??(t==null?void 0:t.email)}. Gérez votre organisation et vos annonces de projet.`:`Bienvenue ${(t==null?void 0:t.displayName)??(t==null?void 0:t.email)}. Déposez gratuitement votre projet et activez des services premium.`})]}),r.jsx("button",{type:"button",className:"btn-secondary",onClick:s,children:"Déconnexion"})]}),a&&r.jsx(n2,{}),o&&r.jsx(r2,{}),l&&u===!1&&r.jsxs("div",{className:"rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-900",children:["Vos coordonnées de facturation sont incomplètes."," ",r.jsx(V,{to:"/portail/facturation",className:"font-medium underline",children:"Compléter mon profil"})," ","avant de souscrire à des options payantes."]}),l&&r.jsxs("section",{className:"space-y-4",children:[o?r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Espace porteur de projet"}):null,r.jsxs("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:[r.jsx(V,{to:"/portail/programme-contributeur",className:"card group p-6 transition hover:border-violet-300 hover:shadow-md md:col-span-2 lg:col-span-3",children:r.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[r.jsxs("div",{className:"flex gap-4",children:[r.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-xl bg-violet-100 text-violet-700",children:r.jsx(Nr,{size:24})}),r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Programme Contributeur"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Consultez vos points, votre historique d'avis et votre progression vers les récompenses premium."})]})]}),r.jsx("span",{className:"btn-secondary shrink-0 self-start sm:self-ce
302nter",children:"Mes points"})]})}),r.jsxs(V,{to:"/portail/projets/nouveau",className:"card group p-6 transition hover:border-brand/30 hover:shadow-md",children:[r.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-brand/10 text-brand",children:r.jsx(Lb,{size:24})}),r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Déposer un projet"}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:"Publication gratuite. Ajoutez des options payantes pour booster la visibilité ou lancer un matching sponsor."})]}),r.jsxs(V,{to:"/portail/projets",className:"card group p-6 transition hover:border-brand/30 hover:shadow-md",children:[r.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-amber-100 text-amber-700",children:r.jsx(Xa,{size:24})}),r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Mes annonces"}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:"Suivez vos projets déposés et le statut des options souscrites."})]}),r.jsxs(V,{to:"/portail/facturation",className:"card group p-6 transition hover:border-brand/30 hover:shadow-md",children:[r.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-slate-100 text-slate-700",children:r.jsx($x,{size:24})}),r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Compte & facturation"}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:"Coordonnées de facturation et téléchargement de vos factures."}),u===!0&&r.jsx("p",{className:"mt-3 text-xs font-medium text-brand",children:"Profil complet"}),u===!1&&r.jsx("p",{className:"mt-3 text-xs font-medium text-amber-700",children:"Profil à compléter"})]}),r.jsxs("div",{"aria-disabled":"true",className:"card cursor-not-allowed bg-slate-50 p-6 opacity-60",children:[r.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-slate-100 text-slate-400",children:r.jsx(Ub,{size:24})}),r.jsx("h2",{className:"text-lg font-semibold text-slate-500",children:"Mes documents"}),r.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"Guides achetés et modèles gratuits à télécharger."}),r.jsx("p",{className:"mt-3 text-xs font-medium text-slate-400",children:"Bientôt disponible"})]})]})]})]})}const i2={draft:{label:"Brouillon",className:"bg-slate-100 text-slate-700",icon:Mb},pending_review:{label:"En attente de validation",className:"bg-amber-100 text-amber-800",icon:Fx},published:{label:"En ligne",className:"bg-emerald-100 text-emerald-800",icon:Bd},requested_offline:{label:"Hors ligne",className:"bg-slate-200 text-slate-700",icon:Db},payment_pending:{label:"Options en attente de paiement",className:"bg-orange-100 text-orange-800",icon:el},rejected:{label:"Rejetée",className:"bg-red-100 text-red-800",icon:Ib},expired:{label:"Expirée",className:"bg-slate-200 text-slate-600",icon:Hb},archived:{label:"Archivée",className:"bg-slate-100 text-slate-500",icon:Tb}};function l2({status:t}){const s=i2[t],a=s.icon;return r.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-medium ${s.className}`,children:[r.jsx(a,{size:13,className:"shrink-0","aria-hidden":!0}),s.label]})}function x0({statuses:t}){return r.jsx("span",{className:"inline-flex flex-wrap items-center gap-2",children:t.map(s=>r.jsx(l2,{status:s},s))})}function g0({className:t="",showLabel:s=!0}){return r.jsxs("span",{className:`inline-flex shrink-0 items-center gap-1 rounded-full bg-violet-100 px-2 py-0.5 text-xs font-medium text-violet-800 ${t}`,title:"Option offerte par Connecting Sponsors",children:[r.jsx(Nr,{size:12,"aria-hidden":!0}),s&&"Offerte"]})}function cm(t){return(t==null?void 0:t.launchPrice)===!0}function o2({className:t=""}){return r.jsx("span",{className:`inline-flex items-center rounded-md bg-amber-50 px-1.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide text-amber-800 ring-1 ring-inset ring-amber-200 ${t}`,children:"Prix de lancement"})}function zd({className:t=""}){return r.jsx("span",{className:`text-xs font-normal text-amber-700 ${t}`,children:"Prix de lancement"})}const c2={ai_title_slug:"Optimisez titre, description et URL par IA : orthographe, reformulation et référencement pour plus de visibilité.",featured_homepage_7d:"Affichez votre annonce en tête du site pendant 7 jours et captez l'attention des sponsors dès leur arrivée.",featured_homepage_30d:"Affichez votre annonce en tête du site pendant 30 jours et captez l'attention des sponsors dès leur arrivée.",premium_listing:"Pack visibilité premium : largeur pleine dans la liste et remontée hebdomadaire en tête de liste pendant 60 jours.",boost_daily_7d:"Votre projet remonte en tête de liste chaque jour pendant 7 jours.",boost_daily_30d:"Votre projet remonte en tête de liste chaque jour pendant 30 jours.",boost_weekly_60d:"Votre projet remonte en tête de liste chaque semaine pendant 60 jours.",urgent_badge:"Signalez l'urgence de votre recherche de mécène avec un badge visible par les sponsors.",dossier_deposit:"Mettez votre dossier de sponsoring à disposition des sponsors intéressés.",sponsor_matching:"Lancez un matching automatique avec les sponsors les plus pertinents pour votre projet. Tarif de lancement pendant le déploiement de la base sponsors.",logo_image:"Affichez le logo de votre organisation sur l’annonce pour renforcer la confiance.",premium_matching_pack:"Le duo visibilité + matching : pack visibilité premium (largeur pleine et remontée hebdomadaire 60 jours) avec matching sponsor.",enrichment_pack:"Le raccourci pour enrichir l’annonce : dépôt de dossier, optimisation IA et logo/image dans une seule commande.",enrichment_matching_pack:"Le pack le plus complet côté enrichissement : options d’annonce et matching sponsor dans la même activation."},Po=["featured_homepage_7d","featured_homepage_30d"],Wi=["boost_daily_7d","boost_daily_30d"],Zr="boost_weekly_60d";[...Wi];function ti(t){const s=t==null?void 0:t.includedServiceCodes;return Array.isArray(s)?s.filter(a=>
302typeof a=="string"):[]}function Sr(t){var s;return ti(t.config).length>0||((s=t.config)==null?void 0:s.kind)==="pack"}function u2(t){const s=new Set;for(const a of t)if(!(a.status!=="active"&&a.status!=="pending_payment")){s.add(a.serviceCode);for(const l of ti(a.config))s.add(l)}return s}function d2(t){return t.isPremiumListing?t.premiumListingUntil?new Date(t.premiumListingUntil)>new Date:!0:!1}function y0(t){return t.isFeatured?t.featuredUntil?new Date(t.featuredUntil)>new Date:!0:!1}function v0(t){return t.boostUntil?new Date(t.boostUntil)>new Date:!1}function mx(t,s){return t.some(a=>a.serviceCode===s&&(a.status==="active"||a.status==="pending_payment"))}function b0(t,s,a){return!(!ol(s,a).includes(t)||mx(a,t)||t===Zr&&mx(a,"premium_listing"))}function px(t,s){return ol(t,s).filter(a=>b0(a,t,s))}function ol(t,s){const a=new Set(u2(s));if(d2(t))a.add("premium_listing"),a.add(Zr);else if(v0(t)){if(t.boostFrequency==="daily")for(const l of Wi)a.add(l);t.boostFrequency==="weekly"&&a.add(Zr)}if(y0(t))for(const l of Po)a.add(l);return t.isUrgent&&a.add("urgent_badge"),t.matchingEnabled&&a.add("sponsor_matching"),t.logoImageEnabled&&a.add("logo_image"),[...a]}function fx(t,s){return ol(s??{},t)}function mc(t,s){const a=new Set(t),l=new Set;for(const o of s)if(!(!a.has(o.code)||!Sr(o)))for(const u of ti(o.config))l.add(u);return l}function j0(t,s,a,l=[]){const o=mc(s,t),u=new Set(s),m=new Set(l),f=new Set;for(const E of t)(m.has(E.code)||u.has(E.code))&&f.add(E.category);const x=t.filter(E=>!(!u.has(E.code)||m.has(E.code)||o.has(E.code))),h=new Map,v=[],b=new Set;for(const E of x){let _=E.priceCents;if(!Sr(E)){const T=a.find(C=>C.isActive&&C.targetCategory===E.category&&f.has(C.triggerCategory)&&C.triggerCategory!==C.targetCategory);if(T){_=Math.max(0,Math.round(_*(100-T.discountPercent)/100));const C=`${T.triggerCategory}->${T.targetCategory}:${T.discountPercent}`;!b.has(C)&&_<E.priceCents&&(b.add(C),v.push({triggerCategory:T.triggerCategory,targetCategory:T.targetCategory,discountPercent:T.discountPercent}))}}h.set(E.code,_)}const w=new Set(x.filter(E=>E.priceCents>0&&!Sr(E)).map(E=>E.category)),I=[],z=new Set;for(const E of a){if(!E.isActive||E.triggerCategory===E.targetCategory||f.has(E.triggerCategory)||!w.has(E.targetCategory))continue;const _=`${E.triggerCategory}->${E.targetCategory}:${E.discountPercent}`;z.has(_)||b.has(_)||(z.add(_),I.push({triggerCategory:E.triggerCategory,targetCategory:E.targetCategory,discountPercent:E.discountPercent}))}return{coveredCodes:o,prices:h,totalCents:[...h.values()].reduce((E,_)=>E+_,0),activeCategories:f,appliedRules:v,upsellRules:I}}function m2(t,s){const a=new Set(ol(s,s.orders));return t.filter(l=>!a.has(l.code))}const p2={pending_payment:"En attente de paiement",active:"Active",expired:"Expirée",cancelled:"Annulée"};function hx(t,s,a){const l=s.filter(o=>a.has(o));return t.filter(o=>s.includes(o)?l.length>0?l.includes(o):o===s[0]:!0)}function f2(t,s){const a=ol(t,t.orders),l=new Map(t.orders.map(u=>[u.serviceCode,u]));let o=hx(a,Po,l);return o=hx(o,Wi,l),o.includes("premium_listing")&&o.includes(Zr)&&(l.has(Zr)||(o=o.filter(m=>m!==Zr))),o.map(u=>{const m=l.get(u),f=s.find(w=>w.code===u),x=b0(u,t,t.orders),h=(m==null?void 0:m.status)??"active",v=Po.includes(u)&&!Po.some(w=>l.has(w))&&y0(t),b=Wi.includes(u)&&!Wi.some(w=>l.has(w))&&v0(t)&&t.boostFrequency==="daily";return{code:u,label:v?"Annonce à la une":b?"Remontée quotidienne":(m==null?void 0:m.serviceLabel)??(f==null?void 0:f.label)??u,status:h,isOffered:x,statusLabel:x?"Offerte":p2[h]??h}})}function xx(t){return new Date(t).toLocaleDateString("fr-FR",{day:"numeric",month:"short",year:"numeric"})}function h2({project:t}){const s=Fn(t.logoUrl),a=Fn(t.imageUrl);return!s&&!a?null:r.jsxs("div",{className:"mt-4 flex flex-wrap items-start gap-3",children:[a&&r.jsxs("div",{className:"min-w-0 flex-1 sm:max-w-xs",children:[r.jsx("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-slate-500",children:"Image"}),r.jsx("div",{className:"overflow-hidden rounded-lg border border-slate-200 bg-slate-50",children:r.jsx("img",{src:a,alt:`Illustration de ${t.title}`,className:"aspect-[16/10] w-full object-cover"})})]}),s&&r.jsxs("div",{children:[r.jsx("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-slate-500",children:"Logo"}),r.jsx("div",{className:"flex h-20 w-20 items-center justify-center overflow-hidden rounded-lg border border-slate-200 bg-white p-2",children:r.jsx("img",{src:s,alt:`Logo de ${t.title}`,className:"max-h-full max-w-full object-contain"})})]})]})}function x2(t){return t.priceCents===0?"Gratuit":`${(t.priceCents/100).toFixed(2)} €`}function g2({project:t,services:s}){const[a,l]=g.useState(null),o=m2(s,t);if(o.length===0||!t.canEdit)return null;const u=a!=null?o.find(m=>m.code===a)??null:null;return r.jsxs("div",{className:"mt-3 rounded-xl border border-brand/20 bg-gradient-to-br from-brand/5 to-white px-3 py-2.5 sm:px-4",children:[r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold text-brand sm:text-sm",children:[r.jsx(Xa,{size:14,className:"shrink-0","aria-hidden":!0}),"Boostez la visibilité de votre annonce"]}),r.jsx(V,{to:`/portail/projets/${t.id}/modifier#options`,className:"text-xs font-semibold text-brand hover:underline sm:text-sm",children:"Voir les options"})]}),r.jsx("ul",{className:"mt-2 flex list-none flex-wrap gap-1.5 p-0",children:o.map(m=>{const f=a===m.code;return r.jsx("li",{className:"min-w-0",children:r.jsx("button",{type:"button","aria-expanded":f,"aria-controls":`upsell-detail-${t.id}`,onClick:()=>l(x=>x===m.code?null:m.code),className:`inline-flex max-w-full items-center rounded-full border px-2.5 py-1 text-left text-xs font-medium transition focus:outline-none focus:ring-2 focus:ring-brand focus:ring-offset-1 ${f?"border-brand bg-brand text-white":"border-brand/25 bg-white text-slate-700 hover:border-brand hover:text-brand"}`,children:r.jsx("span",{className:"truncate",children:m.label})})},m.code)})}),u&&r.jsxs("div",{id:`upsell-detail-${t.id}`,className:"mt-2 rounded-lg border border-brand/15 bg-white/80 px-3 py-2 text-xs leading-relaxed text-slate-600 sm:text-sm",role:"region","aria-label":`Détail : ${u.label}`,children:[u.description&&r.jsx("p",{children:u.description}),r.jsxs("p",{className:`${u.description?"mt-1.5 ":""}font-semibold tabular-nums text-slate-900`,children:[x2(u),cm(u.config)&&r.jsxs(r.Fragment,{children:[" ",r.jsx(zd,{})]})]}),r.jsxs(V,{to:`/portail/projets/${t.id}/modifier#options`,className:"mt-2 inline-flex text-xs font-semibold text-brand hover:underline sm:text-sm",children:["Activer « ",u.label," »"]})]})]})}function y2(){const[t,s]=Hs(),[a,l]=g.useState([]),[o,u]=g.useState([]),[m,f]=g.useState(null),[x,h]=g.useState(!0),[v,b]=g.useState(null),[w,I]=g.useState(null),[z,E]=g.useState(null),_=g.useCallback(async()=>{const[C,M,O]=await Promise.all([nN(),Xd(),iN()]);return l(C),u(M.services),f(O),C},[]);g.useEffect(()=>{const C=t.get("checkout"),M=t.get("session_id");C==="success"?(E({type:"success",message:M?"Paiement reçu — activation de vos options en cours…":"Paiement reçu. L’activation de vos options est en cours — actualisez la page dans quelques secondes si besoin."}),t.delete("checkout"),t.delete("session_id"),s(t,{replace:!0}),M&&(async()=>{try{await oN(M);const W=(await _()).some(ae=>ae.pendingPaymentTotalCents>0);E({type:"success",message:W?"Paiement confirmé. Si certaines options restent inactives, actualisez dans quelques secondes.":"Paiement confirmé. Vos options sont activées."})}catch{await _()}}
302)()):C==="cancel"&&(E({type:"info",message:"Paiement annulé. Vos options restent en attente — vous pouvez réessayer quand vous voulez."}),t.delete("checkout"),s(t,{replace:!0}))},[_,t,s]),g.useEffect(()=>{_().finally(()=>h(!1))},[_]);const T=async C=>{var M,O;I(null),b(C);try{const W=await lN(C);window.location.href=W.sessionUrl}catch(W){const ae=(O=(M=W==null?void 0:W.response)==null?void 0:M.data)==null?void 0:O.message;I(ae??"Impossible de démarrer le paiement. Vérifiez vos coordonnées de facturation."),b(null)}};return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Mes annonces"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Suivez le statut de vos annonces, modifiez leur contenu ou activez des options de visibilité."})]}),r.jsx(V,{to:"/portail/projets/nouveau",className:"btn-primary",children:"Nouvelle annonce"})]}),z&&r.jsx("div",{className:z.type==="success"?"rounded-lg border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-900":"rounded-lg border border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-700",role:"status",children:z.message}),w&&r.jsxs("div",{className:"rounded-lg border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-800",role:"alert",children:[w," ",r.jsx(V,{to:"/portail/facturation",className:"font-medium underline",children:"Mettre à jour la facturation"})]}),x?r.jsx("p",{className:"text-slate-500",children:"Chargement…"}):a.length===0?r.jsxs("div",{className:"card p-8 text-center text-slate-600",children:["Aucune annonce pour le moment."," ",r.jsx(V,{to:"/portail/projets/nouveau",className:"font-medium text-brand hover:underline",children:"Déposer votre première annonce"})]}):r.jsx("div",{className:"space-y-4",children:a.map(C=>{var M;return r.jsxs("article",{className:"card p-5",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:C.title}),r.jsx(x0,{statuses:C.displayStatuses??[C.displayStatus]})]}),r.jsxs("p",{className:"mt-1 text-sm text-slate-500",children:["/projets/",C.slug]}),C.status==="rejected"&&C.moderationNotes&&r.jsxs("p",{className:"mt-2 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-800",children:["Motif du rejet : ",C.moderationNotes]}),C.status==="pending_review"&&r.jsx("p",{className:"mt-2 text-sm text-amber-700",children:"Votre annonce est en cours de vérification et n’est pas encore publique."}),r.jsxs("p",{className:"mt-1 text-xs text-slate-400",children:["Déposée le ",xx(C.createdAt),C.updatedAt!==C.createdAt&&` · Modifiée le ${xx(C.updatedAt)}`]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[((M=C.aiOptimization)==null?void 0:M.available)&&C.canEdit&&r.jsx(V,{to:`/portail/projets/${C.id}/modifier#ia`,className:"btn-primary",children:"Optimiser avec l’IA"}),C.matchingEnabled&&r.jsx(V,{to:`/portail/projets/${C.id}/matching`,className:"btn-primary",children:"Sponsors suggérés"}),C.canEdit&&r.jsx(V,{to:`/portail/projets/${C.id}/modifier`,className:"btn-secondary",children:"Modifier"})]})]}),r.jsx(h2,{project:C}),r.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:r.jsx(il,{isPremiumListing:C.isPremiumListing,isFeatured:C.isFeatured,isUrgent:C.isUrgent,matchingEnabled:C.matchingEnabled})}),C.pendingPaymentTotalCents>0&&r.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[r.jsxs("p",{className:"text-sm text-orange-700",children:["Options en attente de paiement : ",(C.pendingPaymentTotalCents/100).toFixed(2)," €"]}),m!=null&&m.enabled?r.jsx("button",{type:"button",className:"btn-primary text-sm",disabled:v===C.id,onClick:()=>void T(C.id),children:v===C.id?"Redirection…":"Payer par carte"}):r.jsx("p",{className:"text-sm text-slate-500",children:"Activation après validation du paiement par l’équipe."})]}),(()=>{const O=f2(C,o);return O.length===0?null:r.jsx("ul",{className:"mt-3 space-y-1 text-sm text-slate-600",children:O.map(W=>r.jsxs("li",{className:"flex flex-wrap items-center gap-2",children:[r.jsx("span",{children:W.label}),W.isOffered&&r.jsx(g0,{showLabel:!1}),r.jsx("span",{className:"text-slate-400",children:"—"}),r.jsx("span",{children:W.statusLabel})]},W.code))})})(),r.jsx(g2,{project:C,services:o}),r.jsx("p",{className:"mt-3 line-clamp-3 text-sm text-slate-600",children:lc(C.description)})]},C.id)})})]})}function um({onComplete:t,idPrefix:s,showIncompleteBanner:a=!0,compact:l=!1}){const o=g.useId(),u=s??o,{user:m}=qn(),[f,x]=g.useState(!0),[h,v]=g.useState(!1),[b,w]=g.useState(!1),[I,z]=g.useState(null),[E,_]=g.useState(null),[T,C]=g.useState(""),[M,O]=g.useState(""),[W,ae]=g.useState(""),[ge,De]=g.useState(""),[Ne,G]=g.useState(""),[ke,Y]=g.useState(""),[fe,Ee]=g.useState(""),[le,Te]=g.useState("FR");g.useEffect(()=>{rc().then(N=>{const F=N.billing;w(N.isComplete),C(F.firstName??""),O(F.lastName??""),ae(F.organization??""),De(F.addressLine1??""),G(F.addressLine2??""),Y(F.postalCode??""),Ee(F.city??""),Te(F.country??"FR")}).catch(()=>z("Impossible de charger vos coordonnées de facturation.")).finally(()=>x(!1))},[]);const Fe=async()=>
302{if(!T.trim()||!M.trim()||!ge.trim()||!ke.trim()||!fe.trim()||!le.trim()){z("Vérifiez les champs obligatoires.");return}v(!0),z(null),_(null);try{const N=await mN({firstName:T,lastName:M,organization:W||null,addressLine1:ge,addressLine2:Ne||null,postalCode:ke,city:fe,country:le});w(N.isComplete),N.isComplete?(_("Coordonnées de facturation enregistrées."),t==null||t()):z("Profil encore incomplet. Vérifiez les champs obligatoires.")}catch{z("Impossible d'enregistrer vos coordonnées. Vérifiez les champs obligatoires.")}finally{v(!1)}},Z=async N=>{N.preventDefault(),N.stopPropagation(),await Fe()},oe=N=>{N.key==="Enter"&&(N.preventDefault(),Fe())};if(f)return r.jsx("p",{className:"text-sm text-slate-500",children:"Chargement des coordonnées…"});const Q=r.jsxs(r.Fragment,{children:[r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:`${u}-email`,children:"Adresse e-mail"}),r.jsx("input",{id:`${u}-email`,type:"email",className:"input-field bg-slate-50",value:(m==null?void 0:m.email)??"",readOnly:!0,"aria-readonly":"true"}),r.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Adresse e-mail de votre compte (non modifiable)."})]}),r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:`${u}-firstName`,children:"Prénom *"}),r.jsx("input",{id:`${u}-firstName`,className:"input-field",value:T,onChange:N=>C(N.target.value),onKeyDown:l?oe:void 0,required:!0})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:`${u}-lastName`,children:"Nom *"}),r.jsx("input",{id:`${u}-lastName`,className:"input-field",value:M,onChange:N=>O(N.target.value),onKeyDown:l?oe:void 0,required:!0})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:`${u}-organization`,children:"Structure / association"}),r.jsx("input",{id:`${u}-organization`,className:"input-field",value:W,onChange:N=>ae(N.target.value),onKeyDown:l?oe:void 0,placeholder:"Nom de l'association, de l'entreprise ou du porteur de projet"}),r.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Recommandé si vous facturez au nom d'une structure."})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:`${u}-addressLine1`,children:"Adresse *"}),r.jsx("input",{id:`${u}-addressLine1`,className:"input-field",value:ge,onChange:N=>De(N.target.value),onKeyDown:l?oe:void 0,required:!0})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:`${u}-addressLine2`,children:"Complément d'adresse"}),r.jsx("input",{id:`${u}-addressLine2`,className:"input-field",value:Ne,onChange:N=>G(N.target.value),onKeyDown:l?oe:void 0})]}),r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:`${u}-postalCode`,children:"Code postal *"}),r.jsx("input",{id:`${u}-postalCode`,className:"input-field",value:ke,onChange:N=>Y(N.target.value),onKeyDown:l?oe:void 0,required:!0})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:`${u}-city`,children:"Ville *"}),r.jsx("input",{id:`${u}-city`,className:"input-field",value:fe,onChange:N=>Ee(N.target.value),onKeyDown:l?oe:void 0,required:!0})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:`${u}-country`,children:"Pays *"}),r.jsx("input",{id:`${u}-country`,className:"input-field",value:le,onChange:N=>Te(N.target.value.toUpperCase()),onKeyDown:l?oe:void 0,maxLength:2,required:!0})]}),I&&r.jsx("p",{className:"text-sm text-red-600",children:I}),E&&r.jsx("p",{className:"text-sm text-brand",children:E}),l?r.jsx("button",{type:"button",className:"btn-primary",disabled:h,onClick:()=>void Fe(),children:h?"Enregistrement…":"Enregistrer mes coordonnées"}):r.jsx("button",{type:"submit",className:"btn-primary",disabled:h,children:h?"Enregistrement…":"Enregistrer mes coordonnées"})]});return r.jsxs("div",{className:"space-y-4",children:[a&&!b&&r.jsx("div",{className:"rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-900",children:"Votre profil de facturation est incomplet. Renseignez tous les champs obligatoires pour pouvoir souscrire à des options payantes."}),l?r.jsx("div",{className:"space-y-4",children:Q}):r.jsx("form",{onSubmit:Z,className:"card space-y-4 p-6",children:Q})]})}function gr({label:t,kind:s,value:a,onChange:l,accept:o,placeholder:u}){const[m,f]=g.useState("url"),[x,h]=g.useState(!1),[v,b]=g.useState(null),[w,I]=g.useState(null),z=async _=>{if(_){h(!0),b(null);try{const T=await gg(s,_);l(T.url),I(_.name)}catch{b("Impossible de téléverser le fichier. Vérifiez le format et la taille.")}finally{h(!1)}}},E=s==="logo"||s==="image";return r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsx("label",{className:"text-sm font-medium text-slate-700",children:t}),r.jsxs("div",{className:"inline-flex rounded-lg border border-slate-200 p-0.5 text-xs",children:[r.jsx("button",{type:"button",className:`rounded-md px-2.5 py-1 font-medium transition ${m==="url"?"bg-brand text-white":"text-slate-600 hover:text-slate-900"}`,onClick:()=>f("url"),children:"URL"}),r.jsx("button",{type:"button",className:`rounded-md px-2.5 py-1 font-medium transition ${m==="upload"?"bg-brand text-white":"text-slate-600 hover:text-slate-900"}`,onClick:()=>f("upload"),children:"Fichier"})]})]}),m==="url"?r.jsx("input",{className:"input-field",value:a,onChange:_=>l(_.target.value),placeholder:u??"https://..."}):r.jsxs("div",{className:"space-y-2",children:[r.jsx("input",{type:"file",className:"block w-full text-sm text-slate-600 file:mr-3 file:rounded-lg file:border-0 file:bg-brand/10 file:px-3 file:py-2 file:text-sm file:font-medium file:text-brand hover:file:bg-brand/20",accept:o,disabled:x,onChange:_=>{var T;return void z((T=_.target.files)==null?void 0:T[0])}}),x&&r.jsx("p",{className:"text-sm text-slate-500",children:"Téléversement en cours…"}),w&&a&&r.jsxs("p",{className:"text-sm text-brand",children:["Fichier enregistré : ",w]}),v&&r.jsx("p",{className:"text-sm text-red-600",children:v})]}),a&&E&&r.jsx("img",{src:a,alt:"",className:"h-20 w-20 rounded-lg border border-slate-200 object-cover"}),a&&s==="dossier"&&r.jsx("a",{href:a,target:"_blank",rel:"noreferrer",className:"text-sm font-medium text-brand hover:underline",children:"Voir le dossier téléversé"})]})}const v2=[{title:"Annonce de base gratuite",text:"Déposez votre projet sans frais : description, illustration, budget, région et catégories sont inclus. Seul le logo reste une option payante."},{title:"Vérification avant publication",text:"Les annonces gratuites passent par une vérification automatique avant d’être visibles. Les options payantes s’activent après règlement."},{title:"Options de mise en avant",text:"Visibilité, enrichissement et matching sponsor : chaque option ou pack a un tarif clairement indiqué."},{title:"Facturation si options",text:"Dès qu’une option payante est choisie, vos coordonnées de facturation sont requises pour activer le service."}],Wo={packs:"Pack d’options",promotion:"Visibilité & mise en avant",enhancement:"Enrichissement de l’annonce",matching:"Matching sponsor"},b2={promotion:"visibilité / mise en avant",enhancement:"enrichissement",matching:"matching"},gx=["promotion","enhancement","matching"],Go="packs";function j2(t){return new Intl.NumberFormat("fr-FR",{style:"currency",currency:"EUR"}).format(t/100)}const yx=[...Pw],vx=[...Tw],N0=Rw;function No(t){return`${(t/100).toFixed(2)} €`}function Zo(t){return b2[t]??t}function w0(t){return/^[aeiouàâäéèêëïîôùûüy]/i.test(t)?`l’${t}`:`le ${t}`}function N2(t){return`Remise −${t.discountPercent} % sur ${w0(Zo(t.targetCategory))} : présence d’une option de ${Zo(t.triggerCategory)}.`}function w2(t){return`Bon à savoir : ajoutez une option de ${Zo(t.triggerCategory)} pour bénéficier de −${t.discountPercent} % sur ${w0(Zo(t.targetCategory))}.`}function S0({services:t,selectedServices:s,onToggle:a,subscribedCodes:l=[],offeredCodes:o=[],billingComplete:u=!0,pitchByCode:m={},pricingRules:f=[]}){const x=new Map(t.map(O=>[O.code,O.label])),h=mc(s,t),v=j0(t,s,f,l),b=v.totalCents,w=b>0&&!u,I=t.find(O=>(O.discountPercent??0)>0),z=t.filter(Sr),E=t.filter(O=>!Sr(O)),_=[];for(const O of gx){const W=E.filter(ae=>(ae.category||"promotion")===O);W.length!==0&&_.push({category:O,label:Wo[O]??O,items:W})}z.length>0&&_.push({category:Go,label:Wo[Go],items:z});const T=E.filter(O=>!gx.includes(O.category));T.length>0&&_.push({category:"other",label:"Autres options",items:T});const C=O=>{l.includes(O)||a(O)},M=O=>{const W=O.listPriceCents??O.priceCents,ae=W>O.priceCents,ge=s.includes("premium_listing")||h.has("premium_listing"),De=l.includes("premium_listing"),Ne=O.code===N0&&(ge||De),G=h.has(O.code),ke=l.includes(O.code),Y=ke&&o.includes(O.code),fe=ke||Ne||G,Ee=s.includes(O.code)||ke||G,le=O.description??m[O.code],Te=cm(O.config),Fe=ti(O.config),Z=v.prices.get(O.code)??O.priceCents,oe=Z<O.priceCents;return r.jsxs("label",{className:`flex items-start gap-3 rounded-xl border p-4 ${fe?Y?"cursor-not-allowed border-violet-100 bg-violet-50/60":"cursor-not-allowed border-slate-100 bg-slate-50 opacity-70":Ee?"cursor-pointer border-brand bg-brand/5":"cursor-pointer border-slate-200"}`,children:[r.jsx("input",{type:"checkbox",className:"mt-1",checked:Ee,disabled:fe,onChange:()=>C(O.code)}),r.jsxs("span",{className:"flex-1",children:[r.jsxs("span",{className:"flex flex-wrap items-center gap-2 font-medium text-slate-900",children:[O.label,Y&&r.jsx(g0,{}),Ne&&r.jsx("span",{className:"text-xs font-normal text-slate-500",children:"(inclus dans le pack visibilité premium)"}),G&&r.jsx("span",{className:"text-xs font-normal text-slate-500",children:"(inclus dans le pack sélectionné)"}),ke&&!Y&&!Ne&&r.jsx("span",{className:"text-xs font-normal text-slate-500",children:"(déjà souscrit)"})]}),(le||O.description)&&r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:le??O.description}),Fe.length>0&&r.jsxs("p",{className:"mt-1 text-xs text-slate-500",children:["Inclut : ",Fe.map(Q=>
302x.get(Q)??Q).join(", ")]})]}),r.jsx("span",{className:"text-right text-sm font-semibold text-slate-900",children:Y?r.jsx("span",{className:"text-violet-700",children:"Offerte"}):Z===0?"Gratuit":oe||ae?r.jsxs("span",{className:"inline-flex flex-col items-end gap-0.5",children:[r.jsx("span",{className:"text-xs font-normal text-slate-400 line-through",children:No(W)}),r.jsx("span",{children:No(Z)}),Te&&r.jsx(zd,{className:"font-normal"})]}):r.jsxs("span",{className:"inline-flex flex-col items-end gap-0.5",children:[r.jsx("span",{children:No(O.priceCents)}),Te&&r.jsx(zd,{className:"font-normal"})]})})]},O.code)};return r.jsxs("div",{className:"space-y-4",children:[I&&r.jsxs("div",{className:"rounded-xl border border-violet-200 bg-violet-50 p-3 text-sm text-violet-900",children:["Palier ",r.jsx("strong",{children:I.contributorTierName})," :"," ",r.jsxs("strong",{children:["−",I.discountPercent,"%"]})," appliqué sur les options payantes."]}),r.jsx("div",{className:"space-y-6",children:_.map(O=>r.jsxs("div",{className:"space-y-3",children:[r.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-slate-500",children:O.label}),r.jsx("div",{className:"space-y-3",children:O.items.map(M)})]},O.category))}),(b>0||v.appliedRules.length>0||v.upsellRules.length>0)&&r.jsxs("div",{className:"space-y-2",children:[b>0&&r.jsxs("p",{className:"text-sm font-medium text-slate-700",children:["Total options sélectionnées : ",No(b)]}),v.appliedRules.map(O=>r.jsx("div",{className:"rounded-xl border border-emerald-200 bg-emerald-50 p-3 text-sm text-emerald-800",children:N2(O)},`applied-${O.triggerCategory}-${O.targetCategory}-${O.discountPercent}`)),v.upsellRules.map(O=>r.jsxs("div",{className:"flex gap-2.5 rounded-xl border border-sky-200 bg-sky-50 p-3 text-sm text-sky-950",children:[r.jsx(Fb,{className:"mt-0.5 h-4 w-4 shrink-0 text-sky-600","aria-hidden":!0}),r.jsx("p",{children:w2(O)})]},`upsell-${O.triggerCategory}-${O.targetCategory}-${O.discountPercent}`))]}),w&&r.jsx("div",{className:"rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-900",children:"Des options payantes sont sélectionnées. Renseignez vos coordonnées de facturation ci-dessous pour continuer."})]})}function _0(t,s,a=[]){if(t.includes(s))return t.filter(u=>u!==s);let l;yx.includes(s)?l=[...t.filter(u=>!yx.includes(u)),s]:vx.includes(s)?l=[...t.filter(u=>!vx.includes(u)),s]:l=[...t,s];const o=a.some(u=>l.includes(u.code)&&Sr(u)&&ti(u.config).includes("premium_listing"));return(l.includes("premium_listing")||o)&&(l=l.filter(u=>u!==N0)),l}function C0(t,s,a=[],l=[]){return j0(t,s,a??[],l).totalCents}function dm({compact:t=!1,className:s=""}){return r.jsxs("div",{className:s,children:[!t&&r.jsxs("div",{className:"mb-4",children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Conditions de mise en ligne"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Transparentes avant inscription comme au moment du dépôt."})]}),r.jsx("ul",{className:`grid gap-3 ${t?"":"sm:grid-cols-2"}`,children:v2.map(a=>r.jsxs("li",{className:"rounded-xl border border-slate-200 bg-white px-4 py-3",children:[r.jsx("p",{className:"text-sm font-semibold text-slate-900",children:a.title}),r.jsx("p",{className:"mt-1 text-sm leading-relaxed text-slate-600",children:a.text})]},a.title))})]})}function S2({services:t,loading:s=!1,className:a=""}){if(s)return r.jsx("p",{className:`text-sm text-slate-500 ${a}`,children:"Chargement des tarifs…"});if(t.length===0)return r.jsx("p",{className:`text-sm text-slate-500 ${a}`,children:"Les tarifs des options seront affichés dès qu’ils seront disponibles."});const l=(h,v)=>(h.sortOrder??Number.MAX_SAFE_INTEGER)-(v.sortOrder??Number.MAX_SAFE_INTEGER)||h.label.localeCompare(v.label,"fr"),o=t.filter(Sr).slice().sort(l),m=t.filter(h=>!Sr(h)).reduce((h,v)=>{const b=v.category||"promotion";return h[b]||(h[b]=[]),h[b].push(v),h},{}),f=Object.keys(m).sort((h,v)=>{const b=Math.min(...m[h].map(z=>z.sortOrder??Number.MAX_SAFE_INTEGER)),w=Math.min(...m[v].map(z=>z.sortOrder??Number.MAX_SAFE_INTEGER)),I=["promotion","enhancement","matching"];return b!==w?b-w:I.indexOf(h)-I.indexOf(v)}),x=[];for(const h of f)x.push({key:h,label:Wo[h]??h,items:(m[h]??[]).slice().sort(l)});return o.length>0&&x.push({key:Go,label:Wo[Go],items:o}),r.jsx("div",{className:`space-y-8 ${a}`,children:x.map(h=>r.jsxs("div",{children:[r.jsx("h3",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-slate-500",children:h.label}),r.jsx("ul",{className:"divide-y divide-slate-100 overflow-hidden rounded-xl border border-slate-200 bg-white",children:h.items.map(v=>{const b=v.description??c2[v.code],w=cm(v.config),I=ti(v.config);return r.jsxs("li",{className:"flex flex-col gap-2 px-4 py-4 sm:flex-row sm:items-start sm:justify-between sm:gap-6",children:[r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsxs("p",{className:"flex flex-wrap items-center gap-2 font-medium text-slate-900",children:[v.label,w&&r.jsx(o2,{})]}),b&&r.jsx("p",{className:"mt-1 text-sm leading-relaxed text-slate-600",children:b}),I.length>0&&r.jsxs("p",{className:"mt-1 text-xs text-slate-500",children:["Inclut :"," ",I.map(z=>{var E;return((E=t.find(_=>_.code===z))==null?void 0:E.label)??z}
302).join(", ")]})]}),r.jsx("p",{className:"shrink-0 text-sm font-semibold text-slate-900 sm:pt-0.5",children:v.priceCents===0?"Gratuit":j2(v.priceCents)})]},v.code)})})]},h.key))})}function _2(){const t=Bn(),[s,a]=g.useState([]),[l,o]=g.useState([]),[u,m]=g.useState([]),[f,x]=g.useState([]),[h,v]=g.useState(""),[b,w]=g.useState(""),[I,z]=g.useState(!1),[E,_]=g.useState(""),[T,C]=g.useState(""),[M,O]=g.useState(""),[W,ae]=g.useState([]),[ge,De]=g.useState(""),[Ne,G]=g.useState(""),[ke,Y]=g.useState(""),[fe,Ee]=g.useState([]),[le,Te]=g.useState(!1),[Fe,Z]=g.useState(null),[oe,Q]=g.useState(null),[N,F]=g.useState(!0);g.useEffect(()=>{Promise.all([Xd(),Jd(),em(),rc()]).then(([Ue,nt,yt,Le])=>{a(Ue.services),o(Ue.pricingRules),m(nt),x(yt),F(Le.isComplete)})},[]);const we=g.useMemo(()=>mc(fe,s),[fe,s]),te=fe.includes("ai_title_slug")||we.has("ai_title_slug");g.useEffect(()=>{if(E.trim().length<10){w("");return}const Ue=window.setTimeout(()=>{fh(E,I).then(nt=>{w(nt.slug)}).catch(()=>w(""))},400);return()=>window.clearTimeout(Ue)},[E,I]);const Be=fe.includes("logo_image")||we.has("logo_image"),pe=fe.includes("dossier_deposit")||we.has("dossier_deposit"),Oe=g.useMemo(()=>C0(s,fe,l),[s,fe,l])>0&&!N,We=async()=>{if(E.trim().length<10)return;const Ue=await fh(E,I);v(Ue.title),w(Ue.slug)},tt=async Ue=>{if(Ue.preventDefault(),Z(null),Q(null),Oe){Z("Complétez vos coordonnées de facturation avant de souscrire à des options payantes.");return}Te(!0);try{const yt=(await rN({title:h||void 0,description:E,budget:T?Number(T):void 0,regionId:M||void 0,categoryIds:W.length?W:void 0,logoUrl:ge||void 0,imageUrl:Ne||void 0,dossierUrl:ke||void 0,serviceCodes:fe,useAiTitleSlug:te,slugAnonymous:I})).pendingPaymentTotalCents;yt>0?Q(`Annonce créée. Options premium : ${(yt/100).toFixed(2)} € en attente — réglez-les depuis « Mes annonces » (Payer par carte).`):Q("Annonce enregistrée : elle est en cours de vérification et sera publiée après validation."),setTimeout(()=>t("/portail/projets"),1500)}catch{Z("Impossible de publier le projet. Vérifiez les champs, vos coordonnées de facturation et les options sélectionnées.")}finally{Te(!1)}};return r.jsxs("div",{className:"mx-auto max-w-3xl space-y-6",children:[r.jsxs("div",{children:[r.jsx(V,{to:"/portail",className:"text-sm font-medium text-brand hover:underline",children:"← Retour à mon espace"}),r.jsx("h1",{className:"mt-3 text-2xl font-bold text-slate-900",children:"Déposer un projet"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Publication gratuite soumise à vérification automatique avant mise en ligne. Les options payantes seront activées après enregistrement du paiement."})]}),r.jsx(dm,{compact:!0,className:"rounded-xl border border-slate-200 bg-slate-50 p-4"}),r.jsxs("form",{onSubmit:tt,className:"space-y-6",children:[r.jsxs("section",{className:"card space-y-4 p-6",children:[r.jsx("h2",{className:"font-semibold text-slate-900",children:"Votre projet"}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"description",children:"Description *"}),r.jsx("textarea",{id:"description",className:"input-field min-h-[140px]",value:E,onChange:Ue=>_(Ue.target.value),required:!0,minLength:10})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[r.jsxs("label",{className:"text-sm font-medium text-slate-700",htmlFor:"title",children:["Titre ",te?"(provisoire — boutons IA après paiement)":"*"]}),te&&r.jsx("button",{type:"button",className:"text-sm font-medium text-brand hover:underline",onClick:We,children:"Suggestion provisoire"})]}),r.jsx("input",{id:"title",className:"input-field",value:h,onChange:Ue=>v(Ue.target.value),required:!0})]}),r.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-4",children:[r.jsxs("label",{className:"flex items-start gap-3 text-sm text-slate-700",children:[r.jsx("input",{type:"checkbox",className:"mt-0.5",checked:I,onChange:Ue=>z(Ue.target.checked)}),r.jsxs("span",{children:[r.jsx("span",{className:"font-medium text-slate-900",children:"Rester anonyme dans l'URL"}),r.jsx("span",{className:"mt-1 block text-slate-600",children:"Par défaut, l'URL inclut le nom de votre structure (association, entreprise) ou vos nom et prénom pour améliorer le référencement. Cochez cette case pour n'utiliser que le titre du projet."})]})]}),b&&r.jsxs("p",{className:"mt-3 text-sm text-slate-600",children:["Aperçu URL : ",r.jsxs("span",{className:"font-mono text-brand",children:["/projets/",b]})]})]}),r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"budget",children:"Budget (€)"}),r.jsx("input",{id:"budget",type:"number",min:0,className:"input-field",value:T,onChange:Ue=>C(Ue.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"region",children:"Région"}),r.jsxs("select",{id:"region",className:"input-field",value:M,onChange:Ue=>O(Ue.target.value),children:[r.jsx("option",{value:"",children:"—"}),f.map(Ue=>
302r.jsxs("option",{value:Ue.id,children:[Ue.name," (CP ",Ue.code,")"]},Ue.id))]})]})]}),u.length>0&&r.jsxs("div",{children:[r.jsx("label",{className:"mb-2 block text-sm font-medium text-slate-700",children:"Catégories"}),r.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(Ue=>{const nt=W.includes(Ue.id);return r.jsxs("label",{className:`cursor-pointer rounded-full border px-3 py-1 text-sm ${nt?"border-brand bg-brand/10 text-brand":"border-slate-200"}`,children:[r.jsx("input",{type:"checkbox",className:"sr-only",checked:nt,onChange:()=>ae(yt=>nt?yt.filter(Le=>Le!==Ue.id):[...yt,Ue.id])}),Ue.name]},Ue.id)})})]})]}),r.jsxs("section",{className:"card space-y-4 p-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"font-semibold text-slate-900",children:"Options de mise en avant"}),r.jsxs("p",{className:"mt-1 text-sm text-slate-600",children:["Facultatives. Chaque tarif ci-dessous correspond à une activation après paiement."," ",r.jsx(V,{to:"/publier",className:"font-medium text-brand hover:underline",children:"Voir le détail public des conditions"})]})]}),r.jsx(S0,{services:s,selectedServices:fe,onToggle:Ue=>Ee(nt=>_0(nt,Ue,s)),billingComplete:N,pricingRules:l}),Oe&&r.jsxs("div",{className:"border-t border-slate-100 pt-4",children:[r.jsx("h3",{className:"font-semibold text-slate-900",children:"Coordonnées de facturation"}),r.jsx("p",{className:"mt-1 mb-4 text-sm text-slate-600",children:"Obligatoires pour activer les options payantes. Vous restez sur cette page."}),r.jsx(um,{idPrefix:"create-billing",compact:!0,showIncompleteBanner:!1,onComplete:()=>{F(!0),Z(null)}})]})]}),r.jsxs("section",{className:"card space-y-4 p-6",children:[r.jsx("h2",{className:"font-semibold text-slate-900",children:"Médias"}),r.jsx("p",{className:"text-sm text-slate-600",children:"L’illustration est gratuite et recommandée pour valoriser votre projet. Le logo reste une option payante."}),r.jsx(gr,{label:"Image d'illustration (gratuite)",kind:"image",value:Ne,onChange:G,accept:"image/jpeg,image/png,image/webp,image/gif",placeholder:"https://exemple.fr/illustration.jpg"}),Be&&r.jsx(gr,{label:"Logo (option payante)",kind:"logo",value:ge,onChange:De,accept:"image/jpeg,image/png,image/webp,image/gif",placeholder:"https://exemple.fr/logo.png"}),pe&&r.jsx(gr,{label:"Dossier de sponsoring",kind:"dossier",value:ke,onChange:Y,accept:".pdf,.doc,.docx,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",placeholder:"https://exemple.fr/dossier.pdf"})]}),Fe&&r.jsx("p",{className:"text-sm text-accent-red",children:Fe}),oe&&r.jsx("p",{className:"text-sm text-brand",children:oe}),r.jsx("button",{type:"submit",className:"btn-primary",disabled:le||Oe,children:le?"Publication…":"Publier mon projet"})]})]})}function C2({projectId:t,status:s,canEdit:a,onUpdated:l}){const[o,u]=g.useState(!1),[m,f]=g.useState(null),x=s==="published";if(!(a&&(x||s==="requested_offline")))return null;const b=async()=>{const w=x?"requested_offline":"published";if(window.confirm(x?"Votre annonce ne sera plus visible dans la recherche publique. Continuer ?":"Votre annonce sera à nouveau visible dans la recherche publique. Continuer ?")){u(!0),f(null);try{const z=await xg(t,{status:w});l(z)}catch(z){f(Va(z,"Impossible de modifier la diffusion."))}finally{u(!1)}}};return r.jsxs("section",{className:"card space-y-3 p-6",children:[r.jsx("h2",{className:"font-semibold text-slate-900",children:"Diffusion publique"}),r.jsxs("p",{className:"text-sm text-slate-600",children:["Statut actuel :"," ",r.jsx("span",{className:`font-medium ${x?"text-emerald-700":"text-slate-700"}`,children:x?"En ligne":"Hors ligne"})]}),r.jsx("p",{className:"text-sm text-slate-500",children:x?"Votre annonce est visible dans la recherche publique.":"Votre annonce n’apparaît plus dans la recherche publique."}),m&&r.jsx("p",{className:"text-sm text-red-600",children:m}),r.jsx("button",{type:"button",className:x?"btn-secondary":"btn-primary",disabled:o,onClick:()=>void b(),children:o?"Mise à jour…":x?"Arrêter la diffusion":"Remettre en ligne"})]})}function k2({rewards:t,services:s,selections:a,onSelect:l}){if(t.length===0)return null;const o=t.reduce((u,m)=>{const f=u.get(m.tierId);return f?(f.options.push(m),u):(u.set(m.tierId,{tierId:m.tierId,tierName:m.tierName,rewardLabel:m.rewardLabel,minPoints:m.minPoints,options:[m]}),u)},new Map);return r.jsxs("div",{className:"space-y-4 rounded-xl border border-violet-200 bg-vi
302olet-50/60 p-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-violet-900",children:"Récompenses Programme Contributeur"}),r.jsx("p",{className:"mt-1 text-sm text-violet-800/90",children:"Activez gratuitement une option sur cette annonce grâce à vos points validés. Chaque palier ne peut être utilisé qu'une seule fois sur votre compte."})]}),[...o.values()].map(u=>r.jsxs("div",{className:"rounded-xl border border-violet-100 bg-white p-4",children:[r.jsxs("div",{className:"mb-3",children:[r.jsx("p",{className:"font-medium text-slate-900",children:u.tierName}),r.jsx("p",{className:"text-sm text-slate-600",children:u.rewardLabel}),r.jsxs("p",{className:"mt-1 text-xs text-violet-700",children:[u.minPoints," points requis"]})]}),r.jsx("div",{className:"space-y-2",children:u.options.map(m=>{var h;const f=((h=s.find(v=>v.code===m.serviceCode))==null?void 0:h.label)??m.serviceCode,x=a[u.tierId]===m.serviceCode;return r.jsxs("label",{className:`flex cursor-pointer items-start gap-3 rounded-lg border p-3 ${x?"border-violet-300 bg-violet-50":"border-slate-200"}`,children:[r.jsx("input",{type:"radio",name:`contributor-reward-${u.tierId}`,className:"mt-1",checked:x,onChange:()=>l(u.tierId,m.serviceCode)}),r.jsxs("span",{className:"flex-1",children:[r.jsx("span",{className:"font-medium text-slate-900",children:f}),r.jsx("span",{className:"mt-1 block text-sm text-violet-700",children:"Gratuit — Programme Contributeur"})]})]},`${u.tierId}-${m.serviceCode}`)})})]},u.tierId))]})}function E2(t){return Object.entries(t).map(([s,a])=>({tierId:s,serviceCode:a}))}function T2(){const{id:t}=_r(),s=Bn(),[a,l]=g.useState(!0),[o,u]=g.useState(!1),[m,f]=g.useState(!1),[x,h]=g.useState(null),[v,b]=g.useState(null),[w,I]=g.useState(null),[z,E]=g.useState(null),[_,T]=g.useState(""),[C,M]=g.useState(""),[O,W]=g.useState(["published"]),[ae,ge]=g.useState(null),[De,Ne]=g.useState("published"),[G,ke]=g.useState(""),[Y,fe]=g.useState(""),[Ee,le]=g.useState(""),[Te,Fe]=g.useState([]),[Z,oe]=g.useState(""),[Q,N]=g.useState(""),[F,we]=g.useState(""),[te,Be]=g.useState(!0),[pe,q]=g.useState([]),[Oe,We]=g.useState([]),[tt,Ue]=g.useState([]),[nt,yt]=g.useState([]),[Le,ut]=g.useState([]),[ue,dt]=g.useState([]),[mt,Et]=g.useState([]),[Ht,vt]=g.useState([]),[Wt,es]=g.useState({}),[ps,B]=g.useState(!0),[J,Pe]=g.useState(null),[rt,Jt]=g.useState(null),[xn,Ut]=g.useState(null),[ts,rn]=g.useState(null),[Pn,an]=g.useState(null),Es=Object.keys(Wt).length,fs=g.useMemo(()=>mc(Le,tt),[Le,tt]),hs=Le.includes("logo_image")||ue.includes("logo_image")||fs.has("logo_image"),ns=Le.includes("dossier_deposit")||ue.includes("dossier_deposit")||fs.has("dossier_deposit"),Ts=Le.includes("ai_title_slug")||fs.has("ai_title_slug"),ln=g.useMemo(()=>new Set(Ht.map(re=>re.serviceCode)),[Ht]),on=g.useMemo(()=>tt.filter(re=>!ln.has(re.code)),[tt,ln]),Ws=on.some(re=>!ue.includes(re.code)),Gs=hs||ns,Ps=g.useMemo(()=>C0(tt,Le,nt,ue),[tt,Le,nt,ue])>0&&!ps;g.useEffect(()=>{t&&Promise.all([sN(t),Jd(),em(),Xd(),rc(),cN(t).catch(()=>null)]).then(([re,Ze,Xe,bt,Ot,kr])=>{T(re.title),M(re.slug),W(re.displayStatuses??[re.displayStatus]),ge(re.moderationNotes??null),Ne(re.status),ke(re.description),fe(re.budget!=null?String(re.budget):""),le(re.regionId??""),Fe(re.categoryIds??[]),oe(re.logoUrl??""),N(re.imageUrl??""),we(re.dossierUrl??""),Be(re.canEdit),dt(fx(re.orders,re)),Et(px(re,re.orders)),vt(re.contributorRewards??[]),q(Ze),We(Xe),Ue(bt.services),yt(bt.pricingRules),B(Ot.isComplete),Pe(kr??(re.aiOptimization?{orderId:re.aiOptimization.orderId,available:re.aiOptimization.available,titleCreditsLeft:re.aiOptimization.titleCreditsLeft,descriptionCreditsLeft:re.aiOptimization.descriptionCreditsLeft,titleCreditsTotal:re.aiOptimization.titleCreditsTotal,descriptionCreditsTotal:re.aiOptimization.descriptionCreditsTotal}:null))}).catch(()=>h("Impossible de charger l'annonce.")).finally(()=>l(!1))},[t]),g.useEffect(()=>{var re;a||window.location.hash==="#ia"&&((re=document.getElementById("ia"))==null||re.scrollIntoView({behavior:"smooth",block:"start"}))},[a]);const Zs=(re,Ze)=>{Pe(Xe=>
302Xe&&{...Xe,titleCreditsLeft:re,descriptionCreditsLeft:Ze,available:re>0||Ze>0})},xs=async()=>{var re,Ze;if(!(!t||!te)){Ut(null),Jt("title");try{const Xe=await hh(t,{target:"title"});rn({target:"title",value:Xe.suggestion}),Zs(Xe.titleCreditsLeft,Xe.descriptionCreditsLeft)}catch(Xe){const bt=(Ze=(re=Xe==null?void 0:Xe.response)==null?void 0:re.data)==null?void 0:Ze.message;Ut(bt??"Impossible de générer un titre IA.")}finally{Jt(null)}}},gs=async re=>{var Ze,Xe;if(!(!t||!te)){Ut(null),Jt(re);try{const bt=await hh(t,{target:"description",mode:re});an({target:"description",value:bt.suggestion}),Zs(bt.titleCreditsLeft,bt.descriptionCreditsLeft)}catch(bt){const Ot=(Xe=(Ze=bt==null?void 0:bt.response)==null?void 0:Ze.data)==null?void 0:Xe.message;Ut(Ot??"Impossible de générer une description IA.")}finally{Jt(null)}}},Ft=async re=>{var Xe,bt;if(!t)return;const Ze=re==="title"?ts:Pn;if(Ze){Ut(null);try{const Ot=await uN(t,{target:re,value:Ze.value});re==="title"&&Ot.title&&Ot.slug?(T(Ot.title),M(Ot.slug),rn(null),I("Titre et URL mis à jour.")):re==="description"&&Ot.description&&(ke(Ot.description),an(null),I("Description mise à jour."))}catch(Ot){const kr=(bt=(Xe=Ot==null?void 0:Ot.response)==null?void 0:Xe.data)==null?void 0:bt.message;Ut(kr??"Impossible d’appliquer la proposition.")}}},Rn=re=>
302{window.confirm("Cette génération a déjà consommé un crédit IA. En refusant, vous ne pourrez pas relancer (sauf crédits restants). Continuer ?")&&(re==="title"?rn(null):an(null))},ss=async re=>{if(re.preventDefault(),!(!t||!te)){u(!0),h(null),I(null);try{await xg(t,{description:G,budget:Y?Number(Y):null,regionId:Ee||null,categoryIds:Te,logoUrl:Z||null,imageUrl:Q||null,dossierUrl:F||null}),I("Annonce mise à jour."),setTimeout(()=>s("/portail/projets"),1200)}catch{h("Impossible d'enregistrer les modifications.")}finally{u(!1)}}},Cr=async()=>{if(!t||!te||Le.length===0&&Es===0)return;if(Ps){b("Complétez vos coordonnées de facturation avant de souscrire à des options payantes.");return}f(!0),b(null),E(null);const re=E2(Wt);try{const Ze=await aN(t,{serviceCodes:Le,contributorRewards:re.length>0?re:void 0,logoUrl:Z||void 0,imageUrl:Q||void 0,dossierUrl:F||void 0}),Xe=re.length>0;E(Ze.pendingPaymentTotalCents>0?`Options commandées (${(Ze.pendingPaymentTotalCents/100).toFixed(2)} € en attente). Réglez-les depuis « Mes annonces » (Payer par carte). Votre annonce reste en ligne.`:Xe&&Le.length===0?"Récompense Programme Contributeur activée avec succès.":"Options activées avec succès."),W(Ze.project.displayStatuses??[Ze.project.displayStatus]),dt(fx(Ze.project.orders,Ze.project)),Et(px(Ze.project,Ze.project.orders)),vt(Ze.project.contributorRewards??[]),es({}),ut([])}catch{b("Impossible de commander les options. Vérifiez les champs requis et vos coordonnées de facturation.")}finally{f(!1)}};return a?r.jsx("p",{className:"text-slate-500",children:"Chargement…"}):r.jsxs("div",{className:"mx-auto max-w-3xl space-y-6",children:[r.jsxs("div",{children:[r.jsx(V,{to:"/portail/projets",className:"text-sm font-medium text-brand hover:underline",children:"← Retour à mes annonces"}),r.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Modifier l'annonce"}),r.jsx(x0,{statuses:O})]}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Mettez à jour le contenu de votre annonce ou souscrivez à des options pour booster sa visibilité."}),De==="rejected"&&ae&&r.jsxs("div",{className:"mt-3 rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-800",children:["Motif du rejet : ",ae,te&&r.jsx("p",{className:"mt-2 text-red-700",children:"Corrigez le contenu puis enregistrez pour resoumettre l’annonce à vérification."})]}),De==="pending_review"&&r.jsx("div",{className:"mt-3 rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-800",children:"Annonce en cours de vérification : elle n’est pas encore visible publiquement."}),De==="requested_offline"&&r.jsx("div",{className:"mt-3 rounded-xl border border-slate-200 bg-slate-50 p-4 text-sm text-slate-700",children:"Annonce hors ligne : elle n’apparaît plus dans la recherche publique."})]}),t&&r.jsx(C2,{projectId:t,status:De,canEdit:te,onUpdated:re=>{Ne(re.status),W(re.displayStatuses??[re.displayStatus])}}),!te&&r.jsx("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-4 text-sm text-slate-600",children:"Cette annonce est archivée et ne peut plus être modifiée."}),r.jsxs("form",{onSubmit:ss,className:"space-y-6",children:[r.jsxs("section",{id:"ia",className:"card space-y-4 p-6 scroll-mt-24",children:[r.jsx("div",{className:"flex flex-wrap items-start justify-between gap-3",children:r.jsxs("div",{children:[r.jsx("h2",{className:"font-semibold text-slate-900",children:"Identité"}),(J==null?void 0:J.orderId)&&r.jsxs("p",{className:"mt-1 text-xs text-slate-500",children:["Crédits IA — titre : ",J.titleCreditsLeft,"/",J.titleCreditsTotal," · ","description : ",J.descriptionCreditsLeft,"/",J.descriptionCreditsTotal]})]})}),xn&&r.jsx("p",{className:"text-sm text-red-600",children:xn}),r.jsxs("div",{children:[r.jsxs("div",{className:"mb-1 flex flex-wrap items-center justify-between gap-2",children:[r.jsx("label",{className:"block text-sm font-medium text-slate-700",children:"Titre"}),te&&((J==null?void 0:J.titleCreditsLeft)??0)>0&&r.jsx("button",{type:"button",className:"text-sm font-medium text-brand hover:underline disabled:opacity-50",disabled:rt!==null,onClick:()=>void xs(),children:rt==="title"?"Génération…":"Proposer un titre IA"})]}),r.jsx("input",{className:"input-field bg-slate-50",value:_,readOnly:!0}),ts&&r.jsxs("div",{className:"mt-3 rounded-xl border border-brand/20 bg-brand/5 p-3",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Proposition IA"}),r.jsx("p",{className:"mt-1 text-sm text-slate-900",children:ts.value}),r.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn-primary text-sm",onClick:()=>void Ft("title"),children:"Accepter"}),r.jsx("button",{type:"button",className:"btn-secondary text-sm",onClick:()=>Rn("title"),children:"Refuser"})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",children:"URL publique"}),r.jsx("input",{className:"input-field bg-slate-50",value:`/projets/${C}`,readOnly:!0}),r.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"L’URL est recalculée automatiquement si vous acceptez un nouveau titre IA."})]})]}),r.jsxs("section",{className:"card space-y-4 p-6",children:[r.jsx("h2",{className:"font-semibold text-slate-900",children:"Contenu"}),r.jsxs("div",{children:[r.jsxs("div",{className:"mb-1 flex flex-wrap items-center justify-between gap-2",children:[r.jsx("label",{className:"block text-sm font-medium text-slate-700",htmlFor:"description",children:"Description *"}),te&&((J==null?void 0:J.descriptionCreditsLeft)??0)>0&&r.jsxs("div",{className:"flex flex-wrap gap-3",children:[r.jsx("button",{type:"button",className:"text-sm font-medium text-brand hover:underline disabled:opacity-50",disabled:rt!==null,onClick:()=>void gs("rewrite"),children:rt==="rewrite"?"Génération…":"Reformuler"}),r.jsx("button",{type:"button",className:"text-sm font-medium text-brand hover:underline disabled:opacity-50",disabled:rt!==null,onClick:()=>void gs("proofread"),children:rt==="proofread"?"Génération…":"Corriger l’orthographe"})]})]}),r.jsx("textarea",{id:"description",className:"input-field min-h-[140px]",value:G,onChange:re=>ke(re.target.value),required:!0,minLength:10,disabled:!te}),Pn&&r.jsxs("div",{className:"mt-3 rounded-xl border border-brand/20 bg-brand/5 p-3",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Proposition IA"}),r.jsx("p",{className:"mt-1 whitespace-pre-wrap text-sm text-slate-900",children:Pn.value}),r.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn-primary text-sm",onClick:()=>void Ft("description"),children:"Accepter"}),r.jsx("button",{type:"button",className:"btn-secondary text-sm",onClick:()=>Rn("description"),children:"Refuser"})]})]})]}),r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"budget",children:"Budget (€)"}),r.jsx("input",{id:"budget",type:"number",min:0,className:"input-field",value:Y,onChange:re=>fe(re.target.value),disabled:!te})]}),r.jsxs("div",{children:[r.jsx("label",{className:"mb-1 block text-sm font-medium text-slate-700",htmlFor:"region",children:"Région"}),r.jsxs("select",{id:"region",className:"input-field",value:Ee,onChange:re=>le(re.target.value),disabled:!te,children:[r.jsx("option",{value:"",children:"—"}),Oe.map(re=>
302r.jsxs("option",{value:re.id,children:[re.name," (CP ",re.code,")"]},re.id))]})]})]}),pe.length>0&&r.jsxs("div",{children:[r.jsx("label",{className:"mb-2 block text-sm font-medium text-slate-700",children:"Catégories"}),r.jsx("div",{className:"flex flex-wrap gap-2",children:pe.map(re=>{const Ze=Te.includes(re.id);return r.jsxs("label",{className:`cursor-pointer rounded-full border px-3 py-1 text-sm ${Ze?"border-brand bg-brand/10 text-brand":"border-slate-200"} ${te?"":"opacity-60"}`,children:[r.jsx("input",{type:"checkbox",className:"sr-only",checked:Ze,disabled:!te,onChange:()=>Fe(Xe=>Ze?Xe.filter(bt=>bt!==re.id):[...Xe,re.id])}),re.name]},re.id)})})]})]}),!te&&(Z||Q||F)&&r.jsxs("section",{className:"card space-y-4 p-6",children:[r.jsx("h2",{className:"font-semibold text-slate-900",children:"Médias & dossier"}),r.jsxs("div",{className:"space-y-2 text-sm text-slate-600",children:[Q&&r.jsxs("p",{children:["Illustration : ",r.jsx("a",{className:"text-brand hover:underline",href:Q,children:Q})]}),Z&&r.jsxs("p",{children:["Logo : ",r.jsx("a",{className:"text-brand hover:underline",href:Z,children:Z})]}),F&&r.jsxs("p",{children:["Dossier : ",r.jsx("a",{className:"text-brand hover:underline",href:F,children:F})]})]})]}),te&&r.jsxs("section",{className:"card space-y-4 p-6",children:[r.jsx("h2",{className:"font-semibold text-slate-900",children:"Illustration"}),r.jsx("p",{className:"text-sm text-slate-600",children:"Gratuite et recommandée pour valoriser votre projet sur le site public."}),r.jsx(gr,{label:"Image d'illustration (gratuite)",kind:"image",value:Q,onChange:N,accept:"image/jpeg,image/png,image/webp,image/gif",placeholder:"https://exemple.fr/illustration.jpg"})]}),x&&r.jsx("p",{className:"text-sm text-red-600",children:x}),w&&r.jsx("p",{className:"text-sm text-brand",children:w}),te&&r.jsx("button",{type:"submit",className:"btn-primary",disabled:o,children:o?"Enregistrement…":"Enregistrer les modifications"})]}),te&&(Ws||ue.length>0||Ht.length>0)&&r.jsxs("section",{id:"options",className:"card space-y-4 p-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"font-semibold text-slate-900",children:"Booster mon annonce"}),r.jsxs("p",{className:"mt-1 text-sm text-slate-600",children:["Votre annonce reste en ligne pendant le traitement du paiement. Les options seront activées dès règlement (paiement en ligne ou validation par l’équipe)."," ",r.jsx(V,{to:"/publier",className:"font-medium text-brand hover:underline",children:"Voir conditions et tarifs"})]}),Ts&&r.jsx("p",{className:"mt-2 text-sm text-amber-800",children:"Après paiement, utilisez les boutons IA sur cette page (titre / description) — chaque génération consomme un crédit."})]}),r.jsx(dm,{compact:!0}),r.jsx(k2,{rewards:Ht,services:tt,selections:Wt,onSelect:(re,Ze)=>es(Xe=>({...Xe,[re]:Ze}))}),r.jsx(S0,{services:on,selectedServices:Le,subscribedCodes:ue,offeredCodes:mt,onToggle:re=>ut(Ze=>_0(Ze,re,tt)),billingComplete:ps,pricingRules:nt}),Ps&&r.jsxs("div",{className:"border-t border-slate-100 pt-4",children:[r.jsx("h3",{className:"font-semibold text-slate-900",children:"Coordonnées de facturation"}),r.jsx("p",{className:"mt-1 mb-4 text-sm text-slate-600",children:"Obligatoires pour activer les options payantes. Vous restez sur cette page."}),r.jsx(um,{idPrefix:"edit-billing",compact:!0,showIncompleteBanner:!1,onComplete:()=>{B(!0),b(null)}})]}),Gs&&r.jsxs("div",{className:"space-y-4 border-t border-slate-100 pt-4",children:[r.jsx("h3",{className:"font-semibold text-slate-900",children:"Médias payants"}),r.jsx("p",{className:"text-sm text-slate-600",children:"Logo et dossier : options payantes. L’illustration se gère ci-dessus, gratuitement."}),hs&&r.jsx(gr,{label:"Logo (option payante)",kind:"logo",value:Z,onChange:oe,accept:"image/jpeg,image/png,image/webp,image/gif",placeholder:"https://exemple.fr/logo.png"}),ns&&r.jsx(gr,{label:"Dossier de sponsoring",kind:"dossier",value:F,onChange:we,accept:".pdf,.doc,.docx,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",placeholder:"https://exemple.fr/dossier.pdf"})]}),v&&r.jsx("p",{className:"text-sm text-red-600",children:v}),z&&r.jsx("p",{className:"text-sm text-brand",children:z}),r.jsx("button",{type:"button",className:"btn-secondary",disabled:m||Le.length===0&&Es===0||Ps,onClick:Cr,children:m?"Activation en cours…":"Activer les options sélectionnées"})]}),te&&!Ws&&Gs&&r.jsxs("section",{className:"card space-y-4 p-6",children:[r.jsx("h2",{className:"font-semibold text-slate-900",children:"Médias payants"}),r.jsx("p",{className:"text-sm text-slate-600",children:"Logo et dossier liés à vos options actives."}),hs&&r.jsx(gr,{label:"Logo (option payante)",kind:"logo",value:Z,onChange:oe,accept:"image/jpeg,image/png,image/webp,image/gif",placeholder:"https://exemple.fr/logo.png"}),ns&&r.jsx(gr,{label:"Dossier de sponsoring",kind:"dossier",value:F,onChange:we,accept:".pdf,.doc,.docx,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",placeholder:"https://exemple.fr/dossier.pdf"})]})]})}const P2={new:"Nouveau",interested:"Intéressé",dismissed:"Écarté",contacted:"Contacté"},R2={communication:"Communication",marketing:"Marketing",foundation:"Fondation",patronage:"Mécénat",csr:"RSE",hr:"RH",management:"Direction",partnership:"Partenariats",press:"Presse"},bx=[{key:"thematicScore",label:"Thématique"},{key:"geoScore",label:"Géographie"},{key:"budgetScore",label:"Budget"},{key:"sponsorScore",label:"Communauté"}];function A2(t){return!t||typeof t!="object"?{}:t}function O2({label:t,value:s}){const a=Math.max(0,Math.min(100,Math.round(s)));return r.jsxs("div",{children:[r.jsxs("div",{className:"mb-1 flex justify-between text-xs text-slate-600",children:[r.jsx("span",{children:t}),r.jsxs("span",{children:[a,"%"]})]}),r.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-slate-100",children:r.jsx("div",{className:"h-full rounded-full bg-brand",style:{width:`${a}%`}})})]})}function L2({projectId:t,match:s,onUpdated:a}){const[l,o]=g.useState(!1),[u,m]=g.useState(null),f=A2(s.explanation),x=Array.isArray(f.reasons)?f.reasons:[],h=async v=>{o(!0),m(null);try{const b=await vN(t,s.id,v);a({...s,clientStatus:b.clientStatus??s.clientStatus,introStatus:b.introStatus??s.introStatus,introRequestedAt:b.introRequestedAt??s.introRequestedAt,clientNote:b.clientNote??s.clientNote})}catch{m("Impossible de mettre à jour ce sponsor.")}finally{o(!1)}};return r.jsxs("article",{className:"card space-y-4 p-5",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:s.company.name}),r.jsxs("span",{className:"rounded-full bg-brand/10 px-2.5 py-0.5 text-xs font-semibold text-brand",children:["Score ",Math.round(s.score),"%"]}),r.jsx("span",{className:"rounded-full bg-slate-100 px-2.5 py-0.5 text-xs font-medium text-slate-600",children:P2[s.clientStatus]})]}),s.company.description&&r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:s.company.description})]}),r.jsxs(V,{to:s.publicUrl,target:"_blank",rel:"noreferrer",className:"btn-secondary inline-flex items-center gap-1.5 text-sm",children:["Voir la fiche",r.jsx(Kr,{size:14})]})]}),(x.length>
3020||bx.some(({key:v})=>typeof f[v]=="number"))&&r.jsxs("div",{className:"rounded-xl border border-slate-100 bg-slate-50/80 p-4",children:[r.jsx("p",{className:"mb-3 text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Critères de rapprochement"}),r.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:bx.map(({key:v,label:b})=>{const w=f[v];return typeof w!="number"?null:r.jsx(O2,{label:b,value:w},v)})}),x.length>0&&r.jsx("ul",{className:"mt-3 space-y-1 text-sm text-slate-700",children:x.map(v=>r.jsxs("li",{children:["• ",v]},v))})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("p",{className:"flex items-center gap-1.5 text-sm font-semibold text-slate-800",children:[r.jsx(Vx,{size:16}),"Coordonnées"]}),(s.company.email||s.company.phone||s.company.contactFormUrl)&&r.jsxs("div",{className:"rounded-lg border border-slate-100 px-3 py-2 text-sm",children:[r.jsxs("div",{className:"mb-1 flex items-center gap-1.5 font-medium text-slate-900",children:[r.jsx(Jo,{size:14,className:"text-slate-500"}),"Entreprise"]}),r.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-slate-700",children:[s.company.email&&r.jsxs("a",{href:`mailto:${s.company.email}`,className:"inline-flex items-center gap-1.5 hover:text-brand hover:underline",children:[r.jsx(Wf,{size:14,className:"shrink-0 text-slate-400"}),s.company.email]}),s.company.phone&&r.jsxs("a",{href:`tel:${s.company.phone}`,className:"inline-flex items-center gap-1.5 hover:text-brand hover:underline",children:[r.jsx(Gf,{size:14,className:"shrink-0 text-slate-400"}),s.company.phone]}),s.company.contactFormUrl&&r.jsxs("a",{href:s.company.contactFormUrl,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 font-medium text-brand hover:underline",children:[r.jsx($x,{size:14,className:"shrink-0"}),"Formulaire de contact",r.jsx(Kr,{size:12,className:"shrink-0 opacity-70"})]})]})]}),s.contacts.length>0?r.jsx("ul",{className:"space-y-2",children:s.contacts.map(v=>{const b=[v.firstName,v.lastName].filter(Boolean).join(" ")||"Contact";return r.jsxs("li",{className:"rounded-lg border border-slate-100 px-3 py-2 text-sm",children:[r.jsxs("div",{className:"font-medium text-slate-900",children:[b,v.isPrimary&&r.jsx("span",{className:"ml-2 text-xs font-normal text-slate-500",children:"Principal"})]}),r.jsx("div",{className:"text-xs text-slate-500",children:R2[v.role]??v.role}),r.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1 text-slate-700",children:[v.email&&r.jsxs("a",{href:`mailto:${v.email}`,className:"inline-flex items-center gap-1.5 hover:text-brand hover:underline",children:[r.jsx(Wf,{size:14,className:"shrink-0 text-slate-400"}),v.email]}),v.phone&&r.jsxs("a",{href:`tel:${v.phone}`,className:"inline-flex items-center gap-1.5 hover:text-brand hover:underline",children:[r.jsx(Gf,{size:14,className:"shrink-0 text-slate-400"}),v.phone]})]})]},v.id)})}):!s.company.email&&!s.company.phone&&!s.company.contactFormUrl?r.jsx("p",{className:"text-sm text-slate-500",children:"Aucune coordonnée disponible pour ce sponsor"}):null]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",disabled:l||s.clientStatus==="interested",onClick:()=>h({clientStatus:"interested"}),className:"btn-secondary text-sm disabled:opacity-50",children:"Intéressé"}),r.jsx("button",{type:"button",disabled:l||s.clientStatus==="dismissed",onClick:()=>h({clientStatus:"dismissed"}),className:"btn-secondary text-sm disabled:opacity-50",children:"Écarté"}),r.jsx("button",{type:"button",disabled:l||s.clientStatus==="contacted",onClick:()=>h({clientStatus:"contacted"}),className:"btn-secondary text-sm disabled:opacity-50",children:"Marquer contacté"})]}),u&&r.jsx("p",{className:"text-sm text-red-600",children:u})]})}function I2(){const{id:t}=_r(),[s,a]=g.useState(!0),[l,o]=g.useState(null),[u,m]=g.useState(""),[f,x]=g.useState([]),h=g.useCallback(async()=>{if(t){a(!0),o(null);try{const v=await yN(t);m(v.project.title),x(v.matches)}catch{o("Impossible de charger les sponsors suggérés. Vérifiez que le matching est activé."),x([])}finally{a(!1)}}},[t]);return g.useEffect(()=>{h()}
302,[h]),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx(V,{to:"/portail/projets",className:"text-sm font-medium text-brand hover:underline",children:"← Mes annonces"}),r.jsx("h1",{className:"mt-2 text-2xl font-bold text-slate-900",children:"Sponsors suggérés"}),u&&r.jsxs("p",{className:"mt-1 text-sm text-slate-600",children:["Pour l’annonce « ",u," »"]})]}),s?r.jsxs("div",{className:"flex items-center gap-2 text-slate-500",children:[r.jsx(Xn,{className:"animate-spin",size:18}),"Chargement des suggestions…"]}):l?r.jsx("div",{className:"card p-6 text-sm text-red-700",children:l}):f.length===0?r.jsx("div",{className:"card p-6 text-sm text-slate-600",children:"Aucun sponsor suggéré pour le moment. Les suggestions sont recalculées à l’activation du matching."}):r.jsx("div",{className:"space-y-4",children:f.map(v=>r.jsx(L2,{projectId:t,match:v,onUpdated:b=>{x(w=>w.map(I=>I.id===b.id?b:I))}},v.id))})]})}function D2(t){return new Intl.NumberFormat("fr-FR",{style:"currency",currency:"EUR"}).format(t)}function z2(t){return t?new Date(t).toLocaleDateString("fr-FR"):"—"}function M2(){const[t,s]=g.useState([]),[a,l]=g.useState(!0),[o,u]=g.useState(null),[m,f]=g.useState(null);g.useEffect(()=>{pN().then(s).catch(()=>u("Impossible de charger vos factures.")).finally(()=>l(!1))},[]);const x=async h=>{f(h.id),u(null);try{const v=await fN(h.id),b=URL.createObjectURL(v),w=document.createElement("a");w.href=b,w.download=`${h.invoiceNumber}.pdf`,document.body.appendChild(w),w.click(),w.remove(),URL.revokeObjectURL(b)}catch{u(`Téléchargement impossible pour ${h.invoiceNumber}.`)}finally{f(null)}};return r.jsxs("div",{className:"mx-auto max-w-2xl space-y-8",children:[r.jsxs("div",{children:[r.jsx(V,{to:"/portail",className:"text-sm font-medium text-brand hover:underline",children:"← Retour à mon espace"}),r.jsx("h1",{className:"mt-3 text-2xl font-bold text-slate-900",children:"Compte & facturation"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Coordonnées utilisées pour vos options payantes, et factures des paiements déjà effectués."})]}),r.jsxs("section",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Mes factures"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Une facture par règlement (toutes les options payées ensemble y figurent)."})]}),a&&r.jsx("p",{className:"text-sm text-slate-500",children:"Chargement des factures…"}),o&&r.jsx("p",{className:"text-sm text-red-600",children:o}),!a&&t.length===0&&!o&&r.jsx("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-4 text-sm text-slate-600",children:"Aucune facture pour le moment. Elles apparaîtront ici dès qu'une option payante aura été réglée."}),t.length>0&&r.jsx("ul",{className:"divide-y divide-slate-100 overflow-hidden rounded-xl border border-slate-200 bg-white",children:t.map(h=>r.jsxs("li",{className:"flex flex-col gap-3 px-4 py-4 sm:flex-row sm:items-center sm:justify-between",children:[r.jsxs("div",{className:"min-w-0 space-y-1",children:[r.jsx("p",{className:"font-medium text-slate-900",children:h.invoiceNumber}),r.jsxs("p",{className:"truncate text-sm text-slate-600",children:[h.serviceLabel,h.projectTitle?` — ${h.projectTitle}`:""]}),r.jsxs("p",{className:"text-xs text-slate-500",children:[z2(h.issuedAt)," · ",D2(h.amountEuros)," · Payée"]})]}),r.jsx("button",{type:"button",className:"btn-secondary shrink-0",disabled:m===h.id,onClick:()=>void x(h),children:m===h.id?"Téléchargement…":"Télécharger le PDF"})]},h.id))})]}),r.jsxs("section",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Coordonnées de facturation"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Obligatoires pour toute souscription à une option payante."})]}),r.jsx(um,{idPrefix:"billing-page"})]})]})}function U2(t){switch(t){case"paid":return"Payé";case"refunded":return"Remboursé";case"pending":return"En attente";default:return"Annulé"}}function F2(){const[t,s]=g.useState([]),[a,l]=g.useState([]),[o,u]=g.useState(!0),[m,f]=g.useState(null),[x,h]=g.useState(null);g.useEffect(()=>{hN().then(b=>{s(b.purchases),l(b.freeDocuments)}).catch(()=>f("Impossible de charger vos documents.")).finally(()=>u(!1))},[]);const v=async b=>{h(b),f(null);try{const w=await xN(b);window.open(w.fileUrl,"_blank","noopener,noreferrer")}catch{f("Téléchargement impossible pour ce document.")}finally{h(null)}};return r.jsxs("div",{className:"space-y-8",children:[r.jsxs("div",{children:[r.jsx(V,{to:"/portail",className:"text-sm text-slate-500 hover:text-slate-800",children:"← Mon espace"}),r.jsx("h1",{className:"mt-2 text-2xl font-bold text-slate-900",children:"Mes documents"}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:"Documents achetés sur Connecting Sponsors et modèles gratuits."})]}),o&&r.jsx("p",{className:"text-sm text-slate-500",children:"Chargement…"}),m&&r.jsx("p",{className:"text-sm text-red-600",children:m}),!o&&r.jsxs(r.Fragment,{children:[r.jsxs("section",{className:"space-y-3",children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Achats"}),t.length===0?r.jsx("p",{className:"text-sm text-slate-500",children:"Aucun document acheté pour ce compte."}):r.jsx("div",{className:"space-y-3",children:t.map(b=>r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-slate-200 bg-white p-4",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-slate-900",children:b.document.title}),r.jsxs("p",{className:"mt-1 text-sm text-slate-600",children:[U2(b.paymentStatus),b.invoiceNumber?` · ${b.invoiceNumber}`:"",` · ${b.amountEuros.toFixed(2)} €`]})]}),b.canDownload?r.jsx("button",{type:"button",className:"btn-secondary",disabled:x===b.document.id,onClick:()=>void v(b.document.id),children:x===b.document.id?"Ouverture…":"Télécharger"}):r.jsx("span",{className:"text-xs text-slate-500",children:"Non téléchargeable"})]},b.id))})]}),r.jsxs("section",{className:"space-y-3",children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Documents gratuits"}),r.jsx("div",{className:"space-y-3",children:a.map(b=>r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-slate-200 bg-white p-4",children:[r.jsx("p",{className:"font-medium text-slate-900",children:b.title}),b.canDownload?r.jsx("button",{type:"button",className:"btn-secondary",disabled:x===b.id,onClick:()=>void v(b.id),children:x===b.id?"Ouverture…":"Télécharger"}):null]},b.id))})]})]})]})}const k0=16;function $2(t,s){const a=`${k0}px`,l=t===0,o=t===s-1;return l&&o?"none":l?`polygon(0 0, calc(100% - ${a}) 0, 100% 50%, calc(100% - ${a}) 100%, 0 100%)`:o?`polygon(0 0, 100% 0, 100% 100%, 0 100%, ${a} 50%)`:`polygon(0 0, calc(100% - ${a}) 0, 100% 50%, calc(100% - ${a}) 100%, 0 100%, ${a} 50%)`}function B2(t,s,a){return s?"bg-gradient-to-r from-violet-700 to-violet-600 text-white shadow-md shadow-violet-200":t?"bg-gradient-to-r from-violet-500 to-violet-400 text-white":a?"border border-violet-200 bg-vi
302olet-50 text-violet-800":"border border-slate-200 bg-slate-50 text-slate-500"}function q2({tiers:t,earnedPoints:s,currentTierId:a,nextTierId:l,redeemedTierIds:o=[],discountByTierId:u={}}){return r.jsxs("div",{className:"space-y-6",children:[r.jsx("div",{className:"-mx-1 overflow-x-auto overflow-y-hidden pb-1",children:r.jsx("div",{className:"flex min-w-[640px] px-1",children:t.map((m,f)=>{const x=s>=m.minPoints,h=m.id===a,v=m.id===l;return r.jsx("div",{className:"relative min-w-0 flex-1",style:{marginLeft:f>0?-k0:0,zIndex:t.length-f},children:r.jsxs("div",{className:`relative flex h-[4.5rem] flex-col items-center justify-center px-5 py-2 transition ${B2(x,h,v)}`,style:{clipPath:$2(f,t.length)},children:[r.jsxs("div",{className:"flex max-w-full items-center gap-1.5 px-2",children:[x&&!h?r.jsx(Ab,{size:14,className:"shrink-0 opacity-90","aria-hidden":!0}):h?r.jsx(tl,{size:14,className:"shrink-0","aria-hidden":!0}):x?null:r.jsx($b,{size:13,className:"shrink-0 opacity-70","aria-hidden":!0}),r.jsx("span",{className:"truncate text-sm font-semibold leading-tight",children:m.name}),m.highlight&&r.jsx(br,{size:12,className:"shrink-0 fill-current opacity-80","aria-label":"Palier populaire"})]}),r.jsx("span",{className:`mt-0.5 text-xs font-medium ${x||h?"text-white/90":v?"text-violet-600":"text-slate-400"}`,children:m.minPoints===0?"Départ":`${m.minPoints} pts`}),h&&r.jsx("span",{className:"mt-1 rounded-full bg-white/20 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide",children:"Palier actuel"})]})},m.id)})})}),r.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:t.map(m=>{const f=s>=m.minPoints,x=m.id===a,h=m.id===l,v=o.includes(m.id);return r.jsxs("article",{className:`rounded-xl border p-4 transition ${x?"border-violet-300 bg-violet-50 shadow-sm":f?"border-violet-100 bg-white":h?"border-dashed border-violet-200 bg-violet-50/40":"border-slate-100 bg-slate-50/60"}`,children:[r.jsxs("div",{className:"flex items-start justify-between gap-2",children:[r.jsx("p",{className:"min-w-0 font-medium text-slate-900",children:m.name}),f&&r.jsx("span",{className:"shrink-0 rounded-full bg-emerald-100 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-emerald-800",children:"Atteint"}),!f&&h&&r.jsx("span",{className:"shrink-0 rounded-full bg-violet-100 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-violet-800",children:"Prochain"})]}),r.jsx("p",{className:"mt-1 text-xs text-slate-500",children:m.minPoints===0?"Accès de base":`À partir de ${m.minPoints} points`}),(u[m.id]??0)>0&&r.jsxs("p",{className:"mt-2 text-sm font-medium text-violet-700",children:["−",u[m.id],"% sur les options payantes"]}),r.jsxs("p",{className:"mt-3 flex items-start gap-2 text-sm leading-relaxed text-slate-600",children:[r.jsx(Nr,{size:15,className:"mt-0.5 shrink-0 text-violet-600","aria-hidden":!0}),r.jsx("span",{children:m.reward})]}),v&&m.minPoints>0&&r.jsx("p",{className:"mt-2 text-xs font-medium text-slate-500",children:"Option déjà activée sur une annonce"})]},m.id)})})]})}const jx={pending:{label:"En modération",className:"bg-amber-100 text-amber-800"},published:{label:"Publié",className:"bg-emerald-100 text-emerald-800"},approved:{label:"Approuvé",className:"bg-emerald-100 text-emerald-800"},rejected:{label:"Rejeté",className:"bg-slate-100 text-slate-600"},redeemed:{label:"Utilisée",className:"bg-violet-100 text-violet-800"},credited:{label:"Crédité",className:"bg-emerald-100 text-emerald-800"}};function V2(){var x,h,v,b,w,I,z,E,_,T;const[t,s]=g.useState(null),[a,l]=g.useState({}),[o,u]=g.useState(!0),[m,f]=g.useState(null);return g.useEffect(()=>{Promise.all([gN(),wg().catch(()=>[])]).then(([C,M])=>{s(C),l(Object.fromEntries(M.map(O=>[O.tierId,O.discountPercent])))}).catch(()=>f("Impossible de charger votre Programme Contributeur.")).finally(()=>u(!1))},[]),o?r.jsxs("div",{className:"flex items-center justify-center py-24 text-slate-500",children:[r.jsx(Xn,{className:"mr-2 animate-spin",size:22}),"Chargement de vos contributions…"]}):m||!t?r.jsx("div",{className:"rounded-xl border border-red-200 bg-red-50 p-6 text-sm text-red-800",children:m??"Une erreur est survenue."}):r.jsxs("div",{className:"space-y-8",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-semibold uppercase tracking-wider text-violet-700",children:"Programme Contributeur"}),r.jsx("h1",{className:"mt-2 text-3xl font-bold text-slate-900",children:"Mes points et contributions"}),r.jsx("p",{className:"mt-2 max-w-2xl text-slate-600",children:"Retrouvez l'historique de vos avis, enrichissements et récompenses utilisées, le détail des points crédités ou dépensés, et votre progression ver
302s les paliers de récompenses."})]}),r.jsxs("div",{className:"flex flex-wrap gap-2 shrink-0",children:[r.jsx(V,{to:"/proposer-sponsor",className:"btn-secondary",children:"Proposer un sponsor"}),r.jsxs(V,{to:"/recherche",className:"btn-primary",children:[r.jsx($a,{size:16}),"Donner un avis"]})]})]}),r.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1.4fr_1fr]",children:[r.jsxs("div",{className:"card p-6",children:[r.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-slate-500",children:"Solde disponible"}),r.jsxs("p",{className:"mt-1 text-4xl font-bold text-violet-800",children:[t.totalPoints," pts"]}),(t.totalPointsSpent??0)>0&&r.jsxs("p",{className:"mt-1 text-xs text-slate-500",children:[t.totalPointsEarned??t.totalPoints," pts gagnés · ",t.totalPointsSpent," pts utilisés"]})]}),r.jsxs("div",{className:"text-right",children:[r.jsx("p",{className:"text-sm text-slate-500",children:"Palier actuel"}),r.jsx("p",{className:"mt-1 text-lg font-bold uppercase tracking-wide text-violet-800",children:t.currentTier.name})]})]}),t.nextTier?r.jsxs("div",{className:"mt-6",children:[r.jsxs("div",{className:"mb-2 flex items-center justify-between text-sm text-slate-600",children:[r.jsxs("span",{children:["Progression vers ",t.nextTier.name]}),r.jsxs("span",{children:[t.pointsToNextTier," pts restants"]})]}),r.jsx("div",{className:"h-3 overflow-hidden rounded-full bg-slate-100",children:r.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-violet-500 to-brand transition-all",style:{width:`${t.progressPercent}%`}})}),r.jsxs("p",{className:"mt-2 text-xs text-slate-500",children:["Prochaine récompense à partir de ",t.nextTier.minPoints," points : ",t.nextTier.reward]})]}):r.jsx("p",{className:"mt-6 text-sm text-emerald-700",children:"Vous avez atteint le palier le plus élevé. Merci pour votre engagement communautaire !"})]}),r.jsxs("div",{className:"card p-6",children:[r.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-violet-100 text-violet-700",children:r.jsx(Nr,{size:24})}),r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:((x=t.currentReward)==null?void 0:x.title)??"Récompense actuelle"}),((h=t.currentReward)==null?void 0:h.tierName)&&r.jsx("p",{className:"mt-1 text-sm font-medium text-violet-700",children:t.currentReward.tierName}),r.jsx("p",{className:"mt-2 text-sm leading-relaxed text-slate-600",children:((v=t.currentReward)==null?void 0:v.description)??((b=t.spendableTier)==null?void 0:b.reward)??t.currentTier.reward}),(((w=t.contributorDiscount)==null?void 0:w.discountPercent)??0)>0&&r.jsxs("p",{className:"mt-3 rounded-lg bg-violet-50 px-3 py-2 text-xs text-violet-800",children:["Réduction active (",(I=t.contributorDiscount)==null?void 0:I.tierName,") 
302: −",(z=t.contributorDiscount)==null?void 0:z.discountPercent,"% sur les options payantes."]}),r.jsxs("p",{className:"mt-3 text-xs text-slate-500",children:["Basé sur vos ",t.totalPoints," pts disponibles"]}),(E=t.currentReward)!=null&&E.canRedeem?r.jsx(V,{to:"/portail/projets",className:"btn-secondary mt-4 inline-flex text-sm",children:"Activer sur une annonce"}):r.jsxs(V,{to:"/programme-contributeur",className:"mt-4 inline-flex items-center gap-2 text-sm font-medium text-violet-700 hover:underline",children:["Voir tous les paliers",r.jsx(At,{size:16})]})]})]}),r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsxs("div",{className:"card p-5",children:[r.jsx("p",{className:"text-sm text-slate-500",children:"Contributions validées"}),r.jsx("p",{className:"mt-1 text-2xl font-bold text-slate-900",children:t.validatedCount})]}),r.jsxs("div",{className:"card p-5",children:[r.jsx("p",{className:"text-sm text-slate-500",children:"En attente de modération"}),r.jsx("p",{className:"mt-1 text-2xl font-bold text-slate-900",children:t.pendingCount})]}),r.jsxs("div",{className:"card p-5",children:[r.jsx("p",{className:"text-sm text-slate-500",children:"Avis publiés"}),r.jsx("p",{className:"mt-1 text-2xl font-bold text-slate-900",children:t.feedbackCount})]}),r.jsxs("div",{className:"card p-5",children:[r.jsx("p",{className:"text-sm text-slate-500",children:"Récompenses disponibles"}),r.jsx("p",{className:"mt-1 text-2xl font-bold text-slate-900",children:((_=t.availableRewards)==null?void 0:_.length)??0}),r.jsx(V,{to:"/portail/projets",className:"mt-2 inline-block text-sm font-medium text-violet-700 hover:underline",children:"Activer sur une annonce →"})]})]}),r.jsxs("section",{className:"card p-6",children:[r.jsxs("div",{className:"mb-6 max-w-2xl",children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Paliers de récompenses"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Votre progression à travers les paliers du programme. Chaque palier débloque une récompense offerte et une réduction automatique sur les options payantes de visibilité."})]}),r.jsx(q2,{tiers:Ha,earnedPoints:t.totalPointsEarned??t.totalPoints,currentTierId:t.currentTier.id,nextTierId:(T=t.nextTier)==null?void 0:T.id,redeemedTierIds:t.redeemedTierIds,discountByTierId:a})]}),r.jsxs("section",{className:"card p-6",children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Utiliser vos récompenses"}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:"Ouvrez la modification d'une de vos annonces, section « Booster mon annonce », pour activer gratuitement l'option correspondant à votre palier."}),r.jsx(V,{to:"/portail/projets",className:"btn-secondary mt-4 inline-flex",children:"Mes annonces"})]}),r.jsxs("section",{children:[r.jsx("h2",{className:"mb-4 text-xl font-bold text-slate-900",children:"Historique"}),t.history.length===0?r.jsxs("div",{className:"card p-8 text-center text-sm text-slate-600",children:[r.jsx("p",{children:"Vous n'avez pas encore de contribution enregistrée."}),r.jsx(V,{to:"/recherche",className:"btn-primary mt-4 inline-flex",children:"Parcourir les sponsors"})]}):r.jsx("div",{className:"space-y-4",children:t.history.map(C=>{const M=jx[C.status]??jx.pending;return r.jsxs("article",{className:"card p-5",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r.jsx("h3",{className:"font-semibold text-slate-900",children:C.label}),r.jsx("span",{className:`rounded-full px-2.5 py-0.5 text-xs font-medium ${M.className}`,children:M.label})]}),C.companyName&&r.jsxs("p",{className:"mt-1 text-sm text-slate-600",children:["Sponsor :"," ",C.companySlug?r.jsx(V,{to:`/sponsors/${C.companySlug}`,className:"text-brand hover:underline",children:C.companyName}):C.companyName]}),C.projectTitle&&r.jsxs("p",{className:"mt-1 text-sm text-slate-600",children:["Annonce :"," ",C.projectId?r.jsx(V,{to:`/portail/projets/${C.projectId}/modifier`,className:"font-medium text-violet-700 hover:underline",children:C.projectTitle}):C.projectTitle]}),C.rating!=null&&r.jsx("div",{className:"mt-2 flex items-center gap-1 text-amber-500",children:Array.from({length:5}).map((O,W)=>r.jsx(br,{size:14,className:W<C.rating?"fill-current":"text-slate-200"},W))}),C.comment&&r.jsx("p",{className:"mt-2 text-sm leading-relaxed text-slate-600",children:C.comment}),r.jsx("p",{className:"mt-2 text-xs text-slate-400",children:new Date(C.createdAt).toLocaleStr
302ing("fr")})]}),r.jsx("div",{className:"text-right",children:C.pointsEarned<0?r.jsxs("p",{className:"text-lg font-bold text-red-600",children:[C.pointsEarned," pts"]}):C.pointsEarned>0?r.jsxs("p",{className:"text-lg font-bold text-violet-800",children:["+",C.pointsEarned," pts"]}):C.pointsPotential>0?r.jsxs("p",{className:"text-sm font-medium text-slate-500",children:["Jusqu'à +",C.pointsPotential," pts"]}):r.jsx("p",{className:"text-sm text-slate-400",children:"0 pt"})})]}),C.pointBreakdown.length>0&&r.jsx("ul",{className:"mt-4 flex flex-wrap gap-2",children:C.pointBreakdown.map(O=>r.jsx("li",{className:`rounded-full px-3 py-1 text-xs font-medium ${C.type==="reward_redemption"?"bg-red-50 text-red-700":"bg-violet-50 text-violet-800"}`,children:O},O))})]},C.id)})})]})]})}const H2=[{id:"infos",label:"Infos"},{id:"themes",label:"Thèmes"},{id:"categories",label:"Catégories"},{id:"audiences",label:"Audiences"},{id:"eligibility",label:"Éligibilité"},{id:"documents",label:"Documents"},{id:"feedback",label:"Avis"}],dd=[{key:"associationStatutes",label:"Statuts d'association"},{key:"budget",label:"Budget"},{key:"projectFile",label:"Dossier projet"},{key:"photos",label:"Photos"},{key:"video",label:"Vidéo"},{key:"taxReceipt",label:"Reçu fiscal"}],W2=[{value:"national",label:"National"},{value:"regional",label:"Régional"},{value:"departmental",label:"Départemental"},{value:"local",label:"Local"},{value:"international",label:"International"}],E0=Object.fromEntries(Qi.map(t=>[t,""]));function Nx(t){return{...E0,...t??{}}}function hr(t,s){var a;if(t&&typeof t=="object"&&"response"in t){const l=t.response;if((a=l==null?void 0:l.data)!=null&&a.message)return l.data.message}return s}function kn({label:t,hint:s,children:a}){return r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"block text-sm font-medium text-slate-800",children:t}),a,s?r.jsx("p",{className:"text-xs text-slate-500",children:s}):null]})}function wo({label:t,checked:s,onChange:a}){return r.jsxs("label",{className:"flex cursor-pointer items-center justify-between gap-3 rounded-xl border border-slate-200 bg-slate-50/80 px-3.5 py-3 text-sm text-slate-800 transition hover:border-slate-300 hover:bg-white",children:[r.jsx("span",{className:"font-medium",children:t}),r.jsx("span",{className:`relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition ${s?"bg-brand":"bg-slate-300"}`,"aria-hidden":!0,children:r.jsx("span",{className:`inline-block h-5 w-5 rounded-full bg-white shadow transition ${s?"translate-x-5":"translate-x-0.5"}`})}),r.jsx("input",{type:"checkbox",className:"sr-only",checked:s,onChange:l=>a(l.target.checked)})]})}function So({title:t,description:s,children:a}){return r.jsxs("section",{className:"space-y-4 rounded-xl border border-slate-100 bg-slate-50/50 p-4 sm:p-5",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-sm font-semibold text-slate-900",children:t}),s?r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:s}):null]}),a]})}function G2(){const{companyId:t=""}=_r(),[s,a]=g.useState("infos"),[l,o]=g.useState(!0),[u,m]=g.useState(!1),[f,x]=g.useState(null),[h,v]=g.useState(null),[b,w]=g.useState(null),[I,z]=g.useState(""),[E,_]=g.useState(""),[T,C]=g.useState(""),[M,O]=g.useState(""),[W,ae]=g.useState(""),[ge,De]=g.useState(E0),[Ne,G]=g.useState([]),[ke,Y]=g.useState(""),[fe,Ee]=g.useState([]),[le,Te]=g.useState([]),[Fe,Z]=g.useState([]),[oe,Q]=g.useState([]),[N,F]=g.useState({}),[we,te]=g.useState([]),[Be,pe]=g.useState({}),[q,Oe]=g.useState([]),[We,tt]=g.useState({}),[Ue,nt]=g.useState(null),yt=g.useMemo(()=>we.filter(B=>B.level==="region"),[we]),Le=g.useCallback(async()=>{if(t){o(!0),x(null);try{const[B,J,Pe,rt,Jt,xn,Ut,ts,rn,Pn]=await Promise.all([SN(t),CN(t),EN(t),Jd(),PN(t),dN(),AN(t),LN(t),DN(t),em()]);w(B),z(B.description??""),_(B.website??""),C(B.email??""),O(B.phone??""),ae(B.postalAddress??""),De(Nx(B.socialNetworks)),G(J),Ee(Pe),Te(rt),Z(Jt),Q(xn),F(Ut),pe(Object.fromEntries(dd.map(({key:an})=>[an,!!ts[an]]))),Oe(rn),tt(Object.fromEntries(rn.map(an=>[an.id,an.sponsorReply??""]))),te(Pn)}catch(B){x(hr(B,"Impossible de charger la fiche organisation.")),w(null)}finally{o(!1)}}},[t]);g.useEffect(()=>{Le()},[Le]);const ut=B=>{v(B),x(null)},ue=async B=>
302{if(B.preventDefault(),!!t){m(!0);try{const J=await _N(t,{description:I.trim()||null,website:E.trim()||null,email:T.trim()||null,phone:M.trim()||null,postalAddress:W.trim()||null,socialNetworks:Object.fromEntries(Qi.map(Pe=>[Pe,(ge[Pe]??"").trim()||null]))});w(J),De(Nx(J.socialNetworks)),ut("Informations enregistrées.")}catch(J){x(hr(J,"Impossible d'enregistrer les informations."))}finally{m(!1)}}},dt=()=>{const B=ke.trim();if(B){if(Ne.some(J=>J.toLowerCase()===B.toLowerCase())){Y("");return}G(J=>[...J,B]),Y("")}},mt=async B=>{if(B.preventDefault(),!!t){m(!0);try{const J=await kN(t,Ne);G(J),ut("Thèmes enregistrés.")}catch(J){x(hr(J,"Impossible d'enregistrer les thèmes."))}finally{m(!1)}}},Et=async B=>{if(B.preventDefault(),!!t){m(!0);try{const J=await RN(t,Fe);Z(J),ut("Audiences enregistrées.")}catch(J){x(hr(J,"Impossible d'enregistrer les audiences."))}finally{m(!1)}}},Ht=async B=>{if(B.preventDefault(),!!t){m(!0);try{const J=await TN(t,fe);Ee(J),ut("Catégories enregistrées.")}catch(J){x(hr(J,"Impossible d'enregistrer les catégories."))}finally{m(!1)}}},vt=(B,J)=>{F(Pe=>({...Pe,[B]:J}))},Wt=async B=>{if(B.preventDefault(),!!t){m(!0);try{const J=typeof N.description=="string"&&N.description.trim()?N.description.trim():null,Pe=N.geoScope==="regional",rt=await ON(t,{...N,regionIds:Pe?Array.isArray(N.regionIds)?N.regionIds:[]:[],description:J});F(rt),ut("Éligibilité enregistrée.")}catch(J){x(hr(J,"Impossible d'enregistrer l'éligibilité."))}finally{m(!1)}}},es=async B=>{if(B.preventDefault(),!!t){m(!0);try{const J=await IN(t,Be);pe(Object.fromEntries(dd.map(({key:Pe})=>[Pe,!!J[Pe]]))),ut("Documents requis enregistrés.")}catch(J){x(hr(J,"Impossible d'enregistrer les documents requis."))}finally{m(!1)}}},ps=async B=>{if(!t)return;const J=(We[B]??"").trim();if(!J){x("La réponse ne peut pas être vide.");return}nt(B);try{const Pe=await zN(t,B,J);Oe(rt=>rt.map(Jt=>Jt.id===B?{...Jt,...Pe}:Jt)),tt(rt=>({...rt,[B]:Pe.sponsorReply??J})),ut("Réponse publiée.")}catch(Pe){x(hr(Pe,"Impossible de publier la réponse."))}finally{nt(null)}};return l?r.jsxs("div",{className:"flex items-center justify-center gap-2 py-16 text-sm text-slate-500",children:[r.jsx(Xn,{className:"animate-spin",size:18}),"Chargement de la fiche…"]}):b?r.jsxs("div",{className:"mx-auto max-w-3xl space-y-6",children:[r.jsxs("div",{className:"card overflow-hidden",children:[r.jsxs("div",{className:"border-b border-slate-100 bg-gradient-to-br from-brand/5 via-white to-slate-50 px-5 py-5 sm:px-6",children:[r.jsx(V,{to:"/portail",className:"text-sm font-medium text-brand hover:underline",children:"← Retour à mon espace"}),r.jsxs("div",{className:"mt-4 flex flex-wrap items-start justify-between gap-4",children:[r.jsxs("div",{className:"flex gap-3",children:[r.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-xl bg-brand/10 text-brand",children:r.jsx(Jo,{size:24})}),r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold tracking-tight text-slate-900",children:"Gérer la fiche"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:b.name})]})]}),r.jsxs(V,{to:`/sponsors/${b.slug}`,className:"btn-secondary inline-flex shrink-0 text-sm",children:["Fiche publique",r.jsx(Kr,{size:16})]})]})]}),r.jsx("nav",{className:"flex gap-1 overflow-x-auto px-2 sm:px-3","aria-label":"Sections",children:H2.map(B=>r.jsx("button",{type:"button",onClick:()=>{a(B.id),v(null),x(null)},className:`shrink-0 border-b-2 px-3 py-3 text-sm font-medium transition ${s===B.id?"border-brand text-brand":"border-transparent text-slate-500 hover:border-slate-200 hover:text-slate-800"}`,children:B.label},B.id))})]}),f&&r.jsx("p",{className:"rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700",children:f}),h&&r.jsx("p",{className:"rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-800",children:h}),s==="infos"&&r.jsxs("form",{className:"card space-y-5 p-5 sm:p-6",onSubmit:ue,children:[r.jsx(kn,{label:"Description",children:r.jsx("textarea",{className:"input-field min-h-32 resize-y",value:I,onChange:B=>z(B.target.value),placeholder:"Présentez votre organisation, vos priorités de mécénat…"})}),r.jsx(kn,{label:"Site web",children:r.jsx("input",{className:"input-field",type:"url",value:E,onChange:B=>_(B.target.value),placeholder:"https://"})}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx(kn,{label:"Email",children:r.jsx("input",{className:"input-field",type:"email",value:T,onChange:B=>C(B.target.value),placeholder:"[email protected]"})}),r.jsx(kn,{label:"Téléphone",children:r.jsx("input",{className:"input-field",value:M,onChange:B=>O(B.target.value),placeholder:"01 23 45 67 89"})})]}),r.jsx(kn,{label:"Adresse postale",children:r.jsx("textarea",{className:"input-field min-h-24 resize-y",value:W,onChange:B=>ae(B.target.value),placeholder:"Numéro, rue, code postal, ville"})}),r.jsx(So,{title:"Réseaux sociaux",description:"Au moins un réseau renseigné compte dans le score de complétude de la fiche.",children:r.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:Qi.map(B=>r.jsx(kn,{label:Lg[B],children:r.jsx("input",{className:"input-field",type:"url",value:ge[B]??"",onChange:J=>De(Pe=>({...Pe,[B]:J.target.value})),placeholder:"https://"})},B))})}),r.jsx("div",{className:"flex justify-end border-t border-slate-100 pt-4",children:r.jsx("button",{type:"submit",className:"btn-primary",disabled:u,children:u?"Enregistrement…":"Enregistrer"})})]}),s==="themes"&&r.jsxs("form",{className:"card space-y-5 p-5 sm:p-6",onSubmit:mt,children:[r.jsx("p",{className:"text-sm text-slate-600",children:"Ajoutez les thèmes portés par votre organisation (Entrée pour valider)."}),r.jsx("div",{className:"flex min-h-12 flex-wrap gap-2 rounded-xl border border-dashed border-slate-200 bg-slate-50/80 p-3",children:Ne.length===0?r.jsx("span",{className:"text-sm text-slate-400",children:"Aucun thème pour le moment"}):Ne.map(B=>r.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-brand/10 px-3 py-1.5 text-sm font-medium text-brand",children:[B,r.jsx("button",{type:"button",className:"rounded-full p-0.5 hover:bg-brand/20",onClick:()=>G(J=>J.filter(Pe=>Pe!==B)),"aria-label":`Retirer ${B}`,children:r.jsx(qd,{size:14})})]},B))}),r.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[r.jsx("input",{className:"input-field flex-1",value:ke,onChange:B=>Y(B.target.value),onKeyDown:B=>{B.key==="Enter"&&(B.preventDefault(),dt())},placeholder:"Ajouter un thème…"}),r.jsx("button",{type:"button",className:"btn-secondary shrink-0",onClick:dt,children:"Ajouter"})]}),r.jsx("div",{className:"flex justify-end border-t border-slate-100 pt-4",children:r.jsx("button",{type:"submit",className:"btn-primary",disabled:u,children:u?"Enregistrement…":"Enregistrer"})})]}),s==="categories"&&r.jsxs("form",{className:"card space-y-5 p-5 sm:p-6",onSubmit:Ht,children:[r.jsx("p",{className:"text-sm text-slate-600",children:"Sélectionnez les catégories qui décrivent votre organisation."}),le.length===0?r.jsx("p",{className:"text-sm text-slate-400",children:"Aucune catégorie disponible pour le moment."}):r.jsx("div",{className:"flex flex-wrap gap-2",children:le.map(B=>{const J=fe.includes(B.id);
302return r.jsxs("label",{className:`cursor-pointer rounded-full border px-3 py-1.5 text-sm ${J?"border-brand bg-brand/10 font-medium text-brand":"border-slate-200 bg-white text-slate-700 hover:border-slate-300"}`,children:[r.jsx("input",{type:"checkbox",className:"sr-only",checked:J,onChange:()=>Ee(Pe=>J?Pe.filter(rt=>rt!==B.id):[...Pe,B.id])}),B.name]},B.id)})}),r.jsx("div",{className:"flex justify-end border-t border-slate-100 pt-4",children:r.jsx("button",{type:"submit",className:"btn-primary",disabled:u,children:u?"Enregistrement…":"Enregistrer"})})]}),s==="audiences"&&r.jsxs("form",{className:"card space-y-5 p-5 sm:p-6",onSubmit:Et,children:[r.jsx("p",{className:"text-sm text-slate-600",children:"Sélectionnez les audiences visées par vos soutiens (athlètes, créateurs, associations…)."}),oe.length===0?r.jsx("p",{className:"text-sm text-slate-400",children:"Aucune audience disponible pour le moment."}):r.jsx("div",{className:"flex flex-wrap gap-2",children:oe.map(B=>{const J=Fe.includes(B.id);return r.jsxs("label",{className:`cursor-pointer rounded-full border px-3 py-1.5 text-sm ${J?"border-brand bg-brand/10 font-medium text-brand":"border-slate-200 bg-white text-slate-700 hover:border-slate-300"}`,children:[r.jsx("input",{type:"checkbox",className:"sr-only",checked:J,onChange:()=>Z(Pe=>J?Pe.filter(rt=>rt!==B.id):[...Pe,B.id])}),B.label]},B.id)})}),r.jsx("div",{className:"flex justify-end border-t border-slate-100 pt-4",children:r.jsx("button",{type:"submit",className:"btn-primary",disabled:u,children:u?"Enregistrement…":"Enregistrer"})})]}),s==="eligibility"&&r.jsxs("form",{className:"card space-y-5 p-5 sm:p-6",onSubmit:Wt,children:[r.jsx(So,{title:"Types de projets compatibles",description:"Domaines que vous êtes susceptibles de soutenir.",children:r.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:Xr.map(({key:B,label:J})=>r.jsx(wo,{label:J,checked:!!N[B],onChange:Pe=>vt(B,Pe)},B))})}),r.jsxs(So,{title:"Budget, délais et périmètre",children:[r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[r.jsx(kn,{label:"Budget minimum (€)",children:r.jsx("input",{className:"input-field",type:"number",min:0,value:N.minBudget==null?"":String(N.minBudget),onChange:B=>F(J=>({...J,minBudget:B.target.value===""?null:Number(B.target.value)}))})}),r.jsx(kn,{label:"Budget maximum (€)",children:r.jsx("input",{className:"input-field",type:"number",min:0,value:N.maxBudget==null?"":String(N.maxBudget),onChange:B=>F(J=>({...J,maxBudget:B.target.value===""?null:Number(B.target.value)}))})}),r.jsx(kn,{label:"Âge minimum",children:r.jsx("input",{className:"input-field",type:"number",min:0,value:N.minAge==null?"":String(N.minAge),onChange:B=>F(J=>({...J,minAge:B.target.value===""?null:Number(B.target.value)}))})}),r.jsx(kn,{label:"Périmètre géographique",children:r.jsxs("select",{className:"input-field",value:typeof N.geoScope=="string"?N.geoScope:"",onChange:B=>{const J=B.target.value||null;F(Pe=>({...Pe,geoScope:J,...J!=="regional"?{regionIds:[]}:{}}))},children:[r.jsx("option",{value:"",children:"—"}),W2.map(B=>r.jsx("option",{value:B.value,children:B.label},B.value))]})}),r.jsx(kn,{label:"Délai moyen de réponse (jours)",children:r.jsx("input",{className:"input-field",type:"number",min:0,value:N.avgResponseDays==null?"":String(N.avgResponseDays),onChange:B=>F(J=>({...J,avgResponseDays:B.target.value===""?null:Number(B.target.value)}))})}),r.jsx(kn,{label:"Délai garanti de réponse (jours)",children:r.jsx("input",{className:"input-field",type:"number",min:0,value:N.guaranteedResponseDays==null?"":String(N.guaranteedResponseDays),onChange:B=>F(J=>({...J,guaranteedResponseDays:B.target.value===""?null:Number(B.target.value)}))})})]}),r.jsxs("div",{className:"mt-4 grid gap-2 sm:grid-cols-2",children:[r.jsx(wo,{label:"Projets locaux",checked:!!N.acceptsLocalProjects,onChange:B=>vt("acceptsLocalProjects",B)}),r.jsx(wo,{label:"Projets internationaux",checked:!!N.acceptsInternationalProjects,onChange:B=>vt("acceptsInternationalProjects",B)})]}),N.geoScope==="regional"?r.jsx("div",{className:"mt-4",children:r.jsx(kn,{label:"Régions éligibles",hint:"Maintenez Ctrl (ou Cmd) pour sélectionner plusieurs régions.",children:r.jsx("select",{className:"input-field min-h-36",multiple:!0,value:Array.isArray(N.regionIds)?N.regionIds:[],onChange:B=>{const J=Array.from(B.target.selectedOptions).map(Pe=>Pe.value);F(Pe=>
302({...Pe,regionIds:J}))},children:yt.map(B=>r.jsxs("option",{value:B.id,children:[B.name," (CP ",B.code,")"]},B.id))})})}):null]}),r.jsx(So,{title:"Exigences particulières",children:r.jsx("textarea",{className:"input-field min-h-32 resize-y",maxLength:5e3,value:typeof N.description=="string"?N.description:"",onChange:B=>F(J=>({...J,description:B.target.value})),placeholder:"Conditions spécifiques non couvertes par les cases ci-dessus."})}),r.jsx("div",{className:"flex justify-end border-t border-slate-100 pt-4",children:r.jsx("button",{type:"submit",className:"btn-primary",disabled:u,children:u?"Enregistrement…":"Enregistrer"})})]}),s==="documents"&&r.jsxs("form",{className:"card space-y-5 p-5 sm:p-6",onSubmit:es,children:[r.jsx("p",{className:"text-sm text-slate-600",children:"Indiquez les pièces demandées aux porteurs de projet. Pour des précisions libres, utilisez le champ « Exigences particulières » de l'onglet Éligibilité."}),r.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:dd.map(({key:B,label:J})=>r.jsx(wo,{label:J,checked:!!Be[B],onChange:Pe=>pe(rt=>({...rt,[B]:Pe}))},B))}),r.jsx("div",{className:"flex justify-end border-t border-slate-100 pt-4",children:r.jsx("button",{type:"submit",className:"btn-primary",disabled:u,children:u?"Enregistrement…":"Enregistrer"})})]}),s==="feedback"&&r.jsx("div",{className:"space-y-4",children:q.length===0?r.jsx("div",{className:"card p-6 text-center text-sm text-slate-600",children:"Aucun avis publié pour le moment."}):q.map(B=>r.jsxs("div",{className:"card space-y-4 p-5 sm:p-6",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[r.jsxs("div",{className:"flex items-center gap-2 text-amber-500",children:[Array.from({length:5},(J,Pe)=>r.jsx(br,{size:16,className:Pe<B.rating?"fill-current":"text-slate-200"},Pe)),r.jsxs("span",{className:"ml-1 text-sm font-medium text-slate-900",children:[B.rating,"/5"]})]}),r.jsx("p",{className:"text-xs text-slate-500",children:new Date(B.createdAt).toLocaleDateString("fr-FR")})]}),B.comment?r.jsx("p",{className:"rounded-xl bg-slate-50 px-4 py-3 text-sm leading-relaxed text-slate-700",children:B.comment}):null,r.jsx(kn,{label:"Votre réponse",children:r.jsx("textarea",{className:"input-field min-h-28 resize-y",value:We[B.id]??"",onChange:J=>tt(Pe=>({...Pe,[B.id]:J.target.value})),placeholder:"Réponse visible immédiatement sur la fiche publique"})}),r.jsx("div",{className:"flex justify-end",children:r.jsx("button",{type:"button",className:"btn-primary",disabled:Ue===B.id,onClick:()=>void ps(B.id),children:Ue===B.id?"Publication…":B.sponsorReply?"Mettre à jour la réponse":"Publier la réponse"})})]},B.id))})]}):r.jsxs("div",{className:"mx-auto max-w-3xl space-y-4",children:[r.jsx(V,{to:"/portail",className:"text-sm font-medium text-brand hover:underline",children:"← Retour à mon espace"}),r.jsx("p",{className:"rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700",children:f??"Organisation introuvable ou accès refusé."})]})}function Z2(){var x;const{user:t}=qn(),[s,a]=g.useState([]),[l,o]=g.useState([]);g.useEffect(()=>{wg().then(a).catch(()=>{}),Sg().then(o).catch(()=>{})},[]);const u=new Map(s.map(h=>[h.tierId,h.discountPercent])),m=((x=l.find(h=>h.key==="sponsor_suggestion_approved"))==null?void 0:x.value)??$s.sponsorSuggestionApproved,f=Iw.map(h=>h.id==="sponsor_suggestion"?{...h,points:m}:h);return r.jsxs("div",{children:[r.jsx("section",{className:"border-b border-slate-100 bg-slate-50",children:r.jsxs("div",{className:"mx-auto max-w-7xl px-4 py-14 sm:px-6 lg:px-8",children:[r.jsx("p",{className:"mb-3 text-sm font-semibold uppercase tracking-wider text-brand",children:"Communauté"}),r.jsx("h1",{className:"max-w-3xl text-3xl font-bold text-slate-900 sm:text-4xl",children:"Programme Contributeur"}),r.jsx("p",{className:"mt-4 max-w-3xl text-lg text-slate-600",children:Mo}),r.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[r.jsxs(V,{to:"/recherche",className:"btn-primary",children:[r.jsx($a,{size:16}),"Donner mon avis sur un sponsor"]}),r.jsx(V,{to:"/proposer-sponsor",className:"btn-secondary",children:"Proposer un sponsor manquant"}),t?r.jsxs(V,{to:"/portail/programme-contributeur",className:"btn-secondary",children:["Consulter mes points",r.jsx(At,{size:16})]}):r.jsxs(V,{to:"/portail/inscription",className:"btn-secondary",children:["Créer mon espace client",r.jsx(At,{size:16})]})]})]})}),r.jsxs("section",{className:"mx-auto max-w-7xl px-4 py-16 sm:px-6 lg:px-8",children:[r.jsxs("div",{className:"mb-8 max-w-2xl",children:[r.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Comment gagner des points ?"}),r.jsxs("p",{className:"mt-2 text-slate-600",children:["Chaque contribution utile à la communauté est récompensée après modération. Vous gagnez aussi de
302s points en activant des options payantes sur vos annonces (",$s.paidSpendingPerEuro," pts / €)."]})]}),r.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:f.map(h=>r.jsxs("article",{className:"card p-5",children:[r.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[r.jsx("h3",{className:"font-semibold text-slate-900",children:h.label}),r.jsx("span",{className:"shrink-0 rounded-full bg-violet-100 px-2.5 py-1 text-xs font-semibold text-violet-800",children:h.pointsLabel??`+${h.points} pts`})]}),r.jsx("p",{className:"text-sm leading-relaxed text-slate-600",children:h.description}),h.id==="sponsor_suggestion"?r.jsxs(V,{to:"/proposer-sponsor",className:"mt-3 inline-flex text-sm font-medium text-brand hover:underline",children:["Proposer un sponsor",r.jsx(At,{size:14,className:"ml-1"})]}):null]},h.id))})]}),r.jsx("section",{className:"border-y border-slate-100 bg-slate-50 py-16",children:r.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[r.jsxs("div",{className:"mb-8 max-w-2xl",children:[r.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Les paliers de récompenses"}),r.jsx("p",{className:"mt-2 text-slate-600",children:"Vos points s'accumulent. Chaque palier débloque une récompense offerte et une réduction automatique sur les options payantes de visibilité."})]}),r.jsx("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:Ha.map(h=>r.jsxs("article",{className:`card p-5 ${h.highlight?"ring-2 ring-violet-300":""}`,children:[r.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[r.jsx("h3",{className:"font-semibold text-slate-900",children:h.name}),h.highlight&&r.jsx("span",{className:"rounded-full bg-violet-100 px-2 py-0.5 text-xs font-medium text-violet-800",children:"Populaire"})]}),r.jsxs("p",{className:"text-sm text-slate-500",children:["À partir de ",h.minPoints," points"]}),(u.get(h.id)??0)>0&&r.jsxs("p",{className:"mt-2 text-sm font-medium text-violet-700",children:["−",u.get(h.id),"% sur les options payantes"]}),r.jsxs("p",{className:"mt-4 flex items-start gap-2 text-sm leading-relaxed text-slate-700",children:[r.jsx(Nr,{size:16,className:"mt-0.5 shrink-0 text-violet-700"}),h.reward]})]},h.id))})]})}),r.jsx("section",{className:"mx-auto max-w-7xl px-4 py-16 sm:px-6 lg:px-8",children:r.jsxs("div",{className:"grid gap-10 lg:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Pourquoi revenir sur Connecting Sponsors ?"}),r.jsxs("ul",{className:"mt-6 space-y-4 text-sm leading-relaxed text-slate-700",children:[r.jsxs("li",{className:"flex gap-3",children:[r.jsx(br,{size:18,className:"mt-0.5 shrink-0 text-brand"}),"Aidez les porteurs de projet à choisir un sponsor en toute confiance grâce à des retours réels."]}),r.jsxs("li",{className:"flex gap-3",children:[r.jsx(br,{size:18,className:"mt-0.5 shrink-0 text-brand"}),"Améliorez la qualité des fiches entreprises mécènes pour toute la communauté."]}),r.jsxs("li",{className:"flex gap-3",children:[r.jsx(br,{size:18,className:"mt-0.5 shrink-0 text-brand"}),"Transformez votre expertise terrain en visibilité premium pour vos propres annonces."]})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Questions fréquentes"}),Dw.map(h=>r.jsxs("details",{className:"card group p-4",children:[r.jsx("summary",{className:"cursor-pointer list-none font-medium text-slate-900 marker:content-none",children:h.question}),r.jsx("p",{className:"mt-3 text-sm leading-relaxed text-slate-600",children:h.answer})]},h.question))]})]})}),r.jsx(om,{})]})}function wx(t,s){var a;if(t&&typeof t=="object"&&"response"in t){const l=t.response;if((a=l==null?void 0:l.data)!=null&&a.message)return l.data.message}return s}function K2(t){switch(t){case"pending":return"En attente de modération";case"approved":return"Validée";case"rejected":return"Rejetée";default:return t}}function Y2(){var Ne;const{user:t}=qn(),[s]=Hs(),[a,l]=g.useState(s.get("q")??""),[o,u]=g.useState(""),[m,f]=g.useState(""),[x,h]=g.useState([]),[v,b]=g.useState(!1),[w,I]=g.useState(!1),[z,E]=g.useState(null),[_,T]=g.useState(null),[C,M]=g.useState([]),[O,W]=g.useState(null),ae=g.useCallback(async()=>
302{if(t)try{const G=await MN();M(G)}catch{}},[t]);g.useEffect(()=>{Sg().then(G=>W(G[0]??null)).catch(()=>{})},[]),g.useEffect(()=>{ae()},[ae]);const ge=async()=>{if(!(!a.trim()||!t)){b(!0),E(null);try{const G=await UN(a.trim());h(G)}catch(G){E(wx(G,"Recherche impossible"))}finally{b(!1)}}},De=async G=>{if(G.preventDefault(),!!t){I(!0),E(null),T(null);try{const ke=await FN({name:a,website:o||null,comment:m||null});T(ke),(ke.outcome==="pending_moderation"||ke.outcome==="draft_credited")&&(l(""),u(""),f(""),h([]),await ae())}catch(ke){E(wx(ke,"Impossible d'envoyer la suggestion"))}finally{I(!1)}}};return r.jsxs("div",{children:[r.jsx("section",{className:"border-b border-slate-100 bg-slate-50",children:r.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6 lg:px-8",children:[r.jsx("p",{className:"mb-3 text-sm font-semibold uppercase tracking-wider text-brand",children:"Programme Contributeur"}),r.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:"Proposer un sponsor manquant"}),r.jsxs("p",{className:"mt-3 text-slate-600",children:["Vous ne trouvez pas une fiche dans le référentiel ? Proposez-la. Après validation, vous gagnez"," ",r.jsxs("strong",{children:[(O==null?void 0:O.value)??50," points"]}),O?r.jsxs(r.Fragment,{children:[" ","(ou ",O.draftMatchValue," pts si la fiche existe déjà en brouillon)."]}):" (50 % si la fiche existe déjà en brouillon)."]})]})}),r.jsxs("div",{className:"mx-auto max-w-3xl space-y-8 px-4 py-10 sm:px-6 lg:px-8",children:[t?r.jsxs(r.Fragment,{children:[z&&r.jsx("p",{className:"rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700",children:z}),_&&r.jsxs("div",{className:`rounded-lg px-4 py-3 text-sm ${_.outcome==="already_published"?"bg-amber-50 text-amber-950":_.outcome==="draft_credited"?"bg-emerald-50 text-emerald-900":"bg-sky-50 text-sky-950"}`,children:[r.jsx("p",{className:"font-medium",children:_.message}),(Ne=_.company)!=null&&Ne.slug&&_.outcome==="already_published"?r.jsxs(V,{to:`/sponsors/${_.company.slug}`,className:"mt-2 inline-block font-medium underline",children:["Voir la fiche ",_.company.name]}):null,_.outcome==="draft_credited"?r.jsxs("p",{className:"mt-1",children:["+",_.pointsAwarded," pt",_.pointsAwarded>1?"s":""," crédités sur votre"," ",r.jsx(V,{to:"/portail/programme-contributeur",className:"underline",children:"programme contributeur"}),"."]}):null]}),r.jsxs("form",{onSubmit:De,className:"card space-y-4 p-6",children:[r.jsxs("div",{children:[r.jsx("label",{htmlFor:"sponsor-name",className:"mb-1.5 block text-sm font-medium text-slate-700",children:"Nom du sponsor *"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("input",{id:"sponsor-name",className:"input flex-1",value:a,onChange:G=>l(G.target.value),placeholder:"Ex. Fondation ACME",required:!0,minLength:2}),r.jsxs("button",{type:"button",className:"btn-secondary inline-flex items-center gap-2",onClick:()=>void ge(),disabled:v||!a.trim(),children:[v?r.jsx(Xn,{className:"animate-spin",size:16}):r.jsx(Ki,{size:16}),"Vérifier"]})]})]}),x.length>0&&r.jsxs("div",{className:"rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-950",children:[r.jsx("p",{className:"font-medium",children:"Des fiches publiées correspondent déjà :"}),r.jsx("ul",{className:"mt-2 space-y-1",children:x.map(G=>r.jsxs("li",{children:[r.jsx(V,{to:`/sponsors/${G.slug}`,className:"underline",children:G.name}),G.website?r.jsxs("span",{className:"text-amber-800/80",children:[" — ",G.website]}):null]},G.id))}),r.jsx("p",{className:"mt-2 text-amber-900/80",children:"Si c'est le bon sponsor, inutile de le proposer à nouveau."})]}),r.jsxs("div",{children:[r.jsx("label",{htmlFor:"sponsor-website",className:"mb-1.5 block text-sm font-medium text-slate-700",children:"Site web (recommandé)"}),r.jsx("input",{id:"sponsor-website",className:"input w-full",value:o,onChange:G=>u(G.target.value),placeholder:"https://…"})]}),r.jsxs("div",{children:[r.jsx("label",{htmlFor:"sponsor-comment",className:"mb-1.5 block text-sm font-medium text-slate-700",children:"Précisions (optionnel)"}),r.jsx("textarea",{id:"sponsor-comment",className:"input w-full min-h-[100px]",value:m,onChange:G=>f(G.target.value),placeholder:"Secteur, type de soutien, pourquoi cette fiche serait utile…",maxLength:2e3})]}),r.jsx("button",{type:"submit",className:"btn-primary",disabled:w||!a.trim(),children:w?r.jsxs(r.Fragment,{children:[r.jsx(Xn,{className:"mr-2 inline animate-spin",size:16}),"Envoi…"]}):"Proposer cette fiche"})]}),C.length>0&&r.jsxs("section",{className:"space-y-3",children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Vos suggestions"}),r.jsx("ul",{className:"space-y-2",children:C.map(G=>r.jsxs("li",{className:"card flex items-start gap-3 p-4 text-sm",children:[r.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-brand/10 text-brand",children:r.jsx(Jo,{size:18})}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("p",{className:"font-medium text-slate-900",children:G.name}),r.jsx("p",{className:"mt-0.5 text-slate-600",children:K2(G.status)}),G.pointsAwarded>0?r.jsxs("p",{className:"mt-1 text-emerald-700",children:["+",G.pointsAwarded," pts"]}):null]})]},G.id))})]})]}):r.jsxs("div",{className:"card space-y-4 p-6",children:[r.jsx("p",{className:"text-slate-700",children:"Connectez-vous à votre espace client pour proposer une fiche sponsor et gagner des points."}),r.jsxs("div",{className:"flex flex-wrap gap-3",children:[r.jsx(V,{to:"/portail/connexion",className:"btn-primary",children:"Se connecter"}),r.jsx(V,{to:"/portail/inscription",className:"btn-secondary",children:"Créer un compte"})]})]}),r.jsxs("p",{className:"text-center text-sm text-slate-500",children:[r.jsx(V,{to:"/programme-contributeur",className:"text-brand hover:underline",children:"Retour au programme contributeur"})," · ",r.jsx(V,{to:"/recherche",className:"text-brand hover:underline",children:"Rechercher un sponsor"})]})]})]})}function Q2(){const{user:t}=qn(),[s,a]=g.useState([]),[l,o]=g.useState([]),[u,m]=g.useState(!0),f=t?"/portail/projets/nouveau":"/portail/inscription?redirect=/portail/projets/nouveau",x=t?"Déposer mon projet":"Créer mon espace et publier";g.useEffect(()=>{sw().then(v=>{a(v.services),o(v.pricingRules)}).catch(()=>{a([]),o([])}).finally(()=>m(!1))},[]);const h=s.filter(v=>v.priceCents>0).reduce((v,b)=>v==null||b.priceCents<v?b.priceCents:v,null);return r.jsxs("div",{children:[r.jsx("section",{className:"border-b border-slate-100 bg-gradient-to-br from-brand-dark via-brand to-brand-light text-white",children:r.jsxs("div",{className:"mx-auto max-w-7xl px-4 py-14 sm:px-6 lg:px-8 lg:py-20",children:[r.jsx("p",{className:"mb-3 text-sm font-semibold uppercase tracking-wider text-white/80",children:"Connecting Sponsors"}),r.jsx("h1",{className:"max-w-3xl text-3xl font-bold sm:text-4xl lg:text-5xl",children:"Publier une annonce"}),r.jsx("p",{className:"mt-4 max-w-2xl text-lg text-white/90",children:"Déposez gratuitement votre projet. Ajoutez des options de mise en avant seulement si vous voulez booster sa visibilité auprès des sponsors."}),r.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-3",children:[r.jsxs(V,{to:f,className:"inline-flex items-center gap-2 rounded-xl bg-accent-yellow px-6 py-3 font-semibold text-slate-900 transition hover:brightness-110",children:[x,r.jsx(At,{size:16})]}),h!=null&&!u&&r.jsxs("p",{className:"text-sm text-white/85",children:["Options à partir de ",(h/100).toFixed(2).replace(".",",")," €"]})]})]})}),r.jsx("section",{className:"mx-auto max-w-7xl px-4 py-14 sm:px-6 lg:px-8",children:r.jsx(dm,{})}),r.jsx("section",{className:"border-y border-slate-100 bg-slate-50 py-14",children:r.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[r.jsxs("div",{className:"mb-8 max-w-2xl",children:[r.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Tarifs des options"}),r.jsx("p",{className:"mt-2 text-slate-600",children:"Prix publics indicatifs. Les réductions du Programme Contributeur s’appliquent automatiquement une fois connecté."}),l.some(v=>v.isActive)&&r.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Une remise panier peut aussi s’appliquer automatiquement selon les combinaisons d’options choisies dans le portail."})]}),r.jsx(S2,{services:s,loading:u}),r.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-3 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-900",children:[r.jsx(Bd,{size:18,className:"shrink-0"}),r.jsx("span",{children:"L’annonce reste en ligne même si des options sont en attente de paiement : seules les options concernées s’activent après règlement."})]})]})}),r.jsx("section",{className:"mx-auto max-w-7xl px-4 py-14 sm:px-6 lg:px-8",children:r.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold text-slate-900",children:"Prêt à déposer votre projet ?"}),r.jsx("p",{className:"mt-1 text-slate-600",children:"Compte gratuit. Publication en quelques minutes."})]}),r.jsxs(V,{to:f,className:"btn-primary shrink-0",children:[x,r.jsx(At,{size:16})]})]})})]})}function X2(t){const s=t.replace(/^\//,"").split("/")[0]??"";return fw.includes(s)?s:null}function _o(){var v,b,w;const t=$n(),s=X2(t.pathname),[a,l]=g.useState(null),[o,u]=g.useState(!0),[m,f]=g.useState(null);if(g.useEffect(()=>{if(!s){u(!1),f("Page introuvable");return}u(!0),f(null),rw(s).then(l).catch(()=>{l(null),f("Page introuvable")}).finally(()=>u(!1))},[s]),o)return r.jsx("div",{className:"mx-auto max-w-3xl px-4 py-16",children:r.jsx("p",{className:"text-slate-500",children:"Chargement…"})});if(m||!a)return r.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-16",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Page introuvable"}),r.jsx("p",{className:"mt-2 text-slate-600",children:"Cette page légale n'existe pas ou n'est pas encore publiée."}),r.jsx(V,{to:"/",className:"mt-6 inline-flex text-sm font-medium text-brand hover:underline",children:"← Retour à l'accueil"})]});const x=((v=a.version)==null?void 0:v.title)||a.title,h=(b=a.version)==null?void 0:b.publishedAt;return r.jsxs("div",{children:[r.jsx("section",{className:"border-b border-slate-100 bg-slate-50",children:r.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6 lg:px-8",children:[r.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wider text-brand",children:"Informations légales"}),r.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:x}),h&&r.jsxs("p",{className:"mt-2 text-sm text-slate-500",children:["Version ",(w=a.version)==null?void 0:w.version," — publiée le"," ",new Date(h).toLocaleDateString("fr",{day:"numeric",month:"long",year:"numeric"})]}),s==="cookies"&&r.jsx("button",{type:"button",className:"btn-primary mt-6",onClick:()=>Pg(),children:"Modifier mes choix cookies"})]})}),r.jsx("section",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6 lg:px-8",children:a.version?r.jsx("div",{className:"cms-prose",dangerouslySetInnerHTML:{__html:a.version.content}}):r.jsx("div",{className:"rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-900",children:"Cette page n'a pas encore de version publiée. Le contenu sera bientôt disponible."})})]})}function md(t,s){document.title=t;let a=document.querySelector('meta[name="description"]');a||(a=document.createElement("meta"),a.name="description",document.head.appendChild(a)),s&&(a.content=s)}function J2(t){return t.replace(/<h1\b[^>]*>[\s\S]*?<\/h1>/gi,"").trim()}function eC(){var v,b;const{slug:t=""}=_r(),s=Bn(),[a,l]=g.useState(null),[o,u]=g.useState(!0),[m,f]=g.useState(null);if(g.useEffect(()=>{let w=!1;u(!0),f(null),l(null);const I=`/${t}`;return(async()=>{var z,E,_;try{const T=await iw(I);if(w)return;if(T.type==="redirect"&&T.to){const C=T.to.startsWith("/")?T.to:`/${T.to}`;window.location.replace(C);return}if(T.type==="page"&&T.page){l(T.page);const C=((z=T.page.metaTitle)==null?void 0:z.trim())||T.page.title;md(`${C} | Connecting Sponsors`,T.page.metaDescription);return}try{const C=await yh(t);if(w)return;l(C),md(`${((E=C.metaTitle)==null?void 0:E.trim())||C.title} | Connecting Sponsors`,C.metaDescription)}catch{w||f("Page introuvable")}}catch{try{const T=await yh(t);if(w)return;l(T),md(`${((_=T.metaTitle)==null?void 0:_.trim())||T.title} | Connecting Sponsors`,T.metaDescription)}catch{w||f("Page introuvable")}}finally{w||u(!1)}})(),()=>{w=!0}},[t,s]),o)return r.jsx("div",{className:"mx-auto max-w-3xl px-4 py-16",children:r.jsx("p",{className:"text-slate-500",children:"Chargement…"})});if(m||!a)return r.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-16",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Page introuvable"}),r.jsx("p",{className:"mt-2 text-slate-600",children:"Cette page n'existe pas ou n'est pas publiée."}),r.jsx(V,{to:"/",className:"mt-6 inline-flex text-sm font-medium text-brand hover:underline",children:"← Retour à l'accueil"})]});const x=Fn(a.heroImageUrl),h=((v=a.metaDescription)==null?void 0:v.trim())||null;return r.jsxs("div",{children:[r.jsx("section",{className:"border-b border-slate-100 bg-gradient-to-b from-slate-50 to-white",children:r.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6 lg:px-8 xl:mx-0 xl:max-w-none xl:pr-8",children:[r.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wider text-brand",children:"Connecting Sponsors"}),r.jsx("h1",{className:"text-3xl font-bold tracking-tight text-slate-900 sm:text-4xl",children:a.title}),h&&r.jsx("p",{className:"mt-4 max-w-2xl text-base leading-relaxed text-slate-600 sm:text-lg",children:h})]})}),x&&r.jsx("section",{className:"w-full bg-slate-100",children:r.jsx("img",{src:x,alt:((b=a.heroImageAlt)==null?void 0:b.trim())||a.title,className:"aspect-[4/3] w-full object-cover sm:aspect-[21/9]"})}),r.jsxs("div",{className:"flex flex-1 items-start gap-6 xl:gap-8",children:[r.jsx("div",{className:"min-w-0 flex-1",children:r.jsx("section",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6 lg:px-8 xl:mx-0 xl:max-w-none xl:pr-4",children:r.jsx("div",{className:"cms-prose",dangerouslySetInnerHTML:{__html:J2(a.content)}})})}),r.jsx(ll,{})]})]})}function tC(t,s,a){document.title=t;let l=document.querySelector('meta[name="description"]');l||(l=document.createElement("meta"),l.name="description",document.head.appendChild(l)),l.content=s;let o=document.querySelector('link[rel="canonical"]');o||(o=document.createElement("link"),o.rel="canonical",document.head.appendChild(o)),o.href=a}function nC(t){return t?new Date(t).toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"}):null}function sC(){const[t,s]=Hs(),a=Math.max(1,Number(t.get("page")||"1")||1),[l,o]=g.useState([]),[u,m]=g.useState(null),[f,x]=g.useState(!0),[h,v]=g.useState(null);g.useEffect(()=>{let w=!1;return x(!0),v(null),tC("Actualités | Connecting Sponsors","Retrouvez les actualités et conseils sponsoring de Connecting Sponsors.","/actualites"),_g({page:a,limit:12}).then(I=>{w||(o(I.data),m(I.meta))}).catch(()=>{w||v("Impossible de charger les actualités")}).finally(()=>{w||x(!1)}),()=>{w=!0}},[a]);const b=w=>{const I=new URLSearchParams(t);w<=1?I.delete("page"):I.set("page",String(w)),s(I)};return r.jsxs("div",{children:[r.jsx("section",{className:"border-b border-slate-100 bg-gradient-to-b from-slate-50 to-white",children:r.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6 lg:px-8 xl:mx-0 xl:max-w-none xl:pr-8",children:[r.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wider text-brand",children:"Connecting Sponsors"}),r.jsx("h1",{className:"text-3xl font-bold tracking-tight text-slate-900 sm:text-4xl",children:"Actualités"}),r.jsx("p",{className:"mt-4 max-w-2xl text-base leading-relaxed text-slate-600 sm:text-lg",children:"Conseils, analyses et actualités du sponsoring."})]})}),r.jsxs("div",{className:"flex flex-1 items-start gap-6 xl:gap-8",children:[r.jsx("div",{className:"min-w-0 flex-1",children:r.jsxs("section",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6 lg:px-8 xl:mx-0 xl:max-w-none xl:pr-4",children:[f&&r.jsx("p",{className:"text-slate-500",children:"Chargement…"}),h&&r.jsx("p",{className:"text-red-600",children:h}),!f&&!h&&l.length===0&&r.jsx("p",
302{className:"text-slate-600",children:"Aucune actualité publiée pour le moment."}),r.jsx("ul",{className:"space-y-8",children:l.map(w=>{var E,_;const I=Fn(w.heroImageUrl),z=nC(w.publishedAt);return r.jsx("li",{className:"border-b border-slate-100 pb-8 last:border-0",children:r.jsxs("article",{className:"flex flex-col gap-4 sm:flex-row sm:gap-6",children:[I&&r.jsx(V,{to:`/actualites/${w.slug}`,className:"block w-full shrink-0 overflow-hidden rounded-lg bg-slate-100 sm:w-48",children:r.jsx("img",{src:I,alt:((E=w.heroImageAlt)==null?void 0:E.trim())||w.title,className:"aspect-[16/10] h-full w-full object-cover"})}),r.jsxs("div",{className:"min-w-0 flex-1",children:[z&&r.jsx("time",{dateTime:w.publishedAt??void 0,className:"text-sm text-slate-500",children:z}),r.jsx("h2",{className:"mt-1 text-xl font-semibold text-slate-900",children:r.jsx(V,{to:`/actualites/${w.slug}`,className:"hover:text-brand hover:underline",children:w.title})}),((_=w.excerpt)==null?void 0:_.trim())&&r.jsx("p",{className:"mt-2 text-slate-600",children:w.excerpt}),r.jsx(V,{to:`/actualites/${w.slug}`,className:"mt-3 inline-flex text-sm font-medium text-brand hover:underline",children:"Lire la suite →"})]})]})},w.id)})}),u&&u.totalPages>1&&r.jsxs("div",{className:"mt-10 flex items-center justify-between gap-4",children:[r.jsx("button",{type:"button",disabled:a<=1,onClick:()=>b(a-1),className:"text-sm font-medium text-brand disabled:cursor-not-allowed disabled:text-slate-400",children:"← Précédent"}),r.jsxs("span",{className:"text-sm text-slate-500",children:["Page ",u.page," / ",u.totalPages]}),r.jsx("button",{type:"button",disabled:a>=u.totalPages,onClick:()=>b(a+1),className:"text-sm font-medium text-brand disabled:cursor-not-allowed disabled:text-slate-400",children:"Suivant →"})]})]})}),r.jsx(ll,{})]})]})}const T0={sponsoriser_sa_voiture:"sponsoriser-sa-voiture-est-ce-vraiment-possible"},rC=6e4;function Ji(t){var a;let s=t.trim();return s.startsWith("/")||(s=`/${s}`),s=((a=s.split("?")[0])==null?void 0:a.split("#")[0])??s,s.length>1&&s.endsWith("/")&&(s=s.slice(0,-1)),s}function mm(){const t={};for(const[s,a]of Object.entries(T0))t[Ji(`/actualites/${s}`)]=Ji(`/actualites/${a}`);return t}let Ko=mm(),Ro=0,Bi=null;function aC(t){const s=mm();for(const a of t)a.enabled&&(s[Ji(a.fromPath)]=Ji(a.toPath));Ko=s,Ro=Date.now()}async function iC(t){if(!(Date.now()-Ro<rC&&Object.keys(Ko).length>0))return Bi||(Bi=(async()=>{try{const s=await t();aC(s)}catch{Ro===0&&(Ko=mm(),Ro=Date.now())}finally{Bi=null}})(),Bi)}function P0(t){const s=Ji(t),a=Ko[s];return!a||a===s?null:a}function lC(t,s,a){document.title=t;let l=document.querySelector('meta[name="description"]');l||(l=document.createElement("meta"),l.name="description",document.head.appendChild(l)),s&&(l.content=s);let o=document.querySelector('link[rel="canonical"]');o||(o=document.createElement("link"),o.rel="canonical",document.head.appendChild(o)),o.href=a}function oC(t){return t.replace(/<h1\b[^>]*>[\s\S]*?<\/h1>/gi,"").trim()}function cC(t){return t?new Date(t).toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"}):null}function uC(){const{slug:t=""}=_r(),s=P0(`/actualites/${t}`);return s?r.jsx(sa,{to:s,replace:!0}):r.jsx(dC,{slug:t})}function dC({slug:t}){var v,b;const[s,a]=g.useState(null),[l,o]=g.useState(!0),[u,m]=g.useState(null);if(g.useEffect(()=>{let w=!1;return o(!0),m(null),a(null),ow(t).then(I=>{var _,T,C;if(w)return;a(I);const z=((_=I.metaTitle)==null?void 0:_.trim())||I.title,E=((T=I.metaDescription)==null?void 0:T.trim())||((C=I.excerpt)==null?void 0:C.trim())||null;lC(`${z} | Connecting Sponsors`,E,`/actualites/${I.slug}`)}).catch(()=>{w||m("Actualité introuvable")}).finally(()=>{w||o(!1)}),()=>{w=!0}},[t]),l)return r.jsx("div",{className:"mx-auto max-w-3xl px-4 py-16",children:r.jsx("p",{className:"text-slate-500",children:"Chargement…"})});if(u||!s)return r.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-16",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Actualité introuvable"}),r.jsx("p",{className:"mt-2 text-slate-600",children:"Cet article n'existe pas ou n'est pas publié."}),r.jsx(V,{to:"/actualites",className:"mt-6 inline-flex text-sm font-medium text-brand hover:underline",children:"← Retour aux actualités"})]});const f=Fn(s.heroImageUrl),x=((v=s.excerpt)==null?void 0:v.trim())||null,h=cC(s.publishedAt);return r.jsxs("div",{children:[r.jsx("section",{className:"border-b border-slate-100 bg-gradient-to-b from-slate-50 to-white",children:r.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6 lg:px-8 xl:mx-0 xl:max-w-none xl:pr-8",children:[r.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wider text-brand",children:r.jsx(V,{to:"/actualites",className:"hover:underline",children:"Actualités"})}),r.jsx("h1",{className:"text-3xl font-bold tracking-tight text-slate-900 sm:text-4xl",children:s.title}),h&&r.jsx("time",{dateTime:s.publishedAt??void 0,className:"mt-3 block text-sm text-slate-500",children:h}),x&&r.jsx("p",{className:"mt-4 max-w-2xl text-base leading-relaxed text-slate-600 sm:text-lg",children:x})]})}),f&&r.jsx("section",{className:"w-full bg-slate-100",children:r.jsx("img",{src:f,alt:((b=s.heroImageAlt)==null?void 0:b.trim())||s.title,className:"aspect-[4/3] w-full object-cover sm:aspect-[21/9]"})}),r.jsxs("div",{className:"flex flex-1 items-start gap-6 xl:gap-8",children:[r.jsx("div",{className:"min-w-0 flex-1",children:r.jsxs("section",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6 lg:px-8 xl:mx-0 xl:max-w-none xl:pr-4",children:[r.jsx("div",{className:"cms-prose",dangerouslySetInnerHTML:{__html:oC(s.content)}}),r.jsx("p",{className:"mt-10",children:r.jsx(V,{to:"/actualites",className:"text-sm font-medium text-brand hover:underline",children:"← Toutes les actualités"})})]})}),r.jsx(ll,{})]})]})}function mC({children:t}){const s=$n(),[,a]=g.useState(0);g.useEffect(()=>{let o=!1;return iC(cw).then(()=>{o||a(u=>u+1)}),()=>{o=!0}},[s.pathname]);const l=P0(s.pathname);return l?r.jsx(sa,{to:l,replace:!0}):r.jsx(r.Fragment,{children:t})}function pC(){return r.jsx(BN,{children:r.jsx(qN,{children:r.jsx(vb,{children:r.jsx(DS,{children:r.jsx(mC,{children:r.jsx(ub,{children:r.jsxs(st,{element:r.jsx(qS,{}),children:[r.jsx(st,{path:"/",element:r.jsx(XS,{})}),r.jsx(st,{path:"/recherche",element:r.jsx(n_,{})}),r.jsx(st,{path:"/projets",element:r.jsx(Yh,{})}),r.jsx(st,{path:"/projets/categorie/:categorySlug",element:r.jsx(Yh,{})}),r.jsx(st,{path:"/projets/:slug",element:r.jsx(H_,{})}),r.jsx(st,{path:"/sponsors/:slug",element:r.jsx(s_,{})}),r.jsx(st,{path:"/programme-contributeur",element:r.jsx(Z2,{})}),r.jsx(st,{path:"/proposer-sponsor",element:r.jsx(Y2,{})}),r.jsx(st,{path:"/publier",element:r.jsx(Q2,{})}),r.jsx(st,{path:"/actualites",element:r.jsx(sC,{})}),Object.entries(T0).map(([t,s])=>r.jsx(st,{path:`/actualites/${t}`,element:r.jsx(sa,{to:`/actualites/${s}`,replace:!0})},t)),r.jsx(st,{path:"/actualites/:slug",element:r.jsx(uC,{})}),r.jsx(st,{path:"/mentions-legales",element:r.jsx(_o,{})}),r.jsx(st,{path:"/cgu",element:r.jsx(_o,{})}),r.jsx(st,{path:"/politique-confidentialite",element:r.jsx(_o,{})}),r.jsx(st,{path:"/cookies",element:r.jsx(_o,{})}),r.jsx(st,{path:"/portail/connexion",element:r.jsx(W_,{})}),r.jsx(st,{path:"/portail/inscription",element:r.jsx(G_,{})}),r.jsx(st,{path:"/portail/activer",element:r.jsx(Z_,{})}),r.jsx(st,{path:"/portail/mot-de-passe-oublie",element:r.jsx(K_,{})}),r.jsx(st,{path:"/portail/reinitialiser-mot-de-passe",element:r.jsx(Y_,{})}),r.jsxs(st,{path:"/portail",element:r.jsx(Q_,{}),children:[r.jsx(st,{index:!0,element:r.jsx(a2,{})}),r.jsx(st,{path:"organisation/:companyId",element:r.jsx(G2,{})}),r.jsx(st,{path:"projets",element:r.jsx(y2,{})}),r.jsx(st,{path:"projets/nouveau",element:r.jsx(_2,{})}),r.jsx(st,{path:"projets/:id/modifier",element:r.jsx(T2,{})}),r.jsx(st,{path:"projets/:id/matching",element:r.jsx(I2,{})}),r.jsx(st,{path:"facturation",element:r.jsx(M2,{})}),r.jsx(st,{path:"documents",element:r.jsx(F2,{})}),r.jsx(st,{path:"programme-contributeur",element:r.jsx(V2,{})})]}),r.jsx(st,{path:"/:slug",element:r.jsx(eC,{})})]})})})})})})})}yv.createRoot(document.getElementById("root")).render(r.jsx(g.StrictMode,{children:r.jsx(pC,{})}));

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