PageSourceSearch

https://iqb-career-connect.lovable.app/assets/index-h8XECwSJ.js

js iqb-career-connect.lovable.app collected 2026-10-03 03:29:45 UTC 744,263 bytes, 504 lines download raw bytes

vendor: 4,703 bytes, lines 1-9
1var Um=e=>{throw TypeError(e)};var ju=(e,t,n)=>t.has(e)||Um("Cannot "+n);var B=(e,t,n)=>(ju(e,t,"read from private field"),n?n.call(e):t.get(e)),Ce=(e,t,n)=>t.has(e)?Um("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ge=(e,t,n,r)=>(ju(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),gt=(e,t,n)=>(ju(e,t,"access private method"),n);var Ia=(e,t,n,r)=>({set _(s){ge(e,t,s,n)},get _(){return B(e,t,r)}});function q1(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function K1(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Cv={exports:{}},xc={},Pv={exports:{}},we={};/**
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 ya=Symbol.for("react.element"),G1=Symbol.for("react.portal"),Y1=Symbol.for("react.fragment"),Q1=Symbol.for("react.strict_mode"),X1=Symbol.for("react.profiler"),J1=Symbol.for("react.provider"),Z1=Symbol.for("react.context"),e_=Symbol.for("react.forward_ref"),t_=Symbol.for("react.suspense"),n_=Symbol.for("react.memo"),r_=Symbol.for("react.lazy"),zm=Symbol.iterator;function s_(e){return e===null||typeof e!="object"?null:(e=zm&&e[zm]||e["@@iterator"],typeof e=="function"?e:null)}var Tv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Rv=Object.assign,Av={};function to(e,t,n){this.props=e,this.context=t,this.refs=Av,this.updater=n||Tv}to.prototype.isReactComponent={};to.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};to.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ov(){}Ov.prototype=to.prototype;function qh(e,t,n){this.props=e,this.context=t,this.refs=Av,this.updater=n||Tv}var Kh=qh.prototype=new Ov;Kh.constructor=qh;Rv(Kh,to.prototype);Kh.isPureReactComponent=!0;var Bm=Array.isArray,Dv=Object.prototype.hasOwnProperty,Gh={current:null},Mv={key:!0,ref:!0,__self:!0,__source:!0};function Iv(e,t,n){var r,s={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)Dv.call(t,r)&&!Mv.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:ya,type:e,key:o,ref:a,props:s,_owner:Gh.current}}function i_(e,t){return{$$typeof:ya,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Yh(e){return typeof e=="object"&&e!==null&&e.$$typeof===ya}function o_(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Wm=/\/+/g;function _u(e,t){return typeof e=="object"&&e!==null&&e.key!=null?o_(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 9-17
9function vl(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case ya:case G1:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+_u(a,0):r,Bm(s)?(n="",e!=null&&(n=e.replace(Wm,"$&/")+"/"),vl(s,t,n,"",function(u){return u})):s!=null&&(Yh(s)&&(s=i_(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(Wm,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",Bm(e))for(var l=0;l<e.length;l++){o=e[l];var c=r+_u(o,l);a+=vl(o,t,n,c,s)}else if(c=s_(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=r+_u(o,l++),a+=vl(o,t,n,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function La(e,t,n){if(e==null)return e;var r=[],s=0;return vl(e,r,"","",function(o){return t.call(n,o,s++)}),r}function a_(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var At={current:null},xl={transition:null},l_={ReactCurrentDispatcher:At,ReactCurrentBatchConfig:xl,ReactCurrentOwner:Gh};function Lv(){throw Error("act(...) is not supported in production builds of React.")}we.Children={map:La,forEach:function(e,t,n){La(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return La(e,function(){t++}),t},toArray:function(e){return La(e,function(t){return t})||[]},only:function(e){if(!Yh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Component=to;we.Fragment=Y1;we.Profiler=X1;we.PureComponent=qh;we.StrictMode=Q1;we.Suspense=t_;we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=l_;we.act=Lv;we.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Rv({},e.props),s=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=Gh.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Dv.call(t,c)&&!Mv.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:ya,type:e.type,key:s,ref:o,props:r,_owner:a}};we.createContext=function(e){return e={$$typeof:Z1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:J1,_context:e},e.Consumer=e};we.createElement=Iv;we.createFactory=function(e){var t=Iv.bind(null,e);return t.type=e,t};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:e_,render:e}};we.isValidElement=Yh;we.lazy=function(e){return{$$typeof:r_,_payload:{_status:-1,_result:e},_init:a_}};we.memo=function(e,t){return{$$typeof:n_,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=xl.transition;xl.transition={};try{e()}finally{xl.transition=t}};we.unstable_act=Lv;we.useCallback=function(e,t){return At.current.useCallback(e,t)};we.useContext=function(e){return At.current.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e){return At.current.useDeferredValue(e)};we.useEffect=function(e,t){return At.current.useEffect(e,t)};we.useId=function(){return At.current.useId()};we.useImperativeHandle=function(e,t,n){return At.current.useImperativeHandle(e,t,n)};we.useInsertionEffect=function(e,t){return At.current.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return At.current.useLayoutEffect(e,t)};we.useMemo=function(e,t){return At.current.useMemo(e,t)};we.useReducer=function(e,t,n){return At.current.useReducer(e,t,n)};we.useRef=function(e){return At.current.useRef(e)};we.useState=function(e){return At.current.useState(e)};we.useSyncExternalStore=function(e,t,n){return At.current.useSyncExternalStore(e,t,n)};we.useTransition=function(){return At.current.useTransition()};we.version="18.3.1";Pv.exports=we;var f=Pv.exports;const G=kv(f),Qh=q1({__proto__:null,default:G},[f]);/**
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 c_=f,u_=Symbol.for("react.element"),d_=Symbol.for("react.fragment"),h_=Object.prototype.hasOwnProperty,f_=c_.__SECRET_INT
vendor: 11,393 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m_={key:!0,ref:!0,__self:!0,__source:!0};function Fv(e,t,n){var r,s={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)h_.call(t,r)&&!m_.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:u_,type:e,key:o,ref:a,props:s,_owner:f_.current}}xc.Fragment=d_;xc.jsx=Fv;xc.jsxs=Fv;Cv.exports=xc;var i=Cv.exports,$v={exports:{}},en={},Uv={exports:{}},zv={};/**
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 */(function(e){function t(T,I){var D=T.length;T.push(I);e:for(;0<D;){var U=D-1>>>1,K=T[U];if(0<s(K,I))T[U]=I,T[D]=K,D=U;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var I=T[0],D=T.pop();if(D!==I){T[0]=D;e:for(var U=0,K=T.length,q=K>>>1;U<q;){var Q=2*(U+1)-1,V=T[Q],X=Q+1,ee=T[X];if(0>s(V,D))X<K&&0>s(ee,V)?(T[U]=ee,T[X]=D,U=X):(T[U]=V,T[Q]=D,U=Q);else if(X<K&&0>s(ee,D))T[U]=ee,T[X]=D,U=X;else break e}}return I}function s(T,I){var D=T.sortIndex-I.sortIndex;return D!==0?D:T.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,m=3,v=!1,b=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(T){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=T)r(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(u)}}function _(T){if(x=!1,y(T),!b)if(n(c)!==null)b=!0,A(E);else{var I=n(u);I!==null&&L(_,I.startTime-T)}}function E(T,I){b=!1,x&&(x=!1,g(S),S=-1),v=!0;var D=m;try{for(y(I),h=n(c);h!==null&&(!(h.expirationTime>I)||T&&!P());){var U=h.callback;if(typeof U=="function"){h.callback=null,m=h.priorityLevel;var K=U(h.expirationTime<=I);I=e.unstable_now(),typeof K=="function"?h.callback=K:h===n(c)&&r(c),y(I)}else r(c);h=n(c)}if(h!==null)var q=!0;else{var Q=n(u);Q!==null&&L(_,Q.startTime-I),q=!1}return q}finally{h=null,m=D,v=!1}}var C=!1,j=null,S=-1,k=5,N=-1;function P(){return!(e.unstable_now()-N<k)}function M(){if(j!==null){var T=e.unstable_now();N=T;var I=!0;try{I=j(!0,T)}finally{I?W():(C=!1,j=null)}}else C=!1}var W;if(typeof p=="function")W=function(){p(M)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,R=F.port2;F.port1.onmessage=M,W=function(){R.postMessage(null)}}else W=function(){w(M,0)};function A(T){j=T,C||(C=!0,W())}function L(T,I){S=w(function(){T(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,A(E))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(T){switch(m){case 1:case 2:case 3:var I=3;break;default:I=m}var D=m;m=I;try{return T()}finally{m=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,I){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var D=m;m=T;try{return I()}finally{m=D}},e.unstable_scheduleCallback=function(T,I,D){var U=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?U+D:U):D=U,T){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=D+K,T={id:d++,callback:I,priorityLevel:T,startTime:D,expirationTime:K,sortIndex:-1},D>U?(T.sortIndex=D,t(u,T),n(c)===null&&T===n(u)&&(x?(g(S),S=-1):x=!0,L(_,D-U))):(T.sortIndex=K,t(c,T),b||v||(b=!0,A(E))),T},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(T){var I=m;return function(){var D=m;m=I;try{return T.apply(this,arguments)}finally{m=D}}}})(zv);Uv.exports=zv;var p_=Uv.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 g_=f,Jt=p_;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Bv=new Set,Ho={};function Us(e,t){Bi(e,t),Bi(e+"Capture",t)}function Bi(e,t){for(Ho[e]=t,e=0;e<t.length;e++)Bv.add(t[e])}var lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yd=Object.prototype.hasOwnProperty,v_=/^[: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]*$/,Vm={},Hm={};function x_(e){return yd.call(Hm,e)?!0:yd.call(Vm,e)?!1:v_.test(e)?Hm[e]=!0:(Vm[e]=!0,!1)}function y_(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function w_(e,t,n,r){if(t===null||typeof t>"u"||y_(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ot(e,t,n,r,s,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pt[e]=new Ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pt[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pt[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pt[e]=new Ot(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){pt[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pt[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pt[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pt[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pt[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xh=/[\-:]([a-z])/g;function Jh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Xh,Jh);pt[t]=new Ot(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Xh,Jh);pt[t]=new Ot(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Xh,Jh);pt[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});pt.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function Zh(e,t,n,r){var s=pt.hasOwnProperty(t)?pt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(w_(t,n,s,r)&&(n=null),r||s===null?x_(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var mr=g_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Fa=Symbol.for("react.element"),di=Symbol.for("react.portal"),hi=Symbol.for("react.fragment"),ef=Symbol.for("react.strict_mode"),wd=Symbol.for("react.profiler"),Wv=Symbol.for("react.provider"),Vv=Symbol.for("react.context"),tf=Symbol.for("react.forward_ref"),bd=Symbol.for("react.suspense"),jd=Symbol.for("react.suspense_list"),nf=Symbol.for("react.memo"),Er=Symbol.for("react.lazy"),Hv=Symbol.for("react.offscreen"),qm=Symbol.iterator;function mo(e){return e===null||typeof e!="object"?null:(e=qm&&e[qm]||e["@@iterator"],typeof e=="function"?e:null)}var Ke=Object.assign,Su;function ko(e){if(Su===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Su=t&&t[1]||""}return`
34`+Su+e}var Nu=!1;function Eu(e,t){if(!e||Nu)return"";Nu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 15,597 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),o=r.stack.split(`
36`),a=s.length-1,l=o.length-1;1<=a&&0<=l&&s[a]!==o[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==o[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==o[l]){var c=`
37`+s[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{Nu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ko(e):""}function b_(e){switch(e.tag){case 5:return ko(e.type);case 16:return ko("Lazy");case 13:return ko("Suspense");case 19:return ko("SuspenseList");case 0:case 2:case 15:return e=Eu(e.type,!1),e;case 11:return e=Eu(e.type.render,!1),e;case 1:return e=Eu(e.type,!0),e;default:return""}}function _d(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 hi:return"Fragment";case di:return"Portal";case wd:return"Profiler";case ef:return"StrictMode";case bd:return"Suspense";case jd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Vv:return(e.displayName||"Context")+".Consumer";case Wv:return(e._context.displayName||"Context")+".Provider";case tf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nf:return t=e.displayName||null,t!==null?t:_d(e.type)||"Memo";case Er:t=e._payload,e=e._init;try{return _d(e(t))}catch{}}return null}function j_(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _d(t);case 8:return t===ef?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Yr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function __(e){var t=qv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $a(e){e._valueTracker||(e._valueTracker=__(e))}function Kv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Dl(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 Sd(e,t){var n=t.checked;return Ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Km(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Yr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gv(e,t){t=t.checked,t!=null&&Zh(e,"checked",t,!1)}function Nd(e,t){Gv(e,t);var n=Yr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ed(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ed(e,t.type,Yr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Gm(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ed(e,t,n){(t!=="number"||Dl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Co=Array.isArray;function _i(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Yr(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function kd(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return Ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ym(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(Co(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Yr(n)}}function Yv(e,t){var n=Yr(t.value),r=Yr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Qm(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Qv(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 Cd(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Qv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ua,Xv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ua=Ua||document.createElement("div"),Ua.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ua.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Oo={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},S_=["Webkit","ms","Moz","O"];Object.keys(Oo).forEach(function(e){S_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Oo[t]=Oo[e]})});function Jv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Oo.hasOwnProperty(e)&&Oo[e]?(""+t).trim():t+"px"}function Zv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Jv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var N_=Ke({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 Pd(e,t){if(t){if(N_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Td(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rd=null;function rf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ad=null,Si=null,Ni=null;function Xm(e){if(e=ja(e)){if(typeof Ad!="function")throw Error(H(280));var t=e.stateNode;t&&(t=_c(t),Ad(e.stateNode,e.type,t))}}function ex(e){Si?Ni?Ni.push(e):Ni=[e]:Si=e}function tx(){if(Si){var e=Si,t=Ni;if(Ni=Si=null,Xm(e),t)for(e=0;e<t.length;e++)Xm(t[e])}}function nx(e,t){return e(t)}function rx(){}var ku=!1;function sx(e,t,n){if(ku)return e(t,n);ku=!0;try{return nx(e,t,n)}finally{ku=!1,(Si!==null||Ni!==null)&&(rx(),tx())}}function Ko(e,t){var n=e.stateNode;if(n===null)return null;var r=_c(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(H(231,t,typeof n));return n}var Od=!1;if(lr)try{var po={};Object.defineProperty(po,"passive",{get:function(){Od=!0}}),window.addEventListener("test",po,po),window.removeEventListener("test",po,po)}catch{Od=!1}function E_(e,t,n,r,s,o,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Do=!1,Ml=null,Il=!1,Dd=null,k_={onError:function(e){Do=!0,Ml=e}};function C_(e,t,n,r,s,o,a,l,c){Do=!1,Ml=null,E_.apply(k_,arguments)}function P_(e,t,n,r,s,o,a,l,c){if(C_.apply(this,arguments),Do){if(Do){var u=Ml;Do=!1,Ml=null}else throw Error(H(198));Il||(Il=!0,Dd=u)}}function zs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ix(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Jm(e){if(zs(e)!==e)throw Error(H(188))}function T_(e){var t=e.alternate;if(!t){if(t=zs(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return Jm(s),e;if(o===r)return Jm(s),t;o=o.sibling}throw Error(H(188))}if(n.return!==r.return)n=s,r=o;else{for(var a=!1,l=s.child;l;){if(l===n){a=!0,n=s,r=o;break}if(l===r){a=!0,r=s,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=s;break}if(l===r){a=!0,r=o,n=s;break}l=l.sibling}if(!a)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function ox(e){return e=T_(e),e!==null?ax(e):null}function ax(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ax(e);if(t!==null)return t;e=e.sibling}return null}var lx=Jt.unstable_scheduleCallback,Zm=Jt.unstable_cancelCallback,R_=Jt.unstable_shouldYield,A_=Jt.unstable_requestPaint,Qe=Jt.unstable_now,O_=Jt.unstable_getCurrentPriorityLevel,sf=Jt.unstable_ImmediatePriority,cx=Jt.unstable_UserBlockingPriority,Ll=Jt.unstable_NormalPriority,D_=Jt.unstable_LowPriority,ux=Jt.unstable_IdlePriority,yc=null,Un=null;function M_(e){if(Un&&typeof Un.onCommitFiberRoot=="function")try{Un.onCommitFiberRoot(yc,e,void 0,(e.current.flags&128)===128)}catch{}}var Sn=Math.clz32?Math.clz32:F_,I_=Math.log,L_=Math.LN2;function F_(e){return e>>>=0,e===0?32:31-(I_(e)/L_|0)|0}var za=64,Ba=4194304;function Po(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 Fl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~s;l!==0?r=Po(l):(o&=a,o!==0&&(r=Po(o)))}else a=n&~s,a!==0?r=Po(a):o!==0&&(r=Po(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Sn(t),s=1<<n,r|=e[n],t&=~s;return r}function $_(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function U_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Sn(o),l=1<<a,c=s[a];c===-1?(!(l&n)||l&r)&&(s[a]=$_(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function Md(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dx(){var e=za;return za<<=1,!(za&4194240)&&(za=64),e}function Cu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Sn(t),e[t]=n}function z_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Sn(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function of(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Sn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Te=0;function hx(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var fx,af,mx,px,gx,Id=!1,Wa=[],Ur=null,zr=null,Br=null,Go=new Map,Yo=new Map,Pr=[],B_="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 ep(e,t){switch(e){case"focusin":case"focusout":Ur=null;break;case"dragenter":case"dragleave":zr=null;break;case"mouseover":case"mouseout":Br=null;break;case"pointerover":case"pointerout":Go.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yo.delete(t.pointerId)}}function go(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=ja(t),t!==null&&af(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}
vendor: 12,981 bytes, line 37
37function W_(e,t,n,r,s){switch(t){case"focusin":return Ur=go(Ur,e,t,n,r,s),!0;case"dragenter":return zr=go(zr,e,t,n,r,s),!0;case"mouseover":return Br=go(Br,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return Go.set(o,go(Go.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,Yo.set(o,go(Yo.get(o)||null,e,t,n,r,s)),!0}return!1}function vx(e){var t=gs(e.target);if(t!==null){var n=zs(t);if(n!==null){if(t=n.tag,t===13){if(t=ix(n),t!==null){e.blockedOn=t,gx(e.priority,function(){mx(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ld(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Rd=r,n.target.dispatchEvent(r),Rd=null}else return t=ja(n),t!==null&&af(t),e.blockedOn=n,!1;t.shift()}return!0}function tp(e,t,n){yl(e)&&n.delete(t)}function V_(){Id=!1,Ur!==null&&yl(Ur)&&(Ur=null),zr!==null&&yl(zr)&&(zr=null),Br!==null&&yl(Br)&&(Br=null),Go.forEach(tp),Yo.forEach(tp)}function vo(e,t){e.blockedOn===t&&(e.blockedOn=null,Id||(Id=!0,Jt.unstable_scheduleCallback(Jt.unstable_NormalPriority,V_)))}function Qo(e){function t(s){return vo(s,e)}if(0<Wa.length){vo(Wa[0],e);for(var n=1;n<Wa.length;n++){var r=Wa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ur!==null&&vo(Ur,e),zr!==null&&vo(zr,e),Br!==null&&vo(Br,e),Go.forEach(t),Yo.forEach(t),n=0;n<Pr.length;n++)r=Pr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Pr.length&&(n=Pr[0],n.blockedOn===null);)vx(n),n.blockedOn===null&&Pr.shift()}var Ei=mr.ReactCurrentBatchConfig,$l=!0;function H_(e,t,n,r){var s=Te,o=Ei.transition;Ei.transition=null;try{Te=1,lf(e,t,n,r)}finally{Te=s,Ei.transition=o}}function q_(e,t,n,r){var s=Te,o=Ei.transition;Ei.transition=null;try{Te=4,lf(e,t,n,r)}finally{Te=s,Ei.transition=o}}function lf(e,t,n,r){if($l){var s=Ld(e,t,n,r);if(s===null)Fu(e,t,r,Ul,n),ep(e,r);else if(W_(s,e,t,n,r))r.stopPropagation();else if(ep(e,r),t&4&&-1<B_.indexOf(e)){for(;s!==null;){var o=ja(s);if(o!==null&&fx(o),o=Ld(e,t,n,r),o===null&&Fu(e,t,r,Ul,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Fu(e,t,r,null,n)}}var Ul=null;function Ld(e,t,n,r){if(Ul=null,e=rf(r),e=gs(e),e!==null)if(t=zs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ix(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ul=e,null}function xx(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(O_()){case sf:return 1;case cx:return 4;case Ll:case D_:return 16;case ux:return 536870912;default:return 16}default:return 16}}var Lr=null,cf=null,wl=null;function yx(){if(wl)return wl;var e,t=cf,n=t.length,r,s="value"in Lr?Lr.value:Lr.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[o-r];r++);return wl=s.slice(e,1<r?1-r:void 0)}function bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Va(){return!0}function np(){return!1}function tn(e){function t(n,r,s,o,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Va:np,this.isPropagationStopped=np,this}return Ke(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Va)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Va)},persist:function(){},isPersistent:Va}),t}var no={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},uf=tn(no),ba=Ke({},no,{view:0,detail:0}),K_=tn(ba),Pu,Tu,xo,wc=Ke({},ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:df,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!==xo&&(xo&&e.type==="mousemove"?(Pu=e.screenX-xo.screenX,Tu=e.screenY-xo.screenY):Tu=Pu=0,xo=e),Pu)},movementY:function(e){return"movementY"in e?e.movementY:Tu}}),rp=tn(wc),G_=Ke({},wc,{dataTransfer:0}),Y_=tn(G_),Q_=Ke({},ba,{relatedTarget:0}),Ru=tn(Q_),X_=Ke({},no,{animationName:0,elapsedTime:0,pseudoElement:0}),J_=tn(X_),Z_=Ke({},no,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),eS=tn(Z_),tS=Ke({},no,{data:0}),sp=tn(tS),nS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rS={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"},sS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sS[e])?!!t[e]:!1}function df(){return iS}var oS=Ke({},ba,{key:function(e){if(e.key){var t=nS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:df,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),aS=tn(oS),lS=Ke({},wc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ip=tn(lS),cS=Ke({},ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:df}),uS=tn(cS),dS=Ke({},no,{propertyName:0,elapsedTime:0,pseudoElement:0}),hS=tn(dS),fS=Ke({},wc,{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}),mS=tn(fS),pS=[9,13,27,32],hf=lr&&"CompositionEvent"in window,Mo=null;lr&&"documentMode"in document&&(Mo=document.documentMode);var gS=lr&&"TextEvent"in window&&!Mo,wx=lr&&(!hf||Mo&&8<Mo&&11>=Mo),op=" ",ap=!1;function bx(e,t){switch(e){case"keyup":return pS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fi=!1;function vS(e,t){switch(e){case"compositionend":return jx(t);case"keypress":return t.which!==32?null:(ap=!0,op);case"textInput":return e=t.data,e===op&&ap?null:e;default:return null}}function xS(e,t){if(fi)return e==="compositionend"||!hf&&bx(e,t)?(e=yx(),wl=cf=Lr=null,fi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return wx&&t.locale!=="ko"?null:t.data;default:return null}}var yS={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 lp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yS[e.type]:t==="textarea"}function _x(e,t,n,r){ex(r),t=zl(t,"onChange"),0<t.length&&(n=new uf("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Io=null,Xo=null;function wS(e){Dx(e,0)}function bc(e){var t=gi(e);if(Kv(t))return e}function bS(e,t){if(e==="change")return t}var Sx=!1;if(lr){var Au;if(lr){var Ou="oninput"in document;if(!Ou){var cp=document.createElement("div");cp.setAttribute("oninput","return;"),Ou=typeof cp.oninput=="function"}Au=Ou}else Au=!1;Sx=Au&&(!document.documentMode||9<document.documentMode)}function up(){Io&&(Io.detachEvent("onpropertychange",Nx),Xo=Io=null)}function Nx(e){if(e.propertyName==="value"&&bc(Xo)){var t=[];_x(t,Xo,e,rf(e)),sx(wS,t)}}function jS(e,t,n){e==="focusin"?(up(),Io=t,Xo=n,Io.attachEvent("onpropertychange",Nx)):e==="focusout"&&up()}function _S(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bc(Xo)}function SS(e,t){if(e==="click")return bc(t)}function NS(e,t){if(e==="input"||e==="change")return bc(t)}function ES(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:ES;function Jo(e,t){if(En(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!yd.call(t,s)||!En(e[s],t[s]))return!1}return!0}function dp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hp(e,t){var n=dp(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=dp(n)}}function Ex(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ex(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kx(){for(var e=window,t=Dl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dl(e.document)}return t}function ff(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function kS(e){var t=kx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ex(n.ownerDocument.documentElement,n)){if(r!==null&&ff(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=hp(n,o);var a=hp(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var CS=lr&&"documentMode"in document&&11>=document.documentMode,mi=null,Fd=null,Lo=null,$d=!1;function fp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$d||mi==null||mi!==Dl(r)||(r=mi,"selectionStart"in r&&ff(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,352 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),Lo&&Jo(Lo,r)||(Lo=r,r=zl(Fd,"onSelect"),0<r.length&&(t=new uf("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mi)))}function Ha(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var pi={animationend:Ha("Animation","AnimationEnd"),animationiteration:Ha("Animation","AnimationIteration"),animationstart:Ha("Animation","AnimationStart"),transitionend:Ha("Transition","TransitionEnd")},Du={},Cx={};lr&&(Cx=document.createElement("div").style,"AnimationEvent"in window||(delete pi.animationend.animation,delete pi.animationiteration.animation,delete pi.animationstart.animation),"TransitionEvent"in window||delete pi.transitionend.transition);function jc(e){if(Du[e])return Du[e];if(!pi[e])return e;var t=pi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Cx)return Du[e]=t[n];return e}var Px=jc("animationend"),Tx=jc("animationiteration"),Rx=jc("animationstart"),Ax=jc("transitionend"),Ox=new Map,mp="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 rs(e,t){Ox.set(e,t),Us(t,[e])}for(var Mu=0;Mu<mp.length;Mu++){var Iu=mp[Mu],PS=Iu.toLowerCase(),TS=Iu[0].toUpperCase()+Iu.slice(1);rs(PS,"on"+TS)}rs(Px,"onAnimationEnd");rs(Tx,"onAnimationIteration");rs(Rx,"onAnimationStart");rs("dblclick","onDoubleClick");rs("focusin","onFocus");rs("focusout","onBlur");rs(Ax,"onTransitionEnd");Bi("onMouseEnter",["mouseout","mouseover"]);Bi("onMouseLeave",["mouseout","mouseover"]);Bi("onPointerEnter",["pointerout","pointerover"]);Bi("onPointerLeave",["pointerout","pointerover"]);Us("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Us("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Us("onBeforeInput",["compositionend","keypress","textInput","paste"]);Us("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Us("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Us("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var To="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(" "),RS=new Set("cancel close invalid load scroll toggle".split(" ").concat(To));function pp(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,P_(r,t,void 0,e),e.currentTarget=null}function Dx(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;pp(s,l,u),o=c}else for(a=0;a<r.length;a++){if(l=r[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;pp(s,l,u),o=c}}}if(Il)throw e=Dd,Il=!1,Dd=null,e}function Ue(e,t){var n=t[Vd];n===void 0&&(n=t[Vd]=new Set);var r=e+"__bubble";n.has(r)||(Mx(t,e,2,!1),n.add(r))}function Lu(e,t,n){var r=0;t&&(r|=4),Mx(n,e,r,t)}var qa="_reactListening"+Math.random().toString(36).slice(2);function Zo(e){if(!e[qa]){e[qa]=!0,Bv.forEach(function(n){n!=="selectionchange"&&(RS.has(n)||Lu(n,!1,e),Lu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qa]||(t[qa]=!0,Lu("selectionchange",!1,t))}}function Mx(e,t,n,r){switch(xx(t)){case 1:var s=H_;break;case 4:s=q_;break;default:s=lf}n=s.bind(null,t,n,e),s=void 0,!Od||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}
vendor: 4,454 bytes, line 37
37function Fu(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;l!==null;){if(a=gs(l),a===null)return;if(c=a.tag,c===5||c===6){r=o=a;continue e}l=l.parentNode}}r=r.return}sx(function(){var u=o,d=rf(n),h=[];e:{var m=Ox.get(e);if(m!==void 0){var v=uf,b=e;switch(e){case"keypress":if(bl(n)===0)break e;case"keydown":case"keyup":v=aS;break;case"focusin":b="focus",v=Ru;break;case"focusout":b="blur",v=Ru;break;case"beforeblur":case"afterblur":v=Ru;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=rp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=Y_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=uS;break;case Px:case Tx:case Rx:v=J_;break;case Ax:v=hS;break;case"scroll":v=K_;break;case"wheel":v=mS;break;case"copy":case"cut":case"paste":v=eS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=ip}var x=(t&4)!==0,w=!x&&e==="scroll",g=x?m!==null?m+"Capture":null:m;x=[];for(var p=u,y;p!==null;){y=p;var _=y.stateNode;if(y.tag===5&&_!==null&&(y=_,g!==null&&(_=Ko(p,g),_!=null&&x.push(ea(p,_,y)))),w)break;p=p.return}0<x.length&&(m=new v(m,b,null,n,d),h.push({event:m,listeners:x}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&n!==Rd&&(b=n.relatedTarget||n.fromElement)&&(gs(b)||b[cr]))break e;if((v||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,v?(b=n.relatedTarget||n.toElement,v=u,b=b?gs(b):null,b!==null&&(w=zs(b),b!==w||b.tag!==5&&b.tag!==6)&&(b=null)):(v=null,b=u),v!==b)){if(x=rp,_="onMouseLeave",g="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(x=ip,_="onPointerLeave",g="onPointerEnter",p="pointer"),w=v==null?m:gi(v),y=b==null?m:gi(b),m=new x(_,p+"leave",v,n,d),m.target=w,m.relatedTarget=y,_=null,gs(d)===u&&(x=new x(g,p+"enter",b,n,d),x.target=y,x.relatedTarget=w,_=x),w=_,v&&b)t:{for(x=v,g=b,p=0,y=x;y;y=Zs(y))p++;for(y=0,_=g;_;_=Zs(_))y++;for(;0<p-y;)x=Zs(x),p--;for(;0<y-p;)g=Zs(g),y--;for(;p--;){if(x===g||g!==null&&x===g.alternate)break t;x=Zs(x),g=Zs(g)}x=null}else x=null;v!==null&&gp(h,m,v,x,!1),b!==null&&w!==null&&gp(h,w,b,x,!0)}}e:{if(m=u?gi(u):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var E=bS;else if(lp(m))if(Sx)E=NS;else{E=_S;var C=jS}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(E=SS);if(E&&(E=E(e,u))){_x(h,E,n,d);break e}C&&C(e,m,u),e==="focusout"&&(C=m._wrapperState)&&C.controlled&&m.type==="number"&&Ed(m,"number",m.value)}switch(C=u?gi(u):window,e){case"focusin":(lp(C)||C.contentEditable==="true")&&(mi=C,Fd=u,Lo=null);break;case"focusout":Lo=Fd=mi=null;break;case"mousedown":$d=!0;break;case"contextmenu":case"mouseup":case"dragend":$d=!1,fp(h,n,d);break;case"selectionchange":if(CS)break;case"keydown":case"keyup":fp(h,n,d)}var j;if(hf)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else fi?bx(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(wx&&n.locale!=="ko"&&(fi||S!=="onCompositionStart"?S==="onCompositionEnd"&&fi&&(j=yx()):(Lr=d,cf="value"in Lr?Lr.value:Lr.textContent,fi=!0)),C=zl(u,S),0<C.length&&(S=new sp(S,e,null,n,d),h.push({event:S,listeners:C}),j?S.data=j:(j=jx(n),j!==null&&(S.data=j)))),(j=gS?vS(e,n):xS(e,n))&&(u=zl(u,"onBeforeInput"),0<u.length&&(d=new sp("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=j))}Dx(h,t)})}function ea(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zl(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Ko(e,n),o!=null&&r.unshift(ea(e,o,s)),o=Ko(e,t),o!=null&&r.push(ea(e,o,s))),e=e.return}return r}function Zs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}
vendor: 4,594 bytes, lines 37-38
37function gp(e,t,n,r,s){for(var o=t._reactName,a=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=Ko(n,o),c!=null&&a.unshift(ea(n,c,l))):s||(c=Ko(n,o),c!=null&&a.push(ea(n,c,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var AS=/\r\n?/g,OS=/\u0000|\uFFFD/g;function vp(e){return(typeof e=="string"?e:""+e).replace(AS,`
38`).replace(OS,"")}function Ka(e,t,n){if(t=vp(t),vp(e)!==t&&n)throw Error(H(425))}function Bl(){}var Ud=null,zd=null;function Bd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=typeof setTimeout=="function"?setTimeout:void 0,DS=typeof clearTimeout=="function"?clearTimeout:void 0,xp=typeof Promise=="function"?Promise:void 0,MS=typeof queueMicrotask=="function"?queueMicrotask:typeof xp<"u"?function(e){return xp.resolve(null).then(e).catch(IS)}:Wd;function IS(e){setTimeout(function(){throw e})}function $u(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Qo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Qo(t)}function Wr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function yp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ro=Math.random().toString(36).slice(2),Fn="__reactFiber$"+ro,ta="__reactProps$"+ro,cr="__reactContainer$"+ro,Vd="__reactEvents$"+ro,LS="__reactListeners$"+ro,FS="__reactHandles$"+ro;function gs(e){var t=e[Fn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cr]||n[Fn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yp(e);e!==null;){if(n=e[Fn])return n;e=yp(e)}return t}e=n,n=e.parentNode}return null}function ja(e){return e=e[Fn]||e[cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function gi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function _c(e){return e[ta]||null}var Hd=[],vi=-1;function ss(e){return{current:e}}function ze(e){0>vi||(e.current=Hd[vi],Hd[vi]=null,vi--)}function Le(e,t){vi++,Hd[vi]=e.current,e.current=t}var Qr={},jt=ss(Qr),$t=ss(!1),ks=Qr;function Wi(e,t){var n=e.type.contextTypes;if(!n)return Qr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ut(e){return e=e.childContextTypes,e!=null}function Wl(){ze($t),ze(jt)}function wp(e,t,n){if(jt.current!==Qr)throw Error(H(168));Le(jt,t),Le($t,n)}function Ix(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(H(108,j_(e)||"Unknown",s));return Ke({},n,r)}function Vl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qr,ks=jt.current,Le(jt,e),Le($t,$t.current),!0}function bp(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=Ix(e,t,ks),r.__reactInternalMemoizedMergedChildContext=e,ze($t),ze(jt),Le(jt,e)):ze($t),Le($t,n)}var Jn=null,Sc=!1,Uu=!1;function Lx(e){Jn===null?Jn=[e]:Jn.push(e)}function $S(e){Sc=!0,Lx(e)}function is(){if(!Uu&&Jn!==null){Uu=!0;var e=0,t=Te;try{var n=Jn;for(Te=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Jn=null,Sc=!1}catch(s){throw Jn!==null&&(Jn=Jn.slice(e+1)),lx(sf,is),s}finally{Te=t,Uu=!1}}return null}var xi=[],yi=0,Hl=null,ql=0,sn=[],on=0,Cs=null,tr=1,nr="";function ds(e,t){xi[yi++]=ql,xi[yi++]=Hl,Hl=e,ql=t}function Fx(e,t,n){sn[on++]=tr,sn[on++]=nr,sn[on++]=Cs,Cs=e;var r=tr;e=nr;var s=32-Sn(r)-1;r&=~(1<<s),n+=1;var o=32-Sn(t)+s;if(30<o){var a=s-s%5;o=(r&(1<<a)-1).toString(32),r>>=a,s-=a,tr=1<<32-Sn(t)+s|n<<s|r,nr=o+e}else tr=1<<o|n<<s|r,nr=e}function mf(e){e.return!==null&&(ds(e,1),Fx(e,1,0))}function pf(e){for(;e===Hl;)Hl=xi[--yi],xi[yi]=null,ql=xi[--yi],xi[yi]=null;for(;e===Cs;)Cs=sn[--on],sn[on]=null,nr=sn[--on],sn[on]=null,tr=sn[--on],sn[on]=null}var Qt=null,Gt=null,Ve=!1,_n=null;function $x(e,t){var n=an(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function jp(e,t){switch(e.tag){case 5:var n=e.type;
vendor: 26,837 bytes, lines 38-40
38return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Qt=e,Gt=Wr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Qt=e,Gt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Cs!==null?{id:tr,overflow:nr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=an(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Qt=e,Gt=null,!0):!1;default:return!1}}function qd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Kd(e){if(Ve){var t=Gt;if(t){var n=t;if(!jp(e,t)){if(qd(e))throw Error(H(418));t=Wr(n.nextSibling);var r=Qt;t&&jp(e,t)?$x(r,n):(e.flags=e.flags&-4097|2,Ve=!1,Qt=e)}}else{if(qd(e))throw Error(H(418));e.flags=e.flags&-4097|2,Ve=!1,Qt=e}}}function _p(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Qt=e}function Ga(e){if(e!==Qt)return!1;if(!Ve)return _p(e),Ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Bd(e.type,e.memoizedProps)),t&&(t=Gt)){if(qd(e))throw Ux(),Error(H(418));for(;t;)$x(e,t),t=Wr(t.nextSibling)}if(_p(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Gt=Wr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Gt=null}}else Gt=Qt?Wr(e.stateNode.nextSibling):null;return!0}function Ux(){for(var e=Gt;e;)e=Wr(e.nextSibling)}function Vi(){Gt=Qt=null,Ve=!1}function gf(e){_n===null?_n=[e]:_n.push(e)}var US=mr.ReactCurrentBatchConfig;function yo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var l=s.refs;a===null?delete l[o]:l[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function Ya(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sp(e){var t=e._init;return t(e._payload)}function zx(e){function t(g,p){if(e){var y=g.deletions;y===null?(g.deletions=[p],g.flags|=16):y.push(p)}}function n(g,p){if(!e)return null;for(;p!==null;)t(g,p),p=p.sibling;return null}function r(g,p){for(g=new Map;p!==null;)p.key!==null?g.set(p.key,p):g.set(p.index,p),p=p.sibling;return g}function s(g,p){return g=Kr(g,p),g.index=0,g.sibling=null,g}function o(g,p,y){return g.index=y,e?(y=g.alternate,y!==null?(y=y.index,y<p?(g.flags|=2,p):y):(g.flags|=2,p)):(g.flags|=1048576,p)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,p,y,_){return p===null||p.tag!==6?(p=Ku(y,g.mode,_),p.return=g,p):(p=s(p,y),p.return=g,p)}function c(g,p,y,_){var E=y.type;return E===hi?d(g,p,y.props.children,_,y.key):p!==null&&(p.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Er&&Sp(E)===p.type)?(_=s(p,y.props),_.ref=yo(g,p,y),_.return=g,_):(_=Cl(y.type,y.key,y.props,null,g.mode,_),_.ref=yo(g,p,y),_.return=g,_)}function u(g,p,y,_){return p===null||p.tag!==4||p.stateNode.containerInfo!==y.containerInfo||p.stateNode.implementation!==y.implementation?(p=Gu(y,g.mode,_),p.return=g,p):(p=s(p,y.children||[]),p.return=g,p)}function d(g,p,y,_,E){return p===null||p.tag!==7?(p=Ns(y,g.mode,_,E),p.return=g,p):(p=s(p,y),p.return=g,p)}function h(g,p,y){if(typeof p=="string"&&p!==""||typeof p=="number")return p=Ku(""+p,g.mode,y),p.return=g,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Fa:return y=Cl(p.type,p.key,p.props,null,g.mode,y),y.ref=yo(g,null,p),y.return=g,y;case di:return p=Gu(p,g.mode,y),p.return=g,p;case Er:var _=p._init;return h(g,_(p._payload),y)}if(Co(p)||mo(p))return p=Ns(p,g.mode,y,null),p.return=g,p;Ya(g,p)}return null}function m(g,p,y,_){var E=p!==null?p.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return E!==null?null:l(g,p,""+y,_);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Fa:return y.key===E?c(g,p,y,_):null;case di:return y.key===E?u(g,p,y,_):null;case Er:return E=y._init,m(g,p,E(y._payload),_)}if(Co(y)||mo(y))return E!==null?null:d(g,p,y,_,null);Ya(g,y)}return null}function v(g,p,y,_,E){if(typeof _=="string"&&_!==""||typeof _=="number")return g=g.get(y)||null,l(p,g,""+_,E);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Fa:return g=g.get(_.key===null?y:_.key)||null,c(p,g,_,E);case di:return g=g.get(_.key===null?y:_.key)||null,u(p,g,_,E);case Er:var C=_._init;return v(g,p,y,C(_._payload),E)}if(Co(_)||mo(_))return g=g.get(y)||null,d(p,g,_,E,null);Ya(p,_)}return null}function b(g,p,y,_){for(var E=null,C=null,j=p,S=p=0,k=null;j!==null&&S<y.length;S++){j.index>S?(k=j,j=null):k=j.sibling;var N=m(g,j,y[S],_);if(N===null){j===null&&(j=k);break}e&&j&&N.alternate===null&&t(g,j),p=o(N,p,S),C===null?E=N:C.sibling=N,C=N,j=k}if(S===y.length)return n(g,j),Ve&&ds(g,S),E;if(j===null){for(;S<y.length;S++)j=h(g,y[S],_),j!==null&&(p=o(j,p,S),C===null?E=j:C.sibling=j,C=j);return Ve&&ds(g,S),E}for(j=r(g,j);S<y.length;S++)k=v(j,g,S,y[S],_),k!==null&&(e&&k.alternate!==null&&j.delete(k.key===null?S:k.key),p=o(k,p,S),C===null?E=k:C.sibling=k,C=k);return e&&j.forEach(function(P){return t(g,P)}),Ve&&ds(g,S),E}function x(g,p,y,_){var E=mo(y);if(typeof E!="function")throw Error(H(150));if(y=E.call(y),y==null)throw Error(H(151));for(var C=E=null,j=p,S=p=0,k=null,N=y.next();j!==null&&!N.done;S++,N=y.next()){j.index>S?(k=j,j=null):k=j.sibling;var P=m(g,j,N.value,_);if(P===null){j===null&&(j=k);break}e&&j&&P.alternate===null&&t(g,j),p=o(P,p,S),C===null?E=P:C.sibling=P,C=P,j=k}if(N.done)return n(g,j),Ve&&ds(g,S),E;if(j===null){for(;!N.done;S++,N=y.next())N=h(g,N.value,_),N!==null&&(p=o(N,p,S),C===null?E=N:C.sibling=N,C=N);return Ve&&ds(g,S),E}for(j=r(g,j);!N.done;S++,N=y.next())N=v(j,g,S,N.value,_),N!==null&&(e&&N.alternate!==null&&j.delete(N.key===null?S:N.key),p=o(N,p,S),C===null?E=N:C.sibling=N,C=N);return e&&j.forEach(function(M){return t(g,M)}),Ve&&ds(g,S),E}function w(g,p,y,_){if(typeof y=="object"&&y!==null&&y.type===hi&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Fa:e:{for(var E=y.key,C=p;C!==null;){if(C.key===E){if(E=y.type,E===hi){if(C.tag===7){n(g,C.sibling),p=s(C,y.props.children),p.return=g,g=p;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Er&&Sp(E)===C.type){n(g,C.sibling),p=s(C,y.props),p.ref=yo(g,C,y),p.return=g,g=p;break e}n(g,C);break}else t(g,C);C=C.sibling}y.type===hi?(p=Ns(y.props.children,g.mode,_,y.key),p.return=g,g=p):(_=Cl(y.type,y.key,y.props,null,g.mode,_),_.ref=yo(g,p,y),_.return=g,g=_)}return a(g);case di:e:{for(C=y.key;p!==null;){if(p.key===C)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(g,p.sibling),p=s(p,y.children||[]),p.return=g,g=p;break e}else{n(g,p);break}else t(g,p);p=p.sibling}p=Gu(y,g.mode,_),p.return=g,g=p}return a(g);case Er:return C=y._init,w(g,p,C(y._payload),_)}if(Co(y))return b(g,p,y,_);if(mo(y))return x(g,p,y,_);Ya(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,p!==null&&p.tag===6?(n(g,p.sibling),p=s(p,y),p.return=g,g=p):(n(g,p),p=Ku(y,g.mode,_),p.return=g,g=p),a(g)):n(g,p)}return w}var Hi=zx(!0),Bx=zx(!1),Kl=ss(null),Gl=null,wi=null,vf=null;function xf(){vf=wi=Gl=null}function yf(e){var t=Kl.current;ze(Kl),e._currentValue=t}function Gd(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ki(e,t){Gl=e,vf=wi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ft=!0),e.firstContext=null)}function un(e){var t=e._currentValue;if(vf!==e)if(e={context:e,memoizedValue:t,next:null},wi===null){if(Gl===null)throw Error(H(308));wi=e,Gl.dependencies={lanes:0,firstContext:e}}else wi=wi.next=e;return t}var vs=null;function wf(e){vs===null?vs=[e]:vs.push(e)}function Wx(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,wf(t)):(n.next=s.next,s.next=n),t.interleaved=n,ur(e,r)}function ur(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var kr=!1;function bf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vx(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function rr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ee&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,ur(e,n)}return s=r.interleaved,s===null?(t.next=t,wf(r)):(t.next=s.next,s.next=t),r.interleaved=t,ur(e,n)}function jl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,of(e,n)}}function Np(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Yl(e,t,n,r){var s=e.updateQueue;kr=!1;var o=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?o=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var h=s.baseState;a=0,d=u=c=null,l=o;do{var m=l.lane,v=l.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:v,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var b=e,x=l;switch(m=t,v=n,x.tag){case 1:if(b=x.payload,typeof b=="function"){h=b.call(v,h,m);break e}h=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=x.payload,m=typeof b=="function"?b.call(v,h,m):b,m==null)break e;h=Ke({},h,m);break e;case 2:kr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[l]:m.push(l))}else v={eventTime:v,lane:m,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=v,c=h):d=d.next=v,a|=m;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;m=l,l=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Ts|=a,e.lanes=a,e.memoizedState=h}}function Ep(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(H(191,s));s.call(r)}}}var _a={},zn=ss(_a),na=ss(_a),ra=ss(_a);function xs(e){if(e===_a)throw Error(H(174));return e}function jf(e,t){switch(Le(ra,t),Le(na,e),Le(zn,_a),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Cd(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Cd(t,e)}ze(zn),Le(zn,t)}function qi(){ze(zn),ze(na),ze(ra)}function Hx(e){xs(ra.current);var t=xs(zn.current),n=Cd(t,e.type);t!==n&&(Le(na,e),Le(zn,n))}function _f(e){na.current===e&&(ze(zn),ze(na))}var He=ss(0);function Ql(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zu=[];function Sf(){for(var e=0;e<zu.length;e++)zu[e]._workInProgressVersionPrimary=null;zu.length=0}var _l=mr.ReactCurrentDispatcher,Bu=mr.ReactCurrentBatchConfig,Ps=0,qe=null,Ze=null,ot=null,Xl=!1,Fo=!1,sa=0,zS=0;function vt(){throw Error(H(321))}function Nf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function Ef(e,t,n,r,s,o){if(Ps=o,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_l.current=e===null||e.memoizedState===null?HS:qS,e=n(r,s),Fo){o=0;do{if(Fo=!1,sa=0,25<=o)throw Error(H(301));o+=1,ot=Ze=null,t.updateQueue=null,_l.current=KS,e=n(r,s)}while(Fo)}if(_l.current=Jl,t=Ze!==null&&Ze.next!==null,Ps=0,ot=Ze=qe=null,Xl=!1,t)throw Error(H(300));return e}function kf(){var e=sa!==0;return sa=0,e}function Dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?qe.memoizedState=ot=e:ot=ot.next=e,ot}function dn(){if(Ze===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var t=ot===null?qe.memoizedState:ot.next;if(t!==null)ot=t,Ze=e;else{if(e===null)throw Error(H(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},ot===null?qe.memoizedState=ot=e:ot=ot.next=e}return ot}function ia(e,t){return typeof t=="function"?t(e):t}function Wu(e){var t=dn(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=Ze,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var a=s.next;s.next=o.next,o.next=a}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var l=a=null,c=null,u=o;do{var d=u.lane;if((Ps&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,a=r):c=c.next=h,qe.lanes|=d,Ts|=d}u=u.next}while(u!==null&&u!==o);c===null?a=r:c.next=l,En(r,t.memoizedState)||(Ft=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,qe.lanes|=o,Ts|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Vu(e){var t=dn(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do o=e(o,a.action),a=a.next;while(a!==s);En(o,t.memoizedState)||(Ft=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function qx(){}function Kx(e,t){var n=qe,r=dn(),s=t(),o=!En(r.memoizedState,s);if(o&&(r.memoizedState=s,Ft=!0),r=r.queue,Cf(Qx.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||ot!==null&&ot.memoizedState.tag&1){if(n.flags|=2048,oa(9,Yx.bind(null,n,r,s,t),void 0,null),at===null)throw Error(H(349));Ps&30||Gx(n,t,s)}return s}function Gx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qe.updateQueue,t===null?(t={lastEffect:null,stores:null},qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Yx(e,t,n,r){t.value=n,t.getSnapshot=r,Xx(t)&&Jx(e)}function Qx(e,t,n){return n(function(){Xx(t)&&Jx(e)})}function Xx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!En(e,n)}catch{return!0}}function Jx(e){var t=ur(e,1);t!==null&&Nn(t,e,1,-1)}function kp(e){var t=Dn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:e},t.queue=e,e=e.dispatch=VS.bind(null,qe,e),[t.memoizedState,e]}function oa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=qe.updateQueue,t===null?(t={lastEffect:null,stores:null},qe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Zx(){return dn().memoizedState}function Sl(e,t,n,r){var s=Dn();qe.flags|=e,s.memoizedState=oa(1|t,n,void 0,r===void 0?null:r)}function Nc(e,t,n,r){var s=dn();r=r===void 0?null:r;var o=void 0;if(Ze!==null){var a=Ze.memoizedState;if(o=a.destroy,r!==null&&Nf(r,a.deps)){s.memoizedState=oa(t,n,o,r);return}}qe.flags|=e,s.memoizedState=oa(1|t,n,o,r)}function Cp(e,t){return Sl(8390656,8,e,t)}function Cf(e,t){return Nc(2048,8,e,t)}function ey(e,t){return Nc(4,2,e,t)}function ty(e,t){return Nc(4,4,e,t)}function ny(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ry(e,t,n){return n=n!=null?n.concat([e]):null,Nc(4,4,ny.bind(null,t,e),n)}function Pf(){}function sy(e,t){var n=dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Nf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function iy(e,t){var n=dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Nf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function oy(e,t,n){return Ps&21?(En(n,t)||(n=dx(),qe.lanes|=n,Ts|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ft=!0),e.memoizedState=n)}function BS(e,t){var n=Te;Te=n!==0&&4>n?n:4,e(!0);var r=Bu.transition;Bu.transition={};try{e(!1),t()}finally{Te=n,Bu.transition=r}}function ay(){return dn().memoizedState}function WS(e,t,n){var r=qr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ly(e))cy(t,n);else if(n=Wx(e,t,n,r),n!==null){var s=Rt();Nn(n,e,r,s),uy(n,t,r)}}function VS(e,t,n){var r=qr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ly(e))cy(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,n);if(s.hasEagerState=!0,s.eagerState=l,En(l,a)){var c=t.interleaved;c===null?(s.next=s,wf(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=Wx(e,t,s,r),n!==null&&(s=Rt(),Nn(n,e,r,s),uy(n,t,r))}}function ly(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function cy(e,t){Fo=Xl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,of(e,n)}}var Jl={readContext:un,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useInsertionEffect:vt,useLayoutEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useMutableSource:vt,useSyncExternalStore:vt,useId:vt,unstable_isNewReconciler:!1},HS={readContext:un,useCallback:function(e,t){return Dn().memoizedState=[e,t===void 0?null:t],e},useContext:un,useEffect:Cp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Sl(4194308,4,ny.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Sl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Sl(4,2,e,t)},useMemo:function(e,t){var n=Dn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=WS.bind(null,qe,e),[r.memoizedState,e]},useRef:function(e){var t=Dn();return e={current:e},t.memoizedState=e},useState:kp,useDebugValue:Pf,useDeferredValue:function(e){return Dn().memoizedState=e},useTransition:function(){var e=kp(!1),t=e[0];return e=BS.bind(null,e[1]),Dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=qe,s=Dn();if(Ve){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),at===null)throw Error(H(349));Ps&30||Gx(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Cp(Qx.bind(null,r,o,e),[e]),r.flags|=2048,oa(9,Yx.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Dn(),t=at.identifierPrefix;if(Ve){var n=nr,r=tr;n=(r&~(1<<32-Sn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=sa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=zS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},qS={readContext:un,useCallback:sy,useContext:un,useEffect:Cf,useImperativeHandle:ry,useInsertionEffect:ey,useLayoutEffect:ty,useMemo:iy,useReducer:Wu,useRef:Zx,useState:function(){return Wu(ia)},useDebugValue:Pf,useDeferredValue:function(e){var t=dn();return oy(t,Ze.memoizedState,e)},useTransition:function(){var e=Wu(ia)[0],t=dn().memoizedState;return[e,t]},useMutableSource:qx,useSyncExternalStore:Kx,useId:ay,unstable_isNewReconciler:!1},KS={readContext:un,useCallback:sy,useContext:un,useEffect:Cf,useImperativeHandle:ry,useInsertionEffect:ey,useLayoutEffect:ty,useMemo:iy,useReducer:Vu,useRef:Zx,useState:function(){return Vu(ia)},useDebugValue:Pf,useDeferredValue:function(e){var t=dn();return Ze===null?t.memoizedState=e:oy(t,Ze.memoizedState,e)},useTransition:function(){var e=Vu(ia)[0],t=dn().memoizedState;return[e,t]},useMutableSource:qx,useSyncExternalStore:Kx,useId:ay,unstable_isNewReconciler:!1};function xn(e,t){if(e&&e.defaultProps){t=Ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Yd(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ec={isMounted:function(e){return(e=e._reactInternals)?zs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rt(),s=qr(e),o=rr(r,s);o.payload=t,n!=null&&(o.callback=n),t=Vr(e,o,s),t!==null&&(Nn(t,e,s,r),jl(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rt(),s=qr(e),o=rr(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Vr(e,o,s),t!==null&&(Nn(t,e,s,r),jl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rt(),r=qr(e),s=rr(n,r);s.tag=2,t!=null&&(s.callback=t),t=Vr(e,s,r),t!==null&&(Nn(t,e,r,n),jl(t,e,r))}};function Pp(e,t,n,r,s,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!Jo(n,r)||!Jo(s,o):!0}function dy(e,t,n){var r=!1,s=Qr,o=t.contextType;return typeof o=="object"&&o!==null?o=un(o):(s=Ut(t)?ks:jt.current,r=t.contextTypes,o=(r=r!=null)?Wi(e,s):Qr),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ec,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Tp(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ec.enqueueReplaceState(t,t.state,null)}function Qd(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},bf(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=un(o):(o=Ut(t)?ks:jt.current,s.context=Wi(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Yd(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Ec.enqueueReplaceState(s,s.state,null),Yl(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ki(e,t){try{var n="",r=t;do n+=b_(r),r=r.return;while(r);var s=n}catch(o){s=`
39Error generating stack: `+o.message+`
40`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Hu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Xd(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var GS=typeof WeakMap=="function"?WeakMap:Map;function hy(e,t,n){n=rr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ec||(ec=!0,ah=r),Xd(e,t)},n}function fy(e,t,n){n=rr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Xd(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Xd(e,t),typeof r!="function"&&(Hr===null?Hr=new Set([this]):Hr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Rp(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new GS;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=lN.bind(null,e,t,n),t.then(e,e))}function Ap(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Op(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=rr(-1,1),t.tag=2,Vr(n,t,1))),n.lanes|=1),e)}var YS=mr.ReactCurrentOwner,Ft=!1;function Pt(e,t,n,r){t.child=e===null?Bx(t,null,n,r):Hi(t,e.child,n,r)}function Dp(e,t,n,r,s){n=n.render;var o=t.ref;return ki(t,s),r=Ef(e,t,n,r,o,s),n=kf(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,dr(e,t,s)):(Ve&&n&&mf(t),t.flags|=1,Pt(e,t,r,s),t.child)}function Mp(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Lf(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,my(e,t,o,r,s)):(e=Cl(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Jo,n(a,r)&&e.ref===t.ref)return dr(e,t,s)}return t.flags|=1,e=Kr(o,r),e.ref=t.ref,e.return=t,t.child=e}function my(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(Jo(o,r)&&e.ref===t.ref)if(Ft=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(Ft=!0);else return t.lanes=e.lanes,dr(e,t,s)}return Jd(e,t,n,r,s)}function py(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Le(ji,qt),qt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Le(ji,qt),qt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Le(ji,qt),qt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Le(ji,qt),qt|=r;return Pt(e,t,s,n),t.child}function gy(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}
vendor: 6,245 bytes, line 40
40function Jd(e,t,n,r,s){var o=Ut(n)?ks:jt.current;return o=Wi(t,o),ki(t,s),n=Ef(e,t,n,r,o,s),r=kf(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,dr(e,t,s)):(Ve&&r&&mf(t),t.flags|=1,Pt(e,t,n,s),t.child)}function Ip(e,t,n,r,s){if(Ut(n)){var o=!0;Vl(t)}else o=!1;if(ki(t,s),t.stateNode===null)Nl(e,t),dy(t,n,r),Qd(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var c=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=un(u):(u=Ut(n)?ks:jt.current,u=Wi(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||c!==u)&&Tp(t,a,r,u),kr=!1;var m=t.memoizedState;a.state=m,Yl(t,r,a,s),c=t.memoizedState,l!==r||m!==c||$t.current||kr?(typeof d=="function"&&(Yd(t,n,d,r),c=t.memoizedState),(l=kr||Pp(t,n,l,r,m,c,u))?(h||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=u,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Vx(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:xn(t.type,l),a.props=u,h=t.pendingProps,m=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=un(c):(c=Ut(n)?ks:jt.current,c=Wi(t,c));var v=n.getDerivedStateFromProps;(d=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==h||m!==c)&&Tp(t,a,r,c),kr=!1,m=t.memoizedState,a.state=m,Yl(t,r,a,s);var b=t.memoizedState;l!==h||m!==b||$t.current||kr?(typeof v=="function"&&(Yd(t,n,v,r),b=t.memoizedState),(u=kr||Pp(t,n,u,r,m,b,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,b,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,b,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),a.props=r,a.state=b,a.context=c,r=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Zd(e,t,n,r,o,s)}function Zd(e,t,n,r,s,o){gy(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&bp(t,n,!1),dr(e,t,o);r=t.stateNode,YS.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Hi(t,e.child,null,o),t.child=Hi(t,null,l,o)):Pt(e,t,l,o),t.memoizedState=r.state,s&&bp(t,n,!0),t.child}function vy(e){var t=e.stateNode;t.pendingContext?wp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wp(e,t.context,!1),jf(e,t.containerInfo)}function Lp(e,t,n,r,s){return Vi(),gf(s),t.flags|=256,Pt(e,t,n,r),t.child}var eh={dehydrated:null,treeContext:null,retryLane:0};function th(e){return{baseLanes:e,cachePool:null,transitions:null}}function xy(e,t,n){var r=t.pendingProps,s=He.current,o=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Le(He,s&1),e===null)return Kd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Pc(a,r,0,null),e=Ns(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=th(n),t.memoizedState=eh,e):Tf(t,a));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return QS(e,t,a,r,l,s,n);if(o){o=r.fallback,a=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Kr(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=Kr(l,o):(o=Ns(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?th(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=eh,r}return o=e.child,e=o.sibling,r=Kr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Tf(e,t){return t=Pc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qa(e,t,n,r){return r!==null&&gf(r),Hi(t,e.child,null,n),e=Tf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function QS(e,t,n,r,s,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Hu(Error(H(422))),Qa(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Pc({mode:"visible",children:r.children},s,0,null),o=Ns(o,s,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Hi(t,e.child,null,a),t.child.memoizedState=th(a),t.memoizedState=eh,o);if(!(t.mode&1))return Qa(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(H(419)),r=Hu(o,r,void 0),Qa(e,t,a,r)}if(l=(a&e.childLanes)!==0,Ft||l){if(r=at,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}
vendor: 5,346 bytes, line 40
40s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,ur(e,s),Nn(r,e,s,-1))}return If(),r=Hu(Error(H(421))),Qa(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=cN.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Gt=Wr(s.nextSibling),Qt=t,Ve=!0,_n=null,e!==null&&(sn[on++]=tr,sn[on++]=nr,sn[on++]=Cs,tr=e.id,nr=e.overflow,Cs=t),t=Tf(t,r.children),t.flags|=4096,t)}function Fp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Gd(e.return,t,n)}function qu(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function yy(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(Pt(e,t,r.children,n),r=He.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fp(e,n,t);else if(e.tag===19)Fp(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Le(He,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Ql(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),qu(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ql(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}qu(t,!0,n,null,o);break;case"together":qu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Nl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function dr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ts|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=Kr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function XS(e,t,n){switch(t.tag){case 3:vy(t),Vi();break;case 5:Hx(t);break;case 1:Ut(t.type)&&Vl(t);break;case 4:jf(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Le(Kl,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Le(He,He.current&1),t.flags|=128,null):n&t.child.childLanes?xy(e,t,n):(Le(He,He.current&1),e=dr(e,t,n),e!==null?e.sibling:null);Le(He,He.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return yy(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Le(He,He.current),r)break;return null;case 22:case 23:return t.lanes=0,py(e,t,n)}return dr(e,t,n)}var wy,nh,by,jy;wy=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};nh=function(){};by=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,xs(zn.current);var o=null;switch(n){case"input":s=Sd(e,s),r=Sd(e,r),o=[];break;case"select":s=Ke({},s,{value:void 0}),r=Ke({},r,{value:void 0}),o=[];break;case"textarea":s=kd(e,s),r=kd(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Bl)}Pd(n,r);var a;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ho.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ho.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Ue("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};jy=function(e,t,n,r){n!==r&&(t.flags|=4)};function wo(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}
vendor: 30,296 bytes, line 40
40function JS(e,t,n){var r=t.pendingProps;switch(pf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(t),null;case 1:return Ut(t.type)&&Wl(),xt(t),null;case 3:return r=t.stateNode,qi(),ze($t),ze(jt),Sf(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ga(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_n!==null&&(uh(_n),_n=null))),nh(e,t),xt(t),null;case 5:_f(t);var s=xs(ra.current);if(n=t.type,e!==null&&t.stateNode!=null)by(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return xt(t),null}if(e=xs(zn.current),Ga(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Fn]=t,r[ta]=o,e=(t.mode&1)!==0,n){case"dialog":Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":case"embed":Ue("load",r);break;case"video":case"audio":for(s=0;s<To.length;s++)Ue(To[s],r);break;case"source":Ue("error",r);break;case"img":case"image":case"link":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"input":Km(r,o),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ue("invalid",r);break;case"textarea":Ym(r,o),Ue("invalid",r)}Pd(n,o),s=null;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&Ka(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Ka(r.textContent,l,e),s=["children",""+l]):Ho.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Ue("scroll",r)}switch(n){case"input":$a(r),Gm(r,o,!0);break;case"textarea":$a(r),Qm(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Bl)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Qv(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Fn]=t,e[ta]=r,wy(e,t,!1,!1),t.stateNode=e;e:{switch(a=Td(n,r),n){case"dialog":Ue("cancel",e),Ue("close",e),s=r;break;case"iframe":case"object":case"embed":Ue("load",e),s=r;break;case"video":case"audio":for(s=0;s<To.length;s++)Ue(To[s],e);s=r;break;case"source":Ue("error",e),s=r;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),s=r;break;case"details":Ue("toggle",e),s=r;break;case"input":Km(e,r),s=Sd(e,r),Ue("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Ke({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":Ym(e,r),s=kd(e,r),Ue("invalid",e);break;default:s=r}Pd(n,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?Zv(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Xv(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&qo(e,c):typeof c=="number"&&qo(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ho.hasOwnProperty(o)?c!=null&&o==="onScroll"&&Ue("scroll",e):c!=null&&Zh(e,o,c,a))}switch(n){case"input":$a(e),Gm(e,r,!1);break;case"textarea":$a(e),Qm(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Yr(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?_i(e,!!r.multiple,o,!1):r.defaultValue!=null&&_i(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Bl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return xt(t),null;case 6:if(e&&t.stateNode!=null)jy(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=xs(ra.current),xs(zn.current),Ga(t)){if(r=t.stateNode,n=t.memoizedProps,r[Fn]=t,(o=r.nodeValue!==n)&&(e=Qt,e!==null))switch(e.tag){case 3:Ka(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ka(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Fn]=t,t.stateNode=r}return xt(t),null;case 13:if(ze(He),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ve&&Gt!==null&&t.mode&1&&!(t.flags&128))Ux(),Vi(),t.flags|=98560,o=!1;else if(o=Ga(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(H(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(H(317));o[Fn]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xt(t),o=!1}else _n!==null&&(uh(_n),_n=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||He.current&1?et===0&&(et=3):If())),t.updateQueue!==null&&(t.flags|=4),xt(t),null);case 4:return qi(),nh(e,t),e===null&&Zo(t.stateNode.containerInfo),xt(t),null;case 10:return yf(t.type._context),xt(t),null;case 17:return Ut(t.type)&&Wl(),xt(t),null;case 19:if(ze(He),o=t.memoizedState,o===null)return xt(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)wo(o,!1);else{if(et!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Ql(e),a!==null){for(t.flags|=128,wo(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Le(He,He.current&1|2),t.child}e=e.sibling}o.tail!==null&&Qe()>Gi&&(t.flags|=128,r=!0,wo(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ql(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ve)return xt(t),null}else 2*Qe()-o.renderingStartTime>Gi&&n!==1073741824&&(t.flags|=128,r=!0,wo(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qe(),t.sibling=null,n=He.current,Le(He,r?n&1|2:n&1),t):(xt(t),null);case 22:case 23:return Mf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?qt&1073741824&&(xt(t),t.subtreeFlags&6&&(t.flags|=8192)):xt(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function ZS(e,t){switch(pf(t),t.tag){case 1:return Ut(t.type)&&Wl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(),ze($t),ze(jt),Sf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _f(t),null;case 13:if(ze(He),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(He),null;case 4:return qi(),null;case 10:return yf(t.type._context),null;case 22:case 23:return Mf(),null;case 24:return null;default:return null}}var Xa=!1,bt=!1,eN=typeof WeakSet=="function"?WeakSet:Set,ne=null;function bi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ye(e,t,r)}else n.current=null}function rh(e,t,n){try{n()}catch(r){Ye(e,t,r)}}var $p=!1;function tN(e,t){if(Ud=$l,e=kx(),ff(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,h=e,m=null;t:for(;;){for(var v;h!==n||s!==0&&h.nodeType!==3||(l=a+s),h!==o||r!==0&&h.nodeType!==3||(c=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(v=h.firstChild)!==null;)m=h,h=v;for(;;){if(h===e)break t;if(m===n&&++u===s&&(l=a),m===o&&++d===r&&(c=a),(v=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=v}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},$l=!1,ne=t;ne!==null;)if(t=ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ne=e;else for(;ne!==null;){t=ne;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var x=b.memoizedProps,w=b.memoizedState,g=t.stateNode,p=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:xn(t.type,x),w);g.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(_){Ye(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,ne=e;break}ne=t.return}return b=$p,$p=!1,b}function $o(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&rh(t,n,o)}s=s.next}while(s!==r)}}function kc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function sh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function _y(e){var t=e.alternate;t!==null&&(e.alternate=null,_y(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Fn],delete t[ta],delete t[Vd],delete t[LS],delete t[FS])),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 Sy(e){return e.tag===5||e.tag===3||e.tag===4}function Up(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sy(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 ih(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Bl));else if(r!==4&&(e=e.child,e!==null))for(ih(e,t,n),e=e.sibling;e!==null;)ih(e,t,n),e=e.sibling}function oh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(oh(e,t,n),e=e.sibling;e!==null;)oh(e,t,n),e=e.sibling}var ht=null,bn=!1;function xr(e,t,n){for(n=n.child;n!==null;)Ny(e,t,n),n=n.sibling}function Ny(e,t,n){if(Un&&typeof Un.onCommitFiberUnmount=="function")try{Un.onCommitFiberUnmount(yc,n)}catch{}switch(n.tag){case 5:bt||bi(n,t);case 6:var r=ht,s=bn;ht=null,xr(e,t,n),ht=r,bn=s,ht!==null&&(bn?(e=ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ht.removeChild(n.stateNode));break;case 18:ht!==null&&(bn?(e=ht,n=n.stateNode,e.nodeType===8?$u(e.parentNode,n):e.nodeType===1&&$u(e,n),Qo(e)):$u(ht,n.stateNode));break;case 4:r=ht,s=bn,ht=n.stateNode.containerInfo,bn=!0,xr(e,t,n),ht=r,bn=s;break;case 0:case 11:case 14:case 15:if(!bt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&rh(n,t,a),s=s.next}while(s!==r)}xr(e,t,n);break;case 1:if(!bt&&(bi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ye(n,t,l)}xr(e,t,n);break;case 21:xr(e,t,n);break;case 22:n.mode&1?(bt=(r=bt)||n.memoizedState!==null,xr(e,t,n),bt=r):xr(e,t,n);break;default:xr(e,t,n)}}function zp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new eN),t.forEach(function(r){var s=uN.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function mn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:ht=l.stateNode,bn=!1;break e;case 3:ht=l.stateNode.containerInfo,bn=!0;break e;case 4:ht=l.stateNode.containerInfo,bn=!0;break e}l=l.return}if(ht===null)throw Error(H(160));Ny(o,a,s),ht=null,bn=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Ye(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ey(t,e),t=t.sibling}function Ey(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mn(t,e),On(e),r&4){try{$o(3,e,e.return),kc(3,e)}catch(x){Ye(e,e.return,x)}try{$o(5,e,e.return)}catch(x){Ye(e,e.return,x)}}break;case 1:mn(t,e),On(e),r&512&&n!==null&&bi(n,n.return);break;case 5:if(mn(t,e),On(e),r&512&&n!==null&&bi(n,n.return),e.flags&32){var s=e.stateNode;try{qo(s,"")}catch(x){Ye(e,e.return,x)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Gv(s,o),Td(l,a);var u=Td(l,o);for(a=0;a<c.length;a+=2){var d=c[a],h=c[a+1];d==="style"?Zv(s,h):d==="dangerouslySetInnerHTML"?Xv(s,h):d==="children"?qo(s,h):Zh(s,d,h,u)}switch(l){case"input":Nd(s,o);break;case"textarea":Yv(s,o);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var v=o.value;v!=null?_i(s,!!o.multiple,v,!1):m!==!!o.multiple&&(o.defaultValue!=null?_i(s,!!o.multiple,o.defaultValue,!0):_i(s,!!o.multiple,o.multiple?[]:"",!1))}s[ta]=o}catch(x){Ye(e,e.return,x)}}break;case 6:if(mn(t,e),On(e),r&4){if(e.stateNode===null)throw Error(H(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(x){Ye(e,e.return,x)}}break;case 3:if(mn(t,e),On(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Qo(t.containerInfo)}catch(x){Ye(e,e.return,x)}break;case 4:mn(t,e),On(e);break;case 13:mn(t,e),On(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Of=Qe())),r&4&&zp(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(bt=(u=bt)||d,mn(t,e),bt=u):mn(t,e),On(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(ne=e,d=e.child;d!==null;){for(h=ne=d;ne!==null;){switch(m=ne,v=m.child,m.tag){case 0:case 11:case 14:case 15:$o(4,m,m.return);break;case 1:bi(m,m.return);var b=m.stateNode;if(typeof b.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(x){Ye(r,n,x)}}break;case 5:bi(m,m.return);break;case 22:if(m.memoizedState!==null){Wp(h);continue}}v!==null?(v.return=m,ne=v):Wp(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=h.stateNode,c=h.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Jv("display",a))}catch(x){Ye(e,e.return,x)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(x){Ye(e,e.return,x)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:mn(t,e),On(e),r&4&&zp(e);break;case 21:break;default:mn(t,e),On(e)}}function On(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Sy(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(qo(s,""),r.flags&=-33);var o=Up(e);oh(e,o,s);break;case 3:case 4:var a=r.stateNode.containerInfo,l=Up(e);ih(e,l,a);break;default:throw Error(H(161))}}catch(c){Ye(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function nN(e,t,n){ne=e,ky(e)}function ky(e,t,n){for(var r=(e.mode&1)!==0;ne!==null;){var s=ne,o=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||Xa;if(!a){var l=s.alternate,c=l!==null&&l.memoizedState!==null||bt;l=Xa;var u=bt;if(Xa=a,(bt=c)&&!u)for(ne=s;ne!==null;)a=ne,c=a.child,a.tag===22&&a.memoizedState!==null?Vp(s):c!==null?(c.return=a,ne=c):Vp(s);for(;o!==null;)ne=o,ky(o),o=o.sibling;ne=s,Xa=l,bt=u}Bp(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,ne=o):Bp(e)}}function Bp(e){for(;ne!==null;){var t=ne;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:bt||kc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!bt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:xn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Ep(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Ep(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Qo(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}bt||t.flags&512&&sh(t)}catch(m){Ye(t,t.return,m)}}if(t===e){ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,ne=n;break}ne=t.return}}function Wp(e){for(;ne!==null;){var t=ne;if(t===e){ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ne=n;break}ne=t.return}}function Vp(e){for(;ne!==null;){var t=ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{kc(4,t)}catch(c){Ye(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){Ye(t,s,c)}}var o=t.return;try{sh(t)}catch(c){Ye(t,o,c)}break;case 5:var a=t.return;try{sh(t)}catch(c){Ye(t,a,c)}}}catch(c){Ye(t,t.return,c)}if(t===e){ne=null;break}var l=t.sibling;if(l!==null){l.return=t.return,ne=l;break}ne=t.return}}var rN=Math.ceil,Zl=mr.ReactCurrentDispatcher,Rf=mr.ReactCurrentOwner,ln=mr.ReactCurrentBatchConfig,Ee=0,at=null,Je=null,ft=0,qt=0,ji=ss(0),et=0,aa=null,Ts=0,Cc=0,Af=0,Uo=null,It=null,Of=0,Gi=1/0,Qn=null,ec=!1,ah=null,Hr=null,Ja=!1,Fr=null,tc=0,zo=0,lh=null,El=-1,kl=0;function Rt(){return Ee&6?Qe():El!==-1?El:El=Qe()}function qr(e){return e.mode&1?Ee&2&&ft!==0?ft&-ft:US.transition!==null?(kl===0&&(kl=dx()),kl):(e=Te,e!==0||(e=window.event,e=e===void 0?16:xx(e.type)),e):1}function Nn(e,t,n,r){if(50<zo)throw zo=0,lh=null,Error(H(185));wa(e,n,r),(!(Ee&2)||e!==at)&&(e===at&&(!(Ee&2)&&(Cc|=n),et===4&&Tr(e,ft)),zt(e,r),n===1&&Ee===0&&!(t.mode&1)&&(Gi=Qe()+500,Sc&&is()))}function zt(e,t){var n=e.callbackNode;U_(e,t);var r=Fl(e,e===at?ft:0);if(r===0)n!==null&&Zm(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Zm(n),t===1)e.tag===0?$S(Hp.bind(null,e)):Lx(Hp.bind(null,e)),MS(function(){!(Ee&6)&&is()}),n=null;else{switch(hx(r)){case 1:n=sf;break;case 4:n=cx;break;case 16:n=Ll;break;case 536870912:n=ux;break;default:n=Ll}n=My(n,Cy.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Cy(e,t){if(El=-1,kl=0,Ee&6)throw Error(H(327));var n=e.callbackNode;if(Ci()&&e.callbackNode!==n)return null;var r=Fl(e,e===at?ft:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=nc(e,r);else{t=r;var s=Ee;Ee|=2;var o=Ty();(at!==e||ft!==t)&&(Qn=null,Gi=Qe()+500,Ss(e,t));do try{oN();break}catch(l){Py(e,l)}while(!0);xf(),Zl.current=o,Ee=s,Je!==null?t=0:(at=null,ft=0,t=et)}if(t!==0){if(t===2&&(s=Md(e),s!==0&&(r=s,t=ch(e,s))),t===1)throw n=aa,Ss(e,0),Tr(e,r),zt(e,Qe()),n;if(t===6)Tr(e,r);else{if(s=e.current.alternate,!(r&30)&&!sN(s)&&(t=nc(e,r),t===2&&(o=Md(e),o!==0&&(r=o,t=ch(e,o))),t===1))throw n=aa,Ss(e,0),Tr(e,r),zt(e,Qe()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:hs(e,It,Qn);break;case 3:if(Tr(e,r),(r&130023424)===r&&(t=Of+500-Qe(),10<t)){if(Fl(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Rt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Wd(hs.bind(null,e,It,Qn),t);break}hs(e,It,Qn);break;case 4:if(Tr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-Sn(r);o=1<<a,a=t[a],a>s&&(s=a),r&=~o}if(r=s,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*rN(r/1960))-r,10<r){e.timeoutHandle=Wd(hs.bind(null,e,It,Qn),r);break}hs(e,It,Qn);break;case 5:hs(e,It,Qn);break;default:throw Error(H(329))}}}return zt(e,Qe()),e.callbackNode===n?Cy.bind(null,e):null}function ch(e,t){var n=Uo;return e.current.memoizedState.isDehydrated&&(Ss(e,t).flags|=256),e=nc(e,t),e!==2&&(t=It,It=n,t!==null&&uh(t)),e}function uh(e){It===null?It=e:It.push.apply(It,e)}function sN(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!En(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Tr(e,t){for(t&=~Af,t&=~Cc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Sn(t),r=1<<n;e[n]=-1,t&=~r}}function Hp(e){if(Ee&6)throw Error(H(327));Ci();var t=Fl(e,0);if(!(t&1))return zt(e,Qe()),null;var n=nc(e,t);if(e.tag!==0&&n===2){var r=Md(e);r!==0&&(t=r,n=ch(e,r))}if(n===1)throw n=aa,Ss(e,0),Tr(e,t),zt(e,Qe()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,hs(e,It,Qn),zt(e,Qe()),null}function Df(e,t){var n=Ee;Ee|=1;try{return e(t)}finally{Ee=n,Ee===0&&(Gi=Qe()+500,Sc&&is())}}function Rs(e){Fr!==null&&Fr.tag===0&&!(Ee&6)&&Ci();var t=Ee;Ee|=1;var n=ln.transition,r=Te;try{if(ln.transition=null,Te=1,e)return e()}finally{Te=r,ln.transition=n,Ee=t,!(Ee&6)&&is()}}function Mf(){qt=ji.current,ze(ji)}function Ss(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,DS(n)),Je!==null)for(n=Je.return;n!==null;){var r=n;switch(pf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Wl();break;case 3:qi(),ze($t),ze(jt),Sf();break;case 5:_f(r);break;case 4:qi();break;case 13:ze(He);break;case 19:ze(He);break;case 10:yf(r.type._context);break;case 22:case 23:Mf()}n=n.return}if(at=e,Je=e=Kr(e.current,null),ft=qt=t,et=0,aa=null,Af=Cc=Ts=0,It=Uo=null,vs!==null){for(t=0;t<vs.length;t++)if(n=vs[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=s,r.next=a}n.pending=r}vs=null}return e}function Py(e,t){do{var n=Je;try{if(xf(),_l.current=Jl,Xl){for(var r=qe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Xl=!1}if(Ps=0,ot=Ze=qe=null,Fo=!1,sa=0,Rf.current=null,n===null||n.return===null){et=1,aa=t,Je=null;break}e:{var o=e,a=n.return,l=n,c=t;if(t=ft,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var v=Ap(a);if(v!==null){v.flags&=-257,Op(v,a,l,o,t),v.mode&1&&Rp(o,u,t),t=v,c=u;var b=t.updateQueue;if(b===null){var x=new Set;x.add(c),t.updateQueue=x}else b.add(c);break e}else{if(!(t&1)){Rp(o,u,t),If();break e}c=Error(H(426))}}else if(Ve&&l.mode&1){var w=Ap(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Op(w,a,l,o,t),gf(Ki(c,l));break e}}o=c=Ki(c,l),et!==4&&(et=2),Uo===null?Uo=[o]:Uo.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=hy(o,c,t);Np(o,g);break e;case 1:l=c;var p=o.type,y=o.stateNode;if(!(o.flags&128)&&(typeof p.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Hr===null||!Hr.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=fy(o,l,t);Np(o,_);break e}}o=o.return}while(o!==null)}Ay(n)}catch(E){t=E,Je===n&&n!==null&&(Je=n=n.return);continue}break}while(!0)}function Ty(){var e=Zl.current;return Zl.current=Jl,e===null?Jl:e}function If(){(et===0||et===3||et===2)&&(et=4),at===null||!(Ts&268435455)&&!(Cc&268435455)||Tr(at,ft)}function nc(e,t){var n=Ee;Ee|=2;var r=Ty();(at!==e||ft!==t)&&(Qn=null,Ss(e,t));do try{iN();break}catch(s){Py(e,s)}while(!0);if(xf(),Ee=n,Zl.current=r,Je!==null)throw Error(H(261));return at=null,ft=0,et}function iN(){for(;Je!==null;)Ry(Je)}function oN(){for(;Je!==null&&!R_();)Ry(Je)}function Ry(e){var t=Dy(e.alternate,e,qt);e.memoizedProps=e.pendingProps,t===null?Ay(e):Je=t,Rf.current=null}function Ay(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=ZS(n,t),n!==null){n.flags&=32767,Je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{et=6,Je=null;return}}else if(n=JS(n,t,qt),n!==null){Je=n;return}if(t=t.sibling,t!==null){Je=t;return}Je=t=e}while(t!==null);et===0&&(et=5)}function hs(e,t,n){var r=Te,s=ln.transition;try{ln.transition=null,Te=1,aN(e,t,n,r)}finally{ln.transition=s,Te=r}return null}function aN(e,t,n,r){do Ci();while(Fr!==null);if(Ee&6)throw Error(H(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(z_(e,o),e===at&&(Je=at=null,ft=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ja||(Ja=!0,My(Ll,function(){return Ci(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=ln.transition,ln.transition=null;var a=Te;Te=1;var l=Ee;Ee|=4,Rf.current=null,tN(e,n),Ey(n,e),kS(zd),$l=!!Ud,zd=Ud=null,e.current=n,nN(n),A_(),Ee=l,Te=a,ln.transition=o}else e.current=n;if(Ja&&(Ja=!1,Fr=e,tc=s),o=e.pendingLanes,o===0&&(Hr=null),M_(n.stateNode),zt(e,Qe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(ec)throw ec=!1,e=ah,ah=null,e;return tc&1&&e.tag!==0&&Ci(),o=e.pendingLanes,o&1?e===lh?zo++:(zo=0,lh=e):zo=0,is(),null}function Ci(){if(Fr!==null){var e=hx(tc),t=ln.transition,n=Te;try{if(ln.transition=null,Te=16>e?16:e,Fr===null)var r=!1;else{if(e=Fr,Fr=null,tc=0,Ee&6)throw Error(H(331));var s=Ee;for(Ee|=4,ne=e.current;ne!==null;){var o=ne,a=o.child;if(ne.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(ne=u;ne!==null;){var d=ne;switch(d.tag){case 0:case 11:case 15:$o(8,d,o)}var h=d.child;if(h!==null)h.return=d,ne=h;else for(;ne!==null;){d=ne;var m=d.sibling,v=d.return;if(_y(d),d===u){ne=null;break}if(m!==null){m.return=v,ne=m;break}ne=v}}}var b=o.alternate;if(b!==null){var x=b.child;if(x!==null){b.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}ne=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,ne=a;else e:for(;ne!==null;){if(o=ne,o.flags&2048)switch(o.tag){case 0:case 11:case 15:$o(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,ne=g;break e}ne=o.return}}var p=e.current;for(ne=p;ne!==null;){a=ne;var y=a.child;if(a.subtreeFlags&2064&&y!==null)y.return=a,ne=y;else e:for(a=p;ne!==null;){if(l=ne,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:kc(9,l)}}catch(E){Ye(l,l.return,E)}if(l===a){ne=null;break e}var _=l.sibling;if(_!==null){_.return=l.return,ne=_;break e}ne=l.return}}if(Ee=s,is(),Un&&typeof Un.onPostCommitFiberRoot=="function")try{Un.onPostCommitFiberRoot(yc,e)}catch{}r=!0}return r}finally{Te=n,ln.transition=t}}return!1}function qp(e,t,n){t=Ki(n,t),t=hy(e,t,1),e=Vr(e,t,1),t=Rt(),e!==null&&(wa(e,1,t),zt(e,t))}function Ye(e,t,n){if(e.tag===3)qp(e,e,n);else for(;t!==null;){if(t.tag===3){qp(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Hr===null||!Hr.has(r))){e=Ki(n,e),e=fy(t,e,1),t=Vr(t,e,1),e=Rt(),t!==null&&(wa(t,1,e),zt(t,e));break}}t=t.return}}function lN(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Rt(),e.pingedLanes|=e.suspendedLanes&n,at===e&&(ft&n)===n&&(et===4||et===3&&(ft&130023424)===ft&&500>Qe()-Of?Ss(e,0):Af|=n),zt(e,t)}function Oy(e,t){t===0&&(e.mode&1?(t=Ba,Ba<<=1,!(Ba&130023424)&&(Ba=4194304)):t=1);var n=Rt();e=ur(e,t),e!==null&&(wa(e,t,n),zt(e,n))}function cN(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Oy(e,n)}function uN(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(H(314))}r!==null&&r.delete(t),Oy(e,n)}var Dy;Dy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||$t.current)Ft=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ft=!1,XS(e,t,n);Ft=!!(e.flags&131072)}else Ft=!1,Ve&&t.flags&1048576&&Fx(t,ql,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Nl(e,t),e=t.pendingProps;var s=Wi(t,jt.current);ki(t,n),s=Ef(null,t,r,e,s,n);var o=kf();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ut(r)?(o=!0,Vl(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,bf(t),s.updater=Ec,t.stateNode=s,s._reactInternals=t,Qd(t,r,e,n),t=Zd(null,t,r,!0,o,n)):(t.tag=0,Ve&&o&&mf(t),Pt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Nl(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=hN(r),e=xn(r,e),s){case 0:t=Jd(null,t,r,e,n);break e;case 1:t=Ip(null,t,r,e,n);break e;case 11:t=Dp(null,t,r,e,n);break e;case 14:t=Mp(null,t,r,xn(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:xn(r,s),Jd(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:xn(r,s),Ip(e,t,r,s,n);case 3:e:{if(vy(t),e===null)throw Error(H(387));
vendor: 4,912 bytes, line 40
40r=t.pendingProps,o=t.memoizedState,s=o.element,Vx(e,t),Yl(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Ki(Error(H(423)),t),t=Lp(e,t,r,n,s);break e}else if(r!==s){s=Ki(Error(H(424)),t),t=Lp(e,t,r,n,s);break e}else for(Gt=Wr(t.stateNode.containerInfo.firstChild),Qt=t,Ve=!0,_n=null,n=Bx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vi(),r===s){t=dr(e,t,n);break e}Pt(e,t,r,n)}t=t.child}return t;case 5:return Hx(t),e===null&&Kd(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,a=s.children,Bd(r,s)?a=null:o!==null&&Bd(r,o)&&(t.flags|=32),gy(e,t),Pt(e,t,a,n),t.child;case 6:return e===null&&Kd(t),null;case 13:return xy(e,t,n);case 4:return jf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hi(t,null,r,n):Pt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:xn(r,s),Dp(e,t,r,s,n);case 7:return Pt(e,t,t.pendingProps,n),t.child;case 8:return Pt(e,t,t.pendingProps.children,n),t.child;case 12:return Pt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,a=s.value,Le(Kl,r._currentValue),r._currentValue=a,o!==null)if(En(o.value,a)){if(o.children===s.children&&!$t.current){t=dr(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=rr(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Gd(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(H(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),Gd(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Pt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,ki(t,n),s=un(s),r=r(s),t.flags|=1,Pt(e,t,r,n),t.child;case 14:return r=t.type,s=xn(r,t.pendingProps),s=xn(r.type,s),Mp(e,t,r,s,n);case 15:return my(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:xn(r,s),Nl(e,t),t.tag=1,Ut(r)?(e=!0,Vl(t)):e=!1,ki(t,n),dy(t,r,s),Qd(t,r,s,n),Zd(null,t,r,!0,e,n);case 19:return yy(e,t,n);case 22:return py(e,t,n)}throw Error(H(156,t.tag))};function My(e,t){return lx(e,t)}function dN(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,n,r){return new dN(e,t,n,r)}function Lf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hN(e){if(typeof e=="function")return Lf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tf)return 11;if(e===nf)return 14}return 2}function Kr(e,t){var n=e.alternate;return n===null?(n=an(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Cl(e,t,n,r,s,o){var a=2;if(r=e,typeof e=="function")Lf(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case hi:return Ns(n.children,s,o,t);case ef:a=8,s|=8;break;case wd:return e=an(12,n,t,s|2),e.elementType=wd,e.lanes=o,e;case bd:return e=an(13,n,t,s),e.elementType=bd,e.lanes=o,e;case jd:return e=an(19,n,t,s),e.elementType=jd,e.lanes=o,e;case Hv:return Pc(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Wv:a=10;break e;case Vv:a=9;break e;case tf:a=11;break e;case nf:a=14;break e;case Er:a=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=an(a,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function Ns(e,t,n,r){return e=an(7,e,r,t),e.lanes=n,e}function Pc(e,t,n,r){return e=an(22,e,r,t),e.elementType=Hv,e.lanes=n,e.stateNode={isHidden:!1},e}function Ku(e,t,n){return e=an(6,e,null,t),e.lanes=n,e}function Gu(e,t,n){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}
vendor: 5,453 bytes, line 40
40function fN(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cu(0),this.expirationTimes=Cu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cu(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Ff(e,t,n,r,s,o,a,l,c){return e=new fN(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=an(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},bf(o),e}function mN(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:di,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Iy(e){if(!e)return Qr;e=e._reactInternals;e:{if(zs(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ut(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(Ut(n))return Ix(e,n,t)}return t}function Ly(e,t,n,r,s,o,a,l,c){return e=Ff(n,r,!0,e,s,o,a,l,c),e.context=Iy(null),n=e.current,r=Rt(),s=qr(n),o=rr(r,s),o.callback=t??null,Vr(n,o,s),e.current.lanes=s,wa(e,s,r),zt(e,r),e}function Tc(e,t,n,r){var s=t.current,o=Rt(),a=qr(s);return n=Iy(n),t.context===null?t.context=n:t.pendingContext=n,t=rr(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Vr(s,t,a),e!==null&&(Nn(e,s,a,o),jl(e,s,a)),a}function rc(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 Kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $f(e,t){Kp(e,t),(e=e.alternate)&&Kp(e,t)}function pN(){return null}var Fy=typeof reportError=="function"?reportError:function(e){console.error(e)};function Uf(e){this._internalRoot=e}Rc.prototype.render=Uf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));Tc(e,t,null,null)};Rc.prototype.unmount=Uf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rs(function(){Tc(null,e,null,null)}),t[cr]=null}};function Rc(e){this._internalRoot=e}Rc.prototype.unstable_scheduleHydration=function(e){if(e){var t=px();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pr.length&&t!==0&&t<Pr[n].priority;n++);Pr.splice(n,0,e),n===0&&vx(e)}};function zf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ac(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Gp(){}function gN(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=rc(a);o.call(u)}}var a=Ly(t,r,e,0,null,!1,!1,"",Gp);return e._reactRootContainer=a,e[cr]=a.current,Zo(e.nodeType===8?e.parentNode:e),Rs(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=rc(c);l.call(u)}}var c=Ff(e,0,!1,null,null,!1,!1,"",Gp);return e._reactRootContainer=c,e[cr]=c.current,Zo(e.nodeType===8?e.parentNode:e),Rs(function(){Tc(t,c,n,r)}),c}function Oc(e,t,n,r,s){var o=n._reactRootContainer;if(o){var a=o;if(typeof s=="function"){var l=s;s=function(){var c=rc(a);l.call(c)}}Tc(t,a,e,s)}else a=gN(n,t,e,s,r);return rc(a)}fx=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Po(t.pendingLanes);n!==0&&(of(t,n|1),zt(t,Qe()),!(Ee&6)&&(Gi=Qe()+500,is()))}break;case 13:Rs(function(){var r=ur(e,1);if(r!==null){var s=Rt();Nn(r,e,1,s)}}),$f(e,1)}};af=function(e){if(e.tag===13){var t=ur(e,134217728);if(t!==null){var n=Rt();Nn(t,e,134217728,n)}$f(e,134217728)}};mx=function(e){if(e.tag===13){var t=qr(e),n=ur(e,t);if(n!==null){var r=Rt();Nn(n,e,t,r)}$f(e,t)}};px=function(){return Te};gx=function(e,t){var n=Te;try{return Te=e,t()}finally{Te=n}};Ad=function(e,t,n){switch(t){case"input":if(Nd(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=_c(r);if(!s)throw Error(H(90));Kv(r),Nd(r,s)}}}break;case"textarea":Yv(e,n);break;case"select":t=n.value,t!=null&&_i(e,!!n.multiple,t,!1)}};nx=Df;rx=Rs;var vN={usingClientEntryPoint:!1,Events:[ja,gi,_c,ex,tx,Df]},bo={findFiberByHostInstance:gs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xN={bundleType:bo.bundleType,version:bo.version,rendererPackageName:bo.rendererPackageName,rendererConfig:bo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ox(e),e===null?null:e.stateNode},findFiberByHostInstance:bo.findFiberByHostInstance||pN,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 Za=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Za.isDisabled&&Za.supportsFiber)try{yc=Za.inject(xN),Un=Za}catch{}}en.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vN;en.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zf(t))throw Error(H(200));return mN(e,t,null,n)};en.createRoot=function(e,t){if(!zf(e))throw Error(H(299));var n=!1,r="",s=Fy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Ff(e,1,!1,null,null,n,!1,r,s),e[cr]=t.current,Zo(e.nodeType===8?e.parentNode:e),new Uf(t)};en.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=ox(t),e=e===null?null:e.stateNode,e};en.flushSync=function(e){return Rs(e)};en.hydrate=function(e,t,n){if(!Ac(t))throw Error(H(200));return Oc(null,e,t,!0,n)};en.hydrateRoot=function(e,t,n){if(!zf(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",a=Fy;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Ly(t,null,e,1,n??null,s,!1,o,a),e[cr]=t.current,Zo(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Rc(t)};en.render=function(e,t,n){if(!Ac(t))throw Error(H(200));return Oc(null,e,t,!1,n)};en.unmountComponentAtNode=function(e){if(!Ac(e))throw Error(H(40));return e._reactRootContainer?(Rs(function(){Oc(null,null,e,!1,function(){e._reactRootContainer=null,e[cr]=null})}),!0):!1};en.unstable_batchedUpdates=Df;en.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ac(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return Oc(e,t,n,!1,r)};en.version="18.3.1-next-f1338f8080-20240426";function $y(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($y)}catch(e){console.error(e)}}$y(),$v.exports=en;var Bs=$v.exports;const Uy=kv(Bs);var zy,Yp=Bs;zy=Yp.createRoot,Yp.hydrateRoot;const yN=1,wN=1e6;let Yu=0;function bN(){return Yu=(Yu+1)%Number.MAX_SAFE_INTEGER,Yu.toString()}const Qu=new Map,Qp=e=>{if(Qu.has(e))return;const t=setTimeout(()=>{Qu.delete(e),Bo({type:"REMOVE_TOAST",toastId:e})},wN);Qu.set(e,t)},jN=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,yN)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Qp(n):e.toasts.forEach(r=>{Qp(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Pl=[];let Tl={toasts:[]};function Bo(e){Tl=jN(Tl,e),Pl.forEach(t=>{t(Tl)})}function re({...e}){const t=bN(),n=s=>Bo({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Bo({type:"DISMISS_TOAST",toastId:t});return Bo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Bt(){const[e,t]=f.useState(Tl);return f.useEffect(()=>(Pl.push(t),()=>{const n=Pl.indexOf(t);n>-1&&Pl.splice(n,1)}),[e]),{...e,toast:re,dismiss:n=>Bo({type:"DISMISS_TOAST",toastId:n})}}function oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function _N(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function By(...e){return t=>e.forEach(n=>_N(n,t))}function xe(...e){return f.useCallback(By(...e),e)}function SN(e,t=[]){let n=[];function r(o,a){const l=f.createContext(a),c=n.length;n=[...n,a];function u(h){const{scope:m,children:v,...b}=h,x=(m==null?void 0:m[e][c])||l,w=f.useMemo(()=>b,Object.values(b));return i.jsx(x.Provider,{value:w,children:v})}function d(h,m){const v=(m==null?void 0:m[e][c])||l,b=f.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const s=()=>{const o=n.map(a=>f.createContext(a));return function(l){const c=(l==null?void 0:l[e])||o;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,NN(s,...t)]}function NN(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));
vendor: 9,459 bytes, line 40
40return function(o){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(o)[`__scope${u}`];return{...l,...h}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var As=f.forwardRef((e,t)=>{const{children:n,...r}=e,s=f.Children.toArray(n),o=s.find(EN);if(o){const a=o.props.children,l=s.map(c=>c===o?f.Children.count(a)>1?f.Children.only(null):f.isValidElement(a)?a.props.children:null:c);return i.jsx(dh,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,l):null})}return i.jsx(dh,{...r,ref:t,children:n})});As.displayName="Slot";var dh=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const s=CN(n);return f.cloneElement(n,{...kN(r,n.props),ref:t?By(t,s):s})}return f.Children.count(n)>1?f.Children.only(null):null});dh.displayName="SlotClone";var Bf=({children:e})=>i.jsx(i.Fragment,{children:e});function EN(e){return f.isValidElement(e)&&e.type===Bf}function kN(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...l)=>{o(...l),s(...l)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function CN(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Wf(e){const t=e+"CollectionProvider",[n,r]=SN(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:x}=v,w=G.useRef(null),g=G.useRef(new Map).current;return i.jsx(s,{scope:b,itemMap:g,collectionRef:w,children:x})};a.displayName=t;const l=e+"CollectionSlot",c=G.forwardRef((v,b)=>{const{scope:x,children:w}=v,g=o(l,x),p=xe(b,g.collectionRef);return i.jsx(As,{ref:p,children:w})});c.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=G.forwardRef((v,b)=>{const{scope:x,children:w,...g}=v,p=G.useRef(null),y=xe(b,p),_=o(u,x);return G.useEffect(()=>(_.itemMap.set(p,{ref:p,...g}),()=>void _.itemMap.delete(p))),i.jsx(As,{[d]:"",ref:y,children:w})});h.displayName=u;function m(v){const b=o(e+"CollectionConsumer",v);return G.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const g=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((_,E)=>g.indexOf(_.ref.current)-g.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:c,ItemSlot:h},m,r]}function PN(e,t){const n=f.createContext(t),r=o=>{const{children:a,...l}=o,c=f.useMemo(()=>l,Object.values(l));return i.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function s(o){const a=f.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,s]}function Ws(e,t=[]){let n=[];function r(o,a){const l=f.createContext(a),c=n.length;n=[...n,a];const u=h=>{var g;const{scope:m,children:v,...b}=h,x=((g=m==null?void 0:m[e])==null?void 0:g[c])||l,w=f.useMemo(()=>b,Object.values(b));return i.jsx(x.Provider,{value:w,children:v})};u.displayName=o+"Provider";function d(h,m){var x;const v=((x=m==null?void 0:m[e])==null?void 0:x[c])||l,b=f.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,d]}const s=()=>{const o=n.map(a=>f.createContext(a));return function(l){const c=(l==null?void 0:l[e])||o;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,TN(s,...t)]}function TN(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(o)[`__scope${u}`];return{...l,...h}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var RN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],de=RN.reduce((e,t)=>{const n=f.forwardRef((r,s)=>{const{asChild:o,...a}=r,l=o?As:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(l,{...a,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Wy(e,t){e&&Bs.flushSync(()=>e.dispatchEvent(t))}function Xe(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function AN(e,t=globalThis==null?void 0:globalThis.document){const n=Xe(e);f.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ON="DismissableLayer",hh="dismissableLayer.update",DN="dismissableLayer.pointerDownOutside",MN="dismissableLayer.focusOutside",Xp,Vy=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sa=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=e,u=f.useContext(Vy),[d,h]=f.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=f.useState({}),b=xe(t,j=>h(j)),x=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=x.indexOf(w),p=d?x.indexOf(d):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,_=p>=g,E=LN(j=>{const S=j.target,k=[...u.branches].some(N=>N.contains(S));!_||k||(s==null||s(j),a==null||a(j),j.defaultPrevented||l==null||l())},m),C=FN(j=>{const S=j.target;[...u.branches].some(N=>N.contains(S))||(o==null||o(j),a==null||a(j),j.defaultPrevented||l==null||l())},m);return AN(j=>{p===u.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&l&&(j.preventDefault(),l()))},m),f.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Xp=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Jp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Xp)}},[d,m,n,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Jp())},[d,u]),f.useEffect(()=>{const j=()=>v({});return document.addEventListener(hh,j),()=>document.removeEventListener(hh,j)},[]),i.jsx(de.div,{...c,ref:b,style:{pointerEvents:y?_?"auto":"none":void 0,...e.style},onFocusCapture:oe(e.onFocusCapture,C.onFocusCapture),onBlurCapture:oe(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:oe(e.onPointerDownCapture,E.onPointerDownCapture)})});Sa.displayName=ON;var IN="DismissableLayerBranch",Hy=f.forwardRef((e,t)=>{const n=f.useContext(Vy),r=f.useRef(null),s=xe(t,r);return f.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),i.jsx(de.div,{...e,ref:s})});Hy.displayName=IN;function LN(e,t=globalThis==null?void 0:globalThis.document){const n=Xe(e),r=f.useRef(!1),s=f.useRef(()=>{});return f.useEffect(()=>{const o=l=>{if(l.target&&!r.current){let c=function(){qy(DN,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function FN(e,t=globalThis==null?void 0:globalThis.document){const n=Xe(e),r=f.useRef(!1);return f.useEffect(()=>{const s=o=>{o.target&&!r.current&&qy(MN,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Jp(){const e=new CustomEvent(hh);document.dispatchEvent(e)}function qy(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Wy(s,o):s.dispatchEvent(o)}var $N=Sa,UN=Hy,Be=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},zN="Portal",Dc=f.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[s,o]=f.useState(!1);Be(()=>o(!0),[]);const a=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?Uy.createPortal(i.jsx(de.div,{...r,ref:t}),a):null});Dc.displayName=zN;function BN(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Ky=e=>{const{present:t,children:n}=e,r=WN(t),s=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),o=xe(r.ref,VN(s));return typeof n=="function"||r.isPresent?f.cloneElement(s,{ref:o}):null};Ky.displayName="Presence";function WN(e){const[t,n]=f.useState(),r=f.useRef({}),s=f.useRef(e),o=f.useRef("none"),a=e?"mounted":"unmounted",[l,c]=BN(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=el(r.current);o.current=l==="mounted"?u:"none"},[l]),Be(()=>{const u=r.current,d=s.current;if(d!==e){const m=o.current,v=el(u);e?c("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Be(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=v=>
40{const x=el(r.current).includes(v.animationName);if(v.target===t&&x&&(c("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=v=>{v.target===t&&(o.current=el(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function el(e){return(e==null?void 0:e.animationName)||"none"}function VN(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Os({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=HN({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,l=Xe(n),c=f.useCallback(u=>{if(o){const h=typeof u=="function"?u(e):u;h!==e&&l(h)}else s(u)},[o,e,s,l]);return[a,c]}function HN({defaultProp:e,onChange:t}){const n=f.useState(e),[r]=n,s=f.useRef(r),o=Xe(t);return f.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var qN="VisuallyHidden",Na=f.forwardRef((e,t)=>i.jsx(de.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Na.displayName=qN;var KN=Na,Vf="ToastProvider",[Hf,GN,YN]=Wf("Toast"),[Gy,sI]=Ws("Toast",[YN]),[QN,Mc]=Gy(Vf),Yy=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:a}=e,[l,c]=f.useState(null),[u,d]=f.useState(0),h=f.useRef(!1),m=f.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Vf}\`. Expected non-empty \`string\`.`),i.jsx(Hf.Provider,{scope:t,children:i.jsx(QN,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:f.useCallback(()=>d(v=>v+1),[]),onToastRemove:f.useCallback(()=>d(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:m,children:a})})};Yy.displayName=Vf;var Qy="ToastViewport",XN=["F8"],fh="toast.viewportPause",mh="toast.viewportResume",Xy=f.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=XN,label:s="Notifications ({hotkey})",...o}=e,a=Mc(Qy,n),l=GN(n),c=f.useRef(null),u=f.useRef(null),d=f.useRef(null),h=f.useRef(null),m=xe(t,h,a.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;f.useEffect(()=>{const w=g=>{var y;r.length!==0&&r.every(_=>g[_]||g.code===_)&&((y=h.current)==null||y.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),f.useEffect(()=>{const w=c.current,g=h.current;if(b&&w&&g){const p=()=>{if(!a.isClosePausedRef.current){const C=new CustomEvent(fh);g.dispatchEvent(C),a.isClosePausedRef.current=!0}},y=()=>{if(a.isClosePausedRef.current){const C=new CustomEvent(mh);g.dispatchEvent(C),a.isClosePausedRef.current=!1}},_=C=>{!w.contains(C.relatedTarget)&&y()},E=()=>{w.contains(document.activeElement)||y()};return w.addEventListener("focusin",p),w.addEventListener("focusout",_),w.addEventListener("pointermove",p),w.addEventListener("pointerleave",E),window.addEventListener("blur",p),window.addEventListener("focus",y),()=>{w.removeEventListener("focusin",p),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",p),w.removeEventListener("pointerleave",E),window.removeEventListener("blur",p),window.removeEventListener("focus",y)}}},[b,a.isClosePausedRef]);const x=f.useCallback(({tabbingDirection:w})=>{const p=l().map(y=>{const _=y.ref.current,E=[_,...uE(_)];return w==="forwards"?E:E.reverse()});return(w==="forwards"?p.reverse():p).flat()},[l]);return f.useEffect(()=>{const w=h.current;if(w){const g=p=>{var E,C,j;const y=p.altKey||p.ctrlKey||p.metaKey;
40if(p.key==="Tab"&&!y){const S=document.activeElement,k=p.shiftKey;if(p.target===w&&k){(E=u.current)==null||E.focus();return}const M=x({tabbingDirection:k?"backwards":"forwards"}),W=M.findIndex(F=>F===S);Xu(M.slice(W+1))?p.preventDefault():k?(C=u.current)==null||C.focus():(j=d.current)==null||j.focus()}};return w.addEventListener("keydown",g),()=>w.removeEventListener("keydown",g)}},[l,x]),i.jsxs(UN,{ref:c,role:"region","aria-label":s.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&i.jsx(ph,{ref:u,onFocusFromOutsideViewport:()=>{const w=x({tabbingDirection:"forwards"});Xu(w)}}),i.jsx(Hf.Slot,{scope:n,children:i.jsx(de.ol,{tabIndex:-1,...o,ref:m})}),b&&i.jsx(ph,{ref:d,onFocusFromOutsideViewport:()=>{const w=x({tabbingDirection:"backwards"});Xu(w)}})]})});Xy.displayName=Qy;var Jy="ToastFocusProxy",ph=f.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Mc(Jy,n);return i.jsx(Na,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const l=a.relatedTarget;!((u=o.viewport)!=null&&u.contains(l))&&r()}})});ph.displayName=Jy;var Ic="Toast",JN="toast.swipeStart",ZN="toast.swipeMove",eE="toast.swipeCancel",tE="toast.swipeEnd",Zy=f.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...a}=e,[l=!0,c]=Os({prop:r,defaultProp:s,onChange:o});return i.jsx(Ky,{present:n||l,children:i.jsx(sE,{open:l,...a,ref:t,onClose:()=>c(!1),onPause:Xe(e.onPause),onResume:Xe(e.onResume),onSwipeStart:oe(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:oe(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:oe(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:oe(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});Zy.displayName=Ic;var[nE,rE]=Gy(Ic,{onClose(){}}),sE=f.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:a,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:m,onSwipeEnd:v,...b}=e,x=Mc(Ic,n),[w,g]=f.useState(null),p=xe(t,F=>g(F)),y=f.useRef(null),_=f.useRef(null),E=s||x.duration,C=f.useRef(0),j=f.useRef(E),S=f.useRef(0),{onToastAdd:k,onToastRemove:N}=x,P=Xe(()=>{var R;(w==null?void 0:w.contains(document.activeElement))&&((R=x.viewport)==null||R.focus()),a()}),M=f.useCallback(F=>{!F||F===1/0||(window.clearTimeout(S.current),C.current=new Date().getTime(),S.current=window.setTimeout(P,F))},[P]);f.useEffect(()=>{const F=x.viewport;if(F){const R=()=>{M(j.current),u==null||u()},A=()=>{const L=new Date().getTime()-C.current;j.current=j.current-L,window.clearTimeout(S.current),c==null||c()};return F.addEventListener(fh,A),F.addEventListener(mh,R),()=>{F.removeEventListener(fh,A),F.removeEventListener(mh,R)}}},[x.viewport,E,c,u,M]),f.useEffect(()=>{o&&!x.isClosePausedRef.current&&M(E)},[o,E,x.isClosePausedRef,M]),f.useEffect(()=>(k(),()=>N()),[k,N]);const W=f.useMemo(()=>w?ow(w):null,[w]);return x.viewport?i.jsxs(i.Fragment,{children:[W&&i.jsx(iE,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),i.jsx(nE,{scope:n,onClose:P,children:Bs.createPortal(i.jsx(Hf.ItemSlot,{scope:n,children:i.jsx($N,{asChild:!0,onEscapeKeyDown:oe(l,()=>{x.isFocusedToastEscapeKeyDownRef.current||P(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:i.jsx(de.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":x.swipeDirection,...b,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:oe(e.onKeyDown,F=>{F.key==="Escape"&&(l==null||l(F.nativeEvent),F.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,P()))}),onPointerDown:oe(e.onPointerDown,F=>{F.button===0&&(y.current={x:F.clientX,y:F.clientY})}),onPointerMove:oe(e.onPointerMove,F=>{if(!y.current)return;const R=F.clientX-y.current.x,A=F.clientY-y.current.y,L=!!_.current,T=["left","right"].includes(x.swipeDirection),I=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,D=T?I(0,R):0,U=T?0:I(0,A),K=F.pointerType==="touch"?10:2,q={x:D,y:U},Q={originalEvent:F,delta:q};L?(_.current=q,tl(ZN,h,Q,{discrete:!1})):Zp(q,x.swipeDirection,K)?(_.current=q,tl(JN,d,Q,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(R)>K||Math.abs(A)>K)&&(y.current=null)}),onPointerUp:oe(e.onPointerUp,F=>{const R=_.current,A=F.target;if(A.hasPointerCapture(F.pointerId)&&A.releasePointerCapture(F.pointerId),_.current=null,y.current=null,R){const L=F.currentTarget,T={originalEvent:F,delta:R};Zp(R,x.swipeDirection,x.swipeThreshold)?tl(tE,v,T,{discrete:!0}):tl(eE,m,T,{discrete:!0}),L.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),iE=e=>{const{__scopeToast:t,children:n,...r}=e,s=Mc(Ic,t),[o,a]=f.useState(!1),[l,c]=f.useState(!1);return lE(()=>a(!0)),f.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:i.jsx(Dc,{asChild:!0,children:i.jsx(Na,{...r,children:o&&i.jsxs(i.Fragment,{children:[s.label," ",n]})})})},oE="ToastTitle",ew=f.forwardRef((e,t)=>
vendor: 4,742 bytes, lines 40-60
40{const{__scopeToast:n,...r}=e;return i.jsx(de.div,{...r,ref:t})});ew.displayName=oE;var aE="ToastDescription",tw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return i.jsx(de.div,{...r,ref:t})});tw.displayName=aE;var nw="ToastAction",rw=f.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?i.jsx(iw,{altText:n,asChild:!0,children:i.jsx(qf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${nw}\`. Expected non-empty \`string\`.`),null)});rw.displayName=nw;var sw="ToastClose",qf=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=rE(sw,n);return i.jsx(iw,{asChild:!0,children:i.jsx(de.button,{type:"button",...r,ref:t,onClick:oe(e.onClick,s.onClose)})})});qf.displayName=sw;var iw=f.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return i.jsx(de.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function ow(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),cE(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...ow(r))}}),t}function tl(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Wy(s,o):s.dispatchEvent(o)}var Zp=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function lE(e=()=>{}){const t=Xe(e);Be(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function cE(e){return e.nodeType===e.ELEMENT_NODE}function uE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Xu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var dE=Yy,aw=Xy,lw=Zy,cw=ew,uw=tw,dw=rw,hw=qf;function fw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=fw(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function mw(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=fw(e))&&(r&&(r+=" "),r+=t);return r}const eg=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,tg=mw,Lc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return tg(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=o==null?void 0:o[u];if(d===null)return null;const m=eg(d)||eg(h);return s[u][m]}),l=n&&Object.entries(n).reduce((u,d)=>{let[h,m]=d;return m===void 0||(u[h]=m),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:m,...v}=d;return Object.entries(v).every(b=>{let[x,w]=b;return Array.isArray(w)?w.includes({...o,...l}[x]):{...o,...l}[x]===w})?[...u,h,m]:u},[]);return tg(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const hE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pw=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var fE={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"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const mE=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...l},c)=>f.createElement("svg",{ref:c,...fE,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:pw("lucide",s),...l},[...a.map(([u,d])=>f.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const ue=(e,t)=>
60{const n=f.forwardRef(({className:r,...s},o)=>f.createElement(mE,{ref:o,iconNode:t,className:pw(`lucide-${hE(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const Bn=ue("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const ng=ue("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const gw=ue("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const pE=ue("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const Yi=ue("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"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const sc=ue("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const tt=ue("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"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const vw=ue("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const xw=ue("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const gE=ue("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const vE=ue("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const xE=ue("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"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const Fc=ue("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const yE=ue("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const wE=ue("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const la=ue("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"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const yw=ue("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"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const so=ue("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const Ds=ue("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"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const ww=ue("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const bE=ue("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"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const Kf=ue("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const Yt=ue("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const bw=ue("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const jE=ue("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const _E=ue("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const SE=ue("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const jw=ue("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const NE=ue("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const EE=ue("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
211 * @license lucide-react v0.462.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const sr=ue("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"}]]);/**
216 * @license lucide-react v0.462.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const Ms=ue("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"}]]);/**
221 * @license lucide-react v0.462.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const rg=ue("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"}]]);/**
226 * @license lucide-react v0.462.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const kE=ue("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"}]]);/**
231 * @license lucide-react v0.462.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const $c=ue("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
236 * @license lucide-react v0.462.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const _w=ue("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
241 * @license lucide-react v0.462.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const Xr=ue("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
246 * @license lucide-react v0.462.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const CE=ue("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
251 * @license lucide-react v0.462.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const Sw=ue("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
256 * @license lucide-react v0.462.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const PE=ue("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
260y:"oel41y"}]]);/**
261 * @license lucide-react v0.462.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const Nw=ue("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
266 * @license lucide-react v0.462.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const TE=ue("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"}]]);/**
271 * @license lucide-react v0.462.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const RE=ue("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]);/**
276 * @license lucide-react v0.462.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const AE=ue("ToggleRight",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]]);/**
281 * @license lucide-react v0.462.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const Qi=ue("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
286 * @license lucide-react v0.462.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const gh=ue("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
291 * @license lucide-react v0.462.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const OE=ue("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
296 * @license lucide-react v0.462.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const sg=ue("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
301 * @license lucide-react v0.462.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const DE=ue("UserPlus",[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
306 * @license lucide-react v0.462.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const ys=ue("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"}]]);/**
311 * @license lucide-react v0.462.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const _t=ue("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"}]]);/**
316 * @license lucide-react v0.462.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const Gf=ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,913 bytes, line 320
320],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Yf="-",ME=e=>{const t=LE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const l=a.split(Yf);return l[0]===""&&l.length!==1&&l.shift(),Ew(l,t)||IE(a)},getConflictingClassGroupIds:(a,l)=>{const c=n[a]||[];return l&&r[a]?[...c,...r[a]]:c}}},Ew=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Ew(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Yf);return(a=t.validators.find(({validator:l})=>l(o)))==null?void 0:a.classGroupId},ig=/^\[(.+)\]$/,IE=e=>{if(ig.test(e)){const t=ig.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},LE=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return $E(Object.entries(e.classGroups),n).forEach(([o,a])=>{vh(a,r,o,t)}),r},vh=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:og(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(FE(s)){vh(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,a])=>{vh(a,og(t,o),n,r)})})},og=(e,t)=>{let n=e;return t.split(Yf).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},FE=e=>e.isThemeGetter,$E=(e,t)=>t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,l])=>[t+a,l])):o);return[n,s]}):e,UE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return s(o,a),a},set(o,a){n.has(o)?n.set(o,a):s(o,a)}}},kw="!",zE=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,a=l=>{const c=[];let u=0,d=0,h;for(let w=0;w<l.length;w++){let g=l[w];if(u===0){if(g===s&&(r||l.slice(w,w+o)===t)){c.push(l.slice(d,w)),d=w+o;continue}if(g==="/"){h=w;continue}}g==="["?u++:g==="]"&&u--}const m=c.length===0?l:l.substring(d),v=m.startsWith(kw),b=v?m.substring(1):m,x=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:v,baseClassName:b,maybePostfixModifierPosition:x}};return n?l=>n({className:l,parseClassName:a}):a},BE=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},WE=e=>({cache:UE(e.cacheSize),parseClassName:zE(e),...ME(e)}),VE=/\s+/,HE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],a=e.trim().split(VE);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:v}=n(u);let b=!!v,x=r(b?m.substring(0,v):m);if(!x){if(!b){l=u+(l.length>0?" "+l:l);continue}if(x=r(m),!x){l=u+(l.length>0?" "+l:l);continue}b=!1}const w=BE(d).join(":"),g=h?w+kw:w,p=g+x;if(o.includes(p))continue;o.push(p);const y=s(x,b);for(let _=0;_<y.length;++_){const E=y[_];o.push(g+E)}l=u+(l.length>0?" "+l:l)}return l};function qE(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Cw(t))&&(r&&(r+=" "),r+=n);return r}const Cw=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Cw(e[r]))&&(n&&(n+=" "),n+=t);return n};function KE(e,...t){let n,r,s,o=a;function a(c){const u=t.reduce((d,h)=>h(d),e());return n=WE(u),r=n.cache.get,s=n.cache.set,o=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=HE(c,n);return s(c,d),d}return function(){return o(qE.apply(null,arguments))}}const $e=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Pw=/^\[(?:([a-z-]+):)?(.+)\]$/i,GE=/^\d+\/\d+$/,YE=new Set(["px","full","screen"]),QE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,JE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ZE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ek=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Kn=e=>Pi(e)||YE.has(e)||GE.test(e),yr=e=>io(e,"length",lk),Pi=e=>!!e&&!Number.isNaN(Number(e)),Ju=e=>io(e,"number",Pi),jo=e=>!!e&&Number.isInteger(Number(e)),tk=e=>e.endsWith("%")&&Pi(e.slice(0,-1)),pe=e=>Pw.test(e),wr=e=>QE.test(e),nk=new Set(["length","size","percentage"]),rk=e=>io(e,nk,Tw),sk=e=>io(e,"position",Tw),ik=new Set(["image","url"]),ok=e=>io(e,ik,uk),ak=e=>io(e,"",ck),_o=()=>!0,io=(e,t,n)=>{const r=Pw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},lk=e=>XE.test(e)&&!JE.test(e),Tw=()=>!1,ck=e=>ZE.test(e),uk=e=>ek.test(e),dk=()=>{const e=$e("colors"),t=$e("spacing"),n=$e("blur"),r=$e("brightness"),s=$e("borderColor"),o=$e("borderRadius"),a=$e("borderSpacing"),l=$e("borderWidth"),c=$e("contrast"),u=$e("grayscale"),d=$e("hueRotate"),h=$e("invert"),m=$e("gap"),v=$e("gradientColorStops"),b=$e("gradientColorStopPositions"),x=$e("inset"),w=$e("margin"),g=$e("opacity"),p=$e("padding"),y=$e("saturate"),_=$e("scale"),E=$e("sepia"),C=$e("skew"),j=$e("space"),S=$e("translate"),k=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",pe,t],M=()=>[pe,t],W=()=>["",Kn,yr],F=()=>["auto",Pi,pe],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],A=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",pe],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[Pi,pe];return{cacheSize:500,separator:":",theme:{colors:[_o],spacing:[Kn,yr],blur:["none","",wr,pe],brightness:U(),borderColor:[e],borderRadius:["n
320one","","full",wr,pe],borderSpacing:M(),borderWidth:W(),contrast:U(),grayscale:I(),hueRotate:U(),invert:I(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[tk,yr],inset:P(),margin:P(),opacity:U(),padding:M(),saturate:U(),scale:U(),sepia:I(),skew:U(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",pe]}],container:["container"],columns:[{columns:[wr]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...R(),pe]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",jo,pe]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",pe]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",jo,pe]}],"grid-cols":[{"grid-cols":[_o]}],"col-start-end":[{col:["auto",{span:["full",jo,pe]},pe]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[_o]}],"row-start-end":[{row:["auto",{span:[jo,pe]},pe]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",pe]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",pe,t]}],"min-w":[{"min-w":[pe,t,"min","max","fit"]}],"max-w":[{"max-w":[pe,t,"none","full","min","max","fit","prose",{screen:[wr]},wr]}],h:[{h:[pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",wr,yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ju]}],"font-family":[{font:[_o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",pe]}],"line-clamp":[{"line-clamp":["none",Pi,Ju]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Kn,pe]}],"list-image":[{"list-image":["none",pe]}],"list-style-type":[{list:["none","disc","decimal",pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...A(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Kn,yr]}],"underline-offset":[{"underline-offset":["auto",Kn,pe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),sk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",rk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ok]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}
vendor: 5,180 bytes, line 320
320],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...A(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:A()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...A()]}],"outline-offset":[{"outline-offset":[Kn,pe]}],"outline-w":[{outline:[Kn,yr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Kn,yr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wr,ak]}],"shadow-color":[{shadow:[_o]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",wr,pe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[y]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",pe]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",pe]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[jo,pe]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",pe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
320],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Kn,yr,Ju]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},hk=KE(dk);function ce(...e){return hk(mw(e))}const Qf="email_cooldown_expiry";function fk(){const e=localStorage.getItem(Qf);return e?parseInt(e,10):null}function mk(e){const t=Date.now()+e*1e3;localStorage.setItem(Qf,t.toString())}function Rw(){localStorage.removeItem(Qf)}
320function pk(){const e=fk();if(!e)return 0;const t=Math.max(0,Math.ceil((e-Date.now())/1e3));return t===0&&Rw(),t}const gk=dE,Aw=f.forwardRef(({className:e,...t},n)=>i.jsx(aw,{ref:n,className:ce("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Aw.displayName=aw.displayName;const vk=Lc("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Ow=f.forwardRef(({className:e,variant:t,...n},r)=>i.jsx(lw,{ref:r,className:ce(vk({variant:t}),e),...n}));Ow.displayName=lw.displayName;const xk=f.forwardRef(({className:e,...t},n)=>i.jsx(dw,{ref:n,className:ce("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));xk.displayName=dw.displayName;const Dw=f.forwardRef(({className:e,...t},n)=>i.jsx(hw,{ref:n,className:ce("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:i.jsx(Gf,{className:"h-4 w-4"})}));Dw.displayName=hw.displayName;const Mw=f.forwardRef(({className:e,...t},n)=>i.jsx(cw,{ref:n,className:ce("text-sm font-semibold",e),...t}));Mw.displayName=cw.displayName;const Iw=f.forwardRef(({className:e,...t},n)=>i.jsx(uw,{ref:n,className:ce("text-sm opacity-90",e),...t}));Iw.displayName=uw.displayName;function yk(){const{toasts:e}=Bt();return i.jsxs(gk,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return i.jsxs(Ow,{...o,children:[i.jsxs("div",{className:"grid gap-1",children:[n&&i.jsx(Mw,{children:n}),r&&i.jsx(Iw,{children:r})]}),s,i.jsx(Dw,{})]},t)}),i.jsx(Aw,{})]})}var ag=["light","dark"],wk="(prefers-color-scheme: dark)",bk=f.createContext(void 0),jk={setTheme:e=>{},themes:[]},_k=()=>{var e;return(e=f.useContext(bk))!=null?e:jk};f.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:o,value:a,attrs:l,nonce:c})=>{let u=o==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?ag.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(b,x=!1,w=!0)=>{let g=a?a[b]:b,p=x?b+"|| ''":`'${g}'`,y="";return s&&w&&!x&&ag.includes(b)&&(y+=`d.style.colorScheme = '${b}';`),n==="class"?x||g?y+=`c.add(${p})`:y+="null":g&&(y+=`d[s](n,${p})`),y},v=e?`!function(){${d}${m(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${wk}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${m(a?"x[e]":"e",!0)}}${u?"":"else{"+m(o,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${m(a?"x[e]":"e",!0)}}else{${m(o,!1,!1)};}${h}}catch(t){}}();`;return f.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:v}})});var Sk=e=>{switch(e){case"success":return kk;case"info":return Pk;case"warning":return Ck;case"error":return Tk;default:return null}},Nk=Array(12).fill(0),Ek=({visible:e})=>G.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},G.createElement("div",{className:"sonner-spinner"},Nk.map((t,n)=>G.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),kk=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Ck=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
320currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Pk=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Tk=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Rk=()=>{let[e,t]=G.useState(document.hidden);return G.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},xh=1,Ak=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:xh++,o=this.toasts.find(l=>l.id===s),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:n}),{...l,...e,id:s,dismissible:a,title:n}):l):this.addToast({title:n,...r,dismissible:a,id:s}),s},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
320this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0;return r.then(async o=>{if(Dk(o)&&!o.ok){s=!1;let a=typeof t.error=="function"?await t.error(`HTTP error! status: ${o.status}`):t.error,l=typeof t.description=="function"?await t.description(`HTTP error! status: ${o.status}`):t.description;this.create({id:n,type:"error",message:a,description:l})}else if(t.success!==void 0){s=!1;let a=typeof t.success=="function"?await t.success(o):t.success,l=typeof t.description=="function"?await t.description(o):t.description;this.create({id:n,type:"success",message:a,description:l})}}).catch(async o=>{if(t.error!==void 0){s=!1;let a=typeof t.error=="function"?await t.error(o):t.error,l=typeof t.description=="function"?await t.description(o):t.description;this.create({id:n,type:"error",message:a,description:l})}}).finally(()=>{var o;s&&(this.dismiss(n),n=void 0),(o=t.finally)==null||o.call(t)}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||xh++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Ht=new Ak,Ok=(e,t)=>{let n=(t==null?void 0:t.id)||xh++;return Ht.addToast({title:e,...t,id:n}),n},Dk=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Mk=Ok,Ik=()=>Ht.toasts;Object.assign(Mk,{success:Ht.success,info:Ht.info,warning:Ht.warning,error:Ht.error,custom:Ht.custom,message:Ht.message,promise:Ht.promise,dismiss:Ht.dismiss,loading:Ht.loading},{getHistory:Ik});function Lk(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Lk(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
320left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
320:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
321`);function nl(e){return e.label!==void 0}var Fk=3,$k="32px",Uk=4e3,zk=356,Bk=14,Wk=20,Vk=200;function Hk(...e){return e.filter(Boolean).join(" ")}var qk=e=>{var t,n,r,s,o,a,l,c,u,d;let{invert:h,toast:m,unstyled:v,interacting:b,setHeights:x,visibleToasts:w,heights:g,index:
321p,toasts:y,expanded:_,removeToast:E,defaultRichColors:C,closeButton:j,style:S,cancelButtonStyle:k,actionButtonStyle:N,className:P="",descriptionClassName:M="",duration:W,position:F,gap:R,loadingIcon:A,expandByDefault:L,classNames:T,icons:I,closeButtonAriaLabel:D="Close toast",pauseWhenPageIsHidden:U,cn:K}=e,[q,Q]=G.useState(!1),[V,X]=G.useState(!1),[ee,ve]=G.useState(!1),[We,je]=G.useState(!1),[ke,_e]=G.useState(0),[dt,kt]=G.useState(0),z=G.useRef(null),te=G.useRef(null),be=p===0,De=p+1<=w,Oe=m.type,nn=m.dismissible!==!1,gr=m.className||"",xu=m.descriptionClassName||"",Xs=G.useMemo(()=>g.findIndex(me=>me.toastId===m.id)||0,[g,m.id]),yu=G.useMemo(()=>{var me;return(me=m.closeButton)!=null?me:j},[m.closeButton,j]),Da=G.useMemo(()=>m.duration||W||Uk,[m.duration,W]),fo=G.useRef(0),qn=G.useRef(0),Js=G.useRef(0),Re=G.useRef(null),[fn,wu]=F.split("-"),Fm=G.useMemo(()=>g.reduce((me,Fe,Me)=>Me>=Xs?me:me+Fe.height,0),[g,Xs]),$m=Rk(),W1=m.invert||h,bu=Oe==="loading";qn.current=G.useMemo(()=>Xs*R+Fm,[Xs,Fm]),G.useEffect(()=>{Q(!0)},[]),G.useLayoutEffect(()=>{if(!q)return;let me=te.current,Fe=me.style.height;me.style.height="auto";let Me=me.getBoundingClientRect().height;me.style.height=Fe,kt(Me),x(Rn=>Rn.find(An=>An.toastId===m.id)?Rn.map(An=>An.toastId===m.id?{...An,height:Me}:An):[{toastId:m.id,height:Me,position:m.position},...Rn])},[q,m.title,m.description,x,m.id]);let vr=G.useCallback(()=>{X(!0),_e(qn.current),x(me=>me.filter(Fe=>Fe.toastId!==m.id)),setTimeout(()=>{E(m)},Vk)},[m,E,x,qn]);G.useEffect(()=>{if(m.promise&&Oe==="loading"||m.duration===1/0||m.type==="loading")return;let me,Fe=Da;return _||b||U&&$m?(()=>{if(Js.current<fo.current){let Me=new Date().getTime()-fo.current;Fe=Fe-Me}Js.current=new Date().getTime()})():Fe!==1/0&&(fo.current=new Date().getTime(),me=setTimeout(()=>{var Me;(Me=m.onAutoClose)==null||Me.call(m,m),vr()},Fe)),()=>clearTimeout(me)},[_,b,L,m,Da,vr,m.promise,Oe,U,$m]),G.useEffect(()=>{let me=te.current;if(me){let Fe=me.getBoundingClientRect().height;return kt(Fe),x(Me=>[{toastId:m.id,height:Fe,position:m.position},...Me]),()=>x(Me=>Me.filter(Rn=>Rn.toastId!==m.id))}},[x,m.id]),G.useEffect(()=>{m.delete&&vr()},[vr,m.delete]);function V1(){return I!=null&&I.loading?G.createElement("div",{className:"sonner-loader","data-visible":Oe==="loading"},I.loading):A?G.createElement("div",{className:"sonner-loader","data-visible":Oe==="loading"},A):G.createElement(Ek,{visible:Oe==="loading"})}return G.createElement("li",{"aria-live":m.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:te,className:K(P,gr,T==null?void 0:T.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[Oe],(n=m==null?void 0:m.classNames)==null?void 0:n[Oe]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:C,"data-styled":!(m.jsx||m.unstyled||v),"data-mounted":q,"data-promise":!!m.promise,"data-removed":V,"data-visible":De,"data-y-position":fn,"data-x-position":wu,"data-index":p,"data-front":be,"data-swiping":ee,"data-dismissible":nn,"data-type":Oe,"data-invert":W1,"data-swipe-out":We,"data-expanded":!!(_||L&&q),style:{"--index":p,"--toasts-before":p,"--z-index":y.length-p,"--offset":`${V?ke:qn.current}px`,"--initial-height":L?"auto":`${dt}px`,...S,...m.style},onPointerDown:me=>{bu||!nn||(z.current=new Date,_e(qn.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(ve(!0),Re.current={x:me.clientX,y:me.clientY}))},onPointerUp:()=>{var me,Fe,Me,Rn;if(We||!nn)return;Re.current=null;let An=Number(((me=te.current)==null?void 0:me.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Ma=new Date().getTime()-((Fe=z.current)==null?void 0:Fe.getTime()),H1=Math.abs(An)/Ma;if(Math.abs(An)>=Wk||H1>.11){_e(qn.current),(Me=m.onDismiss)==null||Me.call(m,m),vr(),je(!0);return}(Rn=te.current)==null||Rn.style.setProperty("--swipe-amount","0px"),ve(!1)},onPointerMove:me=>{var Fe;if(!Re.current||!nn)return;let Me=me.clientY-Re.current.y,Rn=me.clientX-Re.current.x,An=(fn==="top"?Math.min:Math.max)(0,Me),Ma=me.pointerType==="touch"?10:2;Math.abs(An)>Ma?(Fe=te.current)==null||Fe.style.setProperty("--swipe-amount",`${Me}px`):Math.abs(Rn)>
321Ma&&(Re.current=null)}},yu&&!m.jsx?G.createElement("button",{"aria-label":D,"data-disabled":bu,"data-close-button":!0,onClick:bu||!nn?()=>{}:()=>{var me;vr(),(me=m.onDismiss)==null||me.call(m,m)},className:K(T==null?void 0:T.closeButton,(s=m==null?void 0:m.classNames)==null?void 0:s.closeButton)},G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},G.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),G.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,m.jsx||G.isValidElement(m.title)?m.jsx||m.title:G.createElement(G.Fragment,null,Oe||m.icon||m.promise?G.createElement("div",{"data-icon":"",className:K(T==null?void 0:T.icon,(o=m==null?void 0:m.classNames)==null?void 0:o.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||V1():null,m.type!=="loading"?m.icon||(I==null?void 0:I[Oe])||Sk(Oe):null):null,G.createElement("div",{"data-content":"",className:K(T==null?void 0:T.content,(a=m==null?void 0:m.classNames)==null?void 0:a.content)},G.createElement("div",{"data-title":"",className:K(T==null?void 0:T.title,(l=m==null?void 0:m.classNames)==null?void 0:l.title)},m.title),m.description?G.createElement("div",{"data-description":"",className:K(M,xu,T==null?void 0:T.description,(c=m==null?void 0:m.classNames)==null?void 0:c.description)},m.description):null),G.isValidElement(m.cancel)?m.cancel:m.cancel&&nl(m.cancel)?G.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||k,onClick:me=>{var Fe,Me;nl(m.cancel)&&nn&&((Me=(Fe=m.cancel).onClick)==null||Me.call(Fe,me),vr())},className:K(T==null?void 0:T.cancelButton,(u=m==null?void 0:m.classNames)==null?void 0:u.cancelButton)},m.cancel.label):null,G.isValidElement(m.action)?m.action:m.action&&nl(m.action)?G.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||N,onClick:me=>{var Fe,Me;nl(m.action)&&(me.defaultPrevented||((Me=(Fe=m.action).onClick)==null||Me.call(Fe,me),vr()))},className:K(T==null?void 0:T.actionButton,(d=m==null?void 0:m.classNames)==null?void 0:d.actionButton)},m.action.label):null))};function lg(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Kk=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:o,className:a,offset:l,theme:c="light",richColors:u,duration:d,style:h,visibleToasts:m=Fk,toastOptions:v,dir:b=lg(),gap:x=Bk,loadingIcon:w,icons:g,containerAriaLabel:p="Notifications",pauseWhenPageIsHidden:y,cn:_=Hk}=e,[E,C]=G.useState([]),j=G.useMemo(()=>Array.from(new Set([n].concat(E.filter(U=>U.position).map(U=>U.position)))),[E,n]),[S,k]=G.useState([]),[N,P]=G.useState(!1),[M,W]=G.useState(!1),[F,R]=G.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),A=G.useRef(null),L=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=G.useRef(null),I=G.useRef(!1),D=G.useCallback(U=>{var K;(K=E.find(q=>q.id===U.id))!=null&&K.delete||Ht.dismiss(U.id),C(q=>q.filter(({id:Q})=>Q!==U.id))},[E]);return G.useEffect(()=>Ht.subscribe(U=>{if(U.dismiss){C(K=>K.map(q=>q.id===U.id?{...q,delete:!0}:q));return}setTimeout(()=>{Uy.flushSync(()=>{C(K=>{let q=K.findIndex(Q=>Q.id===U.id);return q!==-1?[...K.slice(0,q),{...K[q],...U},...K.slice(q+1)]:[U,...K]})})})}),[]),G.useEffect(()=>{if(c!=="system"){R(c);return}c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?R("dark"):R("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:U})=>{R(U?"dark":"light")})},[c]),G.useEffect(()=>{E.length<=1&&P(!1)},[E]),G.useEffect(()=>{let U=K=>{var q,Q;r.every(V=>K[V]||K.code===V)&&(P(!0),(q=A.current)==null||q.focus()),K.code==="Escape"&&(document.activeElement===A.current||(Q=A.current)!=null&&Q.contains(document.activeElement))&&P(!1)};
321return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[r]),G.useEffect(()=>{if(A.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,I.current=!1)}},[A.current]),E.length?G.createElement("section",{"aria-label":`${p} ${L}`,tabIndex:-1},j.map((U,K)=>{var q;let[Q,V]=U.split("-");return G.createElement("ol",{key:U,dir:b==="auto"?lg():b,tabIndex:-1,ref:A,className:a,"data-sonner-toaster":!0,"data-theme":F,"data-y-position":Q,"data-x-position":V,style:{"--front-toast-height":`${((q=S[0])==null?void 0:q.height)||0}px`,"--offset":typeof l=="number"?`${l}px`:l||$k,"--width":`${zk}px`,"--gap":`${x}px`,...h},onBlur:X=>{I.current&&!X.currentTarget.contains(X.relatedTarget)&&(I.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||I.current||(I.current=!0,T.current=X.relatedTarget)},onMouseEnter:()=>P(!0),onMouseMove:()=>P(!0),onMouseLeave:()=>{M||P(!1)},onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},E.filter(X=>!X.position&&K===0||X.position===U).map((X,ee)=>{var ve,We;return G.createElement(qk,{key:X.id,icons:g,index:ee,toast:X,defaultRichColors:u,duration:(ve=v==null?void 0:v.duration)!=null?ve:d,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:t,visibleToasts:m,closeButton:(We=v==null?void 0:v.closeButton)!=null?We:o,interacting:M,position:U,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:D,toasts:E.filter(je=>je.position==X.position),heights:S.filter(je=>je.position==X.position),setHeights:k,expandByDefault:s,gap:x,loadingIcon:w,expanded:N,pauseWhenPageIsHidden:y,cn:_})}))})):null};const Gk=({...e})=>{const{theme:t="system"}=_k();return i.jsx(Kk,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var Yk=Qh.useId||(()=>{}),Qk=0;function ir(e){const[t,n]=f.useState(Yk());return Be(()=>{n(r=>r??String(Qk++))},[e]),t?`radix-${t}`:""}const Xk=["top","right","bottom","left"],Jr=Math.min,Kt=Math.max,ic=Math.round,rl=Math.floor,Zr=e=>({x:e,y:e}),Jk={left:"right",right:"left",bottom:"top",top:"bottom"},Zk={start:"end",end:"start"};function yh(e,t,n){return Kt(e,Jr(t,n))}function hr(e,t){return typeof e=="function"?e(t):e}function fr(e){return e.split("-")[0]}function oo(e){return e.split("-")[1]}function Xf(e){return e==="x"?"y":"x"}function Jf(e){return e==="y"?"height":"width"}function es(e){return["top","bottom"].includes(fr(e))?"y":"x"}function Zf(e){return Xf(es(e))}function eC(e,t,n){n===void 0&&(n=!1);const r=oo(e),s=Zf(e),o=Jf(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=oc(a)),[a,oc(a)]}function tC(e){const t=oc(e);return[wh(e),t,wh(t)]}function wh(e){return e.replace(/start|end/g,t=>Zk[t])}function nC(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:a;default:return[]}}function rC(e,t,n,r){const s=oo(e);let o=nC(fr(e),n==="start",r);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(wh)))),o}function oc(e){return e.replace(/left|right|bottom|top/g,t=>Jk[t])}function sC(e){return{top:0,right:0,bottom:0,left:0,...e}}function Lw(e){return typeof e!="number"?sC(e):{top:e,right:e,bottom:e,left:e}}function ac(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function cg(e,t,n){let{reference:r,floating:s}=e;const o=es(t),a=Zf(t),l=Jf(a),c=fr(t),u=o==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,m=r[l]/2-s[l]/2;let v;switch(c){case"top":v={x:d,y:r.y-s.height};break;case"bottom":v={x:d,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:h};break;case"left":v={x:r.x-s.width,y:h};break;default:v={x:r.x,y:r.y}}switch(oo(t)){case"start":v[a]-=m*(n&&u?-1:1);break;case"end":v[a]+=m*(n&&u?-1:1);break}return v}const iC=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:a}
vendor: 9,691 bytes, line 321
321=n,l=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=cg(u,r,c),m=r,v={},b=0;for(let x=0;x<l.length;x++){const{name:w,fn:g}=l[x],{x:p,y,data:_,reset:E}=await g({x:d,y:h,initialPlacement:r,placement:m,strategy:s,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});d=p??d,h=y??h,v={...v,[w]:{...v[w],..._}},E&&b<=50&&(b++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:d,y:h}=cg(u,m,c)),x=-1)}return{x:d,y:h,placement:m,strategy:s,middlewareData:v}};async function ca(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:v=0}=hr(t,e),b=Lw(v),w=l[m?h==="floating"?"reference":"floating":h],g=ac(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),p=h==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),_=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},E=ac(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:p,offsetParent:y,strategy:c}):p);return{top:(g.top-E.top+b.top)/_.y,bottom:(E.bottom-g.bottom+b.bottom)/_.y,left:(g.left-E.left+b.left)/_.x,right:(E.right-g.right+b.right)/_.x}}const oC=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:a,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=hr(e,t)||{};if(u==null)return{};const h=Lw(d),m={x:n,y:r},v=Zf(s),b=Jf(v),x=await a.getDimensions(u),w=v==="y",g=w?"top":"left",p=w?"bottom":"right",y=w?"clientHeight":"clientWidth",_=o.reference[b]+o.reference[v]-m[v]-o.floating[b],E=m[v]-o.reference[v],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let j=C?C[y]:0;(!j||!await(a.isElement==null?void 0:a.isElement(C)))&&(j=l.floating[y]||o.floating[b]);const S=_/2-E/2,k=j/2-x[b]/2-1,N=Jr(h[g],k),P=Jr(h[p],k),M=N,W=j-x[b]-P,F=j/2-x[b]/2+S,R=yh(M,F,W),A=!c.arrow&&oo(s)!=null&&F!==R&&o.reference[b]/2-(F<M?N:P)-x[b]/2<0,L=A?F<M?F-M:F-W:0;return{[v]:m[v]+L,data:{[v]:R,centerOffset:F-R-L,...A&&{alignmentOffset:L}},reset:A}}}),aC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:a,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,...w}=hr(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=fr(s),p=es(l),y=fr(l)===l,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=m||(y||!x?[oc(l)]:tC(l)),C=b!=="none";!m&&C&&E.push(...rC(l,x,b,_));const j=[l,...E],S=await ca(t,w),k=[];let N=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&k.push(S[g]),h){const F=eC(s,a,_);k.push(S[F[0]],S[F[1]])}if(N=[...N,{placement:s,overflows:k}],!k.every(F=>F<=0)){var P,M;const F=(((P=o.flip)==null?void 0:P.index)||0)+1,R=j[F];if(R)return{data:{index:F,overflows:N},reset:{placement:R}};let A=(M=N.filter(L=>L.overflows[0]<=0).sort((L,T)=>L.overflows[1]-T.overflows[1])[0])==null?void 0:M.placement;if(!A)switch(v){case"bestFit":{var W;const L=(W=N.filter(T=>{if(C){const I=es(T.placement);return I===p||I==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(I=>I>0).reduce((I,D)=>I+D,0)]).sort((T,I)=>T[1]-I[1])[0])==null?void 0:W[0];L&&(A=L);break}case"initialPlacement":A=l;break}if(s!==A)return{reset:{placement:A}}}return{}}}};function ug(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dg(e){return Xk.some(t=>e[t]>=0)}const lC=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=hr(e,t);switch(r){case"referenceHidden":{const o=await ca(t,{...s,elementContext:"reference"}),a=ug(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:dg(a)}}}case"escaped":{const o=await ca(t,{...s,altBoundary:!0}),a=ug(o,n.floating);return{data:{escapedOffsets:a,escaped:dg(a)}}}default:return{}}}}};async function cC(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=fr(n),l=oo(n),c=es(n)==="y",u=["left","top"].includes(a)?-1:1,d=o&&c?-1:1,h=hr(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof b=="number"&&(v=l==="end"?b*-1:b),c?{x:v*d,y:m*u}:{x:m*u,y:v*d}}const uC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:a,middlewareData:l}=t,c=await cC(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:a}}}}},dC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:g,y:p}=w;return{x:g,y:p}}},...c}=hr(e,t),u={x:n,y:r},d=await ca(t,c),h=es(fr(s)),m=Xf(h);let v=u[m],b=u[h];if(o){const w=m==="y"?"top":"left",g=m==="y"?"bottom":"right",p=v+d[w],y=v-d[g];v=yh(p,v,y)}if(a){const w=h==="y"?"top":"left",g=h==="y"?"bottom":"right",p=b+d[w],y=b-d[g];b=yh(p,b,y)}const x=l.fn({...t,[m]:v,[h]:b});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[m]:o,[h]:a}}}}}},hC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=hr(e,t),d={x:n,y:r},h=es(s),m=Xf(h);let v=d[m],b=d[h];const x=hr(l,t),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(c){const y=m==="y"?"height":"width",_=o.reference[m]-o.floating[y]+w.mainAxis,E=o.reference[m]+o.reference[y]-w.mainAxis;v<_?v=_:v>E&&(v=E)}if(u){var g,p;const y=m==="y"?"width":"height",_=["top","left"].includes(fr(s)),E=o.reference[h]-o.floating[y]+(_&&((g=a.offset)==null?void 0:g[h])||0)+(_?0:w.crossAxis),C=o.reference[h]+o.reference[y]+(_?0:((p=a.offset)==null?void 0:p[h])||0)-(_?w.crossAxis:0);b<E?b=E:b>C&&(b=C)}return{[m]:v,[h]:b}}}},fC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:a,elements:l}=t,{apply:c=()=>{},...u}=hr(e,t),d=await ca(t,u),h=fr(s),m=oo(s),v=es(s)==="y",{width:b,height:x}=o.floating;let w,g;h==="top"||h==="bottom"?(w=h,g=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(g=h,w=m==="end"?"top":"bottom");const p=x-d.top-d.bottom,y=b-d.left-d.right,_=Jr(x-d[w],p),E=Jr(b-d[g],y),C=!t.middlewareData.shift;let j=_,S=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(j=p),C&&!m){const N=Kt(d.left,0),P=Kt(d.right,0),M=Kt(d.top,0),W=Kt(d.bottom,0);v?S=b-2*(N!==0||P!==0?N+P:Kt(d.left,d.right)):j=x-2*(M!==0||W!==0?M+W:Kt(d.top,d.bottom))}await c({...t,availableWidth:S,availableHeight:j});const k=await a.getDimensions(l.floating);return b!==k.width||x!==k.height?{reset:{rects:!0}}:{}}}};function Uc(){return typeof window<"u"}function ao(e){return Fw(e)?(e.nodeName||"").toLowerCase():"#document"}function Xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vn(e){var t;return(t=(Fw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fw(e){return Uc()?e instanceof Node||e instanceof Xt(e).Node:!1}function kn(e){return Uc()?e instanceof Element||e instanceof Xt(e).Element:!1}function Wn(e){return Uc()?e instanceof HTMLElement||e instanceof Xt(e).HTMLElement:!1}function hg(e){return!Uc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xt(e).ShadowRoot}function Ea(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function mC(e){return["table","td","th"].includes(ao(e))}function zc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function em(e){const t=tm(),n=kn(e)?Cn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function pC(e){let t=ts(e);for(;Wn(t)&&!Xi(t);){if(em(t))return t;if(zc(t))return null;t=ts(t)}return null}function tm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Xi(e){return["html","body","#document"].includes(ao(e))}function Cn(e){return Xt(e).getComputedStyle(e)}function Bc(e){return kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if(ao(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hg(e)&&e.host||Vn(e);return hg(t)?t.host:t}function $w(e){const t=ts(e);return Xi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wn(t)&&Ea(t)?t:$w(t)}function ua(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=$w(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),a=Xt(s);if(o){const l=bh(a);
vendor: 5,235 bytes, line 321
321return t.concat(a,a.visualViewport||[],Ea(s)?s:[],l&&n?ua(l):[])}return t.concat(s,ua(s,[],n))}function bh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uw(e){const t=Cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Wn(e),o=s?e.offsetWidth:n,a=s?e.offsetHeight:r,l=ic(n)!==o||ic(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function nm(e){return kn(e)?e:e.contextElement}function Ti(e){const t=nm(e);if(!Wn(t))return Zr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=Uw(t);let a=(o?ic(n.width):n.width)/r,l=(o?ic(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const gC=Zr(0);function zw(e){const t=Xt(e);return!tm()||!t.visualViewport?gC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vC(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Xt(e)?!1:t}function Is(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=nm(e);let a=Zr(1);t&&(r?kn(r)&&(a=Ti(r)):a=Ti(e));const l=vC(o,n,r)?zw(o):Zr(0);let c=(s.left+l.x)/a.x,u=(s.top+l.y)/a.y,d=s.width/a.x,h=s.height/a.y;if(o){const m=Xt(o),v=r&&kn(r)?Xt(r):r;let b=m,x=bh(b);for(;x&&r&&v!==b;){const w=Ti(x),g=x.getBoundingClientRect(),p=Cn(x),y=g.left+(x.clientLeft+parseFloat(p.paddingLeft))*w.x,_=g.top+(x.clientTop+parseFloat(p.paddingTop))*w.y;c*=w.x,u*=w.y,d*=w.x,h*=w.y,c+=y,u+=_,b=Xt(x),x=bh(b)}}return ac({width:d,height:h,x:c,y:u})}function xC(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",a=Vn(r),l=t?zc(t.floating):!1;if(r===a||l&&o)return n;let c={scrollLeft:0,scrollTop:0},u=Zr(1);const d=Zr(0),h=Wn(r);if((h||!h&&!o)&&((ao(r)!=="body"||Ea(a))&&(c=Bc(r)),Wn(r))){const m=Is(r);u=Ti(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}}function yC(e){return Array.from(e.getClientRects())}function jh(e,t){const n=Bc(e).scrollLeft;return t?t.left+n:Is(Vn(e)).left+n}function wC(e){const t=Vn(e),n=Bc(e),r=e.ownerDocument.body,s=Kt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Kt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+jh(e);const l=-n.scrollTop;return Cn(r).direction==="rtl"&&(a+=Kt(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:a,y:l}}function bC(e,t){const n=Xt(e),r=Vn(e),s=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,l=0,c=0;if(s){o=s.width,a=s.height;const u=tm();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:o,height:a,x:l,y:c}}function jC(e,t){const n=Is(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=Wn(e)?Ti(e):Zr(1),a=e.clientWidth*o.x,l=e.clientHeight*o.y,c=s*o.x,u=r*o.y;return{width:a,height:l,x:c,y:u}}function fg(e,t,n){let r;if(t==="viewport")r=bC(e,n);else if(t==="document")r=wC(Vn(e));else if(kn(t))r=jC(t,n);else{const s=zw(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return ac(r)}function Bw(e,t){const n=ts(e);return n===t||!kn(n)||Xi(n)?!1:Cn(n).position==="fixed"||Bw(n,t)}function _C(e,t){const n=t.get(e);if(n)return n;let r=ua(e,[],!1).filter(l=>kn(l)&&ao(l)!=="body"),s=null;const o=Cn(e).position==="fixed";let a=o?ts(e):e;for(;kn(a)&&!Xi(a);){const l=Cn(a),c=em(a);!c&&l.position==="fixed"&&(s=null),(o?!c&&!s:!c&&l.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Ea(a)&&!c&&Bw(e,a))?r=r.filter(d=>d!==a):s=l,a=ts(a)}return t.set(e,r),r}function SC(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const a=[...n==="clippingAncestors"?zc(t)?[]:_C(t,this._c):[].concat(n),r],l=a[0],c=a.reduce((u,d)=>{const h=fg(t,d,s);return u.top=Kt(h.top,u.top),u.right=Jr(h.right,u.right),u.bottom=Jr(h.bottom,u.bottom),u.left=Kt(h.left,u.left),u},fg(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function NC(e){const{width:t,height:n}=Uw(e);return{width:t,height:n}}function EC(e,t,n){const r=Wn(t),s=Vn(t),o=n==="fixed",a=Is(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=Zr(0);if(r||!r&&!o)if((ao(t)!=="body"||Ea(s))&&(l=Bc(t)),r){const v=Is(t,!0,o,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else s&&(c.x=jh(s));let u=0,d=0;if(s&&!r&&!o){const v=s.getBoundingClientRect();d=v.top+l.scrollTop,u=v.left+l.scrollLeft-jh(s,v)}const h=a.left+l.scrollLeft-c.x-u,m=a.top+l.scrollTop-c.y-d;return{x:h,y:m,width:a.width,height:a.height}}function Zu(e){return Cn(e).position==="static"}function mg(e,t){if(!Wn(e)||Cn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vn(e)===n&&(n=n.ownerDocument.body),n}function Ww(e,t){const n=Xt(e);if(zc(e))return n;if(!Wn(e)){let s=ts(e);for(;s&&!Xi(s);){if(kn(s)&&!Zu(s))return s;s=ts(s)}return n}let r=mg(e,t);for(;r&&mC(r)&&Zu(r);)r=mg(r,t);return r&&Xi(r)&&Zu(r)&&!em(r)?n:r||pC(e)||n}const kC=async function(e){const t=this.getOffsetParent||Ww,n=this.getDimensions,r=await n(e.floating);return{reference:EC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function CC(e){return Cn(e).direction==="rtl"}const PC={convertOffsetParentRelativeRectToViewportRelativeRect:xC,getDocumentElement:Vn,getClippingRect:SC,getOffsetParent:Ww,getElementRects:kC,getClientRects:yC,getDimensions:NC,get
vendor: 9,325 bytes, line 321
321Scale:Ti,isElement:kn,isRTL:CC};function TC(e,t){let n=null,r;const s=Vn(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const{left:u,top:d,width:h,height:m}=e.getBoundingClientRect();if(l||t(),!h||!m)return;const v=rl(d),b=rl(s.clientWidth-(u+h)),x=rl(s.clientHeight-(d+m)),w=rl(u),p={rootMargin:-v+"px "+-b+"px "+-x+"px "+-w+"px",threshold:Kt(0,Jr(1,c))||1};let y=!0;function _(E){const C=E[0].intersectionRatio;if(C!==c){if(!y)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(_,{...p,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,p)}n.observe(e)}return a(!0),o}function RC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=nm(e),d=s||o?[...u?ua(u):[],...ua(t)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const h=u&&l?TC(u,n):null;let m=-1,v=null;a&&(v=new ResizeObserver(g=>{let[p]=g;p&&p.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=v)==null||y.observe(t)})),n()}),u&&!c&&v.observe(u),v.observe(t));let b,x=c?Is(e):null;c&&w();function w(){const g=Is(e);x&&(g.x!==x.x||g.y!==x.y||g.width!==x.width||g.height!==x.height)&&n(),x=g,b=requestAnimationFrame(w)}return n(),()=>{var g;d.forEach(p=>{s&&p.removeEventListener("scroll",n),o&&p.removeEventListener("resize",n)}),h==null||h(),(g=v)==null||g.disconnect(),v=null,c&&cancelAnimationFrame(b)}}const AC=uC,OC=dC,DC=aC,MC=fC,IC=lC,pg=oC,LC=hC,FC=(e,t,n)=>{const r=new Map,s={platform:PC,...n},o={...s.platform,_c:r};return iC(e,t,{...s,platform:o})};var Rl=typeof document<"u"?f.useLayoutEffect:f.useEffect;function lc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!lc(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!lc(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Vw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gg(e,t){const n=Vw(e);return Math.round(t*n)/n}function ed(e){const t=f.useRef(e);return Rl(()=>{t.current=e}),t}function $C(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=f.useState(r);lc(m,r)||v(r);const[b,x]=f.useState(null),[w,g]=f.useState(null),p=f.useCallback(T=>{T!==C.current&&(C.current=T,x(T))},[]),y=f.useCallback(T=>{T!==j.current&&(j.current=T,g(T))},[]),_=o||b,E=a||w,C=f.useRef(null),j=f.useRef(null),S=f.useRef(d),k=c!=null,N=ed(c),P=ed(s),M=ed(u),W=f.useCallback(()=>{if(!C.current||!j.current)return;const T={placement:t,strategy:n,middleware:m};P.current&&(T.platform=P.current),FC(C.current,j.current,T).then(I=>{const D={...I,isPositioned:M.current!==!1};F.current&&!lc(S.current,D)&&(S.current=D,Bs.flushSync(()=>{h(D)}))})},[m,t,n,P,M]);Rl(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,h(T=>({...T,isPositioned:!1})))},[u]);const F=f.useRef(!1);Rl(()=>(F.current=!0,()=>{F.current=!1}),[]),Rl(()=>{if(_&&(C.current=_),E&&(j.current=E),_&&E){if(N.current)return N.current(_,E,W);W()}},[_,E,W,N,k]);const R=f.useMemo(()=>({reference:C,floating:j,setReference:p,setFloating:y}),[p,y]),A=f.useMemo(()=>({reference:_,floating:E}),[_,E]),L=f.useMemo(()=>{const T={position:n,left:0,top:0};if(!A.floating)return T;const I=gg(A.floating,d.x),D=gg(A.floating,d.y);return l?{...T,transform:"translate("+I+"px, "+D+"px)",...Vw(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:D}},[n,l,A.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:W,refs:R,elements:A,floatingStyles:L}),[d,W,R,A,L])}const UC=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?pg({element:r.current,padding:s}).fn(n):{}:r?pg({element:r,padding:s}).fn(n):{}}}},zC=(e,t)=>({...AC(e),options:[e,t]}),BC=(e,t)=>({...OC(e),options:[e,t]}),WC=(e,t)=>({...LC(e),options:[e,t]}),VC=(e,t)=>({...DC(e),options:[e,t]}),HC=(e,t)=>({...MC(e),options:[e,t]}),qC=(e,t)=>({...IC(e),options:[e,t]}),KC=(e,t)=>({...UC(e),options:[e,t]});var GC="Arrow",Hw=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return i.jsx(de.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});Hw.displayName=GC;var YC=Hw;function QC(e,t=[]){let n=[];function r(o,a){const l=f.createContext(a),c=n.length;n=[...n,a];function u(h){const{scope:m,children:v,...b}=h,x=(m==null?void 0:m[e][c])||l,w=f.useMemo(()=>b,Object.values(b));return i.jsx(x.Provider,{value:w,children:v})}function d(h,m){const v=(m==null?void 0:m[e][c])||l,b=f.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const s=()=>{const o=n.map(a=>f.createContext(a));return function(l){const c=(l==null?void 0:l[e])||o;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,XC(s,...t)]}function XC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(o)[`__scope${u}`];return{...l,...h}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function JC(e){const[t,n]=f.useState(void 0);return Be(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let a,l;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var rm="Popper",[qw,Wc]=QC(rm),[ZC,Kw]=qw(rm),Gw=e=>{const{__scopePopper:t,children:n}=e,[r,s]=f.useState(null);return i.jsx(ZC,{scope:t,anchor:r,onAnchorChange:s,children:n})};Gw.displayName=rm;var Yw="PopperAnchor",Qw=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=Kw(Yw,n),a=f.useRef(null),l=xe(t,a);return f.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:i.jsx(de.div,{...s,ref:l})});Qw.displayName=Yw;var sm="PopperContent",[e2,t2]=qw(sm),Xw=f.forwardRef((e,t)=>{var ee,ve,We,je,ke,_e;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:b,...x}=e,w=Kw(sm,n),[g,p]=f.useState(null),y=xe(t,dt=>p(dt)),[_,E]=f.useState(null),C=JC(_),j=(C==null?void 0:C.width)??0,S=(C==null?void 0:C.height)??0,k=r+(o!=="center"?"-"+o:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},P=Array.isArray(u)?u:[u],M=P.length>0,W={padding:N,boundary:P.filter(r2),altBoundary:M},{refs:F,floatingStyles:R,placement:A,isPositioned:L,middlewareData:T}=$C({strategy:"fixed",placement:k,whileElementsMounted:(...dt)=>RC(...dt,{animationFrame:v==="always"}),elements:{reference:w.anchor},middleware:[zC({mainAxis:s+S,alignmentAxis:a}),c&&BC({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?WC():void 0,...W}),c&&VC({...W}),HC({...W,apply:({elements:dt,rects:kt,availableWidth:z,availableHeight:te})=>{const{width:be,height:De}=kt.reference,Oe=dt.floating.style;Oe.setProperty("--radix-popper-available-width",`${z}px`),Oe.setProperty("--radix-popper-available-height",`${te}px`),Oe.setProperty("--radix-popper-anchor-width",`${be}px`),Oe.setProperty("--radix-popper-anchor-height",`${De}px`)}}),_&&KC({element:_,padding:l}),s2({arrowWidth:j,arrowHeight:S}),m&&qC({strategy:"referenceHidden",...W})]}),[I,D]=e0(A),U=Xe(b);Be(()=>{L&&(U==null||U())},[L,U]);const K=(ee=T.arrow)==null?void 0:ee.x,q=(ve=T.arrow)==null?void 0:ve.y,Q=((We=T.arrow)==null?void 0:We.centerOffset)!==0,[V,X]=f.useState();return Be(()=>{g&&X(window.getComputedStyle(g).zIndex)},[g]),i.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:L?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[(je=T.transformOrigin)==null?void 0:je.x,(ke=T.transformOrigin)==null?void 0:ke.y].join(" "),...((_e=T.hide)==null?void 0:_e.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(e2,{scope:n,placedSide:I,onArrowChange:E,arrowX:K,arrowY:q,shouldHideArrow:Q,children:i.jsx(de.div,{"data-side":I,"data-align":D,...x,ref:y,style:{...x.style,animation:L?void 0:"none"}})})})});Xw.displayName=sm;
321var Jw="PopperArrow",n2={top:"bottom",right:"left",bottom:"top",left:"right"},Zw=f.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=t2(Jw,r),a=n2[o.placedSide];return i.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:i.jsx(YC,{...s,ref:n,style:{...s.style,display:"block"}})})});Zw.displayName=Jw;function r2(e){return e!==null}var s2=e=>({name:"transformOrigin",options:e,fn(t){var w,g,p;const{placement:n,rects:r,middlewareData:s}=t,a=((w=s.arrow)==null?void 0:w.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=e0(n),h={start:"0%",center:"50%",end:"100%"}[d],m=(((g=s.arrow)==null?void 0:g.x)??0)+l/2,v=(((p=s.arrow)==null?void 0:p.y)??0)+c/2;let b="",x="";return u==="bottom"?(b=a?h:`${m}px`,x=`${-c}px`):u==="top"?(b=a?h:`${m}px`,x=`${r.floating.height+c}px`):u==="right"?(b=`${-c}px`,x=a?h:`${v}px`):u==="left"&&(b=`${r.floating.width+c}px`,x=a?h:`${v}px`),{data:{x:b,y:x}}}});function e0(e){const[t,n="center"]=e.split("-");return[t,n]}var t0=Gw,n0=Qw,r0=Xw,s0=Zw;function i2(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var i0=e=>{const{present:t,children:n}=e,r=o2(t),s=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),o=xe(r.ref,a2(s));return typeof n=="function"||r.isPresent?f.cloneElement(s,{ref:o}):null};i0.displayName="Presence";function o2(e){const[t,n]=f.useState(),r=f.useRef({}),s=f.useRef(e),o=f.useRef("none"),a=e?"mounted":"unmounted",[l,c]=i2(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=sl(r.current);o.current=l==="mounted"?u:"none"},[l]),Be(()=>{const u=r.current,d=s.current;if(d!==e){const m=o.current,v=sl(u);e?c("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Be(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=v=>{const x=sl(r.current).includes(v.animationName);if(v.target===t&&x&&(c("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=v=>{v.target===t&&(o.current=sl(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function sl(e){return(e==null?void 0:e.animationName)||"none"}function a2(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var[Vc,iI]=Ws("Tooltip",[Wc]),Hc=Wc(),o0="TooltipProvider",l2=700,_h="tooltip.open",[c2,im]=Vc(o0),a0=e=>{const{__scopeTooltip:t,delayDuration:n=l2,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[a,l]=f.useState(!0),c=f.useRef(!1),u=f.useRef(0);return f.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),i.jsx(c2,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(u.current),l(!1)},[]),onClose:f.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:f.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:o})};a0.displayName=o0;var qc="Tooltip",[u2,Kc]=Vc(qc),l0=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:l}=e,c=im(qc,e.__scopeTooltip),u=Hc(t),[d,h]=f.useState(null),m=ir(),v=f.useRef(0),b=a??c.disableHoverableContent,x=l??c.delayDuration,w=f.useRef(!1),[g=!1,p]=Os({prop:r,defaultProp:s,onChange:j=>{j?(c.onOpen(),document.dispatchEvent(new CustomEvent(_h))):c.onClose(),o==null||o(j)}}),y=f.useMemo(()=>g?w.current?"delayed-open":"instant-open":"closed",[g]),_=f.useCallback(()=>{window.clearTimeout(v.current),v.current=0,w.current=!1,p(!0)},[p]),E=f.useCallback(()=>{window.clearTimeout(v.current),v.current=0,p(!1)},[p]),C=f.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{w.current=!0,p(!0),v.current=0},x)},[x,p]);return f.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),i.jsx(t0,{...u,children:i.jsx(u2,{scope:t,contentId:m,open:g,stateAttribute:y,trigger:d,onTriggerChange:h,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayed?C():_()},[c.isOpenDelayed,C,_]),onTriggerLeave:f.useCallback(()=>{b?E():(window.clearTimeout(v.current),v.current=0)},[E,b]),onOpen:_,onClose:E,disableHoverableContent:b,children:n})})};l0.displayName=qc;var Sh="TooltipTrigger",c0=f.forwardRef((e,t)=>
vendor: 5,577 bytes, line 321
321{const{__scopeTooltip:n,...r}=e,s=Kc(Sh,n),o=im(Sh,n),a=Hc(n),l=f.useRef(null),c=xe(t,l,s.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),h=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),i.jsx(n0,{asChild:!0,...a,children:i.jsx(de.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:oe(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:oe(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:oe(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:oe(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:oe(e.onBlur,s.onClose),onClick:oe(e.onClick,s.onClose)})})});c0.displayName=Sh;var d2="TooltipPortal",[oI,h2]=Vc(d2,{forceMount:void 0}),Ji="TooltipContent",u0=f.forwardRef((e,t)=>{const n=h2(Ji,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,a=Kc(Ji,e.__scopeTooltip);return i.jsx(i0,{present:r||a.open,children:a.disableHoverableContent?i.jsx(d0,{side:s,...o,ref:t}):i.jsx(f2,{side:s,...o,ref:t})})}),f2=f.forwardRef((e,t)=>{const n=Kc(Ji,e.__scopeTooltip),r=im(Ji,e.__scopeTooltip),s=f.useRef(null),o=xe(t,s),[a,l]=f.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,m=f.useCallback(()=>{l(null),h(!1)},[h]),v=f.useCallback((b,x)=>{const w=b.currentTarget,g={x:b.clientX,y:b.clientY},p=v2(g,w.getBoundingClientRect()),y=x2(g,p),_=y2(x.getBoundingClientRect()),E=b2([...y,..._]);l(E),h(!0)},[h]);return f.useEffect(()=>()=>m(),[m]),f.useEffect(()=>{if(c&&d){const b=w=>v(w,d),x=w=>v(w,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",x),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",x)}}},[c,d,v,m]),f.useEffect(()=>{if(a){const b=x=>{const w=x.target,g={x:x.clientX,y:x.clientY},p=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),y=!w2(g,a);p?m():y&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,u,m]),i.jsx(d0,{...e,ref:o})}),[m2,p2]=Vc(qc,{isInside:!1}),d0=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...l}=e,c=Kc(Ji,n),u=Hc(n),{onClose:d}=c;return f.useEffect(()=>(document.addEventListener(_h,d),()=>document.removeEventListener(_h,d)),[d]),f.useEffect(()=>{if(c.trigger){const h=m=>{const v=m.target;v!=null&&v.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),i.jsx(Sa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:i.jsxs(r0,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(Bf,{children:r}),i.jsx(m2,{scope:n,isInside:!0,children:i.jsx(KN,{id:c.contentId,role:"tooltip",children:s||r})})]})})});u0.displayName=Ji;var h0="TooltipArrow",g2=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Hc(n);return p2(h0,n).isInside?null:i.jsx(s0,{...s,...r,ref:t})});g2.displayName=h0;function v2(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function x2(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function y2(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function w2(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const l=t[o].x,c=t[o].y,u=t[a].x,d=t[a].y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(s=!s)}return s}function b2(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),j2(t)}function j2(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var _2=a0,S2=l0,N2=c0,f0=u0;const E2=_2,k2=S2,C2=N2,m0=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(f0,{ref:r,sideOffset:t,className:ce("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
321de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));m0.displayName=f0.displayName;var Gc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Yc=typeof window>"u"||"Deno"in globalThis;function yn(){}function P2(e,t){return typeof e=="function"?e(t):e}function T2(e){return typeof e=="number"&&e>=0&&e!==1/0}function R2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vg(e,t){return typeof e=="function"?e(t):e}function A2(e,t){return typeof e=="function"?e(t):e}function xg(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:l}=e;if(a){if(r){if(t.queryHash!==om(a,t.options))return!1}else if(!ha(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||o&&!o(t))}function yg(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(da(t.options.mutationKey)!==da(o))return!1}else if(!ha(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function om(e,t){return((t==null?void 0:t.queryKeyHashFn)||da)(e)}function da(e){return JSON.stringify(e,(t,n)=>Nh(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function ha(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ha(e[n],t[n])):!1}function p0(e,t){if(e===t)return e;const n=wg(e)&&wg(t);if(n||Nh(e)&&Nh(t)){const r=n?e:Object.keys(e),s=r.length,o=n?t:Object.keys(t),a=o.length,l=n?[]:{};let c=0;for(let u=0;u<a;u++){const d=n?u:o[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(l[d]=void 0,c++):(l[d]=p0(e[d],t[d]),l[d]===e[d]&&e[d]!==void 0&&c++)}return s===a&&c===s?e:l}return t}function wg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Nh(e){if(!bg(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!bg(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function bg(e){return Object.prototype.toString.call(e)==="[object Object]"}function O2(e){return new Promise(t=>{setTimeout(t,e)})}function D2(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?p0(e,t):t}function M2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function I2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var am=Symbol();function g0(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===am?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ws,Ar,Oi,yv,L2=(yv=class extends Gc{constructor(){super();Ce(this,ws);Ce(this,Ar);Ce(this,Oi);ge(this,Oi,t=>{if(!Yc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){B(this,Ar)||this.setEventListener(B(this,Oi))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,Ar))==null||t.call(this),ge(this,Ar,void 0))}setEventListener(t){var n;ge(this,Oi,t),(n=B(this,Ar))==null||n.call(this),ge(this,Ar,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){B(this,ws)!==t&&(ge(this,ws,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof B(this,ws)=="boolean"?B(this,ws):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ws=new WeakMap,Ar=new WeakMap,Oi=new WeakMap,yv),v0=new L2,Di,Or,Mi,wv,F2=(wv=class extends Gc{constructor(){super();Ce(this,Di,!0);Ce(this,Or);Ce(this,Mi);ge(this,Mi,t=>{if(!Yc&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){B(this,Or)||this.setEventListener(B(this,Mi))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,Or))==null||t.call(this),ge(this,Or,void 0))}setEventListener(t){var n;ge(this,Mi,t),(n=B(this,Or))==null||n.call(this),ge(this,Or,t(this.setOnline.bind(this)))}setOnline(t){B(this,Di)!==t&&(ge(this,Di,t),this.listeners.forEac
vendor: 18,125 bytes, line 321
321h(r=>{r(t)}))}isOnline(){return B(this,Di)}},Di=new WeakMap,Or=new WeakMap,Mi=new WeakMap,wv),cc=new F2;function $2(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function U2(e){return Math.min(1e3*2**e,3e4)}function x0(e){return(e??"online")==="online"?cc.isOnline():!0}var y0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function td(e){return e instanceof y0}function w0(e){let t=!1,n=0,r=!1,s;const o=$2(),a=x=>{var w;r||(m(new y0(x)),(w=e.abort)==null||w.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>v0.isFocused()&&(e.networkMode==="always"||cc.isOnline())&&e.canRun(),d=()=>x0(e.networkMode)&&e.canRun(),h=x=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,x),s==null||s(),o.resolve(x))},m=x=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,x),s==null||s(),o.reject(x))},v=()=>new Promise(x=>{var w;s=g=>{(r||u())&&x(g)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;s=void 0,r||(x=e.onContinue)==null||x.call(e)}),b=()=>{if(r)return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(g){x=Promise.reject(g)}Promise.resolve(x).then(h).catch(g=>{var C;if(r)return;const p=e.retry??(Yc?0:3),y=e.retryDelay??U2,_=typeof y=="function"?y(n,g):y,E=p===!0||typeof p=="number"&&n<p||typeof p=="function"&&p(n,g);if(t||!E){m(g);return}n++,(C=e.onFail)==null||C.call(e,n,g),O2(_).then(()=>u()?void 0:v()).then(()=>{t?m(g):b()})})};return{promise:o,cancel:a,continue:()=>(s==null||s(),o),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?b():v().then(b),o)}}function z2(){let e=[],t=0,n=l=>{l()},r=l=>{l()},s=l=>setTimeout(l,0);const o=l=>{t?e.push(l):s(()=>{n(l)})},a=()=>{const l=e;e=[],l.length&&s(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||a()}return c},batchCalls:l=>(...c)=>{o(()=>{l(...c)})},schedule:o,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{s=l}}}var Tt=z2(),bs,bv,b0=(bv=class{constructor(){Ce(this,bs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),T2(this.gcTime)&&ge(this,bs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yc?1/0:5*60*1e3))}clearGcTimeout(){B(this,bs)&&(clearTimeout(B(this,bs)),ge(this,bs,void 0))}},bs=new WeakMap,bv),Ii,Li,rn,wt,va,js,wn,Gn,jv,B2=(jv=class extends b0{constructor(t){super();Ce(this,wn);Ce(this,Ii);Ce(this,Li);Ce(this,rn);Ce(this,wt);Ce(this,va);Ce(this,js);ge(this,js,!1),ge(this,va,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,rn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,Ii,V2(this.options)),this.state=t.state??B(this,Ii),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=B(this,wt))==null?void 0:t.promise}setOptions(t){this.options={...B(this,va),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&B(this,rn).remove(this)}setData(t,n){const r=D2(this.state.data,t,this.options);return gt(this,wn,Gn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){gt(this,wn,Gn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=B(this,wt))==null?void 0:r.promise;return(s=B(this,wt))==null||s.cancel(t),n?n.then(yn).catch(yn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(B(this,Ii))}isActive(){return this.observers.some(t=>A2(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===am||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!R2(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=B(this,wt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=B(this,wt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),B(this,rn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(B(this,wt)&&(B(this,js)?B(this,wt).cancel({revert:!0}):B(this,wt).cancelRetry()),this.scheduleGc()),B(this,rn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||gt(this,wn,Gn).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(B(this,wt))return B(this,wt).continueRetry(),B(this,wt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(ge(this,js,!0),r.signal)})},o=()=>{const h=g0(this.options,n),m={queryKey:this.queryKey,meta:this.meta};return s(m),ge(this,js,!1),this.options.persister?this.options.persister(h,m,this):h(m)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};s(a),(c=this.options.behavior)==null||c.onFetch(a,this),ge(this,Li,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&gt(this,wn,Gn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=h=>{var m,v,b,x;td(h)&&h.silent||gt(this,wn,Gn).call(this,{type:"error",error:h}),td(h)||((v=(m=B(this,rn).config).onError)==null||v.call(m,h,this),(x=(b=B(this,rn).config).onSettled)==null||x.call(b,this.state.data,h,this)),this.scheduleGc()};return ge(this,wt,w0({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var m,v,b,x;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(w){l(w);return}(v=(m=B(this,rn).config).onSuccess)==null||v.call(m,h,this),(x=(b=B(this,rn).config).onSettled)==null||x.call(b,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,m)=>{gt(this,wn,Gn).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{gt(this,wn,Gn).call(this,{type:"pause"})},onContinue:()=>{gt(this,wn,Gn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),B(this,wt).start()}},Ii=new WeakMap,Li=new WeakMap,rn=new WeakMap,wt=new WeakMap,va=new WeakMap,js=new WeakMap,wn=new WeakSet,Gn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...W2(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return td(s)&&s.revert&&B(this,Li)?{...B(this,Li),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Tt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),B(this,rn).notify({query:this,type:"updated",action:t})})},jv);function W2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:x0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function V2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Mn,_v,H2=(_v=class extends Gc{constructor(t={}){super();Ce(this,Mn);this.config=t,ge(this,Mn,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??om(s,n);let a=this.get(o);return a||(a=new B2({cache:this,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){B(this,Mn).has(t.queryHash)||(B(this,Mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=B(this,Mn).get(t.queryHash);n&&(t.destroy(),n===t&&B(this,Mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return B(this,Mn).get(t)}getAll(){return[...B(this,Mn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>xg(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>xg(t,r)):n}notify(t){Tt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Tt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Tt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Mn=new WeakMap,_v),In,Ct,_s,Ln,_r,Sv,q2=(Sv=class extends b0{constructor(t){super();Ce(this,Ln);Ce(this,In);Ce(this,Ct);Ce(this,_s);this.mutationId=t.mutationId,ge(this,Ct,t.mutationCache),ge(this,In,[]),this.state=t.state||K2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){B(this,In).includes(t)||(B(this,In).push(t),this.clearGcTimeout(),B(this,Ct).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,In,B(this,In).filter(n=>n!==t)),this.scheduleGc(),B(this,Ct).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){B(this,In).length||(this.state.status==="pending"?this.scheduleGc():B(this,Ct).remove(this))}continue(){var t;return((t=B(this,_s))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,a,l,c,u,d,h,m,v,b,x,w,g,p,y,_,E,C,j;ge(this,_s,w0({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,k)=>{gt(this,Ln,_r).call(this,{type:"failed",failureCount:S,error:k})},onPause:()=>{gt(this,Ln,_r).call(this,{type:"pause"})},onContinue:()=>{gt(this,Ln,_r).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>B(this,Ct).canRun(this)}));const n=this.state.status==="pending",r=!B(this,_s).canStart();try{if(!n){gt(this,Ln,_r).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(s=B(this,Ct).config).onMutate)==null?void 0:o.call(s,t,this));const k=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));k!==this.state.context&&gt(this,Ln,_r).call(this,{type:"pending",context:k,variables:t,isPaused:r})}const S=await B(this,_s).start();return await((u=(c=B(this,Ct).config).onSuccess)==null?void 0:u.call(c,S,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,S,t,this.state.context)),await((v=(m=B(this,Ct).config).onSettled)==null?void 0:v.call(m,S,null,this.state.variables,this.state.context,this)),await((x=(b=this.options).onSettled)==null?void 0:x.call(b,S,null,t,this.state.context)),gt(this,Ln,_r).call(this,{type:"success",data:S}),S}catch(S){try{throw await((g=(w=B(this,Ct).config).onError)==null?void 0:g.call(w,S,t,this.state.context,this)),await((y=(p=this.options).onError)==null?void 0:y.call(p,S,t,this.state.context)),await((E=(_=B(this,Ct).config).onSettled)==null?void 0:E.call(_,void 0,S,this.state.variables,this.state.context,this)),await((j=(C=this.options).onSettled)==null?void 0:j.call(C,void 0,S,t,this.state.context)),S}finally{gt(this,Ln,_r).call(this,{type:"error",error:S})}}finally{B(this,Ct).runNext(this)}}},In=new WeakMap,Ct=new WeakMap,_s=new WeakMap,Ln=new WeakSet,_r=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Tt.batch(()=>{B(this,In).forEach(r=>{r.onMutationUpdate(t)}),B(this,Ct).notify({mutation:this,type:"updated",action:t})})},Sv);function K2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Vt,xa,Nv,G2=(Nv=class extends Gc{constructor(t={}){super();Ce(this,Vt);Ce(this,xa);this.config=t,ge(this,Vt,new Map),ge(this,xa,Date.now())}build(t,n,r){const s=new q2({mutationCache:this,mutationId:++Ia(this,xa)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){const n=il(t),r=B(this,Vt).get(n)??[];r.push(t),B(this,Vt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=il(t);if(B(this,Vt).has(n)){const s=(r=B(this,Vt).get(n))==null?void 0:r.filter(o=>o!==t);s&&(s.length===0?B(this,Vt).delete(n):B(this,Vt).set(n,s))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=B(this,Vt).get(il(t)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=B(this,Vt).get(il(t)))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...B(this,Vt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>yg(n,r))}findAll(t={}){return this.getAll().filter(n=>yg(t,n))}notify(t){Tt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Tt.batch(()=>Promise.all(t.map(n=>n.continue().catch(yn))))}},Vt=new WeakMap,xa=new WeakMap,Nv);function il(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function jg(e){return{onFetch:(t,n)=>{var d,h,m,v,b;const r=t.options,s=(m=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,o=((v=t.state.data)==null?void 0:v.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let x=!1;const w=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},g=g0(t.options,t.fetchOptions),p=async(y,_,E)=>{if(x)return Promise.reject();if(_==null&&y.pages.length)return Promise.resolve(y);const C={queryKey:t.queryKey,pageParam:_,direction:E?"backward":"forward",meta:t.options.meta};w(C);const j=await g(C),{maxPages:S}=t.options,k=E?I2:M2;return{pages:k(y.pages,j,S),pageParams:k(y.pageParams,_,S)}};if(s&&o.length){const y=s==="backward",_=y?Y2:_g,E={pages:o,pageParams:a},C=_(r,E);l=await p(E,C,y)}else{const y=e??o.length;do{const _=c===0?a[0]??r.initialPageParam:_g(r,l);if(c>0&&_==null)break;l=await p(l,_),c++}while(c<y)}return l};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function _g(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Y2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ge,Dr,Mr,Fi,$i,Ir,Ui,zi,Ev,Q2=(Ev=class{constructor(e={}){Ce(this,Ge);Ce(this,Dr);Ce(this,Mr);Ce(this,Fi);Ce(this,$i);Ce(this,Ir);Ce(this,Ui);Ce(this,zi);ge(this,Ge,e.queryCache||new H2),ge(this,Dr,e.mutationCache||new G2),ge(this,Mr,e.defaultOptions||{}),ge(this,Fi,new Map),ge(this,$i,new Map),ge(this,Ir,0)}mount(){Ia(this,Ir)._++,B(this,Ir)===1&&(ge(this,Ui,v0.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,Ge).onFocus())})),ge(this,zi,cc.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,Ge).onOnline())})))}unmount(){var e,t;Ia(this,Ir)._--,B(this,Ir)===0&&((e=B(this,Ui))==null||e.call(this),ge(this,Ui,void 0),(t=B(this,zi))==null||t.call(this),ge(this,zi,void 0))}isFetching(e){return B(this,Ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return B(this,Dr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=B(this,Ge).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=B(this,Ge).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(vg(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return B(this,Ge).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=B(this,Ge).get(r.queryHash),o=s==null?void 0:s.state.data,a=P2(t,o);if(a!==void 0)return B(this,Ge).build(this,r).setData(a,{...n,manual:!0})}
321setQueriesData(e,t,n){return Tt.batch(()=>B(this,Ge).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=B(this,Ge).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=B(this,Ge);Tt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=B(this,Ge),r={type:"active",...e};return Tt.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Tt.batch(()=>B(this,Ge).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(yn).catch(yn)}invalidateQueries(e={},t={}){return Tt.batch(()=>{if(B(this,Ge).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Tt.batch(()=>B(this,Ge).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(yn)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(yn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=B(this,Ge).build(this,t);return n.isStaleByTime(vg(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yn).catch(yn)}fetchInfiniteQuery(e){return e.behavior=jg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yn).catch(yn)}ensureInfiniteQueryData(e){return e.behavior=jg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return cc.isOnline()?B(this,Dr).resumePausedMutations():Promise.resolve()}getQueryCache(){return B(this,Ge)}getMutationCache(){return B(this,Dr)}getDefaultOptions(){return B(this,Mr)}setDefaultOptions(e){ge(this,Mr,e)}setQueryDefaults(e,t){B(this,Fi).set(da(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...B(this,Fi).values()];let n={};return t.forEach(r=>{ha(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){B(this,$i).set(da(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...B(this,$i).values()];let n={};return t.forEach(r=>{ha(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...B(this,Mr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=om(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===am&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...B(this,Mr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){B(this,Ge).clear(),B(this,Dr).clear()}},Ge=new WeakMap,Dr=new WeakMap,Mr=new WeakMap,Fi=new WeakMap,$i=new WeakMap,Ir=new WeakMap,Ui=new WeakMap,zi=new WeakMap,Ev),X2=f.createContext(void 0),J2=({client:e,children:t})=>(f.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(X2.Provider,{value:e,children:t}));/**
322 * @remix-run/router v1.20.0
323 *
324 * Copyright (c) Remix Software Inc.
325 *
326 * This source code is licensed under the MIT license found in the
327 * LICENSE.md file in the root directory of this source tree.
328 *
329 * @license MIT
330 */function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fa.apply(this,arguments)}var $r;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($r||($r={}));const Sg="popstate";function Z2(e){e===void 0&&(e={});function t(r,s){let{pathname:o,search:a,hash:l}=r.location;return Eh("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:_0(s)}return tP(t,n,null,e)}function nt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function j0(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function eP(){return Math.random().toString(36).substr(2,8)}function Ng(e,t){return{usr:e.state,key:e.key,idx:t}}function Eh(e,t,n,r){return n===void 0&&(n=null),fa({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?lo(t):t,{state:n,key:t&&t.key||r||eP()})}function _0(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function lo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function tP(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,a=s.history,l=$r.Pop,c=null,u=d();u==null&&(u=0,a.replaceState(fa({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function h(){l=$r.Pop;let w=d(),g=w==null?null:w-u;u=w,c&&c({action:l,location:x.location,delta:g})}function m(w,g){l=$r.Push;let p=Eh(x.location,w,g);u=d()+1;let y=Ng(p,u),_=x.createHref(p);try{a.pushState(y,"",_)}
vendor: 3,324 bytes, line 330
330catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(_)}o&&c&&c({action:l,location:x.location,delta:1})}function v(w,g){l=$r.Replace;let p=Eh(x.location,w,g);u=d();let y=Ng(p,u),_=x.createHref(p);a.replaceState(y,"",_),o&&c&&c({action:l,location:x.location,delta:0})}function b(w){let g=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof w=="string"?w:_0(w);return p=p.replace(/ $/,"%20"),nt(g,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,g)}let x={get action(){return l},get location(){return e(s,a)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Sg,h),c=w,()=>{s.removeEventListener(Sg,h),c=null}},createHref(w){return t(s,w)},createURL:b,encodeLocation(w){let g=b(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:m,replace:v,go(w){return a.go(w)}};return x}var Eg;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Eg||(Eg={}));function nP(e,t,n){return n===void 0&&(n="/"),rP(e,t,n,!1)}function rP(e,t,n,r){let s=typeof t=="string"?lo(t):t,o=E0(s.pathname||"/",n);if(o==null)return null;let a=S0(e);sP(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=pP(o);l=fP(a[c],u,r)}return l}function S0(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,a,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};c.relativePath.startsWith("/")&&(nt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Es([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(nt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),S0(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:dP(u,o.index),routesMeta:d})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,a);else for(let c of N0(o.path))s(o,a,c)}),t}function N0(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let a=N0(r.join("/")),l=[];return l.push(...a.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function sP(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const iP=/^:[\w-]+$/,oP=3,aP=2,lP=1,cP=10,uP=-2,kg=e=>e==="*";function dP(e,t){let n=e.split("/"),r=n.length;return n.some(kg)&&(r+=uP),t&&(r+=aP),n.filter(s=>!kg(s)).reduce((s,o)=>s+(iP.test(o)?oP:o===""?lP:cP),r)}function hP(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function fP(e,t,n){let{routesMeta:r}=e,s={},o="/",a=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",h=Cg({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),m=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=Cg({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
vendor: 10,945 bytes, lines 330-339
330Object.assign(s,h.params),a.push({params:s,pathname:Es([o,h.pathname]),pathnameBase:bP(Es([o,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(o=Es([o,h.pathnameBase]))}return a}function Cg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=mP(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],a=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:m,isOptional:v}=d;if(m==="*"){let x=l[h]||"";a=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const b=l[h];return v&&!b?u[m]=void 0:u[m]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function mP(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),j0(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function pP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return j0(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function E0(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function gP(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?lo(e):e;return{pathname:n?n.startsWith("/")?n:vP(n,t):t,search:jP(r),hash:_P(s)}}function vP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function nd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function xP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yP(e,t){let n=xP(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function wP(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=lo(e):(s=fa({},e),nt(!s.pathname||!s.pathname.includes("?"),nd("?","pathname","search",s)),nt(!s.pathname||!s.pathname.includes("#"),nd("#","pathname","hash",s)),nt(!s.search||!s.search.includes("#"),nd("#","search","hash",s)));let o=e===""||s.pathname==="",a=o?"/":s.pathname,l;if(a==null)l=n;else{let h=t.length-1;if(!r&&a.startsWith("..")){let m=a.split("/");for(;m[0]==="..";)m.shift(),h-=1;s.pathname=m.join("/")}l=h>=0?t[h]:"/"}let c=gP(s,l),u=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Es=e=>e.join("/").replace(/\/\/+/g,"/"),bP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),jP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_P=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function SP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const k0=["post","put","patch","delete"];new Set(k0);const NP=["get",...k0];new Set(NP);/**
331 * React Router v6.27.0
332 *
333 * Copyright (c) Remix Software Inc.
334 *
335 * This source code is licensed under the MIT license found in the
336 * LICENSE.md file in the root directory of this source tree.
337 *
338 * @license MIT
339 */function ma(){return ma=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ma.apply(this,arguments)}const lm=f.createContext(null),EP=f.createContext(null),Qc=f.createContext(null),Xc=f.createContext(null),Vs=f.createContext({outlet:null,matches:[],isDataRoute:!1}),C0=f.createContext(null);function Jc(){return f.useContext(Xc)!=null}function ka(){return Jc()||nt(!1),f.useContext(Xc).location}function P0(e){f.useContext(Qc).static||f.useLayoutEffect(e)}function Wt(){let{isDataRoute:e}=f.useContext(Vs);return e?$P():kP()}function kP(){Jc()||nt(!1);let e=f.useContext(lm),{basename:t,future:n,navigator:r}=f.useContext(Qc),{matches:s}=f.useContext(Vs),{pathname:o}=ka(),a=JSON.stringify(yP(s,n.v7_relativeSplatPath)),l=f.useRef(!1);return P0(()=>{l.current=!0}),f.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let h=wP(u,JSON.parse(a),o,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Es([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,a,o,e])}function cm(){let{matches:e}=f.useContext(Vs),t=e[e.length-1];return t?t.params:{}}function CP(e,t){return PP(e,t)}function PP(e,t,n,r){Jc()||nt(!1);let{navigator:s}=f.useContext(Qc),{matches:o}=f.useContext(Vs),a=o[o.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=ka(),d;if(t){var h;let w=typeof t=="string"?lo(t):t;c==="/"||(h=w.pathname)!=null&&h.startsWith(c)||nt(!1),d=w}else d=u;let m=d.pathname||"/",v=m;if(c!=="/"){let w=c.replace(/^\//,"").split("/");v="/"+m.replace(/^\//,"").split("/").slice(w.length).join("/")}let b=nP(e,{pathname:v}),x=DP(b&&b.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:Es([c,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:Es([c,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n,r);return t&&x?f.createElement(Xc.Provider,{value:{location:ma({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:$r.Pop}},x):x}function TP(){let e=FP(),t=SP(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),n?f.createElement("pre",{style:s},n):null,null)}const RP=f.createElement(TP,null);class AP extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?f.createElement(Vs.Provider,{value:this.props.routeContext},f.createElement(C0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function OP(e){let{routeContext:t,match:n,children:r}=e,s=f.useContext(lm);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),f.createElement(Vs.Provider,{value:t},r)}function DP(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=a.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||nt(!1),a=a.slice(0,Math.min(a.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let h=a[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:m,errors:v}=n,b=h.route.loader&&m[h.route.id]===void 0&&(!v||v[h.route.id]===void 0);if(h.route.lazy||b){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,h,m)=>{let v,b=!1,x=null,w=null;n&&(v=l&&h.route.id?l[h.route.id]:void 0,x=h.route.errorElement||RP,c&&(u<0&&m===0?(b=!0,w=null):u===m&&(b=!0,w=h.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,m+1)),p=()=>{let y;return v?y=x:b?y=w:h.route.Component?y=f.createElement(h.route.Component,null):h.route.element?y=h.route.element:y=d,f.createElement(OP,{match:h,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:y})};return n&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?f.createElement(AP,{location:n.location,revalidation:n.revalidation,component:x,error:v,children:p(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):p()},null)}var T0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(T0||{}),uc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(uc||{});function MP(e){let t=f.useContext(lm);return t||nt(!1),t}function IP(e){let t=f.useContext(EP);return t||nt(!1),t}function LP(e){let t=f.useContext(Vs);return t||nt(!1),t}function R0(e){let t=LP(),n=t.matches[t.matches.length-1];return n.route.id||nt(!1),n.route.id}function FP(){var e;let t=f.useContext(C0),n=IP(uc.UseRouteError),r=R0(uc.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function $P(){let{router:e}=MP(T0.UseNavigateStable),t=R0(uc.UseNavigateStable),n=f.useRef(!1);return P0(()=>{n.current=!0}),f.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ma({fromRouteId:t},o)))},[e,t])}function pn(e){nt(!1)}function UP(e){let{basename:t="/",children:n=null,location:r,navigationType:s=$r.Pop,navigator:o,static:a=!1,future:l}=e;Jc()&&nt(!1);let c=t.replace(/^\/*/,"/"),u=f.useMemo(()=>({basename:c,navigator:o,static:a,future:ma({v7_relativeSplatPath:!1},l)}),[c,l,o,a]);typeof r=="string"&&(r=lo(r));let{pathname:d="/",search:h="",hash:m="",state:v=null,key:b="default"}=r,x=f.useMemo(()=>{let w=E0(d,c);return w==null?null:{location:{pathname:w,search:h,hash:m,state:v,key:b},navigationType:s}},[c,d,h,m,v,b,s]);return x==null?null:f.createElement(Qc.Provider,{value:u},f.createElement(Xc.Provider,{children:n,value:x}))}function zP(e){let{children:t,location:n}=e;return CP(kh(t),n)}new Promise(()=>{});
339function kh(e,t){t===void 0&&(t=[]);let n=[];return f.Children.forEach(e,(r,s)=>{if(!f.isValidElement(r))return;let o=[...t,s];if(r.type===f.Fragment){n.push.apply(n,kh(r.props.children,o));return}r.type!==pn&&nt(!1),!r.props.index||!r.props.children||nt(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=kh(r.props.children,o)),n.push(a)}),n}/**
340 * React Router DOM v6.27.0
341 *
342 * Copyright (c) Remix Software Inc.
343 *
344 * This source code is licensed under the MIT license found in the
345 * LICENSE.md file in the root directory of this source tree.
346 *
347 * @license MIT
348 */function Ch(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function BP(e,t){let n=Ch(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const WP="6";try{window.__reactRouterVersion=WP}catch{}const VP="startTransition",Pg=Qh[VP];function HP(e){let{basename:t,children:n,future:r,window:s}=e,o=f.useRef();o.current==null&&(o.current=Z2({window:s,v5Compat:!0}));let a=o.current,[l,c]=f.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},d=f.useCallback(h=>{u&&Pg?Pg(()=>c(h)):c(h)},[c,u]);return f.useLayoutEffect(()=>a.listen(d),[a,d]),f.createElement(UP,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}var Tg;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Tg||(Tg={}));var Rg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Rg||(Rg={}));function qP(e){let t=f.useRef(Ch(e)),n=f.useRef(!1),r=ka(),s=f.useMemo(()=>BP(r.search,n.current?null:t.current),[r.search]),o=Wt(),a=f.useCallback((l,c)=>{const u=Ch(typeof l=="function"?l(s):l);n.current=!0,o("?"+u,c)},[o,s]);return[s,a]}const KP="modulepreload",GP=function(e){return"/"+e},Ag={},Ca=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));s=Promise.allSettled(n.map(c=>{if(c=GP(c),c in Ag)return;Ag[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":KP,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((m,v)=>{h.addEventListener("load",m),h.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return s.then(a=>{for(const l of a||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},YP=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Ca(async()=>{const{default:r}=await Promise.resolve().then(()=>co);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};class um extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class QP extends um{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Og extends um{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Dg extends um{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Ph;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Ph||(Ph={}));var XP=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}
348return new(n||(n=Promise))(function(o,a){function l(d){try{u(r.next(d))}catch(h){a(h)}}function c(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};class JP{constructor(t,{headers:n={},customFetch:r,region:s=Ph.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=YP(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return XP(this,void 0,void 0,function*(){try{const{headers:s,method:o,body:a}=n;let l={},{region:c}=n;c||(c=this.region);const u=new URL(`${this.url}/${t}`);c&&c!=="any"&&(l["x-region"]=c,u.searchParams.set("forceFunctionRegion",c));let d;a&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&a instanceof Blob||a instanceof ArrayBuffer?(l["Content-Type"]="application/octet-stream",d=a):typeof a=="string"?(l["Content-Type"]="text/plain",d=a):typeof FormData<"u"&&a instanceof FormData?d=a:(l["Content-Type"]="application/json",d=JSON.stringify(a)));const h=yield this.fetch(u.toString(),{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},l),this.headers),s),body:d}).catch(x=>{throw new QP(x)}),m=h.headers.get("x-relay-error");if(m&&m==="true")throw new Og(h);if(!h.ok)throw new Dg(h);let v=((r=h.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),b;return v==="application/json"?b=yield h.json():v==="application/octet-stream"?b=yield h.blob():v==="text/event-stream"?b=h:v==="multipart/form-data"?b=yield h.formData():b=yield h.text(),{data:b,error:null,response:h}}catch(s){return{data:null,error:s,response:s instanceof Dg||s instanceof Og?s.context:void 0}}})}}var Lt={},dm={},Zc={},Pa={},eu={},tu={},ZP=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},Zi=ZP();const eT=Zi.fetch,A0=Zi.fetch.bind(Zi),O0=Zi.Headers,tT=Zi.Request,nT=Zi.Response,co=Object.freeze(Object.defineProperty({__proto__:null,Headers:O0,Request:tT,Response:nT,default:A0,fetch:eT},Symbol.toStringTag,{value:"Module"})),rT=K1(co);var nu={};Object.defineProperty(nu,"__esModule",{value:!0});let sT=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
348de=t.code}};nu.default=sT;var D0=cn&&cn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tu,"__esModule",{value:!0});const iT=D0(rT),oT=D0(nu);let aT=class{constructor(t){this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=t.headers,this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=t.shouldThrowOnError,this.signal=t.signal,this.isMaybeSingle=t.isMaybeSingle,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=iT.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,n){return this.headers=Object.assign({},this.headers),this.headers[t]=n,this}then(t,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{var a,l,c;let u=null,d=null,h=null,m=o.status,v=o.statusText;if(o.ok){if(this.method!=="HEAD"){const g=await o.text();g===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?d=g:d=JSON.parse(g))}const x=(a=this.headers.Prefer)===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),w=(l=o.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");x&&w&&w.length>1&&(h=parseInt(w[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(d)&&(d.length>1?(u={code:"PGRST116",details:`Results contain ${d.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},d=null,h=null,m=406,v="Not Acceptable"):d.length===1?d=d[0]:d=null)}else{const x=await o.text();try{u=JSON.parse(x),Array.isArray(u)&&o.status===404&&(d=[],u=null,m=200,v="OK")}catch{o.status===404&&x===""?(m=204,v="No Content"):u={message:x}}if(u&&this.isMaybeSingle&&(!((c=u==null?void 0:u.details)===null||c===void 0)&&c.includes("0 rows"))&&(u=null,m=200,v="OK"),u&&this.shouldThrowOnError)throw new oT.default(u)}return{error:u,data:d,count:h,status:m,statusText:v}});return this.shouldThrowOnError||(s=s.catch(o=>{var a,l,c;return{error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:`${(l=o==null?void 0:o.stack)!==null&&l!==void 0?l:""}`,hint:"",code:`${(c=o==null?void 0:o.code)!==null&&c!==void 0?c:""}`},data:null,count:null,status:0,statusText:""}})),s.then(t,n)}returns(){return this}overrideTypes(){return this}};tu.default=aT;var lT=cn&&cn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(eu,"__esModule",{value:!0});const cT=lT(tu);let uT=class extends cT.default{select(t){let n=!1;const r=(t??"*").split("").map(s=>/\s/.test(s)&&!n?"":(s==='"'&&(n=!n),s)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:s,referencedTable:o=s}={}){const a=o?`${o}.order`:"order",l=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${l?`${l},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:s=r}={}){const o=typeof s>"u"?"offset":`${s}.offset`,a=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(o,`${t}`),this.url.searchParams.set(a,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}
348explain({analyze:t=!1,verbose:n=!1,settings:r=!1,buffers:s=!1,wal:o=!1,format:a="text"}={}){var l;const c=[t?"analyze":null,n?"verbose":null,r?"settings":null,s?"buffers":null,o?"wal":null].filter(Boolean).join("|"),u=(l=this.headers.Accept)!==null&&l!==void 0?l:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${a}; for="${u}"; options=${c};`,a==="json"?this:this}rollback(){var t;return((t=this.headers.Prefer)!==null&&t!==void 0?t:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};eu.default=uT;var dT=cn&&cn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pa,"__esModule",{value:!0});const hT=dT(eu);let fT=class extends hT.default{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const r=Array.from(new Set(n)).map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:r,type:s}={}){let o="";s==="plain"?o="pl":s==="phrase"?o="ph":s==="websearch"&&(o="w");const a=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${o}fts${a}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}};Pa.default=fT;var mT=cn&&cn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zc,"__esModule",{value:!0});const So=mT(Pa);let pT=class{constructor(t,{headers:n={},schema:r,fetch:s}){this.url=t,this.headers=n,this.schema=r,this.fetch=s}select(t,{head:n=!1,count:r}={}){const s=n?"HEAD":"GET";let o=!1;const a=(t??"*").split("").map(l=>/\s/.test(l)&&!o?"":(l==='"'&&(o=!o),l)).join("");return this.url.searchParams.set("select",a),r&&(this.headers.Prefer=`count=${r}`),new So.default({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(t,{count:n,defaultToNull:r=!0}={}){const s="POST",o=[];if(this.headers.Prefer&&o.push(this.headers.Prefer),n&&o.push(`count=${n}`),r||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(t)){const a=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
3480){const l=[...new Set(a)].map(c=>`"${c}"`);this.url.searchParams.set("columns",l.join(","))}}return new So.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:s,defaultToNull:o=!0}={}){const a="POST",l=[`resolution=${r?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&l.push(this.headers.Prefer),s&&l.push(`count=${s}`),o||l.push("missing=default"),this.headers.Prefer=l.join(","),Array.isArray(t)){const c=t.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);this.url.searchParams.set("columns",u.join(","))}}return new So.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}update(t,{count:n}={}){const r="PATCH",s=[];return this.headers.Prefer&&s.push(this.headers.Prefer),n&&s.push(`count=${n}`),this.headers.Prefer=s.join(","),new So.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}delete({count:t}={}){const n="DELETE",r=[];return t&&r.push(`count=${t}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new So.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};Zc.default=pT;var ru={},su={};Object.defineProperty(su,"__esModule",{value:!0});su.version=void 0;su.version="0.0.0-automated";Object.defineProperty(ru,"__esModule",{value:!0});ru.DEFAULT_HEADERS=void 0;const gT=su;ru.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${gT.version}`};var M0=cn&&cn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dm,"__esModule",{value:!0});const vT=M0(Zc),xT=M0(Pa),yT=ru;let wT=class I0{constructor(t,{headers:n={},schema:r,fetch:s}={}){this.url=t,this.headers=Object.assign(Object.assign({},yT.DEFAULT_HEADERS),n),this.schemaName=r,this.fetch=s}from(t){const n=new URL(`${this.url}/${t}`);return new vT.default(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new I0(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:s=!1,count:o}={}){let a;const l=new URL(`${this.url}/rpc/${t}`);let c;r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([d,h])=>h!==void 0).map(([d,h])=>[d,Array.isArray(h)?`{${h.join(",")}}`:`${h}`]).forEach(([d,h])=>{l.searchParams.append(d,h)})):(a="POST",c=n);const u=Object.assign({},this.headers);return o&&(u.Prefer=`count=${o}`),new xT.default({method:a,url:l,headers:u,schema:this.schemaName,body:c,fetch:this.fetch,allowEmpty:!1})}};dm.default=wT;var uo=cn&&cn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.PostgrestError=Lt.PostgrestBuilder=Lt.PostgrestTransformBuilder=Lt.PostgrestFilterBuilder=Lt.PostgrestQueryBuilder=Lt.PostgrestClient=void 0;const L0=uo(dm);Lt.PostgrestClient=L0.default;const F0=uo(Zc);Lt.PostgrestQueryBuilder=F0.default;const $0=uo(Pa);Lt.PostgrestFilterBuilder=$0.default;const U0=uo(eu);Lt.PostgrestTransformBuilder=U0.default;const z0=uo(tu);Lt.PostgrestBuilder=z0.default;const B0=uo(nu);Lt.PostgrestError=B0.default;var bT=Lt.default={PostgrestClient:L0.default,PostgrestQueryBuilder:F0.default,PostgrestFilterBuilder:$0.default,PostgrestTransformBuilder:U0.default,PostgrestBuilder:z0.default,PostgrestError:B0.default};const{PostgrestClient:jT,PostgrestQueryBuilder:hI,PostgrestFilterBuilder:fI,PostgrestTransformBuilder:mI,PostgrestBuilder:pI,PostgrestError:gI}=bT;function _T(){if(typeof WebSocket<"u")return WebSocket;if(typeof global.WebSocket<"u")return global.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const ST=_T(),NT="2.11.15",ET=`realtime-js/${NT}`,kT="1.0.0",W0=1e4,CT=1e3;var Wo;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Wo||(Wo={}));var yt;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(yt||(yt={}));var jn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(jn||(jn={}));var Th;(function(e){e.websocket="websocket"})(Th||(Th={}));var ps;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(ps||(ps={}));class PT{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const s=n.getUint8(1),o=n.getUint8(2);let a=this.HEADER_LENGTH+2;const l=r.decode(t.slice(a,a+s));a=a+s;const c=r.decode(t.slice(a,a+o));a=a+o;const u=JSON.parse(r.decode(t.slice(a,t.byteLength)));return{ref:null,topic:l,event:c,payload:u}}}class V0{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Ie;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Ie||(Ie={}));const Mg=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((o,a)=>(o[a]=TT(a,e,t,s),o),{})},TT=(e,t,n,r)=>{const s=t.find(l=>
vendor: 14,366 bytes, lines 348-353
348l.name===e),o=s==null?void 0:s.type,a=n[e];return o&&!r.includes(o)?H0(o,a):Rh(a)},H0=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return DT(t,n)}switch(e){case Ie.bool:return RT(t);case Ie.float4:case Ie.float8:case Ie.int2:case Ie.int4:case Ie.int8:case Ie.numeric:case Ie.oid:return AT(t);case Ie.json:case Ie.jsonb:return OT(t);case Ie.timestamp:return MT(t);case Ie.abstime:case Ie.date:case Ie.daterange:case Ie.int4range:case Ie.int8range:case Ie.money:case Ie.reltime:case Ie.text:case Ie.time:case Ie.timestamptz:case Ie.timetz:case Ie.tsrange:case Ie.tstzrange:return Rh(t);default:return Rh(t)}},Rh=e=>e,RT=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},AT=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},OT=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},DT=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let o;const a=e.slice(1,n);try{o=JSON.parse("["+a+"]")}catch{o=a?a.split(","):[]}return o.map(l=>H0(t,l))}return e},MT=e=>typeof e=="string"?e.replace(" ","T"):e,q0=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class rd{constructor(t,n,r={},s=W0){this.channel=t,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var Ig;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Ig||(Ig={}));class Vo{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:o,onLeave:a,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Vo.syncState(this.state,s,o,a),this.pendingDiffs.forEach(c=>{this.state=Vo.syncDiff(this.state,c,o,a)}),this.pendingDiffs=[],l()}),this.channel._on(r.diff,{},s=>{const{onJoin:o,onLeave:a,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Vo.syncDiff(this.state,s,o,a),l())}),this.onJoin((s,o,a)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:a})}),this.onLeave((s,o,a)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:a})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,s){const o=this.cloneDeep(t),a=this.transformState(n),l={},c={};return this.map(o,(u,d)=>{a[u]||(c[u]=d)}),this.map(a,(u,d)=>{const h=o[u];if(h){const m=d.map(w=>w.presence_ref),v=h.map(w=>w.presence_ref),b=d.filter(w=>v.indexOf(w.presence_ref)<0),x=h.filter(w=>m.indexOf(w.presence_ref)<0);b.length>0&&(l[u]=b),x.length>0&&(c[u]=x)}else l[u]=d}),this.syncDiff(o,{joins:l,leaves:c},r,s)}static syncDiff(t,n,r,s){const{joins:o,leaves:a}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(o,(l,c)=>{var u;const d=(u=t[l])!==null&&u!==void 0?u:[];if(t[l]=this.cloneDeep(c),d.length>0){const h=t[l].map(v=>v.presence_ref),m=d.filter(v=>h.indexOf(v.presence_ref)<0);t[l].unshift(...m)}r(l,d,c)}),this.map(a,(l,c)=>{let u=t[l];if(!u)return;const d=c.map(h=>h.presence_ref);u=u.filter(h=>d.indexOf(h.presence_ref)<0),t[l]=u,s(l,u,c),u.length===0&&delete t[l]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return"metas"in s?n[r]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):n[r]=s,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Lg;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Lg||(Lg={}));var Fg;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Fg||(Fg={}));var Xn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Xn||(Xn={}));class hm{constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=yt.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new rd(this,jn.join,this.params,this.timeout),this.rejoinTimer=new V0(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=yt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=yt.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=yt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=yt.errored,this.rejoinTimer.scheduleTimeout())}),this._on(jn.reply,{},(s,o)=>{this._trigger(this._replyEventName(o),s)}),this.presence=new Vo(this),this.broadcastEndpointURL=q0(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(t,n=this.timeout){var r,s;if(this.socket.isConnected()||this.socket.connect(),this.state==yt.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params;this._onError(d=>t==null?void 0:t(Xn.CHANNEL_ERROR,d)),this._onClose(()=>t==null?void 0:t(Xn.CLOSED));const c={},u={broadcast:o,presence:a,postgres_changes:(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(d=>d.filter))!==null&&s!==void 0?s:[],private:l};this.socket.accessTokenValue&&(c.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:u},c)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:d})=>{var h;if(this.socket.setAuth(),d===void 0){t==null||t(Xn.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,v=(h=m==null?void 0:m.length)!==null&&h!==void 0?h:0,b=[];for(let x=0;x<v;x++){const w=m[x],{filter:{event:g,schema:p,table:y,filter:_}}=w,E=d&&d[x];if(E&&E.event===g&&E.schema===p&&E.table===y&&E.filter===_)b.push(Object.assign(Object.assign({},w),{id:E.id}));else{this.unsubscribe(),this.state=yt.errored,t==null||t(Xn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=b,t&&t(Xn.SUBSCRIBED);return}}).receive("error",d=>{this.state=yt.errored,t==null||t(Xn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(d).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Xn.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this._on(t,n,r)}async send(t,n={}){var r,s;if(!this._canPush()&&t.type==="broadcast"){const{event:o,payload:a}=t,c={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:a,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var a,l,c;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(a=this.params)===null||a===void 0?void 0:a.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&o("ok"),u.receive("ok",()=>o("ok")),u.receive("error",()=>o("error")),u.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=yt.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(jn.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(s=>{r=new rd(this,jn.leave,{},t),r.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.rejoinTimer&&clearTimeout(this.rejoinTimer.timer),this.joinPush.destroy()}async _fetchWithTimeout(t,n,r){const s=new AbortController,o=setTimeout(()=>s.abort(),r),a=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(o),a}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new rd(this,t,n,r);return this._canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var s,o;const a=t.toLocaleLowerCase(),{close:l,error:c,leave:u,join:d}=jn;if(r&&[l,c,u,d].indexOf(a)>=0&&r!==this._joinRef())return;let m=this._onMessage(a,n,r);if(n&&!m)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(a)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(v=>{var b,x,w;return((b=v.filter)===null||b===void 0?void 0:b.event)==="*"||((w=(x=v.filter)===null||x===void 0?void 0:x.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===a}).map(v=>v.callback(m,r)):(o=this.bindings[a])===null||o===void 0||o.filter(v=>{var b,x,w,g,p,y;if(["broadcast","presence","postgres_changes"].includes(a))if("id"in v){const _=v.id,E=(b=v.filter)===null||b===void 0?void 0:b.event;return _&&((x=n.ids)===null||x===void 0?void 0:x.includes(_))&&(E==="*"||(E==null?void 0:E.toLocaleLowerCase())===((w=n.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const _=(p=(g=v==null?void 0:v.filter)===null||g===void 0?void 0:g.event)===null||p===void 0?void 0:p.toLocaleLowerCase();return _==="*"||_===((y=n==null?void 0:n.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return v.type.toLocaleLowerCase()===a}).map(v=>{if(typeof m=="object"&&"ids"in m){const b=m.data,{schema:x,table:w,commit_timestamp:g,type:p,errors:y}=b;m=Object.assign(Object.assign({},{schema:x,table:w,commit_timestamp:g,eventType:p,new:{},old:{},errors:y}),this._getPayloadRecords(b))}v.callback(m,r)})}_isClosed(){return this.state===yt.closed}_isJoined(){return this.state===yt.joined}_isJoining(){return this.state===yt.joining}_isLeaving(){return this.state===yt.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const s=t.toLocaleLowerCase(),o={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===r&&hm.isEqual(s.filter,n))}),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(jn.close,{},t)}_onError(t){this._on(jn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=yt.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Mg(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Mg(t.columns,t.old_record)),n}}const $g=()=>{},IT=`
349  addEventListener("message", (e) => {
350    if (e.data.event === "start") {
351      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
352    }
353  });`;class LT{constructor(t,n){var r;this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=W0,this.heartbeatIntervalMs=25e3,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=$g,this.ref=0,this.logger=$g,this.conn=null,this.sendBuffer=[],this.serializer
353=new PT,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=o=>{let a;return o?a=o:typeof fetch>"u"?a=(...l)=>Ca(async()=>{const{default:c}=await Promise.resolve().then(()=>co);return{default:c}},void 0).then(({default:c})=>c(...l)):a=fetch,(...l)=>a(...l)},this.endPoint=`${t}/${Th.websocket}`,this.httpEndpoint=q0(t),n!=null&&n.transport?this.transport=n.transport:this.transport=null,n!=null&&n.params&&(this.params=n.params),n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.logger&&(this.logger=n.logger),(n!=null&&n.logLevel||n!=null&&n.log_level)&&(this.logLevel=n.logLevel||n.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),n!=null&&n.heartbeatIntervalMs&&(this.heartbeatIntervalMs=n.heartbeatIntervalMs);const s=(r=n==null?void 0:n.params)===null||r===void 0?void 0:r.apikey;if(s&&(this.accessTokenValue=s,this.apiKey=s),this.reconnectAfterMs=n!=null&&n.reconnectAfterMs?n.reconnectAfterMs:o=>[1e3,2e3,5e3,1e4][o-1]||1e4,this.encode=n!=null&&n.encode?n.encode:(o,a)=>a(JSON.stringify(o)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new V0(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch),n!=null&&n.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(n==null?void 0:n.worker)||!1,this.workerUrl=n==null?void 0:n.workerUrl}this.accessToken=(n==null?void 0:n.accessToken)||null}connect(){if(!this.conn){if(this.transport||(this.transport=ST),!this.transport)throw new Error("No transport provided");this.conn=new this.transport(this.endpointURL()),this.setupConnection()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:kT}))}disconnect(t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset(),this.channels.forEach(r=>r.teardown()))}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Wo.connecting:return ps.Connecting;case Wo.open:return ps.Open;case Wo.closing:return ps.Closing;default:return ps.Closed}}isConnected(){return this.connectionState()===ps.Open}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===r);if(s)return s;{const o=new hm(`realtime:${t}`,n,this);return this.channels.push(o),o}}push(t){const{topic:n,event:r,payload:s,ref:o}=t,a=()=>{this.encode(t,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${n} ${r} (${o})`,s),this.isConnected()?a():this.sendBuffer.push(a)}async setAuth(t=null){let n=t||this.accessToken&&await this.accessToken()||this.accessTokenValue;this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(r=>{const s={access_token:n,version:ET};n&&r.updateJoinPayload(s),r.joinedOnce&&r._isJoined()&&r._push(jn.access_token,{access_token:n})}))}async sendHeartbeat(){var t;if(!this.isConnected()){this.heartbeatCallback("disconnected");return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.heartbeatCallback("timeout"),(t=this.conn)===null||t===void 0||t.close(CT,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatCallback("sent"),await this.setAuth()}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>
353this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_onConnMessage(t){this.decode(t.data,n=>{let{topic:r,event:s,payload:o,ref:a}=n;r==="phoenix"&&s==="phx_reply"&&this.heartbeatCallback(n.payload.status=="ok"?"ok":"error"),a&&a===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${o.status||""} ${r} ${s} ${a&&"("+a+")"||""}`,o),Array.from(this.channels).filter(l=>l._isMember(r)).forEach(l=>l._trigger(s,o,a)),this.stateChangeCallbacks.message.forEach(l=>l(n))})}_onConnOpen(){this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this.stateChangeCallbacks.open.forEach(t=>t())}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){this.log("transport","close",t),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(t))}_onConnError(t){this.log("transport",`${t}`),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(t))}_triggerChanError(){this.channels.forEach(t=>t._trigger(jn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${t}${r}${s}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([IT],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}}class fm extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function it(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class FT extends fm{constructor(t,n){super(t),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Ah extends fm{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var $T=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(d){try{u(r.next(d))}catch(h){a(h)}}function c(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};const K0=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Ca(async()=>{const{default:r}=await Promise.resolve().then(()=>co);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},UT=()=>$T(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Ca(()=>Promise.resolve().then(()=>co),void 0)).Response:Response}),Oh=e=>{if(Array.isArray(e))return e.map(n=>Oh(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=Oh(r)}),t};var Hs=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(d){try{u(r.next(d))}catch(h){a(h)}}function c(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};const sd=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),zT=(e,t,n)=>Hs(void 0,void 0,void 0,function*(){const r=yield UT();e instanceof r&&!(n!=null&&n.noResolveJson)?e.json().then(s=>{t(new FT(sd(s),e.status||500))}).catch(s=>{t(new Ah(sd(s),s))}):t(new Ah(sd(e),e))}),BT=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),r&&(s.body=JSON.stringify(r)),Object.assign(Object.assign({},s),n))};function Ta(e,t,n,r,s,o){return Hs(this,void 0,void 0,function*(){return new Promise((a,l)=>{e(n,BT(t,r,s,o)).then(c=>{if(!c.ok)throw c;return r!=null&&r.noResolveJson?c:c.json()}).then(c=>a(c)).catch(c=>zT(c,l,r))})})}function dc(e,t,n,r){return Hs(this,void 0,void 0,function*(){return Ta(e,"GET",t,n,r)})}
353function Cr(e,t,n,r,s){return Hs(this,void 0,void 0,function*(){return Ta(e,"POST",t,r,s,n)})}function WT(e,t,n,r,s){return Hs(this,void 0,void 0,function*(){return Ta(e,"PUT",t,r,s,n)})}function VT(e,t,n,r){return Hs(this,void 0,void 0,function*(){return Ta(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function G0(e,t,n,r,s){return Hs(this,void 0,void 0,function*(){return Ta(e,"DELETE",t,r,s,n)})}var Mt=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(d){try{u(r.next(d))}catch(h){a(h)}}function c(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};const HT={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Ug={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class qT{constructor(t,n={},r,s){this.url=t,this.headers=n,this.bucketId=r,this.fetch=K0(s)}uploadOrUpdate(t,n,r,s){return Mt(this,void 0,void 0,function*(){try{let o;const a=Object.assign(Object.assign({},Ug),s);let l=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(a.upsert)});const c=a.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",a.cacheControl),c&&o.append("metadata",this.encodeMetadata(c)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.append("cacheControl",a.cacheControl),c&&o.append("metadata",this.encodeMetadata(c))):(o=r,l["cache-control"]=`max-age=${a.cacheControl}`,l["content-type"]=a.contentType,c&&(l["x-metadata"]=this.toBase64(this.encodeMetadata(c)))),s!=null&&s.headers&&(l=Object.assign(Object.assign({},l),s.headers));const u=this._removeEmptyFolders(n),d=this._getFinalPath(u),h=yield this.fetch(`${this.url}/object/${d}`,Object.assign({method:t,body:o,headers:l},a!=null&&a.duplex?{duplex:a.duplex}:{})),m=yield h.json();return h.ok?{data:{path:u,id:m.Id,fullPath:m.Key},error:null}:{data:null,error:m}}catch(o){if(it(o))return{data:null,error:o};throw o}})}upload(t,n,r){return Mt(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,s){return Mt(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(t),a=this._getFinalPath(o),l=new URL(this.url+`/object/upload/sign/${a}`);l.searchParams.set("token",n);try{let c;const u=Object.assign({upsert:Ug.upsert},s),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.append("cacheControl",u.cacheControl)):(c=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType);const h=yield this.fetch(l.toString(),{method:"PUT",body:c,headers:d}),m=yield h.json();return h.ok?{data:{path:o,fullPath:m.Key},error:null}:{data:null,error:m}}catch(c){if(it(c))return{data:null,error:c};throw c}})}createSignedUploadUrl(t,n){return Mt(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const s=Object.assign({},this.headers);n!=null&&n.upsert&&(s["x-upsert"]="true");const o=yield Cr(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:s}),a=new URL(this.url+o.url),l=a.searchParams.get("token");if(!l)throw new fm("No token returned by API");return{data:{signedUrl:a.toString(),path:t,token:l},error:null}}catch(r){if(it(r))return{data:null,error:r};throw r}})}update(t,n,r){return Mt(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return Mt(this,void 0,void 0,function*(){try{return{data:yield Cr(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(it(s))return{data:null,error:s};throw s}})}copy(t,n,r){return Mt(this,void 0,void 0,function*(){try{return{data:{path:(yield Cr(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(it(s))return{data:null,error:s};throw s}})}createSignedUrl(t,n,r){return Mt(this,void 0,void 0,function*(){try{let s=this._getFinalPath(t),o=yield Cr(this.fetch,`${this.url}/object/sign/${s}
353`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${a}`)},{data:o,error:null}}catch(s){if(it(s))return{data:null,error:s};throw s}})}createSignedUrls(t,n,r){return Mt(this,void 0,void 0,function*(){try{const s=yield Cr(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(a=>Object.assign(Object.assign({},a),{signedUrl:a.signedURL?encodeURI(`${this.url}${a.signedURL}${o}`):null})),error:null}}catch(s){if(it(s))return{data:null,error:s};throw s}})}download(t,n){return Mt(this,void 0,void 0,function*(){const s=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),a=o?`?${o}`:"";try{const l=this._getFinalPath(t);return{data:yield(yield dc(this.fetch,`${this.url}/${s}/${l}${a}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(l){if(it(l))return{data:null,error:l};throw l}})}info(t){return Mt(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{const r=yield dc(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:Oh(r),error:null}}catch(r){if(it(r))return{data:null,error:r};throw r}})}exists(t){return Mt(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{return yield VT(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(it(r)&&r instanceof Ah){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}})}getPublicUrl(t,n){const r=this._getFinalPath(t),s=[],o=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";o!==""&&s.push(o);const l=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",c=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});c!==""&&s.push(c);let u=s.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${l}/public/${r}${u}`)}}}remove(t){return Mt(this,void 0,void 0,function*(){try{return{data:yield G0(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(it(n))return{data:null,error:n};throw n}})}list(t,n,r){return Mt(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},HT),n),{prefix:t||""});return{data:yield Cr(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},r),error:null}}catch(s){if(it(s))return{data:null,error:s};throw s}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const KT="2.7.1",GT={"X-Client-Info":`storage-js/${KT}`};var ei=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(d){try{u(r.next(d))}catch(h){a(h)}}function c(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};class YT{constructor(t,n={},r){this.url=t,this.headers=Object.assign(Object.assign({},GT),n),this.fetch=K0(r)}listBuckets(){return ei(this,void 0,void 0,function*(){try{return{data:yield dc(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(it(t))return{data:null,error:t};throw t}})}getBucket(t){return ei(this,void 0,void 0,function*(){try{return{data:yield dc(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(it(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return ei(this,void 0,void 0,function*(){try{return{data:yield Cr(this.fetch,`${this.url}/bucket`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(it(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return ei(this,void 0,void 0,function*(){try{return{data:yield WT(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(it(r))return{data:null,error:r};throw r}})}emptyBucket(t){return ei(this,void 0,void 0,function*(){try{return{data:yield Cr(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(it(n))return{data:null,error:n};throw n}})}deleteBucket(t){return ei(this,void 0,void 0,function*(){try{return{data:yield G0(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(it(n))return{data:null,error:n};throw n}})}}class QT extends YT{constructor(t,n={},r){super(t,n,r)}from(t){return new qT(this.url,this.headers,t,this.fetch)}}const XT="2.52.0";let Ro="";typeof Deno<"u"?Ro="deno":typeof document<"u"?Ro="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Ro="react-native":Ro="node";const JT={"X-Client-Info":`supabase-js-${Ro}/${XT}`},ZT={headers:JT},eR={schema:"public"},tR={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},nR={};var rR=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}
353return new(n||(n=Promise))(function(o,a){function l(d){try{u(r.next(d))}catch(h){a(h)}}function c(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};const sR=e=>{let t;return e?t=e:typeof fetch>"u"?t=A0:t=fetch,(...n)=>t(...n)},iR=()=>typeof Headers>"u"?O0:Headers,oR=(e,t,n)=>{const r=sR(n),s=iR();return(o,a)=>rR(void 0,void 0,void 0,function*(){var l;const c=(l=yield t())!==null&&l!==void 0?l:e;let u=new s(a==null?void 0:a.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),r(o,Object.assign(Object.assign({},a),{headers:u}))})};var aR=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(d){try{u(r.next(d))}catch(h){a(h)}}function c(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};function lR(e){return e.endsWith("/")?e:e+"/"}function cR(e,t){var n,r;const{db:s,auth:o,realtime:a,global:l}=e,{db:c,auth:u,realtime:d,global:h}=t,m={db:Object.assign(Object.assign({},c),s),auth:Object.assign(Object.assign({},u),o),realtime:Object.assign(Object.assign({},d),a),global:Object.assign(Object.assign(Object.assign({},h),l),{headers:Object.assign(Object.assign({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=l==null?void 0:l.headers)!==null&&r!==void 0?r:{})}),accessToken:()=>aR(this,void 0,void 0,function*(){return""})};return e.accessToken?m.accessToken=e.accessToken:delete m.accessToken,m}const Y0="2.71.1",ci=30*1e3,Dh=3,id=Dh*ci,uR="http://localhost:9999",dR="supabase.auth.token",hR={"X-Client-Info":`gotrue-js/${Y0}`},Mh="X-Supabase-Api-Version",Q0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},fR=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,mR=10*60*1e3;class mm extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function fe(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class pR extends mm{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function gR(e){return fe(e)&&e.name==="AuthApiError"}class X0 extends mm{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class os extends mm{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Sr extends os{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function vR(e){return fe(e)&&e.name==="AuthSessionMissingError"}class ol extends os{constructor(){super("Auth session or user missing","AuthInvalidToken
353ResponseError",500,void 0)}}class al extends os{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class ll extends os{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function xR(e){return fe(e)&&e.name==="AuthImplicitGrantRedirectError"}class zg extends os{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Ih extends os{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function od(e){return fe(e)&&e.name==="AuthRetryableFetchError"}class Bg extends os{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class Lh extends os{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const hc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Wg=` 	
354\r=`.split(""),yR=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Wg.length;t+=1)e[Wg[t].charCodeAt(0)]=-2;for(let t=0;t<hc.length;t+=1)e[hc[t].charCodeAt(0)]=t;return e})();function Vg(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(hc[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(hc[r]),t.queuedBits-=6}}function J0(e,t,n){const r=yR[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Hg(e){const t=[],n=a=>{t.push(String.fromCodePoint(a))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=a=>{jR(a,r,n)};for(let a=0;a<e.length;a+=1)J0(e.charCodeAt(a),s,o);return t.join("")}function wR(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function bR(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}wR(r,t)}}function jR(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function _R(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)J0(e.charCodeAt(s),n,r);return new Uint8Array(t)}function SR(e){const t=[];return bR(e,n=>t.push(n)),new Uint8Array(t)}function NR(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>Vg(s,n,r)),Vg(null,n,r),t.join("")}function ER(e){return Math.round(Date.now()/1e3)+e}function kR(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const gn=()=>typeof window<"u"&&typeof document<"u",cs={tested:!1,writable:!1},Z0=()=>{if(!gn())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(cs.tested)return cs.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),cs.tested=!0,cs.writable=!0}catch{cs.tested=!0,cs.writable=!1}return cs.writable};function CR(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,o)=>{t[o]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const eb=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Ca(async()=>{const{default:r}=await Promise.resolve().then(()=>co);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},PR=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ui=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},us=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},br=async(e,t)=>{await e.removeItem(t)};class iu{constructor(){this.promise=new iu.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}iu.promiseConstructor=Promise;function ad(e){const t=e.split(".");if(t.length!==3)throw new Lh("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!fR.test(t[r]))throw new Lh("JWT not in base64url format");return{header:JSON.parse(Hg(t[0])),payload:JSON.parse(Hg(t[1])),signature:_R(t[2]),raw:{header:t[0],payload:t[1]}}}async function TR(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function RR(e,t){return new Promise((r,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const a=await e(o);if(!t(o,null,a)){r(a);return}}catch(a){if(!t(o,a)){s(a);return}}})()})}function AR(e){return("0"+e.toString(16)).substr(-2)}function OR(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let o=0;o<56;o++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,AR).join("")}async function DR(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",
354n),s=new Uint8Array(r);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function MR(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await DR(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ti(e,t,n=!1){const r=OR();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await ui(e,`${t}-code-verifier`,s);const o=await MR(r);return[o,r===o?"plain":"s256"]}const IR=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function LR(e){const t=e.headers.get(Mh);if(!t||!t.match(IR))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function FR(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function $R(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const UR=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ni(e){if(!UR.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function ld(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function qg(e){return JSON.parse(JSON.stringify(e))}var zR=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};const fs=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),BR=[502,503,504];async function Kg(e){var t;if(!PR(e))throw new Ih(fs(e),0);if(BR.includes(e.status))throw new Ih(fs(e),e.status);let n;try{n=await e.json()}catch(o){throw new X0(fs(o),o)}let r;const s=LR(e);if(s&&s.getTime()>=Q0["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new Bg(fs(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Sr}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((o,a)=>o&&typeof a=="string",!0))throw new Bg(fs(n),e.status,n.weak_password.reasons);throw new pR(fs(n),e.status||500,r)}const WR=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function ye(e,t,n,r){var s;const o=Object.assign({},r==null?void 0:r.headers);o[Mh]||(o[Mh]=Q0["2024-01-01"].name),r!=null&&r.jwt&&(o.Authorization=`Bearer ${r.jwt}`);const a=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(a.redirect_to=r.redirectTo);const l=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",c=await VR(e,t,n+l,{headers:o,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function VR(e,t,n,r,s,o){const a=WR(t,r,s,o);let l;try{l=await e(n,Object.assign({},a))}catch(c){throw console.error(c),new Ih(fs(c),0)}if(l.ok||await Kg(l),r!=null&&r.noResolveJson)return l;try{return await l.json()}catch(c){await Kg(c)}}function Yn(e){var t;let n=null;GR(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=ER(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function Gg(e){const t=Yn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Rr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function HR(e){return{data:e,error:null}}function qR(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o}=e,a=zR(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o},c=Object.assign({},a);return{data:{properties:l,user:c},error:null}}function KR(e){return e}function GR(e){return e.access_token&&e.refresh_token&&e.expires_in}const cd=["global","local","others"];var YR=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};class QR{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=eb(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}
354async signOut(t,n=cd[0]){if(cd.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${cd.join(", ")}`);try{return await ye(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(fe(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await ye(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Rr})}catch(r){if(fe(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=YR(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await ye(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:qR,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(fe(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await ye(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Rr})}catch(n){if(fe(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,o,a,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ye(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:KR});if(d.error)throw d.error;const h=await d.json(),m=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,v=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return v.length>0&&(v.forEach(b=>{const x=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(b.split(";")[1].split("=")[1]);u[`${w}Page`]=x}),u.total=parseInt(m)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(fe(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){ni(t);try{return await ye(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Rr})}catch(n){if(fe(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){ni(t);try{return await ye(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Rr})}catch(r){if(fe(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){ni(t);try{return await ye(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Rr})}catch(r){if(fe(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){ni(t.userId);try{const{data:n,error:r}=await ye(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(fe(n))return{data:null,error:n};throw n}}async _deleteFactor(t){ni(t.userId),ni(t.id);try{return{data:await ye(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(fe(n))return{data:null,error:n};throw n}}}function Yg(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function XR(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const ri={debug:!!(globalThis&&Z0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class tb extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class JR extends tb{}async function ZR(e,t,n){ri.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),ri.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){ri.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{ri.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw ri.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new JR(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(ri.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}XR();const eA={url:uR,storageKey:dR,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:hR,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function Qg(e,t,n){return await n()}const si={};class pa{constructor(t){var n,r;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=pa.nextInstanceID,pa.nextInstanceID+=1,this.instanceID>0&&gn()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const s=Object.assign(Object.assign({},eA),t);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new QR({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=eb(s.fetch),this.lock=s.lock||Qg,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:gn()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=ZR:this.lock=Qg,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:Z0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Yg(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=Yg(this.memoryStorage)),gn()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}get jwks(){var t,n;return(n=(t=si[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){si[this.storageKey]=Object.assign(Object.assign({},si[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=si[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){si[this.storageKey]=Object.assign(Object.assign({},si[this.storageKey]),{cachedAt:t})}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${Y0}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{const n=CR(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),gn()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:o}=await this._getSessionFromURL(n,r);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),xR(o)){const c=(t=o.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:o}}return await this._removeSession(),{error:o}}const{session:a,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",a,"redirect type",l),await this._saveSession(a),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return fe(n)?{error:n}:{error:new X0("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const o=await ye(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Yn}),{data:a,error:l}=o;if(l||!a)return{data:{user:null,session:null},error:l};const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),{data:{user:u,session:c},error:null}}catch(o){if(fe(o))return{data:{user:null,session:null},error:o};throw o}}async signUp(t){var n,r,s;try{let o;if("email"in t){const{email:d,password:h,options:m}=t;let v=null,b=null;this.flowType==="pkce"&&([v,b]=await ti(this.storage,this.storageKey)),o=await ye(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:m==null?void 0:m.emailRedirectTo,body:{email:d,password:h,data:(n=m==null?void 0:m.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken},code_challenge:v,code_challenge_method:b},xform:Yn})}else if("phone"in t){const{phone:d,password:h,options:m}=t;o=await ye(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(r=m==null?void 0:m.data)!==null&&r!==void 0?r:{},channel:(s=m==null?void 0:m.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken}},xform:Yn})}else throw new al("You must provide either an email or phone number and a password");const{data:a,error:l}=o;if(l||!a)return{data:{user:null,session:null},error:l};const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),{data:{user:u,session:c},error:null}}catch(o){if(fe(o))return{data:{user:null,session:null},error:o};throw o}}async signInWithPassword(t){try{let n;if("email"in t){const{email:o,password:a,options:l}=t;n=await ye(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Gg})}else if("phone"in t){const{phone:o,password:a,options:l}=t;n=await ye(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Gg})}else throw new al("You must provide either an email or phone number and a password");const{data:r,error:s}=n;return s?{data:{user:null,session:null},error:s}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new ol}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(fe(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,s,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.o
354ptions)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;if(n==="solana")return await this.signInWithSolana(t);throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}async signInWithSolana(t){var n,r,s,o,a,l,c,u,d,h,m,v;let b,x;if("message"in t)b=t.message,x=t.signature;else{const{chain:w,wallet:g,statement:p,options:y}=t;let _;if(gn())if(typeof g=="object")_=g;else{const C=window;if("solana"in C&&typeof C.solana=="object"&&("signIn"in C.solana&&typeof C.solana.signIn=="function"||"signMessage"in C.solana&&typeof C.solana.signMessage=="function"))_=C.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof g!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=g}const E=new URL((n=y==null?void 0:y.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in _&&_.signIn){const C=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},y==null?void 0:y.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),p?{statement:p}:null));let j;if(Array.isArray(C)&&C[0]&&typeof C[0]=="object")j=C[0];else if(C&&typeof C=="object"&&"signedMessage"in C&&"signature"in C)j=C;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in j&&"signature"in j&&(typeof j.signedMessage=="string"||j.signedMessage instanceof Uint8Array)&&j.signature instanceof Uint8Array)b=typeof j.signedMessage=="string"?j.signedMessage:new TextDecoder().decode(j.signedMessage),x=j.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");b=[`${E.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...p?["",p,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(s=(r=y==null?void 0:y.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=y==null?void 0:y.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${y.signInWithSolana.notBefore}`]:[],...!((a=y==null?void 0:y.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${y.signInWithSolana.expirationTime}`]:[],...!((l=y==null?void 0:y.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${y.signInWithSolana.chainId}`]:[],...!((c=y==null?void 0:y.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${y.signInWithSolana.nonce}`]:[],...!((u=y==null?void 0:y.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${y.signInWithSolana.requestId}`]:[],...!((h=(d=y==null?void 0:y.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...y.signInWithSolana.resources.map(j=>`- ${j}`)]:[]].join(`
355`);const C=await _.signMessage(new TextEncoder().encode(b),"utf8");if(!C||!(C instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");x=C}}try{const{data:w,error:g}=await ye(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:b,signature:NR(x)},!((m=t.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(v=t.options)===null||v===void 0?void 0:v.captchaToken}}:null),xform:Yn});if(g)throw g;return!w||!w.session||!w.user?{data:{user:null,session:null},error:new ol}:(w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),{data:Object.assign({},w),error:g})}catch(w){if(fe(w))return{data:{user:null,session:null},error:w};throw w}}async _exchangeCodeForSession(t){const n=await us(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{const{data:o,error:a}=await ye(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Yn});if(await br(this.storage,`${this.storageKey}-code-verifier`),a)throw a;return!o||!o.session||!o.user?{data:{user:null,session:null,redirectType:null},error:new ol}:(o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:a})}catch(o){if(fe(o))return{data:{user:null,session:null,redirectType:null},error:o};throw o}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:o,nonce:a}=t,l=await ye(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:o,nonce:a,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Yn}),{data:c,error:u}=l;return u?{data:{user:null,session:null},error:u}:!c||!c.session||!c.user?{data:{user:null,session:null},error:new ol}:(c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),{data:c,error:u})}catch(n){if(fe(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,s,o,a;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await ti(this.storage,this.storageKey));const{error:h}=await ye(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return{data:{user:null,session:null},error:h}}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await ye(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(o=c==null?void 0:c.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(a=c==null?void 0:c.channel)!==null&&a!==void 0?a:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d}}throw new al("You must provide either an email or phone number.")}catch(l){if(fe(l))return{data:{user:null,session:null},error:l};throw l}}async verifyOtp(t){var n,r;try{let s,o;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,o=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:a,error:l}=await ye(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:Yn});if(l)throw l;if(!a)throw new Error("An error occurred on token verification.");const c=a.session,u=a.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),{data:{user:u,session:c},error:null}}catch(s){if(fe(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(t){var n,r,s;try{let o=null,a=null;return this.flowType==="pkce"&&([o,a]=await ti(this.storage,this.storageKey)),await ye(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}
355:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:a}),headers:this.headers,xform:HR})}catch(o){if(fe(o))return{data:null,error:o};throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Sr;const{error:s}=await ye(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:s}})}catch(t){if(fe(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:o}=t,{error:a}=await ye(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return{data:{user:null,session:null},error:a}}else if("phone"in t){const{phone:r,type:s,options:o}=t,{data:a,error:l}=await ye(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return{data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:l}}throw new al("You must provide either an email or phone number and a type")}catch(n){if(fe(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await us(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<id:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const a=await us(this.userStorage,this.storageKey+"-user");a!=null&&a.user?t.user=a.user:t.user=ld()}if(this.storage.isServer&&t.user){let a=this.suppressGetSessionWarning;t=new Proxy(t,{get:(c,u,d)=>(!a&&u==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),a=!0,this.suppressGetSessionWarning=!0),Reflect.get(c,u,d))})}return{data:{session:t},error:null}}const{session:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?{data:{session:null},error:o}:{data:{session:s},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await ye(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Rr}):await this._useSession(async n=>{var r,s,o;const{data:a,error:l}=n;if(l)throw l;return!(!((r=a.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Sr}:await ye(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:Rr})})}catch(n){if(fe(n))return vR(n)&&(await this._removeSession(),await br(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:o}=r;if(o)throw o;if(!s.session)throw new Sr;const a=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await ti(this.storage,this.storageKey));const{data:u,error:d}=await ye(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:a.access_token,xform:Rr});if(d)throw d;return a.user=u.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),{data:{user:a.user},error:null}})}catch(r){if(fe(r))return{data:{user:null},error:r};throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Sr;const n=Date.now()/1e3;let r=n,s=!0,o=null;const{payload:a}=ad(t.access_token);if(a.exp&&(r=a.exp,s=r<=n),s){const{session:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return{data:{user:null,session:null},error:c};if(!l)return{data:{user:null,session:null},error:null};o=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)throw c;o={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return{data:{user:o.user,session:o},error:null}}catch(n){if(fe(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:a,error:l}=n;if(l)throw l;t=(r=a.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Sr;const{session:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?{data:{user:null,session:null},error:o}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(fe(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t,n){try{if(!gn())throw new ll("No browser detected.");
355if(t.error||t.error_description||t.error_code)throw new ll(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new zg("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ll("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new zg("No code detected.");const{data:p,error:y}=await this._exchangeCodeForSession(t.code);if(y)throw y;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:p.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:u}=t;if(!o||!l||!a||!u)throw new ll("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(l);let m=d+h;c&&(m=parseInt(c));const v=m-d;v*1e3<=ci&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${v}s, should have been closer to ${h}s`);const b=m-h;d-b>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",b,m,d):d-b<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",b,m,d);const{data:x,error:w}=await this._getUser(o);if(w)throw w;const g={provider_token:r,provider_refresh_token:s,access_token:o,expires_in:h,expires_at:m,refresh_token:a,token_type:u,user:x.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:g,redirectType:t.type},error:null}}catch(r){if(fe(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await us(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:o}=n;if(o)return{error:o};const a=(r=s.session)===null||r===void 0?void 0:r.access_token;if(a){const{error:l}=await this.admin.signOut(a,t);if(l&&!(gR(l)&&(l.status===404||l.status===401||l.status===403)))return{error:l}}return t!=="others"&&(await this._removeSession(),await br(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const n=kR(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:o},error:a}=n;if(a)throw a;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await ti(this.storage,this.storageKey,!0));try{return await ye(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(fe(o))return{data:null,error:o};throw o}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(fe(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:s}=await this._useSession(async o=>{var a,l,c,u,d;const{data:h,error:m}=o;if(m)throw m;const v=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await ye(this.fetch,"GET",v,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return gn()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(fe(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:o,error:a}=n;
355if(a)throw a;return await ye(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(fe(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await RR(async s=>(s>0&&await TR(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await ye(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Yn})),(s,o)=>{const a=200*Math.pow(2,s);return o&&od(o)&&Date.now()+a-r<ci})}catch(r){if(this._debug(n,"error",r),fe(r))return{data:{session:null,user:null},error:r};throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),gn()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await us(this.storage,this.storageKey);if(s&&this.userStorage){let a=await us(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:s.user},await ui(this.userStorage,this.storageKey+"-user",a)),s.user=(t=a==null?void 0:a.user)!==null&&t!==void 0?t:ld()}else if(s&&!s.user&&!s.user){const a=await us(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(s.user=a.user,await br(this.storage,this.storageKey+"-user"),await ui(this.storage,this.storageKey,s)):s.user=ld()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const o=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<id;if(this._debug(r,`session has${o?"":" not"} expired with margin of ${id}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:a}=await this._callRefreshToken(s.refresh_token);a&&(console.error(a),od(a)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:l}=await this._getUser(s.access_token);!l&&(a!=null&&a.user)?(s.user=a.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(r,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Sr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new iu;const{data:o,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!o.session)throw new Sr;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const l={session:o.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(o){if(this._debug(s,"error",o),fe(o)){const a={session:null,error:o};return od(o)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(a),a}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const o=[],a=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,n)}catch(c){o.push(c)}});if(await Promise.all(a),o.length>0){for(let l=0;l<o.length;l+=1)console.error(o[l]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await ui(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const o=qg(s);await ui(this.storage,this.storageKey,o)}else{const s=qg(n);await ui(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),await br(this.storage,this.storageKey),await br(this.storage,this.storageKey+"-code-verifier"),await br(this.storage,this.storageKey+"-user"),this.userStorage&&await br(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&gn()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
355catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ci);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/ci);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${ci}ms, refresh threshold is ${Dh} ticks`),s<=Dh&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof tb)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!gn()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[o,a]=await ti(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(l.toString())}if(r!=null&&r.queryParams){const o=new URLSearchParams(r.queryParams);s.push(o.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?{data:null,error:o}:await ye(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(fe(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:o,error:a}=n;if(a)return{data:null,error:a};const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:{issuer:t.issuer}),{data:c,error:u}=await ye(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token});return u?{data:null,error:u}:(t.factorType==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),{data:c,error:null})})}catch(n){if(fe(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;
355if(o)return{data:null,error:o};const{data:a,error:l}=await ye(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?{data:null,error:l}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),{data:a,error:l})})}catch(n){if(fe(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?{data:null,error:o}:await ye(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:{channel:t.channel},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(fe(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],s=r.filter(a=>a.factor_type==="totp"&&a.status==="verified"),o=r.filter(a=>a.factor_type==="phone"&&a.status==="verified");return{data:{all:r,totp:s,phone:o},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:s},error:o}=t;if(o)return{data:null,error:o};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:a}=ad(s.access_token);let l=null;a.aal&&(l=a.aal);let c=l;((r=(n=s.user.factors)===null||n===void 0?void 0:n.filter(h=>h.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(c="aal2");const d=a.amr||[];return{data:{currentLevel:l,nextLevel:c,currentAuthenticationMethods:d},error:null}}))}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(l=>l.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(l=>l.kid===t),r&&this.jwks_cached_at+mR>s)return r;const{data:o,error:a}=await ye(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,r=o.keys.find(l=>l.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:v,error:b}
355=await this.getSession();if(b||!v.session)return{data:null,error:b};r=v.session.access_token}const{header:s,payload:o,signature:a,raw:{header:l,payload:c}}=ad(r);n!=null&&n.allowExpired||FR(o.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:v}=await this.getUser(r);if(v)throw v;return{data:{claims:o,header:s,signature:a},error:null}}const d=$R(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,a,SR(`${l}.${c}`)))throw new Lh("Invalid JWT signature");return{data:{claims:o,header:s,signature:a},error:null}}catch(r){if(fe(r))return{data:null,error:r};throw r}}}pa.nextInstanceID=0;const tA=pa;class nA extends tA{constructor(t){super(t)}}var rA=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(d){try{u(r.next(d))}catch(h){a(h)}}function c(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};class sA{constructor(t,n,r){var s,o,a;if(this.supabaseUrl=t,this.supabaseKey=n,!t)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const l=lR(t),c=new URL(l);this.realtimeUrl=new URL("realtime/v1",c),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",c),this.storageUrl=new URL("storage/v1",c),this.functionsUrl=new URL("functions/v1",c);const u=`sb-${c.hostname.split(".")[0]}-auth-token`,d={db:eR,realtime:nR,auth:Object.assign(Object.assign({},tR),{storageKey:u}),global:ZT},h=cR(r??{},d);this.storageKey=(s=h.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(o=h.global.headers)!==null&&o!==void 0?o:{},h.accessToken?(this.accessToken=h.accessToken,this.auth=new Proxy({},{get:(m,v)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(v)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((a=h.auth)!==null&&a!==void 0?a:{},this.headers,h.global.fetch),this.fetch=oR(n,this._getAccessToken.bind(this),h.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},h.realtime)),this.rest=new jT(new URL("rest/v1",c).href,{headers:this.headers,schema:h.db.schema,fetch:this.fetch}),h.accessToken||this._listenForAuthEvents()}get functions(){return new JP(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}get storage(){return new QT(this.storageUrl.href,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return rA(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:s,storageKey:o,flowType:a,lock:l,debug:c},u,d){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new nA({url:this.authUrl.href,headers:Object.assign(Object.assign({},h),u),storageKey:o,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:s,flowType:a,lock:l,debug:c,fetch:d,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(t){return new LT(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?this.changedAccessToken=r:t==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const iA=(e,t,n)=>new sA(e,t,n),oA="https://prfnpherkjsdxiddwsuz.supabase.co",aA="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InByZm5waGVya2pzZHhpZGR3c3V6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTMyNjQzOTgsImV4cCI6MjA2ODg0MDM5OH0.MEftfnwoSLbM6Mi6GxU_98seh1QFH0fmcFTsUjWg1eE",O=iA(oA,aA,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),Dt=()=>{const[e,t]=f.useState(null),[n,r]=f.useState(null),[s,o]=f.useState(!0);return f.useEffect(()=>{const{data:{subscription:l}}=O.auth.onAuthStateChange((c,u)=>{r(u),t((u==null?void 0:u.user)??null),o(!1)});return O.auth.getSession().then(({data:{session:c}})=>{r(c),t((c==null?void 0:c.user)??null),o(!1)}),()=>l.unsubscribe()},[]),{user:e,session:n,loading:s,signOut:async()=>{try{t(null),r(null),localStorage.removeItem("sb-prfnpherkjsdxiddwsuz-auth-token"),O.auth.signOut().catch(console.error),window.location.replace("/auth")}catch(l){console.error("Logout error:",l),window.location.replace("/auth")}},isAuthenticated:!!e}},qs=()=>{const[e,t]=f.useState(null),[n,r]=f.useState(!0),{user:s}=Dt();return f.useEffect(()=>{let o=!1;if(!s){t(null),r(!1);return}return r(!0),t(null),(async()=>{try{const{data:l,error:c}=await O.from("profiles").select("*").eq("user_id",s.id).single();if(o)return;if(c){console.error("Error fetching profile:",c);return}t(l)}catch(l){o||console.error("Error fetching profile:",l)}finally{o||r(!1)}})(),()=>{o=!0}},[s]),{profile:e,loading:n,isBewerber:(e==null?void 0:e.role)==="bewerber",isRecruiter:(e
vendor: 8,957 bytes, line 355
355==null?void 0:e.role)==="recruiter",isAdmin:(e==null?void 0:e.role)==="admin"}},pm=Lc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",event:"bg-event-primary text-event-primary-foreground hover:bg-event-primary/90",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),$=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const a=r?As:"button";return i.jsx(a,{className:ce(pm({variant:t,size:n,className:e})),ref:o,...s})});$.displayName="Button";const J=f.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ce("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));J.displayName="Card";const ae=f.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ce("flex flex-col space-y-1.5 p-6",e),...t}));ae.displayName="CardHeader";const le=f.forwardRef(({className:e,...t},n)=>i.jsx("h3",{ref:n,className:ce("text-2xl font-semibold leading-none tracking-tight",e),...t}));le.displayName="CardTitle";const Ae=f.forwardRef(({className:e,...t},n)=>i.jsx("p",{ref:n,className:ce("text-sm text-muted-foreground",e),...t}));Ae.displayName="CardDescription";const Z=f.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ce("p-6 pt-0",e),...t}));Z.displayName="CardContent";const lA=f.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ce("flex items-center p-6 pt-0",e),...t}));lA.displayName="CardFooter";const cA=Lc("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",registered:"border-transparent bg-event-primary text-event-primary-foreground hover:bg-event-primary/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function he({className:e,variant:t,...n}){return i.jsx("div",{className:ce(cA({variant:t}),e),...n})}var ud="focusScope.autoFocusOnMount",dd="focusScope.autoFocusOnUnmount",Xg={bubbles:!1,cancelable:!0},uA="FocusScope",gm=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=e,[l,c]=f.useState(null),u=Xe(s),d=Xe(o),h=f.useRef(null),m=xe(t,x=>c(x)),v=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let x=function(y){if(v.paused||!l)return;const _=y.target;l.contains(_)?h.current=_:Nr(h.current,{select:!0})},w=function(y){if(v.paused||!l)return;const _=y.relatedTarget;_!==null&&(l.contains(_)||Nr(h.current,{select:!0}))},g=function(y){if(document.activeElement===document.body)for(const E of y)E.removedNodes.length>0&&Nr(l)};document.addEventListener("focusin",x),document.addEventListener("focusout",w);const p=new MutationObserver(g);return l&&p.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",w),p.disconnect()}}},[r,l,v.paused]),f.useEffect(()=>{if(l){Zg.add(v);const x=document.activeElement;if(!l.contains(x)){const g=new CustomEvent(ud,Xg);l.addEventListener(ud,u),l.dispatchEvent(g),g.defaultPrevented||(dA(gA(nb(l)),{select:!0}),document.activeElement===x&&Nr(l))}return()=>{l.removeEventListener(ud,u),setTimeout(()=>{const g=new CustomEvent(dd,Xg);l.addEventListener(dd,d),l.dispatchEvent(g),g.defaultPrevented||Nr(x??document.body,{select:!0}),l.removeEventListener(dd,d),Zg.remove(v)},0)}}},[l,u,d,v]);const b=f.useCallback(x=>{if(!n&&!r||v.paused)return;const w=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,g=document.activeElement;if(w&&g){const p=x.currentTarget,[y,_]=hA(p);y&&_?!x.shiftKey&&g===_?(x.preventDefault(),n&&Nr(y,{select:!0})):x.shiftKey&&g===y&&(x.preventDefault(),n&&Nr(_,{select:!0})):g===p&&x.preventDefault()}},[n,r,v.paused]);return i.jsx(de.div,{tabIndex:-1,...a,ref:m,onKeyDown:b})});gm.displayName=uA;function dA(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Nr(r,{select:t}),document.activeElement!==n)return}function hA(e){const t=nb(e),n=Jg(t,e),r=Jg(t.reverse(),e);return[n,r]}function nb(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Jg(e,t){for(const n of e)if(!fA(n,{upTo:t}))return n}function fA(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function mA(e){return e instanceof HTMLInputElement&&"select"in e}function Nr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mA(e)&&t&&e.select()}}var Zg=pA();function pA(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ev(e,t),e.unshift(t)},remove(t){var n;e=ev(e,t),(n=e[0])==null||n.resume()}}}function ev(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gA(e){return e.filter(t=>t.tagName!=="A")}function vA(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var ou=e=>{const{present:t,children:n}=e,r=xA(t),s=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),o=xe(r.ref,yA(s));return typeof n=="function"||r.isPresent?f.cloneElement(s,{ref:o}):null};ou.displayName="Presence";function xA(e){const[t,n]=f.useState(),r=f.useRef({}),s=f.useRef(e),o=f.useRef("none"),a=e?"mounted":"unmounted",[l,c]=vA(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=cl(r.current);o.current=l==="mounted"?u:"none"},[l]),Be(()=>{const u=r.current,d=s.current;if(d!==e){const m=o.current,v=cl(u);e?c("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Be(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=v=>{const x=cl(r.current).includes(v.animationName);if(v.target===t&&x&&(c("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=v=>{v.target===t&&(o.current=cl(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function cl(e){return(e==null?void 0:e.animationName)||"none"}function yA(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hd=0;function rb(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??tv()),document.body.insertAdjacentElement("beforeend",e[1]??tv()),hd++,()=>{hd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hd--}},[])}function tv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var $n=function(){return $n=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},$n.apply(this,arguments)};
vendor: 5,338 bytes, lines 355-370
355function sb(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function wA(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Al="right-scroll-bar-position",Ol="width-before-scroll-bar",bA="with-scroll-bars-hidden",jA="--removed-body-scroll-bar-size";function fd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _A(e,t){var n=f.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var SA=typeof window<"u"?f.useLayoutEffect:f.useEffect,nv=new WeakMap;function NA(e,t){var n=_A(null,function(r){return e.forEach(function(s){return fd(s,r)})});return SA(function(){var r=nv.get(n);if(r){var s=new Set(r),o=new Set(e),a=n.current;s.forEach(function(l){o.has(l)||fd(l,null)}),o.forEach(function(l){s.has(l)||fd(l,a)})}nv.set(n,e)},[e]),n}function EA(e){return e}function kA(e,t){t===void 0&&(t=EA);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(l){return o(l)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(o),a=n}var c=function(){var d=a;a=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return s}function CA(e){e===void 0&&(e={});var t=kA(null);return t.options=$n({async:!0,ssr:!1},e),t}var ib=function(e){var t=e.sideCar,n=sb(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,$n({},n))};ib.isSideCarExport=!0;function PA(e,t){return e.useMedium(t),ib}var ob=CA(),md=function(){},au=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:md,onWheelCapture:md,onTouchMoveCapture:md}),s=r[0],o=r[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,x=e.allowPinchZoom,w=e.as,g=w===void 0?"div":w,p=e.gapMode,y=sb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=m,E=NA([n,t]),C=$n($n({},y),s);return f.createElement(f.Fragment,null,d&&f.createElement(_,{sideCar:ob,removeScrollBar:u,shards:h,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!x,lockRef:n,gapMode:p}),a?f.cloneElement(f.Children.only(l),$n($n({},C),{ref:E})):f.createElement(g,$n({},C,{className:c,ref:E}),l))});au.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};au.classNames={fullWidth:Ol,zeroRight:Al};var TA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function RA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=TA();return t&&e.setAttribute("nonce",t),e}function AA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function OA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var DA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=RA())&&(AA(t,n),OA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},MA=function(){var e=DA();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ab=function(){var e=MA(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},IA={left:0,top:0,right:0,gap:0},pd=function(e){return parseInt(e||"",10)||0},LA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[pd(n),pd(r),pd(s)]},FA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return IA;var t=LA(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},$A=ab(),Ri="data-scroll-locked",UA=function(e,t,n,r){var s=e.left,o=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
356  .`.concat(bA,` {
357   overflow: hidden `).concat(r,`;
358   padding-right: `).concat(l,"px ").concat(r,`;
359  }
360  body[`).concat(Ri,`] {
361    overflow: hidden `).concat(r,`;
362    overscroll-behavior: contain;
363    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
364    padding-left: `.concat(s,`px;
365    padding-top: `).concat(o,`px;
366    padding-right: `).concat(a,`px;
367    margin-left:0;
368    margin-top:0;
369    margin-right: `).concat(l,"px ").concat(r,`;
370    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
370")].filter(Boolean).join(""),`
371  }
372  
373  .`).concat(Al,` {
374    right: `).concat(l,"px ").concat(r,`;
375  }
376  
377  .`).concat(Ol,` {
378    margin-right: `).concat(l,"px ").concat(r,`;
379  }
380  
381  .`).concat(Al," .").concat(Al,` {
382    right: 0 `).concat(r,`;
383  }
384  
385  .`).concat(Ol," .").concat(Ol,` {
386    margin-right: 0 `).concat(r,`;
387  }
388  
389  body[`).concat(Ri,`] {
390    `).concat(jA,": ").concat(l,`px;
391  }
392`)},rv=function(){var e=parseInt(document.body.getAttribute(Ri)||"0",10);return isFinite(e)?e:0},zA=function(){f.useEffect(function(){return document.body.setAttribute(Ri,(rv()+1).toString()),function(){var e=rv()-1;e<=0?document.body.removeAttribute(Ri):document.body.setAttribute(Ri,e.toString())}},[])},BA=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;zA();var o=f.useMemo(function(){return FA(s)},[s]);return f.createElement($A,{styles:UA(o,!t,s,n?"":"!important")})},Fh=!1;if(typeof window<"u")try{var ul=Object.defineProperty({},"passive",{get:function(){return Fh=!0,!0}});window.addEventListener("test",ul,ul),window.removeEventListener("test",ul,ul)}catch{Fh=!1}var ii=Fh?{passive:!1}:!1,WA=function(e){return e.tagName==="TEXTAREA"},lb=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!WA(e)&&n[t]==="visible")},VA=function(e){return lb(e,"overflowY")},HA=function(e){return lb(e,"overflowX")},sv=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=cb(e,r);if(s){var o=ub(e,r),a=o[1],l=o[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},qA=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},KA=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cb=function(e,t){return e==="v"?VA(t):HA(t)},ub=function(e,t){return e==="v"?qA(t):KA(t)},GA=function(e,t){return e==="h"&&t==="rtl"?-1:1},YA=function(e,t,n,r,s){var o=GA(e,window.getComputedStyle(t).direction),a=o*r,l=n.target,c=t.contains(l),u=!1,d=a>0,h=0,m=0;do{var v=ub(e,l),b=v[0],x=v[1],w=v[2],g=x-w-o*b;(b||g)&&cb(e,l)&&(h+=g,m+=b),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(m)<1||!s))&&(u=!0),u},dl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},iv=function(e){return[e.deltaX,e.deltaY]},ov=function(e){return e&&"current"in e?e.current:e},QA=function(e,t){return e[0]===t[0]&&e[1]===t[1]},XA=function(e){return`
393  .block-interactivity-`.concat(e,` {pointer-events: none;}
394  .allow-interactivity-`).concat(e,` {pointer-events: all;}
395`)},JA=0,oi=[];function ZA(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),s=f.useState(JA++)[0],o=f.useState(ab)[0],a=f.useRef(e);f.useEffect(function(){a.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var x=wA([e.lockRef.current],(e.shards||[]).map(ov),!0).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=f.useCallback(function(x,w){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!a.current.allowPinchZoom;var g=dl(x),p=n.current,y="deltaX"in x?x.deltaX:p[0]-g[0],_="deltaY"in x?x.deltaY:p[1]-g[1],E,C=x.target,j=Math.abs(y)>Math.abs(_)?"h":"v";if("touches"in x&&j==="h"&&C.type==="range")return!1;var S=sv(j,C);if(!S)return!0;if(S?E=j:(E=j==="v"?"h":"v",S=sv(j,C)),!S)return!1;if(!r.current&&"changedTouches"in x&&(y||_)&&(r.current=E),!E)return!0;var k=r.current||E;return YA(k,w,x,k==="h"?y:_,!0)},[]),c=f.useCallback(function(x){var w=x;if(!(!oi.length||oi[oi.length-1]!==o)){var g="deltaY"in w?iv(w):dl(w),p=t.current.filter(function(E){return E.name===w.type&&(E.target===w.target||w.target===E.shadowParent)&&QA(E.delta,g)})[0];if(p&&p.should){w.cancelable&&w.preventDefault();return}
vendor: 8,903 bytes, lines 395-399
395if(!p){var y=(a.current.shards||[]).map(ov).filter(Boolean).filter(function(E){return E.contains(w.target)}),_=y.length>0?l(w,y[0]):!a.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),u=f.useCallback(function(x,w,g,p){var y={name:x,delta:w,target:g,should:p,shadowParent:eO(g)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(_){return _!==y})},1)},[]),d=f.useCallback(function(x){n.current=dl(x),r.current=void 0},[]),h=f.useCallback(function(x){u(x.type,iv(x),x.target,l(x,e.lockRef.current))},[]),m=f.useCallback(function(x){u(x.type,dl(x),x.target,l(x,e.lockRef.current))},[]);f.useEffect(function(){return oi.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",c,ii),document.addEventListener("touchmove",c,ii),document.addEventListener("touchstart",d,ii),function(){oi=oi.filter(function(x){return x!==o}),document.removeEventListener("wheel",c,ii),document.removeEventListener("touchmove",c,ii),document.removeEventListener("touchstart",d,ii)}},[]);var v=e.removeScrollBar,b=e.inert;return f.createElement(f.Fragment,null,b?f.createElement(o,{styles:XA(s)}):null,v?f.createElement(BA,{gapMode:e.gapMode}):null)}function eO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const tO=PA(ob,ZA);var vm=f.forwardRef(function(e,t){return f.createElement(au,$n({},e,{ref:t,sideCar:tO}))});vm.classNames=au.classNames;var nO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ai=new WeakMap,hl=new WeakMap,fl={},gd=0,db=function(e){return e&&(e.host||db(e.parentNode))},rO=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=db(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},sO=function(e,t,n,r){var s=rO(t,Array.isArray(e)?e:[e]);fl[n]||(fl[n]=new WeakMap);var o=fl[n],a=[],l=new Set,c=new Set(s),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(m){if(l.has(m))d(m);else try{var v=m.getAttribute(r),b=v!==null&&v!=="false",x=(ai.get(m)||0)+1,w=(o.get(m)||0)+1;ai.set(m,x),o.set(m,w),a.push(m),x===1&&b&&hl.set(m,!0),w===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",m,g)}})};return d(t),l.clear(),gd++,function(){a.forEach(function(h){var m=ai.get(h)-1,v=o.get(h)-1;ai.set(h,m),o.set(h,v),m||(hl.has(h)||h.removeAttribute(r),hl.delete(h)),v||h.removeAttribute(n)}),gd--,gd||(ai=new WeakMap,ai=new WeakMap,hl=new WeakMap,fl={})}},hb=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=nO(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),sO(r,s,n,"aria-hidden")):function(){return null}},xm="Dialog",[fb,mb]=Ws(xm),[iO,Pn]=fb(xm),pb=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:a=!0}=e,l=f.useRef(null),c=f.useRef(null),[u=!1,d]=Os({prop:r,defaultProp:s,onChange:o});return i.jsx(iO,{scope:t,triggerRef:l,contentRef:c,contentId:ir(),titleId:ir(),descriptionId:ir(),open:u,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(h=>!h),[d]),modal:a,children:n})};pb.displayName=xm;var gb="DialogTrigger",vb=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Pn(gb,n),o=xe(t,s.triggerRef);return i.jsx(de.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":bm(s.open),...r,ref:o,onClick:oe(e.onClick,s.onOpenToggle)})});vb.displayName=gb;var ym="DialogPortal",[oO,xb]=fb(ym,{forceMount:void 0}),yb=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Pn(ym,t);return i.jsx(oO,{scope:t,forceMount:n,children:f.Children.map(r,a=>i.jsx(ou,{present:n||o.open,children:i.jsx(Dc,{asChild:!0,container:s,children:a})}))})};yb.displayName=ym;var fc="DialogOverlay",wb=f.forwardRef((e,t)=>{const n=xb(fc,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Pn(fc,e.__scopeDialog);return o.modal?i.jsx(ou,{present:r||o.open,children:i.jsx(aO,{...s,ref:t})}):null});wb.displayName=fc;var aO=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Pn(fc,n);return i.jsx(vm,{as:As,allowPinchZoom:!0,shards:[s.contentRef],children:i.jsx(de.div,{"data-state":bm(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ls="DialogContent",bb=f.forwardRef((e,t)=>{const n=xb(Ls,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Pn(Ls,e.__scopeDialog);return i.jsx(ou,{present:r||o.open,children:o.modal?i.jsx(lO,{...s,ref:t}):i.jsx(cO,{...s,ref:t})})});bb.displayName=Ls;var lO=f.forwardRef((e,t)=>{const n=Pn(Ls,e.__scopeDialog),r=f.useRef(null),s=xe(t,n.contentRef,r);return f.useEffect(()=>{const o=r.current;if(o)return hb(o)},[]),i.jsx(jb,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:oe(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&o.preventDefault()}),onFocusOutside:oe(e.onFocusOutside,o=>o.preventDefault())})}),cO=f.forwardRef((e,t)=>{const n=Pn(Ls,e.__scopeDialog),r=f.useRef(!1),s=f.useRef(!1);return i.jsx(jb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),jb=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...a}=e,l=Pn(Ls,n),c=f.useRef(null),u=xe(t,c);return rb(),i.jsxs(i.Fragment,{children:[i.jsx(gm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:i.jsx(Sa,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":bm(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(dO,{titleId:l.titleId}),i.jsx(fO,{contentRef:c,descriptionId:l.descriptionId})]})]})}),wm="DialogTitle",_b=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Pn(wm,n);return i.jsx(de.h2,{id:s.titleId,...r,ref:t})});_b.displayName=wm;var Sb="DialogDescription",Nb=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Pn(Sb,n);return i.jsx(de.p,{id:s.descriptionId,...r,ref:t})});Nb.displayName=Sb;var Eb="DialogClose",kb=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Pn(Eb,n);return i.jsx(de.button,{type:"button",...r,ref:t,onClick:oe(e.onClick,()=>s.onOpenChange(!1))})});kb.displayName=Eb;function bm(e){return e?"open":"closed"}var Cb="DialogTitleWarning",[uO,Pb]=PN(Cb,{contentName:Ls,titleName:wm,docsSlug:"dialog"}),dO=({titleId:e})=>{const t=Pb(Cb),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
396
397If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
398
399For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},hO="DialogDescriptionWarning",fO=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Pb(hO).contentName}}.`;return f.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Tb=pb,Rb=vb,Ab=yb,jm=wb,_m=bb,Sm=_b,Nm=Nb,Em=kb;const mt=Tb,lu=Rb,mO=Ab,Ob=f.forwardRef(({className:e,...t},n)=>i.jsx(jm,{ref:n,className:ce("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ob.displayName=jm.displayName;const lt=f.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(mO,{children:[i.jsx(Ob,{}),i.jsxs(_m,{ref:r,className:ce("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
399nded-lg",e),...n,children:[t,i.jsxs(Em,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[i.jsx(Gf,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));lt.displayName=_m.displayName;const St=({className:e,...t})=>i.jsx("div",{className:ce("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});St.displayName="DialogHeader";const Nt=f.forwardRef(({className:e,...t},n)=>i.jsx(Sm,{ref:n,className:ce("text-lg font-semibold leading-none tracking-tight",e),...t}));Nt.displayName=Sm.displayName;const Et=f.forwardRef(({className:e,...t},n)=>i.jsx(Nm,{ref:n,className:ce("text-sm text-muted-foreground",e),...t}));Et.displayName=Nm.displayName;const ie=f.forwardRef(({className:e,type:t,...n},r)=>i.jsx("input",{type:t,className:ce("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));
vendor: 30,258 bytes, line 399
399ie.displayName="Input";var pO="Label",Db=f.forwardRef((e,t)=>i.jsx(de.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Db.displayName=pO;var Mb=Db;const gO=Lc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Y=f.forwardRef(({className:e,...t},n)=>i.jsx(Mb,{ref:n,className:ce(gO(),e),...t}));Y.displayName=Mb.displayName;function av(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ib(...e){return t=>{let n=!1;const r=e.map(s=>{const o=av(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():av(e[s],null)}}}}function Lb(...e){return f.useCallback(Ib(...e),e)}function vO(e,t=[]){let n=[];function r(o,a){const l=f.createContext(a),c=n.length;n=[...n,a];const u=h=>{var g;const{scope:m,children:v,...b}=h,x=((g=m==null?void 0:m[e])==null?void 0:g[c])||l,w=f.useMemo(()=>b,Object.values(b));return i.jsx(x.Provider,{value:w,children:v})};u.displayName=o+"Provider";function d(h,m){var x;const v=((x=m==null?void 0:m[e])==null?void 0:x[c])||l,b=f.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,d]}const s=()=>{const o=n.map(a=>f.createContext(a));return function(l){const c=(l==null?void 0:l[e])||o;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,xO(s,...t)]}function xO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(o)[`__scope${u}`];return{...l,...h}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function lv(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}var yO=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},wO=Qh[" useInsertionEffect ".trim().toString()]||yO;function bO({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,a]=jO({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:s;{const d=f.useRef(e!==void 0);f.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=f.useCallback(d=>{var h;if(l){const m=_O(d)?d(e):d;m!==e&&((h=a.current)==null||h.call(a,m))}else o(d)},[l,e,o,a]);return[c,u]}function jO({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),s=f.useRef(n),o=f.useRef(t);return wO(()=>{o.current=t},[t]),f.useEffect(()=>{var a;s.current!==n&&((a=o.current)==null||a.call(o,n),s.current=n)},[n,s]),[n,r,o]}function _O(e){return typeof e=="function"}function SO(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var NO=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function EO(e){const[t,n]=f.useState(void 0);return NO(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let a,l;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function cv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kO(...e){return t=>{let n=!1;const r=e.map(s=>{const o=cv(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():cv(e[s],null)}}}}function CO(...e){return f.useCallback(kO(...e),e)}var uv=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function PO(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Fb=e=>{const{present:t,children:n}=e,r=TO(t),s=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),o=CO(r.ref,RO(s));return typeof n=="function"||r.isPresent?f.cloneElement(s,{ref:o}):null};Fb.displayName="Presence";function TO(e){const[t,n]=f.useState(),r=f.useRef(null),s=f.useRef(e),o=f.useRef("none"),a=e?"mounted":"unmounted",[l,c]=PO(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=ml(r.current);o.current=l==="mounted"?u:"none"},[l]),uv(()=>{const u=r.current,d=s.current;if(d!==e){const m=o.current,v=ml(u);e?c("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),uv(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=v=>{const x=ml(r.current).includes(v.animationName);if(v.target===t&&x&&(c("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=v=>{v.target===t&&(o.current=ml(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ml(e){return(e==null?void 0:e.animationName)||"none"}function RO(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function AO(e){const t=OO(e),n=f.forwardRef((r,s)=>{const{children:o,...a}=r,l=f.Children.toArray(o),c=l.find(MO);if(c){const u=c.props.children,d=l.map(h=>h===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:h);return i.jsx(t,{...a,ref:s,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return i.jsx(t,{...a,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function OO(e){const t=f.forwardRef((n,r)=>{const{children:s,...o}=n;if(f.isValidElement(s)){const a=LO(s),l=IO(o,s.props);return s.type!==f.Fragment&&(l.ref=r?Ib(r,a):a),f.cloneElement(s,l)}return f.Children.count(s)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var DO=Symbol("radix.slottable");function MO(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DO}function IO(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...l)=>{const c=o(...l);return s(...l),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function LO(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var FO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],km=FO.reduce((e,t)=>{const n=AO(`Primitive.${t}`),r=f.forwardRef((s,o)=>{const{asChild:a,...l}=s,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),cu="Checkbox",[$O,vI]=vO(cu),[UO,Cm]=$O(cu);function zO(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:s,disabled:o,form:a,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=e,[m,v]=bO({prop:n,defaultProp:s??!1,onChange:c,caller:cu}),[b,x]=f.useState(null),[w,g]=f.useState(null),p=f.useRef(!1),y=b?!!a||!!b.closest("form"):!0,_={checked:m,disabled:o,setChecked:v,control:b,setControl:x,name:l,form:a,value:d,hasConsumerStoppedPropagationRef:p,required:u,defaultChecked:Gr(s)?!1:s,isFormControl:y,bubbleInput:w,setBubbleInput:g};return i.jsx(UO,{scope:t,..._,children:BO(h)?h(_):r})}var $b="CheckboxTrigger",Ub=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},s)=>{const{control:o,value:a,disabled:l,checked:c,required:u,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:v,bubbleInput:b}=Cm($b,e),x=Lb(s,d),w=f.useRef(c);return f.useEffect(()=>{const g=o==null?void 0:o.form;if(g){const p=()=>h(w.current);return g.addEventListener("reset",p),()=>g.removeEventListener("reset",p)}},[o,h]),i.jsx(km.button,{type:"button",role:"checkbox","aria-checked":Gr(c)?"mixed":c,"aria-required":u,"data-state":Hb(c),"data-disabled":l?"":void 0,disabled:l,value:a,...r,ref:x,onKeyDown:lv(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:lv(n,g=>{h(p=>Gr(p)?!0:!p),b&&v&&(m.current=g.isPropagationStopped(),m.current||g.stopPropagation())})})});Ub.displayName=$b;var Pm=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:o,required:a,disabled:l,value:c,onCheckedChange:u,form:d,...h}=e;return i.jsx(zO,{__scopeCheckbox:n,checked:s,defaultChecked:o,disabled:l,required:a,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:m})=>i.jsxs(i.Fragment,{children:[i.jsx(Ub,{...h,ref:t,__scopeCheckbox:n}),m&&i.jsx(Vb,{__scopeCheckbox:n})]})})});Pm.displayName=cu;var zb="CheckboxIndicator",Bb=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,o=Cm(zb,n);return i.jsx(Fb,{present:r||Gr(o.checked)||o.checked===!0,children:i.jsx(km.span,{"data-state":Hb(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});Bb.displayName=zb;var Wb="CheckboxBubbleInput",Vb=f.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:a,required:l,disabled:c,name:u,value:d,form:h,bubbleInput:m,setBubbleInput:v}=Cm(Wb,e),b=Lb(n,v),x=SO(o),w=EO(r);f.useEffect(()=>{const p=m;if(!p)return;const y=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(y,"checked").set,C=!s.current;if(x!==o&&E){const j=new Event("click",{bubbles:C});p.indeterminate=Gr(o),E.call(p,Gr(o)?!1:o),p.dispatchEvent(j)}},[m,x,o,s]);const g=f.useRef(Gr(o)?!1:o);return i.jsx(km.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??g.current,required:l,disabled:c,name:u,value:d,form:h,...t,tabIndex:-1,ref:b,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Vb.displayName=Wb;function BO(e){return typeof e=="function"}function Gr(e){return e==="indeterminate"}function Hb(e){return Gr(e)?"indeterminate":e?"checked":"unchecked"}const or=f.forwardRef(({className:e,...t},n)=>i.jsx(Pm,{ref:n,className:ce("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:i.jsx(Bb,{className:ce("flex items-center justify-center text-current"),children:i.jsx(vw,{className:"h-4 w-4"})})}));or.displayName=Pm.displayName;function $h(e,[t,n]){return Math.min(n,Math.max(t,e))}var WO=f.createContext(void 0);function uu(e){const t=f.useContext(WO);return e||t||"ltr"}function VO(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var HO=[" ","Enter","ArrowUp","ArrowDown"],qO=[" ","Enter"],Ra="Select",[du,hu,KO]=Wf(Ra),[ho,xI]=Ws(Ra,[KO,Wc]),fu=Wc(),[GO,as]=ho(Ra),[YO,QO]=ho(Ra),qb=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:a,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:h,disabled:m,required:v,form:b}=e,x=fu(t),[w,g]=f.useState(null),[p,y]=f.useState(null),[_,E]=f.useState(!1),C=uu(u),[j=!1,S]=Os({prop:r,defaultProp:s,onChange:o}),[k,N]=Os({prop:a,defaultProp:l,onChange:c}),P=f.useRef(null),M=w?b||!!w.closest("form"):!0,[W,F]=f.useState(new Set),R=Array.from(W).map(A=>A.props.value).join(";");return i.jsx(t0,{...x,children:i.jsxs(GO,{required:v,scope:t,trigger:w,onTriggerChange:g,valueNode:p,onValueNodeChange:y,valueNodeHasChildren:_,onValueNodeHasChildrenChange:E,contentId:ir(),value:k,onValueChange:N,open:j,onOpenChange:S,dir:C,triggerPointerDownPosRef:P,disabled:m,children:[i.jsx(du.Provider,{scope:t,children:i.jsx(YO,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(A=>{F(L=>new Set(L).add(A))},[]),onNativeOptionRemove:f.useCallback(A=>{F(L=>{const T=new Set(L);return T.delete(A),T})},[]),children:n})}),M?i.jsxs(vj,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:h,value:k,onChange:A=>N(A.target.value),disabled:m,form:b,children:[k===void 0?i.jsx("option",{value:""}):null,Array.from(W)]},R):null]})})};qb.displayName=Ra;var Kb="SelectTrigger",Gb=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=fu(n),a=as(Kb,n),l=a.disabled||r,c=xe(t,a.onTriggerChange),u=hu(n),d=f.useRef("touch"),[h,m,v]=xj(x=>{const w=u().filter(y=>!y.disabled),g=w.find(y=>y.value===a.value),p=yj(w,x,g);p!==void 0&&a.onValueChange(p.value)}),b=x=>{l||(a.onOpenChange(!0),v()),x&&(a.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return i.jsx(n0,{asChild:!0,...o,children:i.jsx(de.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":gj(a.value)?"":void 0,...s,ref:c,onClick:oe(s.onClick,x=>{x.currentTarget.focus(),d.current!=="mouse"&&b(x)}),onPointerDown:oe(s.onPointerDown,x=>{d.current=x.pointerType;const w=x.target;w.hasPointerCapture(x.pointerId)&&w.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(b(x),x.preventDefault())}),onKeyDown:oe(s.onKeyDown,x=>{const w=h.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&m(x.key),!(w&&x.key===" ")&&HO.includes(x.key)&&(b(),x.preventDefault())})})})});Gb.displayName=Kb;var Yb="SelectValue",Qb=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:a="",...l}=e,c=as(Yb,n),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,h=xe(t,c.onValueNodeChange);return Be(()=>{u(d)},[u,d]),i.jsx(de.span,{...l,ref:h,style:{pointerEvents:"none"},children:gj(c.value)?i.jsx(i.Fragment,{children:a}):o})});Qb.displayName=Yb;var XO="SelectIcon",Xb=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return i.jsx(de.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});Xb.displayName=XO;var JO="SelectPortal",Jb=e=>i.jsx(Dc,{asChild:!0,...e});Jb.displayName=JO;var Fs="SelectContent",Zb=f.forwardRef((e,t)=>{const n=as(Fs,e.__scopeSelect),[r,s]=f.useState();if(Be(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?Bs.createPortal(i.jsx(ej,{scope:e.__scopeSelect,children:i.jsx(du.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),o):null}return i.jsx(tj,{...e,ref:t})});Zb.displayName=Fs;var vn=10,[ej,ls]=ho(Fs),ZO="SelectContentImpl",tj=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:a,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:v,sticky:b,hideWhenDetached:x,avoidCollisions:w,...g}=e,p=as(Fs,n),[y,_]=f.useState(null),[E,C]=f.useState(null),j=xe(t,ee=>_(ee)),[S,k]=f.useState(null),[N,P]=f.useState(null),M=hu(n),[W,F]=f.useState(!1),R=f.useRef(!1);f.useEffect(()=>{if(y)return hb(y)},[y]),rb();const A=f.useCallback(ee=>{const[ve,...We]=M().map(_e=>_e.ref.current),[je]=We.slice(-1),ke=document.activeElement;for(const _e of ee)if(_e===ke||(_e==null||_e.scrollIntoView({block:"nearest"}),_e===ve&&E&&(E.scrollTop=0),_e===je&&E&&(E.scrollTop=E.scrollHeight),_e==null||_e.focus(),document.activeElement!==ke))return},[M,E]),L=f.useCallback(()=>A([S,y]),[A,S,y]);f.useEffect(()=>{W&&L()},[W,L]);const{onOpenChange:T,triggerPointerDownPosRef:I}=p;f.useEffect(()=>{if(y){let ee={x:0,y:0};const ve=je=>{var ke,_e;ee={x:Math.abs(Math.round(je.pageX)-(((ke=I.current)==null?void 0:ke.x)??0)),y:Math.abs(Math.round(je.pageY)-(((_e=I.current)==null?void 0:_e.y)??0))}},We=je=>{ee.x<=10&&ee.y<=10?je.preventDefault():y.contains(je.target)||T(!1),document.removeEventListener("pointermove",ve),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",We,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",We,{capture:!0})}}},[y,T,I]),f.useEffect(()=>{const ee=()=>T(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[T]);const[D,U]=xj(ee=>{const ve=M().filter(ke=>!ke.disabled),We=ve.find(ke=>ke.ref.current===document.activeElement),je=yj(ve,ee,We);je&&setTimeout(()=>je.ref.current.focus())}),K=f.useCallback((ee,ve,We)=>{const je=!R.current&&!We;(p.value!==void 0&&p.value===ve||je)&&(k(ee),je&&(R.current=!0))},[p.value]),q=f.useCallback(()=>y==null?void 0:y.focus(),[y]),Q=f.useCallback((ee,ve,We)=>{const je=!R.current&&!We;(p.value!==void 0&&p.value===ve||je)&&P(ee)},[p.value]),V=r==="popper"?Uh:nj,X=V===Uh?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:v,sticky:b,hideWhenDetached:x,avoidCollisions:w}:{};return i.jsx(ej,{scope:n,content:y,viewport:E,onViewportChange:C,itemRefCallback:K,selectedItem:S,onItemLeave:q,itemTextRefCallback:Q,focusSelectedItem:L,selectedItemText:N,position:r,isPositioned:W,searchRef:D,children:i.jsx(vm,{as:As,allowPinchZoom:!0,children:i.jsx(gm,{asChild:!0,trapped:p.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:oe(s,ee=>{var ve;(ve=p.trigger)==null||ve.focus({preventScroll:!0}),ee.preventDefault()}),children:i.jsx(Sa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:i.jsx(V,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:ee=>ee.preventDefault(),...g,...X,onPlaced:()=>F(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:oe(g.onKeyDown,ee=>{const ve=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!ve&&ee.key.length===1&&U(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let je=M().filter(ke=>!ke.disabled).map(ke=>ke.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(je=je.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const ke=ee.target,_e=je.indexOf(ke);je=je.slice(_e+1)}setTimeout(()=>A(je)),ee.preventDefault()}})})})})})})});tj.displayName=ZO;var eD="SelectItemAlignedPosition",nj=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=as(Fs,n),a=ls(Fs,n),[l,c]=f.useState(null),[u,d]=f.useState(null),h=xe(t,j=>d(j)),m=hu(n),v=f.useRef(!1),b=f.useRef(!0),{viewport:x,selectedItem:w,selectedItemText:g,focusSelectedItem:p}=a,y=f.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&u&&x&&w&&g){const j=o.trigger.getBoundingClientRect(),S=u.getBoundingClientRect(),k=o.valueNode.getBoundingClientRect(),N=g.getBoundingClientRect();if(o.dir!=="rtl"){const ke=N.left-S.left,_e=k.left-ke,dt=j.left-_e,kt=j.width+dt,z=Math.max(kt,S.width),te=window.innerWidth-vn,be=$h(_e,[vn,Math.max(vn,te-z)]);l.style.minWidth=kt+"px",l.style.left=be+"px"}else{const ke=S.right-N.right,_e=window.innerWidth-k.right-ke,dt=window.innerWidth-j.right-_e,kt=j.width+dt,z=Math.max(kt,S.width),te=window.innerWidth-vn,be=$h(_e,[vn,Math.max(vn,te-z)]);l.style.minWidth=kt+"px",l.style.right=be+"px"}const P=m(),M=window.innerHeight-vn*2,W=x.scrollHeight,F=window.getComputedStyle(u),R=parseInt(F.borderTopWidth,10),A=parseInt(F.paddingTop,10),L=parseInt(F.borderBottomWidth,10),T=parseInt(F.paddingBottom,10),I=R+A+W+T+L,D=Math.min(w.offsetHeight*5,I),U=window.getComputedStyle(x),K=parseInt(U.paddingTop,10),q=parseInt(U.paddingBottom,10),Q=j.top+j.height/2-vn,V=M-Q,X=w.offsetHeight/2,ee=w.offsetTop+X,ve=R+A+ee,We=I-ve;if(ve<=Q){const ke=P.length>0&&w===P[P.length-1].ref.current;l.style.bottom="0px";const _e=u.clientHeight-x.offsetTop-x.offsetHeight,dt=Math.max(V,X+(ke?q:0)+_e+L),kt=ve+dt;l.style.height=kt+"px"}else{const ke=P.length>0&&w===P[0].ref.current;l.style.top="0px";const dt=Math.max(Q,R+x.offsetTop+(ke?K:0)+X)+We;l.style.height=dt+"px",x.scrollTop=ve-Q+x.offsetTop}l.style.margin=`${vn}px 0`,l.style.minHeight=D+"px",l.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[m,o.trigger,o.valueNode,l,u,x,w,g,o.dir,r]);Be(()=>y(),[y]);const[_,E]=f.useState();Be(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const C=f.useCallback(j=>{j&&b.current===!0&&(y(),p==null||p(),b.current=!1)},[y,p]);return i.jsx(nD,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:v,onScrollButtonChange:C,children:i.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:i.jsx(de.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});nj.displayName=eD;var tD="SelectPopperPosition",Uh=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=vn,...o}=e,a=fu(n);return i.jsx(r0,{...a,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Uh.displayName=tD;var[nD,Tm]=ho(Fs,{}),zh="SelectViewport",rj=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=ls(zh,n),a=Tm(zh,n),l=xe(t,o.onViewportChange),c=f.useRef(0);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),i.jsx(du.Slot,{scope:n,children:i.jsx(de.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:oe(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=a;if(m!=null&&m.current&&h){const v=Math.abs(c.current-d.scrollTop);if(v>0){const b=window.innerHeight-vn*2,x=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),g=Math.max(x,w);if(g<b){const p=g+v,y=Math.min(b,p),_=p-y;h.style.height=y+"px",h.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,h.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});rj.displayName=zh;var sj="SelectGroup",[rD,sD]=ho(sj),iD=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=ir();return i.jsx(rD,{scope:n,id:s,children:i.jsx(de.div,{role:"group","aria-labelledby":s,...r,ref:t})})});iD.displayName=sj;var ij="SelectLabel",oj=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=sD(ij,n);return i.jsx(de.div,{id:s.id,...r,ref:t})});oj.displayName=ij;var mc="SelectItem",[oD,aj]=ho(mc),lj=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...a}=e,l=as(mc,n),c=ls(mc,n),u=l.value===r,[d,h]=f.useState(o??""),[m,v]=f.useState(!1),b=xe(t,p=>{var y;return(y=c.itemRefCallback)==null?void 0:y.call(c,p,r,s)}),x=ir(),w=f.useRef("touch"),g=()=>{s||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.jsx(oD,{scope:n,value:r,disabled:s,textId:x,isSelected:u,onItemTextChange:f.useCallback(p=>{h(y=>y||((p==null?void 0:p.textContent)??"").trim())},[]),children:i.jsx(du.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:i.jsx(de.div,{role:"option","aria-labelledby":x,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:b,onFocus:oe(a.onFocus,()=>v(!0)),onBlur:oe(a.onBlur,()=>v(!1)),onClick:oe(a.onClick,()=>{w.current!=="mouse"&&g()}),onPointerUp:oe(a.onPointerUp,()=>{w.current==="mouse"&&g()}),onPointerDown:oe(a.onPointerDown,p=>{w.current=p.pointerType}),onPointerMove:oe(a.onPointerMove,p=>{var y;w.current=p.pointerType,s?(y=c.onItemLeave)==null||y.call(c):w.current==="mouse"&&p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:oe(a.onPointerLeave,p=>{var y;p.currentTarget===document.activeElement&&((y=c.onItemLeave)==null||y.call(c))}),onKeyDown:oe(a.onKeyDown,p=>{var _;((_=c.searchRef)==null?void 0:_.current)!==""&&p.key===" "||(qO.includes(p.key)&&g(),p.key===" "&&p.preventDefault())})})})})});lj.displayName=mc;var Ao="SelectItemText",cj=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,a=as(Ao,n),l=ls(Ao,n),c=aj(Ao,n),u=QO(Ao,n),[d,h]=f.useState(null),m=xe(t,g=>h(g),c.onItemTextChange,g=>{var p;return(p=l.itemTextRefCallback)==null?void 0:p.call(l,g,c.value,c.disabled)}),v=d==null?void 0:d.textContent,b=f.useMemo(()=>i.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:x,onNativeOptionRemove:w}=u;return Be(()=>(x(b),()=>w(b)),[x,w,b]),i.jsxs(i.Fragment,{children:[i.jsx(de.span,{id:c.textId,...o,ref:m}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Bs.createPortal(o.children,a.valueNode):null]})});cj.displayName=Ao;var uj="SelectItemIndicator",dj=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return aj(uj,n).isSelected?i.jsx(de.span,{"aria-hidden":!0,...r,ref:t}):null});dj.displayName=uj;var Bh="SelectScrollUpButton",hj=f.forwardRef((e,t)=>{const n=ls(Bh,e.__scopeSelect),r=Tm(Bh,e.__scopeSelect),[s,o]=f.useState(!1),a=xe(t,r.onScrollButtonChange);return Be(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;o(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?i.jsx(mj,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});hj.displayName=Bh;var Wh="SelectScrollDownButton",fj=f.forwardRef((e,t)=>{const n=ls(Wh,e.__scopeSelect),r=Tm(Wh,e.__scopeSelect),[s,o]=f.useState(!1),a=xe(t,r.onScrollButtonChange);return Be(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;o(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?i.jsx(mj,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});fj.displayName=Wh;var mj=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=ls("SelectScrollButton",n),a=f.useRef(null),l=hu(n),c=f.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return f.useEffect(()=>()=>c(),[c]),Be(()=>{var d;const u=l().find(h=>h.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),i.jsx(de.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:oe(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:oe(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:oe(s.onPointerLeave,()=>{c()})})}),aD="SelectSeparator",pj=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(de.div,{"aria-hidden":!0,...r,ref:t})});pj.displayName=aD;var Vh="SelectArrow",lD=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=fu(n),o=as(Vh,n),a=ls(Vh,n);return o.open&&a.position==="popper"?i.jsx(s0,{...s,...r,ref:t}):null});lD.displayName=Vh;function gj(e){return e===""||e===void 0}var vj=f.forwardRef((e,t)=>{const{value:n,...r}=e,s=f.useRef(null),o=xe(t,s),a=VO(n);return f.useEffect(()=>{const l=s.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&d){const h=new Event("change",{bubbles:!0});d.call(l,n),l.dispatchEvent(h)}},[a,n]),i.jsx(Na,{asChild:!0,children:i.jsx("select",{...r,ref:o,defaultValue:n})})});vj.displayName="BubbleSelect";function xj(e){const t=Xe(e),n=f.useRef(""),r=f.useRef(0),s=f.useCallback(a=>{const l=n.current+a;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),o=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function yj(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=cD(e,Math.max(o,0));s.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function cD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uD=qb,wj=Gb,dD=Qb,hD=Xb,fD=Jb,bj=Zb,mD=rj,jj=oj,_j=lj,pD=cj,gD=dj,Sj=hj,Nj=fj,Ej=pj;const ct=uD,ut=dD,rt=f.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(wj,{ref:r,className:ce("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
399ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,i.jsx(hD,{asChild:!0,children:i.jsx(xw,{className:"h-4 w-4 opacity-50"})})]}));rt.displayName=wj.displayName;const kj=f.forwardRef(({className:e,...t},n)=>i.jsx(Sj,{ref:n,className:ce("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(gE,{className:"h-4 w-4"})}));kj.displayName=Sj.displayName;const Cj=f.forwardRef(({className:e,...t},n)=>i.jsx(Nj,{ref:n,className:ce("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(xw,{className:"h-4 w-4"})}));Cj.displayName=Nj.displayName;const st=f.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>i.jsx(fD,{children:i.jsxs(bj,{ref:s,className:ce("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[i.jsx(kj,{}),i.jsx(mD,{className:ce("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(Cj,{})]})}));st.displayName=bj.displayName;const vD=f.forwardRef(({className:e,...t},n)=>i.jsx(jj,{ref:n,className:ce("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));vD.displayName=jj.displayName;const se=f.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(_j,{ref:r,className:ce("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(gD,{children:i.jsx(vw,{className:"h-4 w-4"})})}),i.jsx(pD,{children:t})]}));se.displayName=_j.displayName;const xD=f.forwardRef(({className:e,...t},n)=>i.jsx(Ej,{ref:n,className:ce("-mx-1 my-1 h-px bg-muted",e),...t}));xD.displayName=Ej.displayName;const yD=({open:e,onOpenChange:t,onProfileUpdated:n})=>{const{user:r}=Dt(),{toast:s}=Bt(),[o,a]=f.useState(!1),[l,c]=f.useState({first_name:"",last_name:"",phone:"",studienrichtung:[],studiengang:"",semester:"",abschluss:"",bisheriger_abschluss:"",note:"",abschlussnote_notenwert:"",linkedin_url:"",gespraechsinteresse:[]}),[u,d]=f.useState(!1),[h,m]=f.useState(null),[v,b]=f.useState(!1);f.useEffect(()=>{e&&r&&x()},[e,r]);const x=async()=>{var S;if(r)try{const{data:k,error:N}=await O.from("profiles").select("*").eq("user_id",r.id).single();if(N)throw N;const{data:P,error:M}=await O.from("bewerber_profiles").select("*").eq("user_id",k.user_id).maybeSingle();if(M&&M.code!=="PGRST116")throw M;c({first_name:k.first_name||"",last_name:k.last_name||"",phone:k.phone||"",studienrichtung:(P==null?void 0:P.studienrichtung)||[],studiengang:(P==null?void 0:P.studiengang)||"",semester:((S=P==null?void 0:P.semester)==null?void 0:S.toString())||"",abschluss:(P==null?void 0:P.abschluss)||"",bisheriger_abschluss:(P==null?void 0:P.bisheriger_abschluss)||"",note:(P==null?void 0:P.note)||"",abschlussnote_notenwert:(P==null?void 0:P.abschlussnote_notenwert)||"",linkedin_url:(P==null?void 0:P.linkedin_url)||"",gespraechsinteresse:(P==null?void 0:P.gespraechsinteresse)||[]}),m((P==null?void 0:P.lebenslauf_url)||null)}catch(k){s({title:"Fehler beim Laden",description:k.message,variant:"destructive"})}},w=async S=>{if(S.preventDefault(),!!r){a(!0);try{const{data:k,error:N}=await O.from("profiles").select("id, user_id").eq("user_id",r.id).single();if(N)throw N;const{error:P}=await O.from("profiles").update({first_name:l.first_name,last_name:l.last_name,phone:l.phone}).eq("user_id",r.id);if(P)throw P;const M={user_id:k.user_id,studienrichtung:l.studienrichtung,studiengang:l.studiengang||null,semester:l.semester?parseInt(l.semester):null,abschluss:l.abschluss||null,bisheriger_abschluss:l.bisheriger_abschluss||null,
399note:l.note||null,abschlussnote_notenwert:l.abschlussnote_notenwert||null,linkedin_url:l.linkedin_url||null,gespraechsinteresse:l.gespraechsinteresse},{error:W}=await O.from("bewerber_profiles").upsert(M,{onConflict:"user_id",ignoreDuplicates:!1});if(W)throw W;s({title:"Profil aktualisiert",description:"Ihre Daten wurden erfolgreich gespeichert."}),n(),t(!1)}catch(k){s({title:"Fehler beim Speichern",description:k.message,variant:"destructive"})}finally{a(!1)}}},g=["Praktikum","Werkstudent","Vollzeit","Teilzeit","Abschlussarbeit","Direkteinstieg","Referendariat","Wissenschaftliche Mitarbeit"],p=S=>{c(k=>({...k,gespraechsinteresse:k.gespraechsinteresse.includes(S)?k.gespraechsinteresse.filter(N=>N!==S):[...k.gespraechsinteresse,S]}))},y=["Geisteswissenschaften","Jura","Sozialwissenschaften","BWL/Wirtschaft","MINT","Sonstige"],_=S=>{c(k=>({...k,studienrichtung:k.studienrichtung.includes(S)?k.studienrichtung.filter(N=>N!==S):[...k.studienrichtung,S]}))},E=async S=>{var N;const k=(N=S.target.files)==null?void 0:N[0];if(!(!k||!r)){if(!k.type.includes("pdf")){s({title:"Ungültiger Dateityp",description:"Bitte laden Sie nur PDF-Dateien hoch.",variant:"destructive"});return}if(k.size>5*1024*1024){s({title:"Datei zu groß",description:"Die Datei darf maximal 5MB groß sein.",variant:"destructive"});return}d(!0);try{h&&await C(!1);const P=`${r.id}/lebenslauf_${Date.now()}.pdf`,{error:M}=await O.storage.from("cvs").upload(P,k,{upsert:!0});if(M)throw M;const W=P,{data:F}=await O.from("profiles").select("id, user_id").eq("user_id",r.id).single();if(F){const{error:R}=await O.from("bewerber_profiles").upsert({user_id:F.user_id,lebenslauf_url:W},{onConflict:"user_id",ignoreDuplicates:!1});if(R)throw R;m(W),s({title:"Lebenslauf hochgeladen",description:"Ihr Lebenslauf wurde erfolgreich gespeichert."})}}catch(P){s({title:"Upload-Fehler",description:P.message,variant:"destructive"})}finally{d(!1);const P=S.target;P.value=""}}},C=async(S=!0)=>{if(!(!h||!r)){b(!0);try{let k=h;if(h.startsWith("http")){const M=h.indexOf("/cvs/");k=M!==-1?h.substring(M+5):h.split("/").slice(-2).join("/")}else h.includes("/")||(k=`${r.id}/${h}`);const{error:N}=await O.storage.from("cvs").remove([k]);if(N)throw N;const{data:P}=await O.from("profiles").select("id, user_id").eq("user_id",r.id).single();if(P){const{error:M}=await O.from("bewerber_profiles").update({lebenslauf_url:null}).eq("user_id",P.user_id);if(M)throw M;m(null),S&&s({title:"Lebenslauf gelöscht",description:"Ihr Lebenslauf wurde erfolgreich entfernt."})}}catch(k){S&&s({title:"Lösch-Fehler",description:k.message,variant:"destructive"})}finally{b(!1)}}},j=async()=>{if(h)try{let S=h;if(h.startsWith("http")){const P=h.indexOf("/cvs/");S=P!==-1?h.substring(P+5):h.split("/").slice(-2).join("/")}const{data:k,error:N}=await O.storage.from("cvs").createSignedUrl(S,60);if(N||!(k!=null&&k.signedUrl))throw N||new Error("Konnte signierte URL nicht erstellen");window.open(k.signedUrl,"_blank")}catch(S){s({title:"Anzeigen fehlgeschlagen",description:(S==null?void 0:S.message)||"Keine Berechtigung oder Datei nicht gefunden.",variant:"destructive"})}};return i.jsx(mt,{open:e,onOpenChange:t,children:i.jsxs(lt,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[i.jsxs(St,{children:[i.jsx(Nt,{children:"Profil bearbeiten"}),i.jsx(Et,{children:"Aktualisieren Sie Ihre persönlichen Daten und Präferenzen"})]}),i.jsxs("form",{onSubmit:w,className:"space-y-6",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"first_name",children:"Vorname"}),i.jsx(ie,{id:"first_name",value:l.first_name,onChange:S=>c(k=>({...k,first_name:S.target.value})),required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"last_name",children:"Nachname"}),i.jsx(ie,{id:"last_name",value:l.last_name,onChange:S=>c(k=>({...k,last_name:S.target.value})),required:!0})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"phone",children:"Telefon"}),i.jsx(ie,{id:"phone",type:"tel",value:l.phone,onChange:S=>c(k=>({...k,phone:S.target.value}))})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{children:"Studienrichtung"}),i.jsx("div",{className:"grid grid-cols-2 gap-2",children:y.map(S=>i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(or,{id:S,checked:l.studienrichtung.includes(S),onCheckedChange:k=>{_(S)}}),i.jsx(Y,{htmlFor:S,className:"text-sm font-normal",children:S})]},S))})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"studiengang",children:"Studiengang"}),i.jsx(ie,{id:"studiengang",value:l.studiengang,onChange:S=>c(k=>({...k,studiengang:S.target.value})),placeholder:"z.B. Informatik, BWL, Maschinenbau"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"semester",children:"Semester"}),i.jsx(ie,{id:"semester",type:"number",min:"1",max:"20",value:l.semester,onChange:S=>c(k=>({...k,semester:S.target.value}))})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"abschluss",children:"Angestrebter Abschluss"}),i.jsxs(ct,{value:l.abschluss,onValueChange:S=>c(k=>({...k,abschluss:S})),children:[i.jsx(rt,{children:i.jsx(ut,{placeholder:"Abschluss wählen"})}),i.jsxs(st,{children:[i.jsx(se,{value:"Bachelor",children:"Bachelor"}),i.jsx(se,{value:"Master",children:"Master"}),i.jsx(se,{value:"Diplom",children:"Diplom"}),i.jsx(se,{value:"Promotion",children:"Promotion"}),i.jsx(se,{value:"1. Staatsexamen",children:"1. Staatsexamen"}),i.jsx(se,{value:"2. Staatsexamen",children:"2. Staatsexamen"})]})]})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"bisheriger_abschluss",children:"Bisheriger Abschluss"}),i.jsxs(ct,{value:l.bisheriger_abschluss,onValueChange:S=>c(k=>({...k,bisheriger_abschluss:S})),children:[i.jsx(rt,{children:i.jsx(ut,{placeholder:"Abschluss wählen"})}),i.jsxs(st,{children:[i.jsx(se,{value:"Bachelor",children:"Bachelor"}),i.jsx(se,{value:"Master",children:"Master"}),i.jsx(se,{value:"Diplom",children:"Diplom"}),i.jsx(se,{value:"Promotion",children:"Promotion"}),i.jsx(se,{value:"1. Staatsexamen",children:"1. Staatsexamen"}),i.jsx(se,{value:"2. Staatsexamen",children:"2. Staatsexamen"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"note",children:"Note (Text)"}),i.jsxs(ct,{value:l.note,onValueChange:S=>c(k=>({...k,note:S})),children:[i.jsx(rt,{children:i.jsx(ut,{placeholder:"Note wählen"})}),i.jsxs(st,{children:[i.jsx(se,{value:"sehr gut",children:"sehr gut"}),i.jsx(se,{value:"gut",children:"gut"}),i.jsx(se,{value:"voll befriedigend (nur Jura)",children:"voll befriedigend (nur Jura)"}),i.jsx(se,{value:"befriedigend",children:"befriedigend"}),i.jsx(se,{value:"ausreichend",children:"ausreichend"})]})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"abschlussnote_notenwert",children:"Absc
399hlussnote (Notenwert)"}),i.jsx(ie,{id:"abschlussnote_notenwert",value:l.abschlussnote_notenwert,onChange:S=>c(k=>({...k,abschlussnote_notenwert:S.target.value})),placeholder:"z.B. 2.1 oder sehr gut"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"linkedin_url",children:"LinkedIn Profil"}),i.jsx(ie,{id:"linkedin_url",type:"url",value:l.linkedin_url,onChange:S=>c(k=>({...k,linkedin_url:S.target.value})),placeholder:"https://linkedin.com/in/ihr-profil"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"cv-upload",children:"Lebenslauf (PDF)"}),h?i.jsxs("div",{className:"space-y-2",children:[i.jsx("div",{className:"p-3 border rounded-md bg-muted/50",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("svg",{className:"h-4 w-4 text-red-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),i.jsx("span",{className:"text-sm font-medium",children:"Lebenslauf hochgeladen"})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx($,{type:"button",variant:"outline",size:"sm",onClick:j,children:"Anzeigen"}),i.jsx($,{type:"button",variant:"destructive",size:"sm",onClick:()=>C(),disabled:v,children:v?"Löschen...":"Löschen"})]})]})}),i.jsx(ie,{id:"cv-upload",type:"file",accept:".pdf",onChange:E,disabled:u}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Neue Datei hochladen (ersetzt die aktuelle Datei)"})]}):i.jsxs("div",{children:[i.jsx(ie,{id:"cv-upload",type:"file",accept:".pdf",onChange:E,disabled:u}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"PDF-Datei, maximal 5MB"})]}),u&&i.jsx("p",{className:"text-sm text-muted-foreground",children:"Wird hochgeladen..."})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{children:"Gesprächsinteresse"}),i.jsx("div",{className:"grid grid-cols-2 gap-2",children:g.map(S=>i.jsx($,{type:"button",variant:l.gespraechsinteresse.includes(S)?"default":"outline",size:"sm",onClick:()=>p(S),children:S},S))})]}),i.jsxs("div",{className:"flex justify-end gap-3",children:[i.jsx($,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:o,children:"Abbrechen"}),i.jsx($,{type:"submit",disabled:o,children:o?"Wird gespeichert...":"Speichern"})]})]})]})})},wD=({open:e,onOpenChange:t,onRegistrationUpdated:n})=>{const{user:r}=Dt(),{toast:s}=Bt(),o=Wt(),[a,l]=f.useState(!1),[c,u]=f.useState([]),[d,h]=f.useState([]),[m,v]=f.useState("");f.useEffect(()=>{e&&r&&b()},[e,r]);const b=async()=>{if(r){l(!0);try{const{data:p}=await O.from("profiles").select("id, user_id").eq("user_id",r.id).single();if(!p)return;const{data:y,error:_}=await O.from("events").select(`
400          *,
401          event_companies(
402            companies(name)
403          ),
404          event_participants!left(user_id)
405        `).eq("status","active").gte("start_datetime",new Date().toISOString()).order("start_datetime",{ascending:!0});if(_)throw _;const{data:E,error:C}=await O.from("event_participants").select("event_id").eq("user_id",p.id);if(C)throw C;u(y||[]),h((E==null?void 0:E.map(j=>j.event_id))||[])}catch(p){s({title:"Fehler beim Laden",description:p.message,variant:"destructive"})}finally{l(!1)}}},x=async p=>{if(r)try{const{data:y}=await O.from("profiles").select("id, user_id").eq("user_id",r.id).single();if(!y)return;const{error:_}=await O.from("event_participants").insert({event_id:p,user_id:y.id});if(_)throw _;s({title:"Anmeldung erfolgreich",description:"Sie wurden für das Event angemeldet."}),h(E=>[...E,p]),n()}catch(y){s({title:"Anmeldung fehlgeschlagen",description:y.message,variant:"destructive"})}},w=async p=>{if(r)try{const{data:y}=await O.from("profiles").select("id, user_id").eq("user_id",r.id).single();if(!y)return;const{error:_}=await O.from("event_participants").delete().eq("event_id",p).eq("user_id",y.id);if(_)throw _;s({title:"Abmeldung erfolgreich",description:"Sie wurden vom Event abgemeldet."}),h(E=>E.filter(C=>C!==p)),n()}catch(y){s({title:"Abmeldung fehlgeschlagen",description:y.message,variant:"destructive"})}},g=c.filter(p=>{var S,k;if(!m)return!0;const y=m.toLowerCase(),_=(S=p.title)==null?void 0:S.toLowerCase().includes(y),E=(k=p.description)==null?void 0:k.toLowerCase().includes(y),C=new Date(p.start_datetime),j=C.toLocaleDateString("de-DE").includes(m)||C.toLocaleDateString("de-DE",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(y);return _||E||j});return i.jsx(mt,{open:e,onOpenChange:t,children:i.jsxs(lt,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[i.jsxs(St,{children:[i.jsx(Nt,{children:"Event-Anmeldung"}),i.jsx(Et,{children:"Melden Sie sich für kommende Karriere-Events an"})]}),i.jsxs("div",{className:"relative",children:[i.jsx(Xr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(ie,{placeholder:"Nach Veranstaltung oder Datum suchen...",value:m,onChange:p=>v(p.target.value),className:"pl-10"})]}),a?i.jsx("div",{className:"space-y-4",children:[...Array(3)].map((p,y)=>i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsx("div",{className:"h-24 bg-muted animate-pulse rounded"})})},y))}):c.length===0?i.jsx("div",{className:"text-center py-8",children:i.jsx("p",{className:"text-muted-foreground",children:"Derzeit sind keine Events verfügbar."})}):g.length===0?i.jsx("div",{className:"text-center py-8",children:i.jsx("p",{className:"text-muted-foreground",children:"Keine Events gefunden, die Ihrer Suche entsprechen."})}):i.jsx("div",{className:"space-y-4",children:g.map(p=>{var k;const y=new Date(p.start_datetime),_=new Date(p.end_datetime),E=d.includes(p.id),C=((k=p.event_companies)==null?void 0:k.length)||0,j=p.registration_deadline?new Date(p.registration_deadline):null,S=!j||j>new Date;return i.jsxs(J,{className:E?"border-primary":"",children:[i.jsx(ae,{children:i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{children:[i.jsx(le,{className:"text-lg",children:p.title}),i.jsx(Ae,{children:p.description})]}),i.jsxs("div",{className:"flex gap-2",children:[E&&i.jsx(he,{variant:"registered",children:"Angemeldet"}),i.jsx(he,{variant:"outline",children:p.event_type})]})]})}),i.jsxs(Z,{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(tt,{className:"h-4 w-4 text-muted-foreground"}),i.jsxs("span",{children:[y.toLocaleDateString("de-DE")," - ",_.toLocaleDateString("de-DE")]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Fc,{className:"h-4 w-4 text-muted-foreground"}),i.jsxs("span",{children:[y.toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})," -",_.toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Ms,{className:"h-4 w-4 text-muted-foreground"}),i.jsx("span",{children:p.location})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(_t,{className:"h-4 w-4 text-muted-foreground"}),i.jsxs("span",{children:[C," Unternehmen"]})]})]}),j&&i.jsxs("div",{className:"text-sm text-muted-foreground",children:["Anmeldeschluss: ",j.toLocaleDateString("de-DE")]}),p.current_participants!==void 0&&p.max_participants>0&&i.jsxs("div",{className:"text-sm",children:[i.jsx("span",{className:"text-muted-foreground",children:"Teilnehmer: "}),i.jsxs("span",{className:p.current_participants>=p.max_participants?"text-red-500":"",children:[p.current_participants,"/",p.max_participants]})]}),i.jsxs("div",{className:"flex gap-2",children:[E?i.jsx($,{variant:"outline",onClick:()=>w(p.id),children:"Abmelden"}):i.jsx($,{onClick:()=>x(p.id),disabled:!S||p.max_participants>0&&p.current_participants>=p.max_participants,children:S?p.max_participants>0&&p.current_participants>=p.max_participants?"Ausgebucht":"Anmelden":"Anmeldeschluss abgelaufen"}),i.jsx($,{variant:"outline",onClick:()=>{o(`/events/${p.id}`),t(!1)},children:"Details anzeigen"})]})]})]}
405,p.id)})})]})})},Ks=f.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{className:ce("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Ks.displayName="Textarea";const bD=({open:e,onOpenChange:t,company:n})=>{const{toast:r}=Bt(),{user:s}=Dt(),[o,a]=f.useState(!1),[l,c]=f.useState({subject:"",message:""}),u=async d=>{if(d.preventDefault(),!(!n||!s)){a(!0);try{const{data:h,error:m}=await O.from("profiles").select("id, first_name, last_name, email, approved_status").eq("user_id",s.id).single();if(m||!h)throw new Error("Profile nicht gefunden");if(h.approved_status!=="approved")throw new Error("Ihr Account muss zuerst genehmigt werden, bevor Sie Nachrichten senden können.");const{data:v,error:b}=await O.functions.invoke("send-company-message",{body:{sender_id:h.id,company_id:n.id,subject:l.subject,message:l.message,sender_name:`${h.first_name} ${h.last_name}`.trim(),sender_email:h.email}});if(b)throw b;if(!(v!=null&&v.success))throw new Error("Nachricht konnte nicht gesendet werden");r({title:"✅ Kontaktanfrage gesendet",description:`Ihre Nachricht wurde erfolgreich an ${n.name} weitergeleitet.`}),c({subject:"",message:""}),t(!1)}catch(h){r({title:"Fehler beim Senden",description:h.message||"Ihre Nachricht konnte nicht gesendet werden. Bitte versuchen Sie es später erneut.",variant:"destructive"})}finally{a(!1)}}};return n?i.jsx(mt,{open:e,onOpenChange:t,children:i.jsxs(lt,{className:"max-w-md",children:[i.jsxs(St,{children:[i.jsxs(Nt,{className:"flex items-center gap-2",children:[i.jsx(sc,{className:"h-5 w-5"}),"Kontakt zu ",n.name]}),i.jsxs(Et,{children:["Nehmen Sie Kontakt mit ",n.name," auf oder senden Sie eine Nachricht über das Event-System."]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[n.website&&i.jsxs($,{variant:"outline",className:"w-full justify-start",onClick:()=>window.open(n.website,"_blank"),children:[i.jsx(sr,{className:"h-4 w-4 mr-2"}),"Website besuchen"]}),n.linkedin&&i.jsxs($,{variant:"outline",className:"w-full justify-start",onClick:()=>window.open(n.linkedin,"_blank"),children:[i.jsx(sr,{className:"h-4 w-4 mr-2"}),"LinkedIn-Profil"]})]}),i.jsxs("div",{className:"border-t pt-4",children:[i.jsx("h4",{className:"font-medium mb-3",children:"Nachricht über Event-System senden"}),i.jsxs("form",{onSubmit:u,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"subject",children:"Betreff"}),i.jsx(ie,{id:"subject",value:l.subject,onChange:d=>c(h=>({...h,subject:d.target.value})),placeholder:"z.B. Interesse an Praktikumsplatz",required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"message",children:"Nachricht"}),i.jsx(Ks,{id:"message",value:l.message,onChange:d=>c(h=>({...h,message:d.target.value})),placeholder:"Beschreiben Sie Ihr Anliegen...",rows:4,required:!0})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx($,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:o,className:"flex-1",children:"Abbrechen"}),i.jsx($,{type:"submit",disabled:o,className:"flex-1",children:o?"Wird gesendet...":"Nachricht senden"})]})]})]}),i.jsxs("div",{className:"text-xs text-muted-foreground bg-muted/50 p-3 rounded",children:[i.jsx("strong",{children:"Hinweis:"})," Ihre Kontaktdaten werden automatisch mit der Nachricht übermittelt. Das Unternehmen kann Sie direkt über die von Ihnen angegebene E-Mail-Adresse kontaktieren."]})]})]})}):null};var Pj="AlertDialog",[jD,yI]=Ws(Pj,[mb]),pr=mb(),Tj=e=>{const{__scopeAlertDialog:t,...n}=e,r=pr(t);return i.jsx(Tb,{...r,...n,modal:!0})};Tj.displayName=Pj;var _D="AlertDialogTrigger",Rj=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=pr(n);return i.jsx(Rb,{...s,...r,ref:t})});Rj.displayName=_D;var SD="AlertDialogPortal",Aj=e=>{const{__scopeAlertDialog:t,...n}=e,r=pr(t);return i.jsx(Ab,{...r,...n})};Aj.displayName=SD;var ND="AlertDialogOverlay",Oj=f.forwardRef((e,t)=>
405{const{__scopeAlertDialog:n,...r}=e,s=pr(n);return i.jsx(jm,{...s,...r,ref:t})});Oj.displayName=ND;var Ai="AlertDialogContent",[ED,kD]=jD(Ai),Dj=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,o=pr(n),a=f.useRef(null),l=xe(t,a),c=f.useRef(null);return i.jsx(uO,{contentName:Ai,titleName:Mj,docsSlug:"alert-dialog",children:i.jsx(ED,{scope:n,cancelRef:c,children:i.jsxs(_m,{role:"alertdialog",...o,...s,ref:l,onOpenAutoFocus:oe(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[i.jsx(Bf,{children:r}),i.jsx(PD,{contentRef:a})]})})})});Dj.displayName=Ai;var Mj="AlertDialogTitle",Ij=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=pr(n);return i.jsx(Sm,{...s,...r,ref:t})});Ij.displayName=Mj;var Lj="AlertDialogDescription",Fj=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=pr(n);return i.jsx(Nm,{...s,...r,ref:t})});Fj.displayName=Lj;var CD="AlertDialogAction",$j=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=pr(n);return i.jsx(Em,{...s,...r,ref:t})});$j.displayName=CD;var Uj="AlertDialogCancel",zj=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=kD(Uj,n),o=pr(n),a=xe(t,s);return i.jsx(Em,{...o,...r,ref:a})});zj.displayName=Uj;var PD=({contentRef:e})=>{const t=`\`${Ai}\` requires a description for the component to be accessible for screen reader users.
406
407You can add a description to the \`${Ai}\` by passing a \`${Lj}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
408
409Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ai}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
410
411For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},TD=Tj,RD=Rj,AD=Aj,Bj=Oj,Wj=Dj,Vj=$j,Hj=zj,qj=Ij,Kj=Fj;const OD=TD,DD=RD,MD=AD,Gj=f.forwardRef(({className:e,...t},n)=>i.jsx(Bj,{className:ce("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Gj.displayName=Bj.displayName;const Yj=f.forwardRef(({className:e,...t},n)=>i.jsxs(MD,{children:[i.jsx(Gj,{}),i.jsx(Wj,{ref:n,className:ce("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Yj.displayName=Wj.displayName;const Qj=({className:e,...t})=>i.jsx("div",{className:ce("flex flex-col space-y-2 text-center sm:text-left",e),...t});Qj.displayName="AlertDialogHeader";const Xj=({className:e,...t})=>i.jsx("div",{className:ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Xj.displayName="AlertDialogFooter";const Jj=f.forwardRef(({className:e,...t},n)=>i.jsx(qj,{ref:n,className:ce("text-lg font-semibold",e),...t}));Jj.displayName=qj.displayName;const Zj=f.forwardRef(({className:e,...t},n)=>i.jsx(Kj,{ref:n,className:ce("text-sm text-muted-foreground",e),...t}));Zj.displayName=Kj.displayName;const ID=f.forwardRef(({className:e,...t},n)=>i.jsx(Vj,{ref:n,className:ce(pm(),e),...t}));ID.displayName=Vj.displayName;const LD=f.forwardRef(({className:e,...t},n)=>i.jsx(Hj,{ref:n,className:ce(pm({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));LD.displayName=Hj.displayName;const e1=({trigger:e})=>{const[t,n]=f.useState(!1),[r,s]=f.useState(""),[o,a]=f.useState(!1),{user:l}=Dt(),{profile:c}=qs(),{toast:u}=Bt();Wt();const d=async()=>
411{if(!(!l||!c)){if(r!=="DELETE_MY_ACCOUNT"){u({title:"Falsche Bestätigung",description:'Bitte geben Sie "DELETE_MY_ACCOUNT" exakt ein.',variant:"destructive"});return}a(!0);try{const{error:m}=await O.functions.invoke("delete-account",{body:{confirmation:r,userId:l.id}});if(m)throw m;u({title:"Account gelöscht",description:"Ihr Account und alle persönlichen Daten wurden erfolgreich gelöscht."}),window.location.href="/auth"}catch(m){u({title:"Fehler beim Löschen",description:m.message||"Account konnte nicht gelöscht werden.",variant:"destructive"})}finally{a(!1)}}},h=()=>{s("")};return!l||!c?null:i.jsxs(OD,{open:t,onOpenChange:m=>{n(m),m||h()},children:[i.jsx(DD,{asChild:!0,children:e||i.jsxs($,{variant:"destructive",size:"sm",className:"gap-2",children:[i.jsx(Qi,{className:"h-4 w-4"}),"Account löschen"]})}),i.jsxs(Yj,{className:"max-w-lg",children:[i.jsxs(Qj,{children:[i.jsxs(Jj,{className:"flex items-center gap-2 text-destructive",children:[i.jsx(OE,{className:"h-5 w-5"}),"Account dauerhaft löschen"]}),i.jsxs(Zj,{className:"space-y-4 text-left",children:[i.jsxs("div",{className:"bg-destructive/10 p-4 rounded-lg",children:[i.jsx("p",{className:"text-sm font-medium text-destructive mb-2",children:"⚠️ Diese Aktion kann nicht rückgängig gemacht werden!"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Ihr Account und alle damit verbundenen Daten werden permanent gelöscht:"}),i.jsxs("ul",{className:"text-sm text-muted-foreground mt-2 space-y-1 list-disc list-inside",children:[i.jsx("li",{children:"Profildaten und persönliche Informationen"}),i.jsx("li",{children:"Hochgeladene Dateien (CVs, Dokumente)"}),i.jsx("li",{children:"Event-Anmeldungen und Favoriten"}),i.jsx("li",{children:"Nachrichten und Kommunikation"}),i.jsx("li",{children:"Alle weiteren personenbezogenen Daten"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs(Y,{htmlFor:"confirmation",className:"text-sm font-medium",children:["Geben Sie zur Bestätigung ein: ",i.jsx("span",{className:"font-mono text-destructive",children:"DELETE_MY_ACCOUNT"})]}),i.jsx(ie,{id:"confirmation",value:r,onChange:m=>s(m.target.value),placeholder:"DELETE_MY_ACCOUNT",className:"font-mono"})]})]})]}),i.jsxs(Xj,{className:"gap-2",children:[i.jsx($,{variant:"outline",onClick:()=>n(!1),disabled:o,children:"Abbrechen"}),i.jsx($,{variant:"destructive",onClick:d,disabled:r!=="DELETE_MY_ACCOUNT"||o,className:"gap-2",children:o?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),"Wird gelöscht..."]}):i.jsxs(i.Fragment,{children:[i.jsx(Qi,{className:"h-4 w-4"}),"Account dauerhaft löschen"]})})]})]})]})};function FD(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Aa=e=>{const{present:t,children:n}=e,r=$D(t),s=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),o=xe(r.ref,UD(s));return typeof n=="function"||r.isPresent?f.cloneElement(s,{ref:o}):null};Aa.displayName="Presence";function $D(e){const[t,n]=f.useState(),r=f.useRef({}),s=f.useRef(e),o=f.useRef("none"),a=e?"mounted":"unmounted",[l,c]=FD(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=pl(r.current);o.current=l==="mounted"?u:"none"},[l]),Be(()=>{const u=r.current,d=s.current;if(d!==e){const m=o.current,v=pl(u);e?c("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Be(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=v=>{const x=pl(r.current).includes(v.animationName);if(v.target===t&&x&&(c("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=v=>{v.target===t&&(o.current=pl(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function pl(e){return(e==null?void 0:e.animationName)||"none"}function UD(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function zD(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Rm="ScrollArea",[t1,wI]=Ws(Rm),[BD,hn]=t1(Rm),n1=f.forwardRef((e,t)=>
vendor: 1,263 bytes, lines 411-417
411{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:o=600,...a}=e,[l,c]=f.useState(null),[u,d]=f.useState(null),[h,m]=f.useState(null),[v,b]=f.useState(null),[x,w]=f.useState(null),[g,p]=f.useState(0),[y,_]=f.useState(0),[E,C]=f.useState(!1),[j,S]=f.useState(!1),k=xe(t,P=>c(P)),N=uu(s);return i.jsx(BD,{scope:n,type:r,dir:N,scrollHideDelay:o,scrollArea:l,viewport:u,onViewportChange:d,content:h,onContentChange:m,scrollbarX:v,onScrollbarXChange:b,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:x,onScrollbarYChange:w,scrollbarYEnabled:j,onScrollbarYEnabledChange:S,onCornerWidthChange:p,onCornerHeightChange:_,children:i.jsx(de.div,{dir:N,...a,ref:k,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});n1.displayName=Rm;var r1="ScrollAreaViewport",s1=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,asChild:s,nonce:o,...a}=e,l=hn(r1,n),c=f.useRef(null),u=xe(t,c,l.onViewportChange);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:`
412[data-radix-scroll-area-viewport] {
413  scrollbar-width: none;
414  -ms-overflow-style: none;
415  -webkit-overflow-scrolling: touch;
416}
417[data-radix-scroll-area-viewport]::-webkit-scrollbar {
418  display: none;
419}
420:where([data-radix-scroll-area-viewport]) {
421  display: flex;
422  flex-direction: column;
423  align-items: stretch;
424}
425:where([data-radix-scroll-area-content]) {
426  flex-grow: 1;
427}
428`},nonce:o}),i.jsx(de.div,{"data-radix-scroll-area-viewport":"",...a,asChild:s,ref:u,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:JD({asChild:s,children:r},d=>i.jsx("div",{"data-radix-scroll-area-content":"",ref:l.onContentChange,style:{minWidth:l.scrollbarXEnabled?"fit-content":void 0},children:d}))})]})});s1.displayName=r1;var Hn="ScrollAreaScrollbar",Am=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=hn(Hn,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=s,l=e.orientation==="horizontal";return f.useEffect(()=>(l?o(!0):a(!0),()=>{l?o(!1):a(!1)}),[l,o,a]),s.type==="hover"?i.jsx(WD,{...r,ref:t,forceMount:n}):s.type==="scroll"?i.jsx(VD,{...r,ref:t,forceMount:n}):s.type==="auto"?i.jsx(i1,{...r,ref:t,forceMount:n}):s.type==="always"?i.jsx(Om,{...r,ref:t}):null});Am.displayName=Hn;var WD=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=hn(Hn,e.__scopeScrollArea),[o,a]=f.useState(!1);return f.useEffect(()=>{const l=s.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),a(!0)},d=()=>{c=window.setTimeout(()=>a(!1),s.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),i.jsx(Aa,{present:n||o,children:i.jsx(i1,{"data-state":o?"visible":"hidden",...r,ref:t})})}),VD=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=hn(Hn,e.__scopeScrollArea),o=e.orientation==="horizontal",a=pu(()=>c("SCROLL_END"),100),[l,c]=zD("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return f.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,s.scrollHideDelay,c]),f.useEffect(()=>{const u=s.viewport,d=o?"scrollLeft":"scrollTop";if(u){let h=u[d];const m=()=>{const v=u[d];h!==v&&(c("SCROLL"),a()),h=v};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[s.viewport,o,c,a]),i.jsx(Aa,{present:n||l!=="hidden",children:i.jsx(Om,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:oe(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:oe(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),i1=f.forwardRef((e,t)=>{const n=hn(Hn,e.__scopeScrollArea),{forceMount:r,...s}=e,[o,a]=f.useState(!1),l=e.orientation==="horizontal",c=pu(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(l?u:d)}},10);return eo(n.viewport,c),eo(n.content,c),i.jsx(Aa,{present:r||o,children:i.jsx(Om,{"data-state":o?"visible":"hidden",...s,ref:t})})}),Om=f.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=hn(Hn,e.__scopeScrollArea),o=f.useRef(null),a=f.useRef(0),[l,c]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=u1(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:m=>a.current=m};function h(m,v){return QD(m,a.current,l,v)}return n==="horizontal"?i.jsx(HD,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const m=s.viewport.scrollLeft,v=dv(m,l,s.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollLeft=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollLeft=h(m,s.dir))}}):n==="vertical"?i.jsx(qD,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const m=s.viewport.scrollTop,v=dv(m,l);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollTop=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollTop=h(m))}}):null}),HD=f.forwardRef((e,t)=>
vendor: 4,258 bytes, line 428
428{const{sizes:n,onSizesChange:r,...s}=e,o=hn(Hn,e.__scopeScrollArea),[a,l]=f.useState(),c=f.useRef(null),u=xe(t,c,o.onScrollbarXChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),i.jsx(a1,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":mu(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(o.viewport){const m=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),h1(m,h)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:gc(a.paddingLeft),paddingEnd:gc(a.paddingRight)}})}})}),qD=f.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=hn(Hn,e.__scopeScrollArea),[a,l]=f.useState(),c=f.useRef(null),u=xe(t,c,o.onScrollbarYChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),i.jsx(a1,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":mu(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(o.viewport){const m=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),h1(m,h)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:gc(a.paddingTop),paddingEnd:gc(a.paddingBottom)}})}})}),[KD,o1]=t1(Hn),a1=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:h,...m}=e,v=hn(Hn,n),[b,x]=f.useState(null),w=xe(t,k=>x(k)),g=f.useRef(null),p=f.useRef(""),y=v.viewport,_=r.content-r.viewport,E=Xe(d),C=Xe(c),j=pu(h,10);function S(k){if(g.current){const N=k.clientX-g.current.left,P=k.clientY-g.current.top;u({x:N,y:P})}}return f.useEffect(()=>{const k=N=>{const P=N.target;(b==null?void 0:b.contains(P))&&E(N,_)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[y,b,_,E]),f.useEffect(C,[r,C]),eo(b,j),eo(v.content,j),i.jsx(KD,{scope:n,scrollbar:b,hasThumb:s,onThumbChange:Xe(o),onThumbPointerUp:Xe(a),onThumbPositionChange:C,onThumbPointerDown:Xe(l),children:i.jsx(de.div,{...m,ref:w,style:{position:"absolute",...m.style},onPointerDown:oe(e.onPointerDown,k=>{k.button===0&&(k.target.setPointerCapture(k.pointerId),g.current=b.getBoundingClientRect(),p.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),S(k))}),onPointerMove:oe(e.onPointerMove,S),onPointerUp:oe(e.onPointerUp,k=>{const N=k.target;N.hasPointerCapture(k.pointerId)&&N.releasePointerCapture(k.pointerId),document.body.style.webkitUserSelect=p.current,v.viewport&&(v.viewport.style.scrollBehavior=""),g.current=null})})})}),pc="ScrollAreaThumb",l1=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=o1(pc,e.__scopeScrollArea);return i.jsx(Aa,{present:n||s.hasThumb,children:i.jsx(GD,{ref:t,...r})})}),GD=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,o=hn(pc,n),a=o1(pc,n),{onThumbPositionChange:l}=a,c=xe(t,h=>a.onThumbChange(h)),u=f.useRef(),d=pu(()=>{u.current&&(u.current(),u.current=void 0)},100);return f.useEffect(()=>{const h=o.viewport;if(h){const m=()=>{if(d(),!u.current){const v=XD(h,l);u.current=v,l()}};return l(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,d,l]),i.jsx(de.div,{"data-state":a.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:oe(e.onPointerDownCapture,h=>{const v=h.target.getBoundingClientRect(),b=h.clientX-v.left,x=h.clientY-v.top;a.onThumbPointerDown({x:b,y:x})}),onPointerUp:oe(e.onPointerUp,a.onThumbPointerUp)})});
428l1.displayName=pc;var Dm="ScrollAreaCorner",c1=f.forwardRef((e,t)=>{const n=hn(Dm,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?i.jsx(YD,{...e,ref:t}):null});c1.displayName=Dm;var YD=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=hn(Dm,n),[o,a]=f.useState(0),[l,c]=f.useState(0),u=!!(o&&l);return eo(s.scrollbarX,()=>{var h;const d=((h=s.scrollbarX)==null?void 0:h.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),eo(s.scrollbarY,()=>{var h;const d=((h=s.scrollbarY)==null?void 0:h.offsetWidth)||0;s.onCornerWidthChange(d),a(d)}),u?i.jsx(de.div,{...r,ref:t,style:{width:o,height:l,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function gc(e){return e?parseInt(e,10):0}function u1(e,t){const n=e/t;return isNaN(n)?0:n}function mu(e){const t=u1(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function QD(e,t,n,r="ltr"){const s=mu(n),o=s/2,a=t||o,l=s-a,c=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-l,d=n.content-n.viewport,h=r==="ltr"?[0,d]:[d*-1,0];return d1([c,u],h)(e)}function dv(e,t,n="ltr"){const r=mu(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,a=t.content-t.viewport,l=o-r,c=n==="ltr"?[0,a]:[a*-1,0],u=$h(e,c);return d1([0,a],[0,l])(u)}function d1(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function h1(e,t){return e>0&&e<t}var XD=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,l=n.top!==o.top;(a||l)&&t(),n=o,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function pu(e,t){const n=Xe(e),r=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),f.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function eo(e,t){const n=Xe(t);Be(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}function JD(e,t){const{asChild:n,children:r}=e;if(!n)return typeof t=="function"?t(r):t;const s=f.Children.only(r);return f.cloneElement(s,{children:typeof t=="function"?t(s.props.children):t})}var f1=n1,ZD=s1,eM=c1;const ns=f.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(f1,{ref:r,className:ce("relative overflow-hidden",e),...n,children:[i.jsx(ZD,{className:"h-full w-full rounded-[inherit]",children:t}),i.jsx(m1,{}),i.jsx(eM,{})]}));ns.displayName=f1.displayName;const m1=f.forwardRef(({className:e,orientation:t="vertical",...n},r)=>i.jsx(Am,{ref:r,orientation:t,className:ce("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:i.jsx(l1,{className:"relative flex-1 rounded-full bg-border"})}));m1.displayName=Am.displayName;const tM=()=>{const{user:e}=Dt(),{toast:t}=Bt(),n=Wt(),[r,s]=f.useState(!1),[o,a]=f.useState(!1),[l,c]=f.useState(!1),[u,d]=f.useState(null),[h,m]=f.useState({registeredEvents:0,favoriteCompanies:0,profileCompleteness:0}),[v,b]=f.useState([]),[x,w]=f.useState([]),[g,p]=f.useState(!0);f.useEffect(()=>{e&&y()},[e]);const y=async()=>{if(e){p(!0);try{const{data:j}=await O.from("profiles").select("id, user_id").eq("user_id",e.id).single();j&&await Promise.all([_(j.id),E(j.id),C(j.id)])}catch(j){t({title:"Fehler beim Laden",description:j.message,variant:"destructive"})}finally{p(!1)}}},_=async j=>{try{const{count:S}=await O.from("event_participants").select("*",{count:"exact",head:!0}).eq("user_id",j),{count:k}=await O.from("company_favorites").select("*",{count:"exact",head:!0}).eq("user_id",j),{data:N}=await O.from("bewerber_profiles").select("*").eq("user_id",e==null?void 0:e.id).maybeSingle(),{data:P}=await O.from("profiles").select("first_name, last_name, phone").eq("id",j).single(),M=[P==null?void 0:P.first_name,P==null?void 0:P.last_name,P==null?void 0:P.phone,N==null?void 0:N.studiengang,N==null?void 0:N.semester,N==null?void 0:N.abschluss,N==null?void 0:N.linkedin_url],W=M.filter(R=>R).length,F=Math.round(W/M.length*100);m({registeredEvents:S||0,favoriteCompanies:k||0,profileCompleteness:F})}catch(S){console.error("Error loading stats:",S)}},E=async j=>{try{const{data:S}=await O.from("event_participants").select(`
429          event_id,
430          events!inner(
431            id,
432            title,
433            start_datetime,
434            end_datetime,
435            location,
436            status,
437            event_companies(
438              companies(name)
439            )
440          )
441        `).eq("user_id",j).eq("events.status","active"),k=(S||[]).sort((N,P)=>{const M=new Date(N.events.start_datetime).getTime(),W=new Date(P.events.start_datetime).getTime();return M-W});b(k)}catch(S){console.error("Error loading events:",S)}},C=async j=>{try{const{data:S}=await O.from("company_favorites").select(`
442          company_id,
443          event_id,
444          companies!inner(
445            id,
446            name,
447            description,
448            locations
449          ),
450          events!inner(
451            id,
452            title
453          )
454        `).eq("user_id",j),k=(S||[]).reduce((P,M)=>{const W=M.companies.id;return P[W]||(P[W]={...M.companies,events:[]}),P[W].events.some(R=>R.id===M.events.id)||P[W].events.push(M.events),P},{}),N=Object.values(k);w(N)}catch(S){console.error("Error loading favorite companies:",S)}};return g?i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("h2",{className:"text-3xl font-bold",children:"Mein Dashboard"}),i.jsxs($,{variant:"outline",disabled:!0,children:[i.jsx(ys,{className:"h-4 w-4 mr-2"}),"Profil bearbeiten"]})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[...Array(3)].map((j,S)=>i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsx("div",{className:"h-16 bg-muted animate-pulse rounded"})})},S))})]}):i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("h2",{className:"text-3xl font-bold",children:"Mein Dashboard"}),i.jsxs($,{variant:"outline",onClick:()=>s(!0),children:[i.jsx(ys,{className:"h-4 w-4 mr-2"}),"Profil bearbeiten"]})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(tt,{className:"h-4 w-4 text-primary"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Angemeldete Events"}),i.jsx("p",{className:"text-2xl font-bold",children:h.registeredEvents})]})]})})}),i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Yt,{className:"h-4 w-4 text-red-500"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Unternehmensfavoriten Events"}),i.jsx("p",{className:"text-2xl font-bold",children:h.favoriteCompanies})]})]})})}),i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Ds,{className:"h-4 w-4 text-green-500"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Profil Vollständigkeit"}),i.jsxs("p",{className:"text-2xl font-bold",children:[h.profileCompleteness,"%"]})]})]})})})]}),i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx(le,{children:"Nächste Schritte"}
454),i.jsx(Ae,{children:"Vervollständigen Sie Ihr Profil für bessere Matching-Ergebnisse"})]}),i.jsx(Z,{children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[i.jsxs($,{variant:"outline",className:"flex flex-col h-auto p-4",onClick:()=>s(!0),children:[i.jsx(Ds,{className:"h-6 w-6 mb-2"}),i.jsx("span",{className:"font-medium",children:"Lebenslauf hochladen"}),i.jsx("span",{className:"text-sm text-muted-foreground",children:"PDF Format"})]}),i.jsxs($,{variant:"outline",className:"flex flex-col h-auto p-4",onClick:()=>s(!0),children:[i.jsx(ys,{className:"h-6 w-6 mb-2"}),i.jsx("span",{className:"font-medium",children:"Profil vervollständigen"}),i.jsx("span",{className:"text-sm text-muted-foreground",children:"Studiengang, Note"})]}),i.jsxs($,{variant:"event",className:"flex flex-col h-auto p-4",onClick:()=>a(!0),children:[i.jsx(tt,{className:"h-6 w-6 mb-2"}),i.jsx("span",{className:"font-medium",children:"Für Events anmelden"}),i.jsx("span",{className:"text-sm text-white",children:"Nächste Messen"})]})]})})]}),i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsxs(le,{className:"flex items-center",children:[i.jsx(tt,{className:"h-5 w-5 mr-2"}),"Meine Events"]}),i.jsx(Ae,{children:"Events, für die Sie angemeldet sind"})]}),i.jsx(Z,{className:"space-y-4",children:v.length===0?i.jsx("p",{className:"text-muted-foreground text-center py-4",children:"Noch keine Events angemeldet"}):i.jsx(ns,{className:"h-80 pr-2",children:i.jsx("div",{className:"space-y-4",children:v.map(j=>{var P;const S=j.events,k=new Date(S.start_datetime),N=((P=S.event_companies)==null?void 0:P.length)||0;return i.jsxs("div",{className:"border rounded-lg p-4",children:[i.jsxs("div",{className:"flex justify-between items-start mb-2",children:[i.jsx("h4",{className:"font-semibold",children:S.title}),i.jsx(he,{variant:"secondary",children:k>new Date?"Bevorstehend":"Vergangen"})]}),i.jsxs("div",{className:"space-y-1 text-sm text-muted-foreground",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx(tt,{className:"h-3 w-3 mr-1"}),k.toLocaleDateString("de-DE")," ",k.toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})]}),i.jsxs("div",{className:"flex items-center",children:[i.jsx(Ms,{className:"h-3 w-3 mr-1"}),S.location]}),i.jsxs("div",{className:"flex items-center",children:[i.jsx(_t,{className:"h-3 w-3 mr-1"}),N," Unternehmen teilnehmend"]})]}),i.jsx($,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>n(`/events/${S.id}`),children:"Unternehmen ansehen"})]},S.id)})})})})]}),i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsxs(le,{className:"flex items-center",children:[i.jsx(Yt,{className:"h-5 w-5 mr-2"}),"Meine Favoriten"]}),i.jsx(Ae,{children:"Unternehmen, die Sie interessieren"})]}),i.jsx(Z,{className:"space-y-4",children:x.length===0?i.jsx("p",{className:"text-muted-foreground text-center py-4",children:"Noch keine Favoriten gesetzt"}):i.jsx(ns,{className:"h-80 pr-2",children:i.jsx("div",{className:"space-y-4",children:x.map(j=>i.jsxs("div",{className:"border rounded-lg p-4",children:[i.jsxs("div",{className:"flex justify-between items-start mb-2",children:[i.jsx("h4",{className:"font-semibold",children:j.name}),i.jsx(Yt,{className:"h-4 w-4 text-red-500 fill-current"})]}),j.description&&i.jsxs("p",{className:"text-sm text-muted-foreground mb-2",children:[j.description.slice(0,100),"..."]}),j.events&&j.events.length>0&&i.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:j.events.map(S=>i.jsx(he,{variant:"secondary",className:"text-xs",children:S.title},S.id))}),j.locations&&j.locations.length>0&&i.jsx("div",{className:"flex gap-2 mb-3",children:j.locations.slice(0,2).map((S,k)=>i.jsx(he,{variant:"outline",className:"text-xs",children:S},k))}),i.jsx($,{variant:"outline",size:"sm",onClick:()=>{d(j),c(!0)},children:"Kontakt aufnehmen"})]},j.id))})})})]}),i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsxs(le,{className:"flex items-center gap-2",children:[i.jsx(ys,{className:"h-5 w-5"}),"Account-Einstellungen"]}),i.jsx(Ae,{children:"Verwalten Sie Ihre Account-Einstellungen und Datenschutz"})]}),i.jsx(Z,{className:"space-y-4",children:i.jsxs("div",{className:"p-4 border border-destructive/20 rounded-lg bg-destructive/5",children:[i.jsx("h4",{className:"font-medium text-destructive mb-2",children:"Datenschutz"}),i.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Sie können Ihren Account und alle personenbezogenen Daten permanent löschen. Diese Aktion kann nicht rückgängig gemacht werden."}),i.jsx(e1,{})]})})]})]}),i.jsx(yD,{open:r,onOpenChange:s,onProfileUpdated:y}),i.jsx(wD,{open:o,onOpenChange:a,onRegistrationUpdated:y}),i.jsx(bD,{open:l,onOpenChange:c,company:u})]})};var nM="Separator",hv="horizontal",rM=["horizontal","vertical"],p1=f.forwardRef((e,t)=>
454{const{decorative:n,orientation:r=hv,...s}=e,o=sM(r)?r:hv,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return i.jsx(de.div,{"data-orientation":o,...l,...s,ref:t})});p1.displayName=nM;function sM(e){return rM.includes(e)}var g1=p1;const v1=f.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>i.jsx(g1,{ref:s,decorative:n,orientation:t,className:ce("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));v1.displayName=g1.displayName;const Oa=({bewerberId:e,open:t,onOpenChange:n})=>{const{toast:r}=Bt(),[s,o]=f.useState(null),[a,l]=f.useState(!1);f.useEffect(()=>{t&&e&&c()},[t,e]);const c=async()=>{l(!0);try{const{data:d,error:h}=await O.from("profiles").select("id, user_id, first_name, last_name, email, phone").eq("id",e).single();if(h)throw new Error("Profile not found");const{data:m,error:v}=await O.from("bewerber_profiles").select("studiengang, semester, note, abschlussnote_notenwert, abschluss, linkedin_url, lebenslauf_url, gespraechsinteresse, studienrichtung").eq("user_id",d.user_id).maybeSingle();o({id:d.id,first_name:d.first_name||"",last_name:d.last_name||"",email:d.email,phone:d.phone||void 0,studiengang:(m==null?void 0:m.studiengang)||void 0,semester:(m==null?void 0:m.semester)||void 0,note:(m==null?void 0:m.note)||void 0,abschlussnote_notenwert:(m==null?void 0:m.abschlussnote_notenwert)||void 0,abschluss:(m==null?void 0:m.abschluss)||void 0,linkedin_url:(m==null?void 0:m.linkedin_url)||void 0,lebenslauf_url:(m==null?void 0:m.lebenslauf_url)||void 0,gespraechsinteresse:(m==null?void 0:m.gespraechsinteresse)||[],studienrichtung:(m==null?void 0:m.studienrichtung)||[]})}catch(d){r({title:"Fehler beim Laden",description:d.message,variant:"destructive"})}finally{l(!1)}};if(a)return i.jsx(mt,{open:t,onOpenChange:n,children:i.jsx(lt,{className:"max-w-2xl",children:i.jsx("div",{className:"flex items-center justify-center py-8",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})})});if(!s)return i.jsx(mt,{open:t,onOpenChange:n,children:i.jsx(lt,{className:"max-w-2xl",children:i.jsx("div",{className:"text-center py-8",children:i.jsx("p",{className:"text-muted-foreground",children:"Profil konnte nicht geladen werden."})})})});const u=async()=>{if(s!=null&&s.lebenslauf_url)try{let d=s.lebenslauf_url;if(d.startsWith("http")){const v=d.indexOf("/cvs/");d=v!==-1?d.substring(v+5):d.split("/").slice(-2).join("/")}const{data:h,error:m}=await O.storage.from("cvs").createSignedUrl(d,60);if(m||!(h!=null&&h.signedUrl))throw m||new Error("Konnte signierte URL nicht erstellen");window.open(h.signedUrl,"_blank")}catch(d){r({title:"Anzeigen fehlgeschlagen",description:(d==null?void 0:d.message)||"Keine Berechtigung oder Datei nicht gefunden.",variant:"destructive"})}};return i.jsx(mt,{open:t,onOpenChange:n,children:i.jsxs(lt,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[i.jsxs(St,{children:[i.jsxs(Nt,{className:"flex items-center gap-2",children:[i.jsx(ys,{className:"h-5 w-5"}),s.first_name," ",s.last_name]}),i.jsx(Et,{children:"Bewerber-Profil und Details"})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"text-lg flex items-center gap-2",children:[i.jsx(Kf,{className:"h-5 w-5"}),"Studium"]})}),i.jsxs(Z,{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.studiengang&&i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Studiengang"}),i.jsx(he,{variant:"secondary",children:s.studiengang})]}),s.semester&&i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Semester"}),i.jsxs(he,{variant:"outline",children:[s.semester,". Semester"]})]}),s.note&&i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Note (Text)"}),i.jsxs(he,{variant:"outline",className:"flex items-center gap-1",children:[i.jsx(ng,{className:"h-3 w-3"}),s.note]})]}),s.abschlussnote_notenwert&&i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Absc
454hlussnote (Notenwert)"}),i.jsxs(he,{variant:"outline",className:"flex items-center gap-1",children:[i.jsx(ng,{className:"h-3 w-3"}),s.abschlussnote_notenwert]})]}),s.abschluss&&i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Angestrebter Abschluss"}),i.jsx(he,{variant:"outline",children:s.abschluss})]})]}),s.studienrichtung&&s.studienrichtung.length>0&&i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium mb-2",children:"Studienrichtung"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:s.studienrichtung.map(d=>i.jsx(he,{variant:"secondary",children:d},d))})]})]})]}),s.gespraechsinteresse&&s.gespraechsinteresse.length>0&&i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx(le,{className:"text-lg",children:"Gesprächsinteresse"}),i.jsx(Ae,{children:"Bereiche, für die sich der Bewerber interessiert"})]}),i.jsx(Z,{children:i.jsx("div",{className:"flex flex-wrap gap-2",children:s.gespraechsinteresse.map(d=>i.jsx(he,{variant:"default",children:d},d))})})]}),i.jsxs(J,{children:[i.jsx(ae,{children:i.jsx(le,{className:"text-lg",children:"Links & Dokumente"})}),i.jsxs(Z,{className:"space-y-4",children:[i.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.linkedin_url&&i.jsxs($,{variant:"outline",size:"sm",onClick:()=>window.open(s.linkedin_url,"_blank"),children:[i.jsx(jw,{className:"h-4 w-4 mr-2"}),"LinkedIn Profil",i.jsx(la,{className:"h-3 w-3 ml-1"})]}),s.lebenslauf_url&&i.jsxs($,{variant:"outline",size:"sm",onClick:u,children:[i.jsx(Ds,{className:"h-4 w-4 mr-2"}),"Lebenslauf (PDF)",i.jsx(la,{className:"h-3 w-3 ml-1"})]})]}),!s.linkedin_url&&!s.lebenslauf_url&&i.jsx("p",{className:"text-sm text-muted-foreground",children:"Keine Links oder Dokumente verfügbar"})]})]}),i.jsx(v1,{}),i.jsx("div",{className:"flex justify-end gap-3",children:i.jsx($,{onClick:()=>n(!1),children:"Schließen"})})]})]})})},iM=()=>{const{user:e}=Dt(),{profile:t}=qs(),{toast:n}=Bt(),[r,s]=f.useState([]),[o,a]=f.useState(!1),[l,c]=f.useState(null),[u,d]=f.useState(!1),h=(t==null?void 0:t.approved_status)==="approved";f.useEffect(()=>{e&&h&&m()},[e,h]);const m=async()=>{try{const{data:p}=await O.from("profiles").select("id").eq("user_id",e==null?void 0:e.id).single();if(!p)return;const{data:y,error:_}=await O.from("company_messages").select(`
455          id,
456          subject,
457          message,
458          sender_name,
459          sender_email,
460          created_at,
461          is_read,
462          sender_id,
463          events(title)
464        `).eq("company_id",await v(p.id)).order("created_at",{ascending:!1});if(_){console.error("Fehler beim Laden der Nachrichten:",_);return}const E=await Promise.all((y==null?void 0:y.map(async C=>{var S;let j=[];if(C.sender_id){const{data:k}=await O.from("event_participants").select("events(title)").eq("user_id",C.sender_id);j=(k==null?void 0:k.map(N=>{var P;return(P=N.events)==null?void 0:P.title}).filter(Boolean))||[]}return{id:C.id,subject:C.subject,message:C.message,sender_name:C.sender_name,sender_email:C.sender_email,created_at:C.created_at,event_title:(S=C.events)==null?void 0:S.title,is_read:C.is_read,sender_id:C.sender_id,sender_events:j}}))||[]);s(E)}catch(p){console.error("Fehler beim Laden der Nachrichten:",p)}},v=async p=>{const{data:y}=await O.from("recruiter_companies").select("company_id").eq("recruiter_id",p).single();return y==null?void 0:y.company_id},b=async p=>{try{const{error:y}=await O.from("company_messages").update({is_read:!0}).eq("id",p);if(y){console.error("Fehler beim Markieren als gelesen:",y);return}s(_=>_.map(E=>E.id===p?{...E,is_read:!0}:E))}catch(y){console.error("Fehler beim Markieren als gelesen:",y)}},x=async p=>{try{const{error:y}=await O.from("company_messages").delete().eq("id",p);if(y){console.error("Fehler beim Löschen der Nachricht:",y),n({title:"Fehler",description:"Die Nachricht konnte nicht gelöscht werden.",variant:"destructive"});return}s(_=>_.filter(E=>E.id!==p)),n({title:"Nachricht gelöscht",description:"Die Nachricht wurde erfolgreich gelöscht."})}catch(y){console.error("Fehler beim Löschen der Nachricht:",y),n({title:"Fehler",description:"Die Nachricht konnte nicht gelöscht werden.",variant:"destructive"})}},w=o?r.filter(p=>!p.is_read):r,g=p=>{c(p),d(!0)};return i.jsxs(i.Fragment,{children:[i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsxs(le,{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx(rg,{className:"h-5 w-5 mr-2"}),"Eingegangene Nachrichten"]}),r.length>0&&i.jsx($,{variant:"outline",size:"sm",onClick:()=>a(!o),className:"ml-auto",children:o?i.jsxs(i.Fragment,{children:[i.jsx(so,{className:"h-4 w-4 mr-2"}),"Alle Nachrichten einblenden"]}):i.jsxs(i.Fragment,{children:[i.jsx(yw,{className:"h-4 w-4 mr-2"}),"Gelesene ausblenden"]})})]}),i.jsxs(Ae,{children:["Nachrichten von interessierten Bewerbern",o&&` (${w.length} von ${r.length} angezeigt)`]})]}),i.jsx(Z,{className:"space-y-4",children:w.length>0?i.jsx(ns,{className:"h-80 pr-2",children:i.jsx("div",{className:"space-y-4",children:w.map(p=>i.jsxs("div",{className:"border rounded-lg p-4 space-y-3",children:[i.jsx("div",{className:"flex justify-between items-start",children:i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx("h4",{className:"font-semibold",children:p.subject}),!p.is_read&&i.jsx(he,{variant:"destructive",className:"text-xs",children:"Neu"})]}),i.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mb-2",children:[i.jsxs("span",{className:"flex items-center gap-1",children:["Von:",p.sender_id?i.jsxs($,{variant:"link",size:"sm",className:"h-auto p-0 text-sm font-medium text-primary hover:underline",onClick:()=>g(p.sender_id),children:[i.jsx(ys,{className:"h-3 w-3 mr-1"}),p.sender_name]}):i.jsx("span",{className:"font-medium",children:p.sender_name})]}),i.jsx("span",{children:p.sender_email}),i.jsx("span",{children:new Date(p.created_at).toLocaleDateString("de-DE")})]}),i.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[p.event_title&&i.jsxs(he,{variant:"secondary",children:[i.jsx(tt,{className:"h-3 w-3 mr-1"}),p.event_title]}),p.sender_events&&p.sender_events.length>0&&i.jsx(i.Fragment,{children:i.jsxs(he,{variant:"outline",className:"text-xs",children:["Teilnahme an: ",p.sender_events.join(", ")
464]})})]})]})}),i.jsx("p",{className:"text-sm bg-muted/50 p-3 rounded",children:p.message}),i.jsxs("div",{className:"flex gap-2 justify-between",children:[i.jsxs($,{size:"sm",variant:"outline",onClick:()=>{window.location.href=`mailto:${p.sender_email}`,b(p.id)},children:[i.jsx(sr,{className:"h-3 w-3 mr-1"}),"E-Mail senden"]}),i.jsxs($,{size:"sm",variant:"destructive",onClick:()=>x(p.id),children:[i.jsx(Qi,{className:"h-3 w-3 mr-1"}),"Löschen"]})]})]},p.id))})}):i.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[i.jsx(rg,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground/50"}),i.jsx("p",{children:"Keine Nachrichten vorhanden"}),i.jsx("p",{className:"text-sm",children:"Neue Bewerbernachrichten werden hier angezeigt"})]})})]}),l&&i.jsx(Oa,{bewerberId:l,open:u,onOpenChange:d})]})},oM=({open:e,onOpenChange:t})=>{const{user:n}=Dt(),[r,s]=f.useState([]),[o,a]=f.useState(new Set),[l,c]=f.useState(!1),[u,d]=f.useState(!1),[h,m]=f.useState({studienrichtung:"",minSemester:"",maxSemester:"",note:[],onlyFavorites:!1,event:"",gespraechsinteresse:""}),v=["Geisteswissenschaften","Jura","Sozialwissenschaften","BWL/Wirtschaft","MINT","Sonstige"],b=["Praktikum","Werkstudent","Vollzeit","Teilzeit","Abschlussarbeit","Direkteinstieg","Referendariat","Wissenschaftliche Mitarbeit"],[x,w]=f.useState({subject:"",message:"",recipients:[]}),[g,p]=f.useState([]);f.useEffect(()=>{e&&n&&(y(),_())},[e,n,h]);const y=async()=>{try{const{data:N}=await O.from("profiles").select("id").eq("user_id",n==null?void 0:n.id).single();if(!N)return;const{data:P}=await O.from("recruiter_companies").select("company_id").eq("recruiter_id",N.id).single();if(!P)return;const{data:M}=await O.from("event_companies").select(`
465          events!inner(id, title)
466        `).eq("company_id",P.company_id);p((M==null?void 0:M.map(W=>W.events).filter(Boolean))||[])}catch(N){console.error("Fehler beim Laden der Events:",N)}},_=async()=>{try{const{data:N}=await O.from("profiles").select("id").eq("user_id",n==null?void 0:n.id).single();if(!N)return;const{data:P}=await O.from("recruiter_companies").select("company_id").eq("recruiter_id",N.id).single();if(!P)return;let M=O.from("event_participants").select(`
467          user_id,
468          profiles!inner(id, first_name, last_name, email, user_id),
469          events!inner(id, title)
470        `);if(h.event&&h.event!=="all")M=M.eq("event_id",h.event);else{const{data:V}=await O.from("event_companies").select("event_id").eq("company_id",P.company_id),X=(V==null?void 0:V.map(ee=>ee.event_id))||[];if(X.length===0){s([]);return}M=M.in("event_id",X)}const{data:W,error:F}=await M;if(F)throw F;if(!W||W.length===0){s([]);return}const R=W.map(V=>V.profiles.user_id),L=((V,X)=>{const ee=[];for(let ve=0;ve<V.length;ve+=X)ee.push(V.slice(ve,ve+X));return ee})(R,20),I=(await Promise.all(L.map(V=>O.from("bewerber_profiles").select("user_id, studienrichtung, semester, note, gespraechsinteresse").in("user_id",V)))).flatMap(V=>V.data||[]),D=new Map((I==null?void 0:I.map(V=>[V.user_id,V]))||[]),{data:U}=await O.from("bewerber_favorites").select("bewerber_id").eq("recruiter_id",N.id),K=new Set((U==null?void 0:U.map(V=>V.bewerber_id))||[]);let q=(W==null?void 0:W.map(V=>{const X=D.get(V.profiles.user_id);return{id:V.profiles.id,first_name:V.profiles.first_name||"",last_name:V.profiles.last_name||"",email:V.profiles.email,studienrichtung:(X==null?void 0:X.studienrichtung)||[],semester:X==null?void 0:X.semester,note:X==null?void 0:X.note,event_title:V.events.title,is_favorite:K.has(V.profiles.id),gespraechsinteresse:(X==null?void 0:X.gespraechsinteresse)||[]}}))||[];const Q=new Map;for(const V of q)if(!Q.has(V.id))Q.set(V.id,V);else{const X=Q.get(V.id);Q.set(V.id,{...X,is_favorite:X.is_favorite||V.is_favorite})}q=Array.from(Q.values()),h.studienrichtung&&h.studienrichtung!=="all"&&(q=q.filter(V=>{var X;return(X=V.studienrichtung)==null?void 0:X.some(ee=>ee.toLowerCase().includes(h.studienrichtung.toLowerCase()))})),h.minSemester&&(q=q.filter(V=>V.semester&&V.semester>=parseInt(h.minSemester))),h.maxSemester&&(q=q.filter(V=>V.semester&&V.semester<=parseInt(h.maxSemester))),h.note.length>0&&(q=q.filter(V=>V.note&&h.note.some(X=>V.note.toLowerCase().includes(X.toLowerCase())))),h.onlyFavorites&&(q=q.filter(V=>V.is_favorite)),h.gespraechsinteresse&&h.gespraechsinteresse!=="all"&&(q=q.filter(V=>{var X;return(X=V.gespraechsinteresse)==null?void 0:X.some(ee=>ee.toLowerCase().includes(h.gespraechsinteresse.toLowerCase()))})),s(q)}catch(N){console.error("Fehler beim Laden der Bewerber:",N)}},E=()=>{o.size===r.length?a(new Set):a(new Set(r.map(N=>N.id)))},C=N=>{const P=new Set(o);P.has(N)?P.delete(N):P.add(N),a(P)},j=()=>{const N=r.filter(P=>o.has(P.id)).map(P=>P.email);w({subject:"",message:"",recipients:N}),c(!0)},S=()=>
470{if(!x.subject||!x.message||x.recipients.length===0){re({title:"Fehlende Angaben",description:"Bitte füllen Sie alle Felder aus und wählen Sie mindestens einen Empfänger.",variant:"destructive"});return}const N=2e3,P=`mailto:?subject=${encodeURIComponent(x.subject)}&body=${encodeURIComponent(x.message)}`,M=Math.floor((N-P.length-50)/50),W=[];for(let F=0;F<x.recipients.length;F+=Math.max(1,M))W.push(x.recipients.slice(F,F+Math.max(1,M)));if(W.length===1){const F=`${P}&bcc=${encodeURIComponent(x.recipients.join("; "))}`;window.open(F),re({title:"E-Mail-Programm geöffnet",description:`E-Mail-Entwurf mit ${x.recipients.length} BCC-Empfängern erstellt.`})}else W.forEach((F,R)=>{const A=`${P}&bcc=${encodeURIComponent(F.join("; "))}`;setTimeout(()=>window.open(A),R*500)}),re({title:"E-Mail-Programme geöffnet",description:`${W.length} E-Mail-Entwürfe erstellt (URL-Längen-Limit erreicht).`});c(!1),w({subject:"",message:"",recipients:[]}),a(new Set)},k=async()=>{if(x.recipients.length===0){re({title:"Keine Empfänger",description:"Es sind keine E-Mail-Adressen zum Kopieren vorhanden.",variant:"destructive"});return}try{await navigator.clipboard.writeText(x.recipients.join("; ")),re({title:"BCC-Adressen kopiert",description:`${x.recipients.length} E-Mail-Adressen in die Zwischenablage kopiert.`})}catch{re({title:"Fehler beim Kopieren",description:"Die E-Mail-Adressen konnten nicht kopiert werden.",variant:"destructive"})}};return i.jsxs(i.Fragment,{children:[i.jsx(mt,{open:e,onOpenChange:t,children:i.jsxs(lt,{className:"max-w-4xl max-h-[80vh] overflow-y-auto",children:[i.jsxs(St,{children:[i.jsxs(Nt,{className:"flex items-center",children:[i.jsx(_t,{className:"h-5 w-5 mr-2"}),"Bewerber filtern und kontaktieren"]}),i.jsx(Et,{children:"Filtern Sie Bewerber nach Kriterien und senden Sie Bulk-E-Mails"})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"text-lg flex items-center",children:[i.jsx(ww,{className:"h-4 w-4 mr-2"}),"Filter"]})}),i.jsxs(Z,{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"studienrichtung",children:"Studienrichtung"}),i.jsxs(ct,{value:h.studienrichtung,onValueChange:N=>m({...h,studienrichtung:N}),children:[i.jsx(rt,{children:i.jsx(ut,{placeholder:"Studienrichtung wählen"})}),i.jsxs(st,{children:[i.jsx(se,{value:"all",children:"Alle"}),v.map(N=>i.jsx(se,{value:N,children:N},N))]})]})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"gespraechsinteresse",children:"Gesprächsinteresse"}),i.jsxs(ct,{value:h.gespraechsinteresse,onValueChange:N=>m({...h,gespraechsinteresse:N}),children:[i.jsx(rt,{children:i.jsx(ut,{placeholder:"Gesprächsinteresse wählen"})}),i.jsxs(st,{children:[i.jsx(se,{value:"all",children:"Alle"}),b.map(N=>i.jsx(se,{value:N,children:N},N))]})]})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"event",children:"Event"}),i.jsxs(ct,{value:h.event,onValueChange:N=>m({...h,event:N}),children:[i.jsx(rt,{children:i.jsx(ut,{placeholder:"Alle Events"})}),i.jsxs(st,{children:[i.jsx(se,{value:"all",children:"Alle Events"}),g.map(N=>i.jsx(se,{value:N.id,children:N.title},N.id))]})]})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(or,{id:"onlyFavorites",checked:h.onlyFavorites,onCheckedChange:N=>m({...h,onlyFavorites:N})}),i.jsx(Y,{htmlFor:"onlyFavorites",children:"Nur Favoriten"})]})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"minSemester",children:"Min. Semester"}),i.jsx(ie,{id:"minSemester",type:"number",value:h.minSemester,onChange:N=>m({...h,minSemester:N.target.value}),placeholder:"1"})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"maxSemester",children:"Max. Semester"}),i.jsx(ie,{id:"maxSemester",type:"number",value:h.maxSemester,onChange:N=>m({...h,maxSemester:N.target.value}),placeholder:"10"})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"note",children:"Note (Text) - Mehrfachauswahl"}),i.jsx("div",{className:"space-y-2 mt-2",children:["sehr gut","gut","voll befriedigend (nur Jura)","befriedigend","ausreichend"].map(N=>i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(or,{id:`note-${N}`,checked:h.note.includes(N),onCheckedChange:P=>{m(P?{...h,note:[...h.note,N]}:{...h,note:h.note.filter(M=>M!==N)})}}),i.jsx(Y,{htmlFor:`note-${N}`,className:"text-sm",children:N})]},N))})]})]})]})]}),i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"text-lg flex items-center justify-between",children:[i.jsxs("span",{className:"flex items-center",children:[i.jsx(Xr,{className:"h-4 w-4 mr-2"}),"Gefilterte Bewerber (",r.length,")"]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx($,{variant:"outline",size:"sm",onClick:E,disabled:r.length===0,children:o.size===r.length?"Alle abwählen":"Alle au
470swählen"}),i.jsxs($,{size:"sm",onClick:j,disabled:o.size===0,children:[i.jsx(sr,{className:"h-4 w-4 mr-1"}),"E-Mail Entwurf (",o.size,")"]})]})]})}),i.jsx(Z,{children:i.jsxs("div",{className:"space-y-3 max-h-60 overflow-y-auto",children:[r.map(N=>i.jsxs("div",{className:"flex items-center space-x-3 p-3 border rounded",children:[i.jsx(or,{checked:o.has(N.id),onCheckedChange:()=>C(N.id)}),i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:"font-medium",children:[N.first_name," ",N.last_name]}),N.is_favorite&&i.jsx(he,{variant:"destructive",className:"text-xs",children:"Favorit"})]}),i.jsxs("div",{className:"text-sm text-muted-foreground",children:[N.email,N.studienrichtung&&N.studienrichtung.length>0&&` • ${N.studienrichtung.join(", ")}`,N.semester&&` • ${N.semester}. Semester`,N.note&&` • Note: ${N.note}`,N.gespraechsinteresse&&N.gespraechsinteresse.length>0&&` • Interesse: ${N.gespraechsinteresse.join(", ")}`]})]})]},N.id)),r.length===0&&i.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[i.jsx(_t,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground/50"}),i.jsx("p",{children:"Keine Bewerber gefunden"}),i.jsx("p",{className:"text-sm",children:"Passen Sie die Filter an oder entfernen Sie sie"})]})]})})]})]})]})}),i.jsx(mt,{open:l,onOpenChange:c,children:i.jsxs(lt,{className:"max-w-2xl",children:[i.jsxs(St,{children:[i.jsx(Nt,{children:"E-Mail Entwurf erstellen"}),i.jsxs(Et,{children:["E-Mail für ",x.recipients.length," ausgewählte Bewerber vorbereiten"]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"subject",children:"Betreff *"}),i.jsx(ie,{id:"subject",value:x.subject,onChange:N=>w({...x,subject:N.target.value}),placeholder:"E-Mail Betreff",required:!0})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"message",children:"Nachricht *"}),i.jsx(Ks,{id:"message",value:x.message,onChange:N=>w({...x,message:N.target.value}),placeholder:"Ihre Nachricht an die Bewerber...",rows:6,required:!0})]}),i.jsxs("div",{className:"bg-muted/50 p-3 rounded",children:[i.jsxs("p",{className:"text-sm font-medium mb-2",children:["Empfänger (",x.recipients.length,"):"]}),i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.recipients.slice(0,3).join(", "),x.recipients.length>3&&` und ${x.recipients.length-3} weitere`]})]}),i.jsxs("div",{className:"flex gap-2 justify-end",children:[i.jsxs($,{variant:"outline",size:"sm",onClick:k,className:"text-xs",children:[i.jsx(yE,{className:"h-3 w-3 mr-1"}),"BCC kopieren"]}),i.jsxs($,{variant:"outline",onClick:S,disabled:u,children:[i.jsx(la,{className:"h-4 w-4 mr-1"}),"Im E-Mail-Programm öffnen (BCC)"]}),i.jsx($,{variant:"outline",onClick:()=>c(!1),disabled:u,children:"Abbrechen"})]})]})]})})]})},aM=({open:e,onOpenChange:t})=>{const{user:n}=Dt(),[r,s]=f.useState({totalBewerber:0,totalFavorites:0,averageInterestPerEvent:0,topEvents:[],monthlyTrend:[],studiengang:[]}),[o,a]=f.useState("1y"),[l,c]=f.useState(!0);f.useEffect(()=>{e&&n&&u()},[e,n,o]);const u=async()=>{var d,h;c(!0);try{console.log("Current User:",n==null?void 0:n.email);const{data:m}=await O.from("profiles").select("id").eq("user_id",n==null?void 0:n.id).single();if(console.log("Profile ID:",m==null?void 0:m.id),!m)return;const{data:v}=await O.from("recruiter_companies").select("company_id").eq("recruiter_id",m.id).single();if(console.log("Recruiter Company Data:",v),console.log("Expected Company ID für TestIQB: ab3400a1-f52d-4623-af3a-668ecdbac14d"),!v)return;const b=new Date,x=new Date;switch(o){case"1m":x.setMonth(b.getMonth()-1);break;case"3m":x.setMonth(b.getMonth()-3);break;case"6m":x.setMonth(b.getMonth()-6);break;case"1y":x.setFullYear(b.getFullYear()-1);break;case"all":x.setFullYear(2020);break}console.log(`Analytics Zeitbereich: ${o}, von ${x.toISOString()} bis ${b.toISOString()}`);const[w,g,p]=await Promise.all([O.from("bewerber_favorites").select("id",{count:"exact"}).eq("recruiter_id",m.id).gte("created_at",x.toISOString()),O.from("event_companies").select("event_id").eq("company_id",v.company_id),O.from("company_favorites").select("created_at").eq("company_id",v.company_id).gte("created_at",x.toISOString())]);console.log("Raw eventsResult.data:",g.data);const y=((d=g.data)==null?void 0:d.map(A=>A.event_id))||[];console.log("Event IDs gefunden:",y);const{data:_}=y.length>0?await O.from("events").select("id, title, current_participants, created_at").in("id",y):{data:[]},E=_||[];console.log("Direkt abgefragte Events:",E),console.log("Event IDs final:",E.map(A=>A.id));const{data:C}=await O.from("event_participants").select("user_id, registered_at, event_id").in("event_id",E.map(A=>A.id)).gte("registered_at",x.toISOString()),j=C||[],S=Array.from(new Set(j.map(A=>A.user_id))),{data:k}=S.length>0?await O.from("bewerber_profiles").select("user_id, studiengang").in("user_id",S):{data:[],error:null};console.log("Events für Favoriten-Berechnung:",E.map(A=>({id:A.id,title:A.title}))),console.log("Company ID:",v.company_id);const N=await Promise.all(E.map(async A=>{const{count:L,error:T,data:I}=await O.from("company_favorites").select("id, created_at",{count:"exact"}).eq("event_id",A.id).eq("company_id",v.company_id);return console.log(`Event ${A.title} (${A.id}): ${L} Favoriten (GESAMT), Error:`,T),console.log("  - Favoriten Details:",I==null?void 0:I.map(D=>D.created_at)),{...A,favorites:L||0}})),P=[];for(let A=2;A>=0;A--){const L=new Date(b.getFullYear(),b.getMonth()-A,1),T=new Date(b.getFullYear(),b.getMonth()-A+1,0,23,59,59,999),I=L.toLocaleDateString("de-DE",{month:"short"});P.push({start:L,end:T,label:I})}const M=p.data||[],W=P.map(({start:A,end:L,label:T})=>({month:T,bewerber:j.filter(I=>{const D=new Date(I.registered_at);return D>=A&&D<=L}).length,favorites:M.filter(I=>{const D=new Date(I.created_at);return D>=A&&D<=L}).length})),F=new Map;
470(k||[]).forEach(A=>{const L=A.studiengang||"Unbekannt";F.set(L,(F.get(L)||0)+1)});const R=Array.from(F.entries()).map(([A,L])=>({name:A,count:L})).sort((A,L)=>L.count-A.count);s({totalBewerber:E.reduce((A,L)=>A+L.current_participants,0),totalFavorites:w.count||0,averageInterestPerEvent:E.length>0?Math.round((((h=p.data)==null?void 0:h.length)||0)/E.length):0,topEvents:N.sort((A,L)=>L.favorites-A.favorites).slice(0,5).map(A=>({id:A.id,title:A.title,participants:A.current_participants,favorites:A.favorites})),monthlyTrend:W,studiengang:R})}catch(m){console.error("Fehler beim Laden der Analytics:",m)}finally{c(!1)}};return f.useEffect(()=>{if(!e||!n)return;const d=O.channel(`recruiter-analytics-${n.id}`).on("postgres_changes",{event:"*",schema:"public",table:"bewerber_favorites"},()=>u()).on("postgres_changes",{event:"*",schema:"public",table:"company_favorites"},()=>u()).on("postgres_changes",{event:"*",schema:"public",table:"events"},()=>u()).on("postgres_changes",{event:"*",schema:"public",table:"event_participants"},()=>u()).on("postgres_changes",{event:"*",schema:"public",table:"event_companies"},()=>u()).on("postgres_changes",{event:"*",schema:"public",table:"bewerber_profiles"},()=>u()).subscribe();return()=>{O.removeChannel(d)}},[e,n,o]),e?i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:i.jsxs("div",{className:"bg-background rounded-lg max-w-6xl w-full max-h-[90vh] overflow-y-auto",children:[i.jsx("div",{className:"p-6 border-b",children:i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsxs("div",{children:[i.jsxs("h2",{className:"text-2xl font-bold flex items-center",children:[i.jsx(gh,{className:"h-6 w-6 mr-2"}),"Analytics Dashboard"]}),i.jsx("p",{className:"text-muted-foreground",children:"Detaillierte Einblicke in Ihr Recruiting"})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs(ct,{value:o,onValueChange:a,children:[i.jsx(rt,{className:"w-32",children:i.jsx(ut,{})}),i.jsxs(st,{children:[i.jsx(se,{value:"1m",children:"1 Monat"}),i.jsx(se,{value:"3m",children:"3 Monate"}),i.jsx(se,{value:"6m",children:"6 Monate"}),i.jsx(se,{value:"1y",children:"1 Jahr"}),i.jsx(se,{value:"all",children:"Alle Zeit"})]})]}),i.jsx("button",{onClick:()=>t(!1),className:"text-muted-foreground hover:text-foreground",children:"✕"})]})]})}),i.jsxs("div",{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(_t,{className:"h-4 w-4 text-blue-500"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Bewerber gesamt"}),i.jsx("p",{className:"text-2xl font-bold",children:r.totalBewerber})]})]})})}),i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Yt,{className:"h-4 w-4 text-red-500"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Von Ihnen favorisierte Bewerber"}),i.jsx("p",{className:"text-2xl font-bold",children:r.totalFavorites})]})]})})}),i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(so,{className:"h-4 w-4 text-purple-500"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Conversion Rate"}),i.jsxs("p",{className:"text-2xl font-bold",children:[r.totalBewerber>0?Math.round(r.totalFavorites/r.totalBewerber*100):0,"%"]})]})]})})})]}),i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsxs(le,{className:"flex items-center",children:[i.jsx(tt,{className:"h-5 w-5 mr-2"}),"Top Events nach Bewerber-Interesse"]}),i.jsx(Ae,{children:"Events bei denen Ihr Unternehmen als Favorit markiert wurde (❤️ = Bewerber haben Sie als Favorit markiert - GESAMT, nicht zeitgefiltert)"})]}),i.jsx(Z,{children:i.jsxs("div",{className:"space-y-4",children:[r.topEvents.map((d,h)=>i.jsx("div",{className:"flex items-center justify-between p-3 border rounded",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(he,{variant:"outline",className:"w-8 h-8 rounded-full flex items-center justify-center",children:h+1}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-medium",children:d.title}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:[d.participants," Teilnehmer"]})]})]})},d.id)),r.topEvents.length===0&&i.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[i.jsx(tt,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground
470/50"}),i.jsx("p",{children:"Keine Event-Daten verfügbar"})]})]})})]}),i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx(le,{children:"Bewerber nach Studiengang"}),i.jsx(Ae,{children:"Verteilung der Bewerber nach Fachrichtungen"})]}),i.jsx(Z,{children:i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:r.studiengang.map(d=>i.jsxs("div",{className:"border rounded p-3 text-center",children:[i.jsx("p",{className:"font-medium",children:d.name}),i.jsx("p",{className:"text-2xl font-bold text-primary",children:d.count}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Bewerber"})]},d.name))})})]}),i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx(le,{children:"Monatlicher Trend"}),i.jsx(Ae,{children:"Bewerber-Anmeldungen und Interesse-Markierungen für Ihr Unternehmen"})]}),i.jsx(Z,{children:i.jsx("div",{className:"space-y-4",children:r.monthlyTrend.map(d=>i.jsxs("div",{className:"flex items-center justify-between p-3 border rounded",children:[i.jsx("span",{className:"font-medium",children:d.month}),i.jsxs("div",{className:"flex gap-6",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(_t,{className:"h-4 w-4 text-blue-500"}),i.jsxs("span",{children:[d.bewerber," Bewerber"]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"h-4 w-4 text-red-500"}),i.jsxs("span",{children:[d.favorites," Interesse-Markierungen"]})]})]})]},d.month))})})]})]})]})}):null},lM=()=>{const{user:e}=Dt(),{profile:t,loading:n}=qs(),r=Wt(),[s,o]=f.useState(!1),[a,l]=f.useState(!1),[c,u]=f.useState(!1),[d,h]=f.useState(null),[m,v]=f.useState([]),[b,x]=f.useState([]),[w,g]=f.useState(!1),[p,y]=f.useState({favoriteBewerber:0,versendeteNachrichten:0,aktuelleEvents:0,interesseThisWeek:0}),[_,E]=f.useState(null),[C,j]=f.useState(!1),[S,k]=f.useState(!1),[N,P]=f.useState({name:"",description:"",website:"",linkedin:"",xing:"",other_link:"",locations:""}),M=(t==null?void 0:t.approved_status)==="approved";f.useEffect(()=>{if(e&&(A(),M&&(R(),W(),F()),M)){const D=O.channel("recruiter-dashboard-changes").on("postgres_changes",{event:"*",schema:"public",table:"event_participants"},U=>{R(),F()}).on("postgres_changes",{event:"*",schema:"public",table:"bewerber_favorites"},U=>{W(),R()}).subscribe();return()=>{O.removeChannel(D)}}},[e,M]);const W=async()=>{try{const{data:D}=await O.from("profiles").select("id").eq("user_id",e==null?void 0:e.id).single();if(!D)return;const{data:U,error:K}=await O.from("bewerber_favorites").select(`
471          id,
472          bewerber_id,
473          event_id,
474          profiles!bewerber_favorites_bewerber_id_fkey(first_name, last_name, email),
475          events(id, title)
476        `).eq("recruiter_id",D.id);if(K)throw K;const q={};U==null||U.forEach(V=>{q[V.bewerber_id]||(q[V.bewerber_id]={bewerber_id:V.bewerber_id,profiles:V.profiles,events:[]}),V.events&&q[V.bewerber_id].events.push(V.events)});const Q=Object.values(q).slice(0,5);v(Q)}catch(D){console.error("Fehler beim Laden der Favoriten:",D)}},F=async()=>{try{const{data:D}=await O.from("profiles").select("id").eq("user_id",e==null?void 0:e.id).single();if(!D)return;const{data:U}=await O.from("recruiter_companies").select("company_id").eq("recruiter_id",D.id).single();if(!U)return;const{data:K,error:q}=await O.from("event_companies").select(`
477          events!inner(
478            id,
479            title,
480            start_datetime,
481            end_datetime,
482            location,
483            status,
484            max_participants
485          )
486        `).eq("company_id",U.company_id).order("start_datetime",{ascending:!1,referencedTable:"events"});if(q)throw q;const Q=((K==null?void 0:K.map(X=>X.events).filter(Boolean))||[]).sort((X,ee)=>X.status==="active"&&ee.status!=="active"?-1:X.status!=="active"&&ee.status==="active"?1:new Date(X.start_datetime).getTime()-new Date(ee.start_datetime).getTime()),V=await Promise.all(Q.map(async X=>{const{count:ee}=await O.from("event_participants").select("*",{count:"exact",head:!0}).eq("event_id",X.id);return{...X,current_participants:ee||0}}));x(V)}catch(D){console.error("Fehler beim Laden der Events:",D)}},R=async()=>{try{const{data:D}=await O.from("profiles").select("id").eq("user_id",e==null?void 0:e.id).single();if(!D)return;const{data:U}=await O.from("recruiter_companies").select("company_id").eq("recruiter_id",D.id).single();if(!U)return;const[K,q,Q,V]=await Promise.all([O.from("bewerber_favorites").select("id",{count:"exact"}).eq("recruiter_id",D.id),O.from("notifications").select("id",{count:"exact"}).eq("created_by",D.id).not("sent_at","is",null),O.from("event_companies").select("events!inner(id)",{count:"exact"}).eq("company_id",U.company_id).eq("events.status","active"),O.from("company_favorites").select("id",{count:"exact"}).eq("company_id",U.company_id).gte("created_at",new Date(Date.now()-7*24*60*60*1e3).toISOString())]);y({favoriteBewerber:K.count||0,versendeteNachrichten:q.count||0,aktuelleEvents:Q.count||0,interesseThisWeek:V.count||0})}catch(D){console.error("Fehler beim Laden der Statistiken:",D)}},A=async()=>{try{const{data:D}=await O.from("profiles").select("id").eq("user_id",e==null?void 0:e.id).single();if(!D)return;const{data:U}=await O.from("recruiter_companies").select("company_id, companies(*)").eq("recruiter_id",D.id).single();
486U!=null&&U.companies&&h(U.companies)}catch(D){console.error("Fehler beim Laden der Unternehmensdaten:",D)}},L=async D=>{try{const{data:U}=await O.from("profiles").select("id").eq("user_id",e==null?void 0:e.id).single();if(!U)return;const{error:K}=await O.from("bewerber_favorites").delete().eq("recruiter_id",U.id).eq("bewerber_id",D);if(K)throw K;re({title:"Erfolg",description:"Bewerber wurde aus Favoriten entfernt"}),W(),R()}catch(U){console.error("Fehler beim Entfernen des Favoriten:",U),re({title:"Fehler",description:"Bewerber konnte nicht aus Favoriten entfernt werden",variant:"destructive"})}},T=()=>{d&&(P({name:d.name||"",description:d.description||"",website:d.website||"",linkedin:d.linkedin||"",xing:d.xing||"",other_link:d.other_link||"",locations:d.locations?d.locations.join(", "):""}),o(!0))},I=async D=>{if(D.preventDefault(),!!d){g(!0);try{const U={...N,locations:N.locations?N.locations.split(",").map(q=>q.trim()):[]},{error:K}=await O.from("companies").update(U).eq("id",d.id);if(K)throw K;re({title:"Erfolg",description:"Unternehmensprofil erfolgreich aktualisiert"}),o(!1),A()}catch{re({title:"Fehler",description:"Unternehmensprofil konnte nicht aktualisiert werden",variant:"destructive"})}finally{g(!1)}}};return n?i.jsx("div",{className:"flex items-center justify-center py-12",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("h2",{className:"text-3xl font-bold",children:"Recruiter Dashboard"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs($,{variant:"outline",size:"sm",onClick:()=>k(!0),children:[i.jsx(Sw,{className:"h-4 w-4 mr-2"}),"Account"]}),i.jsxs($,{onClick:T,disabled:!d,children:[i.jsx(sc,{className:"h-4 w-4 mr-2"}),"Unternehmensprofil bearbeiten"]})]})]}),!n&&t&&!M&&i.jsx(J,{className:"border-yellow-200 bg-yellow-50",children:i.jsx(Z,{className:"p-4",children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("div",{className:"h-4 w-4 rounded-full bg-yellow-500"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Freigabe ausstehend"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Ihr Account wartet noch auf die Freigabe durch einen Administrator. Bis zur Freigabe können Sie nur das Unternehmensprofil bearbeiten."})]})]})})}),M&&i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Yt,{className:"h-4 w-4 text-red-500"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Favorite Bewerber"}),i.jsx("p",{className:"text-2xl font-bold",children:p.favoriteBewerber})]})]})})}),i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(sr,{className:"h-4 w-4 text-blue-500"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Versendete Nachrichten"}),i.jsx("p",{className:"text-2xl font-bold",children:p.versendeteNachrichten})]})]})})}),i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(tt,{className:"h-4 w-4 text-green-500"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Aktuelle Events"}),i.jsx("p",{className:"text-2xl font-bold",children:p.aktuelleEvents})]})]})})}),i.jsx(J,{children:i.jsx(Z,{className:"p-4",children:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(gh,{className:"h-4 w-4 text-purple-500"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Interesse diese Woche"}),i.jsxs("p",{className:"text-2xl font-bold",children:["+",p.interesseThisWeek]})]})]})})})]}),M&&i.jsx(iM,{}),M&&i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsxs(le,{className:"flex items-center",children:[i.jsx(Yt,{className:"h-5 w-5 mr-2"}),"Meine Favoriten"]}),i.jsx(Ae,{children:"Bewerber, die Sie interessieren"})]}),i.jsx(Z,{className:"space-y-4",children:m.length>0?i.jsx(ns,{className:"h-80 pr-2",children:i.jsx("div",{className:"space-y-4",children:m.map(D=>{var U,K;return i.jsxs("div",{className:"border rounded-lg p-4",children:[i.jsxs("div",{className:"flex justify-between items-start mb-2",children:[i.jsxs("div",{children:[i.jsxs("h4",{className:"font-semibold",children:[(U=D.profiles)==null?void 0:U.first_name," ",(K=D.profiles)==null?void 0:K.last_name]}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:["Bewerber ID: ",D.bewerber_id]})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Yt,{className:"h-4 w-4 text-red-500 fill-current"}),i.jsx($,{size:"sm",variant:"ghost",onClick:()=>L(D.bewerber_id),className:"h-6 w-6 p-0 hover:bg-red-100 hover:text-red-600",title:"Aus Favoriten entfernen",children:i.jsx(Gf,{className:"h-3 w-3"})})]})]}),i.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[D.events.map(q=>i.jsx(he,{variant:"secondary",children:q.title}
486,q.id)),i.jsx(he,{variant:"outline",children:"Favorit"})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs($,{size:"sm",variant:"outline",onClick:()=>{var q;return window.open(`mailto:${(q=D.profiles)==null?void 0:q.email}`,"_blank")},children:[i.jsx(sr,{className:"h-3 w-3 mr-1"}),"Kontaktieren"]}),i.jsx($,{size:"sm",variant:"outline",onClick:()=>{E(D.bewerber_id),j(!0)},children:"Profil ansehen"})]})]},D.bewerber_id)})})}):i.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[i.jsx(Yt,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground/50"}),i.jsx("p",{children:"Noch keine Favoriten vorhanden"}),i.jsx("p",{className:"text-sm",children:"Markieren Sie interessante Bewerber als Favoriten"})]})})]}),i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsxs(le,{className:"flex items-center",children:[i.jsx(tt,{className:"h-5 w-5 mr-2"}),"Unsere Events"]}),i.jsx(Ae,{children:"Events, an denen Ihr Unternehmen teilnimmt"})]}),i.jsx(Z,{className:"space-y-4",children:b.length>0?i.jsx(ns,{className:"h-80 pr-2",children:i.jsx("div",{className:"space-y-4",children:b.map(D=>i.jsxs("div",{className:"border rounded-lg p-4",children:[i.jsxs("div",{className:"flex justify-between items-start mb-2",children:[i.jsx("h4",{className:"font-semibold",children:D.title}),i.jsx(he,{variant:D.status==="active"?"default":"secondary",children:D.status==="active"?"Aktiv":"Inaktiv"})]}),i.jsxs("p",{className:"text-sm text-muted-foreground mb-2",children:[new Date(D.start_datetime).toLocaleDateString("de-DE",{day:"2-digit",month:"long",year:"numeric"})," • ",D.location]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"text-sm",children:[i.jsx("span",{className:"font-medium",children:D.current_participants}),"/",D.max_participants," Teilnehmer"]}),i.jsxs($,{size:"sm",variant:"outline",onClick:()=>r(`/recruiter/events/${D.id}`),children:[i.jsx(la,{className:"h-3 w-3 mr-1"}),"Details ansehen"]})]})]},D.id))})}):i.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[i.jsx(tt,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground/50"}),i.jsx("p",{children:"Keine Events verfügbar"}),i.jsx("p",{className:"text-sm",children:"Ihr Unternehmen nimmt aktuell an keinen Events teil"})]})})]})]}),M&&i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx(le,{children:"Bulk-Aktionen"}),i.jsx(Ae,{children:"Effizient mit mehreren Bewerbern kommunizieren"})]}),i.jsx(Z,{children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[i.jsxs($,{variant:"outline",className:"flex flex-col h-auto p-4",onClick:()=>l(!0),children:[i.jsx(sr,{className:"h-6 w-6 mb-2"}),i.jsx("span",{className:"font-medium",children:"Bulk E-Mail"}),i.jsx("span",{className:"text-sm text-muted-foreground",children:"An gefilterte Bewerber"})]}),i.jsxs($,{variant:"outline",className:"flex flex-col h-auto p-4",onClick:()=>l(!0),children:[i.jsx(_t,{className:"h-6 w-6 mb-2"}),i.jsx("span",{className:"font-medium",children:"Filter Bewerber"}),i.jsx("span",{className:"text-sm text-muted-foreground",children:"Nach Kriterien"})]}),i.jsxs($,{variant:"outline",className:"flex flex-col h-auto p-4",onClick:()=>u(!0),children:[i.jsx(gh,{className:"h-6 w-6 mb-2"}),i.jsx("span",{className:"font-medium",children:"Analytics"}),i.jsx("span",{className:"text-sm text-muted-foreground",children:"Interesse-Statistiken"})]})]})})]}),i.jsx(mt,{open:s,onOpenChange:o,children:i.jsxs(lt,{className:"max-w-2xl",children:[i.jsxs(St,{children:[i.jsx(Nt,{children:"Unternehmensprofil bearbeiten"}),i.jsx(Et,{children:"Bearbeiten Sie die Informationen zu Ihrem Unternehmen"})]}),i.jsxs("form",{onSubmit:I,className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"name",children:"Unternehmensname *"}),i.jsx(ie,{id:"name",value:N.name,onChange:D=>P({...N,name:D.target.value}),required:!0})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"description",children:"Beschreibung"}),i.jsx(Ks,{id:"description",value:N.description,onChange:D=>P({...N,description:D.target.value}),rows:3})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"locations",children:"Standorte (durch Komma getrennt)"}),i.jsx(ie,{id:"locations",value:N.locations,onChange:D=>P({...N,locations:D.target.value}),placeholder:"Berlin, München, Hamburg"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"website",children:"Website"}),i.jsx(ie,{id:"website",type:"url",value:N.website,onChange:D=>P({...N,website:D.target.value}),placeholder:"https://example.com"})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"linkedin",children:"LinkedIn"}),i.jsx(ie,{id:"linkedin",value:N.linkedin,onChange:D=>P({...N,linkedin:D.target.value}),placeholder:"https://linkedin.com/company/..."})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"xing",children:"Karriereinformationen"}),i.jsx(ie,{id:"xing",value:N.xing,onChange:D=>P({...N,xing:D.target.value}),placeholder:"https://xing.com/companies/..."})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"other_link",children:"Weitere Informationen"}),i.jsx(ie,{id:"other_link",value:N.other_link,onChange:D=>P({...N,other_link:D.target.value})})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[i.jsx($,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Abbrechen"}),i.jsx($,{type:"submit",disabled:w,children:w?"Speichere...":"Speichern"})]})]})]})}),i.jsx(oM,{open:a,onOpenChange:l}),i.jsx(aM,{open:c,onOpenChange:u}),i.jsx(Oa,{bewerberId:_||"",open:C,onOpenChange:j}),i.jsx(mt,{open:S,onOpenChange:k,children:i.jsxs(lt,{className:"max-w-md",children:[i.jsxs(St,{children:[i.jsx(Nt,{children:"Account-Einstellungen"}),i.jsx(Et,{children:"Verwalten Sie Ihre Account-Einstellungen und Datenschutz"})]}),i.jsx("div",{className:"space-y-4",children:i.jsxs("div",{className:"p-4 border border-destructive/20 rounded-lg bg-destructive/5",children:[i.jsx("h4",{className:"font-medium text-destructive mb-2",children:"Datenschutz"}),i.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Sie können Ihren Account und alle personenbezogenen Daten permanent löschen. Diese Aktion kann nicht rückgängig gemacht werden."}),i.jsx(e1,{})]})})]})})]})};function cM(e,t=[]){let n=[];function r(o,a){const l=f.createContext(a),c=n.length;n=[...n,a];function u(h){const{scope:m,children:v,...b}=h,x=(m==null?void 0:m[e][c])||l,w=f.useMemo(()=>b,Object.values(b));return i.jsx(x.Provider,{value:w,children:v})}function d(h,m){const v=(m==null?void 0:m[e][c])||l,b=f.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const s=()=>{const o=n.map(a=>f.createContext(a));return function(l){const c=(l==null?void 0:l[e])||o;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,uM(s,...t)]}function uM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));
vendor: 5,491 bytes, line 486
486return function(o){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(o)[`__scope${u}`];return{...l,...h}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var vd="rovingFocusGroup.onEntryFocus",dM={bubbles:!1,cancelable:!0},gu="RovingFocusGroup",[Hh,x1,hM]=Wf(gu),[fM,y1]=cM(gu,[hM]),[mM,pM]=fM(gu),w1=f.forwardRef((e,t)=>i.jsx(Hh.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Hh.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(gM,{...e,ref:t})})}));w1.displayName=gu;var gM=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,m=f.useRef(null),v=xe(t,m),b=uu(o),[x=null,w]=Os({prop:a,defaultProp:l,onChange:c}),[g,p]=f.useState(!1),y=Xe(u),_=x1(n),E=f.useRef(!1),[C,j]=f.useState(0);return f.useEffect(()=>{const S=m.current;if(S)return S.addEventListener(vd,y),()=>S.removeEventListener(vd,y)},[y]),i.jsx(mM,{scope:n,orientation:r,dir:b,loop:s,currentTabStopId:x,onItemFocus:f.useCallback(S=>w(S),[w]),onItemShiftTab:f.useCallback(()=>p(!0),[]),onFocusableItemAdd:f.useCallback(()=>j(S=>S+1),[]),onFocusableItemRemove:f.useCallback(()=>j(S=>S-1),[]),children:i.jsx(de.div,{tabIndex:g||C===0?-1:0,"data-orientation":r,...h,ref:v,style:{outline:"none",...e.style},onMouseDown:oe(e.onMouseDown,()=>{E.current=!0}),onFocus:oe(e.onFocus,S=>{const k=!E.current;if(S.target===S.currentTarget&&k&&!g){const N=new CustomEvent(vd,dM);if(S.currentTarget.dispatchEvent(N),!N.defaultPrevented){const P=_().filter(A=>A.focusable),M=P.find(A=>A.active),W=P.find(A=>A.id===x),R=[M,W,...P].filter(Boolean).map(A=>A.ref.current);_1(R,d)}}E.current=!1}),onBlur:oe(e.onBlur,()=>p(!1))})})}),b1="RovingFocusGroupItem",j1=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...a}=e,l=ir(),c=o||l,u=pM(b1,n),d=u.currentTabStopId===c,h=x1(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=u;return f.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),i.jsx(Hh.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:i.jsx(de.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:oe(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:oe(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:oe(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=yM(b,u.orientation,u.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let g=h().filter(p=>p.focusable).map(p=>p.ref.current);if(x==="last")g.reverse();else if(x==="prev"||x==="next"){x==="prev"&&g.reverse();const p=g.indexOf(b.currentTarget);g=u.loop?wM(g,p+1):g.slice(p+1)}setTimeout(()=>_1(g))}})})})});j1.displayName=b1;var vM={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function xM(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yM(e,t,n){const r=xM(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return vM[r]}function _1(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function wM(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bM=w1,jM=j1;function _M(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var S1=e=>{const{present:t,children:n}=e,r=SM(t),s=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),o=xe(r.ref,NM(s));return typeof n=="function"||r.isPresent?f.cloneElement(s,{ref:o}):null};S1.displayName="Presence";function SM(e){const[t,n]=f.useState(),r=f.useRef({}),s=f.useRef(e),o=f.useRef("none"),a=e?"mounted":"unmounted",[l,c]=_M(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=gl(r.current);o.current=l==="mounted"?u:"none"},[l]),Be(()=>{const u=r.current,d=s.current;if(d!==e){const m=o.current,v=gl(u);e?c("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Be(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=v=>{const x=gl(r.current).includes(v.animationName);if(v.target===t&&x&&(c("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=v=>{v.target===t&&(o.current=gl(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function gl(e){return(e==null?void 0:e.animationName)||"none"}function NM(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}
vendor: 4,312 bytes, line 486
486var Mm="Tabs",[EM,bI]=Ws(Mm,[y1]),N1=y1(),[kM,Im]=EM(Mm),E1=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:a="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=uu(l),[h,m]=Os({prop:r,onChange:s,defaultProp:o});return i.jsx(kM,{scope:n,baseId:ir(),value:h,onValueChange:m,orientation:a,dir:d,activationMode:c,children:i.jsx(de.div,{dir:d,"data-orientation":a,...u,ref:t})})});E1.displayName=Mm;var k1="TabsList",C1=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=Im(k1,n),a=N1(n);return i.jsx(bM,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:i.jsx(de.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});C1.displayName=k1;var P1="TabsTrigger",T1=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,a=Im(P1,n),l=N1(n),c=O1(a.baseId,r),u=D1(a.baseId,r),d=r===a.value;return i.jsx(jM,{asChild:!0,...l,focusable:!s,active:d,children:i.jsx(de.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...o,ref:t,onMouseDown:oe(e.onMouseDown,h=>{!s&&h.button===0&&h.ctrlKey===!1?a.onValueChange(r):h.preventDefault()}),onKeyDown:oe(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&a.onValueChange(r)}),onFocus:oe(e.onFocus,()=>{const h=a.activationMode!=="manual";!d&&!s&&h&&a.onValueChange(r)})})})});T1.displayName=P1;var R1="TabsContent",A1=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...a}=e,l=Im(R1,n),c=O1(l.baseId,r),u=D1(l.baseId,r),d=r===l.value,h=f.useRef(d);return f.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),i.jsx(S1,{present:s||d,children:({present:m})=>i.jsx(de.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:m&&o})})});A1.displayName=R1;function O1(e,t){return`${e}-trigger-${t}`}function D1(e,t){return`${e}-content-${t}`}var CM=E1,M1=C1,I1=T1,L1=A1;const F1=CM,Lm=f.forwardRef(({className:e,...t},n)=>i.jsx(M1,{ref:n,className:ce("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Lm.displayName=M1.displayName;const Zn=f.forwardRef(({className:e,...t},n)=>i.jsx(I1,{ref:n,className:ce("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Zn.displayName=I1.displayName;const er=f.forwardRef(({className:e,...t},n)=>i.jsx(L1,{ref:n,className:ce("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));er.displayName=L1.displayName;const Gs=f.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx("table",{ref:n,className:ce("w-full caption-bottom text-sm",e),...t})}));Gs.displayName="Table";const Ys=f.forwardRef(({className:e,...t},n)=>i.jsx("thead",{ref:n,className:ce("[&_tr]:border-b",e),...t}));Ys.displayName="TableHeader";const Qs=f.forwardRef(({className:e,...t},n)=>i.jsx("tbody",{ref:n,className:ce("[&_tr:last-child]:border-0",e),...t}));Qs.displayName="TableBody";const PM=f.forwardRef(({className:e,...t},n)=>i.jsx("tfoot",{ref:n,className:ce("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));PM.displayName="TableFooter";const Zt=f.forwardRef(({className:e,...t},n)=>i.jsx("tr",{ref:n,className:ce("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Zt.displayName="TableRow";const Se=f.forwardRef(({className:e,...t},n)=>i.jsx("th",{ref:n,className:ce("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Se.displayName="TableHead";const Ne=f.forwardRef(({className:e,...t},n)=>i.jsx("td",{ref:n,className:ce("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));
vendor: 4,900 bytes, line 486
486Ne.displayName="TableCell";const TM=f.forwardRef(({className:e,...t},n)=>i.jsx("caption",{ref:n,className:ce("mt-4 text-sm text-muted-foreground",e),...t}));TM.displayName="TableCaption";function Tn(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function $s(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const $1=6048e5,RM=864e5;let AM={};function vu(){return AM}function ga(e,t){var l,c,u,d;const n=vu(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=Tn(e),o=s.getDay(),a=(o<r?7:0)+o-r;return s.setDate(s.getDate()-a),s.setHours(0,0,0,0),s}function vc(e){return ga(e,{weekStartsOn:1})}function U1(e){const t=Tn(e),n=t.getFullYear(),r=$s(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=vc(r),o=$s(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const a=vc(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function fv(e){const t=Tn(e);return t.setHours(0,0,0,0),t}function mv(e){const t=Tn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function OM(e,t){const n=fv(e),r=fv(t),s=+n-mv(n),o=+r-mv(r);return Math.round((s-o)/RM)}function DM(e){const t=U1(e),n=$s(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),vc(n)}function MM(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function IM(e){if(!MM(e)&&typeof e!="number")return!1;const t=Tn(e);return!isNaN(Number(t))}function LM(e){const t=Tn(e),n=$s(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const FM={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},$M=(e,t,n)=>{let r;const s=FM[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function xd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const UM={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zM={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},BM={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},WM={date:xd({formats:UM,defaultWidth:"full"}),time:xd({formats:zM,defaultWidth:"full"}),dateTime:xd({formats:BM,defaultWidth:"full"})},VM={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},HM=(e,t,n,r)=>VM[e];function No(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;s=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[l]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const qM={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},KM={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},GM={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},YM={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
486ay","Saturday"]},QM={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},XM={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},JM=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ZM={ordinalNumber:JM,era:No({values:qM,defaultWidth:"wide"}),quarter:No({values:KM,defaultWidth:"wide",argumentCallback:e=>e-1}),month:No({values:GM,defaultWidth:"wide"}),day:No({values:YM,defaultWidth:"wide"}),dayPeriod:No({values:QM,defaultWidth:"wide",formattingValues:XM,defaultFormattingWidth:"wide"})};function Eo(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const a=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?t4(l,h=>h.test(a)):e4(l,h=>h.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function e4(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function t4(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function n4(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(s.length);return{value:a,rest:l}}}const r4=/^(\d+)(th|st|nd|rd)?/i,s4=/\d+/i,i4={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},o4={any:[/^b/i,/^(a|c)/i]},a4={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},l4={any:[/1/i,/2/i,/3/i,/4/i]},c4={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},u4={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},d4={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},h4={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},f4={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},m4={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},p4={ordinalNumber:n4({matchPattern:r4,parsePattern:s4,valueCallback:e=>parseInt(e,10)}),era:Eo({matchPatterns:i4,defaultMatchWidth:"wide",parsePatterns:o4,defaultParseWidth:"any"}),quarter:Eo({matchPatterns:a4,defaultMatchWidth:"wide",parsePatterns:l4,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Eo({matchPatterns:c4,defaultMatchWidth:"wide",parsePatterns:u4,defaultParseWidth:"any"}),day:Eo({matchPatterns:d4,defaultMatchWidth:"wide",parsePatterns:h4,defaultParseWidth:"any"}),dayPeriod:Eo({matchPatterns:f4,defaultMatchWidth:"any",parsePatterns:m4,defaultParseWidth:"any"})},g4={code:"en-US",formatDistance:$M,formatLong:WM,formatRelative:HM,localize:ZM,match:p4,options:{weekStartsOn:0,firstWeekContainsDate:1}};function v4(e){const t=Tn(e);return OM(t,LM(t))+1}function x4(e){const t=Tn(e),n=+vc(t)-+DM(t);return Math.round(n/$1)+1}function z1(e,t){var d,h,m,v;const n=Tn(e),r=n.getFullYear(),s=vu(),o=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((v=(m=s.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=$s(e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const l=ga(a,t),c=$s(e,0);c.setFullYear(r,0,o),c.setHours(0,0,0,0);const u=ga(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function y4(e,t){var l,c,u,d;const n=vu(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=z1(e,t),o=$s(e,0);return o.setFullYear(s,0,r),o.setHours(0,0,0,0),ga(o,t)}function w4(e,t){const n=Tn(e),r=+ga(n,t)-+y4(n,t);return Math.round(r/$1)+1}function Pe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const jr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Pe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Pe(n+1,2)},d(e,t){return Pe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Pe(e.getHours()%12||12,t.length)},H(e,t){return Pe(e.getHours(),t.length)},m(e,t){return Pe(e.getMinutes(),t.length)},s(e,t){return Pe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return Pe(s,t.length)}},li={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pv={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return jr.y(e,t)},Y:function(e,t,n,r){const s=z1(e,r),o=s>0?s:1-s;if(t==="YY"){const a=o%100;return Pe(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}
vendor: 4,174 bytes, line 486
486):Pe(o,t.length)},R:function(e,t){const n=U1(e);return Pe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Pe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Pe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Pe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return jr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Pe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=w4(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):Pe(s,t.length)},I:function(e,t,n){const r=x4(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Pe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):jr.d(e,t)},D:function(e,t,n){const r=v4(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Pe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Pe(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Pe(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return Pe(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=li.noon:r===0?s=li.midnight:s=r/12>
vendor: 4,402 bytes, line 486
486=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=li.evening:r>=12?s=li.afternoon:r>=4?s=li.morning:s=li.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return jr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):jr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Pe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Pe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):jr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):jr.s(e,t)},S:function(e,t){return jr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return vv(r);case"XXXX":case"XX":return ms(r);case"XXXXX":case"XXX":default:return ms(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return vv(r);case"xxxx":case"xx":return ms(r);case"xxxxx":case"xxx":default:return ms(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+gv(r,":");case"OOOO":default:return"GMT"+ms(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+gv(r,":");case"zzzz":default:return"GMT"+ms(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Pe(r,t.length)},T:function(e,t,n){const r=e.getTime();return Pe(r,t.length)}};function gv(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),o=r%60;return o===0?n+String(s):n+String(s)+t+Pe(o,2)}function vv(e,t){return e%60===0?(e>0?"-":"+")+Pe(Math.abs(e)/60,2):ms(e,t)}function ms(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Pe(Math.trunc(r/60),2),o=Pe(r%60,2);return n+s+t+o}const xv=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},B1=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},b4=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return xv(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",xv(r,t)).replace("{{time}}",B1(s,t))},j4={p:B1,P:b4},_4=/^D+$/,S4=/^Y+$/,N4=["D","DD","YY","YYYY"];function E4(e){return _4.test(e)}function k4(e){return S4.test(e)}function C4(e,t,n){const r=P4(e,t,n);if(console.warn(r),N4.includes(e))throw new RangeError(r)}function P4(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const T4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,R4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,A4=/^'([^]*?)'?$/,O4=/''/g,D4=/[a-zA-Z]/;function ar(e,t,n){var d,h,m,v;const r=vu(),s=r.locale??g4,o=r.firstWeekContainsDate??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,a=r.weekStartsOn??((v=(m=r.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??0,l=Tn(e);if(!IM(l))throw new RangeError("Invalid time value");let c=t.match(R4).map(b=>{const x=b[0];if(x==="p"||x==="P"){const w=j4[x];return w(b,s.formatLong)}return b}).join("").match(T4).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const x=b[0];if(x==="'")return{isToken:!1,value:M4(b)};if(pv[x])return{isToken:!0,value:b};
486if(x.match(D4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:b}});s.localize.preprocessor&&(c=s.localize.preprocessor(l,c));const u={firstWeekContainsDate:o,weekStartsOn:a,locale:s};return c.map(b=>{if(!b.isToken)return b.value;const x=b.value;(k4(x)||E4(x))&&C4(x,t,String(e));const w=pv[x[0]];return w(l,x,s.localize,u)}).join("")}function M4(e){const t=e.match(A4);return t?t[1].replace(O4,"'"):e}const I4=({eventId:e,open:t,onOpenChange:n})=>{const[r,s]=f.useState([]),[o,a]=f.useState([]),[l,c]=f.useState(!0),[u,d]=f.useState(!1),[h,m]=f.useState("");f.useEffect(()=>{t&&v()},[t,e]);const v=async()=>{try{const{data:w,error:g}=await O.from("companies").select("id, name, description").order("name");if(g)throw g;const{data:p,error:y}=await O.from("event_companies").select("company_id").eq("event_id",e);if(y)throw y;s(w||[]),a((p==null?void 0:p.map(_=>_.company_id))||[])}catch{re({title:"Fehler",description:"Daten konnten nicht geladen werden",variant:"destructive"})}finally{c(!1)}},b=w=>{a(g=>g.includes(w)?g.filter(p=>p!==w):[...g,w])},x=async()=>{d(!0);try{if(await O.from("event_companies").delete().eq("event_id",e),o.length>0){const w=o.map(p=>({event_id:e,company_id:p})),{error:g}=await O.from("event_companies").insert(w);if(g)throw g}re({title:"Erfolg",description:"Unternehmen erfolgreich zugeordnet"}),n(!1)}catch{re({title:"Fehler",description:"Unternehmen konnten nicht zugeordnet werden",variant:"destructive"})}finally{d(!1)}};return i.jsx(mt,{open:t,onOpenChange:n,children:i.jsxs(lt,{className:"max-w-md",children:[i.jsxs(St,{children:[i.jsxs(Nt,{className:"flex items-center gap-2",children:[i.jsx(Yi,{className:"h-5 w-5"}),"Unternehmen zuordnen"]}),i.jsx(Et,{children:"Wählen Sie die Unternehmen aus, die an diesem Event teilnehmen sollen."})]}),l?i.jsx("div",{className:"flex justify-center py-8",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative mb-4",children:[i.jsx(Xr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(ie,{placeholder:"Unternehmen suchen...",value:h,onChange:w=>m(w.target.value),className:"pl-9"})]}),i.jsx(ns,{className:"max-h-80",children:i.jsxs("div",{className:"space-y-3",children:[r.filter(w=>w.name.toLowerCase().includes(h.toLowerCase())||w.description&&w.description.toLowerCase().includes(h.toLowerCase())).map(w=>i.jsxs("div",{className:"flex items-start space-x-3",children:[i.jsx(or,{id:w.id,checked:o.includes(w.id),onCheckedChange:()=>b(w.id)}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("label",{htmlFor:w.id,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:w.name}),w.description&&i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:w.description})]})]},w.id)),r.filter(w=>w.name.toLowerCase().includes(h.toLowerCase())||w.description&&w.description.toLowerCase().includes(h.toLowerCase())).length===0&&i.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:h?"Keine Unternehmen gefunden":"Keine Unternehmen verfügbar"})]})}),i.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[i.jsx($,{variant:"outline",onClick:()=>n(!1),disabled:u,children:"Abbrechen"}),i.jsx($,{onClick:x,disabled:u,children:u?"Speichere...":"Speichern"})]})]})]})})},L4=()=>{const e=Wt(),[t,n]=f.useState([]),[r,s]=f.useState(!0),[o,a]=f.useState(!1),[l,c]=f.useState(null),[u,d]=f.useState(!1),[h,m]=f.useState(""),[v,b]=f.useState({title:"",description:"",location:"",event_type:"",start_datetime:"",end_datetime:"",target_audience:"",status:"draft",max_participants:100,contact_email:"",contact_phone:""});f.useEffect(()=>{x()},[]);const x=async()=>{try{const{data:j,error:S}=await O.from("events").select("*").order("start_datetime",{ascending:!0});if(S)throw S;n(j||[])}catch{re({title:"Fehler",description:"Events konnten nicht geladen werden",variant:"destructive"})}finally{s(!1)}},w=async j=>{j.preventDefault();try{const S={...v,start_datetime:new Date(v.start_datetime).toISOString(),end_datetime:new Date(v.end_datetime).toISOString()};if(l){const{error:k}=await O.from("events").update(S).eq("id",l.id);if(k)throw k;re({title:"Erfolg",description:"Event erfolgreich aktualisiert"})}else{const{error:k}=await O.from("events").insert([S]);if(k)throw k;re({title:"Erfolg",description:"Event erfolgreich erstellt"})}a(!1),c(null),y(),x()}catch{re({title:"Fehler",description:"Event konnte nicht gespeichert werden",variant:"destructive"})}},g=j=>{c(j);const S=new Date(j.start_datetime),k=new Date(j.end_datetime),N=P=>{const M=P.getFullYear(),W=String(P.getMonth()+1).padStart(2,"0"),F=String(P.getDate()).padStart(2,"0"),R=String(P.getHours()).padStart(2,"0"),A=String(P.getMinutes()).padStart(2,"0");return`${M}-${W}-${F}T${R}:${A}`};
486b({title:j.title,description:j.description||"",location:j.location,event_type:j.event_type,start_datetime:N(S),end_datetime:N(k),target_audience:j.target_audience||"",status:j.status,max_participants:j.max_participants,contact_email:j.contact_email||"",contact_phone:j.contact_phone||""}),a(!0)},p=async j=>{if(confirm("Sind Sie sicher, dass Sie dieses Event löschen möchten?"))try{const{error:S}=await O.from("events").delete().eq("id",j);if(S)throw S;re({title:"Erfolg",description:"Event erfolgreich gelöscht"}),x()}catch{re({title:"Fehler",description:"Event konnte nicht gelöscht werden",variant:"destructive"})}},y=()=>{b({title:"",description:"",location:"",event_type:"",start_datetime:"",end_datetime:"",target_audience:"",status:"draft",max_participants:100,contact_email:"",contact_phone:""})},_=()=>{y(),c(null),a(!0)},E=j=>{m(j),d(!0)},C=async(j,S)=>{const k=S==="active"?"draft":"active";try{const{error:N}=await O.from("events").update({status:k}).eq("id",j);if(N)throw N;re({title:"Erfolg",description:`Event ${k==="active"?"aktiviert":"deaktiviert"}`}),x()}catch{re({title:"Fehler",description:"Status konnte nicht geändert werden",variant:"destructive"})}};return r?i.jsx("div",{children:"Lade Events..."}):i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"Event Verwaltung"}),i.jsxs(mt,{open:o,onOpenChange:a,children:[i.jsx(lu,{asChild:!0,children:i.jsxs($,{onClick:_,className:"flex items-center gap-2",children:[i.jsx($c,{className:"h-4 w-4"}),"Neues Event"]})}),i.jsxs(lt,{className:"max-w-2xl",children:[i.jsxs(St,{children:[i.jsx(Nt,{children:l?"Event bearbeiten":"Neues Event erstellen"}),i.jsx(Et,{children:"Erstellen oder bearbeiten Sie Event-Details mit automatischer Versionierung"})]}),i.jsxs("form",{onSubmit:w,className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"title",children:"Titel *"}),i.jsx(ie,{id:"title",value:v.title,onChange:j=>b({...v,title:j.target.value}),required:!0})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"event_type",children:"Event-Typ *"}),i.jsx(ie,{id:"event_type",value:v.event_type,onChange:j=>b({...v,event_type:j.target.value}),required:!0})]})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"description",children:"Beschreibung"}),i.jsx(Ks,{id:"description",value:v.description,onChange:j=>b({...v,description:j.target.value})})]}),i.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"start_datetime",children:"Start (Datum & Zeit) *"}),i.jsx(ie,{id:"start_datetime",type:"datetime-local",value:v.start_datetime,onChange:j=>b({...v,start_datetime:j.target.value}),required:!0})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"end_datetime",children:"Ende (Datum & Zeit) *"}),i.jsx(ie,{id:"end_datetime",type:"datetime-local",value:v.end_datetime,onChange:j=>b({...v,end_datetime:j.target.value}),required:!0})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"max_participants",children:"Max. Teilnehmer"}),i.jsx(ie,{id:"max_participants",type:"number",value:v.max_participants,onChange:j=>b({...v,max_participants:parseInt(j.target.value)})})]})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"location",children:"Ort *"}),i.jsx(ie,{id:"location",value:v.location,onChange:j=>b({...v,location:j.target.value}),required:!0})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"target_audience",children:"Zielgruppe"}),i.jsx(ie,{id:"target_audience",value:v.target_audience,onChange:j=>b({...v,target_audience:j.target.value}),placeholder:"z.B. Studierende, Absolventen, Berufserfahrene"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"contact_email",children:"Kontakt E-Mail"}),i.jsx(ie,{id:"contact_email",type:"email",value:v.contact_email,onChange:j=>b({...v,contact_email:j.target.value})})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"contact_phone",children:"Kontakt Telefon"}),i.jsx(ie,{id:"contact_phone",value:v.contact_phone,onChange:j=>b({...v,contact_phone:j.target.value})})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[i.jsx($,{type:"button",variant:"outline",onClick:()=>a(!1),children:"Abbrechen"}),i.jsx($,{type:"submit",children:l?"Aktualisieren":"Erstellen"})]})]})]})]})]}),i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"flex items-center gap-2",children:[i.jsx(tt,{className:"h-5 w-5"}),"Events (",t.length,")"]})}),i.jsx(Z,{children:i.jsxs(Gs,{children:[i.jsx(Ys,{children:i.jsxs(Zt,{children:[i.jsx(Se,{children:"Titel"}),i.jsx(Se,{children:"Datum"}),i.jsx(Se,{children:"Ort"}),i.jsx(Se,{children:"Status"}),i.jsx(Se,{children:"Teilnehmer"}),i.jsx(Se,{children:"Aktionen"})]})}),i.jsx(Qs,{children:t.map(j=>i.jsxs(Zt,{children:[i.jsx(Ne,{className:"font-medium",children:j.title}),i.jsxs(Ne,{children:[ar(new Date(j.start_datetime),"dd.MM.yyyy HH:mm"),j.end_datetime&&` - ${ar(new Date(j.end_datetime),"dd.MM.yyyy HH:mm")}`]}),i.jsxs(Ne,{className:"flex items-center gap-1",children:[i.jsx(Ms,{className:"h-4 w-4 text-muted-foreground"}),j.location]}),i.jsx(Ne,{children:i.jsx(he,{variant:j.status==="active"?"default":"secondary",children:j.status})}),i.jsxs(Ne,{className:"flex items-center gap-1",children:[i.jsx(_t,{className:"h-4 w-4 text-muted-foreground"}),j.current_participants,"/",j.max_participants]}),i.jsx(Ne,{children:i.jsxs("div",{className:"flex gap-2",children:[i.jsx($,{size:"sm",variant:j.status==="active"?"default":"outline",onClick:()=>C(j.id,j.status),title:j.status==="active"?"Event deaktivieren":"Event aktivieren",children:j.status==="active"?i.jsx(AE,{className:"h-4 w-4"}):i.jsx(RE,{className:"h-4 w-4"})}),i.jsx($,{size:"sm",variant:"outline",onClick:()=>g(j),children:i.jsx(Nw,{className:"h-4 w-4"})}),i.jsx($,{size:"sm",variant:"outline",onClick:()=>e(`/admin/events/${j.id}/participants`),title:"Bewerberliste anzeigen",children:i.jsx(NE,{className:"h-4 w-4"})}),i.jsx($,{size:"sm",variant:"secondary",onClick:()=>E(j.id),children:i.jsx(Yi,{className:"h-4 w-4"})}),i.jsx($,{size:"sm",variant:"destructive",onClick:()=>p(j.id),children:i.jsx(Qi,{className:"h-4 w-4"})})]})})]},j.id))})]})})]}),i.jsx(I4,{eventId:h,open:u,onOpenChange:d})]})},F4=({companyId:e,open:t,onOpenChange:n})=>{const[r,s]=f.useState([]),[o,a]=f.useState([]),[l,c]=f.useState(!0),[u,d]=f.useState(!1),[h,m]=f.useState(""),v=f.useMemo(()=>
486{if(!h.trim())return r;const g=h.toLowerCase();return r.filter(p=>{const y=`${p.first_name||""} ${p.last_name||""}`.toLowerCase(),_=p.email.toLowerCase();return y.includes(g)||_.includes(g)})},[r,h]);f.useEffect(()=>{t&&e?b():t||m("")},[t,e]);const b=async()=>{c(!0);try{const{data:g,error:p}=await O.from("profiles").select("id, first_name, last_name, email").eq("role","recruiter").order("last_name");if(p)throw p;const{data:y,error:_}=await O.from("recruiter_companies").select("recruiter_id").eq("company_id",e);if(_)throw _;s(g||[]),a((y==null?void 0:y.map(E=>E.recruiter_id))||[])}catch{re({title:"Fehler",description:"Daten konnten nicht geladen werden",variant:"destructive"})}finally{c(!1)}},x=g=>{a(p=>p.includes(g)?p.filter(y=>y!==g):[...p,g])},w=async()=>{d(!0);try{if(await O.from("recruiter_companies").delete().eq("company_id",e),o.length>0){const g=o.map(y=>({recruiter_id:y,company_id:e})),{error:p}=await O.from("recruiter_companies").insert(g);if(p)throw p}re({title:"Erfolg",description:"Personen erfolgreich zugeordnet"}),n(!1)}catch{re({title:"Fehler",description:"Zuordnung fehlgeschlagen",variant:"destructive"})}finally{d(!1)}};return i.jsx(mt,{open:t,onOpenChange:n,children:i.jsxs(lt,{className:"max-w-md",children:[i.jsxs(St,{children:[i.jsxs(Nt,{className:"flex items-center gap-2",children:[i.jsx(_t,{className:"h-5 w-5"}),"Personen zuordnen"]}),i.jsx(Et,{children:"Wählen Sie die Personen aus, die diesem Unternehmen zugeordnet werden sollen."})]}),l?i.jsx("div",{className:"flex justify-center py-8",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative",children:[i.jsx(Xr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4"}),i.jsx(ie,{placeholder:"Nach Name oder E-Mail suchen...",value:h,onChange:g=>m(g.target.value),className:"pl-10"})]}),i.jsx(ns,{className:"max-h-80",children:i.jsxs("div",{className:"space-y-3",children:[v.map(g=>i.jsxs("div",{className:"flex items-start space-x-3",children:[i.jsx(or,{id:g.id,checked:o.includes(g.id),onCheckedChange:()=>x(g.id)}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("label",{htmlFor:g.id,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:(g.first_name||"")+" "+(g.last_name||"")}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:g.email})]})]},g.id)),v.length===0&&r.length>0&&i.jsxs("p",{className:"text-sm text-muted-foreground text-center py-4",children:['Keine Personen gefunden für "',h,'"']}),r.length===0&&i.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"Keine Personen verfügbar"})]})}),i.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[i.jsx($,{variant:"outline",onClick:()=>n(!1),disabled:u,children:"Abbrechen"}),i.jsx($,{onClick:w,disabled:u,children:u?"Speichere...":"Speichern"})]})]})]})})},$4=()=>{const[e,t]=f.useState([]),[n,r]=f.useState([]),[s,o]=f.useState([]),[a,l]=f.useState(!0),[c,u]=f.useState(!1),[d,h]=f.useState(null),[m,v]=f.useState(""),[b,x]=f.useState(""),[w,g]=f.useState({name:"",description:"",website:"",linkedin:"",xing:"",other_link:"",locations:""}),[p,y]=f.useState(!1),[_,E]=f.useState(null);f.useEffect(()=>{C(),j()},[]),f.useEffect(()=>{C()},[m]),f.useEffect(()=>{S()},[e,b]);const C=async()=>{try{let R=O.from("companies").select("*");m&&m!=="all"&&(R=O.from("companies").select(`
487            *,
488            event_companies!inner(event_id)
489          `).eq("event_companies.event_id",m));const{data:A,error:L}=await R.order("created_at",{ascending:!1});if(L)throw L;t(A||[]),r(A||[])}catch{re({title:"Fehler",description:"Unternehmen konnten nicht geladen werden",variant:"destructive"})}finally{l(!1)}},j=async()=>{try{const{data:R,error:A}=await O.from("events").select("id, title").order("start_datetime",{ascending:!0});if(A)throw A;o(R||[])}catch(R){console.error("Events konnten nicht geladen werden:",R)}},S=()=>{if(!b.trim()){r(e);return}const R=e.filter(A=>{const L=b.toLowerCase();return A.name.toLowerCase().includes(L)||A.description&&A.description.toLowerCase().includes(L)||A.locations&&A.locations.some(T=>T.toLowerCase().includes(L))||A.website&&A.website.toLowerCase().includes(L)});r(R)},k=async R=>{R.preventDefault();try{const A={...w,locations:w.locations?w.locations.split(",").map(L=>L.trim()):[]};if(d){const{error:L}=await O.from("companies").update(A).eq("id",d.id);if(L)throw L;re({title:"Erfolg",description:"Unternehmen erfolgreich aktualisiert"})}else{const{error:L}=await O.from("companies").insert([A]);if(L)throw L;re({title:"Erfolg",description:"Unternehmen erfolgreich erstellt"})}u(!1),h(null),M(),C()}catch{re({title:"Fehler",description:"Unternehmen konnte nicht gespeichert werden",variant:"destructive"})}},N=R=>{h(R),g({name:R.name,description:R.description||"",website:R.website||"",linkedin:R.linkedin||"",xing:R.xing||"",other_link:R.other_link||"",locations:R.locations?R.locations.join(", "):""}),u(!0)}
489,P=async R=>{if(confirm("Sind Sie sicher, dass Sie dieses Unternehmen löschen möchten?"))try{const{error:A}=await O.from("companies").delete().eq("id",R);if(A)throw A;re({title:"Erfolg",description:"Unternehmen erfolgreich gelöscht"}),C()}catch{re({title:"Fehler",description:"Unternehmen konnte nicht gelöscht werden",variant:"destructive"})}},M=()=>{g({name:"",description:"",website:"",linkedin:"",xing:"",other_link:"",locations:""})},W=()=>{M(),h(null),u(!0)},F=R=>{E(R),y(!0)};return a?i.jsx("div",{children:"Lade Unternehmen..."}):i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"Unternehmen Verwaltung"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs("div",{className:"relative",children:[i.jsx(Xr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(ie,{placeholder:"Unternehmen suchen...",value:b,onChange:R=>x(R.target.value),className:"pl-10 w-64"})]}),i.jsxs(ct,{value:m,onValueChange:v,children:[i.jsx(rt,{className:"w-[200px]",children:i.jsx(ut,{placeholder:"Event auswählen"})}),i.jsxs(st,{children:[i.jsx(se,{value:"all",children:"Alle Unternehmen"}),s.map(R=>i.jsx(se,{value:R.id,children:R.title},R.id))]})]}),i.jsxs(mt,{open:c,onOpenChange:u,children:[i.jsx(lu,{asChild:!0,children:i.jsxs($,{onClick:W,className:"flex items-center gap-2",children:[i.jsx($c,{className:"h-4 w-4"}),"Neues Unternehmen"]})}),i.jsxs(lt,{className:"max-w-2xl",children:[i.jsxs(St,{children:[i.jsx(Nt,{children:d?"Unternehmen bearbeiten":"Neues Unternehmen erstellen"}),i.jsx(Et,{children:"Erstellen oder bearbeiten Sie Unternehmensinformationen"})]}),i.jsxs("form",{onSubmit:k,className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"name",children:"Unternehmensname *"}),i.jsx(ie,{id:"name",value:w.name,onChange:R=>g({...w,name:R.target.value}),required:!0})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"description",children:"Beschreibung"}),i.jsx(Ks,{id:"description",value:w.description,onChange:R=>g({...w,description:R.target.value}),rows:3})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"locations",children:"Standorte (durch Komma getrennt)"}),i.jsx(ie,{id:"locations",value:w.locations,onChange:R=>g({...w,locations:R.target.value}),placeholder:"Berlin, München, Hamburg"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"website",children:"Website"}),i.jsx(ie,{id:"website",type:"url",value:w.website,onChange:R=>g({...w,website:R.target.value}),placeholder:"https://example.com"})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"linkedin",children:"LinkedIn"}),i.jsx(ie,{id:"linkedin",value:w.linkedin,onChange:R=>g({...w,linkedin:R.target.value}),placeholder:"https://linkedin.com/company/..."})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"xing",children:"Karriereinformationen"}),i.jsx(ie,{id:"xing",value:w.xing,onChange:R=>g({...w,xing:R.target.value}),placeholder:"https://xing.com/companies/..."})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"other_link",children:"Weitere Informationen"}),i.jsx(ie,{id:"other_link",value:w.other_link,onChange:R=>g({...w,other_link:R.target.value})})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[i.jsx($,{type:"button",variant:"outline",onClick:()=>u(!1),children:"Abbrechen"}),i.jsx($,{type:"submit",children:d?"Aktualisieren":"Erstellen"})]})]})]})]})]})]}),i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"flex items-center gap-2",children:[i.jsx(Yi,{className:"h-5 w-5"}),"Unternehmen (",n.length,b&&` von ${e.length}`,")"]})}),i.jsx(Z,{children:i.jsxs(Gs,{children:[i.jsx(Ys,{children:i.jsxs(Zt,{children:[i.jsx(Se,{children:"Name"}),i.jsx(Se,{children:"Standorte"}),i.jsx(Se,{children:"Links"}),i.jsx(Se,{children:"Aktionen"})]})}),i.jsx(Qs,{children:n.map(R=>i.jsxs(Zt,{children:[i.jsx(Ne,{className:"font-medium",children:i.jsxs("div",{children:[i.jsx("div",{children:R.name}),R.description&&i.jsx("div",{className:"text-sm text-muted-foreground truncate max-w-xs",children:R.description})]})}),i.jsx(Ne,{children:R.locations&&R.locations.length>0?i.jsxs("div",{className:"flex flex-wrap gap-1",children:[R.locations.slice(0,2).map((A,L)=>i.jsx("span",{className:"text-xs bg-muted px-2 py-1 rounded",children:A},L)),R.locations.length>2&&i.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",R.locations.length-2]})]}):i.jsx("span",{className:"text-muted-foreground",children:"Keine Angabe"})}),i.jsx(Ne,{children:i.jsxs("div",{className:"flex gap-1",children:[R.website&&i.jsx(SE,{className:"h-4 w-4 text-muted-foreground"}),R.linkedin&&i.jsx("span",{className:"text-xs text-blue-600",children:"LI"}),R.xing&&i.jsx("span",{className:"text-xs text-green-600",children:"X"})]})}),i.jsx(Ne,{children:i.jsxs("div",{className:"flex gap-2",children:[i.jsx($,{size:"sm",variant:"outline",onClick:()=>N(R),children:i.jsx(Nw,{className:"h-4 w-4"})}),i.jsx($,{size:"sm",variant:"outline",onClick:()=>F(R),title:"Personen zuordnen",children:i.jsx(DE,{className:"h-4 w-4"})}),i.jsx($,{size:"sm",variant:"destructive",onClick:()=>
489P(R.id),children:i.jsx(Qi,{className:"h-4 w-4"})})]})})]},R.id))})]})})]}),i.jsx(F4,{companyId:(_==null?void 0:_.id)||"",open:p,onOpenChange:R=>{y(R),R||E(null)}})]})},U4=()=>{const[e,t]=f.useState([]),[n,r]=f.useState([]),[s,o]=f.useState([]),[a,l]=f.useState(!0),[c,u]=f.useState(""),[d,h]=f.useState("all"),[m,v]=f.useState(""),[b,x]=f.useState([]),[w,g]=f.useState(new Map),[p,y]=f.useState(!1),[_,E]=f.useState(""),[C,j]=f.useState(""),[S,k]=f.useState(!1),[N,P]=f.useState(""),[M,W]=f.useState(""),[F,R]=f.useState(""),[A,L]=f.useState(null);f.useEffect(()=>{T(),D(),U(),K()},[]),f.useEffect(()=>{if(c.length>=2){const z=setTimeout(()=>{I(c)},300);return()=>clearTimeout(z)}else L(null)},[c]),f.useEffect(()=>{q()},[e,c,d,m,w,b,M,F,A]);const T=async()=>{try{const{data:z,error:te}=await O.from("profiles").select("*").order("created_at",{ascending:!1});if(te)throw te;t(z||[])}catch{re({title:"Fehler",description:"Benutzer konnten nicht geladen werden",variant:"destructive"})}finally{l(!1)}},I=async z=>{try{const te=z.replace(/%/g,""),{data:be,error:De}=await O.from("profiles").select("*").or(`first_name.ilike.%${te}%,last_name.ilike.%${te}%,email.ilike.%${te}%`).order("created_at",{ascending:!1}).limit(200);if(De)throw De;L(be||[])}catch(te){console.error("Server-Suche fehlgeschlagen:",te),L(null)}},D=async()=>{try{const{data:z,error:te}=await O.from("companies").select("id, name").order("name");if(te)throw te;o(z||[])}catch(z){console.error("Fehler beim Laden der Unternehmen:",z)}},U=async()=>{try{const{data:z,error:te}=await O.from("events").select("id, title").order("start_datetime",{ascending:!1});if(te)throw te;x(z||[])}catch(z){console.error("Fehler beim Laden der Events:",z)}},K=async()=>{try{const{data:z,error:te}=await O.from("event_participants").select("user_id, event_id");if(te)throw te;const be=new Map;(z||[]).forEach(De=>{const Oe=be.get(De.user_id)||[];be.set(De.user_id,[...Oe,De.event_id])}),g(be)}catch(z){console.error("Fehler beim Laden der User-Event-Zuordnungen:",z)}},q=()=>{let z=c.length>=2&&A!==null?A:e;if(d!=="all"&&(z=z.filter(te=>te.role===d)),m&&(z=z.filter(te=>(w.get(te.id)||[]).map(Oe=>{var nn;return((nn=b.find(gr=>gr.id===Oe))==null?void 0:nn.title)||""}).join(" ").toLowerCase().includes(m.toLowerCase()))),c&&c.length<2&&(z=z.filter(te=>{var be,De;return((be=te.first_name)==null?void 0:be.toLowerCase().includes(c.toLowerCase()))||((De=te.last_name)==null?void 0:De.toLowerCase().includes(c.toLowerCase()))||te.email.toLowerCase().includes(c.toLowerCase())})),M){const te=new Date(M);te.setHours(0,0,0,0),z=z.filter(be=>new Date(be.created_at)>=te)}if(F){const te=new Date(F);te.setHours(23,59,59,999),z=z.filter(be=>new Date(be.created_at)<=te)}r(z)},Q=z=>{E(z),j(""),y(!0)},V=z=>{P(z),k(!0)},X=async()=>{if(!_||!C){re({title:"Fehler",description:"Bitte wählen Sie einen Recruiter und ein Unternehmen aus",variant:"destructive"});return}try{const{data:z}=await O.from("recruiter_companies").select("id").eq("recruiter_id",_).eq("company_id",C).single();if(z){re({title:"Fehler",description:"Dieser Recruiter ist bereits diesem Unternehmen zugeordnet",variant:"destructive"});return}const{error:te}=await O.from("recruiter_companies").insert([{recruiter_id:_,company_id:C}]);if(te)throw te;re({title:"Erfolg",description:"Recruiter erfolgreich dem Unternehmen zugeordnet"}),y(!1)}catch{re({title:"Fehler",description:"Zuordnung fehlgeschlagen",variant:"destructive"})}},ee=async(z,te)=>{try{const{error:be}=await O.from("profiles").update({role:te}).eq("id",z);if(be)throw be;re({title:"Erfolg",description:"Benutzerrolle erfolgreich aktualisiert"}),T()}catch{re({title:"Fehler",description:"Rolle konnte nicht aktualisiert werden",variant:"destructive"})}},ve=async z=>{try{const{data:te,error:be}=await O.from("profiles").update({approved_status:"approved"}).eq("id",z).select();if(be)throw console.error("Supabase Fehler:",be),be;t(De=>De.map(Oe=>Oe.id===z?{...Oe,approved_status:"approved"}:Oe)),re({title:"Genehmigt",description:"Benutzer wurde erfolgreich freigegeben"}),await T()}catch(te){console.error("Fehler bei der Freigabe:",te),re({title:"Fehler",description:`Freigabe fehlgeschlagen: ${te.message||"Unbekannter Fehler"}`,variant:"destructive"})}},We=async z=>{if(confirm("Sind Sie sicher, dass Sie diesen Benutzer ablehnen möchten?"))try{const{error:te}=await O.from("profiles").update({approved_status:"rejected"}).eq("id",z);if(te)throw te;t(be=>be.map(De=>De.id===z?{...De,approved_status:"rejected"}:De)),re({title:"Abgelehnt",description:"Benutzer wurde abgelehnt"}),await T()}catch(te){console.error("Fehler bei der Ablehnung:",te),re({title:"Fehler",description:"Ablehnung fehlgeschlagen",variant:"destructive"})}},je=async z=>{if(confirm("Sind Sie sicher, dass Sie die Freigabe für diesen Benutzer zurücknehmen möchten?"))try{const{error:te}=await O.from("profiles").update({approved_status:"pending"}).eq("id",z);if(te)throw te;t(be=>be.map(De=>De.id===z?{...De,approved_status:"pending"}:De)),re({title:"Zurückgesetzt",description:"Benutzer wurde auf 'Wartend' zurückgesetzt"}),await T()}catch(te){console.error("Fehler beim Zurücksetzen:",te),re({title:"Fehler",description:"Zurücksetzen fehlgeschlagen",variant:"destructive"})}},ke=z=>{switch(z){case"admin":return"destructive";case"recruiter":return"default";case"bewerber":return"secondary";default:return"outline"}},_e=z=>{switch(z){case"approved":return"default";case"rejected":return"destructive";
489case"pending":return"secondary";default:return"outline"}},dt=z=>{switch(z){case"approved":return"Freigegeben";case"rejected":return"Abgelehnt";case"pending":return"Wartend";default:return"Unbekannt"}},kt=async()=>{try{const z=n.map(Re=>Re.id),{data:te,error:be}=await O.from("events").select("id, title");if(be)throw be;const De=new Map((te||[]).map(Re=>[Re.id,Re.title])),{data:Oe,error:nn}=await O.from("event_participants").select("user_id, event_id").in("user_id",z);if(nn)throw nn;const gr=new Map;(Oe||[]).forEach(Re=>{const fn=De.get(Re.event_id)||"";gr.has(Re.user_id)||gr.set(Re.user_id,new Set),fn&&gr.get(Re.user_id).add(fn)});const xu=["Name","E-Mail","Rolle","Status","Registrierungsdatum","Events"],Xs=n.map(Re=>{const fn=[Re.first_name,Re.last_name].filter(Boolean).join(" ").trim()||"",wu=Array.from(gr.get(Re.id)||[]).join(" | ");return[fn,Re.email,Re.role,Re.approved_status,ar(new Date(Re.created_at),"dd.MM.yyyy"),wu]}),yu=Re=>{const fn=String(Re??"");return/[;"\n]/.test(fn)?'"'+fn.replace(/"/g,'""')+'"':fn},Da=[xu,...Xs].map(Re=>Re.map(yu).join(";")).join(`
490`),fo=new Blob([Da],{type:"text/csv;charset=utf-8;"}),qn=URL.createObjectURL(fo),Js=document.createElement("a");Js.href=qn,Js.download=`nutzer-export-${ar(new Date,"yyyy-MM-dd_HH-mm")}.csv`,Js.click(),URL.revokeObjectURL(qn),re({title:"Export erstellt",description:"CSV wurde heruntergeladen."})}catch(z){console.error("CSV-Export fehlgeschlagen:",z),re({title:"Fehler",description:"CSV-Export fehlgeschlagen",variant:"destructive"})}};return a?i.jsx("div",{children:"Lade Benutzer..."}):i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"Benutzer Verwaltung"}),i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxs("div",{className:"relative",children:[i.jsx(Xr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(ie,{placeholder:"Benutzer suchen...",value:c,onChange:z=>u(z.target.value),className:"pl-10 w-64"})]}),i.jsxs("div",{className:"relative",children:[i.jsx(Xr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(ie,{placeholder:"Event suchen...",value:m,onChange:z=>v(z.target.value),className:"pl-10 w-48"})]}),i.jsxs(ct,{value:d,onValueChange:h,children:[i.jsx(rt,{className:"w-[150px]",children:i.jsx(ut,{placeholder:"Rolle filtern"})}),i.jsxs(st,{children:[i.jsx(se,{value:"all",children:"Alle Rollen"}),i.jsx(se,{value:"admin",children:"Admin"}),i.jsx(se,{value:"recruiter",children:"Recruiter"}),i.jsx(se,{value:"bewerber",children:"Bewerber"})]})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Y,{htmlFor:"dateFrom",className:"text-sm text-muted-foreground whitespace-nowrap",children:"Von:"}),i.jsx(ie,{id:"dateFrom",type:"date",value:M,onChange:z=>W(z.target.value),className:"w-36"})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Y,{htmlFor:"dateTo",className:"text-sm text-muted-foreground whitespace-nowrap",children:"Bis:"}),i.jsx(ie,{id:"dateTo",type:"date",value:F,onChange:z=>R(z.target.value),className:"w-36"})]}),i.jsx($,{variant:"outline",onClick:kt,children:"CSV exportieren"})]})]}),i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"flex items-center gap-2",children:[i.jsx(_t,{className:"h-5 w-5"}),"Benutzer (",n.length,")"]})}),i.jsx(Z,{children:i.jsxs(Gs,{children:[i.jsx(Ys,{children:i.jsxs(Zt,{children:[i.jsx(Se,{children:"Name"}),i.jsx(Se,{children:"E-Mail"}),i.jsx(Se,{children:"Rolle"}),i.jsx(Se,{children:"Status"}),i.jsx(Se,{children:"Telefon"}),i.jsx(Se,{children:"Registriert"}),i.jsx(Se,{children:"Aktionen"})]})}),i.jsx(Qs,{children:n.map(z=>i.jsxs(Zt,{children:[i.jsxs(Ne,{className:"font-medium",children:[z.first_name," ",z.last_name]}),i.jsx(Ne,{children:z.email}),i.jsx(Ne,{children:i.jsx(he,{variant:ke(z.role),children:z.role})}),i.jsx(Ne,{children:i.jsx(he,{variant:_e(z.approved_status),children:dt(z.approved_status)})}),i.jsx(Ne,{children:z.phone||"Keine Angabe"}),i.jsx(Ne,{children:ar(new Date(z.created_at),"dd.MM.yyyy")}),i.jsx(Ne,{children:i.jsxs("div",{className:"flex gap-1",children:[i.jsxs(ct,{value:z.role,onValueChange:te=>
490ee(z.id,te),children:[i.jsx(rt,{className:"w-[120px] h-8",children:i.jsx(ut,{})}),i.jsxs(st,{children:[i.jsx(se,{value:"bewerber",children:"Bewerber"}),i.jsx(se,{value:"recruiter",children:"Recruiter"}),i.jsx(se,{value:"admin",children:"Admin"})]})]}),z.role==="recruiter"&&i.jsx($,{size:"sm",variant:"outline",onClick:()=>Q(z.id),title:"Dem Unternehmen zuordnen",children:i.jsx(Yi,{className:"h-4 w-4 text-blue-600"})}),z.role==="bewerber"&&i.jsx($,{size:"sm",variant:"outline",onClick:()=>V(z.id),title:"Bewerberprofil ansehen",children:i.jsx(so,{className:"h-4 w-4 text-blue-600"})}),z.approved_status!=="approved"&&i.jsx($,{size:"sm",variant:"outline",onClick:()=>ve(z.id),title:"Benutzer genehmigen",children:i.jsx(vE,{className:"h-4 w-4 text-green-600"})}),z.approved_status!=="rejected"&&i.jsx($,{size:"sm",variant:"outline",onClick:()=>We(z.id),title:"Benutzer ablehnen",children:i.jsx(xE,{className:"h-4 w-4 text-red-600"})}),z.approved_status==="approved"&&i.jsx($,{size:"sm",variant:"outline",onClick:()=>je(z.id),title:"Freigabe zurücknehmen und auf 'Wartend' setzen",children:i.jsx(_w,{className:"h-4 w-4 text-orange-600"})})]})})]},z.id))})]})})]}),i.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Gesamt Benutzer"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.length})})]}),i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Freigegebene Benutzer"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.filter(z=>z.approved_status==="approved").length})})]}),i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Freigegebene Bewerber"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.filter(z=>z.role==="bewerber"&&z.approved_status==="approved").length})})]}),i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Freigegebene Recruiter"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.filter(z=>z.role==="recruiter"&&z.approved_status==="approved").length})})]})]}),i.jsx(mt,{open:p,onOpenChange:y,children:i.jsxs(lt,{className:"max-w-md",children:[i.jsxs(St,{children:[i.jsxs(Nt,{className:"flex items-center gap-2",children:[i.jsx(Yi,{className:"h-5 w-5"}),"Recruiter dem Unternehmen zuordnen"]}),i.jsx(Et,{children:"Wählen Sie ein Unternehmen aus, dem der Recruiter zugeordnet werden soll."})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"company-select",children:"Unternehmen auswählen"}),i.jsxs(ct,{value:C,onValueChange:j,children:[i.jsx(rt,{children:i.jsx(ut,{placeholder:"Unternehmen auswählen..."})}),i.jsx(st,{children:s.map(z=>i.jsx(se,{value:z.id,children:z.name},z.id))})]})]}),i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx($,{variant:"outline",onClick:()=>y(!1),children:"Abbrechen"}),i.jsx($,{onClick:X,children:"Zuordnen"})]})]})]})}),i.jsx(Oa,{bewerberId:N,open:S,onOpenChange:k})]})},z4=()=>{const[e,t]=f.useState([]),[n,r]=f.useState([]),[s,o]=f.useState(!0),[a,l]=f.useState(!1),[c,u]=f.useState({event_id:"",recipient_type:"bewerber",subject:"",message:""});f.useEffect(()=>{d(),h()},[]);const d=async()=>{try{const{data:g,error:p}=await O.from("notifications").select("*").order("created_at",{ascending:!1});if(p)throw p;t(g||[])}catch{re({title:"Fehler",description:"Benachrichtigungen konnten nicht geladen werden",variant:"destructive"})}finally{o(!1)}},h=async()=>{try{const{data:g,error:p}=await O.from("events").select("id, title").order("start_datetime",{ascending:!0});if(p)throw p;r(g||[])}catch{}},m=async g=>{var p;g.preventDefault();try{const{data:y}=await O.from("profiles").select("id").eq("user_id",(p=(await O.auth.getUser()).data.user)==null?void 0:p.id).single(),{error:_}=await O.from("notifications").insert([{...c,created_by:y==null?void 0:y.id}]);if(_)throw _;re({title:"Erfolg",description:"Benachrichtigung erfolgreich erstellt"}),l(!1),b(),d()}catch{re({title:"Fehler",description:"Benachrichtigung konnte nicht erstellt werden",variant:"destructive"})}},v=async g=>{const p=e.find(y=>y.id===g);if(p){re({title:"Senden...",description:"E-Mails werden versendet, bitte warten..."});try{const{data:y,error:_}=await O.functions.invoke("send-notifications",{body:{notificationId:g}});if(_)throw console.error("Edge function error:",_),new Error(_.message||"Edge Function Fehler");if(y&&!y.success)throw new Error(y.error||`Nur ${y.sentCount||0} von ${y.totalRecipients||0} E-Mails konnten versendet werden`);re({title:"✅ Erfolgreich gesendet",description:(y==null?void 0:y.message)||`Benachrichtigung an ${p.recipient_type} versandt`}),d()}catch(y){console.error("Send notification error:",y),re({title:"❌ E-Mail Versendung fehlgeschlagen",description:y.message||"Benachrichtigung konnte nicht gesendet werden. Überprüfen Sie die SMTP-Konfiguration.",variant:"destructive"})}}},b=()=>{u({event_id:"",recipient_type:"bewerber",subject:"",message:""})},x=()=>{b(),l(!0)},w=g=>{const p=n.find(y=>y.id===g);return(p==null?void 0:p.title)||"Unbekanntes Event"};return s?i.jsx("div",{children:"Lade Benachrichtigungen..."}):i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"Benachrichtigungen"}),i.jsxs(mt,{open:a,onOpenChange:l,children:[i.jsx(lu,{asChild:!0,children:i.jsxs($,{onClick:x,className:"flex items-center gap-2",children:[i.jsx($c,{
490className:"h-4 w-4"}),"Neue Benachrichtigung"]})}),i.jsxs(lt,{className:"max-w-2xl",children:[i.jsxs(St,{children:[i.jsx(Nt,{children:"Neue Benachrichtigung erstellen"}),i.jsx(Et,{children:"Erstellen Sie eine E-Mail-Benachrichtigung für Bewerber oder Recruiter"})]}),i.jsxs("form",{onSubmit:m,className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"event_id",children:"Event *"}),i.jsxs(ct,{value:c.event_id,onValueChange:g=>u({...c,event_id:g}),children:[i.jsx(rt,{children:i.jsx(ut,{placeholder:"Event auswählen"})}),i.jsx(st,{children:n.map(g=>i.jsx(se,{value:g.id,children:g.title},g.id))})]})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"recipient_type",children:"Empfänger *"}),i.jsxs(ct,{value:c.recipient_type,onValueChange:g=>u({...c,recipient_type:g}),children:[i.jsx(rt,{children:i.jsx(ut,{})}),i.jsxs(st,{children:[i.jsx(se,{value:"bewerber",children:"Bewerber"}),i.jsx(se,{value:"recruiter",children:"Recruiter"})]})]})]})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"subject",children:"Betreff *"}),i.jsx(ie,{id:"subject",value:c.subject,onChange:g=>u({...c,subject:g.target.value}),required:!0,placeholder:"E-Mail Betreff"})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"message",children:"Nachricht *"}),i.jsx(Ks,{id:"message",value:c.message,onChange:g=>u({...c,message:g.target.value}),required:!0,rows:6,placeholder:"E-Mail Nachricht..."})]}),i.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[i.jsx($,{type:"button",variant:"outline",onClick:()=>l(!1),children:"Abbrechen"}),i.jsx($,{type:"submit",children:"Erstellen"})]})]})]})]})]}),i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"flex items-center gap-2",children:[i.jsx(gw,{className:"h-5 w-5"}),"Benachrichtigungen (",e.length,")"]})}),i.jsx(Z,{children:i.jsxs(Gs,{children:[i.jsx(Ys,{children:i.jsxs(Zt,{children:[i.jsx(Se,{children:"Event"}),i.jsx(Se,{children:"Betreff"}),i.jsx(Se,{children:"Empfänger"}),i.jsx(Se,{children:"Status"}),i.jsx(Se,{children:"Erstellt"}),i.jsx(Se,{children:"Aktionen"})]})}),i.jsx(Qs,{children:e.map(g=>i.jsxs(Zt,{children:[i.jsxs(Ne,{className:"flex items-center gap-1",children:[i.jsx(tt,{className:"h-4 w-4 text-muted-foreground"}),w(g.event_id)]}),i.jsx(Ne,{className:"font-medium",children:g.subject}),i.jsx(Ne,{children:i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(_t,{className:"h-4 w-4 text-muted-foreground"}),i.jsx(he,{variant:g.recipient_type==="bewerber"?"secondary":"default",children:g.recipient_type})]})}),i.jsx(Ne,{children:i.jsx(he,{variant:g.sent_at?"default":"outline",children:g.sent_at?"Gesendet":"Entwurf"})}),i.jsx(Ne,{children:ar(new Date(g.created_at),"dd.MM.yyyy HH:mm")}),i.jsx(Ne,{children:g.sent_at?i.jsx("div",{className:"text-xs text-muted-foreground",children:ar(new Date(g.sent_at),"dd.MM.yyyy HH:mm")}):i.jsxs($,{size:"sm",variant:"outline",onClick:()=>v(g.id),className:"flex items-center gap-1",children:[i.jsx(CE,{className:"h-4 w-4"}),"Senden"]})})]},g.id))})]})})]}),i.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Gesamt Benachrichtigungen"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.length})})]}),i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Gesendet"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.filter(g=>g.sent_at).length})})]}),i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Entwürfe"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.filter(g=>!g.sent_at).length})})]})]})]})},B4=()=>{const[e,t]=f.useState([]),[n,r]=f.useState([]),[s,o]=f.useState(!0),[a,l]=f.useState(!1),[c,u]=f.useState(!1),[d,h]=f.useState({event_id:"",file_type:"general",file_name:""}),[m,v]=f.useState(null);f.useEffect(()=>{b(),x()},[]);const b=async()=>{try{const{data:k,error:N}=await O.from("file_attachments").select("*").order("created_at",{ascending:!1});if(N)throw N;t(k||[])}catch{re({title:"Fehler",description:"Dateien konnten nicht geladen werden",variant:"destructive"})}finally{o(!1)}},x=async()=>{try{const{data:k,error:N}=await O.from("events").select("id, title").order("start_datetime",{ascending:!0});if(N)throw N;r(k||[])}catch{}},w=async k=>{var N;if(k.preventDefault(),!m){re({title:"Fehler",description:"Bitte wählen Sie eine Datei aus",variant:"destructive"});return}u(!0);try{const P=d.file_name||m.name,M=m.name.split(".").pop(),W=`${d.event_id}/${P.replace(/[^a-zA-Z0-9.-]/g,"_")}`,{error:F}=await O.storage.from("event-files").upload(W,m,{cacheControl:"3600",upsert:!1});if(F)throw F;const{data:{publicUrl:R}}=O.storage.from("event-files").getPublicUrl(W),{data:A}=await O.from("profiles").select("id").eq("user_id",(N=(await O.auth.getUser()).data.user)==null?void 0:N.id).single(),{error:L}=await O.from("file_attachments").insert([{event_id:d.event_id,file_name:P,file_type:d.file_type,file_url:R,file_size:m.size,uploaded_by:A==null?void 0:A.id}]);if(L)throw L;re({title:"Erfolg",description:"Datei erfolgreich hochgeladen"}),l(!1),y(),b()}catch(P){re({title:"Fehler",description:P.message||"Datei konnte nicht hochgeladen werden",variant:"destructive"})}finally{u(!1)}},g=k=>{const N=document.createElement("a");N.href=k.file_url,N.download=k.file_name,N.target="_blank",document.body.appendChild(N),N.click(),document.body.removeChild(N)},p=async k=>
490{if(confirm("Sind Sie sicher, dass Sie diese Datei löschen möchten?"))try{const{error:N}=await O.from("file_attachments").delete().eq("id",k);if(N)throw N;re({title:"Erfolg",description:"Datei erfolgreich gelöscht"}),b()}catch{re({title:"Fehler",description:"Datei konnte nicht gelöscht werden",variant:"destructive"})}},y=()=>{h({event_id:"",file_type:"general",file_name:""}),v(null)},_=()=>{y(),l(!0)},E=k=>{const N=n.find(P=>P.id===k);return(N==null?void 0:N.title)||"Unbekanntes Event"},C=k=>{switch(k){case"standplan":return"Standplan";case"programm":return"Programm";case"general":return"Allgemein";default:return k}},j=k=>{switch(k){case"standplan":return"default";case"programm":return"secondary";case"general":return"outline";default:return"outline"}},S=k=>{if(k===0)return"0 Bytes";const N=1024,P=["Bytes","KB","MB","GB"],M=Math.floor(Math.log(k)/Math.log(N));return parseFloat((k/Math.pow(N,M)).toFixed(2))+" "+P[M]};return s?i.jsx("div",{children:"Lade Dateien..."}):i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"Datei Management"}),i.jsxs(mt,{open:a,onOpenChange:l,children:[i.jsx(lu,{asChild:!0,children:i.jsxs($,{onClick:_,className:"flex items-center gap-2",children:[i.jsx($c,{className:"h-4 w-4"}),"Datei hochladen"]})}),i.jsxs(lt,{className:"max-w-lg",children:[i.jsxs(St,{children:[i.jsx(Nt,{children:"Neue Datei hochladen"}),i.jsx(Et,{children:"Laden Sie Standpläne, Programme oder andere Dateien für Events hoch"})]}),i.jsxs("form",{onSubmit:w,className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"event_id",children:"Event *"}),i.jsxs(ct,{value:d.event_id,onValueChange:k=>h({...d,event_id:k}),children:[i.jsx(rt,{children:i.jsx(ut,{placeholder:"Event auswählen"})}),i.jsx(st,{children:n.map(k=>i.jsx(se,{value:k.id,children:k.title},k.id))})]})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"file_type",children:"Dateityp *"}),i.jsxs(ct,{value:d.file_type,onValueChange:k=>h({...d,file_type:k}),children:[i.jsx(rt,{children:i.jsx(ut,{})}),i.jsxs(st,{children:[i.jsx(se,{value:"standplan",children:"Standplan"}),i.jsx(se,{value:"programm",children:"Programm"}),i.jsx(se,{value:"general",children:"Allgemein"})]})]})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"file_name",children:"Dateiname (optional)"}),i.jsx(ie,{id:"file_name",value:d.file_name,onChange:k=>h({...d,file_name:k.target.value}),placeholder:"Leer lassen für ursprünglichen Namen"})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"file",children:"Datei auswählen *"}),i.jsx(ie,{id:"file",type:"file",onChange:k=>{var N;return v(((N=k.target.files)==null?void 0:N[0])||null)},required:!0,accept:".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.jpg,.jpeg,.png"})]}),i.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[i.jsx($,{type:"button",variant:"outline",onClick:()=>l(!1),children:"Abbrechen"}),i.jsx($,{type:"submit",disabled:c,children:c?i.jsxs(i.Fragment,{children:[i.jsx(sg,{className:"h-4 w-4 mr-2 animate-spin"}),"Hochladen..."]}):i.jsxs(i.Fragment,{children:[i.jsx(sg,{className:"h-4 w-4 mr-2"}),"Hochladen"]})})]})]})]})]})]}),i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"flex items-center gap-2",children:[i.jsx(Ds,{className:"h-5 w-5"}),"Dateien (",e.length,")"]})}),i.jsx(Z,{children:i.jsxs(Gs,{children:[i.jsx(Ys,{children:i.jsxs(Zt,{children:[i.jsx(Se,{children:"Dateiname"}),i.jsx(Se,{children:"Event"}),i.jsx(Se,{children:"Typ"}),i.jsx(Se,{children:"Größe"}),i.jsx(Se,{children:"Hochgeladen"}),i.jsx(Se,{children:"Aktionen"})]})}),i.jsx(Qs,{children:e.map(k=>i.jsxs(Zt,{children:[i.jsx(Ne,{className:"font-medium",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Ds,{className:"h-4 w-4 text-muted-foreground"}),k.file_name]})}),i.jsxs(Ne,{className:"flex items-center gap-1",children:[i.jsx(tt,{className:"h-4 w-4 text-muted-foreground"}),E(k.event_id)]}),i.jsx(Ne,{children:i.jsx(he,{variant:j(k.file_type),children:C(k.file_type)})}),i.jsx(Ne,{children:S(k.file_size)}),i.jsx(Ne,{children:ar(new Date(k.created_at),"dd.MM.yyyy")}),i.jsx(Ne,{children:i.jsxs("div",{className:"flex gap-2",children:[i.jsx($,{size:"sm",variant:"outline",onClick:()=>g(k),title:"Datei herunterladen",children:i.jsx(wE,{className:"h-4 w-4"})}),i.jsx($,{size:"sm",variant:"destructive",onClick:()=>p(k.id),title:"Datei löschen",children:i.jsx(Qi,{className:"h-4 w-4"})})]})})]},k.id))})]})})]}),i.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Gesamt Dateien"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.length})})]}),i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Standpläne"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.filter(k=>k.file_type==="standplan").length})})]}),i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Programme"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.filter(k=>k.file_type==="programm").length})})]}),i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Allgemeine Dateien"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.filter(k=>k.file_type==="general").length})})]})]})]})},W4=()=>{const[e,t]=f.useState([]),[n,r]=f.useState(!0);f.useEffect(()=>{s()},[]);const s=async()=>{try{const{data:l,error:c}=await O.from("audit_logs").select("*").order("changed_at",{ascending:!1}).limit(100);if(c)throw c;t(l||[])}catch{re({title:"Fehler",description:"Versionshistorie konnte nicht geladen werden",variant:"destructive"})}finally{r(!1)}},o=l=>{switch(l){case"INSERT":return i.jsx(he,{variant:"default",children:"Erstellt"});case"UPDATE":return i.jsx(he,{variant:"secondary",children:"Aktualisiert"});case"DELETE":return i.jsx(he,{variant:"destructive",children:"Gelöscht"});default:return i.jsx(he,{variant:"outline",children:l})}},a=l=>{switch(l){case"events":return"Events";case"companies":return"Unternehmen";case"profiles":return"Profile";default:return l}};return n?i.jsx("div",{children:"Lade Versionshistorie..."}):i.jsxs("div",{className:"space-y-4",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"Versionshistorie"}),i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"flex items-center gap-2",children:[i.jsx(bw,{className:"h-5 w-5"}),"Änderungsprotokoll (",e.length,")"]})}),i.jsx(Z,{children:i.jsxs(Gs,{children:[i.jsx(Ys,{children:i.jsxs(Zt,{children:[i.jsx(Se,{children:"Tabelle"}),i.jsx(Se,{children:"Aktion"}),i.jsx(Se,{children:"Zeitpunkt"}),i.jsx(Se,{children:"Aktionen"})]})}),i.jsx(Qs,{children:e.map(l=>i.jsxs(Zt,{children:[i.jsx(Ne,{className:"font-medium",children:a(l.table_name)}),i.jsx(Ne,{children:o(l.action)}),i.jsx(Ne,{children:ar(new Date(l.changed_at),"dd.MM.yyyy HH:mm:ss")}),i.jsx(Ne,{children:i.jsxs("div",{className:"flex gap-2",children:[i.jsx($,{size:"sm",variant:"outline",title:"Details anzeigen",children:i.jsx(so,{className:"h-4 w-4"})}),l.action!=="DELETE"&&i.jsx($,{size:"sm",variant:"outline",title:"Version wiederherstellen",children:i.jsx(_w,{className:"h-4 w-4"})})]})})]},l.id))})]})})]}),i.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Gesamt Änderungen"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.length})})]}),i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Aktualisierungen"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.filter(l=>l.action==="UPDATE").length})})]}),i.jsxs(J,{children:[i.jsx(ae,{className:"pb-2",children:i.jsx(le,{className:"text-sm font-medium",children:"Neue Einträge"})}),i.jsx(Z,{children:i.jsx("div",{className:"text-2xl font-bold",children:e.filter(l=>l.action==="INSERT").length})})]})]})]})},V4=()=>{const{profile:e,loading:t}=qs(),[n,r]=f.useState("events");return t?i.jsx("div",{children:"Loading..."}):!e||e.role!=="admin"?i.jsx("div",{children:"Zugriff verweigert"}):i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("header",{className:"border-b bg-card",children:i.jsx("div",{className:"container mx-auto px-4 py-4",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Admin Dashboard"}),i.jsx("p",{className:"text-muted-foreground",children:"Vollständige Verwaltung mit Versionierung"})]}),i.jsxs(he,{variant:"secondary",className:"flex items-center gap-2",children:[i.jsx(Sw,{className:"h-4 w-4"}),"Administrator"]})]})})}),i.jsx("div",{className:"container mx-auto px-4 py-6",children:i.jsxs(F1,{value:n,onValueChange:r,className:"space-y-6",children:[i.jsxs(Lm,{className:"grid w-full grid-cols-6",children:[i.jsxs(Zn,{value:"events",className:"flex items-center gap-2",children:[i.jsx(tt,{className:"h-4 w-4"}),"Events"]}),i.jsxs(Zn,{value:"companies",className:"flex items-center gap-2",children:[i.jsx(Yi,{className:"h-4 w-4"}),"Unternehmen"]}),i.jsxs(Zn,{value:"users",className:"flex items-center gap-2",children:[i.jsx(_t,{className:"h-4 w-4"}),"Benutzer"]}),i.jsxs(Zn,{value:"notifications",className:"flex items-center gap-2",children:[i.jsx(gw,{className:"h-4 w-4"}),"Benachrichtigungen"]}),i.jsxs(Zn,{value:"files",className:"flex items-center gap-2",children:[i.jsx(Ds,{className:"h-4 w-4"}),"Dateien"]}),i.jsxs(Zn,{value:"history",className:"flex items-center gap-2",children:[i.jsx(bw,{className:"h-4 w-4"}),"Versionen"]})]}),i.jsx(er,{value:"events",children:i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx(le,{children:"Event Management"}),i.jsx(Ae,{children:"Messen erstellen, bearbeiten und verwalten mit automatischer Versionierung"})]}),i.jsx(Z,{children:i.jsx(L4,{})})]})}),i.jsx(er,{value:"companies",children:i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx(le,{children:"Unternehmen Management"}),i.jsx(Ae,{children:"Unternehmen verwalten und zu Events zuordnen"})]}),i.jsx(Z,{children:i.jsx($4,{})})]})}),i.jsx(er,{value:"users",children:i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx(le,{children:"Benutzer Management"}),i.jsx(Ae,{children:"Bewerber und Recruiter verwalten, freigeben und imitieren"})]}),i.jsx(Z,{children:i.jsx(U4,{})})]})}),i.jsx(er,{value:"notifications",children:i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx(le,{children:"Benachrichtigungen"}
490),i.jsx(Ae,{children:"E-Mail-Benachrichtigungen an Bewerber und Recruiter senden"})]}),i.jsx(Z,{children:i.jsx(z4,{})})]})}),i.jsx(er,{value:"files",children:i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx(le,{children:"Datei Management"}),i.jsx(Ae,{children:"Standpläne, Programme und Downloads verwalten"})]}),i.jsx(Z,{children:i.jsx(B4,{})})]})}),i.jsx(er,{value:"history",children:i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx(le,{children:"Versionshistorie"}),i.jsx(Ae,{children:"Änderungen verfolgen und zu vorherigen Versionen zurückkehren"})]}),i.jsx(Z,{children:i.jsx(W4,{})})]})})]})})]})},H4=()=>{const{user:e,loading:t,signOut:n,isAuthenticated:r}=Dt(),{profile:s,loading:o}=qs(),a=Wt(),l=ka();if(f.useEffect(()=>{!t&&!r&&a("/auth")},[t,r,a]),f.useEffect(()=>{if(!o&&s&&r){const u=l.pathname;console.log("Current path on Index load:",u,"User role:",s.role);const d=u.includes("/recruiter/"),h=u.includes("/admin/");(d&&s.role!=="recruiter"||h&&s.role!=="admin")&&u!=="/"&&(console.log("Redirecting from inappropriate route to home"),a("/",{replace:!0}))}},[s,o,r,l.pathname,a]),t)return i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"Lädt..."})]})});if(!r)return null;if(o)return i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"Lädt..."})]})});if(!r||!s)return null;const c=()=>{switch(s.role){case"bewerber":return i.jsx(tM,{});case"recruiter":return i.jsx(lM,{});case"admin":return i.jsx(V4,{});default:return i.jsx("div",{children:"Unbekannte Rolle"})}};return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("header",{className:"border-b bg-card",children:i.jsxs("div",{className:"container mx-auto px-4 py-4 flex justify-between items-center",children:[i.jsx("h1",{className:"text-2xl font-bold text-primary",children:"IQB brains"}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs("span",{className:"text-sm text-muted-foreground",children:["Willkommen, ",s.first_name||(e==null?void 0:e.email)]}),i.jsxs($,{variant:"outline",size:"sm",onClick:n,children:[i.jsx(EE,{className:"h-4 w-4 mr-2"}),"Abmelden"]})]})]})}),i.jsx("main",{className:"container mx-auto px-4 py-8",children:c()})]})},q4=()=>{const[e,t]=f.useState(""),[n,r]=f.useState(""),[s,o]=f.useState(""),[a,l]=f.useState(""),[c,u]=f.useState("bewerber"),[d,h]=f.useState(!1),[m,v]=f.useState(""),[b,x]=f.useState(!1),[w,g]=f.useState(!1),[p,y]=f.useState(0),[_,E]=f.useState(!1),[C,j]=f.useState(!1),S=Wt(),{toast:k}=Bt();f.useEffect(()=>{O.auth.getSession().then(({data:{session:A}})=>{A&&O.auth.getUser().then(({data:{user:L},error:T})=>{T||!L?(O.auth.signOut().catch(console.error),localStorage.removeItem("sb-prfnpherkjsdxiddwsuz-auth-token")):S("/")})});const{data:{subscription:R}}=O.auth.onAuthStateChange((A,L)=>{L&&S("/")});return()=>R.unsubscribe()},[S]),f.useEffect(()=>{const R=pk();R>0&&y(R)},[]),f.useEffect(()=>{let R;return p>0&&(R=setInterval(()=>{y(A=>{const L=A-1;return L===0&&Rw(),L})},1e3)),()=>{R&&clearInterval(R)}},[p]);const N=()=>{y(60),mk(60)},P=async R=>{var A,L,T,I,D,U,K;if(R.preventDefault(),d){console.log("Form submission blocked - already loading");return}if(!w){k({title:"Nutzungsbedingungen erforderlich",description:"Bitte akzeptiere die Nutzungsbedingungen um fortzufahren.",variant:"destructive"});return}h(!0);try{const{data:q,error:Q}=await O.auth.signUp({email:e,password:n,options:{emailRedirectTo:`${window.location.origin}/`,data:{first_name:s,last_name:a,role:c}}});if(Q)throw Q;if(!q.user){k({title:"E-Mail bereits registriert",description:"Ein Konto mit dieser E-Mail-Adresse existiert bereits. Bitte melde dich an oder nutze die Passwort-Reset-Funktion.",variant:"destructive"});return}q.session?k({title:"Registrierung erfolgreich!",description:"Du wurdest automatisch angemeldet."}):k({title:"Registrierung erfolgreich!",description:"Wir haben dir eine Bestätigungs-E-Mail gesendet. Bitte prüfe dein Postfach und auch den Spam-Ordner."})}catch(q){let Q="Registrierung fehlgeschlagen",V=q.message;(A=q.message)!=null&&A.includes("Error sending confirmation email")||(L=q.message)!=null&&L.includes("535 5.7.8 Authentication failed")?(Q="E-Mail-Versand fehlgeschlagen",V="Es gab ein Problem beim Versenden der Bestätigungs-E-Mail. Bitte kontaktiere den Administrator oder versuche es später erneut."):(T=q.message)!=null&&T.includes("over_email_send_rate_limit")||(I=q.message)!=null&&I.includes("email rate limit exceeded")?(Q="Zu viele E-Mail-Anfragen",V=`Es wurden zu viele E-Mails in kurzer Zeit versendet. Bitte warte ${p>0?p:60} Sekunden und versuche es erneut.`,N()):(D=q.message)!=null&&D.includes("User already registered")?(Q="Benutzer bereits registriert",V="Ein Konto mit dieser E-Mail-Adresse existiert bereits. Versuche dich anzumelden oder nutze die Passwort-Reset-Funktion."):(U=q.message)!=null&&U.includes("Invalid email")?(Q="Ungültige E-Mail-Adresse",V="Bitte gib eine gültige E-Mail-Adresse ein."):(K=q.message)!=null&&K.includes("Password should be at least")&&(Q="Passwort zu schwach",V="Das Passwort muss mindestens 6 Zeichen lang sein."),k({title:Q,description:V,variant:"destructive"})}finally{h(!1)}},M=async R=>{var A,L,T;R.preventDefault(),h(!0),E(!1);try{const{error:I}=await O.auth.signInWithPassword({email:e,password:n});if(I)throw I;k({title:"Anmeldung erfolgreich!",description:"Willkommen zurück bei IQB brains."})}catch(I){let D="Anmeldung fehlgeschlagen",U=I.message;(A=I.message)!=null&&A.includes("Email not confirmed")||(L=I.message)!=null&&L.includes("email_not_confirmed")?(D="E-Mail nicht bestätigt",U="Deine E-Mail-Adresse wurde noch nicht bestätigt. Bitte prüfe dein Postfach oder fordere eine neue Bestätigungs-E-Mail an.",E(!0)):(T=I.message)!=null&&T.includes("Invalid login credentials")&&(D="Ungültige Anmeldedaten",U="E-Mail-Adresse oder Passwort ist falsch. Bitte überprüfe deine Eingaben."),k({title:D,description:U,variant:"destructive"})}finally{h(!1)}},W=async()=>{var R,A;if(!e){k({title:"E-Mail-Adresse erforderlich",description:"Bitte gib deine E-Mail-Adresse ein.",variant:"destructive"});return}j(!0);try{const{error:L}=await O.auth.resend({type:"signup",email:e,options:{emailRedirectTo:`${window.location.origin}/`}});if(L)throw L;k({title:"Bestätigungs-E-Mail versendet!",description:"Wir haben dir eine neue Bestätigungs-E-Mail gesendet. Bitte prüfe dein Postfach und auch den Spam-Ordner."}),E(!1)}catch(L){let T="Fehler beim Versenden",I=L.message;((R=L.message)!=null&&R.includes("over_email_send_rate_limit")||(A=L.message)!=null&&A.includes("email rate limit exceeded"))&&(T="Zu viele E-Mail-Anfragen",I="Es wurden zu viele E-Mails in kurzer Zeit versendet. Bitte warte einige Minuten und versuche es erneut.",N()),k({title:T,description:I,variant:"destructive"})}finally{j(!1)}},F=async R=>{var A,L;R.preventDefault(),h(!0);try{const{error:T}=await O.auth.resetPasswordForEmail(m,{redirectTo:`${window.location.origin}/auth/recovery`});if(T)throw T;k({title:"Reset-Link versendet!",description:"Prüfe deine E-Mails für den Passwort-Reset-Link. Schaue auch im Spam-Ordner nach."}),x(!1),v("")}catch(T){let I="Fehler beim Versenden",D=T.message;((A=T.message)!=null&&A.includes("over_email_send_rate_limit")||(L=T.message)!=null&&L.includes("email rate limit exceeded"))&&(I="Zu viele E-Mail-Anfragen",D=`Es wurden zu viele E-Mails in kurzer Zeit versendet. Bitte warte ${p>0?p:60} Sekunden und versuche es erneut.`,N()),k({title:I,description:D,variant:"destructive"})}finally{h(!1)}};return i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:i.jsxs(J,{className:"w-full max-w-md",children:[i.jsxs(ae,{className:"text-center",children:[i.jsx(le,{className:"text-2xl font-bold",children:"IQB brains"}),i.jsx(Ae,{children:"Deine Plattform für Karriere und Recruiting"})]}),i.jsxs(Z,{children:[i.jsxs(F1,{defaultValue:"signin",className:"w-full",children:[i.jsxs(Lm,{className:"grid w-full grid-cols-2",children:[i.jsx(Zn,{value:"signin",children:"Anmelden"}),i.jsx(Zn,{value:"signup",children:"Registrieren"})]}),i.jsxs(er,{value:"signin",children:[i.jsxs("form",{onSubmit:M,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"email",children:"E-Mail"}
490),i.jsx(ie,{id:"email",type:"email",value:e,onChange:R=>t(R.target.value),required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"password",children:"Passwort"}),i.jsx(ie,{id:"password",type:"password",value:n,onChange:R=>r(R.target.value),required:!0})]}),i.jsx($,{type:"submit",className:"w-full",disabled:d,children:d?"Wird angemeldet...":"Anmelden"}),_&&i.jsxs("div",{className:"mt-4 space-y-2 border-t pt-4",children:[i.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"Bestätigungs-E-Mail nicht erhalten?"}),i.jsx($,{type:"button",variant:"outline",onClick:W,disabled:C||p>0,className:"w-full",children:C?"Wird versendet...":p>0?`Warten (${p}s)`:"Bestätigungs-E-Mail erneut senden"})]}),i.jsx("div",{className:"text-center mt-4",children:i.jsx($,{type:"button",variant:"link",onClick:()=>x(!b),className:"text-sm text-muted-foreground",children:"Passwort vergessen?"})})]}),b&&i.jsxs("form",{onSubmit:F,className:"mt-4 space-y-4 border-t pt-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"resetEmail",children:"E-Mail für Passwort-Reset"}),i.jsx(ie,{id:"resetEmail",type:"email",value:m,onChange:R=>v(R.target.value),placeholder:"Deine E-Mail-Adresse",required:!0})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx($,{type:"submit",disabled:d||p>0,className:"flex-1",children:d?"Wird versendet...":p>0?`Warten (${p}s)`:"Reset-Link senden"}),i.jsx($,{type:"button",variant:"outline",onClick:()=>{x(!1),v("")},children:"Abbrechen"})]})]})]}),i.jsx(er,{value:"signup",children:i.jsxs("form",{onSubmit:P,className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"firstName",children:"Vorname"}),i.jsx(ie,{id:"firstName",value:s,onChange:R=>o(R.target.value),required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"lastName",children:"Nachname"}),i.jsx(ie,{id:"lastName",value:a,onChange:R=>l(R.target.value),required:!0})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"role",children:"Ich bin..."}),i.jsxs(ct,{value:c,onValueChange:R=>u(R),children:[i.jsx(rt,{children:i.jsx(ut,{})}),i.jsxs(st,{children:[i.jsx(se,{value:"bewerber",children:i.jsxs("div",{className:"flex items-center",children:[i.jsx(Kf,{className:"mr-2 h-4 w-4"}),"Bewerber/in"]})}),i.jsx(se,{value:"recruiter",children:i.jsxs("div",{className:"flex items-center",children:[i.jsx(pE,{className:"mr-2 h-4 w-4"}),"Recruiter/in"]})})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"email",children:"E-Mail"}),i.jsx(ie,{id:"email",type:"email",value:e,onChange:R=>t(R.target.value),required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"password",children:"Passwort"}),i.jsx(ie,{id:"password",type:"password",value:n,onChange:R=>r(R.target.value),required:!0,minLength:6})]}),i.jsxs("div",{className:"flex items-start space-x-2",children:[i.jsx(or,{id:"terms",checked:w,onCheckedChange:R=>g(R===!0),required:!0}),i.jsx("div",{className:"grid gap-1.5 leading-none",children:i.jsxs(Y,{htmlFor:"terms",className:"text-sm font-normal leading-relaxed peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:["Ich akzeptiere die"," ",i.jsx("a",{href:"https://iqb.de/datenschutz/#karriereportal",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline hover:no-underline",children:"Nutzungsbedingungen"})]})})]}),i.jsx($,{type:"submit",className:"w-full",disabled:d||!w||p>0,children:d?"Wird registriert...":p>0?`Warten (${p}s)`:"Registrieren"})]})})]}),i.jsx("div",{className:"mt-6 text-center",children:i.jsx("div",{className:"border-t pt-4",children:i.jsx($,{variant:"link",onClick:()=>S("/admin"),className:"text-sm text-muted-foreground",children:"Administrator-Zugang"})})})]})]})})},K4=()=>{const[e,t]=f.useState(""),[n,r]=f.useState(""),[s,o]=f.useState(!1),[a,l]=f.useState(!0);qP();const c=Wt(),{toast:u}=Bt();f.useEffect(()=>{let h=!0;return(async()=>{var x;if(console.log("[AuthRecovery] Starting initialization..."),console.log("[AuthRecovery] Full URL:",window.location.href),console.log("[AuthRecovery] Hash:",window.location.hash),await new Promise(w=>setTimeout(w,1e3)),!h)return;const{data:{session:v},error:b}=await O.auth.getSession();
490if(console.log("[AuthRecovery] Session check:",{hasSession:!!v,error:b==null?void 0:b.message,user:(x=v==null?void 0:v.user)==null?void 0:x.email}),b){console.error("[AuthRecovery] Session error:",b),u({title:"Fehler beim Laden",description:"Es gab ein Problem beim Laden der Session. Bitte versuche es erneut.",variant:"destructive"}),c("/auth");return}if(!v){console.log("[AuthRecovery] No session found - link may be invalid or expired"),u({title:"Link abgelaufen",description:"Der Reset-Link ist abgelaufen. Bitte fordere einen neuen an.",variant:"destructive"}),c("/auth");return}console.log("[AuthRecovery] Session valid, ready for password reset"),l(!1)})(),()=>{h=!1}},[c,u]);const d=async h=>{if(h.preventDefault(),e!==n){u({title:"Passwörter stimmen nicht überein",description:"Bitte stelle sicher, dass beide Passwörter identisch sind.",variant:"destructive"});return}if(e.length<6){u({title:"Passwort zu kurz",description:"Das Passwort muss mindestens 6 Zeichen lang sein.",variant:"destructive"});return}o(!0);try{const{error:m}=await O.auth.updateUser({password:e});if(m)throw m;u({title:"Passwort erfolgreich geändert!",description:"Du wirst jetzt zur Anmeldeseite weitergeleitet."}),t(""),r(""),setTimeout(()=>{c("/auth")},2e3)}catch(m){u({title:"Fehler beim Passwort-Update",description:m.message,variant:"destructive"})}finally{o(!1)}};return a?i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:i.jsx(J,{className:"w-full max-w-md",children:i.jsx(Z,{className:"pt-6 text-center",children:i.jsx("p",{className:"text-muted-foreground",children:"Link wird verarbeitet..."})})})}):i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:i.jsxs(J,{className:"w-full max-w-md",children:[i.jsxs(ae,{className:"text-center",children:[i.jsx("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10",children:i.jsx(_E,{className:"h-6 w-6 text-primary"})}),i.jsx(le,{className:"text-2xl font-bold",children:"Neues Passwort setzen"}),i.jsx(Ae,{children:"Wähle ein sicheres neues Passwort für deinen Account"})]}),i.jsx(Z,{children:i.jsxs("form",{onSubmit:d,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"password",children:"Neues Passwort"}),i.jsx(ie,{id:"password",type:"password",value:e,onChange:h=>t(h.target.value),placeholder:"Mindestens 6 Zeichen",required:!0,minLength:6})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"confirmPassword",children:"Passwort bestätigen"}),i.jsx(ie,{id:"confirmPassword",type:"password",value:n,onChange:h=>r(h.target.value),placeholder:"Passwort wiederholen",required:!0,minLength:6})]}),i.jsx($,{type:"submit",className:"w-full",disabled:s,children:s?"Passwort wird aktualisiert...":"Passwort aktualisieren"}),i.jsx("div",{className:"text-center mt-4",children:i.jsx($,{type:"button",variant:"link",onClick:()=>c("/auth"),className:"text-sm text-muted-foreground",children:"Zurück zur Anmeldung"})})]})})]})})},G4=()=>{const[e,t]=f.useState(""),[n,r]=f.useState(""),[s,o]=f.useState(!1),[a,l]=f.useState(!1),c=Wt(),{toast:u}=Bt(),{user:d}=Dt();f.useEffect(()=>{O.auth.getSession().then(({data:{session:v}})=>{v!=null&&v.user&&h()}),d&&h()},[d]);const h=async()=>{if(d)try{const{data:v}=await O.from("profiles").select("role").eq("user_id",d.id).single();(v==null?void 0:v.role)==="admin"?c("/"):u({variant:"destructive",title:"Zugriff verweigert",description:"Sie haben keine Admin-Berechtigung."})}catch(v){console.error("Error checking admin role:",v)}},m=async v=>{var b;v.preventDefault(),l(!0);try{const{error:x}=await O.auth.signInWithPassword({email:e,password:n});if(x){u({variant:"destructive",title:"Anmeldung fehlgeschlagen",description:x.message});return}const{data:w}=await O.auth.getSession();if((b=w.session)!=null&&b.user){const{data:g}=await O.from("profiles").select("role").eq("user_id",w.session.user.id).single();if((g==null?void 0:g.role)!=="admin"){await O.auth.signOut(),u({variant:"destructive",title:"Zugriff verweigert",description:"Diese Seite ist nur für Administratoren zugänglich."});return}u({title:"Willkommen zurück!",description:"Sie wurden erfolgreich als Administrator angemeldet."}),c("/")}}catch(x){console.error("Login error:",x),u({variant:"destructive",title:"Fehler",description:"Ein unerwarteter Fehler ist aufgetreten."})}finally{l(!1)}};return i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-primary/5 to-secondary/5 p-4",children:i.jsxs(J,{className:"w-full max-w-md",children:[i.jsxs(ae,{className:"text-center space-y-4",children:[i.jsx("div",{className:"flex justify-center",children:i.jsx("div",{className:"w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center",children:i.jsx(PE,{className:"h-8 w-8 text-primary"})})}),i.jsxs("div",{children:[i.jsx(le,{className:"text-2xl font-bold",children:"Administrator"}),i.jsx(Ae,{children:"Melden Sie sich mit Ihren Admin-Zugangsdaten an"})]})]}),i.jsxs(Z,{children:[i.jsxs("form",{onSubmit:m,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"email",children:"E-Mail-Adresse"}),i.jsx(ie,{id:"email",type:"email",placeholder:"[email protected]",value:e,onCh
490ange:v=>t(v.target.value),required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Y,{htmlFor:"password",children:"Passwort"}),i.jsxs("div",{className:"relative",children:[i.jsx(ie,{id:"password",type:s?"text":"password",placeholder:"Ihr Passwort",value:n,onChange:v=>r(v.target.value),required:!0}),i.jsx($,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>o(!s),children:s?i.jsx(yw,{className:"h-4 w-4"}):i.jsx(so,{className:"h-4 w-4"})})]})]}),i.jsx($,{type:"submit",className:"w-full",disabled:a,children:a?"Anmelden...":"Anmelden"})]}),i.jsx("div",{className:"mt-6 text-center",children:i.jsx($,{variant:"link",onClick:()=>c("/auth"),className:"text-sm text-muted-foreground",children:"Zurück zur Bewerber/Recruiter-Anmeldung"})})]})]})})},Y4=()=>{const[e,t]=f.useState([]),[n,r]=f.useState(!0),{user:s}=Dt(),o=Wt(),{toast:a}=Bt();f.useEffect(()=>{l()},[]);const l=async()=>{try{const{data:d,error:h}=await O.rpc("get_public_events").order("start_datetime",{ascending:!0});if(h)throw h;t(d||[])}catch(d){a({title:"Fehler beim Laden der Events",description:d.message,variant:"destructive"})}finally{r(!1)}},c=d=>new Date(d).toLocaleDateString("de-DE",{weekday:"long",year:"numeric",month:"long",day:"numeric"}),u=async d=>{if(s)try{const{error:h}=await O.from("favorites").insert([{user_id:s.id,event_id:d}]);if(h)throw h;a({title:"Event zu Favoriten hinzugefügt",description:"Du findest es in deinem Profil wieder."})}catch(h){h.code==="23505"?a({title:"Event bereits in Favoriten",description:"Dieses Event hast du bereits als Favorit markiert."}):a({title:"Fehler",description:h.message,variant:"destructive"})}};return n?i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("header",{className:"border-b bg-card",children:i.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center",children:[i.jsxs($,{variant:"ghost",onClick:()=>o("/"),className:"mr-4",children:[i.jsx(Bn,{className:"h-4 w-4 mr-2"}),"Zurück"]}),i.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Events"})]})}),i.jsx("div",{className:"container mx-auto px-4 py-8 flex items-center justify-center",children:i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"Events werden geladen..."})]})})]}):i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("header",{className:"border-b bg-card",children:i.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center",children:[i.jsxs($,{variant:"ghost",onClick:()=>o("/"),className:"mr-4",children:[i.jsx(Bn,{className:"h-4 w-4 mr-2"}),"Zurück"]}),i.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Aktuelle Events"})]})}),i.jsx("main",{className:"container mx-auto px-4 py-8",children:e.length===0?i.jsxs("div",{className:"text-center py-12",children:[i.jsx(tt,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),i.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Keine Events verfügbar"}),i.jsx("p",{className:"text-muted-foreground",children:"Momentan sind keine Events geplant. Schau später wieder vorbei!"})]}):i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(d=>i.jsxs(J,{className:"hover:shadow-lg transition-shadow",children:[i.jsxs(ae,{children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsx(he,{variant:"secondary",children:d.event_type}),i.jsx($,{size:"sm",variant:"ghost",onClick:()=>u(d.id),children:i.jsx(Yt,{className:"h-4 w-4"})})]}),i.jsx(le,{className:"text-lg",children:d.title}),i.jsx(Ae,{children:d.description})]}),i.jsxs(Z,{className:"space-y-3",children:[i.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[i.jsx(tt,{className:"h-4 w-4 mr-2"}),c(d.start_datetime)]}),i.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[i.jsx(Fc,{className:"h-4 w-4 mr-2"}),new Date(d.start_datetime).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"}),d.end_datetime&&` - ${new Date(d.end_datetime).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})}`]}),i.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[i.jsx(Ms,{className:"h-4 w-4 mr-2"}),d.location]}),i.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[i.jsx(_t,{className:"h-4 w-4 mr-2"}),d.current_participants," / ",d.max_participants," Teilnehmer"]}),i.jsx($,{className:"w-full mt-4",onClick:()=>o(`/events/${d.id}`),children:"Mehr Details"})]})]},d.id))})})]})},Q4=()=>{const{eventId:e}=cm(),t=Wt(),{user:n}=Dt(),{toast:r}=Bt(),[s,o]=f.useState(null),[a,l]=f.useState([]),[c,u]=f.useState([]),[d,h]=f.useState(!0);f.useEffect(()=>{e&&m()},[e,n]);const m=async()=>
490{if(e){h(!0);try{const{data:g,error:p}=await O.rpc("get_event_with_contact",{event_uuid:e}).single();if(p)throw p;const{data:y,error:_}=await O.from("event_companies").select(`
491          companies (
492            id,
493            name,
494            description,
495            website,
496            linkedin,
497            xing,
498            other_link,
499            locations
500          )
501        `).eq("event_id",e);if(_)throw _;if(o(g),l((y==null?void 0:y.map(E=>E.companies))||[]),n){const{data:E}=await O.from("profiles").select("id, user_id").eq("user_id",n.id).single();if(E){const{data:C}=await O.from("company_favorites").select("company_id").eq("user_id",E.id).eq("event_id",e);u((C==null?void 0:C.map(j=>j.company_id))||[])}}}catch(g){r({title:"Fehler beim Laden",description:g.message,variant:"destructive"})}finally{h(!1)}}},v=async g=>{if(!(!n||!e))try{const{data:p}=await O.from("profiles").select("id, user_id").eq("user_id",n.id).single();if(!p)return;if(c.includes(g)){const{error:_}=await O.from("company_favorites").delete().eq("user_id",p.id).eq("company_id",g).eq("event_id",e);if(_)throw _;u(E=>E.filter(C=>C!==g)),r({title:"Favorit entfernt",description:"Das Unternehmen wurde aus Ihren Favoriten entfernt."})}else{const{error:_}=await O.from("company_favorites").insert({user_id:p.id,company_id:g,event_id:e});if(_)throw _;u(E=>[...E,g]),r({title:"Favorit hinzugefügt",description:"Das Unternehmen wurde zu Ihren Favoriten hinzugefügt."})}}catch(p){r({title:"Fehler",description:p.message,variant:"destructive"})}};if(d)return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("header",{className:"border-b bg-card",children:i.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsxs($,{variant:"ghost",onClick:()=>t(-1),className:"mr-4",children:[i.jsx(Bn,{className:"h-4 w-4 mr-2"}),"Zurück"]}),i.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Event Details"})]}),i.jsx($,{variant:"outline",onClick:()=>t("/events"),children:"Alle Events"})]})}),i.jsx("div",{className:"container mx-auto px-4 py-8 flex items-center justify-center",children:i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"Event wird geladen..."})]})})]});if(!s)return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("header",{className:"border-b bg-card",children:i.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsxs($,{variant:"ghost",onClick:()=>t(-1),className:"mr-4",children:[i.jsx(Bn,{className:"h-4 w-4 mr-2"}),"Zurück"]}),i.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Event nicht gefunden"})]}),i.jsx($,{variant:"outline",onClick:()=>t("/events"),children:"Alle Events"})]})}),i.jsx("div",{className:"container mx-auto px-4 py-8 text-center",children:i.jsx("p",{className:"text-muted-foreground",children:"Das gewünschte Event konnte nicht gefunden werden."})})]});const b=new Date(s.start_datetime),x=new Date(s.end_datetime),w=s.registration_deadline?new Date(s.registration_deadline):null;return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("header",{className:"border-b bg-card",children:i.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsxs($,{variant:"ghost",onClick:()=>t(-1),className:"mr-4",children:[i.jsx(Bn,{className:"h-4 w-4 mr-2"}),"Zurück"]}),i.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Event Details"})]}),i.jsx($,{variant:"outline",onClick:()=>t("/events"),children:"Alle Events"})]})}),i.jsxs("main",{className:"container mx-auto px-4 py-8 space-y-8",children:[i.jsx("div",{className:"grid grid-cols-1 gap-6",children:i.jsx("div",{children:i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx("div",{className:"flex justify-between items-start mb-4",children:i.jsxs("div",{children:[i.jsx(he,{variant:"outline",className:"mb-2",children:s.event_type}),i.jsx(le,{className:"text-2xl",children:s.title})]})}),i.jsx(Ae,{className:"text-base",children:s.description})]}),i.jsxs(Z,{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(tt,{className:"h-5 w-5 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Datum"}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:[b.toLocaleDateString("de-DE")," - ",x.toLocaleDateString("de-DE")]})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Fc,{className:"h-5 w-5 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Uhrzeit"}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:[b.toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})," -",x.toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Ms,{className:"h-5 w-5 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Ort"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:s.location})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(_t,{className:"h-5 w-5 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Teilnehmer"}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.current_participants,"/",s.max_participants]})]})]})]}),w&&i.jsx("div",{className:"bg-muted/50 p-4 rounded-lg",children:i.jsxs("p",{className:"text-sm",children:[i.jsx("strong",{children:"Anmeldeschluss:"})," ",w.toLocaleDateString("de-DE")]})}),n&&s.contact_email&&i.jsxs("div",{className:"bg-muted/50 p-4 rounded-lg",children:[i.jsx("p",{className:"text-sm mb-2",children:i.jsx("strong",{children:"Kontakt:"})}),i.jsxs("div",{className:"space-y-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(sr,{className:"h-4 w-4"}
501),i.jsx("a",{href:`mailto:${s.contact_email}`,className:"text-blue-600 hover:underline",children:s.contact_email})]}),s.contact_phone&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(kE,{className:"h-4 w-4"}),i.jsx("a",{href:`tel:${s.contact_phone}`,className:"text-blue-600 hover:underline",children:s.contact_phone})]})]})]}),!n&&(s.contact_email||s.contact_phone)&&i.jsx("div",{className:"bg-muted/50 p-4 rounded-lg",children:i.jsxs("p",{className:"text-sm text-muted-foreground",children:[i.jsx("strong",{children:"Kontaktinformationen:"})," Melden Sie sich an, um die Kontaktdaten des Veranstalters zu sehen."]})})]})]})})}),i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsxs(le,{className:"flex items-center text-xl",children:[i.jsx(sc,{className:"h-6 w-6 mr-2"}),"Teilnehmende Unternehmen (",a.length,")"]}),i.jsx(Ae,{children:"Entdecken Sie die Unternehmen, die an diesem Event teilnehmen. Markieren Sie interessante Unternehmen als Favoriten. Sie können mit Ihren Favoriten über das Dashboard Kontakt aufnehmen."})]}),i.jsx(Z,{children:a.length===0?i.jsxs("div",{className:"text-center py-12",children:[i.jsx(sc,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),i.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Noch keine Unternehmen angemeldet"}),i.jsx("p",{className:"text-muted-foreground",children:"Die Unternehmen werden hier angezeigt, sobald sie sich für das Event angemeldet haben."})]}):i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map(g=>{const p=c.includes(g.id);return i.jsxs(J,{className:`transition-all duration-200 hover:shadow-lg ${p?"ring-2 ring-primary/20 bg-primary/5":""}`,children:[i.jsxs(ae,{className:"pb-3",children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsx(le,{className:"text-lg",children:g.name}),n&&i.jsx($,{size:"sm",variant:"ghost",onClick:()=>v(g.id),className:p?"text-red-500":"text-muted-foreground hover:text-red-500",children:i.jsx(Yt,{className:`h-4 w-4 ${p?"fill-current":""}`})})]}),g.description&&i.jsxs(k2,{children:[i.jsx(C2,{asChild:!0,children:i.jsx(Ae,{className:"line-clamp-3 cursor-help",children:g.description})}),i.jsx(m0,{className:"max-w-md p-3",children:i.jsx("p",{className:"text-sm",children:g.description})})]})]}),i.jsxs(Z,{className:"space-y-4",children:[g.locations&&g.locations.length>0&&i.jsxs("div",{className:"flex flex-wrap gap-1",children:[g.locations.slice(0,3).map((y,_)=>i.jsxs(he,{variant:"outline",className:"text-xs",children:[i.jsx(Ms,{className:"h-3 w-3 mr-1"}),y]},_)),g.locations.length>3&&i.jsxs(he,{variant:"outline",className:"text-xs",children:["+",g.locations.length-3," weitere"]})]}),i.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.website&&i.jsx($,{size:"sm",variant:"outline",asChild:!0,className:"flex-1",children:i.jsxs("a",{href:g.website,target:"_blank",rel:"noopener noreferrer",children:[i.jsx(bE,{className:"h-3 w-3 mr-1"}),"Website"]})}),g.linkedin&&i.jsx($,{size:"sm",variant:"outline",asChild:!0,className:"flex-1",children:i.jsxs("a",{href:g.linkedin,target:"_blank",rel:"noopener noreferrer",children:[i.jsx(jw,{className:"h-3 w-3 mr-1"}),"LinkedIn"]})}),g.xing&&i.jsx($,{size:"sm",variant:"outline",asChild:!0,className:"flex-1",children:i.jsxs("a",{href:g.xing,target:"_blank",rel:"noopener noreferrer",children:[i.jsx(la,{className:"h-3 w-3 mr-1"}),"Karriereinformationen"]})}),g.other_link&&i.jsx($,{size:"sm",variant:"outline",asChild:!0,className:"flex-1",children:i.jsxs("a",{href:g.other_link,target:"_blank",rel:"noopener noreferrer",children:[i.jsx(jE,{className:"h-3 w-3 mr-1"}),"Weitere Informationen"]})})]}),p&&i.jsx("div",{className:"bg-primary/10 border border-primary/20 rounded-lg p-2",children:i.jsxs("div",{className:"flex items-center text-sm text-primary",children:[i.jsx(Yt,{className:"h-3 w-3 mr-1 fill-current"}),"In Ihren Favoriten"]})})]})]},g.id)})})})]})]})]})},X4=()=>{const{eventId:e}=cm(),t=Wt(),{user:n}=Dt(),{profile:r,loading:s}=qs(),{toast:o}=Bt(),[a,l]=f.useState(null),[c,u]=f.useState([]),[d,h]=f.useState([]),[m,v]=f.useState(!0),[b,x]=f.useState(null),[w,g]=f.useState({studienrichtung:"",minSemester
501:"",maxSemester:"",note:"",onlyFavorites:!1});f.useEffect(()=>{if(!s&&r&&r.role!=="recruiter"){console.log("Access denied: User is not a recruiter, redirecting to home"),t("/",{replace:!0});return}},[r,s,t]),f.useEffect(()=>{if(e&&n&&(r==null?void 0:r.role)==="recruiter"){p();const j=O.channel("event-participants-changes").on("postgres_changes",{event:"*",schema:"public",table:"event_participants",filter:`event_id=eq.${e}`},S=>{p()}).on("postgres_changes",{event:"*",schema:"public",table:"bewerber_favorites"},S=>{p()}).subscribe();return()=>{O.removeChannel(j)}}},[e,n,r==null?void 0:r.role]),f.useEffect(()=>{y()},[c,w]);const p=async()=>{var j;if(e){v(!0);try{const{data:S,error:k}=await O.from("events").select("*").eq("id",e).single();if(k)throw k;l(S);const{data:N}=await O.from("profiles").select("id").eq("user_id",n==null?void 0:n.id).single();if(!N)return;const{data:P,error:M}=await O.from("event_participants").select(`
502          user_id,
503          profiles!inner(id, user_id, first_name, last_name, email)
504        `).eq("event_id",e);if(M)throw console.error("Participants error:",M),M;let W=[];const F=(R,A)=>{const L=[];for(let T=0;T<R.length;T+=A)L.push(R.slice(T,T+A));return L};if(P&&P.length>0){const R=P.map(Q=>Q.profiles.user_id),L=F(R,20).map(Q=>O.from("bewerber_profiles").select("user_id, studienrichtung, semester, note, gespraechsinteresse").in("user_id",Q)),T=await Promise.all(L),I=T.filter(Q=>Q.error);I.length>0&&(console.error("Bewerber Profiles Errors:",I.map(Q=>Q.error)),o({title:"Fehler beim Laden der Bewerber-Profile",description:((j=I[0].error)==null?void 0:j.message)||"Unbekannter Fehler",variant:"destructive"}));const D=T.flatMap(Q=>Q.data||[]),U=new Map(D.map(Q=>[Q.user_id,Q])),{data:K}=await O.from("bewerber_favorites").select("bewerber_id").eq("recruiter_id",N.id),q=new Set((K==null?void 0:K.map(Q=>Q.bewerber_id))||[]);W=P.map(Q=>{const V=U.get(Q.profiles.user_id);return{id:Q.profiles.id,first_name:Q.profiles.first_name||"",last_name:Q.profiles.last_name||"",email:Q.profiles.email||"",studienrichtung:(V==null?void 0:V.studienrichtung)||[],semester:V==null?void 0:V.semester,note:V==null?void 0:V.note,gespraechsinteresse:(V==null?void 0:V.gespraechsinteresse)||[],is_favorite:q.has(Q.profiles.id)}})}u(W)}catch(S){console.error("Load Event Details Error:",S),o({title:"Fehler beim Laden",description:S.message,variant:"destructive"})}finally{v(!1)}}},y=()=>{let j=[...c];w.studienrichtung&&w.studienrichtung!=="all"&&(j=j.filter(S=>{var k;return(k=S.studienrichtung)==null?void 0:k.some(N=>N.toLowerCase().includes(w.studienrichtung.toLowerCase()))})),w.minSemester&&(j=j.filter(S=>S.semester&&S.semester>=parseInt(w.minSemester))),w.maxSemester&&(j=j.filter(S=>S.semester&&S.semester<=parseInt(w.maxSemester))),w.note&&w.note!=="all"&&(j=j.filter(S=>S.note&&S.note.toLowerCase().includes(w.note.toLowerCase()))),w.onlyFavorites&&(j=j.filter(S=>S.is_favorite)),h(j)},_=async j=>{if(!(!n||!e))try{const{data:S}=await O.from("profiles").select("id").eq("user_id",n.id).single();if(!S)return;const k=c.find(N=>N.id===j);if(!k)return;if(k.is_favorite){const{error:N}=await O.from("bewerber_favorites").delete().eq("recruiter_id",S.id).eq("bewerber_id",j).eq("event_id",e);if(N)throw N;o({title:"Favorit entfernt",description:"Der Bewerber wurde aus Ihren Favoriten entfernt."})}else{const{error:N}=await O.from("bewerber_favorites").insert({recruiter_id:S.id,bewerber_id:j,event_id:e});if(N)throw N;o({title:"Favorit hinzugefügt",description:"Der Bewerber wurde zu Ihren Favoriten hinzugefügt."})}u(N=>N.map(P=>P.id===j?{...P,is_favorite:!P.is_favorite}:P))}catch(S){o({title:"Fehler",description:S.message,variant:"destructive"})}};if(m)return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("header",{className:"border-b bg-card",children:i.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center",children:[i.jsxs($,{variant:"ghost",onClick:()=>t("/"),className:"mr-4",children:[i.jsx(Bn,{className:"h-4 w-4 mr-2"}),"Zurück zum Dashboard"]}),i.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Event Details"})]})}),i.jsx("div",{className:"container mx-auto px-4 py-8 flex items-center justify-center",children:i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"Event wird geladen..."})]})})]});if(!a)return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("header",{className:"border-b bg-card",children:i.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center",children:[i.jsxs($,{variant:"ghost",onClick:()=>t("/"),className:"mr-4",children:[i.jsx(Bn,{className:"h-4 w-4 mr-2"}),"Zurück zum Dashboard"]}),i.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Event nicht gefunden"})]})}),i.jsx("div",{className:"container mx-auto px-4 py-8 text-center",children:i.jsx("p",{className:"text-muted-foreground",children:"Das gewünschte Event konnte nicht gefunden werden."})})]});const E=new Date(a.start_datetime),C=new Date(a.end_datetime);return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx("header",{className:"border-b bg-card",children:i.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center",children:[i.jsxs($,{variant:"ghost",onClick:()=>t("/"),className:"mr-4",children:[i.jsx(Bn,{className:"h-4 w-4 mr-2"}),"Zurück zum Dashboard"]}),i.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Event Details (Recruiter)"})]})}),i.jsxs("main",{className:"container mx-auto px-4 py-8 space-y-8",children:[i.jsxs(J,{children:[i.jsxs(ae,{children:[i.jsx("div",{className:"flex justify-between items-start mb-4",children:i.jsxs("div",{children:[i.jsx(he,{variant:"outline",className:"mb-2",children:a.event_type}),i.jsx(le,{className:"text-2xl",children:a.title})]})}),i.jsx(Ae,{className:"text-base",children:a.description})]}),i.jsx(Z,{className:"space-y-4",children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(tt,{className:"h-5 w-5 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Datum"}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:[E.toLocaleDateString("de-DE")," - ",C.toLocaleDateString("de-DE")]})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Fc,{className:"h-5 w-5 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Uhrzeit"}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:[E.toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})," -",C.toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Ms,{className:"h-5 w-5 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Ort"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:a.location})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(_t,{className:"h-5 w-5 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Teilnehmer"}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:[c.length,"/",a.max_participants]})]})]})]})})]}),i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"text-lg flex items-center",children:[i.jsx(ww,{className:"h-4 w-4 mr-2"}),"Bewerber Filter"]})}),i.jsxs(Z,{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"studienrichtung",children:"Studienrichtung"}),i.jsxs(ct,{value:w.studienrichtung,onValueChange:j=>g({...w,studienrichtung:j}),children:[i.jsx(rt,{children:i.jsx(ut,{placeholder:"Studienrichtung wählen"})}),i.jsxs(st,{className:"bg-background border z-50",children:[i.jsx(se,{value:"all",children:"Alle"}),i.jsx(se,{value:"Geisteswissenschaften",children:"Geisteswissenschaften"}),i.jsx(se,{value:"Jura",children:"Jura"}),i.jsx(se,{value:"Sozialwissenschaften",children:"Sozialwissenschaften"}),i.jsx(se,{value:"BWL/Wirtschaft",children:"BWL/Wirtschaft"}),i.jsx(se,{value:"MINT",children:"MINT"}),i.jsx(se,{value:"Sonstige",children:"Sonstige"})]})]})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"minSemester",children:"Min. Semester"}),i.jsx(ie,{id:"minSemester",type:"number",value:w.minSemester,onChange:j=>
504g({...w,minSemester:j.target.value}),placeholder:"1"})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"maxSemester",children:"Max. Semester"}),i.jsx(ie,{id:"maxSemester",type:"number",value:w.maxSemester,onChange:j=>g({...w,maxSemester:j.target.value}),placeholder:"10"})]}),i.jsxs("div",{children:[i.jsx(Y,{htmlFor:"note",children:"Note (Text)"}),i.jsxs(ct,{value:w.note,onValueChange:j=>g({...w,note:j}),children:[i.jsx(rt,{children:i.jsx(ut,{placeholder:"Note wählen"})}),i.jsxs(st,{children:[i.jsx(se,{value:"all",children:"Alle"}),i.jsx(se,{value:"sehr gut",children:"sehr gut"}),i.jsx(se,{value:"gut",children:"gut"}),i.jsx(se,{value:"voll befriedigend (nur Jura)",children:"voll befriedigend (nur Jura)"}),i.jsx(se,{value:"befriedigend",children:"befriedigend"}),i.jsx(se,{value:"ausreichend",children:"ausreichend"})]})]})]})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(or,{id:"onlyFavorites",checked:w.onlyFavorites,onCheckedChange:j=>g({...w,onlyFavorites:j})}),i.jsx(Y,{htmlFor:"onlyFavorites",children:"Nur Favoriten anzeigen"})]})]})]}),i.jsxs(J,{children:[i.jsx(ae,{children:i.jsx(le,{className:"text-lg flex items-center justify-between",children:i.jsxs("span",{className:"flex items-center",children:[i.jsx(Xr,{className:"h-4 w-4 mr-2"}),"Angemeldete Bewerber (",d.length,")"]})})}),i.jsx(Z,{children:d.length===0?i.jsxs("div",{className:"text-center py-12",children:[i.jsx(_t,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),i.jsx("h3",{className:"text-lg font-semibold mb-2",children:c.length===0?"Keine Bewerber angemeldet":"Keine Bewerber gefunden"}),i.jsx("p",{className:"text-muted-foreground",children:c.length===0?"Für dieses Event haben sich noch keine Bewerber angemeldet.":"Passen Sie die Filter an oder entfernen Sie sie."})]}):i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(j=>i.jsxs(J,{className:`transition-all duration-200 hover:shadow-lg ${j.is_favorite?"ring-2 ring-primary/20 bg-primary/5":""}`,children:[i.jsx(ae,{className:"pb-3",children:i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsx("div",{className:"flex-1",children:i.jsxs(le,{className:"text-lg flex items-center gap-2",children:[j.first_name," ",j.last_name,j.is_favorite&&i.jsx(TE,{className:"h-4 w-4 text-yellow-500 fill-current"})]})}),i.jsx($,{size:"sm",variant:"ghost",onClick:()=>_(j.id),className:j.is_favorite?"text-red-500":"text-muted-foreground hover:text-red-500",children:i.jsx(Yt,{className:`h-4 w-4 ${j.is_favorite?"fill-current":""}`})})]})}),i.jsxs(Z,{className:"space-y-3",children:[i.jsxs("div",{className:"space-y-2",children:[j.studienrichtung&&j.studienrichtung.length>0&&i.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:j.studienrichtung.map((S,k)=>i.jsx(he,{variant:"secondary",className:"text-xs",children:S},k))}),i.jsxs("div",{className:"flex gap-2",children:[j.semester&&i.jsxs(he,{variant:"outline",className:"text-xs",children:[j.semester,". Semester"]}),j.note&&i.jsxs(he,{variant:"outline",className:"text-xs",children:["Note: ",j.note]})]}),j.gespraechsinteresse&&j.gespraechsinteresse.length>0&&i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Gesprächsinteresse:"}),i.jsxs("div",{className:"flex flex-wrap gap-1",children:[j.gespraechsinteresse.slice(0,3).map(S=>i.jsx(he,{variant:"default",className:"text-xs",children:S},S)),j.gespraechsinteresse.length>3&&i.jsxs(he,{variant:"outline",className:"text-xs",children:["+",j.gespraechsinteresse.length-3]})]})]})]}),i.jsx("div",{className:"flex gap-2",children:i.jsxs($,{size:"sm",variant:"outline",className:"flex-1",onClick:()=>x(j.id),children:[i.jsx(Ds,{className:"h-3 w-3 mr-1"}),"Profil"]})})]})]},j.id))})})]})]}),b&&i.jsx(Oa,{bewerberId:b,open:!!b,onOpenChange:j=>!j&&x(null)})]})},J4=()=>(f.useEffect(()=>{localStorage.removeItem("sb-prfnpherkjsdxiddwsuz-auth-token"),O.auth.signOut().catch(console.error),window.location.href="/auth"},[]),i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Abmeldung..."}),i.jsx("p",{className:"text-muted-foreground",children:"Sie werden ausgeloggt..."})]})})),Z4=()=>{const e=ka();return f.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),i.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),i.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},eI=()=>{const{eventId:e}=cm(),t=Wt(),{profile:n,loading:r}=qs(),[s,o]=f.useState(null),[a,l]=f.useState([]),[c,u]=f.useState(!0),[d,h]=f.useState(null),[m,v]=f.useState(!1);f.useEffect(()=>{if(!r&&n&&n.role!=="admin"){console.log("Access denied: User is not an admin, redirecting to home"),t("/",{replace:!0});return}},[n,r,t]),f.useEffect(()=>{!e||!(n!=null&&n.id)||n.role!=="admin"||b()},[e,n==null?void 0:n.id,n==null?void 0:n.role]);const b=async()=>
504{if(e)try{u(!0);const{data:w,error:g}=await O.from("events").select("id, title, start_datetime, end_datetime, location, current_participants, max_participants").eq("id",e).single();if(g){console.error("Error loading event:",g),re({title:"Fehler",description:"Event konnte nicht geladen werden.",variant:"destructive"});return}o(w);const{data:p,error:y}=await O.rpc("get_event_participants_with_profiles",{event_uuid:e});if(y){console.error("Error loading participants:",y),re({title:"Fehler",description:"Teilnehmer konnten nicht geladen werden.",variant:"destructive"});return}l(p||[])}catch(w){console.error("Error loading data:",w),re({title:"Fehler",description:"Daten konnten nicht geladen werden.",variant:"destructive"})}finally{u(!1)}},x=w=>{h(w),v(!0)};return c?i.jsx("div",{className:"flex items-center justify-center min-h-screen",children:i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"}),i.jsx("p",{children:"Lade Teilnehmer..."})]})}):s?i.jsxs("div",{className:"container mx-auto p-6 max-w-6xl",children:[i.jsxs("div",{className:"flex items-center mb-6",children:[i.jsxs($,{variant:"ghost",onClick:()=>t("/admin"),className:"mr-4",children:[i.jsx(Bn,{className:"mr-2 h-4 w-4"}),"Zurück"]}),i.jsxs("div",{children:[i.jsx("h1",{className:"text-3xl font-bold",children:s.title}),i.jsxs("p",{className:"text-muted-foreground",children:[new Date(s.start_datetime).toLocaleDateString("de-DE")," - ",s.location]})]})]}),i.jsx("div",{className:"grid gap-6 mb-6",children:i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"flex items-center justify-between",children:[i.jsx("span",{children:"Event-Details"}),i.jsxs(he,{variant:"secondary",children:[s.current_participants," / ",s.max_participants," Teilnehmer"]})]})}),i.jsx(Z,{children:i.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsxs("p",{children:[i.jsx("strong",{children:"Start:"})," ",new Date(s.start_datetime).toLocaleString("de-DE")]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Ende:"})," ",new Date(s.end_datetime).toLocaleString("de-DE")]})]}),i.jsx("div",{children:i.jsxs("p",{children:[i.jsx("strong",{children:"Ort:"})," ",s.location]})})]})})]})}),i.jsxs(J,{children:[i.jsx(ae,{children:i.jsxs(le,{className:"flex items-center",children:[i.jsx(ys,{className:"mr-2 h-5 w-5"}),"Teilnehmerliste (",a.length,")"]})}),i.jsx(Z,{children:a.length===0?i.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Keine Teilnehmer für dieses Event angemeldet."}):i.jsx("div",{className:"space-y-4",children:a.map(w=>i.jsx("div",{className:"border rounded-lg p-4 hover:bg-muted/50 transition-colors",children:i.jsx("div",{className:"flex items-center justify-between",children:i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[i.jsxs("h3",{className:"font-semibold text-lg",children:[w.first_name," ",w.last_name]}),i.jsxs($,{size:"sm",variant:"outline",onClick:()=>x(w.profile_id),className:"ml-auto",children:[i.jsx(so,{className:"mr-2 h-4 w-4"}),"Profil ansehen"]})]}),i.jsxs("div",{className:"grid md:grid-cols-2 gap-4 text-sm text-muted-foreground",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx(sr,{className:"mr-2 h-4 w-4"}),w.email]}),w.studiengang&&i.jsxs("div",{className:"flex items-center",children:[i.jsx(Kf,{className:"mr-2 h-4 w-4"}),w.studiengang,w.semester&&` (${w.semester}. Semester)`]})]}),w.note&&i.jsx("div",{className:"mt-2",children:i.jsxs(he,{variant:"outline",children:["Note: ",w.note]})})]})})},w.participant_id))})})]}),i.jsx(Oa,{bewerberId:d,open:m,onOpenChange:v})]}):i.jsx("div",{className:"flex items-center justify-center min-h-screen",children:i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-muted-foreground",children:"Event nicht gefunden"}),i.jsxs($,{onClick:()=>t("/admin"),className:"mt-4",children:[i.jsx(Bn,{className:"mr-2 h-4 w-4"}),"Zurück zur Übersicht"]})]})})},tI=new Q2,nI=()=>i.jsx(J2,{client:tI,children:i.jsxs(E2,{children:[i.jsx(yk,{}),i.jsx(Gk,{}),i.jsx(HP,{children:i.jsxs(zP,{children:[i.jsx(pn,{path:"/",element:i.jsx(H4,{})}),i.jsx(pn,{path:"/auth",element:i.jsx(q4,{})}),i.jsx(pn,{path:"/auth/recovery",element:i.jsx(K4,{})}),i.jsx(pn,{path:"/admin",element:i.jsx(G4,{})}),i.jsx(pn,{path:"/events",element:i.jsx(Y4,{})}),i.jsx(pn,{path:"/events/:eventId",element:i.jsx(Q4,{})}),i.jsx(pn,{path:"/recruiter/events/:eventId",element:i.jsx(X4,{})}),i.jsx(pn,{path:"/admin/events/:eventId/participants",element:i.jsx(eI,{})}),i.jsx(pn,{path:"/logout",element:i.jsx(J4,{})}),i.jsx(pn,{path:"*",element:i.jsx(Z4,{})})]})})]})});zy(document.getElementById("root")).render(i.jsx(G.StrictMode,{children:i.jsx(nI,{})}));

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.