vendor: 7,250 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardOverview-B8jzTR21.js","assets/user-plus-B-G0GQfx.js","assets/FeaturedCatalogManager-Cs6LwIMc.js","assets/dnd.esm-B33xOSHH.js","assets/SectionManagement-C1vDJiwD.js","assets/InstructorManager-Bl7YnBUk.js","assets/pencil-DSST7qj_.js","assets/PromoCodeManager-BwSuCDcI.js","assets/UserUtilities-BY2oXGTn.js"])))=>i.map(i=>d[i]); 2var nM=Object.defineProperty;var sN=e=>{throw TypeError(e)};var aM=(e,t,r)=>t in e?nM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var rN=(e,t,r)=>aM(e,typeof t!="symbol"?t+"":t,r),Gg=(e,t,r)=>t.has(e)||sN("Cannot "+r);var Q=(e,t,r)=>(Gg(e,t,"read from private field"),r?r.call(e):t.get(e)),Qe=(e,t,r)=>t.has(e)?sN("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Me=(e,t,r,n)=>(Gg(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),vt=(e,t,r)=>(Gg(e,t,"access private method"),r);var uh=(e,t,r,n)=>({set _(a){Me(e,t,a,r)},get _(){return Q(e,t,n)}});function iM(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var Sn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oM(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}var gS={exports:{}},Pp={},xS={exports:{}},xt={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var Mm=Symbol.for("react.element"),lM=Symbol.for("react.portal"),cM=Symbol.for("react.fragment"),dM=Symbol.for("react.strict_mode"),uM=Symbol.for("react.profiler"),mM=Symbol.for("react.provider"),hM=Symbol.for("react.context"),fM=Symbol.for("react.forward_ref"),pM=Symbol.for("react.suspense"),gM=Symbol.for("react.memo"),xM=Symbol.for("react.lazy"),nN=Symbol.iterator;function vM(e){return e===null||typeof e!="object"?null:(e=nN&&e[nN]||e["@@iterator"],typeof e=="function"?e:null)}var vS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yS=Object.assign,bS={};function jd(e,t,r){this.props=e,this.context=t,this.refs=bS,this.updater=r||vS}jd.prototype.isReactComponent={};jd.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")};jd.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function wS(){}wS.prototype=jd.prototype;function Fb(e,t,r){this.props=e,this.context=t,this.refs=bS,this.updater=r||vS}var $b=Fb.prototype=new wS;$b.constructor=Fb;yS($b,jd.prototype);$b.isPureReactComponent=!0;var aN=Array.isArray,jS=Object.prototype.hasOwnProperty,Ub={current:null},NS={key:!0,ref:!0,__self:!0,__source:!0};function _S(e,t,r){var n,a={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)jS.call(t,n)&&!NS.hasOwnProperty(n)&&(a[n]=t[n]);var l=arguments.length-2;if(l===1)a.children=r;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];a.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)a[n]===void 0&&(a[n]=l[n]);return{$$typeof:Mm,type:e,key:i,ref:o,props:a,_owner:Ub.current}}function yM(e,t){return{$$typeof:Mm,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Bb(e){return typeof e=="object"&&e!==null&&e.$$typeof===Mm}function bM(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var iN=/\/+/g;function Yg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?bM(""+e.key):t.toString(36)}function Kh(e,t,r,n,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Mm:case lM:o=!0}}if(o)return o=e,a=a(o),e=n===""?"."+Yg(o,0):n,aN(a)?(r="",e!=null&&(r=e.replace(iN,"$&/")+"/"),Kh(a,t,r,"",function(d){return d})):a!=null&&(Bb(a)&&(a=yM(a,r+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(iN,"$&/")+"/")+e)),t.push(a)),1;if(o=0,n=n===""?".":n+":",aN(e))for(var l=0;l<e.length;l++){i=e[l];var c=n+Yg(i,l);o+=Kh(i,t,r,c,a)}else if(c=vM(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=n+Yg(i,l++),o+=Kh(i,t,r,c,a);else if(i==="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 o}function mh(e,t,r){if(e==null)return e;var n=[],a=0;return Kh(e,n,"","",function(i){return t.call(r,i,a++)}),n}function wM(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var br={current:null},Qh={transition:null},jM={ReactCurrentDispatcher:br,ReactCurrentBatchConfig:Qh,ReactCurrentOwner:Ub};function kS(){throw Error("act(...) is not supported in production builds of React.")}xt.Children={map:mh,forEach:function(e,t,r){mh(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return mh(e,function(){t++}),t},toArray:function(e){return mh(e,function(t){return t})||[]},only:function(e){if(!Bb(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};xt.Component=jd;xt.Fragment=cM;xt.Profiler=uM;xt.PureComponent=Fb;xt.StrictMode=dM;xt.Suspense=pM;
vendor: 4,668 bytes, lines 10-26
10xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jM;xt.act=kS;xt.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=yS({},e.props),a=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Ub.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)jS.call(t,c)&&!NS.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];n.children=l}return{$$typeof:Mm,type:e.type,key:a,ref:i,props:n,_owner:o}};xt.createContext=function(e){return e={$$typeof:hM,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:mM,_context:e},e.Consumer=e};xt.createElement=_S;xt.createFactory=function(e){var t=_S.bind(null,e);return t.type=e,t};xt.createRef=function(){return{current:null}};xt.forwardRef=function(e){return{$$typeof:fM,render:e}};xt.isValidElement=Bb;xt.lazy=function(e){return{$$typeof:xM,_payload:{_status:-1,_result:e},_init:wM}};xt.memo=function(e,t){return{$$typeof:gM,type:e,compare:t===void 0?null:t}};xt.startTransition=function(e){var t=Qh.transition;Qh.transition={};try{e()}finally{Qh.transition=t}};xt.unstable_act=kS;xt.useCallback=function(e,t){return br.current.useCallback(e,t)};xt.useContext=function(e){return br.current.useContext(e)};xt.useDebugValue=function(){};xt.useDeferredValue=function(e){return br.current.useDeferredValue(e)};xt.useEffect=function(e,t){return br.current.useEffect(e,t)};xt.useId=function(){return br.current.useId()};xt.useImperativeHandle=function(e,t,r){return br.current.useImperativeHandle(e,t,r)};xt.useInsertionEffect=function(e,t){return br.current.useInsertionEffect(e,t)};xt.useLayoutEffect=function(e,t){return br.current.useLayoutEffect(e,t)};xt.useMemo=function(e,t){return br.current.useMemo(e,t)};xt.useReducer=function(e,t,r){return br.current.useReducer(e,t,r)};xt.useRef=function(e){return br.current.useRef(e)};xt.useState=function(e){return br.current.useState(e)};xt.useSyncExternalStore=function(e,t,r){return br.current.useSyncExternalStore(e,t,r)};xt.useTransition=function(){return br.current.useTransition()};xt.version="18.3.1";xS.exports=xt;var h=xS.exports;const ie=pS(h),zb=iM({__proto__:null,default:ie},[h]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var NM=h,_M=Symbol.for("react.element"),kM=Symbol.for("react.fragment"),SM=Object.prototype.hasOwnProperty,CM=NM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,EM={key:!0,ref:!0,__self:!0,__source:!0};function SS(e,t,r){var n,a={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)SM.call(t,n)&&!EM.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:_M,type:e,key:i,ref:o,props:a,_owner:CM.current}}Pp.Fragment=kM;Pp.jsx=SS;Pp.jsxs=SS;gS.exports=Pp;var s=gS.exports,CS={exports:{}},dn={},ES={exports:{}},PS={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(M,D){var $=M.length;M.push(D);e:for(;0<$;){var W=$-1>>>1,X=M[W];if(0<a(X,D))M[W]=D,M[$]=X,$=W;else break e}}function r(M){return M.length===0?null:M[0]}function n(M){if(M.length===0)return null;var D=M[0],$=M.pop();if($!==D){M[0]=$;e:for(var W=0,X=M.length,q=X>>>1;W<q;){var H=2*(W+1)-1,se=M[H],te=H+1,B=M[te];if(0>a(se,$))te<X&&0>a(B,se)?(M[W]=B,M[te]=$,W=te):(M[W]=se,M[H]=$,W=H);else if(te<X&&0>a(B,$))M[W]=B,M[te]=$,W=te;else break e}}return D}function a(M,D){var $=M.sortIndex-D.sortIndex;return $!==0?$:M.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],d=[],u=1,m=null,f=3,p=!1,v=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);
vendor: 9,539 bytes, lines 26-35
26function w(M){for(var D=r(d);D!==null;){if(D.callback===null)n(d);else if(D.startTime<=M)n(d),D.sortIndex=D.expirationTime,t(c,D);else break;D=r(d)}}function j(M){if(g=!1,w(M),!v)if(r(c)!==null)v=!0,O(N);else{var D=r(d);D!==null&&P(j,D.startTime-M)}}function N(M,D){v=!1,g&&(g=!1,y(_),_=-1),p=!0;var $=f;try{for(w(D),m=r(c);m!==null&&(!(m.expirationTime>D)||M&&!T());){var W=m.callback;if(typeof W=="function"){m.callback=null,f=m.priorityLevel;var X=W(m.expirationTime<=D);D=e.unstable_now(),typeof X=="function"?m.callback=X:m===r(c)&&n(c),w(D)}else n(c);m=r(c)}if(m!==null)var q=!0;else{var H=r(d);H!==null&&P(j,H.startTime-D),q=!1}return q}finally{m=null,f=$,p=!1}}var S=!1,E=null,_=-1,I=5,R=-1;function T(){return!(e.unstable_now()-R<I)}function k(){if(E!==null){var M=e.unstable_now();R=M;var D=!0;try{D=E(!0,M)}finally{D?C():(S=!1,E=null)}}else S=!1}var C;if(typeof x=="function")C=function(){x(k)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,L=A.port2;A.port1.onmessage=k,C=function(){L.postMessage(null)}}else C=function(){b(k,0)};function O(M){E=M,S||(S=!0,C())}function P(M,D){_=b(function(){M(e.unstable_now())},D)}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(M){M.callback=null},e.unstable_continueExecution=function(){v||p||(v=!0,O(N))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(M){switch(f){case 1:case 2:case 3:var D=3;break;default:D=f}var $=f;f=D;try{return M()}finally{f=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,D){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var $=f;f=M;try{return D()}finally{f=$}},e.unstable_scheduleCallback=function(M,D,$){var W=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?W+$:W):$=W,M){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=$+X,M={id:u++,callback:D,priorityLevel:M,startTime:$,expirationTime:X,sortIndex:-1},$>W?(M.sortIndex=$,t(d,M),r(c)===null&&M===r(d)&&(g?(y(_),_=-1):g=!0,P(j,$-W))):(M.sortIndex=X,t(c,M),v||p||(v=!0,O(N))),M},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(M){var D=f;return function(){var $=f;f=D;try{return M.apply(this,arguments)}finally{f=$}}}})(PS);ES.exports=PS;var PM=ES.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var TM=h,ln=PM;function we(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var TS=new Set,Wu={};function Ol(e,t){Jc(e,t),Jc(e+"Capture",t)}function Jc(e,t){for(Wu[e]=t,e=0;e<t.length;e++)TS.add(t[e])}var fi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gv=Object.prototype.hasOwnProperty,AM=/^[: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]*$/,oN={},lN={};function IM(e){return gv.call(lN,e)?!0:gv.call(oN,e)?!1:AM.test(e)?lN[e]=!0:(oN[e]=!0,!1)}function RM(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function MM(e,t,r,n){if(t===null||typeof t>"u"||RM(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function wr(e,t,r,n,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Vs={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vs[e]=new wr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vs[t]=new wr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vs[e]=new wr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vs[e]=new wr(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){Vs[e]=new wr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vs[e]=new wr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vs[e]=new wr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vs[e]=new wr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vs[e]=new wr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wb=/[\-:]([a-z])/g;function Vb(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(Wb,Vb);Vs[t]=new wr(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(Wb,Vb);Vs[t]=new wr(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(Wb,Vb);Vs[t]=new wr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vs[e]=new wr(e,1,!1,e.toLowerCase(),null,!1,!1)});Vs.xlinkHref=new wr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vs[e]=new wr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Hb(e,t,r,n){var a=Vs.hasOwnProperty(t)?Vs[t]:null;(a!==null?a.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(MM(t,r,a,n)&&(r=null),n||a===null?IM(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,n=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var ji=TM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hh=Symbol.for("react.element"),fc=Symbol.for("react.portal"),pc=Symbol.for("react.fragment"),qb=Symbol.for("react.strict_mode"),xv=Symbol.for("react.profiler"),AS=Symbol.for("react.provider"),IS=Symbol.for("react.context"),Gb=Symbol.for("react.forward_ref"),vv=Symbol.for("react.suspense"),yv=Symbol.for("react.suspense_list"),Yb=Symbol.for("react.memo"),Fi=Symbol.for("react.lazy"),RS=Symbol.for("react.offscreen"),cN=Symbol.iterator;function zd(e){return e===null||typeof e!="object"?null:(e=cN&&e[cN]||e["@@iterator"],typeof e=="function"?e:null)}var Xt=Object.assign,Kg;function du(e){if(Kg===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Kg=t&&t[1]||""}return` 35`+Kg+e}var Qg=!1;function Xg(e,t){if(!e||Qg)return"";Qg=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var n=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){n=d}e.call(t.prototype)}else{try{throw Error()}catch(d){n=d}e()}}
vendor: 15,818 bytes, lines 35-38
35catch(d){if(d&&n&&typeof d.stack=="string"){for(var a=d.stack.split(` 36`),i=n.stack.split(` 37`),o=a.length-1,l=i.length-1;1<=o&&0<=l&&a[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(a[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||a[o]!==i[l]){var c=` 38`+a[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{Qg=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?du(e):""}function OM(e){switch(e.tag){case 5:return du(e.type);case 16:return du("Lazy");case 13:return du("Suspense");case 19:return du("SuspenseList");case 0:case 2:case 15:return e=Xg(e.type,!1),e;case 11:return e=Xg(e.type.render,!1),e;case 1:return e=Xg(e.type,!0),e;default:return""}}function bv(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 pc:return"Fragment";case fc:return"Portal";case xv:return"Profiler";case qb:return"StrictMode";case vv:return"Suspense";case yv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case IS:return(e.displayName||"Context")+".Consumer";case AS:return(e._context.displayName||"Context")+".Provider";case Gb:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yb:return t=e.displayName||null,t!==null?t:bv(e.type)||"Memo";case Fi:t=e._payload,e=e._init;try{return bv(e(t))}catch{}}return null}function DM(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 bv(t);case 8:return t===qb?"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 yo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function MS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function LM(e){var t=MS(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fh(e){e._valueTracker||(e._valueTracker=LM(e))}function OS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=MS(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function jf(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 wv(e,t){var r=t.checked;return Xt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function dN(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=yo(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function DS(e,t){t=t.checked,t!=null&&Hb(e,"checked",t,!1)}function jv(e,t){DS(e,t);var r=yo(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Nv(e,t.type,r):t.hasOwnProperty("defaultValue")&&Nv(e,t.type,yo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function uN(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Nv(e,t,r){(t!=="number"||jf(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var uu=Array.isArray;function Sc(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+yo(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function _v(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(we(91));return Xt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function mN(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(we(92));if(uu(r)){if(1<r.length)throw Error(we(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:yo(r)}}function LS(e,t){var r=yo(t.value),n=yo(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function hN(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function FS(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 kv(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?FS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ph,$S=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ph=ph||document.createElement("div"),ph.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ph.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Nu={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},FM=["Webkit","ms","Moz","O"];Object.keys(Nu).forEach(function(e){FM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nu[t]=Nu[e]})});function US(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Nu.hasOwnProperty(e)&&Nu[e]?(""+t).trim():t+"px"}function BS(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=US(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var $M=Xt({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 Sv(e,t){if(t){if($M[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(we(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(we(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(we(61))}if(t.style!=null&&typeof t.style!="object")throw Error(we(62))}}function Cv(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 Ev=null;function Kb(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pv=null,Cc=null,Ec=null;function fN(e){if(e=Lm(e)){if(typeof Pv!="function")throw Error(we(280));var t=e.stateNode;t&&(t=Mp(t),Pv(e.stateNode,e.type,t))}}function zS(e){Cc?Ec?Ec.push(e):Ec=[e]:Cc=e}function WS(){if(Cc){var e=Cc,t=Ec;if(Ec=Cc=null,fN(e),t)for(e=0;e<t.length;e++)fN(t[e])}}function VS(e,t){return e(t)}function HS(){}var Jg=!1;function qS(e,t,r){if(Jg)return e(t,r);Jg=!0;try{return VS(e,t,r)}finally{Jg=!1,(Cc!==null||Ec!==null)&&(HS(),WS())}}function Hu(e,t){var r=e.stateNode;if(r===null)return null;var n=Mp(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(we(231,t,typeof r));return r}var Tv=!1;if(fi)try{var Wd={};Object.defineProperty(Wd,"passive",{get:function(){Tv=!0}}),window.addEventListener("test",Wd,Wd),window.removeEventListener("test",Wd,Wd)}catch{Tv=!1}function UM(e,t,r,n,a,i,o,l,c){var d=Array.prototype.slice.call(arguments,3);try{t.apply(r,d)}catch(u){this.onError(u)}}var _u=!1,Nf=null,_f=!1,Av=null,BM={onError:function(e){_u=!0,Nf=e}};function zM(e,t,r,n,a,i,o,l,c){_u=!1,Nf=null,UM.apply(BM,arguments)}function WM(e,t,r,n,a,i,o,l,c){if(zM.apply(this,arguments),_u){if(_u){var d=Nf;_u=!1,Nf=null}else throw Error(we(198));_f||(_f=!0,Av=d)}}function Dl(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function GS(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 pN(e){if(Dl(e)!==e)throw Error(we(188))}function VM(e){var t=e.alternate;if(!t){if(t=Dl(e),t===null)throw Error(we(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===r)return pN(a),e;if(i===n)return pN(a),t;i=i.sibling}throw Error(we(188))}if(r.return!==n.return)r=a,n=i;else{for(var o=!1,l=a.child;l;){if(l===r){o=!0,r=a,n=i;break}if(l===n){o=!0,n=a,r=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===r){o=!0,r=i,n=a;break}if(l===n){o=!0,n=i,r=a;break}l=l.sibling}if(!o)throw Error(we(189))}}if(r.alternate!==n)throw Error(we(190))}if(r.tag!==3)throw Error(we(188));return r.stateNode.current===r?e:t}function YS(e){return e=VM(e),e!==null?KS(e):null}function KS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=KS(e);if(t!==null)return t;e=e.sibling}return null}var QS=ln.unstable_scheduleCallback,gN=ln.unstable_cancelCallback,HM=ln.unstable_shouldYield,qM=ln.unstable_requestPaint,us=ln.unstable_now,GM=ln.unstable_getCurrentPriorityLevel,Qb=ln.unstable_ImmediatePriority,XS=ln.unstable_UserBlockingPriority,kf=ln.unstable_NormalPriority,YM=ln.unstable_LowPriority,JS=ln.unstable_IdlePriority,Tp=null,Aa=null;function KM(e){if(Aa&&typeof Aa.onCommitFiberRoot=="function")try{Aa.onCommitFiberRoot(Tp,e,void 0,(e.current.flags&128)===128)}catch{}}var Jn=Math.clz32?Math.clz32:JM,QM=Math.log,XM=Math.LN2;function JM(e){return e>>>=0,e===0?32:31-(QM(e)/XM|0)|0}var gh=64,xh=4194304;function mu(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 Sf(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var l=o&~a;l!==0?n=mu(l):(i&=o,i!==0&&(n=mu(i)))}else o=r&~a,o!==0?n=mu(o):i!==0&&(n=mu(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Jn(t),a=1<<r,n|=e[r],t&=~a;return n}function ZM(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 eO(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Jn(i),l=1<<o,c=a[o];c===-1?(!(l&r)||l&n)&&(a[o]=ZM(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function Iv(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ZS(){var e=gh;return gh<<=1,!(gh&4194240)&&(gh=64),e}function Zg(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Om(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Jn(t),e[t]=r}function tO(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-Jn(r),i=1<<a;t[a]=0,n[a]=-1,e[a]=-1,r&=~i}}function Xb(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Jn(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}var Rt=0;function e2(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var t2,Jb,s2,r2,n2,Rv=!1,vh=[],ao=null,io=null,oo=null,qu=new Map,Gu=new Map,Bi=[],sO="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 xN(e,t){switch(e){case"focusin":case"focusout":ao=null;break;case"dragenter":case"dragleave":io=null;break;case"mouseover":case"mouseout":oo=null;break;case"pointerover":case"pointerout":qu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gu.delete(t.pointerId)}}function Vd(e,t,r,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Lm(t),t!==null&&Jb(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function rO(e,t,r,n,a){switch(t){case"focusin":return ao=Vd(ao,e,t,r,n,a),!0;case"dragenter":return io=Vd(io,e,t,r,n,a),!0;case"mouseover":return oo=Vd(oo,e,t,r,n,a),!0;case"pointerover":var i=a.pointerId;
vendor: 12,776 bytes, line 38
38return qu.set(i,Vd(qu.get(i)||null,e,t,r,n,a)),!0;case"gotpointercapture":return i=a.pointerId,Gu.set(i,Vd(Gu.get(i)||null,e,t,r,n,a)),!0}return!1}function a2(e){var t=sl(e.target);if(t!==null){var r=Dl(t);if(r!==null){if(t=r.tag,t===13){if(t=GS(r),t!==null){e.blockedOn=t,n2(e.priority,function(){s2(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Mv(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ev=n,r.target.dispatchEvent(n),Ev=null}else return t=Lm(r),t!==null&&Jb(t),e.blockedOn=r,!1;t.shift()}return!0}function vN(e,t,r){Xh(e)&&r.delete(t)}function nO(){Rv=!1,ao!==null&&Xh(ao)&&(ao=null),io!==null&&Xh(io)&&(io=null),oo!==null&&Xh(oo)&&(oo=null),qu.forEach(vN),Gu.forEach(vN)}function Hd(e,t){e.blockedOn===t&&(e.blockedOn=null,Rv||(Rv=!0,ln.unstable_scheduleCallback(ln.unstable_NormalPriority,nO)))}function Yu(e){function t(a){return Hd(a,e)}if(0<vh.length){Hd(vh[0],e);for(var r=1;r<vh.length;r++){var n=vh[r];n.blockedOn===e&&(n.blockedOn=null)}}for(ao!==null&&Hd(ao,e),io!==null&&Hd(io,e),oo!==null&&Hd(oo,e),qu.forEach(t),Gu.forEach(t),r=0;r<Bi.length;r++)n=Bi[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Bi.length&&(r=Bi[0],r.blockedOn===null);)a2(r),r.blockedOn===null&&Bi.shift()}var Pc=ji.ReactCurrentBatchConfig,Cf=!0;function aO(e,t,r,n){var a=Rt,i=Pc.transition;Pc.transition=null;try{Rt=1,Zb(e,t,r,n)}finally{Rt=a,Pc.transition=i}}function iO(e,t,r,n){var a=Rt,i=Pc.transition;Pc.transition=null;try{Rt=4,Zb(e,t,r,n)}finally{Rt=a,Pc.transition=i}}function Zb(e,t,r,n){if(Cf){var a=Mv(e,t,r,n);if(a===null)cx(e,t,n,Ef,r),xN(e,n);else if(rO(a,e,t,r,n))n.stopPropagation();else if(xN(e,n),t&4&&-1<sO.indexOf(e)){for(;a!==null;){var i=Lm(a);if(i!==null&&t2(i),i=Mv(e,t,r,n),i===null&&cx(e,t,n,Ef,r),i===a)break;a=i}a!==null&&n.stopPropagation()}else cx(e,t,n,null,r)}}var Ef=null;function Mv(e,t,r,n){if(Ef=null,e=Kb(n),e=sl(e),e!==null)if(t=Dl(e),t===null)e=null;else if(r=t.tag,r===13){if(e=GS(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ef=e,null}function i2(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(GM()){case Qb:return 1;case XS:return 4;case kf:case YM:return 16;case JS:return 536870912;default:return 16}default:return 16}}var Ji=null,e0=null,Jh=null;function o2(){if(Jh)return Jh;var e,t=e0,r=t.length,n,a="value"in Ji?Ji.value:Ji.textContent,i=a.length;for(e=0;e<r&&t[e]===a[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===a[i-n];n++);return Jh=a.slice(e,1<n?1-n:void 0)}function Zh(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 yh(){return!0}function yN(){return!1}function un(e){function t(r,n,a,i,o){this._reactName=r,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?yh:yN,this.isPropagationStopped=yN,this}return Xt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=yh)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=yh)},persist:function(){},isPersistent:yh}),t}var Nd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},t0=un(Nd),Dm=Xt({},Nd,{view:0,detail:0}),oO=un(Dm),ex,tx,qd,Ap=Xt({},Dm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:s0,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!==qd&&(qd&&e.type==="mousemove"?(ex=e.screenX-qd.screenX,tx=e.screenY-qd.screenY):tx=ex=0,qd=e),ex)},movementY:function(e){return"movementY"in e?e.movementY:tx}}),bN=un(Ap),lO=Xt({},Ap,{dataTransfer:0}),cO=un(lO),dO=Xt({},Dm,{relatedTarget:0}),sx=un(dO),uO=Xt({},Nd,{animationName:0,elapsedTime:0,pseudoElement:0}),mO=un(uO),hO=Xt({},Nd,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fO=un(hO),pO=Xt({},Nd,{data:0}),wN=un(pO),gO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xO={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"},vO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yO(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vO[e])?!!t[e]:!1}function s0(){return yO}var bO=Xt({},Dm,{key:function(e){if(e.key){var t=gO[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Zh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xO[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:s0,charCode:function(e){return e.type==="keypress"?Zh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Zh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wO=un(bO),jO=Xt({},Ap,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jN=un(jO),NO=Xt({},Dm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:s0}),_O=un(NO),kO=Xt({},Nd,{propertyName:0,elapsedTime:0,pseudoElement:0}),SO=un(kO),CO=Xt({},Ap,{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}),EO=un(CO),PO=[9,13,27,32],r0=fi&&"CompositionEvent"in window,ku=null;fi&&"documentMode"in document&&(ku=document.documentMode);var TO=fi&&"TextEvent"in window&&!ku,l2=fi&&(!r0||ku&&8<ku&&11>=ku),NN=" ",_N=!1;function c2(e,t){switch(e){case"keyup":return PO.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function d2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gc=!1;function AO(e,t){switch(e){case"compositionend":return d2(t);case"keypress":return t.which!==32?null:(_N=!0,NN);case"textInput":return e=t.data,e===NN&&_N?null:e;default:return null}}function IO(e,t){if(gc)return e==="compositionend"||!r0&&c2(e,t)?(e=o2(),Jh=e0=Ji=null,gc=!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 l2&&t.locale!=="ko"?null:t.data;default:return null}}var RO={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 kN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!RO[e.type]:t==="textarea"}function u2(e,t,r,n){zS(n),t=Pf(t,"onChange"),0<t.length&&(r=new t0("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Su=null,Ku=null;function MO(e){j2(e,0)}function Ip(e){var t=yc(e);if(OS(t))return e}function OO(e,t){if(e==="change")return t}var m2=!1;if(fi){var rx;if(fi){var nx="oninput"in document;if(!nx){var SN=document.createElement("div");SN.setAttribute("oninput","return;"),nx=typeof SN.oninput=="function"}rx=nx}else rx=!1;m2=rx&&(!document.documentMode||9<document.documentMode)}function CN(){Su&&(Su.detachEvent("onpropertychange",h2),Ku=Su=null)}function h2(e){if(e.propertyName==="value"&&Ip(Ku)){var t=[];u2(t,Ku,e,Kb(e)),qS(MO,t)}}function DO(e,t,r){e==="focusin"?(CN(),Su=t,Ku=r,Su.attachEvent("onpropertychange",h2)):e==="focusout"&&CN()}function LO(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ip(Ku)}function FO(e,t){if(e==="click")return Ip(t)}function $O(e,t){if(e==="input"||e==="change")return Ip(t)}function UO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ra=typeof Object.is=="function"?Object.is:UO;function Qu(e,t){if(ra(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var a=r[n];if(!gv.call(t,a)||!ra(e[a],t[a]))return!1}return!0}function EN(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function PN(e,t){var r=EN(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=EN(r)}}function f2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?f2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function p2(){for(var e=window,t=jf();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=jf(e.document)}return t}function n0(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 BO(e){var t=p2(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&f2(r.ownerDocument.documentElement,r)){if(n!==null&&n0(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=PN(r,i);var o=PN(r,n);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var zO=fi&&"documentMode"in document&&11>=document.documentMode,xc=null,Ov=null,Cu=null,Dv=!1;function TN(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Dv||xc==null||xc!==jf(n)||(n=xc,"selectionStart"in n&&n0(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 38
38sNode:n.focusNode,focusOffset:n.focusOffset}),Cu&&Qu(Cu,n)||(Cu=n,n=Pf(Ov,"onSelect"),0<n.length&&(t=new t0("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=xc)))}function bh(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var vc={animationend:bh("Animation","AnimationEnd"),animationiteration:bh("Animation","AnimationIteration"),animationstart:bh("Animation","AnimationStart"),transitionend:bh("Transition","TransitionEnd")},ax={},g2={};fi&&(g2=document.createElement("div").style,"AnimationEvent"in window||(delete vc.animationend.animation,delete vc.animationiteration.animation,delete vc.animationstart.animation),"TransitionEvent"in window||delete vc.transitionend.transition);function Rp(e){if(ax[e])return ax[e];if(!vc[e])return e;var t=vc[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in g2)return ax[e]=t[r];return e}var x2=Rp("animationend"),v2=Rp("animationiteration"),y2=Rp("animationstart"),b2=Rp("transitionend"),w2=new Map,AN="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 To(e,t){w2.set(e,t),Ol(t,[e])}for(var ix=0;ix<AN.length;ix++){var ox=AN[ix],WO=ox.toLowerCase(),VO=ox[0].toUpperCase()+ox.slice(1);To(WO,"on"+VO)}To(x2,"onAnimationEnd");To(v2,"onAnimationIteration");To(y2,"onAnimationStart");To("dblclick","onDoubleClick");To("focusin","onFocus");To("focusout","onBlur");To(b2,"onTransitionEnd");Jc("onMouseEnter",["mouseout","mouseover"]);Jc("onMouseLeave",["mouseout","mouseover"]);Jc("onPointerEnter",["pointerout","pointerover"]);Jc("onPointerLeave",["pointerout","pointerover"]);Ol("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ol("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ol("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ol("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ol("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ol("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hu="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(" "),HO=new Set("cancel close invalid load scroll toggle".split(" ").concat(hu));function IN(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,WM(n,t,void 0,e),e.currentTarget=null}function j2(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],a=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var l=n[o],c=l.instance,d=l.currentTarget;if(l=l.listener,c!==i&&a.isPropagationStopped())break e;IN(a,l,d),i=c}else for(o=0;o<n.length;o++){if(l=n[o],c=l.instance,d=l.currentTarget,l=l.listener,c!==i&&a.isPropagationStopped())break e;IN(a,l,d),i=c}}}if(_f)throw e=Av,_f=!1,Av=null,e}function Wt(e,t){var r=t[Bv];r===void 0&&(r=t[Bv]=new Set);var n=e+"__bubble";r.has(n)||(N2(t,e,2,!1),r.add(n))}function lx(e,t,r){var n=0;t&&(n|=4),N2(r,e,n,t)}var wh="_reactListening"+Math.random().toString(36).slice(2);function Xu(e){if(!e[wh]){e[wh]=!0,TS.forEach(function(r){r!=="selectionchange"&&(HO.has(r)||lx(r,!1,e),lx(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wh]||(t[wh]=!0,lx("selectionchange",!1,t))}}function N2(e,t,r,n){switch(i2(t)){case 1:var a=aO;break;case 4:a=iO;break;default:a=Zb}r=a.bind(null,t,r,e),a=void 0,!Tv||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function cx(e,t,r,n,a){var i=n;
vendor: 2,645 bytes, line 38
38if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var l=n.stateNode.containerInfo;if(l===a||l.nodeType===8&&l.parentNode===a)break;if(o===4)for(o=n.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;o=o.return}for(;l!==null;){if(o=sl(l),o===null)return;if(c=o.tag,c===5||c===6){n=i=o;continue e}l=l.parentNode}}n=n.return}qS(function(){var d=i,u=Kb(r),m=[];e:{var f=w2.get(e);if(f!==void 0){var p=t0,v=e;switch(e){case"keypress":if(Zh(r)===0)break e;case"keydown":case"keyup":p=wO;break;case"focusin":v="focus",p=sx;break;case"focusout":v="blur",p=sx;break;case"beforeblur":case"afterblur":p=sx;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=bN;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=cO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=_O;break;case x2:case v2:case y2:p=mO;break;case b2:p=SO;break;case"scroll":p=oO;break;case"wheel":p=EO;break;case"copy":case"cut":case"paste":p=fO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=jN}var g=(t&4)!==0,b=!g&&e==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var x=d,w;x!==null;){w=x;var j=w.stateNode;if(w.tag===5&&j!==null&&(w=j,y!==null&&(j=Hu(x,y),j!=null&&g.push(Ju(x,j,w)))),b)break;x=x.return}0<g.length&&(f=new p(f,v,null,r,u),m.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&r!==Ev&&(v=r.relatedTarget||r.fromElement)&&(sl(v)||v[pi]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=r.relatedTarget||r.toElement,p=d,v=v?sl(v):null,v!==null&&(b=Dl(v),v!==b||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=d),p!==v)){if(g=bN,j="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(g=jN,j="onPointerLeave",y="onPointerEnter",x="pointer"),b=p==null?f:yc(p),w=v==null?f:yc(v),f=new g(j,x+"leave",p,r,u),f.target=b,f.relatedTarget=w,j=null,sl(u)===d&&(g=new g(y,x+"enter",v,r,u),g.target=w,g.relatedTarget=b,j=g),b=j,p&&v)t:{for(g=p,y=v,x=0,w=g;w;w=Xl(w))x++;for(w=0,j=y;j;j=Xl(j))w++;for(;0<x-w;)g=Xl(g),x--;for(;0<w-x;)y=Xl(y),w--;for(;x--;){if(g===y||y!==null&&g===y.alternate)break t;g=Xl(g),y=Xl(y)}g=null}else g=null;p!==null&&RN(m,f,p,g,!1),v!==null&&b!==null&&RN(m,b,v,g,!0)}}
vendor: 4,576 bytes, lines 38-39
38e:{if(f=d?yc(d):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var N=OO;else if(kN(f))if(m2)N=$O;else{N=LO;var S=DO}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(N=FO);if(N&&(N=N(e,d))){u2(m,N,r,u);break e}S&&S(e,f,d),e==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&Nv(f,"number",f.value)}switch(S=d?yc(d):window,e){case"focusin":(kN(S)||S.contentEditable==="true")&&(xc=S,Ov=d,Cu=null);break;case"focusout":Cu=Ov=xc=null;break;case"mousedown":Dv=!0;break;case"contextmenu":case"mouseup":case"dragend":Dv=!1,TN(m,r,u);break;case"selectionchange":if(zO)break;case"keydown":case"keyup":TN(m,r,u)}var E;if(r0)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else gc?c2(e,r)&&(_="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(_="onCompositionStart");_&&(l2&&r.locale!=="ko"&&(gc||_!=="onCompositionStart"?_==="onCompositionEnd"&&gc&&(E=o2()):(Ji=u,e0="value"in Ji?Ji.value:Ji.textContent,gc=!0)),S=Pf(d,_),0<S.length&&(_=new wN(_,e,null,r,u),m.push({event:_,listeners:S}),E?_.data=E:(E=d2(r),E!==null&&(_.data=E)))),(E=TO?AO(e,r):IO(e,r))&&(d=Pf(d,"onBeforeInput"),0<d.length&&(u=new wN("onBeforeInput","beforeinput",null,r,u),m.push({event:u,listeners:d}),u.data=E))}j2(m,t)})}function Ju(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Pf(e,t){for(var r=t+"Capture",n=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=Hu(e,r),i!=null&&n.unshift(Ju(e,i,a)),i=Hu(e,t),i!=null&&n.push(Ju(e,i,a))),e=e.return}return n}function Xl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function RN(e,t,r,n,a){for(var i=t._reactName,o=[];r!==null&&r!==n;){var l=r,c=l.alternate,d=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&d!==null&&(l=d,a?(c=Hu(r,i),c!=null&&o.unshift(Ju(r,c,l))):a||(c=Hu(r,i),c!=null&&o.push(Ju(r,c,l)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var qO=/\r\n?/g,GO=/\u0000|\uFFFD/g;function MN(e){return(typeof e=="string"?e:""+e).replace(qO,` 39`).replace(GO,"")}function jh(e,t,r){if(t=MN(t),MN(e)!==t&&r)throw Error(we(425))}function Tf(){}var Lv=null,Fv=null;function $v(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 Uv=typeof setTimeout=="function"?setTimeout:void 0,YO=typeof clearTimeout=="function"?clearTimeout:void 0,ON=typeof Promise=="function"?Promise:void 0,KO=typeof queueMicrotask=="function"?queueMicrotask:typeof ON<"u"?function(e){return ON.resolve(null).then(e).catch(QO)}:Uv;function QO(e){setTimeout(function(){throw e})}function dx(e,t){var r=t,n=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(n===0){e.removeChild(a),Yu(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=a}while(r);Yu(t)}function lo(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 DN(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var _d=Math.random().toString(36).slice(2),Sa="__reactFiber$"+_d,Zu="__reactProps$"+_d,pi="__reactContainer$"+_d,Bv="__reactEvents$"+_d,XO="__reactListeners$"+_d,JO="__reactHandles$"+_d;function sl(e){var t=e[Sa];if(t)return t;for(var r=e.parentNode;r;){if(t=r[pi]||r[Sa]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=DN(e);e!==null;){if(r=e[Sa])return r;e=DN(e)}return t}e=r,r=e.parentNode}return null}function Lm(e){return e=e[Sa]||e[pi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function yc(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(we(33))}function Mp(e){return e[Zu]||null}var zv=[],bc=-1;function Ao(e){return{current:e}}function Vt(e){0>bc||(e.current=zv[bc],zv[bc]=null,bc--)}function Ut(e,t){bc++,zv[bc]=e.current,e.current=t}var bo={},nr=Ao(bo),Or=Ao(!1),bl=bo;function Zc(e,t){var r=e.type.contextTypes;if(!r)return bo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a
vendor: 15,538 bytes, line 39
39),a}function Dr(e){return e=e.childContextTypes,e!=null}function Af(){Vt(Or),Vt(nr)}function LN(e,t,r){if(nr.current!==bo)throw Error(we(168));Ut(nr,t),Ut(Or,r)}function _2(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(we(108,DM(e)||"Unknown",a));return Xt({},r,n)}function If(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||bo,bl=nr.current,Ut(nr,e),Ut(Or,Or.current),!0}function FN(e,t,r){var n=e.stateNode;if(!n)throw Error(we(169));r?(e=_2(e,t,bl),n.__reactInternalMemoizedMergedChildContext=e,Vt(Or),Vt(nr),Ut(nr,e)):Vt(Or),Ut(Or,r)}var ti=null,Op=!1,ux=!1;function k2(e){ti===null?ti=[e]:ti.push(e)}function ZO(e){Op=!0,k2(e)}function Io(){if(!ux&&ti!==null){ux=!0;var e=0,t=Rt;try{var r=ti;for(Rt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ti=null,Op=!1}catch(a){throw ti!==null&&(ti=ti.slice(e+1)),QS(Qb,Io),a}finally{Rt=t,ux=!1}}return null}var wc=[],jc=0,Rf=null,Mf=0,vn=[],yn=0,wl=null,li=1,ci="";function Ko(e,t){wc[jc++]=Mf,wc[jc++]=Rf,Rf=e,Mf=t}function S2(e,t,r){vn[yn++]=li,vn[yn++]=ci,vn[yn++]=wl,wl=e;var n=li;e=ci;var a=32-Jn(n)-1;n&=~(1<<a),r+=1;var i=32-Jn(t)+a;if(30<i){var o=a-a%5;i=(n&(1<<o)-1).toString(32),n>>=o,a-=o,li=1<<32-Jn(t)+a|r<<a|n,ci=i+e}else li=1<<i|r<<a|n,ci=e}function a0(e){e.return!==null&&(Ko(e,1),S2(e,1,0))}function i0(e){for(;e===Rf;)Rf=wc[--jc],wc[jc]=null,Mf=wc[--jc],wc[jc]=null;for(;e===wl;)wl=vn[--yn],vn[yn]=null,ci=vn[--yn],vn[yn]=null,li=vn[--yn],vn[yn]=null}var an=null,rn=null,qt=!1,Gn=null;function C2(e,t){var r=wn(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function $N(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,an=e,rn=lo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,an=e,rn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=wl!==null?{id:li,overflow:ci}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=wn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,an=e,rn=null,!0):!1;default:return!1}}function Wv(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Vv(e){if(qt){var t=rn;if(t){var r=t;if(!$N(e,t)){if(Wv(e))throw Error(we(418));t=lo(r.nextSibling);var n=an;t&&$N(e,t)?C2(n,r):(e.flags=e.flags&-4097|2,qt=!1,an=e)}}else{if(Wv(e))throw Error(we(418));e.flags=e.flags&-4097|2,qt=!1,an=e}}}function UN(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;an=e}function Nh(e){if(e!==an)return!1;if(!qt)return UN(e),qt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$v(e.type,e.memoizedProps)),t&&(t=rn)){if(Wv(e))throw E2(),Error(we(418));for(;t;)C2(e,t),t=lo(t.nextSibling)}if(UN(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(we(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){rn=lo(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}rn=null}}else rn=an?lo(e.stateNode.nextSibling):null;return!0}function E2(){for(var e=rn;e;)e=lo(e.nextSibling)}function ed(){rn=an=null,qt=!1}function o0(e){Gn===null?Gn=[e]:Gn.push(e)}var eD=ji.ReactCurrentBatchConfig;function Gd(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(we(309));var n=r.stateNode}if(!n)throw Error(we(147,e));var a=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var l=a.refs;o===null?delete l[i]:l[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(we(284));if(!r._owner)throw Error(we(290,e))}return e}function _h(e,t){throw e=Object.prototype.toString.call(t),Error(we(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function BN(e){var t=e._init;return t(e._payload)}function P2(e){function t(y,x){if(e){var w=y.deletions;w===null?(y.deletions=[x],y.flags|=16):w.push(x)}}function r(y,x){if(!e)return null;for(;x!==null;)t(y,x),x=x.sibling;return null}function n(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function a(y,x){return y=ho(y,x),y.index=0,y.sibling=null,y}function i(y,x,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<x?(y.flags|=2,x):w):(y.flags|=2,x)):(y.flags|=1048576,x)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,x,w,j){return x===null||x.tag!==6?(x=vx(w,y.mode,j),x.return=y,x):(x=a(x,w),x.return=y,x)}function c(y,x,w,j){var N=w.type;return N===pc?u(y,x,w.props.children,j,w.key):x!==null&&(x.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Fi&&BN(N)===x.type)?(j=a(x,w.props),j.ref=Gd(y,x,w),j.return=y,j):(j=of(w.type,w.key,w.props,null,y.mode,j),j.ref=Gd(y,x,w),j.return=y,j)}function d(y,x,w,j){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=yx(w,y.mode,j),x.return=y,x):(x=a(x,w.children||[]),x.return=y,x)}function u(y,x,w,j,N){return x===null||x.tag!==7?(x=gl(w,y.mode,j,N),x.return=y,x):(x=a(x,w),x.return=y,x)}function m(y,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=vx(""+x,y.mode,w),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case hh:return w=of(x.type,x.key,x.props,null,y.mode,w),w.ref=Gd(y,null,x),w.return=y,w;case fc:return x=yx(x,y.mode,w),x.return=y,x;case Fi:var j=x._init;return m(y,j(x._payload),w)}if(uu(x)||zd(x))return x=gl(x,y.mode,w,null),x.return=y,x;_h(y,x)}return null}function f(y,x,w,j){var N=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return N!==null?null:l(y,x,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case hh:return w.key===N?c(y,x,w,j):null;case fc:return w.key===N?d(y,x,w,j):null;case Fi:return N=w._init,f(y,x,N(w._payload),j)}if(uu(w)||zd(w))return N!==null?null:u(y,x,w,j,null);_h(y,w)}return null}function p(y,x,w,j,N){if(typeof j=="string"&&j!==""||typeof j=="number")return y=y.get(w)||null,l(x,y,""+j,N);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case hh:return y=y.get(j.key===null?w:j.key)||null,c(x,y,j,N);case fc:return y=y.get(j.key===null?w:j.key)||null,d(x,y,j,N);case Fi:var S=j._init;return p(y,x,w,S(j._payload),N)}if(uu(j)||zd(j))return y=y.get(w)||null,u(x,y,j,N,null);_h(x,j)}return null}function v(y,x,w,j){for(var N=null,S=null,E=x,_=x=0,I=null;E!==null&&_<w.length;_++){E.index>_?(I=E,E=null):I=E.sibling;var R=f(y,E,w[_],j);if(R===null){E===null&&(E=I);break}e&&E&&R.alternate===null&&t(y,E),x=i(R,x,_),S===null?N=R:S.sibling=R,S=R,E=I}if(_===w.length)return r(y,E),qt&&Ko(y,_),N;if(E===null){for(;_<w.length;_++)E=m(y,w[_],j),E!==null&&(x=i(E,x,_),S===null?N=E:S.sibling=E,S=E);return qt&&Ko(y,_),N}for(E=n(y,E);_<w.length;_++)I=p(E,y,_,w[_],j),I!==null&&(e&&I.alternate!==null&&E.delete(I.key===null?_:I.key),x=i(I,x,_),S===null?N=I:S.sibling=I,S=I);return e&&E.forEach(function(T){return t(y,T)}),qt&&Ko(y,_),N}function g(y,x,w,j){var N=zd(w);if(typeof N!="function")throw Error(we(150));if(w=N.call(w),w==null)throw Error(we(151));for(var S=N=null,E=x,_=x=0,I=null,R=w.next();E!==null&&!R.done;_++,R=w.next()){E.index>_?(I=E,E=null):I=E.sibling;var T=f(y,E,R.value,j);if(T===null){E===null&&(E=I);break}e&&E&&T.alternate===null&&t(y,E),x=i(T,x,_),S===null?N=T:S.sibling=T,S=T,E=I}if(R.done)return r(y,E),qt&&Ko(y,_),N;if(E===null){for(;!R.done;_++,R=w.next())R=m(y,R.value,j),R!==null&&(x=i(R,x,_),S===null?N=R:S.sibling=R,S=R);return qt&&Ko(y,_),N}for(E=n(y,E);!R.done;_++,R=w.next())R=p(E,y,_,R.value,j),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?_:R.key),x=i(R,x,_),S===null?N=R:S.sibling=R,S=R);return e&&E.forEach(function(k){return t(y,k)}),qt&&Ko(y,_),N}function b(y,x,w,j){if(typeof w=="object"&&w!==null&&w.type===pc&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case hh:e:{for(var N=w.key,S=x;S!==null;){if(S.key===N){if(N=w.type,N===pc){if(S.tag===7){r(y,S.sibling),x=a(S,w.props.children),x.return=y,y=x;break e}}else if(S.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Fi&&BN(N)===S.type){r(y,S.sibling),x=a(S,w.props),x.ref=Gd(y,S,w),x.return=y,y=x;break e}r(y,S);break}else t(y,S);S=S.sibling}w.type===pc?(x=gl(w.props.children,y.mode,j,w.key),x.return=y,y=x):(j=of(w.type,w.key,w.props,null,y.mode,j),j.ref=Gd(y,x,w),j.return=y,y=j)}return o(y);case fc:e:{for(S=w.key;x!==null;){if(x.key===S)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){r(y,x.sibling),x=a(x,w.children||[]),x.return=y,y=x;break e}else{r(y,x);break}else t(y,x);x=x.sibling}x=yx(w,y.mode,j),x.return=y,y=x}return o(y);case Fi:return S=w._init,b(y,x,S(w._payload),j)}if(uu(w))return v(y,x,w,j);if(zd(w))return g(y,x,w,j);_h(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(r(y,x.sibling),x=a(x,w),x.return=y,y=x):(r(y,x),x=vx(w,y.mode,j),x.return=y,y=x),o(y)):r(y,x)}return b}var td=P2(!0),T2=P2(!1),Of=Ao(null),Df=null,Nc=null,l0=null;function c0(){l0=Nc=Df=null}function d0(e){var t=Of.current;Vt(Of),e._currentValue=t}function Hv(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Tc(e,t){Df=e,l0=Nc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Rr=!0),e.firstContext=null)}function Cn(e){var t=e._currentValue;if(l0!==e)if(e={context:e,memoizedValue:t,next:null},Nc===null){if(Df===null)throw Error(we(308));Nc=e,Df.dependencies={lanes:0,firstContext:e}}else Nc=Nc.next=e;return t}var rl=null;function u0(e){rl===null?rl=[e]:rl.push(e)}function A2(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,u0(t)):(r.next=a.next,a.next=r),t.interleaved=r,gi(e,n)}function gi(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var $i=!1;function m0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function I2(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 di(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function co(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,kt&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,gi(e,r)}return a=n.interleaved,a===null?(t.next=t,u0(n)):(t.next=a.next,a.next=t),n.interleaved=t,gi(e,r)}function ef(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xb(e,r)}}function zN(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?a=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?a=i=t:i=i.next=t}else a=i=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Lf(e,t,r,n){var a=e.updateQueue;$i=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,l=a.shared.pending;if(l!==null){a.shared.pending=null;var c=l,d=c.next;c.next=null,o===null?i=d:o.next=d,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==o&&(l===null?u.firstBaseUpdate=d:l.next=d,u.lastBaseUpdate=c))}if(i!==null){var m=a.baseState;o=0,u=d=c=null,l=i;do{var f=l.lane,p=l.eventTime;if((n&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,g=l;switch(f=t,p=r,g.tag){case 1:if(v=g.payload,typeof v=="function"){m=v.call(p,m,f);break e}m=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,f=typeof v=="function"?v.call(p,m,f):v,f==null)break e;m=Xt({},m,f);break e;case 2:$i=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=a.effects,f===null?a.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(d=u=p,c=m):u=u.next=p,o|=f;if(l=l.next,l===null){if(l=a.shared.pending,l===null)break;f=l,l=f.next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}while(!0);if(u===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=u,t=a.shared.interleaved,t!==null){a=t;do o|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);Nl|=o,e.lanes=o,e.memoizedState=m}}function WN(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],a=n.callback;if(a!==null){if(n.callback=null,n=r,typeof a!="function")throw Error(we(191,a));a.call(n)}}}var Fm={},Ia=Ao(Fm),em=Ao(Fm),tm=Ao(Fm);function nl(e){if(e===Fm)throw Error(we(174));return e}function h0(e,t){switch(Ut(tm,t),Ut(em,e),Ut(Ia,Fm),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kv(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=kv(t,e)}Vt(Ia),Ut(Ia,t)}function sd(){Vt(Ia),Vt(em),Vt(tm)}function R2(e){nl(tm.current);var t=nl(Ia.current),r=kv(t,e.type);t!==r&&(Ut(em,e),Ut(Ia,r))}function f0(e){em.current===e&&(Vt(Ia),Vt(em))}var Gt=Ao(0);function Ff(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mx=[];function p0(){for(var e=0;e<mx.length;e++)mx[e]._workInProgressVersionPrimary=null;mx.length=0}var tf=ji.ReactCurrentDispatcher,hx=ji.ReactCurrentBatchConfig,jl=0,Qt=null,Es=null,Is=null,$f=!1,Eu=!1,sm=0,tD=0;function Ks(){throw Error(we(321))}function g0(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!ra(e[r],t[r]))return!1;return!0}function x0(e,t,r,n,a,i){if(jl=i,Qt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,tf.current=e===null||e.memoizedState===null?aD:iD,e=r(n,a),Eu){i=0;do{if(Eu=!1,sm=0,25<=i)throw Error(we(301));i+=1,Is=Es=null,t.updateQueue=null,tf.current=oD,e=r(n,a)}while(Eu)}if(tf.current=Uf,t=Es!==null&&Es.next!==null,jl=0,Is=Es=Qt=null,$f=!1,t)throw Error(we(300));return e}function v0(){var e=sm!==0;return sm=0,e}function ha(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Is===null?Qt.memoizedState=Is=e:Is=Is.next=e,Is}function En(){if(Es===null){var e=Qt.alternate;e=e!==null?e.memoizedState:null}else e=Es.next;var t=Is===null?Qt.memoizedState:Is.next;if(t!==null)Is=t,Es=e;else{if(e===null)throw Error(we(310));Es=e,e={memoizedState:Es.memoizedState,baseState:Es.baseState,baseQueue:Es.baseQueue,queue:Es.queue,next:null},Is===null?Qt.memoizedState=Is=e:Is=Is.next=e}return Is}function rm(e,t){return typeof t=="function"?t(e):t}function fx(e){var t=En(),r=t.queue;if(r===null)throw Error(we(311));r.lastRenderedReducer=e;
vendor: 5,690 bytes, line 39
39var n=Es,a=n.baseQueue,i=r.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}n.baseQueue=a=i,r.pending=null}if(a!==null){i=a.next,n=n.baseState;var l=o=null,c=null,d=i;do{var u=d.lane;if((jl&u)===u)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:e(n,d.action);else{var m={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(l=c=m,o=n):c=c.next=m,Qt.lanes|=u,Nl|=u}d=d.next}while(d!==null&&d!==i);c===null?o=n:c.next=l,ra(n,t.memoizedState)||(Rr=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){a=e;do i=a.lane,Qt.lanes|=i,Nl|=i,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function px(e){var t=En(),r=t.queue;if(r===null)throw Error(we(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,i=t.memoizedState;if(a!==null){r.pending=null;var o=a=a.next;do i=e(i,o.action),o=o.next;while(o!==a);ra(i,t.memoizedState)||(Rr=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function M2(){}function O2(e,t){var r=Qt,n=En(),a=t(),i=!ra(n.memoizedState,a);if(i&&(n.memoizedState=a,Rr=!0),n=n.queue,y0(F2.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Is!==null&&Is.memoizedState.tag&1){if(r.flags|=2048,nm(9,L2.bind(null,r,n,a,t),void 0,null),Ls===null)throw Error(we(349));jl&30||D2(r,t,a)}return a}function D2(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Qt.updateQueue,t===null?(t={lastEffect:null,stores:null},Qt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function L2(e,t,r,n){t.value=r,t.getSnapshot=n,$2(t)&&U2(e)}function F2(e,t,r){return r(function(){$2(t)&&U2(e)})}function $2(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ra(e,r)}catch{return!0}}function U2(e){var t=gi(e,1);t!==null&&Zn(t,e,1,-1)}function VN(e){var t=ha();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:rm,lastRenderedState:e},t.queue=e,e=e.dispatch=nD.bind(null,Qt,e),[t.memoizedState,e]}function nm(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Qt.updateQueue,t===null?(t={lastEffect:null,stores:null},Qt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function B2(){return En().memoizedState}function sf(e,t,r,n){var a=ha();Qt.flags|=e,a.memoizedState=nm(1|t,r,void 0,n===void 0?null:n)}function Dp(e,t,r,n){var a=En();n=n===void 0?null:n;var i=void 0;if(Es!==null){var o=Es.memoizedState;if(i=o.destroy,n!==null&&g0(n,o.deps)){a.memoizedState=nm(t,r,i,n);return}}Qt.flags|=e,a.memoizedState=nm(1|t,r,i,n)}function HN(e,t){return sf(8390656,8,e,t)}function y0(e,t){return Dp(2048,8,e,t)}function z2(e,t){return Dp(4,2,e,t)}function W2(e,t){return Dp(4,4,e,t)}function V2(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 H2(e,t,r){return r=r!=null?r.concat([e]):null,Dp(4,4,V2.bind(null,t,e),r)}function b0(){}function q2(e,t){var r=En();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&g0(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function G2(e,t){var r=En();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&g0(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Y2(e,t,r){return jl&21?(ra(r,t)||(r=ZS(),Qt.lanes|=r,Nl|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Rr=!0),e.memoizedState=r)}function sD(e,t){var r=Rt;Rt=r!==0&&4>r?r:4,e(!0);var n=hx.transition;hx.transition={};try{e(!1),t()}finally{Rt=r,hx.transition=n}}function K2(){return En().memoizedState}function rD(e,t,r){var n=mo(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Q2(e))X2(t,r);else if(r=A2(e,t,r,n),r!==null){var a=pr();Zn(r,e,n,a),J2(r,t,n)}}function nD(e,t,r){var n=mo(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Q2(e))X2(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,r);if(a.hasEagerState=!0,a.eagerState=l,ra(l,o)){var c=t.interleaved;c===null?(a.next=a,u0(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}r=A2(e,t,a,n),r!==null&&(a=pr(),Zn(r,e,n,a),J2(r,t,n))}}function Q2(e){var t=e.alternate;return e===Qt||t!==null&&t===Qt}function X2(e,t){Eu=$f=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function J2(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xb(e,r)}}var Uf={readContext:Cn,useCallback:Ks,useContext:Ks,useEffect:Ks,useImperativeHandle:Ks,useInsertionEffect:Ks,useLayoutEffect:Ks,useMemo:Ks,useReducer:Ks,useRef:Ks,useState:Ks,useDebugValue:Ks,useDeferredValue:Ks,useTransition:Ks,useMutableSource:Ks,useSyncExternalStore:Ks,useId:Ks,unstable_isNewReconciler:!1},aD={readContext:Cn,useCallback:function(e,t){return ha().memoizedState=[e,t===void 0?null:t],e},useContext:Cn,useEffect:HN,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,sf(4194308,4,V2.bind(null,t,e),r)},useLayoutEffect:function(e,t){return sf(4194308,4,e,t)},useInsertionEffect:function(e,t){return sf(4,2,e,t)},useMemo:function(e,t){var r=ha();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ha();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=rD.bind(null,Qt,e),[n.memoizedState,e]}
vendor: 6,283 bytes, lines 39-41
39,useRef:function(e){var t=ha();return e={current:e},t.memoizedState=e},useState:VN,useDebugValue:b0,useDeferredValue:function(e){return ha().memoizedState=e},useTransition:function(){var e=VN(!1),t=e[0];return e=sD.bind(null,e[1]),ha().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Qt,a=ha();if(qt){if(r===void 0)throw Error(we(407));r=r()}else{if(r=t(),Ls===null)throw Error(we(349));jl&30||D2(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,HN(F2.bind(null,n,i,e),[e]),n.flags|=2048,nm(9,L2.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=ha(),t=Ls.identifierPrefix;if(qt){var r=ci,n=li;r=(n&~(1<<32-Jn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=sm++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=tD++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},iD={readContext:Cn,useCallback:q2,useContext:Cn,useEffect:y0,useImperativeHandle:H2,useInsertionEffect:z2,useLayoutEffect:W2,useMemo:G2,useReducer:fx,useRef:B2,useState:function(){return fx(rm)},useDebugValue:b0,useDeferredValue:function(e){var t=En();return Y2(t,Es.memoizedState,e)},useTransition:function(){var e=fx(rm)[0],t=En().memoizedState;return[e,t]},useMutableSource:M2,useSyncExternalStore:O2,useId:K2,unstable_isNewReconciler:!1},oD={readContext:Cn,useCallback:q2,useContext:Cn,useEffect:y0,useImperativeHandle:H2,useInsertionEffect:z2,useLayoutEffect:W2,useMemo:G2,useReducer:px,useRef:B2,useState:function(){return px(rm)},useDebugValue:b0,useDeferredValue:function(e){var t=En();return Es===null?t.memoizedState=e:Y2(t,Es.memoizedState,e)},useTransition:function(){var e=px(rm)[0],t=En().memoizedState;return[e,t]},useMutableSource:M2,useSyncExternalStore:O2,useId:K2,unstable_isNewReconciler:!1};function zn(e,t){if(e&&e.defaultProps){t=Xt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function qv(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Xt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Lp={isMounted:function(e){return(e=e._reactInternals)?Dl(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=pr(),a=mo(e),i=di(n,a);i.payload=t,r!=null&&(i.callback=r),t=co(e,i,a),t!==null&&(Zn(t,e,a,n),ef(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=pr(),a=mo(e),i=di(n,a);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=co(e,i,a),t!==null&&(Zn(t,e,a,n),ef(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=pr(),n=mo(e),a=di(r,n);a.tag=2,t!=null&&(a.callback=t),t=co(e,a,n),t!==null&&(Zn(t,e,n,r),ef(t,e,n))}};function qN(e,t,r,n,a,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!Qu(r,n)||!Qu(a,i):!0}function Z2(e,t,r){var n=!1,a=bo,i=t.contextType;return typeof i=="object"&&i!==null?i=Cn(i):(a=Dr(t)?bl:nr.current,n=t.contextTypes,i=(n=n!=null)?Zc(e,a):bo),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Lp,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function GN(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Lp.enqueueReplaceState(t,t.state,null)}function Gv(e,t,r,n){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},m0(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=Cn(i):(i=Dr(t)?bl:nr.current,a.context=Zc(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(qv(e,t,i,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Lp.enqueueReplaceState(a,a.state,null),Lf(e,r,a,n),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function rd(e,t){try{var r="",n=t;do r+=OM(n),n=n.return;while(n);var a=r}catch(i){a=` 40Error generating stack: `+i.message+` 41`+i.stack}return{value:e,source:t,stack:a,digest:null}}function gx(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Yv(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var lD=typeof WeakMap=="function"?WeakMap:Map;function eC(e,t,r){r=di(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){zf||(zf=!0,ny=n),Yv(e,t)},r}function tC(e,t,r){r=di(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var a=t.value;r.payload=function(){return n(a)},r.callback=function(){Yv(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Yv(e,t),typeof n!="function"&&(uo===null?uo=new Set([this]):uo.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function YN(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new lD;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(r)||(a.add(r),e=jD.bind(null,e,t,r),t.then(e,e))}function KN(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 QN(e,t,r,n,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=di(-1,1),t.tag=2,co(r,t,1))),r.lanes|=1),e)}var cD=ji.ReactCurrentOwner,Rr=!1;function mr(e,t,r,n){t.child=e===null?T2(t,null,r,n):td(t,e.child,r,n)}function XN(e,t,r,n,a){r=r.render;var i=t.ref;return Tc(t,a),n=x0(e,t,r,n,i,a),r=v0(),e!==null&&!Rr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,xi(e,t,a)):(qt&&r&&a0(t),t.flags|=1,mr(e,t,n,a),t.child)}function JN(e,t,r,n,a){if(e===null){var i=r.type;return typeof i=="function"&&!E0(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,sC(e,t,i,n,a)):(e=of
vendor: 5,861 bytes, line 41
41(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:Qu,r(o,n)&&e.ref===t.ref)return xi(e,t,a)}return t.flags|=1,e=ho(i,n),e.ref=t.ref,e.return=t,t.child=e}function sC(e,t,r,n,a){if(e!==null){var i=e.memoizedProps;if(Qu(i,n)&&e.ref===t.ref)if(Rr=!1,t.pendingProps=n=i,(e.lanes&a)!==0)e.flags&131072&&(Rr=!0);else return t.lanes=e.lanes,xi(e,t,a)}return Kv(e,t,r,n,a)}function rC(e,t,r){var n=t.pendingProps,a=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ut(kc,Qr),Qr|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ut(kc,Qr),Qr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Ut(kc,Qr),Qr|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Ut(kc,Qr),Qr|=n;return mr(e,t,a,r),t.child}function nC(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Kv(e,t,r,n,a){var i=Dr(r)?bl:nr.current;return i=Zc(t,i),Tc(t,a),r=x0(e,t,r,n,i,a),n=v0(),e!==null&&!Rr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,xi(e,t,a)):(qt&&n&&a0(t),t.flags|=1,mr(e,t,r,a),t.child)}function ZN(e,t,r,n,a){if(Dr(r)){var i=!0;If(t)}else i=!1;if(Tc(t,a),t.stateNode===null)rf(e,t),Z2(t,r,n),Gv(t,r,n,a),n=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,d=r.contextType;typeof d=="object"&&d!==null?d=Cn(d):(d=Dr(r)?bl:nr.current,d=Zc(t,d));var u=r.getDerivedStateFromProps,m=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";m||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||c!==d)&&GN(t,o,n,d),$i=!1;var f=t.memoizedState;o.state=f,Lf(t,n,o,a),c=t.memoizedState,l!==n||f!==c||Or.current||$i?(typeof u=="function"&&(qv(t,r,u,n),c=t.memoizedState),(l=$i||qN(t,r,l,n,f,c,d))?(m||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),o.props=n,o.state=c,o.context=d,n=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,I2(e,t),l=t.memoizedProps,d=t.type===t.elementType?l:zn(t.type,l),o.props=d,m=t.pendingProps,f=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=Cn(c):(c=Dr(r)?bl:nr.current,c=Zc(t,c));var p=r.getDerivedStateFromProps;(u=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==m||f!==c)&&GN(t,o,n,c),$i=!1,f=t.memoizedState,o.state=f,Lf(t,n,o,a);var v=t.memoizedState;l!==m||f!==v||Or.current||$i?(typeof p=="function"&&(qv(t,r,p,n),v=t.memoizedState),(d=$i||qN(t,r,d,n,f,v,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,v,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,v,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=v),o.props=n,o.state=v,o.context=c,n=d):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return Qv(e,t,r,n,i,a)}function Qv(e,t,r,n,a,i){nC(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return a&&FN(t,r,!1),xi(e,t,i);n=t.stateNode,cD.current=t;var l=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=td(t,e.child,null,i),t.child=td(t,null,l,i)):mr(e,t,l,i),t.memoizedState=n.state,a&&FN(t,r,!0),t.child}function aC(e){var t=e.stateNode;t.pendingContext?LN(e,t.pendingContext,t.pendingContext!==t.context):t.context&&LN(e,t.context,!1),h0(e,t.containerInfo)}function e_(e,t,r,n,a){return ed(),o0(a),t.flags|=256,mr(e,t,r,n),t.child}var Xv={dehydrated:null,treeContext:null,retryLane:0};function Jv(e){return{baseLanes:e,cachePool:null,transitions:null}}function iC(e,t,r){var n=t.pendingProps,a=Gt.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(a&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Ut(Gt,a&1),e===null)return Vv(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):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Up(o,n,0,null),e=gl(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Jv(r),t.memoizedState=Xv,e):w0(t,o));if(a=e.memoizedState,a!==null&&(l=a.dehydrated,l!==null))return dD(e,t,o,n,l,a,r);if(i){i=n.fallback,o=t.mode,a=e.child,l=a.sibling;var c={mode:"hidden",children:n.children};return!(o&1)&&t.child!==a?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=ho(a,c),n.subtreeFlags=a.subtreeFlags&14680064),l!==null?i=ho(l,i):(i=gl(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?Jv(r):{base
vendor: 8,923 bytes, line 41
41Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=Xv,n}return i=e.child,e=i.sibling,n=ho(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function w0(e,t){return t=Up({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function kh(e,t,r,n){return n!==null&&o0(n),td(t,e.child,null,r),e=w0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dD(e,t,r,n,a,i,o){if(r)return t.flags&256?(t.flags&=-257,n=gx(Error(we(422))),kh(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,a=t.mode,n=Up({mode:"visible",children:n.children},a,0,null),i=gl(i,a,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&td(t,e.child,null,o),t.child.memoizedState=Jv(o),t.memoizedState=Xv,i);if(!(t.mode&1))return kh(e,t,o,null);if(a.data==="$!"){if(n=a.nextSibling&&a.nextSibling.dataset,n)var l=n.dgst;return n=l,i=Error(we(419)),n=gx(i,n,void 0),kh(e,t,o,n)}if(l=(o&e.childLanes)!==0,Rr||l){if(n=Ls,n!==null){switch(o&-o){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(n.suspendedLanes|o)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,gi(e,a),Zn(n,e,a,-1))}return C0(),n=gx(Error(we(421))),kh(e,t,o,n)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=ND.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,rn=lo(a.nextSibling),an=t,qt=!0,Gn=null,e!==null&&(vn[yn++]=li,vn[yn++]=ci,vn[yn++]=wl,li=e.id,ci=e.overflow,wl=t),t=w0(t,n.children),t.flags|=4096,t)}function t_(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Hv(e.return,t,r)}function xx(e,t,r,n,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=a)}function oC(e,t,r){var n=t.pendingProps,a=n.revealOrder,i=n.tail;if(mr(e,t,n.children,r),n=Gt.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&t_(e,r,t);else if(e.tag===19)t_(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Ut(Gt,n),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&Ff(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),xx(t,!1,a,r,i);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Ff(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}xx(t,!0,r,null,i);break;case"together":xx(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function rf(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xi(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Nl|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(we(153));if(t.child!==null){for(e=t.child,r=ho(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ho(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function uD(e,t,r){switch(t.tag){case 3:aC(t),ed();break;case 5:R2(t);break;case 1:Dr(t.type)&&If(t);break;case 4:h0(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,a=t.memoizedProps.value;Ut(Of,n._currentValue),n._currentValue=a;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Ut(Gt,Gt.current&1),t.flags|=128,null):r&t.child.childLanes?iC(e,t,r):(Ut(Gt,Gt.current&1),e=xi(e,t,r),e!==null?e.sibling:null);Ut(Gt,Gt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return oC(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Ut(Gt,Gt.current),n)break;return null;case 22:case 23:return t.lanes=0,rC(e,t,r)}return xi(e,t,r)}var lC,Zv,cC,dC;lC=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Zv=function(){};cC=function(e,t,r,n){var a=e.memoizedProps;if(a!==n){e=t.stateNode,nl(Ia.current);var i=null;switch(r){case"input":a=wv(e,a),n=wv(e,n),i=[];break;case"select":a=Xt({},a,{value:void 0}),n=Xt({},n,{value:void 0}),i=[];break;case"textarea":a=_v(e,a),n=_v(e,n),i=[];break;default:typeof a.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Tf)}Sv(r,n);var o;r=null;for(d in a)if(!n.hasOwnProperty(d)&&a.hasOwnProperty(d)&&a[d]!=null)if(d==="style"){var l=a[d];for(o in l)l.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Wu.hasOwnProperty(d)?i||(i=[]):(i=i||[]).push(d,null));for(d in n){var c=n[d];if(l=a!=null?a[d]:void 0,n.hasOwnProperty(d)&&c!==l&&(c!=null||l!=null))if(d==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(i||(i=[]),i.push(d,r)),r=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Wu.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&Wt("scroll",e),i||l===c||(i=[])):(i=i||[]).push(d,c))}r&&(i=i||[]).push("style",r);var d=i;(t.updateQueue=d)&&(t.flags|=4)}};dC=function(e,t,r,n){r!==n&&(t.flags|=4)};function Yd(e,t){if(!qt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Qs(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags&14680064,n|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function mD(e,t,r){var n=t.pendingProps;switch(i0(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qs(t),null;case 1:return Dr(t.type)&&Af(),Qs(t),null;case 3:return n=t.stateNode,sd(),Vt(Or),Vt(nr),p0(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Nh(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gn!==null&&(oy(Gn),Gn=null))),Zv(e,t),Qs(t),null;case 5:f0(t);var a=nl(tm.current);if(r=t.type,e!==null&&t.stateNode!=null)cC(e,t,r,n,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(we(166));return Qs(t),null}if(e=nl(Ia.current),Nh(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Sa]=t,n[Zu]=i,e=(t.mode&1)!==0,r){case"dialog":Wt("cancel",n),Wt("close",n);break;case"iframe":case"object":case"embed":Wt("load",n);break;case"video":case"audio":for(a=0;a<hu.length;a++)Wt(hu[a],n);break;case"source":Wt("error",n);break;case"img":case"image":case"link":Wt("error",n),Wt("load",n);break;case"details":Wt("toggle",n);break;case"input":dN(n,i),Wt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Wt("invalid",n);break;case"textarea":mN(n,i),Wt("invalid",n)}Sv(r,i),a=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?n.textContent!==l&&(i.suppressHydrationWarning!==!0&&jh(n.textContent,l,e),a=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&jh(n.textContent,l,e),a=["children",""+l]):Wu.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Wt("scroll",n)}switch(r){case"input":fh(n),uN(n,i,!0);break;case"textarea":fh(n),hN(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Tf)}n=a,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=FS(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
41",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Sa]=t,e[Zu]=n,lC(e,t,!1,!1),t.stateNode=e;e:{switch(o=Cv(r,n),r){case"dialog":Wt("cancel",e),Wt("close",e),a=n;break;case"iframe":case"object":case"embed":Wt("load",e),a=n;break;case"video":case"audio":for(a=0;a<hu.length;a++)Wt(hu[a],e);a=n;break;case"source":Wt("error",e),a=n;break;case"img":case"image":case"link":Wt("error",e),Wt("load",e),a=n;break;case"details":Wt("toggle",e),a=n;break;case"input":dN(e,n),a=wv(e,n),Wt("invalid",e);break;case"option":a=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},a=Xt({},n,{value:void 0}),Wt("invalid",e);break;case"textarea":mN(e,n),a=_v(e,n),Wt("invalid",e);break;default:a=n}Sv(r,a),l=a;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?BS(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&$S(e,c)):i==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Vu(e,c):typeof c=="number"&&Vu(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Wu.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Wt("scroll",e):c!=null&&Hb(e,i,c,o))}switch(r){case"input":fh(e),uN(e,n,!1);break;case"textarea":fh(e),hN(e);break;case"option":n.value!=null&&e.setAttribute("value",""+yo(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Sc(e,!!n.multiple,i,!1):n.defaultValue!=null&&Sc(e,!!n.multiple,n.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=Tf)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Qs(t),null;case 6:if(e&&t.stateNode!=null)dC(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(we(166));if(r=nl(tm.current),nl(Ia.current),Nh(t)){if(n=t.stateNode,r=t.memoizedProps,n[Sa]=t,(i=n.nodeValue!==r)&&(e=an,e!==null))switch(e.tag){case 3:jh(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&jh(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Sa]=t,t.stateNode=n}return Qs(t),null;case 13:if(Vt(Gt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(qt&&rn!==null&&t.mode&1&&!(t.flags&128))E2(),ed(),t.flags|=98560,i=!1;else if(i=Nh(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(we(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(we(317));i[Sa]=t}else ed(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qs(t),i=!1}else Gn!==null&&(oy(Gn),Gn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Gt.current&1?Ps===0&&(Ps=3):C0())),t.updateQueue!==null&&(t.flags|=4),Qs(t),null);case 4:return sd(),Zv(e,t),e===null&&Xu(t.stateNode.containerInfo),Qs(t),null;case 10:return d0(t.type._context),Qs(t),null;case 17:return Dr(t.type)&&Af(),Qs(t),null;case 19:if(Vt(Gt),i=t.memoizedState,i===null)return Qs(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)Yd(i,!1);else{if(Ps!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ff(e),o!==null){for(t.flags|=128,Yd(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ut(Gt,Gt.current&1|2),t.child}e=e.sibling}i.tail!==null&&us()>nd&&(t.flags|=128,n=!0,Yd(i,!1),t.lanes=4194304)}else{if(!n)if(e=Ff(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Yd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!qt)return Qs(t),null}else 2*us()-i.renderingStartTime>nd&&r!==1073741824&&(t.flags|=128,n=!0,Yd(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=us(),t.sibling=null,r=Gt.current,Ut(Gt,n?r&1|2:r&1),t):(Qs(t),null);case 22:case 23:return S0(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Qr&1073741824&&(Qs(t),t.subtreeFlags&6&&(t.flags|=8192)):Qs(t),null;case 24:return null;case 25:return null}throw Error(we(156,t.tag))}function hD(e,t){switch(i0(t),t.tag){case 1:return Dr(t.type)&&Af(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 24,708 bytes, line 41
41case 3:return sd(),Vt(Or),Vt(nr),p0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return f0(t),null;case 13:if(Vt(Gt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(we(340));ed()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vt(Gt),null;case 4:return sd(),null;case 10:return d0(t.type._context),null;case 22:case 23:return S0(),null;case 24:return null;default:return null}}var Sh=!1,Zs=!1,fD=typeof WeakSet=="function"?WeakSet:Set,Re=null;function _c(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ts(e,t,n)}else r.current=null}function ey(e,t,r){try{r()}catch(n){ts(e,t,n)}}var s_=!1;function pD(e,t){if(Lv=Cf,e=p2(),n0(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,l=-1,c=-1,d=0,u=0,m=e,f=null;t:for(;;){for(var p;m!==r||a!==0&&m.nodeType!==3||(l=o+a),m!==i||n!==0&&m.nodeType!==3||(c=o+n),m.nodeType===3&&(o+=m.nodeValue.length),(p=m.firstChild)!==null;)f=m,m=p;for(;;){if(m===e)break t;if(f===r&&++d===a&&(l=o),f===i&&++u===n&&(c=o),(p=m.nextSibling)!==null)break;m=f,f=m.parentNode}m=p}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Fv={focusedElem:e,selectionRange:r},Cf=!1,Re=t;Re!==null;)if(t=Re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Re=e;else for(;Re!==null;){t=Re;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var g=v.memoizedProps,b=v.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:zn(t.type,g),b);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(we(163))}}catch(j){ts(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,Re=e;break}Re=t.return}return v=s_,s_=!1,v}function Pu(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&ey(t,r,i)}a=a.next}while(a!==n)}}function Fp(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function ty(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function uC(e){var t=e.alternate;t!==null&&(e.alternate=null,uC(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Sa],delete t[Zu],delete t[Bv],delete t[XO],delete t[JO])),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 mC(e){return e.tag===5||e.tag===3||e.tag===4}function r_(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mC(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 sy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Tf));else if(n!==4&&(e=e.child,e!==null))for(sy(e,t,r),e=e.sibling;e!==null;)sy(e,t,r),e=e.sibling}function ry(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(ry(e,t,r),e=e.sibling;e!==null;)ry(e,t,r),e=e.sibling}var Bs=null,Hn=!1;function Pi(e,t,r){for(r=r.child;r!==null;)hC(e,t,r),r=r.sibling}function hC(e,t,r){if(Aa&&typeof Aa.onCommitFiberUnmount=="function")try{Aa.onCommitFiberUnmount(Tp,r)}catch{}switch(r.tag){case 5:Zs||_c(r,t);case 6:var n=Bs,a=Hn;Bs=null,Pi(e,t,r),Bs=n,Hn=a,Bs!==null&&(Hn?(e=Bs,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Bs.removeChild(r.stateNode));break;case 18:Bs!==null&&(Hn?(e=Bs,r=r.stateNode,e.nodeType===8?dx(e.parentNode,r):e.nodeType===1&&dx(e,r),Yu(e)):dx(Bs,r.stateNode));break;case 4:n=Bs,a=Hn,Bs=r.stateNode.containerInfo,Hn=!0,Pi(e,t,r),Bs=n,Hn=a;break;case 0:case 11:case 14:case 15:if(!Zs&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&ey(r,t,o),a=a.next}while(a!==n)}Pi(e,t,r);break;case 1:if(!Zs&&(_c(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){ts(r,t,l)}Pi(e,t,r);break;case 21:Pi(e,t,r);break;case 22:r.mode&1?(Zs=(n=Zs)||r.memoizedState!==null,Pi(e,t,r),Zs=n):Pi(e,t,r);break;default:Pi(e,t,r)}}function n_(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new fD),t.forEach(function(n){var a=_D.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function Ln(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var a=r[n];try{var i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:Bs=l.stateNode,Hn=!1;break e;case 3:Bs=l.stateNode.containerInfo,Hn=!0;break e;case 4:Bs=l.stateNode.containerInfo,Hn=!0;break e}l=l.return}if(Bs===null)throw Error(we(160));hC(i,o,a),Bs=null,Hn=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(d){ts(a,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)fC(t,e),t=t.sibling}function fC(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ln(t,e),ma(e),n&4){try{Pu(3,e,e.return),Fp(3,e)}catch(g){ts(e,e.return,g)}try{Pu(5,e,e.return)}catch(g){ts(e,e.return,g)}}break;case 1:Ln(t,e),ma(e),n&512&&r!==null&&_c(r,r.return);break;case 5:if(Ln(t,e),ma(e),n&512&&r!==null&&_c(r,r.return),e.flags&32){var a=e.stateNode;try{Vu(a,"")}catch(g){ts(e,e.return,g)}}if(n&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&DS(a,i),Cv(l,o);var d=Cv(l,i);for(o=0;o<c.length;o+=2){var u=c[o],m=c[o+1];u==="style"?BS(a,m):u==="dangerouslySetInnerHTML"?$S(a,m):u==="children"?Vu(a,m):Hb(a,u,m,d)}switch(l){case"input":jv(a,i);break;case"textarea":LS(a,i);break;case"select":var f=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Sc(a,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?Sc(a,!!i.multiple,i.defaultValue,!0):Sc(a,!!i.multiple,i.multiple?[]:"",!1))}a[Zu]=i}catch(g){ts(e,e.return,g)}}break;case 6:if(Ln(t,e),ma(e),n&4){if(e.stateNode===null)throw Error(we(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(g){ts(e,e.return,g)}}break;case 3:if(Ln(t,e),ma(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Yu(t.containerInfo)}catch(g){ts(e,e.return,g)}break;case 4:Ln(t,e),ma(e);break;case 13:Ln(t,e),ma(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(_0=us())),n&4&&n_(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(Zs=(d=Zs)||u,Ln(t,e),Zs=d):Ln(t,e),ma(e),n&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!u&&e.mode&1)for(Re=e,u=e.child;u!==null;){for(m=Re=u;Re!==null;){switch(f=Re,p=f.child,f.tag){case 0:case 11:case 14:case 15:Pu(4,f,f.return);break;case 1:_c(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(g){ts(n,r,g)}}break;case 5:_c(f,f.return);break;case 22:if(f.memoizedState!==null){i_(m);continue}}p!==null?(p.return=f,Re=p):i_(m)}u=u.sibling}e:for(u=null,m=e;;){if(m.tag===5){if(u===null){u=m;try{a=m.stateNode,d?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=m.stateNode,c=m.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=US("display",o))}catch(g){ts(e,e.return,g)}}}else if(m.tag===6){if(u===null)try{m.stateNode.nodeValue=d?"":m.memoizedProps}catch(g){ts(e,e.return,g)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;u===m&&(u=null),m=m.return}u===m&&(u=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Ln(t,e),ma(e),n&4&&n_(e);break;case 21:break;default:Ln(t,e),ma(e)}}function ma(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(mC(r)){var n=r;break e}r=r.return}throw Error(we(160))}switch(n.tag){case 5:var a=n.stateNode;n.flags&32&&(Vu(a,""),n.flags&=-33);var i=r_(e);ry(e,i,a);break;case 3:case 4:var o=n.stateNode.containerInfo,l=r_(e);sy(e,l,o);break;default:throw Error(we(161))}}catch(c){ts(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gD(e,t,r){Re=e,pC(e)}function pC(e,t,r){for(var n=(e.mode&1)!==0;Re!==null;){var a=Re,i=a.child;if(a.tag===22&&n){var o=a.memoizedState!==null||Sh;if(!o){var l=a.alternate,c=l!==null&&l.memoizedState!==null||Zs;l=Sh;var d=Zs;if(Sh=o,(Zs=c)&&!d)for(Re=a;Re!==null;)o=Re,c=o.child,o.tag===22&&o.memoizedState!==null?o_(a):c!==null?(c.return=o,Re=c):o_(a);for(;i!==null;)Re=i,pC(i),i=i.sibling;Re=a,Sh=l,Zs=d}a_(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,Re=i):a_(e)}}function a_(e){for(;Re!==null;){var t=Re;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Zs||Fp(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Zs)if(r===null)n.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:zn(t.type,r.memoizedProps);n.componentDidUpdate(a,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&WN(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}WN(t,o,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var u=d.memoizedState;if(u!==null){var m=u.dehydrated;m!==null&&Yu(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(we(163))}Zs||t.flags&512&&ty(t)}catch(f){ts(t,t.return,f)}}if(t===e){Re=null;break}if(r=t.sibling,r!==null){r.return=t.return,Re=r;break}Re=t.return}}function i_(e){for(;Re!==null;){var t=Re;if(t===e){Re=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Re=r;break}Re=t.return}}function o_(e){for(;Re!==null;){var t=Re;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Fp(4,t)}catch(c){ts(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var a=t.return;try{n.componentDidMount()}catch(c){ts(t,a,c)}}var i=t.return;try{ty(t)}catch(c){ts(t,i,c)}break;case 5:var o=t.return;try{ty(t)}catch(c){ts(t,o,c)}}}catch(c){ts(t,t.return,c)}if(t===e){Re=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Re=l;break}Re=t.return}}var xD=Math.ceil,Bf=ji.ReactCurrentDispatcher,j0=ji.ReactCurrentOwner,_n=ji.ReactCurrentBatchConfig,kt=0,Ls=null,js=null,Ws=0,Qr=0,kc=Ao(0),Ps=0,am=null,Nl=0,$p=0,N0=0,Tu=null,Pr=null,_0=0,nd=1/0,Ja=null,zf=!1,ny=null,uo=null,Ch=!1,Zi=null,Wf=0,Au=0,ay=null,nf=-1,af=0;function pr(){return kt&6?us():nf!==-1?nf:nf=us()}function mo(e){return e.mode&1?kt&2&&Ws!==0?Ws&-Ws:eD.transition!==null?(af===0&&(af=ZS()),af):(e=Rt,e!==0||(e=window.event,e=e===void 0?16:i2(e.type)),e):1}function Zn(e,t,r,n){if(50<Au)throw Au=0,ay=null,Error(we(185));Om(e,r,n),(!(kt&2)||e!==Ls)&&(e===Ls&&(!(kt&2)&&($p|=r),Ps===4&&zi(e,Ws)),Lr(e,n),r===1&&kt===0&&!(t.mode&1)&&(nd=us()+500,Op&&Io()))}function Lr(e,t){var r=e.callbackNode;eO(e,t);var n=Sf(e,e===Ls?Ws:0);if(n===0)r!==null&&gN(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&gN(r),t===1)e.tag===0?ZO(l_.bind(null,e)):k2(l_.bind(null,e)),KO(function(){!(kt&6)&&Io()}),r=null;else{switch(e2(n)){case 1:r=Qb;break;case 4:r=XS;break;case 16:r=kf;break;case 536870912:r=JS;break;default:r=kf}r=NC(r,gC.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function gC(e,t){if(nf=-1,af=0,kt&6)throw Error(we(327));var r=e.callbackNode;if(Ac()&&e.callbackNode!==r)return null;var n=Sf(e,e===Ls?Ws:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Vf(e,n);else{t=n;var a=kt;kt|=2;var i=vC();(Ls!==e||Ws!==t)&&(Ja=null,nd=us()+500,pl(e,t));do try{bD();break}catch(l){xC(e,l)}while(!0);c0(),Bf.current=i,kt=a,js!==null?t=0:(Ls=null,Ws=0,t=Ps)}if(t!==0){if(t===2&&(a=Iv(e),a!==0&&(n=a,t=iy(e,a))),t===1)throw r=am,pl(e,0),zi(e,n),Lr(e,us()),r;if(t===6)zi(e,n);else{if(a=e.current.alternate,!(n&30)&&!vD(a)&&(t=Vf(e,n),t===2&&(i=Iv(e),i!==0&&(n=i,t=iy(e,i))),t===1))throw r=am,pl(e,0),zi(e,n),Lr(e,us()),r;switch(e.finishedWork=a,e.finishedLanes=n,t){case 0:case 1:throw Error(we(345));case 2:Qo(e,Pr,Ja);break;case 3:if(zi(e,n),(n&130023424)===n&&(t=_0+500-us(),10<t)){if(Sf(e,0)!==0)break;if(a=e.suspendedLanes,(a&n)!==n){pr(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Uv(Qo.bind(null,e,Pr,Ja),t);break}Qo(e,Pr,Ja);break;case 4:if(zi(e,n),(n&4194240)===n)break;for(t=e.eventTimes,a=-1;0<n;){var o=31-Jn(n);i=1<<o,o=t[o],o>a&&(a=o),n&=~i}if(n=a,n=us()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*xD(n/1960))-n,10<n){e.timeoutHandle=Uv(Qo.bind(null,e,Pr,Ja),n);break}Qo(e,Pr,Ja);break;case 5:Qo(e,Pr,Ja);break;default:throw Error(we(329))}}}return Lr(e,us()),e.callbackNode===r?gC.bind(null,e):null}function iy(e,t){var r=Tu;return e.current.memoizedState.isDehydrated&&(pl(e,t).flags|=256),e=Vf(e,t),e!==2&&(t=Pr,Pr=r,t!==null&&oy(t)),e}function oy(e){Pr===null?Pr=e:Pr.push.apply(Pr,e)}function vD(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var a=r[n],i=a.getSnapshot;a=a.value;try{if(!ra(i(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function zi(e,t){for(t&=~N0,t&=~$p,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Jn(t),n=1<<r;e[r]=-1,t&=~n}}function l_(e){if(kt&6)throw Error(we(327));Ac();var t=Sf(e,0);if(!(t&1))return Lr(e,us()),null;var r=Vf(e,t);if(e.tag!==0&&r===2){var n=Iv(e);n!==0&&(t=n,r=iy(e,n))}if(r===1)throw r=am,pl(e,0),zi(e,t),Lr(e,us()),r;if(r===6)throw Error(we(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Qo(e,Pr,Ja),Lr(e,us()),null}function k0(e,t){var r=kt;kt|=1;try{return e(t)}finally{kt=r,kt===0&&(nd=us()+500,Op&&Io())}}function _l(e){Zi!==null&&Zi.tag===0&&!(kt&6)&&Ac();var t=kt;kt|=1;var r=_n.transition,n=Rt;try{if(_n.transition=null,Rt=1,e)return e()}finally{Rt=n,_n.transition=r,kt=t,!(kt&6)&&Io()}}function S0(){Qr=kc.current,Vt(kc)}function pl(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,YO(r)),js!==null)for(r=js.return;r!==null;){var n=r;switch(i0(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Af();break;case 3:sd(),Vt(Or),Vt(nr),p0();break;case 5:f0(n);break;case 4:sd();break;case 13:Vt(Gt);break;case 19:Vt(Gt);break;case 10:d0(n.type._context);break;case 22:case 23:S0()}r=r.return}if(Ls=e,js=e=ho(e.current,null),Ws=Qr=t,Ps=0,am=null,N0=$p=Nl=0,Pr=Tu=null,rl!==null){for(t=0;t<rl.length;t++)if(r=rl[t],n=r.interleaved,n!==null){r.interleaved=null;var a=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=a,n.next=o}r.pending=n}rl=null}return e}function xC(e,t){do{var r=js;try{if(c0(),tf.current=Uf,$f){for(var n=Qt.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}$f=!1}if(jl=0,Is=Es=Qt=null,Eu=!1,sm=0,j0.current=null,r===null||r.return===null){Ps=1,am=t,js=null;break}e:{var i=e,o=r.return,l=r,c=t;if(t=Ws,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,u=l,m=u.tag;if(!(u.mode&1)&&(m===0||m===11||m===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=KN(o);if(p!==null){p.flags&=-257,QN(p,o,l,i,t),p.mode&1&&YN(i,d,t),t=p,c=d;var v=t.updateQueue;if(v===null){var g=new Set;g.add(c),t.updateQueue=g}else v.add(c);break e}else{if(!(t&1)){YN(i,d,t),C0();break e}c=Error(we(426))}}else if(qt&&l.mode&1){var b=KN(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),QN(b,o,l,i,t),o0(rd(c,l));break e}}i=c=rd(c,l),Ps!==4&&(Ps=2),Tu===null?Tu=[i]:Tu.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=eC(i,c,t);zN(i,y);break e;case 1:l=c;var x=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(uo===null||!uo.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var j=tC(i,l,t);zN(i,j);break e}}i=i.return}while(i!==null)}bC(r)}catch(N){t=N,js===r&&r!==null&&(js=r=r.return);continue}break}while(!0)}function vC(){var e=Bf.current;return Bf.current=Uf,e===null?Uf:e}function C0(){(Ps===0||Ps===3||Ps===2)&&(Ps=4),Ls===null||!(Nl&268435455)&&!($p&268435455)||zi(Ls,Ws)}function Vf(e,t){var r=kt;kt|=2;var n=vC();(Ls!==e||Ws!==t)&&(Ja=null,pl(e,t));do try{yD();break}catch(a){xC(e,a)}while(!0);if(c0(),kt=r,Bf.current=n,js!==null)throw Error(we(261));return Ls=null,Ws=0,Ps}function yD(){for(;js!==null;)yC(js)}function bD(){for(;js!==null&&!HM();)yC(js)}function yC(e){var t=jC(e.alternate,e,Qr);e.memoizedProps=e.pendingProps,t===null?bC(e):js=t,j0.current=null}function bC(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=hD(r,t),r!==null){r.flags&=32767,js=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ps=6,js=null;return}}else if(r=mD(r,t,Qr),r!==null){js=r;return}if(t=t.sibling,t!==null){js=t;return}js=t=e}while(t!==null);Ps===0&&(Ps=5)}function Qo(e,t,r){var n=Rt,a=_n.transition;try{_n.transition=null,Rt=1,wD(e,t,r,n)}finally{_n.transition=a,Rt=n}return null}function wD(e,t,r,n){do Ac();while(Zi!==null);if(kt&6)throw Error(we(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(we(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(tO(e,i),e===Ls&&(js=Ls=null,Ws=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ch||(Ch=!0,NC(kf,function(){return Ac(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=_n.transition,_n.transition=null;var o=Rt;Rt=1;var l=kt;kt|=4,j0.current=null,pD(e,r),fC(r,e),BO(Fv),Cf=!!Lv,Fv=Lv=null,e.current=r,gD(r),qM(),kt=l,Rt=o,_n.transition=i}else e.current=r;if(Ch&&(Ch=!1,Zi=e,Wf=a),i=e.pendingLanes,i===0&&(uo=null),KM(r.stateNode),Lr(e,us()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],n(a.value,{componentStack:a.stack,digest:a.digest});if(zf)throw zf=!1,e=ny,ny=null,e;return Wf&1&&e.tag!==0&&Ac(),i=e.pendingLanes,i&1?e===ay?Au++:(Au=0,ay=e):Au=0,Io(),null}function Ac(){if(Zi!==null){var e=e2(Wf),t=_n.transition,r=Rt;try{if(_n.transition=null,Rt=16>e?16:e,Zi===null)var n=!1;else{if(e=Zi,Zi=null,Wf=0,kt&6)throw Error(we(331));var a=kt;for(kt|=4,Re=e.current;Re!==null;){var i=Re,o=i.child;if(Re.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var d=l[c];for(Re=d;Re!==null;){var u=Re;switch(u.tag){case 0:case 11:case 15:Pu(8,u,i)}var m=u.child;if(m!==null)m.return=u,Re=m;else for(;Re!==null;){u=Re;var f=u.sibling,p=u.return;if(uC(u),u===d){Re=null;break}if(f!==null){f.return=p,Re=f;break}Re=p}}}var v=i.alternate;if(v!==null){var g=v.child;if(g!==null){v.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}Re=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,Re=o;else e:for(;Re!==null;){if(i=Re,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Pu(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,Re=y;break e}Re=i.return}}var x=e.current;for(Re=x;Re!==null;){o=Re;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,Re=w;else e:for(o=x;Re!==null;){if(l=Re,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Fp(9,l)}}catch(N){ts(l,l.return,N)}if(l===o){Re=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,Re=j;break e}Re=l.return}}if(kt=a,Io(),Aa&&typeof Aa.onPostCommitFiberRoot=="function")try{Aa.onPostCommitFiberRoot(Tp,e)}catch{}n=!0}return n}finally{Rt=r,_n.transition=t}}return!1}function c_(e,t,r){t=rd(r,t),t=eC(e,t,1),e=co(e,t,1),t=pr(),e!==null&&(Om(e,1,t),Lr(e,t))}function ts(e,t,r){if(e.tag===3)c_(e,e,r);else for(;t!==null;){if(t.tag===3){c_(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(uo===null||!uo.has(n))){e=rd(r,e),e=tC(t,e,1),t=co(t,e,1),e=pr(),t!==null&&(Om(t,1,e),Lr(t,e));break}}t=t.return}}function jD(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=pr(),e.pingedLanes|=e.suspendedLanes&r,Ls===e&&(Ws&r)===r&&(Ps===4||Ps===3&&(Ws&130023424)===Ws&&500>us()-_0?pl(e,0):N0|=r),Lr(e,t)}function wC(e,t){t===0&&(e.mode&1?(t=xh,xh<<=1,!(xh&130023424)&&(xh=4194304)):t=1);var r=pr();e=gi(e,t),e!==null&&(Om(e,t,r),Lr(e,r))}function ND(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),wC(e,r)}function _D(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(we(314))}n!==null&&n.delete(t),wC(e,r)}var jC;jC=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Or.current)Rr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Rr=!1,uD(e,t,r);Rr=!!(e.flags&131072)}else Rr=!1,qt&&t.flags&1048576&&S2(t,Mf,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;rf(e,t),e=t.pendingProps;var a=Zc(t,nr.current);Tc(t,r),a=x0(null,t,n,e,a,r);var i=v0();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Dr(n)?(i=!0,If(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,m0(t),a.updater=Lp,t.stateNode=a,a._reactInternals=t,Gv(t,n,e,r),t=Qv(null,t,n,!0,i,r)):(t.tag=0,qt&&i&&a0(t),mr(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(rf(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=SD(n),e=zn(n,e),a){case 0:t=Kv(null,t,n,e,r);break e;case 1:t=ZN(null,t,n,e,r);break e;case 11:t=XN(null,t,n,e,r);break e;case 14:t=JN(null,t,n,zn(n.type,e),r);break e}throw Error(we(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:zn(n,a),Kv(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:zn(n,a),ZN(e,t,n,a,r);case 3:e:{if(aC(t),e===null)throw Error(we(387));n=t.pendingProps,i=t.memoizedState,a=i.element,I2(e,t),Lf(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=rd(Error(we(423)),t),t=e_(e,t,n,r,a);break e}else if(n!==a){a=rd(Error(we(424)),t),t=e_(e,t,n,r,a);break e}else for(rn=lo(t.stateNode.containerInfo.firstChild),an=t,qt=!0,Gn=null,r=T2(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ed(),n===a){t=xi(e,t,r);break e}mr(e,t,n,r)}t=t.child}return t;case 5:return R2(t),e===null&&Vv(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,$v(n,a)?o=null:i!==null&&$v(n,i)&&(t.flags|=32),nC(e,t),mr(e,t,o,r),t.child;case 6:return e===null&&Vv(t),null;case 13:return iC(e,t,r);case 4:return h0(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=td(t,null,n,r):mr(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:zn(n,a),XN(e,t,n,a,r);case 7:return mr(e,t,t.pendingProps,r),t.child;case 8:return mr(e,t,t.pendingProps.children,r),t.child;case 12:return mr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,Ut(Of,n._currentValue),n._currentValue=o,i!==null)if(ra(i.value,o)){if(i.children===a.children&&!Or.current){t=xi(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);
vendor: 4,303 bytes, line 41
41i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=di(-1,r&-r),c.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var u=d.pending;u===null?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),Hv(i.return,r,t),l.lanes|=r;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(we(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Hv(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}mr(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,Tc(t,r),a=Cn(a),n=n(a),t.flags|=1,mr(e,t,n,r),t.child;case 14:return n=t.type,a=zn(n,t.pendingProps),a=zn(n.type,a),JN(e,t,n,a,r);case 15:return sC(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:zn(n,a),rf(e,t),t.tag=1,Dr(n)?(e=!0,If(t)):e=!1,Tc(t,r),Z2(t,n,a),Gv(t,n,a,r),Qv(null,t,n,!0,e,r);case 19:return oC(e,t,r);case 22:return rC(e,t,r)}throw Error(we(156,t.tag))};function NC(e,t){return QS(e,t)}function kD(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wn(e,t,r,n){return new kD(e,t,r,n)}function E0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function SD(e){if(typeof e=="function")return E0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Gb)return 11;if(e===Yb)return 14}return 2}function ho(e,t){var r=e.alternate;return r===null?(r=wn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function of(e,t,r,n,a,i){var o=2;if(n=e,typeof e=="function")E0(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case pc:return gl(r.children,a,i,t);case qb:o=8,a|=8;break;case xv:return e=wn(12,r,t,a|2),e.elementType=xv,e.lanes=i,e;case vv:return e=wn(13,r,t,a),e.elementType=vv,e.lanes=i,e;case yv:return e=wn(19,r,t,a),e.elementType=yv,e.lanes=i,e;case RS:return Up(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case AS:o=10;break e;case IS:o=9;break e;case Gb:o=11;break e;case Yb:o=14;break e;case Fi:o=16,n=null;break e}throw Error(we(130,e==null?e:typeof e,""))}return t=wn(o,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function gl(e,t,r,n){return e=wn(7,e,n,t),e.lanes=r,e}function Up(e,t,r,n){return e=wn(22,e,n,t),e.elementType=RS,e.lanes=r,e.stateNode={isHidden:!1},e}function vx(e,t,r){return e=wn(6,e,null,t),e.lanes=r,e}function yx(e,t,r){return t=wn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function CD(e,t,r,n,a){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=Zg(0),this.expirationTimes=Zg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zg(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function P0(e,t,r,n,a,i,o,l,c){return e=new CD(e,t,r,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=wn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},m0(i),e}function ED(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 4,595 bytes, line 41
41return{$$typeof:fc,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function _C(e){if(!e)return bo;e=e._reactInternals;e:{if(Dl(e)!==e||e.tag!==1)throw Error(we(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Dr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(we(171))}if(e.tag===1){var r=e.type;if(Dr(r))return _2(e,r,t)}return t}function kC(e,t,r,n,a,i,o,l,c){return e=P0(r,n,!0,e,a,i,o,l,c),e.context=_C(null),r=e.current,n=pr(),a=mo(r),i=di(n,a),i.callback=t??null,co(r,i,a),e.current.lanes=a,Om(e,a,n),Lr(e,n),e}function Bp(e,t,r,n){var a=t.current,i=pr(),o=mo(a);return r=_C(r),t.context===null?t.context=r:t.pendingContext=r,t=di(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=co(a,t,o),e!==null&&(Zn(e,a,o,i),ef(e,a,o)),o}function Hf(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 d_(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function T0(e,t){d_(e,t),(e=e.alternate)&&d_(e,t)}function PD(){return null}var SC=typeof reportError=="function"?reportError:function(e){console.error(e)};function A0(e){this._internalRoot=e}zp.prototype.render=A0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(we(409));Bp(e,t,null,null)};zp.prototype.unmount=A0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_l(function(){Bp(null,e,null,null)}),t[pi]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=r2();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Bi.length&&t!==0&&t<Bi[r].priority;r++);Bi.splice(r,0,e),r===0&&a2(e)}};function I0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Wp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function u_(){}function TD(e,t,r,n,a){if(a){if(typeof n=="function"){var i=n;n=function(){var d=Hf(o);i.call(d)}}var o=kC(t,n,e,0,null,!1,!1,"",u_);return e._reactRootContainer=o,e[pi]=o.current,Xu(e.nodeType===8?e.parentNode:e),_l(),o}for(;a=e.lastChild;)e.removeChild(a);if(typeof n=="function"){var l=n;n=function(){var d=Hf(c);l.call(d)}}var c=P0(e,0,!1,null,null,!1,!1,"",u_);return e._reactRootContainer=c,e[pi]=c.current,Xu(e.nodeType===8?e.parentNode:e),_l(function(){Bp(t,c,r,n)}),c}function Vp(e,t,r,n,a){var i=r._reactRootContainer;if(i){var o=i;if(typeof a=="function"){var l=a;a=function(){var c=Hf(o);l.call(c)}}Bp(t,o,e,a)}else o=TD(r,t,e,a,n);return Hf(o)}t2=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=mu(t.pendingLanes);r!==0&&(Xb(t,r|1),Lr(t,us()),!(kt&6)&&(nd=us()+500,Io()))}break;case 13:_l(function(){var n=gi(e,1);if(n!==null){var a=pr();Zn(n,e,1,a)}}),T0(e,1)}};Jb=function(e){if(e.tag===13){var t=gi(e,134217728);if(t!==null){var r=pr();Zn(t,e,134217728,r)}T0(e,134217728)}};s2=function(e){if(e.tag===13){var t=mo(e),r=gi(e,t);if(r!==null){var n=pr();Zn(r,e,t,n)}T0(e,t)}};r2=function(){return Rt};n2=function(e,t){var r=Rt;try{return Rt=e,t()}finally{Rt=r}};Pv=function(e,t,r){switch(t){case"input":if(jv(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var a=Mp(n);if(!a)throw Error(we(90));OS(n),jv(n,a)}}}break;case"textarea":LS(e,r);break;case"select":t=r.value,t!=null&&Sc(e,!!r.multiple,t,!1)}};VS=k0;HS=_l;var AD={usingClientEntryPoint:!1,Events:[Lm,yc,Mp,zS,WS,k0]},Kd={findFiberByHostInstance:sl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ID={bundleType:Kd.bundleType,version:Kd.version,rendererPackageName:Kd.rendererPackageName,rendererConfig:Kd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ji.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=YS(e),e===null?null:e.stateNode},findFiberByHostInstance:Kd.findFiberByHostInstance||PD,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
41if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Eh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Eh.isDisabled&&Eh.supportsFiber)try{Tp=Eh.inject(ID),Aa=Eh}catch{}}dn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AD;dn.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!I0(t))throw Error(we(200));return ED(e,t,null,r)};dn.createRoot=function(e,t){if(!I0(e))throw Error(we(299));var r=!1,n="",a=SC;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=P0(e,1,!1,null,null,r,!1,n,a),e[pi]=t.current,Xu(e.nodeType===8?e.parentNode:e),new A0(t)};dn.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(we(188)):(e=Object.keys(e).join(","),Error(we(268,e)));return e=YS(t),e=e===null?null:e.stateNode,e};dn.flushSync=function(e){return _l(e)};dn.hydrate=function(e,t,r){if(!Wp(t))throw Error(we(200));return Vp(null,e,t,!0,r)};dn.hydrateRoot=function(e,t,r){if(!I0(e))throw Error(we(405));var n=r!=null&&r.hydratedSources||null,a=!1,i="",o=SC;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=kC(t,null,e,1,r??null,a,!1,i,o),e[pi]=t.current,Xu(e),n)for(e=0;e<n.length;e++)r=n[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new zp(t)};dn.render=function(e,t,r){if(!Wp(t))throw Error(we(200));return Vp(null,e,t,!1,r)};dn.unmountComponentAtNode=function(e){if(!Wp(e))throw Error(we(40));return e._reactRootContainer?(_l(function(){Vp(null,null,e,!1,function(){e._reactRootContainer=null,e[pi]=null})}),!0):!1};dn.unstable_batchedUpdates=k0;dn.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Wp(r))throw Error(we(200));if(e==null||e._reactInternals===void 0)throw Error(we(38));return Vp(e,t,r,!1,n)};dn.version="18.3.1-next-f1338f8080-20240426";function CC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(CC)}catch(e){console.error(e)}}CC(),CS.exports=dn;var Ll=CS.exports;const EC=pS(Ll);var PC,m_=Ll;PC=m_.createRoot,m_.hydrateRoot;const RD=1,MD=1e6;let bx=0;function OD(){return bx=(bx+1)%Number.MAX_SAFE_INTEGER,bx.toString()}const wx=new Map,h_=e=>{if(wx.has(e))return;const t=setTimeout(()=>{wx.delete(e),Iu({type:"REMOVE_TOAST",toastId:e})},MD);wx.set(e,t)},DD=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,RD)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?h_(r):e.toasts.forEach(n=>{h_(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 13,913 bytes, line 41
41n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},lf=[];let cf={toasts:[]};function Iu(e){cf=DD(cf,e),lf.forEach(t=>{t(cf)})}function ad({...e}){const t=OD(),r=a=>Iu({type:"UPDATE_TOAST",toast:{...a,id:t}}),n=()=>Iu({type:"DISMISS_TOAST",toastId:t});return Iu({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||n()}}}),{id:t,dismiss:n,update:r}}function at(){const[e,t]=h.useState(cf);return h.useEffect(()=>(lf.push(t),()=>{const r=lf.indexOf(t);r>-1&&lf.splice(r,1)}),[e]),{...e,toast:ad,dismiss:r=>Iu({type:"DISMISS_TOAST",toastId:r})}}function pe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function f_(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hp(...e){return t=>{let r=!1;const n=e.map(a=>{const i=f_(a,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<n.length;a++){const i=n[a];typeof i=="function"?i():f_(e[a],null)}}}}function Ye(...e){return h.useCallback(Hp(...e),e)}function LD(e,t){const r=h.createContext(t),n=i=>{const{children:o,...l}=i,c=h.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:c,children:o})};n.displayName=e+"Provider";function a(i){const o=h.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,a]}function gs(e,t=[]){let r=[];function n(i,o){const l=h.createContext(o),c=r.length;r=[...r,o];const d=m=>{var y;const{scope:f,children:p,...v}=m,g=((y=f==null?void 0:f[e])==null?void 0:y[c])||l,b=h.useMemo(()=>v,Object.values(v));return s.jsx(g.Provider,{value:b,children:p})};d.displayName=i+"Provider";function u(m,f){var g;const p=((g=f==null?void 0:f[e])==null?void 0:g[c])||l,v=h.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${m}\` must be used within \`${i}\``)}return[d,u]}const a=()=>{const i=r.map(o=>h.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[n,FD(a,...t)]}function FD(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=n.reduce((l,{useScope:c,scopeName:d})=>{const m=c(i)[`__scope${d}`];return{...l,...m}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function wo(e){const t=$D(e),r=h.forwardRef((n,a)=>{const{children:i,...o}=n,l=h.Children.toArray(i),c=l.find(UD);if(c){const d=c.props.children,u=l.map(m=>m===c?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:m);return s.jsx(t,{...o,ref:a,children:h.isValidElement(d)?h.cloneElement(d,void 0,u):null})}return s.jsx(t,{...o,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}var TC=wo("Slot");function $D(e){const t=h.forwardRef((r,n)=>{const{children:a,...i}=r;if(h.isValidElement(a)){const o=zD(a),l=BD(i,a.props);return a.type!==h.Fragment&&(l.ref=n?Hp(n,o):o),h.cloneElement(a,l)}return h.Children.count(a)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var AC=Symbol("radix.slottable");function IC(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=AC,t}function UD(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===AC}function BD(e,t){const r={...t};for(const n in t){const a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function zD(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function $m(e){const t=e+"CollectionProvider",[r,n]=gs(t),[a,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:b,children:y}=g,x=ie.useRef(null),w=ie.useRef(new Map).current;return s.jsx(a,{scope:b,itemMap:w,collectionRef:x,children:y})};o.displayName=t;const l=e+"CollectionSlot",c=wo(l),d=ie.forwardRef((g,b)=>{const{scope:y,children:x}=g,w=i(l,y),j=Ye(b,w.collectionRef);return s.jsx(c,{ref:j,children:x})});d.displayName=l;const u=e+"CollectionItemSlot",m="data-radix-collection-item",f=wo(u),p=ie.forwardRef((g,b)=>{const{scope:y,children:x,...w}=g,j=ie.useRef(null),N=Ye(b,j),S=i(u,y);return ie.useEffect(()=>(S.itemMap.set(j,{ref:j,...w}),()=>void S.itemMap.delete(j))),s.jsx(f,{[m]:"",ref:N,children:x})});p.displayName=u;function v(g){const b=i(e+"CollectionConsumer",g);return ie.useCallback(()=>{const x=b.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(b.itemMap.values()).sort((S,E)=>w.indexOf(S.ref.current)-w.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:d,ItemSlot:p},v,n]}var WD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ce=WD.reduce((e,t)=>{const r=wo(`Primitive.${t}`),n=h.forwardRef((a,i)=>{const{asChild:o,...l}=a,c=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function R0(e,t){e&&Ll.flushSync(()=>e.dispatchEvent(t))}function rs(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function VD(e,t=globalThis==null?void 0:globalThis.document){const r=rs(e);h.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var HD="DismissableLayer",ly="dismissableLayer.update",qD="dismissableLayer.pointerDownOutside",GD="dismissableLayer.focusOutside",p_,RC=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fl=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,d=h.useContext(RC),[u,m]=h.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=h.useState({}),v=Ye(t,E=>m(E)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),x=u?g.indexOf(u):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,j=x>=y,N=KD(E=>{const _=E.target,I=[...d.branches].some(R=>R.contains(_));!j||I||(a==null||a(E),o==null||o(E),E.defaultPrevented||l==null||l())},f),S=QD(E=>{const _=E.target;[...d.branches].some(R=>R.contains(_))||(i==null||i(E),o==null||o(E),E.defaultPrevented||l==null||l())},f);return VD(E=>{x===d.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},f),h.useEffect(()=>{if(u)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(p_=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),g_(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=p_)}},[u,f,r,d]),h.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),g_())},[u,d]),h.useEffect(()=>{const E=()=>p({});return document.addEventListener(ly,E),()=>document.removeEventListener(ly,E)},[]),s.jsx(Ce.div,{...c,ref:v,style:{pointerEvents:w?j?"auto":"none":void 0,...e.style},onFocusCapture:pe(e.onFocusCapture,S.onFocusCapture),onBlurCapture:pe(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:pe(e.onPointerDownCapture,N.onPointerDownCapture)})});Fl.displayName=HD;var YD="DismissableLayerBranch",MC=h.forwardRef((e,t)=>{const r=h.useContext(RC),n=h.useRef(null),a=Ye(t,n);return h.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),s.jsx(Ce.div,{...e,ref:a})});MC.displayName=YD;function KD(e,t=globalThis==null?void 0:globalThis.document){const r=rs(e),n=h.useRef(!1),a=h.useRef(()=>{});return h.useEffect(()=>{const i=l=>{if(l.target&&!n.current){let c=function(){OC(qD,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function QD(e,t=globalThis==null?void 0:globalThis.document){const r=rs(e),n=h.useRef(!1);return h.useEffect(()=>{const a=i=>{i.target&&!n.current&&OC(GD,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function g_(){const e=new CustomEvent(ly);document.dispatchEvent(e)}function OC(e,t,r,{discrete:n}){const a=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?R0(a,i):a.dispatchEvent(i)}var XD=Fl,JD=MC,is=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},ZD="Portal",kd=h.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[a,i]=h.useState(!1);is(()=>i(!0),[]);const o=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?EC.createPortal(s.jsx(Ce.div,{...n,ref:t}),o):null});kd.displayName=ZD;function e5(e,t){return h.useReducer((r,n)=>t[r][n]??r,e)}var Ns=e=>{const{present:t,children:r}=e,n=t5(t),a=typeof r=="function"?r({present:n.isPresent}):h.Children.only(r),i=Ye(n.ref,s5(a));return typeof r=="function"||n.isPresent?h.cloneElement(a,{ref:i}):null};Ns.displayName="Presence";function t5(e){const[t,r]=h.useState(),n=h.useRef(null),a=h.useRef(e),i=h.useRef("none"),o=e?"mounted":"unmounted",[l,c]=e5(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const d=Ph(n.current);i.current=l==="mounted"?d:"none"},[l]),is(()=>{const d=n.current,u=a.current;if(u!==e){const f=i.current,p=Ph(d);e?c("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),is(()=>{if(t){let d;const u=t.ownerDocument.defaultView??window,m=p=>{const g=Ph(n.current).includes(p.animationName);if(p.target===t&&g&&(c("ANIMATION_END"),!a.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=p=>{p.target===t&&(i.current=Ph(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{u.clearTimeout(d),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:h.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function Ph(e){return(e==null?void 0:e.animationName)||"none"}function s5(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var r5=zb[" useInsertionEffect ".trim().toString()]||is;function xr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,i,o]=n5({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:a;{const u=h.useRef(e!==void 0);h.useEffect(()=>{const m=u.current;m!==l&&console.warn(`${n} is changing from ${m?"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.`),u.current=l},[l,n])}const d=h.useCallback(u=>{var m;if(l){const f=a5(u)?u(e):u;f!==e&&((m=o.current)==null||m.call(o,f))}else i(u)},[l,e,i,o]);return[c,d]}function n5({defaultProp:e,onChange:t}){const[r,n]=h.useState(e),a=h.useRef(r),i=h.useRef(t);return r5(()=>{i.current=t},[t]),h.useEffect(()=>{var o;a.current!==r&&((o=i.current)==null||o.call(i,r),a.current=r)},[r,a]),[r,n,i]}function a5(e){return typeof e=="function"}var DC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),i5="VisuallyHidden",qp=h.forwardRef((e,t)=>s.jsx(Ce.span,{...e,ref:t,style:{...DC,...e.style}}));qp.displayName=i5;var o5=qp,M0="ToastProvider",[O0,l5,c5]=$m("Toast"),[LC,Zee]=gs("Toast",[c5]),[d5,Gp]=LC(M0),FC=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:i=50,children:o}=e,[l,c]=h.useState(null),[d,u]=h.useState(0),m=h.useRef(!1),f=h.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${M0}\`. Expected non-empty \`string\`.`),s.jsx(O0.Provider,{scope:t,children:s.jsx(d5,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:i,toastCount:d,viewport:l,onViewportChange:c,onToastAdd:h.useCallback(()=>u(p=>p+1),[]),onToastRemove:h.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:f,children:o})})};FC.displayName=M0;var $C="ToastViewport",u5=["F8"],cy="toast.viewportPause",dy="toast.viewportResume",UC=h.forwardRef((e,t)=>
41{const{__scopeToast:r,hotkey:n=u5,label:a="Notifications ({hotkey})",...i}=e,o=Gp($C,r),l=l5(r),c=h.useRef(null),d=h.useRef(null),u=h.useRef(null),m=h.useRef(null),f=Ye(t,m,o.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;h.useEffect(()=>{const b=y=>{var w;n.length!==0&&n.every(j=>y[j]||y.code===j)&&((w=m.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),h.useEffect(()=>{const b=c.current,y=m.current;if(v&&b&&y){const x=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(cy);y.dispatchEvent(S),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(dy);y.dispatchEvent(S),o.isClosePausedRef.current=!1}},j=S=>{!b.contains(S.relatedTarget)&&w()},N=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",x),b.addEventListener("focusout",j),b.addEventListener("pointermove",x),b.addEventListener("pointerleave",N),window.addEventListener("blur",x),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",x),b.removeEventListener("focusout",j),b.removeEventListener("pointermove",x),b.removeEventListener("pointerleave",N),window.removeEventListener("blur",x),window.removeEventListener("focus",w)}}},[v,o.isClosePausedRef]);const g=h.useCallback(({tabbingDirection:b})=>{const x=l().map(w=>{const j=w.ref.current,N=[j,..._5(j)];return b==="forwards"?N:N.reverse()});return(b==="forwards"?x.reverse():x).flat()},[l]);return h.useEffect(()=>{const b=m.current;if(b){const y=x=>{var N,S,E;const w=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!w){const _=document.activeElement,I=x.shiftKey;if(x.target===b&&I){(N=d.current)==null||N.focus();return}const k=g({tabbingDirection:I?"backwards":"forwards"}),C=k.findIndex(A=>A===_);jx(k.slice(C+1))?x.preventDefault():I?(S=d.current)==null||S.focus():(E=u.current)==null||E.focus()}};return b.addEventListener("keydown",y),()=>b.removeEventListener("keydown",y)}},[l,g]),s.jsxs(JD,{ref:c,role:"region","aria-label":a.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&s.jsx(uy,{ref:d,onFocusFromOutsideViewport:()=>{const b=g({tabbingDirection:"forwards"});jx(b)}}),s.jsx(O0.Slot,{scope:r,children:s.jsx(Ce.ol,{tabIndex:-1,...i,ref:f})}),v&&s.jsx(uy,{ref:u,onFocusFromOutsideViewport:()=>{const b=g({tabbingDirection:"backwards"});jx(b)}})]})});UC.displayName=$C;var BC="ToastFocusProxy",uy=h.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...a}=e,i=Gp(BC,r);return s.jsx(qp,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:o=>{var d;const l=o.relatedTarget;!((d=i.viewport)!=null&&d.contains(l))&&n()}})});uy.displayName=BC;var Um="Toast",m5="toast.swipeStart",h5="toast.swipeMove",f5="toast.swipeCancel",p5="toast.swipeEnd",zC=h.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:a,onOpenChange:i,...o}=e,[l,c]=xr({prop:n,defaultProp:a??!0,onChange:i,caller:Um});return s.jsx(Ns,{present:r||l,children:s.jsx(v5,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:rs(e.onPause),onResume:rs(e.onResume),onSwipeStart:pe(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:pe(e.onSwipeMove,d=>{const{x:u,y:m}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:pe(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:pe(e.onSwipeEnd,d=>{const{x:u,y:m}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),c(!1)})})})});zC.displayName=Um;var[g5,x5]=LC(Um,{onClose(){}}),v5=h.forwardRef((e,t)=>
41{const{__scopeToast:r,type:n="foreground",duration:a,open:i,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:d,onSwipeStart:u,onSwipeMove:m,onSwipeCancel:f,onSwipeEnd:p,...v}=e,g=Gp(Um,r),[b,y]=h.useState(null),x=Ye(t,A=>y(A)),w=h.useRef(null),j=h.useRef(null),N=a||g.duration,S=h.useRef(0),E=h.useRef(N),_=h.useRef(0),{onToastAdd:I,onToastRemove:R}=g,T=rs(()=>{var L;(b==null?void 0:b.contains(document.activeElement))&&((L=g.viewport)==null||L.focus()),o()}),k=h.useCallback(A=>{!A||A===1/0||(window.clearTimeout(_.current),S.current=new Date().getTime(),_.current=window.setTimeout(T,A))},[T]);h.useEffect(()=>{const A=g.viewport;if(A){const L=()=>{k(E.current),d==null||d()},O=()=>{const P=new Date().getTime()-S.current;E.current=E.current-P,window.clearTimeout(_.current),c==null||c()};return A.addEventListener(cy,O),A.addEventListener(dy,L),()=>{A.removeEventListener(cy,O),A.removeEventListener(dy,L)}}},[g.viewport,N,c,d,k]),h.useEffect(()=>{i&&!g.isClosePausedRef.current&&k(N)},[i,N,g.isClosePausedRef,k]),h.useEffect(()=>(I(),()=>R()),[I,R]);const C=h.useMemo(()=>b?KC(b):null,[b]);return g.viewport?s.jsxs(s.Fragment,{children:[C&&s.jsx(y5,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:C}),s.jsx(g5,{scope:r,onClose:T,children:Ll.createPortal(s.jsx(O0.ItemSlot,{scope:r,children:s.jsx(XD,{asChild:!0,onEscapeKeyDown:pe(l,()=>{g.isFocusedToastEscapeKeyDownRef.current||T(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(Ce.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...v,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:pe(e.onKeyDown,A=>{A.key==="Escape"&&(l==null||l(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,T()))}),onPointerDown:pe(e.onPointerDown,A=>{A.button===0&&(w.current={x:A.clientX,y:A.clientY})}),onPointerMove:pe(e.onPointerMove,A=>{if(!w.current)return;const L=A.clientX-w.current.x,O=A.clientY-w.current.y,P=!!j.current,M=["left","right"].includes(g.swipeDirection),D=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,$=M?D(0,L):0,W=M?0:D(0,O),X=A.pointerType==="touch"?10:2,q={x:$,y:W},H={originalEvent:A,delta:q};P?(j.current=q,Th(h5,m,H,{discrete:!1})):x_(q,g.swipeDirection,X)?(j.current=q,Th(m5,u,H,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(L)>X||Math.abs(O)>X)&&(w.current=null)}),onPointerUp:pe(e.onPointerUp,A=>{const L=j.current,O=A.target;if(O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),j.current=null,w.current=null,L){const P=A.currentTarget,M={originalEvent:A,delta:L};x_(L,g.swipeDirection,g.swipeThreshold)?Th(p5,p,M,{discrete:!0}):Th(f5,f,M,{discrete:!0}),P.addEventListener("click",D=>D.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),y5=e=>{const{__scopeToast:t,children:r,...n}=e,a=Gp(Um,t),[i,o]=h.useState(!1),[l,c]=h.useState(!1);return j5(()=>o(!0)),h.useEffect(()=>{const d=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:s.jsx(kd,{asChild:!0,children:s.jsx(qp,{...n,children:i&&s.jsxs(s.Fragment,{children:[a.label," ",r]})})})},b5="ToastTitle",WC=h.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return s.jsx(Ce.div,{...n,ref:t})});WC.displayName=b5;var w5="ToastDescription",VC=h.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return s.jsx(Ce.div,{...n,ref:t})});VC.displayName=w5;var HC="ToastAction",qC=h.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?s.jsx(YC,{altText:r,asChild:!0,children:s.jsx(D0,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${HC}\`. Expected non-empty \`string\`.`),null)});qC.displayName=HC;var GC="ToastClose",D0=h.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,a=x5(GC,r);return s.jsx(YC,{asChild:!0,children:s.jsx(Ce.button,{type:"button",...n,ref:t,onClick:pe(e.onClick,a.onClose)})})});D0.displayName=GC;var YC=h.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...a}=e;return s.jsx(Ce.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...a,ref:t})});function KC(e){const t=[];
vendor: 4,279 bytes, lines 41-66
41return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),N5(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!a)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...KC(n))}}),t}function Th(e,t,r,{discrete:n}){const a=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?R0(a,i):a.dispatchEvent(i)}var x_=(e,t,r=0)=>{const n=Math.abs(e.x),a=Math.abs(e.y),i=n>a;return t==="left"||t==="right"?i&&n>r:!i&&a>r};function j5(e=()=>{}){const t=rs(e);is(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function N5(e){return e.nodeType===e.ELEMENT_NODE}function _5(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function jx(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var k5=FC,QC=UC,XC=zC,JC=WC,ZC=VC,eE=qC,tE=D0;function sE(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=sE(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function rE(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=sE(e))&&(n&&(n+=" "),n+=t);return n}const v_=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,y_=rE,Sd=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return y_(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(d=>{const u=r==null?void 0:r[d],m=i==null?void 0:i[d];if(u===null)return null;const f=v_(u)||v_(m);return a[d][f]}),l=r&&Object.entries(r).reduce((d,u)=>{let[m,f]=u;return f===void 0||(d[m]=f),d},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,u)=>{let{class:m,className:f,...p}=u;return Object.entries(p).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...i,...l}[g]):{...i,...l}[g]===b})?[...d,m,f]:d},[]);return y_(e,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};/** 42 * @license lucide-react v0.462.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const S5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nE=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 47 * @license lucide-react v0.462.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */var C5={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"};/** 52 * @license lucide-react v0.462.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const E5=h.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:o,...l},c)=>h.createElement("svg",{ref:c,...C5,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:nE("lucide",a),...l},[...o.map(([d,u])=>h.createElement(d,u)),...Array.isArray(i)?i:[i]]));/** 57 * @license lucide-react v0.462.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const he=(e,t)=>{const r=h.forwardRef(({className:n,...a},i)=>h.createElement(E5,{ref:i,iconNode:t,className:nE(`lucide-${S5(e)}`,n),...a}));return r.displayName=`${e}`,r};/** 62 * @license lucide-react v0.462.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const aE=he("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
66-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** 67 * @license lucide-react v0.462.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const as=he("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 72 * @license lucide-react v0.462.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const P5=he("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 77 * @license lucide-react v0.462.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const Yp=he("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"}]]);/** 82 * @license lucide-react v0.462.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const T5=he("BadgeCheck",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 87 * @license lucide-react v0.462.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const A5=he("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** 92 * @license lucide-react v0.462.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const I5=he("BellOff",[["path",{d:"M8.7 3A6 6 0 0 1 18 8a21.3 21.3 0 0 0 .6 5",key:"o7mx20"}],["path",{d:"M17 17H3s3-2 3-9a4.67 4.67 0 0 1 .3-1.7",key:"16f1lm"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 97 * @license lucide-react v0.462.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const iE=he("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"}]]);/** 102 * @license lucide-react v0.462.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const Ra=he("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"}]]);/** 107 * @license lucide-react v0.462.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const R5=he("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 112 * @license lucide-react v0.462.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const Ar=he("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 117 * @license lucide-react v0.462.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const oE=he("ChefHat",[["path",{d:"M17 21a1 1 0 0 0 1-1v-5.35c0-.457.316-.844.727-1.041a4 4 0 0 0-2.134-7.589 5 5 0 0 0-9.186 0 4 4 0 0 0-2.134 7.588c.411.198.727.585.727 1.041V20a1 1 0 0 0 1 1Z",key:"1qvrer"}],["path",{d:"M6 17h12",key:"1jwigz"}]]);/** 122 * @license lucide-react v0.462.0 - ISC 123 * 124 * This source code is licensed under the ISC license. 125 * See the LICENSE file in the root directory of this source tree. 126 */const $l=he("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 127 * @license lucide-react v0.462.0 - ISC 128 * 129 * This source code is licensed under the ISC license. 130 * See the LICENSE file in the root directory of this source tree. 131 */const ea=he("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 132 * @license lucide-react v0.462.0 - ISC 133 * 134 * This source code is licensed under the ISC license. 135 * See the LICENSE file in the root directory of this source tree. 136 */const Da=he("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 137 * @license lucide-react v0.462.0 - ISC 138 * 139 * This source code is licensed under the ISC license. 140 * See the LICENSE file in the root directory of this source tree. 141 */const L0=he("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 142 * @license lucide-react v0.462.0 - ISC 143 * 144 * This source code is licensed under the ISC license. 145 * See the LICENSE file in the root directory of this source tree. 146 */const ns=he("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 147 * @license lucide-react v0.462.0 - ISC 148 * 149 * This source code is licensed under the ISC license. 150 * See the LICENSE file in the root directory of this source tree. 151 */const ta=he("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 152 * @license lucide-react v0.462.0 - ISC 153 * 154 * This source code is licensed under the ISC license. 155 * See the LICENSE file in the root directory of this source tree. 156 */const ms=he("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 157 * @license lucide-react v0.462.0 - ISC 158 * 159 * This source code is licensed under the ISC license. 160 * See the LICENSE file in the root directory of this source tree. 161 */const qf=he("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/** 162 * @license lucide-react v0.462.0 - ISC 163 * 164 * This source code is licensed under the ISC license. 165 * See the LICENSE file in the root directory of this source tree. 166 */const Rs=he("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"}]]);/** 167 * @license lucide-react v0.462.0 - ISC 168 * 169 * This source code is licensed under the ISC license. 170 * See the LICENSE file in the root directory of this source tree. 171 */const lE=he("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 172 * @license lucide-react v0.462.0 - ISC 173 * 174 * This source code is licensed under the ISC license. 175 * See the LICENSE file in the root directory of this source tree. 176 */const Ms=he("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 177 * @license lucide-react v0.462.0 - ISC 178 * 179 * This source code is licensed under the ISC license. 180 * See the LICENSE file in the root directory of this source tree.
181 */const F0=he("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"}]]);/** 182 * @license lucide-react v0.462.0 - ISC 183 * 184 * This source code is licensed under the ISC license. 185 * See the LICENSE file in the root directory of this source tree. 186 */const Ir=he("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 187 * @license lucide-react v0.462.0 - ISC 188 * 189 * This source code is licensed under the ISC license. 190 * See the LICENSE file in the root directory of this source tree. 191 */const ui=he("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** 192 * @license lucide-react v0.462.0 - ISC 193 * 194 * This source code is licensed under the ISC license. 195 * See the LICENSE file in the root directory of this source tree. 196 */const df=he("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** 197 * @license lucide-react v0.462.0 - ISC 198 * 199 * This source code is licensed under the ISC license. 200 * See the LICENSE file in the root directory of this source tree. 201 */const M5=he("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 202 * @license lucide-react v0.462.0 - ISC 203 * 204 * This source code is licensed under the ISC license. 205 * See the LICENSE file in the root directory of this source tree. 206 */const vi=he("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"}]]);/** 207 * @license lucide-react v0.462.0 - ISC 208 * 209 * This source code is licensed under the ISC license. 210 * See the LICENSE file in the root directory of this source tree. 211 */const Za=he("Dumbbell",[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]]);/** 212 * @license lucide-react v0.462.0 - ISC 213 * 214 * This source code is licensed under the ISC license. 215 * See the LICENSE file in the root directory of this source tree. 216 */const cE=he("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** 217 * @license lucide-react v0.462.0 - ISC 218 * 219 * This source code is licensed under the ISC license. 220 * See the LICENSE file in the root directory of this source tree. 221 */const b_=he("Euro",[["path",{d:"M4 10h12",key:"1y6xl8"}],["path",{d:"M4 14h9",key:"1loblj"}],["path",{d:"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",key:"1j6lzo"}]]);/** 222 * @license lucide-react v0.462.0 - ISC 223 * 224 * This source code is licensed under the ISC license. 225 * See the LICENSE file in the root directory of this source tree. 226 */const im=he("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"}]]);/** 227 * @license lucide-react v0.462.0 - ISC 228 * 229 * This source code is licensed under the ISC license. 230 * See the LICENSE file in the root directory of this source tree. 231 */const Gf=he("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"}]]);/** 232 * @license lucide-react v0.462.0 - ISC 233 * 234 * This source code is licensed under the ISC license. 235 * See the LICENSE file in the root directory of this source tree. 236 */const my=he("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"}]]);/** 237 * @license lucide-react v0.462.0 - ISC 238 * 239 * This source code is licensed under the ISC license. 240 * See the LICENSE file in the root directory of this source tree. 241 */const O5=he("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 242 * @license lucide-react v0.462.0 - ISC 243 * 244 * This source code is licensed under the ISC license. 245 * See the LICENSE file in the root directory of this source tree. 246 */const dE=he("FileImage",[["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"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]);/** 247 * @license lucide-react v0.462.0 - ISC 248 * 249 * This source code is licensed under the ISC license. 250 * See the LICENSE file in the root directory of this source tree. 251 */const D5=he("FileSpreadsheet",[["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:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]);/** 252 * @license lucide-react v0.462.0 - ISC 253 * 254 * This source code is licensed under the ISC license. 255 * See the LICENSE file in the root directory of this source tree. 256 */const L5=he("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"}]]);/** 257 * @license lucide-react v0.462.0 - ISC 258 * 259 * This source code is licensed under the ISC license. 260 * See the LICENSE file in the root directory of this source tree. 261 */const F5=he("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** 262 * @license lucide-react v0.462.0 - ISC 263 * 264 * This source code is licensed under the ISC license. 265 * See the LICENSE file in the root directory of this source tree. 266 */const La=he("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 267 * @license lucide-react v0.462.0 - ISC 268 * 269 * This source code is licensed under the ISC license. 270 * See the LICENSE file in the root directory of this source tree. 271 */const pa=he("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/** 272 * @license lucide-react v0.462.0 - ISC 273 * 274 * This source code is licensed under the ISC license. 275 * See the LICENSE file in the root directory of this source tree. 276 */const w_=he("HeartOff",[["line",{x1:"2",y1:"2",x2:"22",y2:"22",key:"1w4vcy"}],["path",{d:"M16.5 16.5 12 21l-7-7c-1.5-1.45-3-3.2-3-5.5a5.5 5.5 0 0 1 2.14-4.35",key:"3mpagl"}],["path",{d:"M8.76 3.1c1.15.22 2.13.78 3.24 1.9 1.5-1.5 2.74-2 4.5-2A5.5 5.5 0 0 1 22 8.5c0 2.12-1.3 3.78-2.67 5.17",key:"1gh3v3"}]]);/** 277 * @license lucide-react v0.462.0 - ISC 278 * 279 * This source code is licensed under the ISC license. 280 * See the LICENSE file in the root directory of this source tree. 281 */const ws=he("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"}]]);/** 282 * @license lucide-react v0.462.0 - ISC 283 * 284 * This source code is licensed under the ISC license. 285 * See the LICENSE file in the root directory of this source tree. 286 */const hy=he("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"}]]);/** 287 * @license lucide-react v0.462.0 - ISC 288 * 289 * This source code is licensed under the ISC license. 290 * See the LICENSE file in the root directory of this source tree. 291 */const Kp=he("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 292 * @license lucide-react v0.462.0 - ISC 293 * 294 * This source code is licensed under the ISC license. 295 * See the LICENSE file in the root directory of this source tree. 296 */const $0=he("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** 297 * @license lucide-react v0.462.0 - ISC 298 * 299 * This source code is licensed under the ISC license. 300 * See the LICENSE file in the root directory of this source tree. 301 */const uE=he("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 302 * @license lucide-react v0.462.0 - ISC 303 * 304 * This source code is licensed under the ISC license. 305 * See the LICENSE file in the root directory of this source tree. 306 */const $5=he("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 307 * @license lucide-react v0.462.0 - ISC 308 * 309 * This source code is licensed under the ISC license. 310 * See the LICENSE file in the root directory of this source tree. 311 */const U5=he("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** 312 * @license lucide-react v0.462.0 - ISC 313 * 314 * This source code is licensed under the ISC license. 315 * See the LICENSE file in the root directory of this source tree. 316 */const mt=he("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 317 * @license lucide-react v0.462.0 - ISC 318 * 319 * This source code is licensed under the ISC license. 320 * See the LICENSE file in the root directory of this source tree.
321 */const Qp=he("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 322 * @license lucide-react v0.462.0 - ISC 323 * 324 * This source code is licensed under the ISC license. 325 * See the LICENSE file in the root directory of this source tree. 326 */const fy=he("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"}]]);/** 327 * @license lucide-react v0.462.0 - ISC 328 * 329 * This source code is licensed under the ISC license. 330 * See the LICENSE file in the root directory of this source tree. 331 */const Fa=he("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"}]]);/** 332 * @license lucide-react v0.462.0 - ISC 333 * 334 * This source code is licensed under the ISC license. 335 * See the LICENSE file in the root directory of this source tree. 336 */const mE=he("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"}]]);/** 337 * @license lucide-react v0.462.0 - ISC 338 * 339 * This source code is licensed under the ISC license. 340 * See the LICENSE file in the root directory of this source tree. 341 */const Yf=he("Medal",[["path",{d:"M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",key:"143lza"}],["path",{d:"M11 12 5.12 2.2",key:"qhuxz6"}],["path",{d:"m13 12 5.88-9.8",key:"hbye0f"}],["path",{d:"M8 7h8",key:"i86dvs"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}],["path",{d:"M12 18v-2h-.5",key:"fawc4q"}]]);/** 342 * @license lucide-react v0.462.0 - ISC 343 * 344 * This source code is licensed under the ISC license. 345 * See the LICENSE file in the root directory of this source tree. 346 */const hE=he("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 347 * @license lucide-react v0.462.0 - ISC 348 * 349 * This source code is licensed under the ISC license. 350 * See the LICENSE file in the root directory of this source tree. 351 */const Xp=he("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 352 * @license lucide-react v0.462.0 - ISC 353 * 354 * This source code is licensed under the ISC license. 355 * See the LICENSE file in the root directory of this source tree. 356 */const fE=he("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"}]]);/** 357 * @license lucide-react v0.462.0 - ISC 358 * 359 * This source code is licensed under the ISC license. 360 * See the LICENSE file in the root directory of this source tree. 361 */const B5=he("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** 362 * @license lucide-react v0.462.0 - ISC 363 * 364 * This source code is licensed under the ISC license. 365 * See the LICENSE file in the root directory of this source tree. 366 */const pE=he("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 367 * @license lucide-react v0.462.0 - ISC 368 * 369 * This source code is licensed under the ISC license. 370 * See the LICENSE file in the root directory of this source tree. 371 */const z5=he("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** 372 * @license lucide-react v0.462.0 - ISC 373 * 374 * This source code is licensed under the ISC license. 375 * See the LICENSE file in the root directory of this source tree. 376 */const W5=he("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/** 377 * @license lucide-react v0.462.0 - ISC 378 * 379 * This source code is licensed under the ISC license. 380 * See the LICENSE file in the root directory of this source tree. 381 */const V5=he("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/** 382 * @license lucide-react v0.462.0 - ISC 383 * 384 * This source code is licensed under the ISC license. 385 * See the LICENSE file in the root directory of this source tree. 386 */const H5=he("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** 387 * @license lucide-react v0.462.0 - ISC 388 * 389 * This source code is licensed under the ISC license. 390 * See the LICENSE file in the root directory of this source tree. 391 */const gE=he("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"}]]);/** 392 * @license lucide-react v0.462.0 - ISC 393 * 394 * This source code is licensed under the ISC license. 395 * See the LICENSE file in the root directory of this source tree. 396 */const q5=he("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);/** 397 * @license lucide-react v0.462.0 - ISC 398 * 399 * This source code is licensed under the ISC license. 400 * See the LICENSE file in the root directory of this source tree. 401 */const py=he("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7
401a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/** 402 * @license lucide-react v0.462.0 - ISC 403 * 404 * This source code is licensed under the ISC license. 405 * See the LICENSE file in the root directory of this source tree. 406 */const Os=he("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 407 * @license lucide-react v0.462.0 - ISC 408 * 409 * This source code is licensed under the ISC license. 410 * See the LICENSE file in the root directory of this source tree. 411 */const Ic=he("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 412 * @license lucide-react v0.462.0 - ISC 413 * 414 * This source code is licensed under the ISC license. 415 * See the LICENSE file in the root directory of this source tree. 416 */const xE=he("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/** 417 * @license lucide-react v0.462.0 - ISC 418 * 419 * This source code is licensed under the ISC license. 420 * See the LICENSE file in the root directory of this source tree. 421 */const G5=he("Receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);/** 422 * @license lucide-react v0.462.0 - ISC 423 * 424 * This source code is licensed under the ISC license. 425 * See the LICENSE file in the root directory of this source tree. 426 */const Yt=he("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 427 * @license lucide-react v0.462.0 - ISC 428 * 429 * This source code is licensed under the ISC license. 430 * See the LICENSE file in the root directory of this source tree. 431 */const Ru=he("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/** 432 * @license lucide-react v0.462.0 - ISC 433 * 434 * This source code is licensed under the ISC license. 435 * See the LICENSE file in the root directory of this source tree. 436 */const Y5=he("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"}]]);/** 437 * @license lucide-react v0.462.0 - ISC 438 * 439 * This source code is licensed under the ISC license. 440 * See the LICENSE file in the root directory of this source tree. 441 */const U0=he("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 442 * @license lucide-react v0.462.0 - ISC 443 * 444 * This source code is licensed under the ISC license. 445 * See the LICENSE file in the root directory of this source tree. 446 */const Hr=he("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 447 * @license lucide-react v0.462.0 - ISC 448 * 449 * This source code is licensed under the ISC license. 450 * See the LICENSE file in the root directory of this source tree. 451 */const j_=he("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"}]]);/** 452 * @license lucide-react v0.462.0 - ISC 453 * 454 * This source code is licensed under the ISC license. 455 * See the LICENSE file in the root directory of this source tree. 456 */const B0=he("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"}]]);/** 457 * @license lucide-react v0.462.0 - ISC 458 * 459 * This source code is licensed under the ISC license. 460 * See the LICENSE file in the root directory of this source tree. 461 */const K5=he("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 462 * @license lucide-react v0.462.0 - ISC 463 * 464 * This source code is licensed under the ISC license. 465 * See the LICENSE file in the root directory of this source tree. 466 */const kl=he("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
466y:"oel41y"}]]);/** 467 * @license lucide-react v0.462.0 - ISC 468 * 469 * This source code is licensed under the ISC license. 470 * See the LICENSE file in the root directory of this source tree. 471 */const Sl=he("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** 472 * @license lucide-react v0.462.0 - ISC 473 * 474 * This source code is licensed under the ISC license. 475 * See the LICENSE file in the root directory of this source tree. 476 */const Q5=he("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** 477 * @license lucide-react v0.462.0 - ISC 478 * 479 * This source code is licensed under the ISC license. 480 * See the LICENSE file in the root directory of this source tree. 481 */const X5=he("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 482 * @license lucide-react v0.462.0 - ISC 483 * 484 * This source code is licensed under the ISC license. 485 * See the LICENSE file in the root directory of this source tree. 486 */const J5=he("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/** 487 * @license lucide-react v0.462.0 - ISC 488 * 489 * This source code is licensed under the ISC license. 490 * See the LICENSE file in the root directory of this source tree. 491 */const jo=he("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 492 * @license lucide-react v0.462.0 - ISC 493 * 494 * This source code is licensed under the ISC license. 495 * See the LICENSE file in the root directory of this source tree. 496 */const vE=he("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"}]]);/** 497 * @license lucide-react v0.462.0 - ISC 498 * 499 * This source code is licensed under the ISC license. 500 * See the LICENSE file in the root directory of this source tree. 501 */const id=he("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"}]]);/** 502 * @license lucide-react v0.462.0 - ISC 503 * 504 * This source code is licensed under the ISC license. 505 * See the LICENSE file in the root directory of this source tree. 506 */const Z5=he("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** 507 * @license lucide-react v0.462.0 - ISC 508 * 509 * This source code is licensed under the ISC license. 510 * See the LICENSE file in the root directory of this source tree. 511 */const e6=he("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 512 * @license lucide-react v0.462.0 - ISC 513 * 514 * This source code is licensed under the ISC license. 515 * See the LICENSE file in the root directory of this source tree. 516 */const t6=he("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/** 517 * @license lucide-react v0.462.0 - ISC 518 * 519 * This source code is licensed under the ISC license. 520 * See the LICENSE file in the root directory of this source tree. 521 */const s6=he("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/** 522 * @license lucide-react v0.462.0 - ISC 523 * 524 * This source code is licensed under the ISC license. 525 * See the LICENSE file in the root directory of this source tree. 526 */const jn=he("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
526],["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"}]]);/** 527 * @license lucide-react v0.462.0 - ISC 528 * 529 * This source code is licensed under the ISC license. 530 * See the LICENSE file in the root directory of this source tree. 531 */const Bm=he("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"}]]);/** 532 * @license lucide-react v0.462.0 - ISC 533 * 534 * This source code is licensed under the ISC license. 535 * See the LICENSE file in the root directory of this source tree. 536 */const Rc=he("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"}]]);/** 537 * @license lucide-react v0.462.0 - ISC 538 * 539 * This source code is licensed under the ISC license. 540 * See the LICENSE file in the root directory of this source tree. 541 */const ss=he("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/** 542 * @license lucide-react v0.462.0 - ISC 543 * 544 * This source code is licensed under the ISC license. 545 * See the LICENSE file in the root directory of this source tree. 546 */const r6=he("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/** 547 * @license lucide-react v0.462.0 - ISC 548 * 549 * This source code is licensed under the ISC license. 550 * See the LICENSE file in the root directory of this source tree. 551 */const Kf=he("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"}]]);/** 552 * @license lucide-react v0.462.0 - ISC 553 * 554 * This source code is licensed under the ISC license. 555 * See the LICENSE file in the root directory of this source tree. 556 */const Nn=he("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"}]]);/** 557 * @license lucide-react v0.462.0 - ISC 558 * 559 * This source code is licensed under the ISC license. 560 * See the LICENSE file in the root directory of this source tree. 561 */const Ul=he("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"}]]);/** 562 * @license lucide-react v0.462.0 - ISC 563 * 564 * This source code is licensed under the ISC license. 565 * See the LICENSE file in the root directory of this source tree. 566 */const N_=he("Utensils",[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]]);/** 567 * @license lucide-react v0.462.0 - ISC 568 * 569 * This source code is licensed under the ISC license. 570 * See the LICENSE file in the root directory of this source tree. 571 */const No=he("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** 572 * @license lucide-react v0.462.0 - ISC 573 * 574 * This source code is licensed under the ISC license. 575 * See the LICENSE file in the root directory of this source tree. 576 */const qr=he("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 577 * @license lucide-react v0.462.0 - ISC 578 * 579 * This source code is licensed under the ISC license. 580 * See the LICENSE file in the root directory of this source tree. 581 */const n6=he("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.5
vendor: 9,525 bytes, lines 581-586
5815 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);/** 582 * @license lucide-react v0.462.0 - ISC 583 * 584 * This source code is licensed under the ISC license. 585 * See the LICENSE file in the root directory of this source tree. 586 */const om=he("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),z0="-",a6=e=>{const t=o6(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split(z0);return l[0]===""&&l.length!==1&&l.shift(),yE(l,t)||i6(o)},getConflictingClassGroupIds:(o,l)=>{const c=r[o]||[];return l&&n[o]?[...c,...n[o]]:c}}},yE=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?yE(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(z0);return(o=t.validators.find(({validator:l})=>l(i)))==null?void 0:o.classGroupId},__=/^\[(.+)\]$/,i6=e=>{if(__.test(e)){const t=__.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},o6=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return c6(Object.entries(e.classGroups),r).forEach(([i,o])=>{gy(o,n,i,t)}),n},gy=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:k_(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(l6(a)){gy(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{gy(o,k_(t,i),r,n)})})},k_=(e,t)=>{let r=e;return t.split(z0).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},l6=e=>e.isThemeGetter,c6=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,l])=>[t+o,l])):i);return[r,a]}):e,d6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}},bE="!",u6=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=l=>{const c=[];let d=0,u=0,m;for(let b=0;b<l.length;b++){let y=l[b];if(d===0){if(y===a&&(n||l.slice(b,b+i)===t)){c.push(l.slice(u,b)),u=b+i;continue}if(y==="/"){m=b;continue}}y==="["?d++:y==="]"&&d--}const f=c.length===0?l:l.substring(u),p=f.startsWith(bE),v=p?f.substring(1):f,g=m&&m>u?m-u:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}};return r?l=>r({className:l,parseClassName:o}):o},m6=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},h6=e=>({cache:d6(e.cacheSize),parseClassName:u6(e),...a6(e)}),f6=/\s+/,p6=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(f6);let l="";for(let c=o.length-1;c>=0;c-=1){const d=o[c],{modifiers:u,hasImportantModifier:m,baseClassName:f,maybePostfixModifierPosition:p}=r(d);let v=!!p,g=n(v?f.substring(0,p):f);if(!g){if(!v){l=d+(l.length>0?" "+l:l);continue}if(g=n(f),!g){l=d+(l.length>0?" "+l:l);continue}v=!1}const b=m6(u).join(":"),y=m?b+bE:b,x=y+g;if(i.includes(x))continue;i.push(x);const w=a(g,v);for(let j=0;j<w.length;++j){const N=w[j];i.push(y+N)}l=d+(l.length>0?" "+l:l)}return l};function g6(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=wE(t))&&(n&&(n+=" "),n+=r);return n}const wE=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=wE(e[n]))&&(r&&(r+=" "),r+=t);return r};function x6(e,...t){let r,n,a,i=o;function o(c){const d=t.reduce((u,m)=>m(u),e());return r=h6(d),n=r.cache.get,a=r.cache.set,i=l,l(c)}function l(c){const d=n(c);if(d)return d;const u=p6(c,r);return a(c,u),u}return function(){return i(g6.apply(null,arguments))}}const zt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},jE=/^\[(?:([a-z-]+):)?(.+)\]$/i,v6=/^\d+\/\d+$/,y6=new Set(["px","full","screen"]),b6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,w6=/\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$/,j6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,N6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qa=e=>Mc(e)||y6.has(e)||v6.test(e),Ti=e=>Cd(e,"length",I6),Mc=e=>!!e&&!Number.isNaN(Number(e)),Nx=e=>Cd(e,"number",Mc),Qd=e=>!!e&&Number.isInteger(Number(e)),k6=e=>e.endsWith("%")&&Mc(e.slice(0,-1)),lt=e=>jE.test(e),Ai=e=>b6.test(e),S6=new Set(["length","size","percentage"]),C6=e=>Cd(e,S6,NE),E6=e=>Cd(e,"position",NE),P6=new Set(["image","url"]),T6=e=>Cd(e,P6,M6),A6=e=>Cd(e,"",R6),Xd=()=>!0,Cd=(e,t,r)=>{const n=jE.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},I6=e=>w6.test(e)&&!j6.test(e),NE=()=>!1,R6=e=>N6.test(e),M6=e=>_6.test(e),O6=()=>{const e=zt("colors"),t=zt("spacing"),r=zt("blur"),n=zt("brightness"),a=zt("borderColor"),i=zt("borderRadius"),o=zt("borderSpacing"),l=zt("borderWidth"),c=zt("contrast"),d=zt("grayscale"),u=zt("hueRotate"),m=zt("invert"),f=zt("gap"),p=zt("gradientColorStops"),v=zt("gradientColorStopPositions"),g=zt("inset"),b=zt("margin"),y=zt("opacity"),x=zt("padding"),w=zt("saturate"),j=zt("scale"),N=zt("sepia"),S=zt("skew"),E=zt("space"),_=zt("translate"),I=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",lt,t],k=()=>[lt,t],C=()=>["",qa,Ti],A=()=>["auto",Mc,lt],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],P=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",lt],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[Mc,lt];return{cacheSize:500,separator:":",theme:{colors:[Xd],spacing:[qa,Ti],blur:["none","",Ai,lt],brightness:W(),borderColor:[e],borderRadius:["none","","full",Ai,lt],borderSpacing:k(),borderWidth:C(),contrast:W(),grayscale:D(),hueRotate:W(),invert:D(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[k6,Ti],inset:T(),margin:T(),opacity:W(),padding:k(),saturate:W(),scale:W(),sepia:D(),skew:W(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",lt]}],container:["container"],columns:[{columns:[Ai]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:[...L(),lt]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Qd,lt]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",lt]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",Qd,lt]}],"grid-cols":[{"grid-cols":[Xd]}],"col-start-end":[{col:["auto",{span:["full",Qd,lt]},lt]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[Xd]}],"row-start-end":[{row:["auto",{span:[Qd,lt]},lt]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",lt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",lt]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}
vendor: 8,339 bytes, line 586
586],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",lt,t]}],"min-w":[{"min-w":[lt,t,"min","max","fit"]}],"max-w":[{"max-w":[lt,t,"none","full","min","max","fit","prose",{screen:[Ai]},Ai]}],h:[{h:[lt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[lt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[lt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[lt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ai,Ti]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Nx]}],"font-family":[{font:[Xd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",lt]}],"line-clamp":[{"line-clamp":["none",Mc,Nx]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qa,lt]}],"list-image":[{"list-image":["none",lt]}],"list-style-type":[{list:["none","disc","decimal",lt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qa,Ti]}],"underline-offset":[{"underline-offset":["auto",qa,lt]}],"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:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",lt]}],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",lt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),E6]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",C6]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},T6]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[y]}],"border-style":[{border:[...O(),"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":[y]}],"divide-style":[{divide:O()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[qa,lt]}],"outline-w":[{outline:[qa,Ti]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[qa,Ti]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ai,A6]}],"shadow-color":[{shadow:[Xd]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...P(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":P()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ai,lt]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[m]}],saturate:[{saturate:[w]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",lt]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",lt]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",lt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Qd,lt]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",lt]}],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",lt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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"]}
586],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",lt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qa,Ti,Nx]}],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"]}}},D6=x6(O6);function me(...e){return D6(rE(e))}function Ro(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase()}function W0(e){return e.toUpperCase().replace(/Î/g,"Î").replace(/Î/g,"Î").replace(/Î/g,"Î").replace(/Î/g,"Î").replace(/Î/g,"Î").replace(/Î/g,"Î¥").replace(/Î/g,"Ω").replace(/(\d+)Î/g,"$1ο")}function V0(e,t){const r=e||t;if(!r)return!1;const n=new Date(r);return Math.floor((new Date().getTime()-n.getTime())/(1e3*60*60*24))<=14}const L6=k5,_E=h.forwardRef(({className:e,...t},r)=>s.jsx(QC,{ref:r,className:me("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}));_E.displayName=QC.displayName;const F6=Sd("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"}}),kE=h.forwardRef(({className:e,variant:t,...r},n)=>s.jsx(XC,{ref:n,className:me(F6({variant:t}),e),...r}));kE.displayName=XC.displayName;const $6=h.forwardRef(({className:e,...t},r)=>s.jsx(eE,{ref:r,className:me("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}));$6.displayName=eE.displayName;const SE=h.forwardRef(({className:e,...t},r)=>s.jsx(tE,{ref:r,className:me("absolute right-2 top-2 rounded-md p-1 text-foreground
586/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(qr,{className:"h-4 w-4"})}));SE.displayName=tE.displayName;const CE=h.forwardRef(({className:e,...t},r)=>s.jsx(JC,{ref:r,className:me("text-sm font-semibold",e),...t}));CE.displayName=JC.displayName;const EE=h.forwardRef(({className:e,...t},r)=>s.jsx(ZC,{ref:r,className:me("text-sm opacity-90",e),...t}));EE.displayName=ZC.displayName;function U6(){const{toasts:e}=at();return s.jsxs(L6,{children:[e.map(function({id:t,title:r,description:n,action:a,...i}){return s.jsxs(kE,{...i,children:[s.jsxs("div",{className:"grid gap-1",children:[r&&s.jsx(CE,{children:r}),n&&s.jsx(EE,{children:n})]}),a,s.jsx(SE,{})]},t)}),s.jsx(_E,{})]})}var S_=["light","dark"],B6="(prefers-color-scheme: dark)",z6=h.createContext(void 0),W6={setTheme:e=>{},themes:[]},V6=()=>{var e;return(e=h.useContext(z6))!=null?e:W6};h.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:a,defaultTheme:i,value:o,attrs:l,nonce:c})=>{let d=i==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,m=a?S_.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(v,g=!1,b=!0)=>{let y=o?o[v]:v,x=g?v+"|| ''":`'${y}'`,w="";return a&&b&&!g&&S_.includes(v)&&(w+=`d.style.colorScheme = '${v}';`),r==="class"?g||y?w+=`c.add(${x})`:w+="null":y&&(w+=`d[s](n,${x})`),w},p=e?`!function(){${u}${f(e)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${B6}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${d?"":"else{"+f(i,!1,!1)+"}"}${m}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${m}}catch(t){}}();`;return h.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:p}})});var H6=e=>{switch(e){case"success":return Y6;case"info":return Q6;case"warning":return K6;case"error":return X6;default:return null}},q6=Array(12).fill(0),G6=({visible:e,className:t})=>ie.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ie.createElement("div",{className:"sonner-spinner"},q6.map((r,n)=>ie.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),Y6=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ie.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"})),K6=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ie.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"})),Q6=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ie.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"})),X6=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ie.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"})),J6=ie.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"},ie.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ie.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Z6=()=>{let[e,t]=ie.useState(document.hidden);return ie.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},xy=1,eL=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 586
586{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,a=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:xy++,i=this.toasts.find(l=>l.id===a),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...e,id:a,title:r}),{...l,...e,id:a,dismissible:o,title:r}):l):this.addToast({title:r,...n,dismissible:o,id:a}),a},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
586this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),a=r!==void 0,i,o=n.then(async c=>{if(i=["resolve",c],ie.isValidElement(c))a=!1,this.create({id:r,type:"default",message:c});else if(sL(c)&&!c.ok){a=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:r,type:"error",message:d,description:u})}else if(t.success!==void 0){a=!1;let d=typeof t.success=="function"?await t.success(c):t.success,u=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"success",message:d,description:u})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){a=!1;let d=typeof t.error=="function"?await t.error(c):t.error,u=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"error",message:d,description:u})}}).finally(()=>{var c;a&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,d)=>o.then(()=>i[0]==="reject"?d(i[1]):c(i[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||xy++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Cr=new eL,tL=(e,t)=>{let r=(t==null?void 0:t.id)||xy++;return Cr.addToast({title:e,...t,id:r}),r},sL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",rL=tL,nL=()=>Cr.toasts,aL=()=>Cr.getActiveToasts(),Dt=Object.assign(rL,{success:Cr.success,info:Cr.info,warning:Cr.warning,error:Cr.error,custom:Cr.custom,message:Cr.message,promise:Cr.promise,dismiss:Cr.dismiss,loading:Cr.loading},{getHistory:nL,getToasts:aL});function iL(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}iL(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
586left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
586:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
586--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 587`);function Ah(e){return e.label!==void 0}var oL=3,lL="32px",cL="16px",C_=4e3,dL=356,uL=14,mL=20,hL=200;function Fn(...e){return e.filter(Boolean).join(" ")}function fL(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var pL=e=>{var t,r,n,a,i,o,l,c,d,u,m;let{invert:f,toast:p,unstyled:v,interacting:g,setHeights:b,visibleToasts:y,heights:x,index:w,toasts:j,expanded:N,removeToast:S,defaultRichColors:E,closeButton:_,style:I,cancelButtonStyle:R,actionButtonStyle:T,className:k="",descriptionClassName:C="",duration:A,position:L,gap:O,loadingIcon:P,expandByDefault:M,classNames:D,icons:$,closeButtonAriaLabel:W="Close toast",pauseWhenPageIsHidden:X}=e,[q,H]=ie.useState(null),[se,te]=ie.useState(null),[B,le]=ie.useState(!1),[J,K]=ie.useState(!1),[Z,re]=ie.useState(!1),[de,Pe]=ie.useState(!1),[Ee,tt]=ie.useState(!1),[ze,et]=ie.useState(0),[st,z]=ie.useState(0),Y=ie.useRef(p.duration||A||C_),ne=ie.useRef(null),fe=ie.useRef(null),ee=w===0,ae=w+1<=y,ge=p.type,Ue=p.dismissible!==!1,Ze=p.className||"",bt=p.descriptionClassName||"",Ft=ie.useMemo(()=>x.findIndex(Ge=>Ge.toastId===p.id)||0,[x,p.id]),Nt=ie.useMemo(()=>{var Ge;return(Ge=p.closeButton)!=null?Ge:_},[p.closeButton,_]),Hs=ie.useMemo(()=>p.duration||A||C_,[p.duration,A]),Jt=ie.useRef(0),_s=ie.useRef(0),Ts=ie.useRef(0),xs=ie.useRef(null),[In,mn]=L.split("-"),Wa=ie.useMemo(()=>x.reduce((Ge,He,Ve)=>Ve>=Ft?Ge:Ge+He.height,0),[x,Ft]),Rn=Z6(),Mn=p.invert||f,ua=ge==="loading";_s.current=ie.useMemo(()=>Ft*O+Wa,[Ft,Wa]),ie.useEffect(()=>{Y.current=Hs},[Hs]),ie.useEffect(()=>{le(!0)},[]),ie.useEffect(()=>{let Ge=fe.current;if(Ge){let He=Ge.getBoundingClientRect().height;return z(He),b(Ve=>[{toastId:p.id,height:He,position:p.position},...Ve]),()=>
587b(Ve=>Ve.filter(qs=>qs.toastId!==p.id))}},[b,p.id]),ie.useLayoutEffect(()=>{if(!B)return;let Ge=fe.current,He=Ge.style.height;Ge.style.height="auto";let Ve=Ge.getBoundingClientRect().height;Ge.style.height=He,z(Ve),b(qs=>qs.find(Gs=>Gs.toastId===p.id)?qs.map(Gs=>Gs.toastId===p.id?{...Gs,height:Ve}:Gs):[{toastId:p.id,height:Ve,position:p.position},...qs])},[B,p.title,p.description,b,p.id]);let os=ie.useCallback(()=>{K(!0),et(_s.current),b(Ge=>Ge.filter(He=>He.toastId!==p.id)),setTimeout(()=>{S(p)},hL)},[p,S,b,_s]);ie.useEffect(()=>{if(p.promise&&ge==="loading"||p.duration===1/0||p.type==="loading")return;let Ge;return N||g||X&&Rn?(()=>{if(Ts.current<Jt.current){let He=new Date().getTime()-Jt.current;Y.current=Y.current-He}Ts.current=new Date().getTime()})():Y.current!==1/0&&(Jt.current=new Date().getTime(),Ge=setTimeout(()=>{var He;(He=p.onAutoClose)==null||He.call(p,p),os()},Y.current)),()=>clearTimeout(Ge)},[N,g,p,ge,X,Rn,os]),ie.useEffect(()=>{p.delete&&os()},[os,p.delete]);function Yr(){var Ge,He,Ve;return $!=null&&$.loading?ie.createElement("div",{className:Fn(D==null?void 0:D.loader,(Ge=p==null?void 0:p.classNames)==null?void 0:Ge.loader,"sonner-loader"),"data-visible":ge==="loading"},$.loading):P?ie.createElement("div",{className:Fn(D==null?void 0:D.loader,(He=p==null?void 0:p.classNames)==null?void 0:He.loader,"sonner-loader"),"data-visible":ge==="loading"},P):ie.createElement(G6,{className:Fn(D==null?void 0:D.loader,(Ve=p==null?void 0:p.classNames)==null?void 0:Ve.loader),visible:ge==="loading"})}return ie.createElement("li",{tabIndex:0,ref:fe,className:Fn(k,Ze,D==null?void 0:D.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[ge],(r=p==null?void 0:p.classNames)==null?void 0:r[ge]),"data-sonner-toast":"","data-rich-colors":(n=p.richColors)!=null?n:E,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":B,"data-promise":!!p.promise,"data-swiped":Ee,"data-removed":J,"data-visible":ae,"data-y-position":In,"data-x-position":mn,"data-index":w,"data-front":ee,"data-swiping":Z,"data-dismissible":Ue,"data-type":ge,"data-invert":Mn,"data-swipe-out":de,"data-swipe-direction":se,"data-expanded":!!(N||M&&B),style:{"--index":w,"--toasts-before":w,"--z-index":j.length-w,"--offset":`${J?ze:_s.current}px`,"--initial-height":M?"auto":`${st}px`,...I,...p.style},onDragEnd:()=>{re(!1),H(null),xs.current=null},onPointerDown:Ge=>{ua||!Ue||(ne.current=new Date,et(_s.current),Ge.target.setPointerCapture(Ge.pointerId),Ge.target.tagName!=="BUTTON"&&(re(!0),xs.current={x:Ge.clientX,y:Ge.clientY}))},onPointerUp:()=>{var Ge,He,Ve,qs;if(de||!Ue)return;xs.current=null;let Gs=Number(((Ge=fe.current)==null?void 0:Ge.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),V=Number(((He=fe.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ue=new Date().getTime()-((Ve=ne.current)==null?void 0:Ve.getTime()),ve=q==="x"?Gs:V,Ke=Math.abs(ve)/ue;if(Math.abs(ve)>=mL||Ke>.11){et(_s.current),(qs=p.onDismiss)==null||qs.call(p,p),te(q==="x"?Gs>0?"right":"left":V>0?"down":"up"),os(),Pe(!0),tt(!1);return}re(!1),H(null)},onPointerMove:Ge=>{var He,Ve,qs,Gs;if(!xs.current||!Ue||((He=window.getSelection())==null?void 0:He.toString().length)>0)return;let V=Ge.clientY-xs.current.y,ue=Ge.clientX-xs.current.x,ve=(Ve=e.swipeDirections)!=null?Ve:fL(L);!q&&(Math.abs(ue)>1||Math.abs(V)>1)&&H(Math.abs(ue)>Math.abs(V)?"x":"y");let Ke={x:0,y:0};q==="y"?(ve.includes("top")||ve.includes("bottom"))&&(ve.includes("top")&&V<0||ve.includes("bottom")&&V>0)&&(Ke.y=V):q==="x"&&(ve.includes("left")||ve.includes("right"))&&(ve.includes("left")&&ue<0||ve.includes("right")&&ue>0)&&(Ke.x=ue),(Math.abs(Ke.x)>0||Math.abs(Ke.y)>0)&&tt(!0),(qs=fe.current)==null||qs.style.setProperty("--swipe-amount-x",`${Ke.x}px`),(Gs=fe.current)==null||Gs.style.setProperty("--swipe-amount-y",`${Ke.y}px`)}},Nt&&!p.jsx?ie.createElement("button",{"aria-label":W,"data-disabled":ua,"data-close-button":!0,onClick:ua||!Ue?()=>{}:()=>{var Ge;os(),(Ge=p.onDismiss)==null||Ge.call(p,p)},className:Fn(D==null?void 0:D.closeButton,(a=p==null?void 0:p.classNames)==null?void 0:a.closeButton)},(i=$==null?void 0:$.close)!=null?i:J6):null,p.jsx||h.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:ie.createElement(ie.Fragment,null,ge||p.icon||p.promise?ie.createElement("div",{"data-icon":"",className:Fn(D==null?void 0:D.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)}
vendor: 4,238 bytes, line 587
587,p.promise||p.type==="loading"&&!p.icon?p.icon||Yr():null,p.type!=="loading"?p.icon||($==null?void 0:$[ge])||H6(ge):null):null,ie.createElement("div",{"data-content":"",className:Fn(D==null?void 0:D.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},ie.createElement("div",{"data-title":"",className:Fn(D==null?void 0:D.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?ie.createElement("div",{"data-description":"",className:Fn(C,bt,D==null?void 0:D.description,(d=p==null?void 0:p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),h.isValidElement(p.cancel)?p.cancel:p.cancel&&Ah(p.cancel)?ie.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||R,onClick:Ge=>{var He,Ve;Ah(p.cancel)&&Ue&&((Ve=(He=p.cancel).onClick)==null||Ve.call(He,Ge),os())},className:Fn(D==null?void 0:D.cancelButton,(u=p==null?void 0:p.classNames)==null?void 0:u.cancelButton)},p.cancel.label):null,h.isValidElement(p.action)?p.action:p.action&&Ah(p.action)?ie.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||T,onClick:Ge=>{var He,Ve;Ah(p.action)&&((Ve=(He=p.action).onClick)==null||Ve.call(He,Ge),!Ge.defaultPrevented&&os())},className:Fn(D==null?void 0:D.actionButton,(m=p==null?void 0:p.classNames)==null?void 0:m.actionButton)},p.action.label):null))};function E_(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function gL(e,t){let r={};return[e,t].forEach((n,a)=>{let i=a===1,o=i?"--mobile-offset":"--offset",l=i?cL:lL;function c(d){["top","right","bottom","left"].forEach(u=>{r[`${o}-${u}`]=typeof d=="number"?`${d}px`:d})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(d=>{n[d]===void 0?r[`${o}-${d}`]=l:r[`${o}-${d}`]=typeof n[d]=="number"?`${n[d]}px`:n[d]}):c(l)}),r}var xL=h.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:o,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:m,duration:f,style:p,visibleToasts:v=oL,toastOptions:g,dir:b=E_(),gap:y=uL,loadingIcon:x,icons:w,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:N}=e,[S,E]=ie.useState([]),_=ie.useMemo(()=>Array.from(new Set([n].concat(S.filter(X=>X.position).map(X=>X.position)))),[S,n]),[I,R]=ie.useState([]),[T,k]=ie.useState(!1),[C,A]=ie.useState(!1),[L,O]=ie.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),P=ie.useRef(null),M=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=ie.useRef(null),$=ie.useRef(!1),W=ie.useCallback(X=>{E(q=>{var H;return(H=q.find(se=>se.id===X.id))!=null&&H.delete||Cr.dismiss(X.id),q.filter(({id:se})=>se!==X.id)})},[]);return ie.useEffect(()=>Cr.subscribe(X=>{if(X.dismiss){E(q=>q.map(H=>H.id===X.id?{...H,delete:!0}:H));return}setTimeout(()=>{EC.flushSync(()=>{E(q=>{let H=q.findIndex(se=>se.id===X.id);return H!==-1?[...q.slice(0,H),{...q[H],...X},...q.slice(H+1)]:[X,...q]})})})}),[]),ie.useEffect(()=>{if(u!=="system"){O(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),typeof window>"u")return;let X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:q})=>{O(q?"dark":"light")})}catch{X.addListener(({matches:H})=>{try{O(H?"dark":"light")}catch(se){console.error(se)}})}},[u]),ie.useEffect(()=>{S.length<=1&&k(!1)},[S]),ie.useEffect(()=>{let X=q=>{var H,se;a.every(te=>q[te]||q.code===te)&&(k(!0),(H=P.current)==null||H.focus()),q.code==="Escape"&&(document.activeElement===P.current||(se=P.current)!=null&&se.contains(document.activeElement))&&k(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[a]),ie.useEffect(()=>{if(P.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,$.current=!1)}},[P.current]),ie.createElement("section",{ref:t,"aria-label":`${j} ${M}
587`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((X,q)=>{var H;let[se,te]=X.split("-");return S.length?ie.createElement("ol",{key:X,dir:b==="auto"?E_():b,tabIndex:-1,ref:P,className:l,"data-sonner-toaster":!0,"data-theme":L,"data-y-position":se,"data-lifted":T&&S.length>1&&!i,"data-x-position":te,style:{"--front-toast-height":`${((H=I[0])==null?void 0:H.height)||0}px`,"--width":`${dL}px`,"--gap":`${y}px`,...p,...gL(c,d)},onBlur:B=>{$.current&&!B.currentTarget.contains(B.relatedTarget)&&($.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||$.current||($.current=!0,D.current=B.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{C||k(!1)},onDragEnd:()=>k(!1),onPointerDown:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||A(!0)},onPointerUp:()=>A(!1)},S.filter(B=>!B.position&&q===0||B.position===X).map((B,le)=>{var J,K;return ie.createElement(pL,{key:B.id,icons:w,index:le,toast:B,defaultRichColors:m,duration:(J=g==null?void 0:g.duration)!=null?J:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:v,closeButton:(K=g==null?void 0:g.closeButton)!=null?K:o,interacting:C,position:X,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:W,toasts:S.filter(Z=>Z.position==B.position),heights:I.filter(Z=>Z.position==B.position),setHeights:R,expandByDefault:i,gap:y,loadingIcon:x,expanded:T,pauseWhenPageIsHidden:N,swipeDirections:e.swipeDirections})})):null}))});const vL=({...e})=>{const{theme:t="system"}=V6();return s.jsx(xL,{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 yL=zb[" useId ".trim().toString()]||(()=>{}),bL=0;function Fr(e){const[t,r]=h.useState(yL());return is(()=>{r(n=>n??String(bL++))},[e]),t?`radix-${t}`:""}const wL=["top","right","bottom","left"],_o=Math.min,sn=Math.max,Qf=Math.round,Ih=Math.floor,Ma=e=>({x:e,y:e}),jL={left:"right",right:"left",bottom:"top",top:"bottom"},NL={start:"end",end:"start"};function vy(e,t,r){return sn(e,_o(t,r))}function yi(e,t){return typeof e=="function"?e(t):e}function bi(e){return e.split("-")[0]}function Ed(e){return e.split("-")[1]}function H0(e){return e==="x"?"y":"x"}function q0(e){return e==="y"?"height":"width"}const _L=new Set(["top","bottom"]);function Pa(e){return _L.has(bi(e))?"y":"x"}function G0(e){return H0(Pa(e))}function kL(e,t,r){r===void 0&&(r=!1);const n=Ed(e),a=G0(e),i=q0(a);let o=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Xf(o)),[o,Xf(o)]}function SL(e){const t=Xf(e);return[yy(e),t,yy(t)]}function yy(e){return e.replace(/start|end/g,t=>NL[t])}const P_=["left","right"],T_=["right","left"],CL=["top","bottom"],EL=["bottom","top"];function PL(e,t,r){switch(e){case"top":case"bottom":return r?t?T_:P_:t?P_:T_;case"left":case"right":return t?CL:EL;default:return[]}}function TL(e,t,r,n){const a=Ed(e);let i=PL(bi(e),r==="start",n);return a&&(i=i.map(o=>o+"-"+a),t&&(i=i.concat(i.map(yy)))),i}function Xf(e){return e.replace(/left|right|bottom|top/g,t=>jL[t])}function AL(e){return{top:0,right:0,bottom:0,left:0,...e}}function PE(e){return typeof e!="number"?AL(e):{top:e,right:e,bottom:e,left:e}}function Jf(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function A_(e,t,r){let{reference:n,floating:a}=e;const i=Pa(t),o=G0(t),l=q0(o),c=bi(t),d=i==="y",u=n.x+n.width/2-a.width/2,m=n.y+n.height/2-a.height/2,f=n[l]/2-a[l]/2;let p;switch(c){case"top":p={x:u,y:n.y-a.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:m};break;case"left":p={x:n.x-a.width,y:m};break;default:p={x:n.x,y:n.y}}switch(Ed(t)){case"start":p[o]-=f*(r&&d?-1:1);break;case"end":p[o]+=f*(r&&d?-1:1);break}return p}const IL=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:o}
vendor: 17,325 bytes, line 587
587=r,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:m}=A_(d,n,c),f=n,p={},v=0;for(let g=0;g<l.length;g++){const{name:b,fn:y}=l[g],{x,y:w,data:j,reset:N}=await y({x:u,y:m,initialPlacement:n,placement:f,strategy:a,middlewareData:p,rects:d,platform:o,elements:{reference:e,floating:t}});u=x??u,m=w??m,p={...p,[b]:{...p[b],...j}},N&&v<=50&&(v++,typeof N=="object"&&(N.placement&&(f=N.placement),N.rects&&(d=N.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:u,y:m}=A_(d,f,c)),g=-1)}return{x:u,y:m,placement:f,strategy:a,middlewareData:p}};async function lm(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:m="floating",altBoundary:f=!1,padding:p=0}=yi(t,e),v=PE(p),b=l[f?m==="floating"?"reference":"floating":m],y=Jf(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),x=m==="floating"?{x:n,y:a,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),j=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},N=Jf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:w,strategy:c}):x);return{top:(y.top-N.top+v.top)/j.y,bottom:(N.bottom-y.bottom+v.bottom)/j.y,left:(y.left-N.left+v.left)/j.x,right:(N.right-y.right+v.right)/j.x}}const RL=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:d,padding:u=0}=yi(e,t)||{};if(d==null)return{};const m=PE(u),f={x:r,y:n},p=G0(a),v=q0(p),g=await o.getDimensions(d),b=p==="y",y=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",j=i.reference[v]+i.reference[p]-f[p]-i.floating[v],N=f[p]-i.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let E=S?S[w]:0;(!E||!await(o.isElement==null?void 0:o.isElement(S)))&&(E=l.floating[w]||i.floating[v]);const _=j/2-N/2,I=E/2-g[v]/2-1,R=_o(m[y],I),T=_o(m[x],I),k=R,C=E-g[v]-T,A=E/2-g[v]/2+_,L=vy(k,A,C),O=!c.arrow&&Ed(a)!=null&&A!==L&&i.reference[v]/2-(A<k?R:T)-g[v]/2<0,P=O?A<k?A-k:A-C:0;return{[p]:f[p]+P,data:{[p]:L,centerOffset:A-L-P,...O&&{alignmentOffset:P}},reset:O}}}),ML=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:u=!0,crossAxis:m=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...b}=yi(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const y=bi(a),x=Pa(l),w=bi(l)===l,j=await(c.isRTL==null?void 0:c.isRTL(d.floating)),N=f||(w||!g?[Xf(l)]:SL(l)),S=v!=="none";!f&&S&&N.push(...TL(l,g,v,j));const E=[l,...N],_=await lm(t,b),I=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(_[y]),m){const A=kL(a,o,j);I.push(_[A[0]],_[A[1]])}if(R=[...R,{placement:a,overflows:I}],!I.every(A=>A<=0)){var T,k;const A=(((T=i.flip)==null?void 0:T.index)||0)+1,L=E[A];if(L&&(!(m==="alignment"?x!==Pa(L):!1)||R.every(M=>M.overflows[0]>0&&Pa(M.placement)===x)))return{data:{index:A,overflows:R},reset:{placement:L}};let O=(k=R.filter(P=>P.overflows[0]<=0).sort((P,M)=>P.overflows[1]-M.overflows[1])[0])==null?void 0:k.placement;if(!O)switch(p){case"bestFit":{var C;const P=(C=R.filter(M=>{if(S){const D=Pa(M.placement);return D===x||D==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(D=>D>0).reduce((D,$)=>D+$,0)]).sort((M,D)=>M[1]-D[1])[0])==null?void 0:C[0];P&&(O=P);break}case"initialPlacement":O=l;break}if(a!==O)return{reset:{placement:O}}}return{}}}};function I_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function R_(e){return wL.some(t=>e[t]>=0)}const OL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=yi(e,t);switch(n){case"referenceHidden":{const i=await lm(t,{...a,elementContext:"reference"}),o=I_(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:R_(o)}}}case"escaped":{const i=await lm(t,{...a,altBoundary:!0}),o=I_(i,r.floating);return{data:{escapedOffsets:o,escaped:R_(o)}}}default:return{}}}}},TE=new Set(["left","top"]);async function DL(e,t){const{placement:r,platform:n,elements:a}=e,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),o=bi(r),l=Ed(r),c=Pa(r)==="y",d=TE.has(o)?-1:1,u=i&&c?-1:1,m=yi(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof v=="number"&&(p=l==="end"?v*-1:v),c?{x:p*u,y:f*d}:{x:f*d,y:p*u}}const LL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:i,placement:o,middlewareData:l}=t,c=await DL(t,e);return o===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:o}}}}},FL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...c}=yi(e,t),d={x:r,y:n},u=await lm(t,c),m=Pa(bi(a)),f=H0(m);let p=d[f],v=d[m];if(i){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=p+u[b],w=p-u[y];p=vy(x,p,w)}if(o){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",x=v+u[b],w=v-u[y];v=vy(x,v,w)}const g=l.fn({...t,[f]:p,[m]:v});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[f]:i,[m]:o}}}}}},$L=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=yi(e,t),u={x:r,y:n},m=Pa(a),f=H0(m);let p=u[f],v=u[m];const g=yi(l,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=f==="y"?"height":"width",j=i.reference[f]-i.floating[w]+b.mainAxis,N=i.reference[f]+i.reference[w]-b.mainAxis;p<j?p=j:p>N&&(p=N)}if(d){var y,x;const w=f==="y"?"width":"height",j=TE.has(bi(a)),N=i.reference[m]-i.floating[w]+(j&&((y=o.offset)==null?void 0:y[m])||0)+(j?0:b.crossAxis),S=i.reference[m]+i.reference[w]+(j?0:((x=o.offset)==null?void 0:x[m])||0)-(j?b.crossAxis:0);v<N?v=N:v>S&&(v=S)}return{[f]:p,[m]:v}}}},UL=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...d}=yi(e,t),u=await lm(t,d),m=bi(a),f=Ed(a),p=Pa(a)==="y",{width:v,height:g}=i.floating;let b,y;m==="top"||m==="bottom"?(b=m,y=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(y=m,b=f==="end"?"top":"bottom");const x=g-u.top-u.bottom,w=v-u.left-u.right,j=_o(g-u[b],x),N=_o(v-u[y],w),S=!t.middlewareData.shift;let E=j,_=N;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(_=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=x),S&&!f){const R=sn(u.left,0),T=sn(u.right,0),k=sn(u.top,0),C=sn(u.bottom,0);p?_=v-2*(R!==0||T!==0?R+T:sn(u.left,u.right)):E=g-2*(k!==0||C!==0?k+C:sn(u.top,u.bottom))}await c({...t,availableWidth:_,availableHeight:E});const I=await o.getDimensions(l.floating);return v!==I.width||g!==I.height?{reset:{rects:!0}}:{}}}};function Jp(){return typeof window<"u"}function Pd(e){return AE(e)?(e.nodeName||"").toLowerCase():"#document"}function on(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ba(e){var t;return(t=(AE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AE(e){return Jp()?e instanceof Node||e instanceof on(e).Node:!1}function na(e){return Jp()?e instanceof Element||e instanceof on(e).Element:!1}function $a(e){return Jp()?e instanceof HTMLElement||e instanceof on(e).HTMLElement:!1}function M_(e){return!Jp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof on(e).ShadowRoot}const BL=new Set(["inline","contents"]);function zm(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=aa(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!BL.has(a)}const zL=new Set(["table","td","th"]);function WL(e){return zL.has(Pd(e))}const VL=[":popover-open",":modal"];function Zp(e){return VL.some(t=>{try{return e.matches(t)}catch{return!1}})}const HL=["transform","translate","scale","rotate","perspective"],qL=["transform","translate","scale","rotate","perspective","filter"],GL=["paint","layout","strict","content"];function Y0(e){const t=K0(),r=na(e)?aa(e):e;return HL.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||qL.some(n=>(r.willChange||"").includes(n))||GL.some(n=>(r.contain||"").includes(n))}function YL(e){let t=ko(e);for(;$a(t)&&!od(t);){if(Y0(t))return t;if(Zp(t))return null;t=ko(t)}return null}function K0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const KL=new Set(["html","body","#document"]);function od(e){return KL.has(Pd(e))}function aa(e){return on(e).getComputedStyle(e)}function eg(e){return na(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ko(e){if(Pd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||M_(e)&&e.host||Ba(e);return M_(t)?t.host:t}function IE(e){const t=ko(e);return od(t)?e.ownerDocument?e.ownerDocument.body:e.body:$a(t)&&zm(t)?t:IE(t)}function cm(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=IE(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),o=on(a);if(i){const l=by(o);return t.concat(o,o.visualViewport||[],zm(a)?a:[],l&&r?cm(l):[])}return t.concat(a,cm(a,[],r))}function by(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RE(e){const t=aa(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=$a(e),i=a?e.offsetWidth:r,o=a?e.offsetHeight:n,l=Qf(r)!==i||Qf(n)!==o;return l&&(r=i,n=o),{width:r,height:n,$:l}}function Q0(e){return na(e)?e:e.contextElement}function Oc(e){const t=Q0(e);if(!$a(t))return Ma(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:i}=RE(t);let o=(i?Qf(r.width):r.width)/n,l=(i?Qf(r.height):r.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const QL=Ma(0);function ME(e){const t=on(e);return!K0()||!t.visualViewport?QL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function XL(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==on(e)?!1:t}function Cl(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),i=Q0(e);let o=Ma(1);t&&(n?na(n)&&(o=Oc(n)):o=Oc(e));const l=XL(i,r,n)?ME(i):Ma(0);let c=(a.left+l.x)/o.x,d=(a.top+l.y)/o.y,u=a.width/o.x,m=a.height/o.y;if(i){const f=on(i),p=n&&na(n)?on(n):n;let v=f,g=by(v);for(;g&&n&&p!==v;){const b=Oc(g),y=g.getBoundingClientRect(),x=aa(g),w=y.left+(g.clientLeft+parseFloat(x.paddingLeft))*b.x,j=y.top+(g.clientTop+parseFloat(x.paddingTop))*b.y;c*=b.x,d*=b.y,u*=b.x,m*=b.y,c+=w,d+=j,v=on(g),g=by(v)}}return Jf({width:u,height:m,x:c,y:d})}function X0(e,t){const r=eg(e).scrollLeft;return t?t.left+r:Cl(Ba(e)).left+r}function OE(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-(r?0:X0(e,n)),i=n.top+t.scrollTop;return{x:a,y:i}}function JL(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const i=a==="fixed",o=Ba(n),l=t?Zp(t.floating):!1;if(n===o||l&&i)return r;let c={scrollLeft:0,scrollTop:0},d=Ma(1);const u=Ma(0),m=$a(n);if((m||!m&&!i)&&((Pd(n)!=="body"||zm(o))&&(c=eg(n)),$a(n))){const p=Cl(n);d=Oc(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}const f=o&&!m&&!i?OE(o,c,!0):Ma(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+u.x+f.x,y:r.y*d.y-c.scrollTop*d.y+u.y+f.y}}function ZL(e){return Array.from(e.getClientRects())}function eF(e){const t=Ba(e),r=eg(e),n=e.ownerDocument.body,a=sn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=sn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+X0(e);const l=-r.scrollTop;return aa(n).direction==="rtl"&&(o+=sn(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:o,y:l}}function tF(e,t){const r=on(e),n=Ba(e),a=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,l=0,c=0;if(a){i=a.width,o=a.height;const d=K0();(!d||d&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:i,height:o,x:l,y:c}}const sF=new Set(["absolute","fixed"]);function rF(e,t){const r=Cl(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=$a(e)?Oc(e):Ma(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=a*i.x,d=n*i.y;return{width:o,height:l,x:c,y:d}}function O_(e,t,r){let n;if(t==="viewport")n=tF(e,r);else if(t==="document")n=eF(Ba(e));else if(na(t))n=rF(t,r);else{const a=ME(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Jf(n)}function DE(e,t){const r=ko(e);return r===t||!na(r)||od(r)?!1:aa(r).position==="fixed"||DE(r,t)}function nF(e,t){const r=t.get(e);if(r)return r;let n=cm(e,[],!1).filter(l=>na(l)&&Pd(l)!=="body"),a=null;const i=aa(e).position==="fixed";let o=i?ko(e):e;for(;na(o)&&!od(o);){const l=aa(o),c=Y0(o);!c&&l.position==="fixed"&&(a=null),(i?!c&&!a:!c&&l.position==="static"&&!!a&&sF.has(a.position)||zm(o)&&!c&&DE(e,o))?n=n.filter(u=>u!==o):a=l,o=ko(o)}return t.set(e,n),n}function aF(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const o=[...r==="clippingAncestors"?Zp(t)?[]:nF(t,this._c):[].concat(r),n],l=o[0],c=o.reduce((d,u)=>{const m=O_(t,u,a);return d.top=sn(m.top,d.top),d.right=_o(m.right,d.right),d.bottom=_o(m.bottom,d.bottom),d.left=sn(m.left,d.left),d},O_(t,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function iF(e){const{width:t,height:r}=RE(e);return{width:t,height:r}}function oF(e,t,r){const n=$a(t),a=Ba(t),i=r==="fixed",o=Cl(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=Ma(0);function d(){c.x=X0(a)}if(n||!n&&!i)if((Pd(t)!=="body"||zm(a))&&(l=eg(t)),n){const p=Cl(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else a&&d();i&&!n&&a&&d();const u=a&&!n&&!i?OE(a,l):Ma(0),m=o.left+l.scrollLeft-c.x-u.x,f=o.top+l.scrollTop-c.y-u.y;return{x:m,y:f,width:o.width,height:o.height}}function _x(e){return aa(e).position==="static"}function D_(e,t){if(!$a(e)||aa(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ba(e)===r&&(r=r.ownerDocument.body),r}function LE(e,t){const r=on(e);if(Zp(e))return r;if(!$a(e)){let a=ko(e);for(;a&&!od(a);){if(na(a)&&!_x(a))return a;a=ko(a)}return r}let n=D_(e,t);for(;n&&WL(n)&&_x(n);)n=D_(n,t);return n&&od(n)&&_x(n)&&!Y0(n)?r:n||YL(e)||r}const lF=async function(e){const t=this.getOffsetParent||LE,r=this.getDimensions,n=await r(e.floating);return{reference:oF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function cF(e){return aa(e).direction==="rtl"}const dF={convertOffsetParentRelativeRectToViewportRelativeRect:JL,getDocumentElement:Ba,getClippingRect:aF,getOffsetParent:LE,getElementRects:lF,getClientRects:ZL,getDimensions:iF,getScale:Oc,isElement:na,isRTL:cF};function FE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function uF(e,t){let r=null,n;const a=Ba(e);function i(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const d=e.getBoundingClientRect(),{left:u,top:m,width:f,height:p}=d;if(l||t(),!f||!p)return;const v=Ih(m),g=Ih(a.clientWidth-(u+f)),b=Ih(a.clientHeight-(m+p)),y=Ih(u),w={rootMargin:-v+"px "+-g+"px "+-b+"px "+-y+"px",threshold:sn(0,_o(1,c))||1};let j=!0;function N(S){const E=S[0].intersectionRatio;if(E!==c){if(!j)return o();E?o(!1,E):n=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!FE(d,e.getBoundingClientRect())&&o(),j=!1}try{r=new IntersectionObserver(N,{...w,root:a.ownerDocument})}catch{r=new IntersectionObserver(N,w)}r.observe(e)}return o(!0),i}function mF(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=Q0(e),u=a||i?[...d?cm(d):[],...cm(t)]:[];u.forEach(y=>{a&&y.addEventListener("scroll",r,{passive:!0}),i&&y.addEventListener("resize",r)});const m=d&&l?uF(d,r):null;let f=-1,p=null;o&&(p=new ResizeObserver(y=>{let[x]=y;x&&x.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),r()}),d&&!c&&p.observe(d),p.observe(t));let v,g=c?Cl(e):null;c&&b();function b(){const y=Cl(e);g&&!FE(g,y)&&r(),g=y,v=requestAnimationFrame(b)}return r(),()=>{var y;u.forEach(x=>{a&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),m==null||m(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const hF=LL,fF=FL,pF=ML,gF=UL,xF=OL,L_=RL,vF=$L,yF=(e,t,r)=>{const n=new Map,a={platform:dF,...r},i={...a.platform,_c:n};return IL(e,t,{...a,platform:i})};var bF=typeof document<"u",wF=function(){},uf=bF?h.useLayoutEffect:wF;function Zf(e,t){if(e===t)return!0;
vendor: 4,143 bytes, line 587
587if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Zf(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const i=a[n];if(!(i==="_owner"&&e.$$typeof)&&!Zf(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function $E(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function F_(e,t){const r=$E(e);return Math.round(t*r)/r}function kx(e){const t=h.useRef(e);return uf(()=>{t.current=e}),t}function jF(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,m]=h.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=h.useState(n);Zf(f,n)||p(n);const[v,g]=h.useState(null),[b,y]=h.useState(null),x=h.useCallback(M=>{M!==S.current&&(S.current=M,g(M))},[]),w=h.useCallback(M=>{M!==E.current&&(E.current=M,y(M))},[]),j=i||v,N=o||b,S=h.useRef(null),E=h.useRef(null),_=h.useRef(u),I=c!=null,R=kx(c),T=kx(a),k=kx(d),C=h.useCallback(()=>{if(!S.current||!E.current)return;const M={placement:t,strategy:r,middleware:f};T.current&&(M.platform=T.current),yF(S.current,E.current,M).then(D=>{const $={...D,isPositioned:k.current!==!1};A.current&&!Zf(_.current,$)&&(_.current=$,Ll.flushSync(()=>{m($)}))})},[f,t,r,T,k]);uf(()=>{d===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,m(M=>({...M,isPositioned:!1})))},[d]);const A=h.useRef(!1);uf(()=>(A.current=!0,()=>{A.current=!1}),[]),uf(()=>{if(j&&(S.current=j),N&&(E.current=N),j&&N){if(R.current)return R.current(j,N,C);C()}},[j,N,C,R,I]);const L=h.useMemo(()=>({reference:S,floating:E,setReference:x,setFloating:w}),[x,w]),O=h.useMemo(()=>({reference:j,floating:N}),[j,N]),P=h.useMemo(()=>{const M={position:r,left:0,top:0};if(!O.floating)return M;const D=F_(O.floating,u.x),$=F_(O.floating,u.y);return l?{...M,transform:"translate("+D+"px, "+$+"px)",...$E(O.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:D,top:$}},[r,l,O.floating,u.x,u.y]);return h.useMemo(()=>({...u,update:C,refs:L,elements:O,floatingStyles:P}),[u,C,L,O,P])}const NF=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?L_({element:n.current,padding:a}).fn(r):{}:n?L_({element:n,padding:a}).fn(r):{}}}},_F=(e,t)=>({...hF(e),options:[e,t]}),kF=(e,t)=>({...fF(e),options:[e,t]}),SF=(e,t)=>({...vF(e),options:[e,t]}),CF=(e,t)=>({...pF(e),options:[e,t]}),EF=(e,t)=>({...gF(e),options:[e,t]}),PF=(e,t)=>({...xF(e),options:[e,t]}),TF=(e,t)=>({...NF(e),options:[e,t]});var AF="Arrow",UE=h.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...i}=e;return s.jsx(Ce.svg,{...i,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});UE.displayName=AF;var IF=UE;function tg(e){const[t,r]=h.useState(void 0);return is(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,d=Array.isArray(c)?c[0]:c;o=d.inlineSize,l=d.blockSize}else o=e.offsetWidth,l=e.offsetHeight;r({width:o,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var J0="Popper",[BE,Mo]=gs(J0),[RF,zE]=BE(J0),WE=e=>{const{__scopePopper:t,children:r}=e,[n,a]=h.useState(null);return s.jsx(RF,{scope:t,anchor:n,onAnchorChange:a,children:r})};WE.displayName=J0;var VE="PopperAnchor",HE=h.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,i=zE(VE,r),o=h.useRef(null),l=Ye(t,o);return h.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:s.jsx(Ce.div,{...a,ref:l})});HE.displayName=VE;var Z0="PopperContent",[MF,OF]=BE(Z0),qE=h.forwardRef((e,t)=>
vendor: 4,203 bytes, line 587
587{var B,le,J,K,Z,re;const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:m="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:v,...g}=e,b=zE(Z0,r),[y,x]=h.useState(null),w=Ye(t,de=>x(de)),[j,N]=h.useState(null),S=tg(j),E=(S==null?void 0:S.width)??0,_=(S==null?void 0:S.height)??0,I=n+(i!=="center"?"-"+i:""),R=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},T=Array.isArray(d)?d:[d],k=T.length>0,C={padding:R,boundary:T.filter(LF),altBoundary:k},{refs:A,floatingStyles:L,placement:O,isPositioned:P,middlewareData:M}=jF({strategy:"fixed",placement:I,whileElementsMounted:(...de)=>mF(...de,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[_F({mainAxis:a+_,alignmentAxis:o}),c&&kF({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?SF():void 0,...C}),c&&CF({...C}),EF({...C,apply:({elements:de,rects:Pe,availableWidth:Ee,availableHeight:tt})=>{const{width:ze,height:et}=Pe.reference,st=de.floating.style;st.setProperty("--radix-popper-available-width",`${Ee}px`),st.setProperty("--radix-popper-available-height",`${tt}px`),st.setProperty("--radix-popper-anchor-width",`${ze}px`),st.setProperty("--radix-popper-anchor-height",`${et}px`)}}),j&&TF({element:j,padding:l}),FF({arrowWidth:E,arrowHeight:_}),f&&PF({strategy:"referenceHidden",...C})]}),[D,$]=KE(O),W=rs(v);is(()=>{P&&(W==null||W())},[P,W]);const X=(B=M.arrow)==null?void 0:B.x,q=(le=M.arrow)==null?void 0:le.y,H=((J=M.arrow)==null?void 0:J.centerOffset)!==0,[se,te]=h.useState();return is(()=>{y&&te(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:P?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(K=M.transformOrigin)==null?void 0:K.x,(Z=M.transformOrigin)==null?void 0:Z.y].join(" "),...((re=M.hide)==null?void 0:re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(MF,{scope:r,placedSide:D,onArrowChange:N,arrowX:X,arrowY:q,shouldHideArrow:H,children:s.jsx(Ce.div,{"data-side":D,"data-align":$,...g,ref:w,style:{...g.style,animation:P?void 0:"none"}})})})});qE.displayName=Z0;var GE="PopperArrow",DF={top:"bottom",right:"left",bottom:"top",left:"right"},YE=h.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,i=OF(GE,n),o=DF[i.placedSide];return s.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:s.jsx(IF,{...a,ref:r,style:{...a.style,display:"block"}})})});YE.displayName=GE;function LF(e){return e!==null}var FF=e=>({name:"transformOrigin",options:e,fn(t){var b,y,x;const{placement:r,rects:n,middlewareData:a}=t,o=((b=a.arrow)==null?void 0:b.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[d,u]=KE(r),m={start:"0%",center:"50%",end:"100%"}[u],f=(((y=a.arrow)==null?void 0:y.x)??0)+l/2,p=(((x=a.arrow)==null?void 0:x.y)??0)+c/2;let v="",g="";return d==="bottom"?(v=o?m:`${f}px`,g=`${-c}px`):d==="top"?(v=o?m:`${f}px`,g=`${n.floating.height+c}px`):d==="right"?(v=`${-c}px`,g=o?m:`${p}px`):d==="left"&&(v=`${n.floating.width+c}px`,g=o?m:`${p}px`),{data:{x:v,y:g}}}});function KE(e){const[t,r="center"]=e.split("-");return[t,r]}var sg=WE,Wm=HE,rg=qE,ng=YE,[ag,ete]=gs("Tooltip",[Mo]),ig=Mo(),QE="TooltipProvider",$F=700,wy="tooltip.open",[UF,ew]=ag(QE),XE=e=>{const{__scopeTooltip:t,delayDuration:r=$F,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:i}=e,o=h.useRef(!0),l=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),s.jsx(UF,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:h.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:h.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>
vendor: 5,050 bytes, line 587
587o.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:h.useCallback(d=>{l.current=d},[]),disableHoverableContent:a,children:i})};XE.displayName=QE;var dm="Tooltip",[BF,og]=ag(dm),JE=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a,onOpenChange:i,disableHoverableContent:o,delayDuration:l}=e,c=ew(dm,e.__scopeTooltip),d=ig(t),[u,m]=h.useState(null),f=Fr(),p=h.useRef(0),v=o??c.disableHoverableContent,g=l??c.delayDuration,b=h.useRef(!1),[y,x]=xr({prop:n,defaultProp:a??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(wy))):c.onClose(),i==null||i(E)},caller:dm}),w=h.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),j=h.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,x(!0)},[x]),N=h.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),S=h.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,x(!0),p.current=0},g)},[g,x]);return h.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),s.jsx(sg,{...d,children:s.jsx(BF,{scope:t,contentId:f,open:y,stateAttribute:w,trigger:u,onTriggerChange:m,onTriggerEnter:h.useCallback(()=>{c.isOpenDelayedRef.current?S():j()},[c.isOpenDelayedRef,S,j]),onTriggerLeave:h.useCallback(()=>{v?N():(window.clearTimeout(p.current),p.current=0)},[N,v]),onOpen:j,onClose:N,disableHoverableContent:v,children:r})})};JE.displayName=dm;var jy="TooltipTrigger",ZE=h.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=og(jy,r),i=ew(jy,r),o=ig(r),l=h.useRef(null),c=Ye(t,l,a.onTriggerChange),d=h.useRef(!1),u=h.useRef(!1),m=h.useCallback(()=>d.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),s.jsx(Wm,{asChild:!0,...o,children:s.jsx(Ce.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:c,onPointerMove:pe(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:pe(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:pe(e.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:pe(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:pe(e.onBlur,a.onClose),onClick:pe(e.onClick,a.onClose)})})});ZE.displayName=jy;var zF="TooltipPortal",[tte,WF]=ag(zF,{forceMount:void 0}),ld="TooltipContent",e4=h.forwardRef((e,t)=>{const r=WF(ld,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...i}=e,o=og(ld,e.__scopeTooltip);return s.jsx(Ns,{present:n||o.open,children:o.disableHoverableContent?s.jsx(t4,{side:a,...i,ref:t}):s.jsx(VF,{side:a,...i,ref:t})})}),VF=h.forwardRef((e,t)=>{const r=og(ld,e.__scopeTooltip),n=ew(ld,e.__scopeTooltip),a=h.useRef(null),i=Ye(t,a),[o,l]=h.useState(null),{trigger:c,onClose:d}=r,u=a.current,{onPointerInTransitChange:m}=n,f=h.useCallback(()=>{l(null),m(!1)},[m]),p=h.useCallback((v,g)=>{const b=v.currentTarget,y={x:v.clientX,y:v.clientY},x=KF(y,b.getBoundingClientRect()),w=QF(y,x),j=XF(g.getBoundingClientRect()),N=ZF([...w,...j]);l(N),m(!0)},[m]);return h.useEffect(()=>()=>f(),[f]),h.useEffect(()=>{if(c&&u){const v=b=>p(b,u),g=b=>p(b,c);return c.addEventListener("pointerleave",v),u.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",g)}}},[c,u,p,f]),h.useEffect(()=>{if(o){const v=g=>{const b=g.target,y={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(b))||(u==null?void 0:u.contains(b)),w=!JF(y,o);x?f():w&&(f(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,u,o,d,f]),s.jsx(t4,{...e,ref:i})}),[HF,qF]=ag(dm,{isInside:!1}),GF=IC("TooltipContent"),t4=h.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...l}=e,c=og(ld,r),d=ig(r),{onClose:u}=c;return h.useEffect(()=>(document.addEventListener(wy,u),()=>document.removeEventListener(wy,u)),[u]),h.useEffect(()=>{if(c.trigger){const m=f=>{const p=f.target;p!=null&&p.contains(c.trigger)&&u()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,u]),s.jsx(Fl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:m=>m.preventDefault(),onDismiss:u,children:s.jsxs(rg,{"data-state":c.stateAttribute,...d,...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:[s.jsx(GF,{children:n}),s.jsx(HF,{scope:r,isInside:!0,children:s.jsx(o5,{id:c.contentId,role:"tooltip",children:a||n})})]})})});e4.displayName=ld;var s4="TooltipArrow",YF=h.forwardRef((e,t)=>
587{const{__scopeTooltip:r,...n}=e,a=ig(r);return qF(s4,r).isInside?null:s.jsx(ng,{...a,...n,ref:t})});YF.displayName=s4;function KF(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,a,i)){case i:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function QF(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function XF(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function JF(e,t){const{x:r,y:n}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i],c=t[o],d=l.x,u=l.y,m=c.x,f=c.y;u>n!=f>n&&r<(m-d)*(n-u)/(f-u)+d&&(a=!a)}return a}function ZF(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),e8(t)}function e8(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const a=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))r.pop();else break}r.push(a)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var t8=XE,s8=JE,r8=ZE,r4=e4;const n4=t8,n8=s8,a8=r8,a4=h.forwardRef(({className:e,sideOffset:t=4,...r},n)=>s.jsx(r4,{ref:n,sideOffset:t,className:me("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));a4.displayName=r4.displayName;var Vm=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(){}},El=typeof window>"u"||"Deno"in globalThis;function Er(){}function i8(e,t){return typeof e=="function"?e(t):e}function Ny(e){return typeof e=="number"&&e>=0&&e!==1/0}function i4(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fo(e,t){return typeof e=="function"?e(t):e}function gn(e,t){return typeof e=="function"?e(t):e}function $_(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:i,queryKey:o,stale:l}=e;if(o){if(n){if(t.queryHash!==tw(o,t.options))return!1}else if(!mm(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||i&&!i(t))}function U_(e,t){const{exact:r,status:n,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(um(t.options.mutationKey)!==um(i))return!1}else if(!mm(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function tw(e,t){return((t==null?void 0:t.queryKeyHashFn)||um)(e)}function um(e){return JSON.stringify(e,(t,r)=>ky(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function mm(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>mm(e[r],t[r])):!1}function o4(e,t){if(e===t)return e;const r=B_(e)&&B_(t);if(r||ky(e)&&ky(t)){const n=r?e:Object.keys(e),a=n.length,i=r?t:Object.keys(t),o=i.length,l=r?[]:{},c=new Set(n);let d=0;for(let u=0;u<o;u++){const m=r?u:i[u];(!r&&c.has(m)||r)&&e[m]===void 0&&t[m]===void 0?(l[m]=void 0,d++):(l[m]=o4(e[m],t[m]),l[m]===e[m]&&e[m]!==void 0&&d++)}return a===o&&d===a?e:l}return t}function _y(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function B_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ky(e){if(!z_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!z_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function z_(e){return Object.prototype.toString.call(e)==="[object Object]"}function o8(e){return new Promise(t=>{setTimeout(t,e)})}function Sy(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?o4(e,t):t}function l8(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function c8(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var sw=Symbol();function l4(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===sw?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function d8(e,t){return typeof e=="function"?e(...t):!!e}var il,Vi,Uc,iS,u8=(iS=class extends Vm{constructor(){super();Qe(this,il);Qe(this,Vi);Qe(this,Uc);Me(this,Uc,t=>{if(!El&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){Q(this,Vi)||this.setEventListener(Q(this,Uc))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,Vi))==null||t.call(this),Me(this,Vi,void 0))}setEventListener(t){var r;Me(this,Uc,t),(r=Q(this,Vi))==null||r.call(this),Me(this,Vi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){Q(this,il)!==t&&(Me(this,il,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 14,133 bytes, line 587
587this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof Q(this,il)=="boolean"?Q(this,il):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},il=new WeakMap,Vi=new WeakMap,Uc=new WeakMap,iS),rw=new u8,Bc,Hi,zc,oS,m8=(oS=class extends Vm{constructor(){super();Qe(this,Bc,!0);Qe(this,Hi);Qe(this,zc);Me(this,zc,t=>{if(!El&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){Q(this,Hi)||this.setEventListener(Q(this,zc))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,Hi))==null||t.call(this),Me(this,Hi,void 0))}setEventListener(t){var r;Me(this,zc,t),(r=Q(this,Hi))==null||r.call(this),Me(this,Hi,t(this.setOnline.bind(this)))}setOnline(t){Q(this,Bc)!==t&&(Me(this,Bc,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return Q(this,Bc)}},Bc=new WeakMap,Hi=new WeakMap,zc=new WeakMap,oS),ep=new m8;function Cy(){let e,t;const r=new Promise((a,i)=>{e=a,t=i});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}function h8(e){return Math.min(1e3*2**e,3e4)}function c4(e){return(e??"online")==="online"?ep.isOnline():!0}var d4=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Sx(e){return e instanceof d4}function u4(e){let t=!1,r=0,n=!1,a;const i=Cy(),o=g=>{var b;n||(f(new d4(g)),(b=e.abort)==null||b.call(e))},l=()=>{t=!0},c=()=>{t=!1},d=()=>rw.isFocused()&&(e.networkMode==="always"||ep.isOnline())&&e.canRun(),u=()=>c4(e.networkMode)&&e.canRun(),m=g=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,g),a==null||a(),i.resolve(g))},f=g=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,g),a==null||a(),i.reject(g))},p=()=>new Promise(g=>{var b;a=y=>{(n||d())&&g(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;a=void 0,n||(g=e.onContinue)==null||g.call(e)}),v=()=>{if(n)return;let g;const b=r===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(m).catch(y=>{var S;if(n)return;const x=e.retry??(El?0:3),w=e.retryDelay??h8,j=typeof w=="function"?w(r,y):w,N=x===!0||typeof x=="number"&&r<x||typeof x=="function"&&x(r,y);if(t||!N){f(y);return}r++,(S=e.onFail)==null||S.call(e,r,y),o8(j).then(()=>d()?void 0:p()).then(()=>{t?f(y):v()})})};return{promise:i,cancel:o,continue:()=>(a==null||a(),i),cancelRetry:l,continueRetry:c,canStart:u,start:()=>(u()?v():p().then(v),i)}}var f8=e=>setTimeout(e,0);function p8(){let e=[],t=0,r=l=>{l()},n=l=>{l()},a=f8;const i=l=>{t?e.push(l):a(()=>{r(l)})},o=()=>{const l=e;e=[],l.length&&a(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{a=l}}}var zs=p8(),ol,lS,m4=(lS=class{constructor(){Qe(this,ol)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ny(this.gcTime)&&Me(this,ol,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(El?1/0:5*60*1e3))}clearGcTimeout(){Q(this,ol)&&(clearTimeout(Q(this,ol)),Me(this,ol,void 0))}},ol=new WeakMap,lS),Wc,ll,pn,cl,Xs,Tm,dl,Wn,Ka,cS,g8=(cS=class extends m4{constructor(t){super();Qe(this,Wn);Qe(this,Wc);Qe(this,ll);Qe(this,pn);Qe(this,cl);Qe(this,Xs);Qe(this,Tm);Qe(this,dl);Me(this,dl,!1),Me(this,Tm,t.defaultOptions),this.setOptions(t.options),this.observers=[],Me(this,cl,t.client),Me(this,pn,Q(this,cl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Me(this,Wc,x8(this.options)),this.state=t.state??Q(this,Wc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Q(this,Xs))==null?void 0:t.promise}setOptions(t){this.options={...Q(this,Tm),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Q(this,pn).remove(this)}setData(t,r){const n=Sy(this.state.data,t,this.options);return vt(this,Wn,Ka).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){vt(this,Wn,Ka).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,a;const r=(n=Q(this,Xs))==null?void 0:n.promise;return(a=Q(this,Xs))==null||a.cancel(t),r?r.then(Er).catch(Er):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Q(this,Wc))}isActive(){return this.observers.some(t=>gn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sw||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>fo(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!i4(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=Q(this,Xs))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=Q(this,Xs))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Q(this,pn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(Q(this,Xs)&&(Q(this,dl)?Q(this,Xs).cancel({revert:!0}):Q(this,Xs).cancelRetry()),this.scheduleGc()),Q(this,pn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||vt(this,Wn,Ka).call(this,{type:"invalidate"})}fetch(t,r){var d,u,m;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(Q(this,Xs))return Q(this,Xs).continueRetry(),Q(this,Xs).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Me(this,dl,!0),n.signal)})},i=()=>{const f=l4(this.options,r),v=(()=>{const g={client:Q(this,cl),queryKey:this.queryKey,meta:this.meta};return a(g),g})();return Me(this,dl,!1),this.options.persister?this.options.persister(f,v,this):f(v)},l=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:Q(this,cl),state:this.state,fetchFn:i};return a(f),f})();(d=this.options.behavior)==null||d.onFetch(l,this),Me(this,ll,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=l.fetchOptions)==null?void 0:u.meta))&&vt(this,Wn,Ka).call(this,{type:"fetch",meta:(m=l.fetchOptions)==null?void 0:m.meta});const c=f=>{var p,v,g,b;Sx(f)&&f.silent||vt(this,Wn,Ka).call(this,{type:"error",error:f}),Sx(f)||((v=(p=Q(this,pn).config).onError)==null||v.call(p,f,this),(b=(g=Q(this,pn).config).onSettled)==null||b.call(g,this.state.data,f,this)),this.scheduleGc()};return Me(this,Xs,u4({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var p,v,g,b;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){c(y);return}(v=(p=Q(this,pn).config).onSuccess)==null||v.call(p,f,this),(b=(g=Q(this,pn).config).onSettled)==null||b.call(g,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,p)=>{vt(this,Wn,Ka).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{vt(this,Wn,Ka).call(this,{type:"pause"})},onContinue:()=>{vt(this,Wn,Ka).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),Q(this,Xs).start()}},Wc=new WeakMap,ll=new WeakMap,pn=new WeakMap,cl=new WeakMap,Xs=new WeakMap,Tm=new WeakMap,dl=new WeakMap,Wn=new WeakSet,Ka=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...h4(n.data,this.options),fetchMeta:t.meta??null};case"success":return Me(this,ll,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return Sx(a)&&a.revert&&Q(this,ll)?{...Q(this,ll),fetchStatus:"idle"}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),zs.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),Q(this,pn).notify({query:this,type:"updated",action:t})})},cS);function h4(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:c4(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function x8(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var ga,dS,v8=(dS=class extends Vm{constructor(t={}){super();Qe(this,ga);this.config=t,Me(this,ga,new Map)}build(t,r,n){const a=r.queryKey,i=r.queryHash??tw(a,r);let o=this.get(i);return o||(o=new g8({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(o)),o}add(t){Q(this,ga).has(t.queryHash)||(Q(this,ga).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=Q(this,ga).get(t.queryHash);r&&(t.destroy(),r===t&&Q(this,ga).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){zs.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Q(this,ga).get(t)}getAll(){return[...Q(this,ga).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>$_(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>$_(t,n)):r}notify(t){zs.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){zs.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){zs.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ga=new WeakMap,dS),xa,dr,ul,va,Oi,uS,y8=(uS=class extends m4{constructor(t){super();Qe(this,va);Qe(this,xa);Qe(this,dr);Qe(this,ul);this.mutationId=t.mutationId,Me(this,dr,t.mutationCache),Me(this,xa,[]),this.state=t.state||b8(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Q(this,xa).includes(t)||(Q(this,xa).push(t),this.clearGcTimeout(),Q(this,dr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Me(this,xa,Q(this,xa).filter(r=>r!==t)),this.scheduleGc(),Q(this,dr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Q(this,xa).length||(this.state.status==="pending"?this.scheduleGc():Q(this,dr).remove(this))}continue(){var t;return((t=Q(this,ul))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,l,c,d,u,m,f,p,v,g,b,y,x,w,j,N,S,E,_;const r=()=>{vt(this,va,Oi).call(this,{type:"continue"})};Me(this,ul,u4({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(I,R)=>{vt(this,va,Oi).call(this,{type:"failed",failureCount:I,error:R})},onPause:()=>{vt(this,va,Oi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Q(this,dr).canRun(this)}));const n=this.state.status==="pending",a=!Q(this,ul).canStart();try{if(n)r();else{vt(this,va,Oi).call(this,{type:"pending",variables:t,isPaused:a}),await((o=(i=Q(this,dr).config).onMutate)==null?void 0:o.call(i,t,this));const R=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));R!==this.state.context&&vt(this,va,Oi).call(this,{type:"pending",context:R,variables:t,isPaused:a})}const I=await Q(this,ul).start();return await((u=(d=Q(this,dr).config).onSuccess)==null?void 0:u.call(d,I,t,this.state.context,this)),await((f=(m=this.options).onSuccess)==null?void 0:f.call(m,I,t,this.state.context)),await((v=(p=Q(this,dr).config).onSettled)==null?void 0:v.call(p,I,null,this.state.variables,this.state.context,this)),await((b=(g=this.options).onSettled)==null?void 0:b.call(g,I,null,t,this.state.context)),vt(this,va,Oi).call(this,{type:"success",data:I}),I}catch(I){try{throw await((x=(y=Q(this,dr).config).onError)==null?void 0:x.call(y,I,t,this.state.context,this)),await((j=(w=this.options).onError)==null?void 0:j.call(w,I,t,this.state.context)),await((S=(N=Q(this,dr).config).onSettled)==null?void 0:S.call(N,void 0,I,this.state.variables,this.state.context,this)),await((_=(E=this.options).onSettled)==null?void 0:_.call(E,void 0,I,t,this.state.context)),I}finally{vt(this,va,Oi).call(this,{type:"error",error:I})}}finally{Q(this,dr).runNext(this)}}},xa=new WeakMap,dr=new WeakMap,ul=new WeakMap,va=new WeakSet,Oi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};
587case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),zs.batch(()=>{Q(this,xa).forEach(n=>{n.onMutationUpdate(t)}),Q(this,dr).notify({mutation:this,type:"updated",action:t})})},uS);function b8(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ni,Vn,Am,mS,w8=(mS=class extends Vm{constructor(t={}){super();Qe(this,ni);Qe(this,Vn);Qe(this,Am);this.config=t,Me(this,ni,new Set),Me(this,Vn,new Map),Me(this,Am,0)}build(t,r,n){const a=new y8({mutationCache:this,mutationId:++uh(this,Am)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){Q(this,ni).add(t);const r=Rh(t);if(typeof r=="string"){const n=Q(this,Vn).get(r);n?n.push(t):Q(this,Vn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Q(this,ni).delete(t)){const r=Rh(t);if(typeof r=="string"){const n=Q(this,Vn).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&Q(this,Vn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Rh(t);if(typeof r=="string"){const n=Q(this,Vn).get(r),a=n==null?void 0:n.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=Rh(t);if(typeof r=="string"){const a=(n=Q(this,Vn).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){zs.batch(()=>{Q(this,ni).forEach(t=>{this.notify({type:"removed",mutation:t})}),Q(this,ni).clear(),Q(this,Vn).clear()})}getAll(){return Array.from(Q(this,ni))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>U_(r,n))}findAll(t={}){return this.getAll().filter(r=>U_(t,r))}notify(t){zs.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 9,506 bytes, line 587
587r.state.isPaused);return zs.batch(()=>Promise.all(t.map(r=>r.continue().catch(Er))))}},ni=new WeakMap,Vn=new WeakMap,Am=new WeakMap,mS);function Rh(e){var t;return(t=e.options.scope)==null?void 0:t.id}function W_(e){return{onFetch:(t,r)=>{var u,m,f,p,v;const n=t.options,a=(f=(m=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:m.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let g=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},y=l4(t.options,t.fetchOptions),x=async(w,j,N)=>{if(g)return Promise.reject();if(j==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:j,direction:N?"backward":"forward",meta:t.options.meta};return b(T),T})(),_=await y(E),{maxPages:I}=t.options,R=N?c8:l8;return{pages:R(w.pages,_,I),pageParams:R(w.pageParams,j,I)}};if(a&&i.length){const w=a==="backward",j=w?j8:V_,N={pages:i,pageParams:o},S=j(n,N);l=await x(N,S,w)}else{const w=e??i.length;do{const j=c===0?o[0]??n.initialPageParam:V_(n,l);if(c>0&&j==null)break;l=await x(l,j),c++}while(c<w)}return l};t.options.persister?t.fetchFn=()=>{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function V_(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function j8(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Zt,qi,Gi,Vc,Hc,Yi,qc,Gc,hS,N8=(hS=class{constructor(e={}){Qe(this,Zt);Qe(this,qi);Qe(this,Gi);Qe(this,Vc);Qe(this,Hc);Qe(this,Yi);Qe(this,qc);Qe(this,Gc);Me(this,Zt,e.queryCache||new v8),Me(this,qi,e.mutationCache||new w8),Me(this,Gi,e.defaultOptions||{}),Me(this,Vc,new Map),Me(this,Hc,new Map),Me(this,Yi,0)}mount(){uh(this,Yi)._++,Q(this,Yi)===1&&(Me(this,qc,rw.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,Zt).onFocus())})),Me(this,Gc,ep.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,Zt).onOnline())})))}unmount(){var e,t;uh(this,Yi)._--,Q(this,Yi)===0&&((e=Q(this,qc))==null||e.call(this),Me(this,qc,void 0),(t=Q(this,Gc))==null||t.call(this),Me(this,Gc,void 0))}isFetching(e){return Q(this,Zt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Q(this,qi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=Q(this,Zt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=Q(this,Zt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(fo(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return Q(this,Zt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=Q(this,Zt).get(n.queryHash),i=a==null?void 0:a.state.data,o=i8(t,i);if(o!==void 0)return Q(this,Zt).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return zs.batch(()=>Q(this,Zt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=Q(this,Zt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=Q(this,Zt);zs.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=Q(this,Zt);return zs.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=zs.batch(()=>Q(this,Zt).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(Er).catch(Er)}invalidateQueries(e,t={}){return zs.batch(()=>(Q(this,Zt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=zs.batch(()=>Q(this,Zt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,r);return r.throwOnError||(i=i.catch(Er)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Er)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=Q(this,Zt).build(this,t);return r.isStaleByTime(fo(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Er).catch(Er)}fetchInfiniteQuery(e){return e.behavior=W_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Er).catch(Er)}ensureInfiniteQueryData(e){return e.behavior=W_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ep.isOnline()?Q(this,qi).resumePausedMutations():Promise.resolve()}getQueryCache(){return Q(this,Zt)}getMutationCache(){return Q(this,qi)}getDefaultOptions(){return Q(this,Gi)}setDefaultOptions(e){Me(this,Gi,e)}setQueryDefaults(e,t){Q(this,Vc).set(um(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Q(this,Vc).values()],r={};return t.forEach(n=>{mm(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){Q(this,Hc).set(um(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Q(this,Hc).values()],r={};return t.forEach(n=>{mm(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Q(this,Gi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=tw(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===sw&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Q(this,Gi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Q(this,Zt).clear(),Q(this,qi).clear()}},Zt=new WeakMap,qi=new WeakMap,Gi=new WeakMap,Vc=new WeakMap,Hc=new WeakMap,Yi=new WeakMap,qc=new WeakMap,Gc=new WeakMap,hS),kr,yt,Im,ur,ml,Yc,Ki,Qi,Rm,Kc,Qc,hl,fl,Xi,Xc,Tt,fu,Ey,Py,Ty,Ay,Iy,Ry,My,f4,fS,_8=(fS=class extends Vm{constructor(t,r){super();Qe(this,Tt);Qe(this,kr);Qe(this,yt);Qe(this,Im);Qe(this,ur);Qe(this,ml);Qe(this,Yc);Qe(this,Ki);Qe(this,Qi);Qe(this,Rm);Qe(this,Kc);Qe(this,Qc);Qe(this,hl);Qe(this,fl);Qe(this,Xi);Qe(this,Xc,new Set);this.options=r,Me(this,kr,t),Me(this,Qi,null),Me(this,Ki,Cy()),this.options.experimental_prefetchInRender||Q(this,Ki).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Q(this,yt).addObserver(this),H_(Q(this,yt),this.options)?vt(this,Tt,fu).call(this):this.updateResult(),vt(this,Tt,Ay).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Oy(Q(this,yt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Oy(Q(this,yt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,vt(this,Tt,Iy).call(this),vt(this,Tt,Ry).call(this),Q(this,yt).removeObserver(this)}setOptions(t){const r=this.options,n=Q(this,yt);if(this.options=Q(this,kr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof gn(this.options.enabled,Q(this,yt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");vt(this,Tt,My).call(this),Q(this,yt).setOptions(this.options),r._defaulted&&!_y(this.options,r)&&Q(this,kr).getQueryCache().notify({type:"observerOptionsUpdated",query:Q(this,yt),observer:this});const a=this.hasListeners();a&&q_(Q(this,yt),n,this.options,r)&&vt(this,Tt,fu).call(this),this.updateResult(),a&&(Q(this,yt)!==n||gn(this.options.enabled,Q(this,yt))!==gn(r.enabled,Q(this,yt))||fo(this.options.staleTime,Q(this,yt))!==fo(r.staleTime,Q(this,yt)))&&vt(this,Tt,Ey).call(this);const i=vt(this,Tt,Py).call(this);a&&(Q(this,yt)!==n||gn(this.options.enabled,Q(this,yt))!==gn(r.enabled,Q(this,yt))||i!==Q(this,Xi))&&vt(this,Tt,Ty).call(this,i)}getOptimisticResult(t){const r=Q(this,kr).getQueryCache().build(Q(this,kr),t),n=this.createResult(r,t);return S8(this,n)&&(Me(this,ur,n),Me(this,Yc,this.options),Me(this,ml,Q(this,yt).state)),n}getCurrentResult(){return Q(this,ur)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),Reflect.get(n,a))})}trackProp(t){Q(this,Xc).add(t)}getCurrentQuery(){return Q(this,yt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=Q(this,kr).defaultQueryOptions(t),n=Q(this,kr).getQueryCache().build(Q(this,kr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return vt(this,Tt,fu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Q(this,ur)))}createResult(t,r){var I;const n=Q(this,yt),a=this.options,i=Q(this,ur),o=Q(this,ml),l=Q(this,Yc),d=t!==n?t.state:Q(this,Im),{state:u}=t;let m={...u},f=!1,p;if(r._optimisticResults){const R=this.hasListeners(),T=!R&&H_(t,r),k=R&&q_(t,n,r,a);
vendor: 2,169 bytes, line 587
587(T||k)&&(m={...m,...h4(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:v,errorUpdatedAt:g,status:b}=m;p=m.data;let y=!1;if(r.placeholderData!==void 0&&p===void 0&&b==="pending"){let R;i!=null&&i.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(R=i.data,y=!0):R=typeof r.placeholderData=="function"?r.placeholderData((I=Q(this,Qc))==null?void 0:I.state.data,Q(this,Qc)):r.placeholderData,R!==void 0&&(b="success",p=Sy(i==null?void 0:i.data,R,r),f=!0)}if(r.select&&p!==void 0&&!y)if(i&&p===(o==null?void 0:o.data)&&r.select===Q(this,Rm))p=Q(this,Kc);else try{Me(this,Rm,r.select),p=r.select(p),p=Sy(i==null?void 0:i.data,p,r),Me(this,Kc,p),Me(this,Qi,null)}catch(R){Me(this,Qi,R)}Q(this,Qi)&&(v=Q(this,Qi),p=Q(this,Kc),g=Date.now(),b="error");const x=m.fetchStatus==="fetching",w=b==="pending",j=b==="error",N=w&&x,S=p!==void 0,_={status:b,fetchStatus:m.fetchStatus,isPending:w,isSuccess:b==="success",isError:j,isInitialLoading:N,isLoading:N,data:p,dataUpdatedAt:m.dataUpdatedAt,error:v,errorUpdatedAt:g,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:x,isRefetching:x&&!w,isLoadingError:j&&!S,isPaused:m.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:j&&S,isStale:nw(t,r),refetch:this.refetch,promise:Q(this,Ki),isEnabled:gn(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=C=>{_.status==="error"?C.reject(_.error):_.data!==void 0&&C.resolve(_.data)},T=()=>{const C=Me(this,Ki,_.promise=Cy());R(C)},k=Q(this,Ki);switch(k.status){case"pending":t.queryHash===n.queryHash&&R(k);break;case"fulfilled":(_.status==="error"||_.data!==k.value)&&T();break;case"rejected":(_.status!=="error"||_.error!==k.reason)&&T();break}}return _}updateResult(){const t=Q(this,ur),r=this.createResult(Q(this,yt),this.options);if(Me(this,ml,Q(this,yt).state),Me(this,Yc,this.options),Q(this,ml).data!==void 0&&Me(this,Qc,Q(this,yt)),_y(r,t))return;Me(this,ur,r);const n=()=>
vendor: 5,303 bytes, lines 587-596
587{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!Q(this,Xc).size)return!0;const o=new Set(i??Q(this,Xc));return this.options.throwOnError&&o.add("error"),Object.keys(Q(this,ur)).some(l=>{const c=l;return Q(this,ur)[c]!==t[c]&&o.has(c)})};vt(this,Tt,f4).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&vt(this,Tt,Ay).call(this)}},kr=new WeakMap,yt=new WeakMap,Im=new WeakMap,ur=new WeakMap,ml=new WeakMap,Yc=new WeakMap,Ki=new WeakMap,Qi=new WeakMap,Rm=new WeakMap,Kc=new WeakMap,Qc=new WeakMap,hl=new WeakMap,fl=new WeakMap,Xi=new WeakMap,Xc=new WeakMap,Tt=new WeakSet,fu=function(t){vt(this,Tt,My).call(this);let r=Q(this,yt).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Er)),r},Ey=function(){vt(this,Tt,Iy).call(this);const t=fo(this.options.staleTime,Q(this,yt));if(El||Q(this,ur).isStale||!Ny(t))return;const n=i4(Q(this,ur).dataUpdatedAt,t)+1;Me(this,hl,setTimeout(()=>{Q(this,ur).isStale||this.updateResult()},n))},Py=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Q(this,yt)):this.options.refetchInterval)??!1},Ty=function(t){vt(this,Tt,Ry).call(this),Me(this,Xi,t),!(El||gn(this.options.enabled,Q(this,yt))===!1||!Ny(Q(this,Xi))||Q(this,Xi)===0)&&Me(this,fl,setInterval(()=>{(this.options.refetchIntervalInBackground||rw.isFocused())&&vt(this,Tt,fu).call(this)},Q(this,Xi)))},Ay=function(){vt(this,Tt,Ey).call(this),vt(this,Tt,Ty).call(this,vt(this,Tt,Py).call(this))},Iy=function(){Q(this,hl)&&(clearTimeout(Q(this,hl)),Me(this,hl,void 0))},Ry=function(){Q(this,fl)&&(clearInterval(Q(this,fl)),Me(this,fl,void 0))},My=function(){const t=Q(this,kr).getQueryCache().build(Q(this,kr),this.options);if(t===Q(this,yt))return;const r=Q(this,yt);Me(this,yt,t),Me(this,Im,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},f4=function(t){zs.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(Q(this,ur))}),Q(this,kr).getQueryCache().notify({query:Q(this,yt),type:"observerResultsUpdated"})})},fS);function k8(e,t){return gn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function H_(e,t){return k8(e,t)||e.state.data!==void 0&&Oy(e,t,t.refetchOnMount)}function Oy(e,t,r){if(gn(t.enabled,e)!==!1&&fo(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&nw(e,t)}return!1}function q_(e,t,r,n){return(e!==t||gn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&nw(e,r)}function nw(e,t){return gn(t.enabled,e)!==!1&&e.isStaleByTime(fo(t.staleTime,e))}function S8(e,t){return!_y(e.getCurrentResult(),t)}var p4=h.createContext(void 0),g4=e=>{const t=h.useContext(p4);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},C8=({client:e,children:t})=>(h.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(p4.Provider,{value:e,children:t})),x4=h.createContext(!1),E8=()=>h.useContext(x4);x4.Provider;function P8(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var T8=h.createContext(P8()),A8=()=>h.useContext(T8),I8=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},R8=e=>{h.useEffect(()=>{e.clearReset()},[e])},M8=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||d8(r,[e.error,n])),O8=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},D8=(e,t)=>e.isLoading&&e.isFetching&&!t,L8=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,G_=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function F8(e,t,r){var m,f,p,v,g;const n=E8(),a=A8(),i=g4(),o=i.defaultQueryOptions(e);(f=(m=i.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||f.call(m,o),o._optimisticResults=n?"isRestoring":"optimistic",O8(o),I8(o,a),R8(a);const l=!i.getQueryCache().get(o.queryHash),[c]=h.useState(()=>new t(i,o)),d=c.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(h.useSyncExternalStore(h.useCallback(b=>{const y=u?c.subscribe(zs.batchCalls(b)):Er;return c.updateResult(),y},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),h.useEffect(()=>{c.setOptions(o)},[o,c]),L8(o,d))throw G_(o,c,a);if(M8({result:d,errorResetBoundary:a,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw d.error;if((v=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||v.call(p,o,d),o.experimental_prefetchInRender&&!El&&D8(d,n)){const b=l?G_(o,c,a):(g=i.getQueryCache().get(o.queryHash))==null?void 0:g.promise;b==null||b.catch(Er).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?d:c.trackResult(d)}function v4(e,t){return F8(e,_8)}/** 588 * @remix-run/router v1.23.0 589 * 590 * Copyright (c) Remix Software Inc. 591 * 592 * This source code is licensed under the MIT license found in the 593 * LICENSE.md file in the root directory of this source tree. 594 * 595 * @license MIT 596 */function hm(){return hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 5,028 bytes, line 596
596for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hm.apply(this,arguments)}var eo;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(eo||(eo={}));const Y_="popstate";function $8(e){e===void 0&&(e={});function t(n,a){let{pathname:i,search:o,hash:l}=n.location;return Dy("",{pathname:i,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:tp(a)}return B8(t,r,null,e)}function hs(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function y4(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function U8(){return Math.random().toString(36).substr(2,8)}function K_(e,t){return{usr:e.state,key:e.key,idx:t}}function Dy(e,t,r,n){return r===void 0&&(r=null),hm({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Td(t):t,{state:r,key:t&&t.key||n||U8()})}function tp(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Td(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function B8(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,l=eo.Pop,c=null,d=u();d==null&&(d=0,o.replaceState(hm({},o.state,{idx:d}),""));function u(){return(o.state||{idx:null}).idx}function m(){l=eo.Pop;let b=u(),y=b==null?null:b-d;d=b,c&&c({action:l,location:g.location,delta:y})}function f(b,y){l=eo.Push;let x=Dy(g.location,b,y);d=u()+1;let w=K_(x,d),j=g.createHref(x);try{o.pushState(w,"",j)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(j)}i&&c&&c({action:l,location:g.location,delta:1})}function p(b,y){l=eo.Replace;let x=Dy(g.location,b,y);d=u();let w=K_(x,d),j=g.createHref(x);o.replaceState(w,"",j),i&&c&&c({action:l,location:g.location,delta:0})}function v(b){let y=a.location.origin!=="null"?a.location.origin:a.location.href,x=typeof b=="string"?b:tp(b);return x=x.replace(/ $/,"%20"),hs(y,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,y)}let g={get action(){return l},get location(){return e(a,o)},listen(b){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(Y_,m),c=b,()=>{a.removeEventListener(Y_,m),c=null}},createHref(b){return t(a,b)},createURL:v,encodeLocation(b){let y=v(b);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:p,go(b){return o.go(b)}};return g}var Q_;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Q_||(Q_={}));function z8(e,t,r){return r===void 0&&(r="/"),W8(e,t,r,!1)}function W8(e,t,r,n){let a=typeof t=="string"?Td(t):t,i=aw(a.pathname||"/",r);if(i==null)return null;let o=b4(e);V8(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let d=t$(i);l=Z8(o[c],d,n)}return l}function b4(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(i,o,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(hs(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let d=po([n,c.relativePath]),u=r.concat(c);i.children&&i.children.length>0&&(hs(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),b4(i.children,t,u,d)),!(i.path==null&&!i.index)&&t.push({path:d,score:X8(d,i.index),routesMeta:u})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))a(i,o);else for(let c of w4(i.path))a(i,o,c)}),t}function w4(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=w4(n.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function V8(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:J8(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const H8=/^:[\w-]+$/,q8=3,G8=2,Y8=1,K8=10,Q8=-2,X_=e=>e==="*";function X8(e,t){let r=e.split("/"),n=r.length;return r.some(X_)&&(n+=Q8),t&&(n+=G8),r.filter(a=>!X_(a)).reduce((a,i)=>a+(H8.test(i)?q8:i===""?Y8:K8),n)}function J8(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function Z8(e,t,r){let{routesMeta:n}=e,a={},i="/",o=[];for(let l=0;l<n.length;++l){let c=n[l],d=l===n.length-1,u=i==="/"?t:t.slice(i.length)||"/",m=J_({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},u),f=c.route;if(!m&&d&&r&&!n[n.length-1].route.index&&(m=J_({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},u)),!m)return null;
vendor: 9,495 bytes, lines 596-605
596Object.assign(a,m.params),o.push({params:a,pathname:po([i,m.pathname]),pathnameBase:a$(po([i,m.pathnameBase])),route:f}),m.pathnameBase!=="/"&&(i=po([i,m.pathnameBase]))}return o}function J_(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=e$(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((d,u,m)=>{let{paramName:f,isOptional:p}=u;if(f==="*"){let g=l[m]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const v=l[m];return p&&!v?d[f]=void 0:d[f]=(v||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:o,pattern:e}}function e$(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),y4(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function t$(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return y4(!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 aw(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function s$(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Td(e):e;return{pathname:r?r.startsWith("/")?r:r$(r,t):t,search:i$(n),hash:o$(a)}}function r$(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Cx(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function n$(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function iw(e,t){let r=n$(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function ow(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Td(e):(a=hm({},e),hs(!a.pathname||!a.pathname.includes("?"),Cx("?","pathname","search",a)),hs(!a.pathname||!a.pathname.includes("#"),Cx("#","pathname","hash",a)),hs(!a.search||!a.search.includes("#"),Cx("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,l;if(o==null)l=r;else{let m=t.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),m-=1;a.pathname=f.join("/")}l=m>=0?t[m]:"/"}let c=s$(a,l),d=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(d||u)&&(c.pathname+="/"),c}const po=e=>e.join("/").replace(/\/\/+/g,"/"),a$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),i$=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,o$=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function l$(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const j4=["post","put","patch","delete"];new Set(j4);const c$=["get",...j4];new Set(c$);/** 597 * React Router v6.30.1 598 * 599 * Copyright (c) Remix Software Inc. 600 * 601 * This source code is licensed under the MIT license found in the 602 * LICENSE.md file in the root directory of this source tree. 603 * 604 * @license MIT 605 */function fm(){return fm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fm.apply(this,arguments)}const lw=h.createContext(null),d$=h.createContext(null),Oo=h.createContext(null),lg=h.createContext(null),Ni=h.createContext({outlet:null,matches:[],isDataRoute:!1}),N4=h.createContext(null);function u$(e,t){let{relative:r}=t===void 0?{}:t;Ad()||hs(!1);let{basename:n,navigator:a}=h.useContext(Oo),{hash:i,pathname:o,search:l}=k4(e,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:po([n,o])),a.createHref({pathname:c,search:l,hash:i})}function Ad(){return h.useContext(lg)!=null}function $s(){return Ad()||hs(!1),h.useContext(lg).location}function _4(e){h.useContext(Oo).static||h.useLayoutEffect(e)}function qe(){let{isDataRoute:e}=h.useContext(Ni);return e?_$():m$()}function m$(){Ad()||hs(!1);let e=h.useContext(lw),{basename:t,future:r,navigator:n}=h.useContext(Oo),{matches:a}=h.useContext(Ni),{pathname:i}=$s(),o=JSON.stringify(iw(a,r.v7_relativeSplatPath)),l=h.useRef(!1);return _4(()=>{l.current=!0}),h.useCallback(function(d,u){if(u===void 0&&(u={}),!l.current)return;if(typeof d=="number"){n.go(d);return}let m=ow(d,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:po([t,m.pathname])),(u.replace?n.replace:n.push)(m,u.state,u)},[t,n,o,i,e])}function la(){let{matches:e}=h.useContext(Ni),t=e[e.length-1];return t?t.params:{}}function k4(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=h.useContext(Oo),{matches:a}=h.useContext(Ni),{pathname:i}=$s(),o=JSON.stringify(iw(a,n.v7_relativeSplatPath));return h.useMemo(()=>ow(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function h$(e,t){return f$(e,t)}function f$(e,t,r,n){Ad()||hs(!1);let{navigator:a}=h.useContext(Oo),{matches:i}=h.useContext(Ni),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let d=$s(),u;if(t){var m;let b=typeof t=="string"?Td(t):t;c==="/"||(m=b.pathname)!=null&&m.startsWith(c)||hs(!1),u=b}else u=d;let f=u.pathname||"/",p=f;if(c!=="/"){let b=c.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=z8(e,{pathname:p}),g=y$(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:po([c,a.encodeLocation?a.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:po([c,a.encodeLocation?a.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,r,n);return t&&g?h.createElement(lg.Provider,{value:{location:fm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:eo.Pop}},g):g}function p$(){let e=N$(),t=l$(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),r?h.createElement("pre",{style:a},r):null,null)}const g$=h.createElement(p$,null);class x$ extends h.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?h.createElement(Ni.Provider,{value:this.props.routeContext},h.createElement(N4.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function v$(e){let{routeContext:t,match:r,children:n}=e,a=h.useContext(lw);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),h.createElement(Ni.Provider,{value:t},n)}function y$(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,l=(a=r)==null?void 0:a.errors;if(l!=null){let u=o.findIndex(m=>m.route.id&&(l==null?void 0:l[m.route.id])!==void 0);u>=0||hs(!1),o=o.slice(0,Math.min(o.length,u+1))}let c=!1,d=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<o.length;u++){let m=o[u];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=u),m.route.id){let{loaderData:f,errors:p}=r,v=m.route.loader&&f[m.route.id]===void 0&&(!p||p[m.route.id]===void 0);if(m.route.lazy||v){c=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((u,m,f)=>{let p,v=!1,g=null,b=null;r&&(p=l&&m.route.id?l[m.route.id]:void 0,g=m.route.errorElement||g$,c&&(d<0&&f===0?(v=!0,b=null):d===f&&(v=!0,b=m.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,f+1)),x=()=>{let w;return p?w=g:v?w=b:m.route.Component?w=h.createElement(m.route.Component,null):m.route.element?w=m.route.element:w=u,h.createElement(v$,{match:m,routeContext:{outlet:u,matches:y,isDataRoute:r!=null},children:w})};return r&&(m.route.ErrorBoundary||m.route.errorElement||f===0)?h.createElement(x$,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:x(),routeC
605ontext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}var S4=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(S4||{}),sp=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}(sp||{});function b$(e){let t=h.useContext(lw);return t||hs(!1),t}function w$(e){let t=h.useContext(d$);return t||hs(!1),t}function j$(e){let t=h.useContext(Ni);return t||hs(!1),t}function C4(e){let t=j$(),r=t.matches[t.matches.length-1];return r.route.id||hs(!1),r.route.id}function N$(){var e;let t=h.useContext(N4),r=w$(sp.UseRouteError),n=C4(sp.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function _$(){let{router:e}=b$(S4.UseNavigateStable),t=C4(sp.UseNavigateStable),r=h.useRef(!1);return _4(()=>{r.current=!0}),h.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,fm({fromRouteId:t},i)))},[e,t])}function k$(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function E4(e){let{to:t,replace:r,state:n,relative:a}=e;Ad()||hs(!1);let{future:i,static:o}=h.useContext(Oo),{matches:l}=h.useContext(Ni),{pathname:c}=$s(),d=qe(),u=ow(t,iw(l,i.v7_relativeSplatPath),c,a==="path"),m=JSON.stringify(u);return h.useEffect(()=>d(JSON.parse(m),{replace:r,state:n,relative:a}),[d,m,a,r,n]),null}function Oe(e){hs(!1)}function S$(e){let{basename:t="/",children:r=null,location:n,navigationType:a=eo.Pop,navigator:i,static:o=!1,future:l}=e;Ad()&&hs(!1);let c=t.replace(/^\/*/,"/"),d=h.useMemo(()=>({basename:c,navigator:i,static:o,future:fm({v7_relativeSplatPath:!1},l)}),[c,l,i,o]);typeof n=="string"&&(n=Td(n));let{pathname:u="/",search:m="",hash:f="",state:p=null,key:v="default"}=n,g=h.useMemo(()=>{let b=aw(u,c);return b==null?null:{location:{pathname:b,search:m,hash:f,state:p,key:v},navigationType:a}},[c,u,m,f,p,v,a]);return g==null?null:h.createElement(Oo.Provider,{value:d},h.createElement(lg.Provider,{children:r,value:g}))}function C$(e){let{children:t,location:r}=e;return h$(Ly(t),r)}new Promise(()=>{});function Ly(e,t){t===void 0&&(t=[]);let r=[];return h.Children.forEach(e,(n,a)=>{if(!h.isValidElement(n))return;let i=[...t,a];if(n.type===h.Fragment){r.push.apply(r,Ly(n.props.children,i));return}n.type!==Oe&&hs(!1),!n.props.index||!n.props.children||hs(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Ly(n.props.children,i)),r.push(o)}),r}/** 606 * React Router DOM v6.30.1 607 * 608 * Copyright (c) Remix Software Inc. 609 * 610 * This source code is licensed under the MIT license found in the 611 * LICENSE.md file in the root directory of this source tree. 612 * 613 * @license MIT 614 */function Fy(){return Fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fy.apply(this,arguments)}function E$(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function P$(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function T$(e,t){return e.button===0&&(!t||t==="_self")&&!P$(e)}function $y(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function A$(e,t){let r=$y(e);return t&&t.forEach((n,a)=>
614{r.has(a)||t.getAll(a).forEach(i=>{r.append(a,i)})}),r}const I$=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],R$="6";try{window.__reactRouterVersion=R$}catch{}const M$="startTransition",Z_=zb[M$];function O$(e){let{basename:t,children:r,future:n,window:a}=e,i=h.useRef();i.current==null&&(i.current=$8({window:a,v5Compat:!0}));let o=i.current,[l,c]=h.useState({action:o.action,location:o.location}),{v7_startTransition:d}=n||{},u=h.useCallback(m=>{d&&Z_?Z_(()=>c(m)):c(m)},[c,d]);return h.useLayoutEffect(()=>o.listen(u),[o,u]),h.useEffect(()=>k$(n),[n]),h.createElement(S$,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:o,future:n})}const D$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",L$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cs=h.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:i,replace:o,state:l,target:c,to:d,preventScrollReset:u,viewTransition:m}=t,f=E$(t,I$),{basename:p}=h.useContext(Oo),v,g=!1;if(typeof d=="string"&&L$.test(d)&&(v=d,D$))try{let w=new URL(window.location.href),j=d.startsWith("//")?new URL(w.protocol+d):new URL(d),N=aw(j.pathname,p);j.origin===w.origin&&N!=null?d=N+j.search+j.hash:g=!0}catch{}let b=u$(d,{relative:a}),y=F$(d,{replace:o,state:l,target:c,preventScrollReset:u,relative:a,viewTransition:m});function x(w){n&&n(w),w.defaultPrevented||y(w)}return h.createElement("a",Fy({},f,{href:v||b,onClick:g||i?n:x,ref:r,target:c}))});var e1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(e1||(e1={}));var t1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(t1||(t1={}));function F$(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=qe(),d=$s(),u=k4(e,{relative:o});return h.useCallback(m=>{if(T$(m,r)){m.preventDefault();let f=n!==void 0?n:tp(d)===tp(u);c(e,{replace:f,state:a,preventScrollReset:i,relative:o,viewTransition:l})}},[d,c,u,n,a,r,e,i,o,l])}function Do(e){let t=h.useRef($y(e)),r=h.useRef(!1),n=$s(),a=h.useMemo(()=>A$(n.search,r.current?null:t.current),[n.search]),i=qe(),o=h.useCallback((l,c)=>{const d=$y(typeof l=="function"?l(a):l);r.current=!0,i("?"+d,c)},[i,a]);return[a,o]}const $$="modulepreload",U$=function(e){return"/"+e},s1={},ut=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));a=Promise.allSettled(r.map(c=>{if(c=U$(c),c in s1)return;s1[c]=!0;const d=c.endsWith(".css"),u=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":$$,d||(m.as="script"),m.crossOrigin="",m.href=c,l&&m.setAttribute("nonce",l),document.head.appendChild(m),d)return new Promise((f,p)=>{m.addEventListener("load",f),m.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return a.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},B$=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...r)=>ut(async()=>{const{default:n}=await Promise.resolve().then(()=>Id);return{default:n}},void 0).then(({default:n})=>n(...r)):t=fetch,(...r)=>t(...r)};class cw extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class z$ extends cw{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class r1 extends cw{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class n1 extends cw{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Uy;(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"})(Uy||(Uy={}));var W$=function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function l(u){try{d(n.next(u))}catch(m){o(m)}}function c(u){try{d(n.throw(u))}catch(m){o(m)}}function d(u){u.done?i(u.value):a(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})};class V${constructor(t,{headers:r={},customFetch:n,region:a=Uy.Any}={}
614){this.url=t,this.headers=r,this.region=a,this.fetch=B$(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,r={}){var n;return W$(this,void 0,void 0,function*(){try{const{headers:a,method:i,body:o}=r;let l={},{region:c}=r;c||(c=this.region);const d=new URL(`${this.url}/${t}`);c&&c!=="any"&&(l["x-region"]=c,d.searchParams.set("forceFunctionRegion",c));let u;o&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(l["Content-Type"]="application/octet-stream",u=o):typeof o=="string"?(l["Content-Type"]="text/plain",u=o):typeof FormData<"u"&&o instanceof FormData?u=o:(l["Content-Type"]="application/json",u=JSON.stringify(o)));const m=yield this.fetch(d.toString(),{method:i||"POST",headers:Object.assign(Object.assign(Object.assign({},l),this.headers),a),body:u}).catch(g=>{throw new z$(g)}),f=m.headers.get("x-relay-error");if(f&&f==="true")throw new r1(m);if(!m.ok)throw new n1(m);let p=((n=m.headers.get("Content-Type"))!==null&&n!==void 0?n:"text/plain").split(";")[0].trim(),v;return p==="application/json"?v=yield m.json():p==="application/octet-stream"?v=yield m.blob():p==="text/event-stream"?v=m:p==="multipart/form-data"?v=yield m.formData():v=yield m.text(),{data:v,error:null,response:m}}catch(a){return{data:null,error:a,response:a instanceof n1||a instanceof r1?a.context:void 0}}})}}var Tr={},dw={},cg={},Hm={},dg={},ug={},H$=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")},cd=H$();const q$=cd.fetch,P4=cd.fetch.bind(cd),T4=cd.Headers,G$=cd.Request,Y$=cd.Response,Id=Object.freeze(Object.defineProperty({__proto__:null,Headers:T4,Request:G$,Response:Y$,default:P4,fetch:q$},Symbol.toStringTag,{value:"Module"})),K$=oM(Id);var mg={};Object.defineProperty(mg,"__esModule",{value:!0});let Q$=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
614de=t.code}};mg.default=Q$;var A4=Sn&&Sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ug,"__esModule",{value:!0});const X$=A4(K$),J$=A4(mg);let Z$=class{constructor(t){var r,n;this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(r=t.shouldThrowOnError)!==null&&r!==void 0?r:!1,this.signal=t.signal,this.isMaybeSingle=(n=t.isMaybeSingle)!==null&&n!==void 0?n:!1,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=X$.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,r){return this.headers=new Headers(this.headers),this.headers.set(t,r),this}then(t,r){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let a=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{var o,l,c,d;let u=null,m=null,f=null,p=i.status,v=i.statusText;if(i.ok){if(this.method!=="HEAD"){const x=await i.text();x===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((o=this.headers.get("Accept"))===null||o===void 0)&&o.includes("application/vnd.pgrst.plan+text"))?m=x:m=JSON.parse(x))}const b=(l=this.headers.get("Prefer"))===null||l===void 0?void 0:l.match(/count=(exact|planned|estimated)/),y=(c=i.headers.get("content-range"))===null||c===void 0?void 0:c.split("/");b&&y&&y.length>1&&(f=parseInt(y[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(m)&&(m.length>1?(u={code:"PGRST116",details:`Results contain ${m.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},m=null,f=null,p=406,v="Not Acceptable"):m.length===1?m=m[0]:m=null)}else{const b=await i.text();try{u=JSON.parse(b),Array.isArray(u)&&i.status===404&&(m=[],u=null,p=200,v="OK")}catch{i.status===404&&b===""?(p=204,v="No Content"):u={message:b}}if(u&&this.isMaybeSingle&&(!((d=u==null?void 0:u.details)===null||d===void 0)&&d.includes("0 rows"))&&(u=null,p=200,v="OK"),u&&this.shouldThrowOnError)throw new J$.default(u)}return{error:u,data:m,count:f,status:p,statusText:v}});return this.shouldThrowOnError||(a=a.catch(i=>{var o,l,c;return{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:`${(l=i==null?void 0:i.stack)!==null&&l!==void 0?l:""}`,hint:"",code:`${(c=i==null?void 0:i.code)!==null&&c!==void 0?c:""}`},data:null,count:null,status:0,statusText:""}})),a.then(t,r)}returns(){return this}overrideTypes(){return this}};ug.default=Z$;var eU=Sn&&Sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dg,"__esModule",{value:!0});const tU=eU(ug);let sU=class extends tU.default{select(t){let r=!1;const n=(t??"*").split("").map(a=>/\s/.test(a)&&!r?"":(a==='"'&&(r=!r),a)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:r=!0,nullsFirst:n,foreignTable:a,referencedTable:i=a}={}){const o=i?`${i}.order`:"order",l=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${l?`${l},`:""}${t}.${r?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:r,referencedTable:n=r}={}){const a=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(a,`${t}`),this}range(t,r,{foreignTable:n,referencedTable:a=n}={}){const i=typeof a>"u"?"offset":`${a}.offset`,o=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(i,`${t}`),this.url.searchParams.set(o,`${r-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
614explain({analyze:t=!1,verbose:r=!1,settings:n=!1,buffers:a=!1,wal:i=!1,format:o="text"}={}){var l;const c=[t?"analyze":null,r?"verbose":null,n?"settings":null,a?"buffers":null,i?"wal":null].filter(Boolean).join("|"),d=(l=this.headers.get("Accept"))!==null&&l!==void 0?l:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${d}"; options=${c};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};dg.default=sU;var rU=Sn&&Sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hm,"__esModule",{value:!0});const nU=rU(dg);let aU=class extends nU.default{eq(t,r){return this.url.searchParams.append(t,`eq.${r}`),this}neq(t,r){return this.url.searchParams.append(t,`neq.${r}`),this}gt(t,r){return this.url.searchParams.append(t,`gt.${r}`),this}gte(t,r){return this.url.searchParams.append(t,`gte.${r}`),this}lt(t,r){return this.url.searchParams.append(t,`lt.${r}`),this}lte(t,r){return this.url.searchParams.append(t,`lte.${r}`),this}like(t,r){return this.url.searchParams.append(t,`like.${r}`),this}likeAllOf(t,r){return this.url.searchParams.append(t,`like(all).{${r.join(",")}}`),this}likeAnyOf(t,r){return this.url.searchParams.append(t,`like(any).{${r.join(",")}}`),this}ilike(t,r){return this.url.searchParams.append(t,`ilike.${r}`),this}ilikeAllOf(t,r){return this.url.searchParams.append(t,`ilike(all).{${r.join(",")}}`),this}ilikeAnyOf(t,r){return this.url.searchParams.append(t,`ilike(any).{${r.join(",")}}`),this}is(t,r){return this.url.searchParams.append(t,`is.${r}`),this}in(t,r){const n=Array.from(new Set(r)).map(a=>typeof a=="string"&&new RegExp("[,()]").test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(t,`in.(${n})`),this}contains(t,r){return typeof r=="string"?this.url.searchParams.append(t,`cs.${r}`):Array.isArray(r)?this.url.searchParams.append(t,`cs.{${r.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(r)}`),this}containedBy(t,r){return typeof r=="string"?this.url.searchParams.append(t,`cd.${r}`):Array.isArray(r)?this.url.searchParams.append(t,`cd.{${r.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(r)}`),this}rangeGt(t,r){return this.url.searchParams.append(t,`sr.${r}`),this}rangeGte(t,r){return this.url.searchParams.append(t,`nxl.${r}`),this}rangeLt(t,r){return this.url.searchParams.append(t,`sl.${r}`),this}rangeLte(t,r){return this.url.searchParams.append(t,`nxr.${r}`),this}rangeAdjacent(t,r){return this.url.searchParams.append(t,`adj.${r}`),this}overlaps(t,r){return typeof r=="string"?this.url.searchParams.append(t,`ov.${r}`):this.url.searchParams.append(t,`ov.{${r.join(",")}}`),this}textSearch(t,r,{config:n,type:a}={}){let i="";a==="plain"?i="pl":a==="phrase"?i="ph":a==="websearch"&&(i="w");const o=n===void 0?"":`(${n})`;return this.url.searchParams.append(t,`${i}fts${o}.${r}`),this}match(t){return Object.entries(t).forEach(([r,n])=>{this.url.searchParams.append(r,`eq.${n}`)}),this}not(t,r,n){return this.url.searchParams.append(t,`not.${r}.${n}`),this}or(t,{foreignTable:r,referencedTable:n=r}={}){const a=n?`${n}.or`:"or";return this.url.searchParams.append(a,`(${t})`),this}filter(t,r,n){return this.url.searchParams.append(t,`${r}.${n}`),this}};Hm.default=aU;var iU=Sn&&Sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cg,"__esModule",{value:!0});const Jd=iU(Hm);let oU=class{constructor(t,{headers:r={},schema:n,fetch:a}){this.url=t,this.headers=new Headers(r),this.schema=n,this.fetch=a}select(t,{head:r=!1,count:n}={}){const a=r?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(l=>/\s/.test(l)&&!i?"":(l==='"'&&(i=!i),l)).join("");return this.url.searchParams.set("select",o),n&&this.headers.append("Prefer",`count=${n}`),new Jd.default({method:a,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(t,{count:r,defaultToNull:n=!0}={}){var a;const i="POST";if(r&&this.headers.append("Prefer",`count=${r}`),n||this.headers.append("Prefer","missing=default"),Array.isArray(t)){const o=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(o.length>0){const l=[...new Set(o)].map(c=>`"${c}"`);this.url.searchParams.set("columns",l.join(","))}}return new Jd.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}upsert(t,{onConflict:r,ignoreDuplicates:n=!1,count:a,defaultToNull:i=!0}={}){var o;const l="POST";if(this.headers.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),r!==void 0&&this.url.searchParams.set("on_conflict",r),a&&this.headers.append("Prefer",`count=${a}`),i||this.headers.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((d,u)=>d.concat(Object.keys(u)),[]);if(c.length>0){const d=[...new Set(c)].map(u=>`"${u}"`);this.url.searchParams.set("columns",d.join(","))}}return new Jd.default({method:l,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(t,{count:r}={}){var n;const a="PATCH";return r&&this.headers.append("Prefer",`count=${r}`),new Jd.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}delete({count:t}={}){var r;const n="DELETE";return t&&this.headers.append("Prefer",`count=${t}`),new Jd.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}};cg.default=oU;
614var I4=Sn&&Sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dw,"__esModule",{value:!0});const lU=I4(cg),cU=I4(Hm);let dU=class R4{constructor(t,{headers:r={},schema:n,fetch:a}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.fetch=a}from(t){const r=new URL(`${this.url}/${t}`);return new lU.default(r,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new R4(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,r={},{head:n=!1,get:a=!1,count:i}={}){var o;let l;const c=new URL(`${this.url}/rpc/${t}`);let d;n||a?(l=n?"HEAD":"GET",Object.entries(r).filter(([m,f])=>f!==void 0).map(([m,f])=>[m,Array.isArray(f)?`{${f.join(",")}}`:`${f}`]).forEach(([m,f])=>{c.searchParams.append(m,f)})):(l="POST",d=r);const u=new Headers(this.headers);return i&&u.set("Prefer",`count=${i}`),new cU.default({method:l,url:c,headers:u,schema:this.schemaName,body:d,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}};dw.default=dU;var Rd=Sn&&Sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.PostgrestError=Tr.PostgrestBuilder=Tr.PostgrestTransformBuilder=Tr.PostgrestFilterBuilder=Tr.PostgrestQueryBuilder=Tr.PostgrestClient=void 0;const M4=Rd(dw);Tr.PostgrestClient=M4.default;const O4=Rd(cg);Tr.PostgrestQueryBuilder=O4.default;const D4=Rd(Hm);Tr.PostgrestFilterBuilder=D4.default;const L4=Rd(dg);Tr.PostgrestTransformBuilder=L4.default;const F4=Rd(ug);Tr.PostgrestBuilder=F4.default;const $4=Rd(mg);Tr.PostgrestError=$4.default;var uU=Tr.default={PostgrestClient:M4.default,PostgrestQueryBuilder:O4.default,PostgrestFilterBuilder:D4.default,PostgrestTransformBuilder:L4.default,PostgrestBuilder:F4.default,PostgrestError:$4.default};const{PostgrestClient:mU,PostgrestQueryBuilder:ote,PostgrestFilterBuilder:lte,PostgrestTransformBuilder:cte,PostgrestBuilder:dte,PostgrestError:ute}=uU;class hU{static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"&&process.versions&&process.versions.node){const r=parseInt(process.versions.node.split(".")[0]);return r>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${r} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${r} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 615import ws from "ws" 616new RealtimeClient(url, { transport: ws })`}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 617 618Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const fU="2.15.1",pU=`realtime-js/${fU}`,gU="1.0.0",By=1e4,xU=1e3,vU=100;var Mu;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Mu||(Mu={}));var ks;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(ks||(ks={}));var qn;(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"}
618)(qn||(qn={}));var zy;(function(e){e.websocket="websocket"})(zy||(zy={}));var tl;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(tl||(tl={}));class yU{constructor(){this.HEADER_LENGTH=1}decode(t,r){return t.constructor===ArrayBuffer?r(this._binaryDecode(t)):r(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const r=new DataView(t),n=new TextDecoder;return this._decodeBroadcast(t,r,n)}_decodeBroadcast(t,r,n){const a=r.getUint8(1),i=r.getUint8(2);let o=this.HEADER_LENGTH+2;const l=n.decode(t.slice(o,o+a));o=o+a;const c=n.decode(t.slice(o,o+i));o=o+i;const d=JSON.parse(n.decode(t.slice(o,t.byteLength)));return{ref:null,topic:l,event:c,payload:d}}}class U4{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var $t;(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"})($t||($t={}));const a1=(e,t,r={})=>{var n;const a=(n=r.skipTypes)!==null&&n!==void 0?n:[];return Object.keys(t).reduce((i,o)=>(i[o]=bU(o,e,t,a),i),{})},bU=(e,t,r,n)=>{const a=t.find(l=>
vendor: 7,210 bytes, line 618
618l.name===e),i=a==null?void 0:a.type,o=r[e];return i&&!n.includes(i)?B4(i,o):Wy(o)},B4=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return _U(t,r)}switch(e){case $t.bool:return wU(t);case $t.float4:case $t.float8:case $t.int2:case $t.int4:case $t.int8:case $t.numeric:case $t.oid:return jU(t);case $t.json:case $t.jsonb:return NU(t);case $t.timestamp:return kU(t);case $t.abstime:case $t.date:case $t.daterange:case $t.int4range:case $t.int8range:case $t.money:case $t.reltime:case $t.text:case $t.time:case $t.timestamptz:case $t.timetz:case $t.tsrange:case $t.tstzrange:return Wy(t);default:return Wy(t)}},Wy=e=>e,wU=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},jU=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},NU=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},_U=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let i;const o=e.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(l=>B4(t,l))}return e},kU=e=>typeof e=="string"?e.replace(" ","T"):e,z4=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")+"/api/broadcast"};class Ex{constructor(t,r,n={},a=By){this.channel=t,this.event=r,this.payload=n,this.timeout=a,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var i1;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(i1||(i1={}));class Ou{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},a=>{const{onJoin:i,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Ou.syncState(this.state,a,i,o),this.pendingDiffs.forEach(c=>{this.state=Ou.syncDiff(this.state,c,i,o)}),this.pendingDiffs=[],l()}),this.channel._on(n.diff,{},a=>{const{onJoin:i,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(a):(this.state=Ou.syncDiff(this.state,a,i,o),l())}),this.onJoin((a,i,o)=>{this.channel._trigger("presence",{event:"join",key:a,currentPresences:i,newPresences:o})}),this.onLeave((a,i,o)=>{this.channel._trigger("presence",{event:"leave",key:a,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,a){const i=this.cloneDeep(t),o=this.transformState(r),l={},c={};return this.map(i,(d,u)=>{o[d]||(c[d]=u)}),this.map(o,(d,u)=>{const m=i[d];if(m){const f=u.map(b=>b.presence_ref),p=m.map(b=>b.presence_ref),v=u.filter(b=>p.indexOf(b.presence_ref)<0),g=m.filter(b=>f.indexOf(b.presence_ref)<0);v.length>0&&(l[d]=v),g.length>0&&(c[d]=g)}else l[d]=u}),this.syncDiff(i,{joins:l,leaves:c},n,a)}static syncDiff(t,r,n,a){const{joins:i,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),a||(a=()=>{}),this.map(i,(l,c)=>{var d;const u=(d=t[l])!==null&&d!==void 0?d:[];if(t[l]=this.cloneDeep(c),u.length>0){const m=t[l].map(p=>p.presence_ref),f=u.filter(p=>m.indexOf(p.presence_ref)<0);t[l].unshift(...f)}n(l,u,c)}),this.map(o,(l,c)=>{let d=t[l];if(!d)return;const u=c.map(m=>m.presence_ref);d=d.filter(m=>u.indexOf(m.presence_ref)<0),t[l]=d,a(l,d,c),d.length===0&&delete t[l]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const a=t[n];return"metas"in a?r[n]=a.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):r[n]=a,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var o1;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(o1||(o1={}));var Du;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Du||(Du={}));var ei;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(ei||(ei={}));class uw{constructor(t,r={config:{}},n){this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=ks.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new Ex(this,qn.join,this.params,this.timeout),this.rejoinTimer=new U4(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=ks.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=ks.closed,this.socket._remove(this)}),this._onError(a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=ks.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=ks.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=ks.errored,this.rejoinTimer.scheduleTimeout())}),this._on(qn.reply,{},(a,i)=>{this._trigger(this._replyEventName(i),a)}
618),this.presence=new Ou(this),this.broadcastEndpointURL=z4(this.socket.endPoint),this.private=this.params.config.private||!1}subscribe(t,r=this.timeout){var n,a;if(this.socket.isConnected()||this.socket.connect(),this.state==ks.closed){const{config:{broadcast:i,presence:o,private:l}}=this.params,c=(a=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(f=>f.filter))!==null&&a!==void 0?a:[],d=!!this.bindings[Du.PRESENCE]&&this.bindings[Du.PRESENCE].length>0,u={},m={broadcast:i,presence:Object.assign(Object.assign({},o),{enabled:d}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(u.access_token=this.socket.accessTokenValue),this._onError(f=>t==null?void 0:t(ei.CHANNEL_ERROR,f)),this._onClose(()=>t==null?void 0:t(ei.CLOSED)),this.updateJoinPayload(Object.assign({config:m},u)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:f})=>{var p;if(this.socket.setAuth(),f===void 0){t==null||t(ei.SUBSCRIBED);return}else{const v=this.bindings.postgres_changes,g=(p=v==null?void 0:v.length)!==null&&p!==void 0?p:0,b=[];for(let y=0;y<g;y++){const x=v[y],{filter:{event:w,schema:j,table:N,filter:S}}=x,E=f&&f[y];if(E&&E.event===w&&E.schema===j&&E.table===N&&E.filter===S)b.push(Object.assign(Object.assign({},x),{id:E.id}));else{this.unsubscribe(),this.state=ks.errored,t==null||t(ei.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=b,t&&t(ei.SUBSCRIBED);return}}).receive("error",f=>{this.state=ks.errored,t==null||t(ei.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(ei.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===ks.joined&&t===Du.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(t,r,n)}async send(t,r={}){var n,a;if(!this._canPush()&&t.type==="broadcast"){const{event:i,payload:o}=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:i,payload:o,private:this.private}]})};try{const d=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((a=d.body)===null||a===void 0?void 0:a.cancel()),d.ok?"ok":"error"}catch(d){return d.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,l,c;const d=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&i("ok"),d.receive("ok",()=>i("ok")),d.receive("error",()=>i("error")),d.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=ks.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(qn.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(a=>{n=new Ex(this,qn.leave,{},t),n.receive("ok",()=>{r(),a("ok")}).receive("timeout",()=>{r(),a("timed out")}).receive("error",()=>{a("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ks.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const a=new AbortController,i=setTimeout(()=>a.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:a.signal}));return clearTimeout(i),o}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let a=new Ex(this,t,r,n);return this._canPush()?a.send():this._addToPushBuffer(a),a}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>vU){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var a,i;const o=t.toLocaleLowerCase(),{close:l,error:c,leave:d,join:u}=qn;if(n&&[l,c,d,u].indexOf(o)>=0&&n!==this._joinRef())return;let f=this._onMessage(o,r,n);if(r&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(a=this.bindings.postgres_changes)===null||a===void 0||a.filter(p=>{var v,g,b;return((v=p.filter)===null||v===void 0?void 0:v.event)==="*"||((b=(g=p.filter)===null||g===void 0?void 0:g.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===o}).map(p=>p.callback(f,n)):(i=this.bindings[o])===null||i===void 0||i.filter(p=>{var v,g,b,y,x,w;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in p){const j=p.id,N=(v=p.filter)===null||v===void 0?void 0:v.event;return j&&((g=r.ids)===null||g===void 0?void 0:g.includes(j))&&(N==="*"||(N==null?void 0:N.toLocaleLowerCase())===((b=r.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const j=(x=(y=p==null?void 0:p.filter)===null||y===void 0?void 0:y.event)===null||x===void 0?void 0:x.toLocaleLowerCase();return j==="*"||j===((w=r==null?void 0:r.event)===null||w===void 0?void 0:w.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===o}).map(p=>{if(typeof f=="object"&&"ids"in f){const v=f.data,{schema:g,table:b,commit_timestamp:y,type:x,errors:w}=v;f=Object.assign(Object.assign({},{schema:g,table:b,commit_timestamp:y,eventType:x,new:{},old:{},errors:w}),this._getPayloadRecords(v))}p.callback(f,n)})}_isClosed(){return this.state===ks.closed}_isJoined(){return this.state===ks.joined}_isJoining(){return this.state===ks.joining}
618_isLeaving(){return this.state===ks.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const a=t.toLocaleLowerCase(),i={type:a,filter:r,callback:n};return this.bindings[a]?this.bindings[a].push(i):this.bindings[a]=[i],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(a=>{var i;return!(((i=a.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===n&&uw.isEqual(a.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(qn.close,{},t)}_onError(t){this._on(qn.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=ks.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=a1(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=a1(t.columns,t.old_record)),r}}const l1=()=>{},Mh={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},SU=[1e3,2e3,5e3,1e4],CU=1e4,EU=` 619 addEventListener("message", (e) => { 620 if (e.data.event === "start") { 621 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 622 } 623 });`;class PU{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=By,this.transport=null,this.heartbeatIntervalMs=Mh.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=l1,this.ref=0,this.reconnectTimer=null,this.logger=l1,this.conn=null,this.sendBuffer=[],this.serializer=new yU,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=a=>{let i;return a?i=a:typeof fetch>"u"?i=(...o)=>ut(async()=>{const{default:l}=await Promise.resolve().then(()=>Id);return{default:l}},void 0).then(({default:l})=>l(...o)).catch(l=>{throw new Error(`Failed to load @supabase/node-fetch: ${l.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):i=fetch,(...o)=>i(...o)},!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${zy.websocket}`,this.httpEndpoint=z4(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=hU.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r} 624 625To use Realtime in Node.js, you need to provide a WebSocket implementation: 626 627Option 1: Use Node.js 22+ which has native WebSocket support 628Option 2: Install and provide the "ws" package: 629 630 npm install ws 631 632 import ws from "ws" 633 const client = new RealtimeClient(url, { 634 ...options, 635 transport: ws 636 })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:gU}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},t?this.conn.close(t,r??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Mu.connecting:return tl.Connecting;case Mu.open:return tl.Open;case Mu.closing:return tl.Closing;default:return tl.Closed}}isConnected(){return this.connectionState()===tl.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}
636channel(t,r={config:{}}){const n=`realtime:${t}`,a=this.getChannels().find(i=>i.topic===n);if(a)return a;{const i=new uw(`realtime:${t}`,r,this);return this.channels.push(i),i}}push(t){const{topic:r,event:n,payload:a,ref:i}=t,o=()=>{this.encode(t,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${r} ${n} (${i})`,a),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}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"),this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(xU,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout()},Mh.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatCallback("sent"),this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{r.topic==="phoenix"&&r.event==="phx_reply"&&this.heartbeatCallback(r.payload.status==="ok"?"ok":"error"),r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:a,payload:i,ref:o}=r,l=o?`(${o})`:"",c=i.status||"";this.log("receive",`${c} ${n} ${a} ${l}`.trim(),i),this.channels.filter(d=>d._isMember(n)).forEach(d=>d._trigger(a,i,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
636heduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(qn.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",a=new URLSearchParams(r);return`${t}${n}${a}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([EU],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r;t?r=t:this.accessToken?r=await this.accessToken():r=this.accessTokenValue,this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(n=>{const a={access_token:r,version:pU};r&&n.updateJoinPayload(a),n.joinedOnce&&n._isJoined()&&n._push(qn.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this.setAuth().catch(r=>{this.log("error",`error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(a){this.log("error",`error in ${t} callback`,a)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new U4(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Mh.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,a,i,o,l,c,d;if(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:By,this.heartbeatIntervalMs=(a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:Mh.HEARTBEAT_INTERVAL,this.worker=(i=t==null?void 0:t.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(l=t==null?void 0:t.reconnectAfterMs)!==null&&l!==void 0?l:u=>SU[u-1]||CU,this.encode=(c=t==null?void 0:t.encode)!==null&&c!==void 0?c:(u,m)=>m(JSON.stringify(u)),this.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}class mw extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function Cs(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class TU extends mw{constructor(t,r,n){super(t),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Vy extends mw{constructor(t,r){super(t),this.name="StorageUnknownError",this.originalError=r}}var AU=function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function l(u){try{d(n.next(u))}catch(m){o(m)}}function c(u){try{d(n.throw(u))}catch(m){o(m)}}function d(u){u.done?i(u.value):a(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})};const W4=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...r)=>ut(async()=>{const{default:n}=await Promise.resolve().then(()=>Id);return{default:n}},void 0).then(({default:n})=>n(...r)):t=fetch,(...r)=>t(...r)},IU=()=>AU(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield ut(()=>Promise.resolve().then(()=>Id),void 0)).Response:Response}),Hy=e=>{if(Array.isArray(e))return e.map(r=>Hy(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const a=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[a]=Hy(n)}),t},RU=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);
636return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var Bl=function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function l(u){try{d(n.next(u))}catch(m){o(m)}}function c(u){try{d(n.throw(u))}catch(m){o(m)}}function d(u){u.done?i(u.value):a(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})};const Px=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),MU=(e,t,r)=>Bl(void 0,void 0,void 0,function*(){const n=yield IU();e instanceof n&&!(r!=null&&r.noResolveJson)?e.json().then(a=>{const i=e.status||500,o=(a==null?void 0:a.statusCode)||i+"";t(new TU(Px(a),i,o))}).catch(a=>{t(new Vy(Px(a),a))}):t(new Vy(Px(e),e))}),OU=(e,t,r,n)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?a:(RU(n)?(a.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),a.body=JSON.stringify(n)):a.body=n,t!=null&&t.duplex&&(a.duplex=t.duplex),Object.assign(Object.assign({},a),r))};function qm(e,t,r,n,a,i){return Bl(this,void 0,void 0,function*(){return new Promise((o,l)=>{e(r,OU(t,n,a,i)).then(c=>{if(!c.ok)throw c;return n!=null&&n.noResolveJson?c:c.json()}).then(c=>o(c)).catch(c=>MU(c,l,n))})})}function rp(e,t,r,n){return Bl(this,void 0,void 0,function*(){return qm(e,"GET",t,r,n)})}function fa(e,t,r,n,a){return Bl(this,void 0,void 0,function*(){return qm(e,"POST",t,n,a,r)})}function qy(e,t,r,n,a){return Bl(this,void 0,void 0,function*(){return qm(e,"PUT",t,n,a,r)})}function DU(e,t,r,n){return Bl(this,void 0,void 0,function*(){return qm(e,"HEAD",t,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function V4(e,t,r,n,a){return Bl(this,void 0,void 0,function*(){return qm(e,"DELETE",t,n,a,r)})}var or=function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function l(u){try{d(n.next(u))}catch(m){o(m)}}function c(u){try{d(n.throw(u))}catch(m){o(m)}}function d(u){u.done?i(u.value):a(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})};const LU={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},c1={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class FU{constructor(t,r={},n,a){this.url=t,this.headers=r,this.bucketId=n,this.fetch=W4(a)}uploadOrUpdate(t,r,n,a){return or(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},c1),a);let l=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),c&&i.append("metadata",this.encodeMetadata(c)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.append("cacheControl",o.cacheControl),c&&i.append("metadata",this.encodeMetadata(c))):(i=n,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType,c&&(l["x-metadata"]=this.toBase64(this.encodeMetadata(c)))),a!=null&&a.headers&&(l=Object.assign(Object.assign({},l),a.headers));const d=this._removeEmptyFolders(r),u=this._getFinalPath(d),m=yield(t=="PUT"?qy:fa)(this.fetch,`${this.url}/object/${u}`,i,Object.assign({headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:d,id:m.Id,fullPath:m.Key},error:null}}catch(i){if(Cs(i))return{data:null,error:i};throw i}})}upload(t,r,n){return or(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,r,n)})}uploadToSignedUrl(t,r,n,a){return or(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(t),o=this._getFinalPath(i),l=new URL(this.url+`/object/upload/sign/${o}`);l.searchParams.set("token",r);try{let c;const d=Object.assign({upsert:c1.upsert},a),u=Object.assign(Object.assign({},this.headers),{"x-upsert":String(d.upsert)});typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",d.cacheControl),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.append("cacheControl",d.cacheControl)):(c=n,u["cache-control"]=`max-age=${d.cacheControl}`,u["content-type"]=d.contentType);const m=yield qy(this.fetch,l.toString(),c,{headers:u});return{data:{path:i,fullPath:m.Key},error:null}}catch(c){if(Cs(c))return{data:null,error:c};throw c}})}createSignedUploadUrl(t,r){return or(this,void 0,void 0,function*(){try{let n=this._getFinalPath(t);const a=Object.assign({},this.headers);r!=null&&r.upsert&&(a["x-upsert"]="true");const i=yield fa(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:a}),o=new URL(this.url+i.url),l=o.searchParams.get("token");if(!l)throw new mw("No token returned by API");return{data:{signedUrl:o.toString(),path:t,token:l},error:null}}catch(n){if(Cs(n))return{data:null,error:n};throw n}})}update(t,r,n){return or(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,r,n)})}move(t,r,n){return or(this,void 0,void 0,function*(){try{return{data:yield fa(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(a){if(Cs(a))return{data:null,error:a};throw a}})}copy(t,r,n){return or(this,void 0,void 0,function*(){try{return{data:{path:(yield fa(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(a){if(Cs(a))return{data:null,error:a};throw a}})}createSignedUrl(t,r,n){return or(this,void 0,void 0,function*(){try{let a=this._getFinalPath(t),i=yield fa(this.fetch,`${this.url}/object/sign/${a}
636`,Object.assign({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:this.headers});const o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(a){if(Cs(a))return{data:null,error:a};throw a}})}createSignedUrls(t,r,n){return or(this,void 0,void 0,function*(){try{const a=yield fa(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:t},{headers:this.headers}),i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:a.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${i}`):null})),error:null}}catch(a){if(Cs(a))return{data:null,error:a};throw a}})}download(t,r){return or(this,void 0,void 0,function*(){const a=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),o=i?`?${i}`:"";try{const l=this._getFinalPath(t);return{data:yield(yield rp(this.fetch,`${this.url}/${a}/${l}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(l){if(Cs(l))return{data:null,error:l};throw l}})}info(t){return or(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{const n=yield rp(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:Hy(n),error:null}}catch(n){if(Cs(n))return{data:null,error:n};throw n}})}exists(t){return or(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{return yield DU(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(Cs(n)&&n instanceof Vy){const a=n.originalError;if([400,404].includes(a==null?void 0:a.status))return{data:!1,error:n}}throw n}})}getPublicUrl(t,r){const n=this._getFinalPath(t),a=[],i=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";i!==""&&a.push(i);const l=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",c=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});c!==""&&a.push(c);let d=a.join("&");return d!==""&&(d=`?${d}`),{data:{publicUrl:encodeURI(`${this.url}/${l}/public/${n}${d}`)}}}remove(t){return or(this,void 0,void 0,function*(){try{return{data:yield V4(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(r){if(Cs(r))return{data:null,error:r};throw r}})}list(t,r,n){return or(this,void 0,void 0,function*(){try{const a=Object.assign(Object.assign(Object.assign({},LU),r),{prefix:t||""});return{data:yield fa(this.fetch,`${this.url}/object/list/${this.bucketId}`,a,{headers:this.headers},n),error:null}}catch(a){if(Cs(a))return{data:null,error:a};throw a}})}listV2(t,r){return or(this,void 0,void 0,function*(){try{const n=Object.assign({},t);return{data:yield fa(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(Cs(n))return{data:null,error:n};throw n}})}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.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const r=[];return t.width&&r.push(`width=${t.width}`),t.height&&r.push(`height=${t.height}`),t.resize&&r.push(`resize=${t.resize}`),t.format&&r.push(`format=${t.format}`),t.quality&&r.push(`quality=${t.quality}`),r.join("&")}}const $U="2.11.0",UU={"X-Client-Info":`storage-js/${$U}`};var Jl=function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function l(u){try{d(n.next(u))}catch(m){o(m)}}function c(u){try{d(n.throw(u))}catch(m){o(m)}}function d(u){u.done?i(u.value):a(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})};class BU{constructor(t,r={},n,a){const i=new URL(t);a!=null&&a.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),this.url=i.href,this.headers=Object.assign(Object.assign({},UU),r),this.fetch=W4(n)}listBuckets(){return Jl(this,void 0,void 0,function*(){try{return{data:yield rp(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(Cs(t))return{data:null,error:t};throw t}})}getBucket(t){return Jl(this,void 0,void 0,function*(){try{return{data:yield rp(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(r){if(Cs(r))return{data:null,error:r};throw r}})}createBucket(t,r={public:!1}){return Jl(this,void 0,void 0,function*(){try{return{data:yield fa(this.fetch,`${this.url}/bucket`,{id:t,name:t,type:r.type,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(Cs(n))return{data:null,error:n};throw n}})}updateBucket(t,r){return Jl(this,void 0,void 0,function*(){try{return{data:yield qy(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(Cs(n))return{data:null,error:n};throw n}})}emptyBucket(t){return Jl(this,void 0,void 0,function*(){try{return{data:yield fa(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(Cs(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Jl(this,void 0,void 0,function*(){try{return{data:yield V4(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(r){if(Cs(r))return{data:null,error:r};throw r}})}}class zU extends BU{constructor(t,r={},n,a){super(t,r,n,a)}from(t){return new FU(this.url,this.headers,t,this.fetch)}}const WU="2.56.0";let pu="";typeof Deno<"u"?pu="deno":typeof document<"u"?pu="web":typeof navigator<"u"&&navigator.product==="ReactNative"?pu="react-native":pu="node";const VU={"X-Client-Info":`supabase-js-${pu}/${WU}`},HU={headers:VU},qU={schema:"public"},GU={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},YU={};var KU=function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function l(u){try{d(n.next(u))}catch(m){o(m)}}function c(u){try{d(n.throw(u))}catch(m){o(m)}}function d(u){u.done?i(u.value):a(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})};const QU=e=>{let t;return e?t=e:typeof fetch>"u"?t=P4:t=fetch,(...r)=>t(...r)},XU=()=>typeof Headers>"u"?T4:Headers,JU=(e,t,r)=>{const n=QU(r),a=XU();return(i,o)=>KU(void 0,void 0,void 0,function*(){var l;const c=(l=yield t())!==null&&l!==void 0?l:e;let d=new a(o==null?void 0:o.headers);return d.has("apikey")||d.set("apikey",e),d.has("Authorization")||d.set("Authorization",`Bearer ${c}`),n(i,Object.assign(Object.assign({},o),{headers:d}))})};var ZU=function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function l(u){try{d(n.next(u))}catch(m){o(m)}}function c(u){try{d(n.throw(u))}catch(m){o(m)}}function d(u){u.done?i(u.value):a(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})};function eB(e){return e.endsWith("/")?e:e+"/"}function tB(e,t){var r,n;const{db:a,auth:i,realtime:o,global:l}=e,{db:c,auth:d,realtime:u,global:m}=t,f={db:Object.assign(Object.assign({},c),a),auth:Object.assign(Object.assign({},d),i),realtime:Object.assign(Object.assign({},u),o),storage:{},global:Object.assign(Object.assign(Object.assign({},m),l),{headers:Object.assign(Object.assign({},(r=m==null?void 0:m.headers)!==null&&r!==void 0?r:{}),(n=l==null?void 0:l.headers)!==null&&n!==void 0?n:{})}),accessToken:()=>ZU(this,void 0,void 0,function*(){return""})};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}
636const H4="2.71.1",dc=30*1e3,Gy=3,Tx=Gy*dc,sB="http://localhost:9999",rB="supabase.auth.token",nB={"X-Client-Info":`gotrue-js/${H4}`},Yy="X-Supabase-Api-Version",q4={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},aB=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,iB=10*60*1e3;class hw extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function ot(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class oB extends hw{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function lB(e){return ot(e)&&e.name==="AuthApiError"}class G4 extends hw{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Lo extends hw{constructor(t,r,n,a){super(t,n,a),this.name=r,this.status=n}}class Di extends Lo{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function cB(e){return ot(e)&&e.name==="AuthSessionMissingError"}class Oh extends Lo{constructor(){super("Auth session or user missing","AuthInvalidToken
636ResponseError",500,void 0)}}class Dh extends Lo{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Lh extends Lo{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function dB(e){return ot(e)&&e.name==="AuthImplicitGrantRedirectError"}class d1 extends Lo{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Ky extends Lo{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Ax(e){return ot(e)&&e.name==="AuthRetryableFetchError"}class u1 extends Lo{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Qy extends Lo{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const np="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),m1=` 637\r=`.split(""),uB=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<m1.length;t+=1)e[m1[t].charCodeAt(0)]=-2;for(let t=0;t<np.length;t+=1)e[np[t].charCodeAt(0)]=t;return e})();function h1(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(np[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(np[n]),t.queuedBits-=6}}function Y4(e,t,r){const n=uB[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function f1(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},a={queue:0,queuedBits:0},i=o=>{fB(o,n,r)};for(let o=0;o<e.length;o+=1)Y4(e.charCodeAt(o),a,i);return t.join("")}function mB(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 hB(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const a=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|a)+65536,r+=1}mB(n,t)}}function fB(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function pB(e){const t=[],r={queue:0,queuedBits:0},n=a=>{t.push(a)};for(let a=0;a<e.length;a+=1)Y4(e.charCodeAt(a),r,n);return new Uint8Array(t)}function gB(e){const t=[];return hB(e,r=>t.push(r)),new Uint8Array(t)}function xB(e){const t=[],r={queue:0,queuedBits:0},n=a=>{t.push(a)};return e.forEach(a=>h1(a,r,n)),h1(null,r,n),t.join("")}function vB(e){return Math.round(Date.now()/1e3)+e}function yB(){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 $n=()=>typeof window<"u"&&typeof document<"u",Vo={tested:!1,writable:!1},K4=()=>{if(!$n())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Vo.tested)return Vo.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Vo.tested=!0,Vo.writable=!0}catch{Vo.tested=!0,Vo.writable=!1}return Vo.writable};function bB(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((a,i)=>{t[i]=a})}catch{}return r.searchParams.forEach((n,a)=>{t[a]=n}),t}const Q4=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...r)=>ut(async()=>{const{default:n}=await Promise.resolve().then(()=>Id);return{default:n}},void 0).then(({default:n})=>n(...r)):t=fetch,(...r)=>t(...r)},wB=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",uc=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Ho=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Ii=async(e,t)=>{await e.removeItem(t)};class hg{constructor(){this.promise=new hg.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}hg.promiseConstructor=Promise;function Ix(e){const t=e.split(".");if(t.length!==3)throw new Qy("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!aB.test(t[n]))throw new Qy("JWT not in base64url format");return{header:JSON.parse(f1(t[0])),payload:JSON.parse(f1(t[1])),signature:pB(t[2]),raw:{header:t[0],payload:t[1]}}}async function jB(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function NB(e,t){return new Promise((n,a)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){n(o);return}}catch(o){if(!t(i,o)){a(o);return}}})()})}function _B(e){return("0"+e.toString(16)).substr(-2)}function kB(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let a="";for(let i=0;i<56;i++)a+=r.charAt(Math.floor(Math.random()*n));return a}return crypto.getRandomValues(t),Array.from(t,_B).join("")}async function SB(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),a=new Uint8Array(n);return Array.from(a).map(i=>String.fromCharCode(i)).join("")}async function CB(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code
637challenge method will default to use plain instead of sha256."),e;const r=await SB(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Zl(e,t,r=!1){const n=kB();let a=n;r&&(a+="/PASSWORD_RECOVERY"),await uc(e,`${t}-code-verifier`,a);const i=await CB(n);return[i,n===i?"plain":"s256"]}const EB=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function PB(e){const t=e.headers.get(Yy);if(!t||!t.match(EB))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function TB(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 AB(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 IB=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ec(e){if(!IB.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Rx(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function p1(e){return JSON.parse(JSON.stringify(e))}var RB=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const Xo=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),MB=[502,503,504];async function g1(e){var t;if(!wB(e))throw new Ky(Xo(e),0);if(MB.includes(e.status))throw new Ky(Xo(e),e.status);let r;try{r=await e.json()}catch(i){throw new G4(Xo(i),i)}let n;const a=PB(e);if(a&&a.getTime()>=q4["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new u1(Xo(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Di}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new u1(Xo(r),e.status,r.weak_password.reasons);throw new oB(Xo(r),e.status||500,n)}const OB=(e,t,r,n)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?a:(a.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),a.body=JSON.stringify(n),Object.assign(Object.assign({},a),r))};async function pt(e,t,r,n){var a;const i=Object.assign({},n==null?void 0:n.headers);i[Yy]||(i[Yy]=q4["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(a=n==null?void 0:n.query)!==null&&a!==void 0?a:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await DB(e,t,r+l,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function DB(e,t,r,n,a,i){const o=OB(t,n,a,i);let l;try{l=await e(r,Object.assign({},o))}catch(c){throw console.error(c),new Ky(Xo(c),0)}if(l.ok||await g1(l),n!=null&&n.noResolveJson)return l;try{return await l.json()}catch(c){await g1(c)}}function Qa(e){var t;let r=null;UB(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=vB(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function x1(e){const t=Qa(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Wi(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function LB(e){return{data:e,error:null}}function FB(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:a,verification_type:i}=e,o=RB(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:r,hashed_token:n,redirect_to:a,verification_type:i},c=Object.assign({},o);return{data:{properties:l,user:c},error:null}}function $B(e){return e}function UB(e){return e.access_token&&e.refresh_token&&e.expires_in}const Mx=["global","local","others"];var BB=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};class zB{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=Q4(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}
637async signOut(t,r=Mx[0]){if(Mx.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Mx.join(", ")}`);try{return await pt(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ot(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await pt(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Wi})}catch(n){if(ot(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=BB(t,["options"]),a=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(a.new_email=n==null?void 0:n.newEmail,delete a.newEmail),await pt(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:a,headers:this.headers,xform:FB,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(ot(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await pt(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Wi})}catch(r){if(ot(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,a,i,o,l,c;try{const d={nextPage:null,lastPage:0,total:0},u=await pt(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(a=t==null?void 0:t.perPage)===null||a===void 0?void 0:a.toString())!==null&&i!==void 0?i:""},xform:$B});if(u.error)throw u.error;const m=await u.json(),f=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(c=(l=u.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(v=>{const g=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(v.split(";")[1].split("=")[1]);d[`${b}Page`]=g}),d.total=parseInt(f)),{data:Object.assign(Object.assign({},m),d),error:null}}catch(d){if(ot(d))return{data:{users:[]},error:d};throw d}}async getUserById(t){ec(t);try{return await pt(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Wi})}catch(r){if(ot(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){ec(t);try{return await pt(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Wi})}catch(n){if(ot(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){ec(t);try{return await pt(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Wi})}catch(n){if(ot(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){ec(t.userId);try{const{data:r,error:n}=await pt(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:a=>({data:{factors:a},error:null})});return{data:r,error:n}}catch(r){if(ot(r))return{data:null,error:r};throw r}}async _deleteFactor(t){ec(t.userId),ec(t.id);try{return{data:await pt(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(ot(r))return{data:null,error:r};throw r}}}function v1(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}function WB(){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 tc={debug:!!(globalThis&&K4()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class X4 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class VB extends X4{}async function HB(e,t,r){tc.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),tc.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async a=>{if(a){tc.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,a.name);try{return await r()}finally{tc.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,a.name)}}else{if(t===0)throw tc.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new VB(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(tc.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}WB();const qB={url:sB,storageKey:rB,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:nB,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function y1(e,t,r){return await r()}const sc={};class pm{constructor(t){var r,n;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=pm.nextInstanceID,pm.nextInstanceID+=1,this.instanceID>0&&$n()&&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 a=Object.assign(Object.assign({},qB),t);
637if(this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.persistSession=a.persistSession,this.storageKey=a.storageKey,this.autoRefreshToken=a.autoRefreshToken,this.admin=new zB({url:a.url,headers:a.headers,fetch:a.fetch}),this.url=a.url,this.headers=a.headers,this.fetch=Q4(a.fetch),this.lock=a.lock||y1,this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,a.lock?this.lock=a.lock:$n()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=HB:this.lock=y1,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?(a.storage?this.storage=a.storage:K4()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=v1(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=v1(this.memoryStorage)),$n()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(n=this.broadcastChannel)===null||n===void 0||n.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}get jwks(){var t,r;return(r=(t=sc[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){sc[this.storageKey]=Object.assign(Object.assign({},sc[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=sc[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){sc[this.storageKey]=Object.assign(Object.assign({},sc[this.storageKey]),{cachedAt:t})}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${H4}) ${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 r=bB(window.location.href);let n="none";if(this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce"),$n()&&this.detectSessionInUrl&&n!=="none"){const{data:a,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),dB(i)){const c=(t=i.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:i}}return await this._removeSession(),{error:i}}const{session:o,redirectType:l}=a;return this._debug("#_initialize()","detected session in URL",o,"redirect type",l),await this._saveSession(o),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return ot(r)?{error:r}:{error:new G4("Unexpected error during initialization",r)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,a;try{const i=await pt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(a=t==null?void 0:t.options)===null||a===void 0?void 0:a.captchaToken}},xform:Qa}),{data:o,error:l}=i;if(l||!o)return{data:{user:null,session:null},error:l};const c=o.session,d=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),{data:{user:d,session:c},error:null}}catch(i){if(ot(i))return{data:{user:null,session:null},error:i};throw i}}async signUp(t){var r,n,a;try{let i;if("email"in t){const{email:u,password:m,options:f}=t;let p=null,v=null;this.flowType==="pkce"&&([p,v]=await Zl(this.storage,this.storageKey)),i=await pt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:u,password:m,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:p,code_challenge_method:v},xform:Qa})}else if("phone"in t){const{phone:u,password:m,options:f}=t;i=await pt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:m,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(a=f==null?void 0:f.channel)!==null&&a!==void 0?a:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Qa})}else throw new Dh("You must provide either an email or phone number and a password");const{data:o,error:l}=i;if(l||!o)return{data:{user:null,session:null},error:l};const c=o.session,d=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),{data:{user:d,session:c},error:null}}catch(i){if(ot(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:o,options:l}=t;r=await pt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:x1})}else if("phone"in t){const{phone:i,password:o,options:l}=t;r=await pt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:x1})}else throw new Dh("You must provide either an email or phone number and a password");const{data:n,error:a}=r;return a?{data:{user:null,session:null},error:a}:!n||!n.session||!n.user?{data:{user:null,session:null},error:new Oh}:(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:a})}catch(r){if(ot(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOAuth(t){var r,n,a,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(a=t.options)===null||a===void 0?void 0:a.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;if(r==="solana")return await this.signInWithSolana(t);throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}async signInWithSolana(t){var r,n,a,i,o,l,c,d,u,m,f,p;let v,g;if("message"in t)v=t.message,g=t.signature;else{const{chain:b,wallet:y,statement:x,options:w}=t;let j;if($n())if(typeof y=="object")j=y;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))j=S.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=y}const N=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in j&&j.signIn){const S=await j.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:N.host,uri:N.href}),x?{statement:x}:null));let E;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")E=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)E=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)v=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),g=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${N.host} wants you to sign in with your Solana account:`,j.publicKey.toBase58(),...x?["",x,""]:[""],"Version: 1",`URI: ${N.href}`,`Issued At: ${(a=(n=w==null?void 0:w.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&a!==void 0?a:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((d=w==null?void 0:w.signInWithSolana)===null||d===void 0)&&d.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((m=(u=w==null?void 0:w.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||m===void 0)&&m.length?["Resources",...w.sign
637InWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 638`);const S=await j.signMessage(new TextEncoder().encode(v),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=S}}try{const{data:b,error:y}=await pt(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:xB(g)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Qa});if(y)throw y;return!b||!b.session||!b.user?{data:{user:null,session:null},error:new Oh}:(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),{data:Object.assign({},b),error:y})}catch(b){if(ot(b))return{data:{user:null,session:null},error:b};throw b}}async _exchangeCodeForSession(t){const r=await Ho(this.storage,`${this.storageKey}-code-verifier`),[n,a]=(r??"").split("/");try{const{data:i,error:o}=await pt(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Qa});if(await Ii(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!i||!i.session||!i.user?{data:{user:null,session:null,redirectType:null},error:new Oh}:(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:a??null}),error:o})}catch(i){if(ot(i))return{data:{user:null,session:null,redirectType:null},error:i};throw i}}async signInWithIdToken(t){try{const{options:r,provider:n,token:a,access_token:i,nonce:o}=t,l=await pt(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:a,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Qa}),{data:c,error:d}=l;return d?{data:{user:null,session:null},error:d}:!c||!c.session||!c.user?{data:{user:null,session:null},error:new Oh}:(c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),{data:c,error:d})}catch(r){if(ot(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOtp(t){var r,n,a,i,o;try{if("email"in t){const{email:l,options:c}=t;let d=null,u=null;this.flowType==="pkce"&&([d,u]=await Zl(this.storage,this.storageKey));const{error:m}=await pt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:d,code_challenge_method:u},redirectTo:c==null?void 0:c.emailRedirectTo});return{data:{user:null,session:null},error:m}}if("phone"in t){const{phone:l,options:c}=t,{data:d,error:u}=await pt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(a=c==null?void 0:c.data)!==null&&a!==void 0?a:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:d==null?void 0:d.message_id},error:u}}throw new Dh("You must provide either an email or phone number.")}catch(l){if(ot(l))return{data:{user:null,session:null},error:l};throw l}}async verifyOtp(t){var r,n;try{let a,i;"options"in t&&(a=(r=t.options)===null||r===void 0?void 0:r.redirectTo,i=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:l}=await pt(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:a,xform:Qa});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,d=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),{data:{user:d,session:c},error:null}}catch(a){if(ot(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithSSO(t){var r,n,a;try{let i=null,o=null;return this.flowType==="pkce"&&([i,o]=await Zl(this.storage,this.storageKey)),await pt(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((a=t==null?void 0:t.options)===null||a===void 0)&&a.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:LB})}catch(i){if(ot(i))return{data:null,error:i};throw i}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Di;const{error:a}=await pt(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return{data:{user:null,session:null},error:a}})}catch(t){if(ot(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:a,options:i}=t,{error:o}=await pt(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:a,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in t){const{phone:n,type:a,options:i}=t,{data:o,error:l}=await pt(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:a,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:l}}throw new Dh("You must provide either an email or phone number and a type")}catch(r){if(ot(r))return{data:{user:null,session:null},error:r};throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),a=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await a}catch{}})()),a}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const a=[...this.pendingInLock];await Promise.all(a),this.pendingInLock.splice(0,a.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Ho(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
638id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Tx:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await Ho(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Rx()}if(this.storage.isServer&&t.user){let o=this.suppressGetSessionWarning;t=new Proxy(t,{get:(c,d,u)=>(!o&&d==="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."),o=!0,this.suppressGetSessionWarning=!0),Reflect.get(c,d,u))})}return{data:{session:t},error:null}}const{session:a,error:i}=await this._callRefreshToken(t.refresh_token);return i?{data:{session:null},error:i}:{data:{session:a},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 pt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Wi}):await this._useSession(async r=>{var n,a,i;const{data:o,error:l}=r;if(l)throw l;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Di}:await pt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(a=o.session)===null||a===void 0?void 0:a.access_token)!==null&&i!==void 0?i:void 0,xform:Wi})})}catch(r){if(ot(r))return cB(r)&&(await this._removeSession(),await Ii(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:r};throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:a,error:i}=n;if(i)throw i;if(!a.session)throw new Di;const o=a.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await Zl(this.storage,this.storageKey));const{data:d,error:u}=await pt(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:o.access_token,xform:Wi});if(u)throw u;return o.user=d.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(n){if(ot(n))return{data:{user:null},error:n};throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Di;const r=Date.now()/1e3;let n=r,a=!0,i=null;const{payload:o}=Ix(t.access_token);if(o.exp&&(n=o.exp,a=n<=r),a){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};i=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)throw c;i={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(r){if(ot(r))return{data:{session:null,user:null},error:r};throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:l}=r;if(l)throw l;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Di;const{session:a,error:i}=await this._callRefreshToken(t.refresh_token);return i?{data:{user:null,session:null},error:i}:a?{data:{user:a.user,session:a},error:null}:{data:{user:null,session:null},error:null}})}catch(r){if(ot(r))return{data:{user:null,session:null},error:r};throw r}}async _getSessionFromURL(t,r){try{if(!$n())throw new Lh("No browser detected.");
638if(t.error||t.error_description||t.error_code)throw new Lh(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new d1("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Lh("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new d1("No code detected.");const{data:x,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const j=new URL(window.location.href);return j.searchParams.delete("code"),window.history.replaceState(window.history.state,"",j.toString()),{data:{session:x.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:a,access_token:i,refresh_token:o,expires_in:l,expires_at:c,token_type:d}=t;if(!i||!l||!o||!d)throw new Lh("No session defined in URL");const u=Math.round(Date.now()/1e3),m=parseInt(l);let f=u+m;c&&(f=parseInt(c));const p=f-u;p*1e3<=dc&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${m}s`);const v=f-m;u-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,f,u):u-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,f,u);const{data:g,error:b}=await this._getUser(i);if(b)throw b;const y={provider_token:n,provider_refresh_token:a,access_token:i,expires_in:m,expires_at:f,refresh_token:o,token_type:d,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:y,redirectType:t.type},error:null}}catch(n){if(ot(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await Ho(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:a,error:i}=r;if(i)return{error:i};const o=(n=a.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:l}=await this.admin.signOut(o,t);if(l&&!(lB(l)&&(l.status===404||l.status===401||l.status===403)))return{error:l}}return t!=="others"&&(await this._removeSession(),await Ii(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const r=yB(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,a;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,a=null;this.flowType==="pkce"&&([n,a]=await Zl(this.storage,this.storageKey,!0));try{return await pt(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:a,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(ot(i))return{data:null,error:i};throw i}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return{data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(r){if(ot(r))return{data:null,error:r};throw r}}async linkIdentity(t){var r;try{const{data:n,error:a}=await this._useSession(async i=>{var o,l,c,d,u;const{data:m,error:f}=i;if(f)throw f;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.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 pt(this.fetch,"GET",p,{headers:this.headers,jwt:(u=(d=m.session)===null||d===void 0?void 0:d.access_token)!==null&&u!==void 0?u:void 0})});if(a)throw a;return $n()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),{data:{provider:t.provider,url:n==null?void 0:n.url},error:null}}catch(n){if(ot(n))return{data:{provider:t.provider,url:null},error:n};throw n}}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,a;const{data:i,error:o}=r;if(o)throw o;
638return await pt(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(a=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&a!==void 0?a:void 0})})}catch(r){if(ot(r))return{data:null,error:r};throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await NB(async a=>(a>0&&await jB(200*Math.pow(2,a-1)),this._debug(r,"refreshing attempt",a),await pt(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Qa})),(a,i)=>{const o=200*Math.pow(2,a);return i&&Ax(i)&&Date.now()+o-n<dc})}catch(n){if(this._debug(r,"error",n),ot(n))return{data:{session:null,user:null},error:n};throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),$n()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const a=await Ho(this.storage,this.storageKey);if(a&&this.userStorage){let o=await Ho(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:a.user},await uc(this.userStorage,this.storageKey+"-user",o)),a.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Rx()}else if(a&&!a.user&&!a.user){const o=await Ho(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(a.user=o.user,await Ii(this.storage,this.storageKey+"-user"),await uc(this.storage,this.storageKey,a)):a.user=Rx()}if(this._debug(n,"session from storage",a),!this._isValidSession(a)){this._debug(n,"session is not valid"),a!==null&&await this._removeSession();return}const i=((r=a.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Tx;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Tx}s`),i){if(this.autoRefreshToken&&a.refresh_token){const{error:o}=await this._callRefreshToken(a.refresh_token);o&&(console.error(o),Ax(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(a.user&&a.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:l}=await this._getUser(a.access_token);!l&&(o!=null&&o.user)?(a.user=o.user,await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",a)}catch(a){this._debug(n,"error",a),console.error(a);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Di;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const a=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(a,"begin");try{this.refreshingDeferred=new hg;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new Di;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const l={session:i.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(i){if(this._debug(a,"error",i),ot(i)){const o={session:null,error:i};return Ax(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(a,"end")}}async _notifyAllSubscribers(t,r,n=!0){const a=`#_notifyAllSubscribers(${t})`;this._debug(a,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,r)}catch(c){i.push(c)}});if(await Promise.all(o),i.length>0){for(let l=0;l<i.length;l+=1)console.error(i[l]);throw i[0]}}finally{this._debug(a,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await uc(this.userStorage,this.storageKey+"-user",{user:r.user});const a=Object.assign({},r);delete a.user;const i=p1(a);await uc(this.storage,this.storageKey,i)}else{const a=p1(r);await uc(this.storage,this.storageKey,a)}}async _removeSession(){this._debug("#_removeSession()"),await Ii(this.storage,this.storageKey),await Ii(this.storage,this.storageKey+"-code-verifier"),await Ii(this.storage,this.storageKey+"-user"),this.userStorage&&await Ii(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&$n()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
638catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),dc);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const a=Math.floor((n.expires_at*1e3-t)/dc);this._debug("#_autoRefreshTokenTick()",`access token expires in ${a} ticks, a tick lasts ${dc}ms, refresh threshold is ${Gy} ticks`),a<=Gy&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof X4)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!$n()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const a=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&a.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&a.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await Zl(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});a.push(l.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);a.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&a.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${a.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:a,error:i}=r;return i?{data:null,error:i}:await pt(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(ot(r))return{data:null,error:r};throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,a;const{data:i,error:o}=r;if(o)return{data:null,error:o};const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:{issuer:t.issuer}),{data:c,error:d}=await pt(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return d?{data:null,error:d}:(t.factorType==="totp"&&(!((a=c==null?void 0:c.totp)===null||a===void 0)&&a.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),{data:c,error:null})})}catch(r){if(ot(r))return{data:null,error:r};throw r}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:a,error:i}=r;if(i)return{data:null,error:i};const{data:o,error:l}=await pt(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return l?{data:null,error:l}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:l})})}catch(r){if(ot(r))return{data:null,error:r};throw r}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:a,error:i}=r;return i?{data:null,error:i}:await pt(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:{channel:t.channel},headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(ot(r))return{data:null,error:r};throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?{data:null,error:n}:await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){const{data:{user:t},error:r}=await this.getUser();if(r)return{data:null,error:r};const n=(t==null?void 0:t.factors)||[],a=n.filter(o=>o.factor_type==="totp"&&o.status==="verified"),i=n.filter(o=>o.factor_type==="phone"&&o.status==="verified");return{data:{all:n,totp:a,phone:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var r,n;const{data:{session:a},error:i}=t;if(i)return{data:null,error:i};if(!a)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=Ix(a.access_token);let l=null;o.aal&&(l=o.aal);let c=l;((n=(r=a.user.factors)===null||r===void 0?void 0:r.filter(m=>m.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(c="aal2");const u=o.amr||[];return{data:{currentLevel:l,nextLevel:c,currentAuthenticationMethods:u},error:null}}))}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(l=>l.kid===t);if(n)return n;const a=Date.now();if(n=this.jwks.keys.find(l=>l.kid===t),n&&this.jwks_cached_at+iB>a)return n;const{data:i,error:o}=await pt(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=a,n=i.keys.find(l=>l.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:p,error:v}
638=await this.getSession();if(v||!p.session)return{data:null,error:v};n=p.session.access_token}const{header:a,payload:i,signature:o,raw:{header:l,payload:c}}=Ix(n);r!=null&&r.allowExpired||TB(i.exp);const d=!a.alg||a.alg.startsWith("HS")||!a.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(a.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!d){const{error:p}=await this.getUser(n);if(p)throw p;return{data:{claims:i,header:a,signature:o},error:null}}const u=AB(a.alg),m=await crypto.subtle.importKey("jwk",d,u,!0,["verify"]);if(!await crypto.subtle.verify(u,m,o,gB(`${l}.${c}`)))throw new Qy("Invalid JWT signature");return{data:{claims:i,header:a,signature:o},error:null}}catch(n){if(ot(n))return{data:null,error:n};throw n}}}pm.nextInstanceID=0;const GB=pm;class YB extends GB{constructor(t){super(t)}}var KB=function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function l(u){try{d(n.next(u))}catch(m){o(m)}}function c(u){try{d(n.throw(u))}catch(m){o(m)}}function d(u){u.done?i(u.value):a(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})};class QB{constructor(t,r,n){var a,i,o;if(this.supabaseUrl=t,this.supabaseKey=r,!t)throw new Error("supabaseUrl is required.");if(!r)throw new Error("supabaseKey is required.");const l=eB(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 d=`sb-${c.hostname.split(".")[0]}-auth-token`,u={db:qU,realtime:YU,auth:Object.assign(Object.assign({},GU),{storageKey:d}),global:HU},m=tB(n??{},u);this.storageKey=(a=m.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(i=m.global.headers)!==null&&i!==void 0?i:{},m.accessToken?(this.accessToken=m.accessToken,this.auth=new Proxy({},{get:(f,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=m.auth)!==null&&o!==void 0?o:{},this.headers,m.global.fetch),this.fetch=JU(r,this._getAccessToken.bind(this),m.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},m.realtime)),this.rest=new mU(new URL("rest/v1",c).href,{headers:this.headers,schema:m.db.schema,fetch:this.fetch}),this.storage=new zU(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),m.accessToken||this._listenForAuthEvents()}get functions(){return new V$(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,r={},n={}){return this.rest.rpc(t,r,n)}channel(t,r={config:{}}){return this.realtime.channel(t,r)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,r;return KB(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:n}=yield this.auth.getSession();return(r=(t=n.session)===null||t===void 0?void 0:t.access_token)!==null&&r!==void 0?r:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:a,storageKey:i,flowType:o,lock:l,debug:c},d,u){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new YB({url:this.authUrl.href,headers:Object.assign(Object.assign({},m),d),storageKey:i,autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:a,flowType:o,lock:l,debug:c,fetch:u,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(t){return new PU(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((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(t,r,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?this.changedAccessToken=n:t==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const XB=(e,t,r)=>new QB(e,t,r);function JB(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}JB()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
638ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const ZB="https://gcpjvgszviytdocnvyao.supabase.co",e9="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdjcGp2Z3N6dml5dGRvY252eWFvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTYwNDQzMjEsImV4cCI6MjA3MTYyMDMyMX0.wgwX9pwjvnc5p3J8GsYXFtE4lVO2iW2KPOmJvzk93cU",Fh=new Map,rc={getItem:e=>Fh.has(e)?Fh.get(e):null,setItem:(e,t)=>{Fh.set(e,t)},removeItem:e=>{Fh.delete(e)}},Ox=(()=>{try{const e="__sb_test__";localStorage.setItem(e,"1");const t=localStorage.getItem(e);return localStorage.removeItem(e),t==="1"}catch{return!1}})(),Dx=(()=>{try{const e="__sb_sess_test__";sessionStorage.setItem(e,"1");const t=sessionStorage.getItem(e);return sessionStorage.removeItem(e),t==="1"}catch{return!1}})(),t9={getItem:e=>{try{return(sessionStorage==null?void 0:sessionStorage.getItem("isImpersonationSession"))==="true"&&Dx?sessionStorage.getItem(e)||null:Ox?localStorage.getItem(e)||null:rc.getItem(e)}catch(t){return console.warn("Storage access failed:",t),rc.getItem(e)}},setItem:(e,t)=>{try{(sessionStorage==null?void 0:sessionStorage.getItem("isImpersonationSession"))==="true"&&Dx?sessionStorage.setItem(e,t):Ox?localStorage.setItem(e,t):rc.setItem(e,t)}catch(r){console.warn("Storage write failed:",r),rc.setItem(e,t)}},removeItem:e=>{try{(sessionStorage==null?void 0:sessionStorage.getItem("isImpersonationSession"))==="true"&&Dx?sessionStorage.removeItem(e):Ox?localStorage.removeItem(e):rc.removeItem(e)}catch(t){console.warn("Storage remove failed:",t),rc.removeItem(e)}}},s9=t9,U=XB(ZB,e9,{auth:{storage:s9,persistSession:!0,autoRefreshToken:!0}}),Ri=Object.freeze(Object.defineProperty({__proto__:null,supabase:U},Symbol.toStringTag,{value:"Module"})),Jo=(e,t)=>{e!=null&&e.code?console.error(`[${t}] Supabase error ${e.code}:`,{message:e.message,details:e.details,hint:e.hint,context:t}):console.error(`[${t}] Error:`,e)},$h=(e,t)=>{console.error(`[Auth ${t}] Error:`,{message:(e==null?void 0:e.message)||e,code:(e==null?void 0:e.status)||(e==null?void 0:e.code),action:t})},J4=h.createContext(void 0);async function b1(e){if(!e)return;const t=e.user_metadata||{};if(t.first_name&&t.last_name)return;const r=t.given_name||t.first_name,n=t.family_name||t.last_name,a=t.full_name||t.name;let i=r,o=n;if((!i||!o)&&a){const l=a.trim().split(/\s+/);i||(i=l[0]),!o&&l.length>1&&(o=l.slice(1).join(" "))}if(!(!i&&!o))try{await U.auth.updateUser({data:{...t,first_name:i||t.first_name||"",last_name:o||t.last_name||""}})}catch(l){console.warn("Failed to normalize OAuth user metadata:",l)}}function r9({children:e}){const[t,r]=h.useState(null),[n,a]=h.useState(null),[i,o]=h.useState(!0),l=qe(),c=h.useRef(!1),d=h.useRef(null),u=h.useRef(!1),m=h.useRef(new Set);h.useEffect(()=>{const{data:{subscription:N}}=U.auth.onAuthStateChange(async(S,E)=>{var R,T,k,C,A;const _=`${S}-${((R=E==null?void 0:E.user)==null?void 0:R.id)||"none"}-${((T=E==null?void 0:E.access_token)==null?void 0:T.slice(-10))||"none"}`;if(d.current===_){console.log("Skipping duplicate auth event:",S);return}if(d.current=_,console.log("Auth state change:",S,E?"User logged in":"User logged out"),a(E),r((E==null?void 0:E.user)??null),o(!1),S==="SIGNED_IN"&&(E!=null&&E.user)){const L=((k=E.user.app_metadata)==null?void 0:k.provider)||"email",O=`${E.user.id}-${L}-${Date.now().toString().slice(0,-4)}`;if(L!=="email"&&!m.current.has(O)){m.current.add(O),setTimeout(()=>m.current.delete(O),3e4);try{await U.functions.invoke("log-auth-activity",{body:{user_id:E.user.id,email:E.user.email,event_type:"login_success",metadata:{provider:L}}})}catch(P){console.error("Failed to log auth activity:",P)}}}if(S==="SIGNED_OUT"&&t)try{await U.functions.invoke("log-auth-activity",{body:{user_id:t.id,email:t.email,event_type:"logout_success"}})}catch(L){console.error("Failed to log logout activity:",L)}if(S==="SIGNED_OUT"&&!c.current)try{ad({title:"ÎÏοÏÏ
νδεθήκαÏε",description:"Î ÏÏ
νεδÏία ÏÎ±Ï Îληξε ή ÏÏ
νδεθήκαÏε αÏÏ Î¬Î»Î»Î¿ μÎÏοÏ. ΠαÏÎ±ÎºÎ±Î»Ï ÏÏ
νδεθείÏε ξανά.",variant:"default"})}catch{}S==="SIGNED_OUT"&&(c.current=!1,m.current.clear());const I=(A=(C=E==null?void 0:E.user)==null?void 0:C.app_metadata)==null?void 0:A.provider;if(S==="SIGNED_IN"&&(E!=null&&E.user)&&(I==="google"||I==="apple")){if(u.current){console.log("Skipping OAuth validation - already processing");return}const L=window.location.pathname,O=window.location.search.includes("oauth_flow=true");if(L==="/auth"||O)return;const P=`oauthValidated:${E.user.id}`;if((()=>{try{return localStorage.getItem(P)==="1"||sessionStorage.getItem("oauthValidated")==="1"}catch{return!1}})()){b1(E.user);return}u.current=!0,setTimeout(async()=>{try{await b1(E.user);const{data:D,error:$}=await U.functions.invoke("validate-oauth-user",{body:{email:(E.user.email||"").toLowerCase(),provider:I}});try{sessionStorage.setItem("oauthValidated","1"),localStorage.setItem(P,"1")}catch{}const W=!!$;if(!W&&D&&D.valid===!1&&D.user_exists===!1){console.warn("OAuth user not found in DB; redirecting to plans"),ad({title:"Î ÏÏÏβαÏη αÏοÏÏίÏθηκε",description:(D==null?void 0:D.reason)||"Îεν βÏÎθηκε ενεÏγή ÏÏ
νδÏομή. ÎÏιλÎξÏε Ïλάνο για ÏÏÏÏβαÏη.",variant:"destructive"}),l("/subscription-plans");return}W&&console.warn("OAuth validation transient error â keeping session as-is",$)}catch(D){console.error("OAuth validation error:",D)}finally{u.current=!1}},0)}});return U.auth.getSession().then(({data:{session:S}})=>{console.log("Initial session check:",S?"Session found":"No session"),a(S),r((S==null?void 0:S.user)??null),o(!1)}),()=>N.unsubscribe()},[]);const f=async(N,S)=>{var I,R;const{data:E,error:_}=await U.auth.signInWithPassword({email:N,password:S});try{await U.functions.invoke("log-auth-activity",{body:{user_id:(I=E.user)==null?void 0:I.id,email:N,event_type:_?"login_failed":"login_success",failure_reason:_==null?void 0:_.message}})}catch(T){console.error("Failed to log auth activity:",T)}if(!_&&((R=E.user)!=null&&R.email))try{await w(E.user.email,E.user.id)}catch(T){console.warn("Failed to link legacy user data:",T)}return{error:_}},p=async(N,S,E,_)=>{const I=`${window.location.origin}/`,{error:R}=await U.auth.signUp({email:N,password:S,options:{emailRedirectTo:I,data:{first_name:E,last_name:_}}});return{error:R}},v=async()=>{c.current=!0;try{sessionStorage.removeItem("isImpersonationSession"),sessionStorage.removeItem("impersonatedUserEmail"),sessionStorage.removeItem("oauthValidated")}catch(N){console.warn("Failed to clear session storage:",N)}await U.auth.signOut()},g=async N=>{try{const{data:S,error:E}=await U.functions.invoke("check-user-status",{body:{email:N}});return E?{status:"error",error:E}:{status:S.status,user_id:S.user_id}}catch(S){return{status:"error",error:S}}},b=async N=>{const S=`${window.location.origin}/set-password`;try{const{data:E,error:_}=await U.functions.invoke("send-password-setup-email",{body:{email:N,redirect_to:S}});return _?(console.error("Password setup email error:",_),$h(_,"send-password-setup-email"),{error:_}):{error:null}}catch(E){return console.error("Password setup email error:",E),$h(E,"send-password-setup-email-catch"),{error:E}}},y=async N=>{const S=`${window.location.origin}/set-password`;try{const{data:E,error:_}=await U.functions.invoke("send-password-setup-email",{body:{email:N,redirect_to:S}});return _?(console.error("Password reset error:",_),$h(_,"reset-password"),{error:_}):{error:null}}catch(E){return console.error("Password reset error:",E),$h(E,"reset-password-catch"),{error:E}}},x=async N=>{try{const{data:S,error:E}=await U.functions.invoke("invite-legacy-user",{body:{email:N}});return E?(console.error("Invite legacy user error:",E),{error:E}):{success:!0,...S}}catch(S){return console.error("Invite legacy user error:",S),{error:S}}},w=async(N,S)=>{try{const{data:E,error:_}=await U.functions.invoke("link-legacy-user",{body:{email:N,auth_user_id:S}});return _?(console.error("Link legacy user error:",_),{error:_}):{success:!0,...E}}catch(E){return console.error("Link legacy user error:",E),{error:E}}},j={user:t,session:n,loading:i,signIn:f,signUp:p,signOut:v,checkUserStatus:g,sendPasswordSetupEmail:b,resetPassword:y,inviteLegacyUser:x,linkLegacyUser:w}
638;return s.jsx(J4.Provider,{value:j,children:e})}function jt(){const e=h.useContext(J4);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}const n9=24*60*60*1e3,a9=e=>{try{const t=`subscription_cache_${e}`,r=sessionStorage.getItem(t);return r?JSON.parse(r):null}catch(t){return console.warn("Failed to read subscription cache:",t),null}},i9=(e,t)=>{try{const r=`subscription_cache_${e}`,n={timestamp:Date.now(),data:t};sessionStorage.setItem(r,JSON.stringify(n))}catch(r){console.warn("Failed to write subscription cache:",r)}},Lx=e=>{try{if(e){const t=`subscription_cache_${e}`;sessionStorage.removeItem(t)}else Object.keys(sessionStorage).forEach(t=>{t.startsWith("subscription_cache_")&&sessionStorage.removeItem(t)})}catch(t){console.warn("Failed to clear subscription cache:",t)}},o9=e=>Date.now()-e<n9,Z4=h.createContext(void 0),l9=({children:e})=>{const[t,r]=h.useState(!1),[n,a]=h.useState(!1),[i,o]=h.useState(null),[l,c]=h.useState(null),[d,u]=h.useState(null),[m,f]=h.useState(!1),[p,v]=h.useState(null),[g,b]=h.useState(!0),[y,x]=h.useState(!1),[w,j]=h.useState(!1),[N,S]=h.useState(null),E=h.useRef(!1),{user:_,session:I}=jt();at();const R=async()=>{if(!_){x(!1);return}try{const{data:C,error:A}=await U.from("profiles").select("first_name, last_name, phone_number, postal_address, postal_code, city, country").eq("user_id",_.id).maybeSingle();A&&console.warn("Profile check error:",A);const L=C&&C.first_name&&C.last_name&&C.phone_number&&C.postal_address&&C.postal_code&&C.city&&C.country;x(!!L)}catch(C){Jo(C,"profile completion check"),x(!1)}},T=async(C=!1)=>{var A,L;if(!_||!I){console.log("Subscription check: No user or session"),Lx(),r(!1),a(!1),o(null),c(null),u(null),f(!1),v(null),j(!1),S(null),b(!1),E.current=!0;return}if(!C){const O=a9(_.id);if(O&&o9(O.timestamp)){console.log("Using cached subscription data"),r(O.data.subscribed||!1),a(O.data.is_trial||!1),o(O.data.subscription_tier),c(O.data.subscription_end),u(O.data.trial_end),f(O.data.cancel_at_period_end||!1),v(O.data.cancel_at),j(O.data.is_admin_free_access||!1),S(O.data.free_access_end_date||null),b(!1),E.current=!0;return}}try{E.current||b(!0),console.log("Fetching subscription data from API for user:",_.id);const{data:O,error:P}=await U.functions.invoke("check-subscription");if(P){console.warn("Subscription check error:",P.message),((A=P.message)!=null&&A.includes("FunctionsHttpError")||(L=P.message)!=null&&L.includes("timeout"))&&(console.error("Critical subscription check failure - resetting state"),Lx(_.id),r(!1),a(!1),o(null),c(null),u(null),f(!1),v(null),j(!1),S(null));return}console.log("Subscription data received:",O!=null&&O.subscribed?"Subscribed":"Not subscribed"),O&&i9(_.id,O),r(O.subscribed||!1),a(O.is_trial||!1),o(O.subscription_tier),c(O.subscription_end),u(O.trial_end),f(O.cancel_at_period_end||!1),v(O.cancel_at),j(O.is_admin_free_access||!1),S(O.free_access_end_date||null)}catch(O){console.warn("Subscription check failed:",O.message)}finally{b(!1),E.current=!0}};h.useEffect(()=>{_!=null&&_.id?(T(),R()):(Lx(),b(!1))},[_==null?void 0:_.id]);const k={subscribed:t,isTrialUser:n,subscriptionTier:i,subscriptionEnd:l,trialEnd:d,cancelAtPeriodEnd:m,cancelAt:p,loading:g,checkSubscription:()=>T(!0),isProfileComplete:y,checkProfileCompletion:R,isAdminFreeAccess:w,freeAccessEndDate:N};return s.jsx(Z4.Provider,{value:k,children:e})},_i=()=>{const e=h.useContext(Z4);if(e===void 0)throw new Error("useSubscription must be used within a SubscriptionProvider");return e},eP=h.createContext(void 0),c9=({children:e})=>{const t=h.useRef(new Map),r=h.useCallback((i,o)=>{var l,c;console.log("Registering badge component for user:",i),t.current.has(i)||t.current.set(i,new Set),(l=t.current.get(i))==null||l.add(o),console.log("Total registered components for user",i,":",(c=t.current.get(i))==null?void 0:c.size)},[]),n=h.useCallback((i,o)=>{var l;(l=t.current.get(i))==null||l.delete(o)},[]),a=h.useCallback(i=>{console.log("Refreshing badge for user:",i);const o=t.current.get(i);if(console.log("Found",(o==null?void 0:o.size)||0,"callbacks to refresh for user:",i),o){let l=0;o.forEach(c=>{console.log("Calling refresh callback",l+1,"for user:",i),c(),l++})}},[]);return s.jsx(eP.Provider,{value:{refreshUserBadge:a,registerBadgeComponent:r,unregisterBadgeComponent:n},children:e})},tP=()=>{const e=h.useContext(eP);if(!e)throw new Error("useBadgeRefresh must be used within a BadgeRefreshProvi
638der");return e};var sP={exports:{}},rP={};/** 639 * @license React 640 * use-sync-external-store-shim.production.js 641 * 642 * Copyright (c) Meta Platforms, Inc. and affiliates. 643 * 644 * This source code is licensed under the MIT license found in the 645 * LICENSE file in the root directory of this source tree. 646 */var dd=h;function d9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var u9=typeof Object.is=="function"?Object.is:d9,m9=dd.useState,h9=dd.useEffect,f9=dd.useLayoutEffect,p9=dd.useDebugValue;function g9(e,t){var r=t(),n=m9({inst:{value:r,getSnapshot:t}}),a=n[0].inst,i=n[1];return f9(function(){a.value=r,a.getSnapshot=t,Fx(a)&&i({inst:a})},[e,r,t]),h9(function(){return Fx(a)&&i({inst:a}),e(function(){Fx(a)&&i({inst:a})})},[e]),p9(r),r}function Fx(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!u9(e,r)}catch{return!0}}function x9(e,t){return t()}var v9=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?x9:g9;rP.useSyncExternalStore=dd.useSyncExternalStore!==void 0?dd.useSyncExternalStore:v9;sP.exports=rP;var y9=sP.exports;function b9(){return y9.useSyncExternalStore(w9,()=>!0,()=>!1)}function w9(){return()=>{}}var fw="Avatar",[j9,mte]=gs(fw),[N9,nP]=j9(fw),aP=h.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[a,i]=h.useState("idle");return s.jsx(N9,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:s.jsx(Ce.span,{...n,ref:t})})});aP.displayName=fw;var iP="AvatarImage",oP=h.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:a=()=>{},...i}=e,o=nP(iP,r),l=_9(n,i),c=rs(d=>{a(d),o.onImageLoadingStatusChange(d)});return is(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?s.jsx(Ce.img,{...i,ref:t,src:n}):null});oP.displayName=iP;var lP="AvatarFallback",cP=h.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...a}=e,i=nP(lP,r),[o,l]=h.useState(n===void 0);return h.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>l(!0),n);return()=>window.clearTimeout(c)}},[n]),o&&i.imageLoadingStatus!=="loaded"?s.jsx(Ce.span,{...a,ref:t}):null});cP.displayName=lP;function w1(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function _9(e,{referrerPolicy:t,crossOrigin:r}){const n=b9(),a=h.useRef(null),i=n?(a.current||(a.current=new window.Image),a.current):null,[o,l]=h.useState(()=>w1(i,e));return is(()=>{l(w1(i,e))},[i,e]),is(()=>{const c=m=>()=>{l(m)};if(!i)return;const d=c("loaded"),u=c("error");return i.addEventListener("load",d),i.addEventListener("error",u),t&&(i.referrerPolicy=t),typeof r=="string"&&(i.crossOrigin=r),()=>{i.removeEventListener("load",d),i.removeEventListener("error",u)}},[i,r,t]),o}var dP=aP,uP=oP,mP=cP;const to=h.forwardRef(({className:e,...t},r)=>s.jsx(dP,{ref:r,className:me("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));to.displayName=dP.displayName;const so=h.forwardRef(({className:e,...t},r)=>s.jsx(uP,{ref:r,className:me("aspect-square h-full w-full",e),...t}));so.displayName=uP.displayName;const ro=h.forwardRef(({className:e,...t},r)=>s.jsx(mP,{ref:r,className:me("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ro.displayName=mP.displayName;const hP=h.createContext({onlineUsers:new Set,isUserOnline:()=>!1,myPresence:null}),k9=({children:e})=>{const[t,r]=h.useState(new Set),[n,a]=h.useState(null),[i,o]=h.useState(null),[l,c]=h.useState(!1),{user:d}=jt();h.useEffect(()=>{const f=window.location.hostname,p=localStorage.getItem("presence-debug")==="true",v=f.includes("app.wellbe.gr")||f.includes("lovable.app");c(p||v)},[]);const u=h.useCallback(f=>{const p=new Set;Object.values(f).forEach(v=>{v.forEach(g=>{const b=new Date(g.last_seen||g.online_at);new Date().getTime()-b.getTime()<3e4&&p.add(g.user_id)})}),r(p)},[]),m=h.useCallback(f=>t.has(f),[t]);return h.useEffect(()=>{if(!(d!=null&&d.id)||!l)return;let f=null,p=null;return(async()=>{try{f=U.channel("user-presence",{config:{presence:{key:d.id}}}),f.on("presence",{event:"sync"},()=>{try{const g=f.presenceState();u(g)}catch(g){Jo(g,"presence-sync")}}).on("presence",{event:"join"}
646,({newPresences:g})=>{console.log("User joined:",g)}).on("presence",{event:"leave"},({leftPresences:g})=>{console.log("User left:",g)}).subscribe(async g=>{try{if(g==="SUBSCRIBED"){const b={user_id:d.id,online_at:new Date().toISOString(),last_seen:new Date().toISOString()};a(b),await f.track(b)}}catch(b){Jo(b,"presence-subscribe")}}),o(f),p=setInterval(async()=>{try{if(f&&(d!=null&&d.id)){const g={user_id:d.id,online_at:(n==null?void 0:n.online_at)||new Date().toISOString(),last_seen:new Date().toISOString()};a(g),await f.track(g)}}catch(g){Jo(g,"presence-heartbeat")}},15e3)}catch(g){Jo(g,"presence-initialization")}})(),()=>{if(p&&clearInterval(p),f)try{f.unsubscribe()}catch(g){Jo(g,"presence-cleanup")}}},[d==null?void 0:d.id,l,u]),h.useEffect(()=>{if(!l)return;const f=async()=>{if(!(!(d!=null&&d.id)||!i))try{if(document.hidden){const p={user_id:d.id,online_at:(n==null?void 0:n.online_at)||new Date().toISOString(),last_seen:new Date().toISOString()};await i.track(p)}else{const p={user_id:d.id,online_at:(n==null?void 0:n.online_at)||new Date().toISOString(),last_seen:new Date().toISOString()};a(p),await i.track(p)}}catch(p){Jo(p,"presence-visibility")}};return document.addEventListener("visibilitychange",f),()=>{document.removeEventListener("visibilitychange",f)}},[d==null?void 0:d.id,i,n==null?void 0:n.online_at,l]),s.jsx(hP.Provider,{value:{onlineUsers:t,isUserOnline:m,myPresence:n},children:e})},pw=()=>{const e=h.useContext(hP);if(!e)throw new Error("useUserPresence must be used within UserPresenceProvider");return e},gu=({userId:e,avatarUrl:t,displayName:r="User",className:n,showOnlineStatus:a=!0,children:i,onClick:o})=>{const{isUserOnline:l}=pw(),c=a&&l(e),d=u=>u.split(" ").map(m=>m[0]).join("").toUpperCase();return s.jsxs("div",{className:"relative inline-block",children:[s.jsxs(to,{className:me("cursor-pointer",n),onClick:o,children:[s.jsx(so,{src:t||void 0,alt:r}),s.jsx(ro,{className:"bg-muted",children:d(r)})]}),c&&s.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-green-500 border-2 border-background rounded-full z-10"}),i]})},fP=h.createContext({instructors:{},loadInstructor:async()=>null});function S9({children:e}){const[t,r]=h.useState({}),n=async a=>{if(t[a])return t[a];try{const{data:i,error:o}=await U.from("instructors").select("id, name, photo_url").eq("id",a).single();if(o)throw o;const l=i?{id:i.id,name:i.name,photo_url:i.photo_url}:null;return l&&r(c=>({...c,[a]:l})),l}catch(i){return console.error("Error loading instructor:",i),null}};return s.jsx(fP.Provider,{value:{instructors:t,loadInstructor:n},children:e})}function mf({instructorId:e,legacyInstructor:t,showPhoto:r=!1,className:n="",onClick:a}){const[i,o]=h.useState(null),[l,c]=h.useState(!1),{instructors:d,loadInstructor:u}=h.useContext(fP);if(h.useEffect(()=>{(async()=>{if(e){if(d[e]){o(d[e]);return}c(!0);try{const p=await u(e);o(p||{id:"",name:t||"",photo_url:void 0})}catch(p){console.error("Error loading instructor:",p),o({id:"",name:t||"",photo_url:void 0})}finally{c(!1)}}else o({id:"",name:t||"",photo_url:void 0})})()},[e,t,d,u]),l)return s.jsx("span",{className:n,children:"Loading..."});const m=a&&e?a:void 0;return r&&i?s.jsxs("div",{className:`flex items-center gap-2 ${m?"cursor-pointer hover:opacity-80":""} ${n}`,onClick:m,children:[s.jsx(gu,{userId:i.id||"instructor",avatarUrl:i.photo_url,displayName:i.name||"Unknown",className:"h-6 w-6",showOnlineStatus:!!i.id}),s.jsx("span",{children:i.name||"Unknown"})]}):s.jsx("span",{className:`${m?"cursor-pointer hover:opacity-80":""} ${n}`,onClick:m,children:(i==null?void 0:i.name)||"Unknown"})}function C9(){const{pathname:e,state:t}=$s(),r=(t==null?void 0:t.preserveScroll)===!0;return h.useEffect(()=>{r||window.scrollTo(0,0)},[e,r]),null}/*! Capacitor: https://capacitorjs.com/ - MIT License */var ud;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(ud||(ud={}));class $x extends Error{constructor(t,r,n){super(t),this.message=t,this.code=r,this.data=n}}const E9=e=>{var t,r;return e!=null&&e.androidBridge?"android":!((r=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||r===void 0)&&r.bridge?"ios":"web"},P9=e=>{const t=e.CapacitorCustomPlatform||null,r=e.Capacitor||{},n=r.Plugins=r.Plugins||{},a=()=>t!==null?t.name:E9(e),i=()=>a()!=="web",o=m=>{const f=d.get(m);return!!(f!=null&&f.platforms.has(a())||l(m))},l=m=>{var f;return(f=r.PluginHeaders)===null||f===void 0?void 0:f.find(p=>p.name===m)},c=m=>e.console.error(m),d=new Map,u=(m,f={})=>{const p=d.get(m);
646if(p)return console.warn(`Capacitor plugin "${m}" already registered. Cannot register plugins twice.`),p.proxy;const v=a(),g=l(m);let b;const y=async()=>(!b&&v in f?b=typeof f[v]=="function"?b=await f[v]():b=f[v]:t!==null&&!b&&"web"in f&&(b=typeof f.web=="function"?b=await f.web():b=f.web),b),x=(_,I)=>{var R,T;if(g){const k=g==null?void 0:g.methods.find(C=>I===C.name);if(k)return k.rtype==="promise"?C=>r.nativePromise(m,I.toString(),C):(C,A)=>r.nativeCallback(m,I.toString(),C,A);if(_)return(R=_[I])===null||R===void 0?void 0:R.bind(_)}else{if(_)return(T=_[I])===null||T===void 0?void 0:T.bind(_);throw new $x(`"${m}" plugin is not implemented on ${v}`,ud.Unimplemented)}},w=_=>{let I;const R=(...T)=>{const k=y().then(C=>{const A=x(C,_);if(A){const L=A(...T);return I=L==null?void 0:L.remove,L}else throw new $x(`"${m}.${_}()" is not implemented on ${v}`,ud.Unimplemented)});return _==="addListener"&&(k.remove=async()=>I()),k};return R.toString=()=>`${_.toString()}() { [capacitor code] }`,Object.defineProperty(R,"name",{value:_,writable:!1,configurable:!1}),R},j=w("addListener"),N=w("removeListener"),S=(_,I)=>{const R=j({eventName:_},I),T=async()=>{const C=await R;N({eventName:_,callbackId:C},I)},k=new Promise(C=>R.then(()=>C({remove:T})));return k.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await T()},k},E=new Proxy({},{get(_,I){switch(I){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return g?S:j;case"removeListener":return N;default:return w(I)}}});return n[m]=E,d.set(m,{name:m,proxy:E,platforms:new Set([...Object.keys(f),...g?[v]:[]])}),E};return r.convertFileSrc||(r.convertFileSrc=m=>m),r.getPlatform=a,r.handleError=c,r.isNativePlatform=i,r.isPluginAvailable=o,r.registerPlugin=u,r.Exception=$x,r.DEBUG=!!r.DEBUG,r.isLoggingEnabled=!!r.isLoggingEnabled,r},T9=e=>e.Capacitor=P9(e),Xr=T9(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),zl=Xr.registerPlugin;class pP{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(t,r){let n=!1;this.listeners[t]||(this.listeners[t]=[],n=!0),this.listeners[t].push(r);const i=this.windowListeners[t];i&&!i.registered&&this.addWindowListener(i),n&&this.sendRetainedArgumentsForEvent(t);const o=async()=>this.removeListener(t,r);return Promise.resolve({remove:o})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,r,n){const a=this.listeners[t];if(!a){if(n){let i=this.retainedEventArguments[t];i||(i=[]),i.push(r),this.retainedEventArguments[t]=i}return}a.forEach(i=>i(r))}hasListeners(t){var r;return!!(!((r=this.listeners[t])===null||r===void 0)&&r.length)}registerWindowListener(t,r){this.windowListeners[r]={registered:!1,windowEventName:t,pluginEventName:r,handler:n=>{this.notifyListeners(r,n)}}}unimplemented(t="not implemented"){return new Xr.Exception(t,ud.Unimplemented)}unavailable(t="not available"){return new Xr.Exception(t,ud.Unavailable)}async removeListener(t,r){const n=this.listeners[t];if(!n)return;const a=n.indexOf(r);this.listeners[t].splice(a,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const r=this.retainedEventArguments[t];r&&(delete this.retainedEventArguments[t],r.forEach(n=>{this.notifyListeners(t,n)}))}}const j1=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),N1=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class A9 extends pP{async getCookies(){const t=document.cookie,r={};return t.split(";").forEach(n=>{if(n.length<=0)return;let[a,i]=n.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");a=N1(a).trim(),i=N1(i).trim(),r[a]=i}),r}async setCookie(t){try{const r=j1(t.key),n=j1(t.value),a=`; expires=${(t.expires||"").replace("expires=","")}`,i=(t.path||"/").replace("path=",""),o=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${r}=${n||""}${a}; path=${i}; ${o};`}catch(r){return Promise.reject(r)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(r){return Promise.reject(r)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const r of t)document.cookie=r.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}zl("CapacitorCookies",{web:()=>new A9});const I9=async e=>new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{const a=n.result;t(a.indexOf(",")>=0?a.split(",")[1]:a)},n.onerror=a=>r(a),n.readAsDataURL(e)}),R9=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(a=>a.toLocaleLowerCase()).reduce((a,i,o)=>(a[i]=e[t[o]],a),{})},M9=(e,t=!0)=>e?Object.entries(e).reduce((n,a)=>{const[i,o]=a;let l,c;return Array.isArray(o)?(c="",o.forEach(d=>{l=t?encodeURIComponent(d):d,c+=`${i}=${l}&`}),c.slice(0,-1)):(l=t?encodeURIComponent(o):o,c=`${i}=${l}`),`${n}&${c}`},"").substr(1):null,O9=(e,t={})=>{const r=Object.assign({method:e.method||"GET",headers:e.headers},t),a=R9(e.headers)["content-type"]||"";
646if(typeof e.data=="string")r.body=e.data;else if(a.includes("application/x-www-form-urlencoded")){const i=new URLSearchParams;for(const[o,l]of Object.entries(e.data||{}))i.set(o,l);r.body=i.toString()}else if(a.includes("multipart/form-data")||e.data instanceof FormData){const i=new FormData;if(e.data instanceof FormData)e.data.forEach((l,c)=>{i.append(c,l)});else for(const l of Object.keys(e.data))i.append(l,e.data[l]);r.body=i;const o=new Headers(r.headers);o.delete("content-type"),r.headers=o}else(a.includes("application/json")||typeof e.data=="object")&&(r.body=JSON.stringify(e.data));return r};class D9 extends pP{async request(t){const r=O9(t,t.webFetchExtra),n=M9(t.params,t.shouldEncodeUrlParams),a=n?`${t.url}?${n}`:t.url,i=await fetch(a,r),o=i.headers.get("content-type")||"";let{responseType:l="text"}=i.ok?t:{};o.includes("application/json")&&(l="json");let c,d;switch(l){case"arraybuffer":case"blob":d=await i.blob(),c=await I9(d);break;case"json":c=await i.json();break;case"document":case"text":default:c=await i.text()}const u={};return i.headers.forEach((m,f)=>{u[f]=m}),{data:c,headers:u,status:i.status,url:i.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}zl("CapacitorHttp",{web:()=>new D9});var Xy;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(Xy||(Xy={}));var _1;(function(e){e.None="NONE",e.Slide="SLIDE",e.Fade="FADE"})(_1||(_1={}));const k1=zl("StatusBar"),L9=zl("SplashScreen",{web:()=>ut(()=>import("./web-B3BPcfWD.js"),[]).then(e=>new e.SplashScreenWeb)}),F9=zl("Device",{web:()=>ut(()=>import("./web-Bp5XVIoe.js"),[]).then(e=>new e.DeviceWeb)}),gw=()=>{const[e,t]=h.useState(!1),[r,n]=h.useState(null);return h.useEffect(()=>{(async()=>{const i=Xr.isNativePlatform();if(t(i),i){await k1.setStyle({style:Xy.Light}),await k1.setBackgroundColor({color:"#ffffff"});const o=await F9.getInfo();n(o),await L9.hide()}})()},[]),{isNative:e,deviceInfo:r,platform:Xr.getPlatform()}};var Lu;(function(e){e.Heavy="HEAVY",e.Medium="MEDIUM",e.Light="LIGHT"})(Lu||(Lu={}));var Fu;(function(e){e.Success="SUCCESS",e.Warning="WARNING",e.Error="ERROR"})(Fu||(Fu={}));const qo=zl("Haptics",{web:()=>ut(()=>import("./web-BgW2vNQ_.js"),[]).then(e=>new e.HapticsWeb)}),xw=()=>({lightImpact:async()=>{Xr.isNativePlatform()&&await qo.impact({style:Lu.Light})},mediumImpact:async()=>{Xr.isNativePlatform()&&await qo.impact({style:Lu.Medium})},heavyImpact:async()=>{Xr.isNativePlatform()&&await qo.impact({style:Lu.Heavy})},selectionChanged:async()=>{Xr.isNativePlatform()&&await qo.selectionChanged()},notificationSuccess:async()=>{Xr.isNativePlatform()&&await qo.notification({type:Fu.Success})},notificationWarning:async()=>{Xr.isNativePlatform()&&await qo.notification({type:Fu.Warning})},notificationError:async()=>{Xr.isNativePlatform()&&await qo.notification({type:Fu.Error})}}),$9=Sd("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ye({className:e,variant:t,...r}){return s.jsx("div",{className:me($9({variant:t}),e),...r})}const U9=()=>{const{isNative:e}=gw(),{selectionChanged:t,lightImpact:r}=xw(),n=qe(),a=$s(),[i,o]=h.useState("");if(!e)return null;const l=[{icon:Kp,label:"ÎÏÏική",path:"/",badge:null},{icon:Os,label:"Workouts",path:"/catalog?filter=workouts",badge:"NEW"},{icon:B5,label:"Podcast",path:"/podcast",badge:null},{icon:oE,label:"ΣÏ
νÏαγÎÏ",path:"/recipes",badge:null},{icon:Ul,label:"Community",path:"/community",badge:"5"}
646];h.useEffect(()=>{const d=a.pathname;console.log("ð MobileNavigation useEffect triggered:",{currentPath:d,isNative:e});const u=l.find(m=>d===m.path||m.path!=="/"&&d.startsWith(m.path));u&&(console.log("ð MobileNavigation setting active item:",u.path),o(u.path))},[a.pathname,e]);const c=async d=>{console.log("ð MobileNavigation navigating to:",d,"from:",a.pathname),o(d),await Promise.all([t(),r()]),n(d)};return s.jsx("div",{className:"fixed bottom-0 left-0 right-0 bg-background/95 backdrop-blur-lg border-t border-border/50 z-50 safe-area-inset-bottom mobile-nav-enter",children:s.jsx("div",{className:"flex items-center justify-around px-2 py-1",children:l.map(({icon:d,label:u,path:m,badge:f})=>{const p=i===m||a.pathname===m||m!=="/"&&a.pathname.startsWith(m);return s.jsxs("button",{onClick:()=>c(m),className:`relative flex flex-col items-center justify-center p-3 rounded-xl min-w-[64px] touch-manipulation transition-all duration-300 transform active:scale-95 ${p?"text-primary bg-primary/15 shadow-md mobile-bounce":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx(d,{className:`h-5 w-5 mb-1 transition-transform duration-200 ${p?"scale-110":""}`}),f&&s.jsx(ye,{variant:f==="NEW"?"default":"secondary",className:"absolute -top-2 -right-2 h-4 px-1 text-[10px] font-bold min-w-[16px] flex items-center justify-center",children:f})]}),s.jsx("span",{className:`text-[10px] font-medium transition-all duration-200 ${p?"text-primary font-semibold":""}`,children:u}),p&&s.jsx("div",{className:"absolute -top-1 left-1/2 transform -translate-x-1/2 w-1 h-1 bg-primary rounded-full mobile-pulse"})]},m)})})})},B9=()=>{if(typeof window>"u")return{isStaging:!1,hostname:""};const e=window.location.hostname;return{isStaging:e==="app.wellbe.gr"||e.includes("lovable.app"),hostname:e}},z9=()=>{const[e,t]=h.useState(!0),[r,n]=h.useState(!1),[a,i]=h.useState(!0);B9();const o=window.location.hostname,[l,c]=h.useState(localStorage.getItem("presence-debug")==="true"),d=o.includes("app.wellbe.gr")||o.includes("lovable.app");h.useEffect(()=>{d?(async()=>{try{const{data:{user:f}}=await U.auth.getUser();if(!f){n(!1),i(!1);return}const{data:p,error:v}=await U.from("user_roles").select("role").eq("user_id",f.id).eq("role","admin").single();n(v?!1:!!p)}catch{n(!1)}finally{i(!1)}})():i(!1)},[d]);const u=()=>{const m=!l;c(m),localStorage.setItem("presence-debug",m.toString()),window.location.reload()};return!e||!d||!r||a?null:s.jsx("div",{className:"bg-yellow-50 border-b border-yellow-200 px-4 py-2 text-sm",children:s.jsxs("div",{className:"flex items-center justify-between max-w-7xl mx-auto",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(uE,{className:"h-4 w-4 text-yellow-600"}),s.jsxs("span",{className:"text-yellow-800",children:[s.jsx("strong",{children:"Staging:"})," ",o," |",s.jsx("strong",{children:" Health:"})," ",s.jsx("a",{href:"/__health",className:"underline hover:no-underline",children:"/__health"})]})]}),s.jsxs("button",{onClick:u,className:`flex items-center space-x-1 px-2 py-1 rounded text-xs font-medium ${l?"bg-green-200 text-green-800 hover:bg-green-300":"bg-gray-200 text-gray-700 hover:bg-gray-300"}`,title:"Toggle user presence feature",children:[s.jsx(Ul,{className:"h-3 w-3"}),s.jsxs("span",{children:["Presence: ",l?"ON":"OFF"]})]})]}),s.jsx("button",{onClick:()=>t(!1),className:"text-yellow-600 hover:text-yellow-800","aria-label":"Close diagnostic banner",children:s.jsx(qr,{className:"h-4 w-4"})})]})})},gP=h.createContext(void 0),W9=({children:e})=>{const[t,r]=h.useState(!1),[n]=Do(),a=qe();h.useEffect(()=>{const o=n.get("mobileApp"),l=sessionStorage.getItem("isMobileApp");o==="true"?(r(!0),sessionStorage.setItem("isMobileApp","true")):l==="true"&&r(!0)},[n]);const i=o=>{if(t){const l=o.includes("?")?"&":"?";a(`${o}${l}mobileApp=true`)}else a(o)};return s.jsx(gP.Provider,{value:{isMobileApp:t,navigateWithPlatform:i},children:e})},ar=()=>{const e=h.useContext(gP);if(e===void 0)throw new Error("usePlatform must be used within a PlatformProvider");return e},md=Sd("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",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",wellbe:"wellbe-gold-gradient text-white font-bold shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 rounded-full px-8 py-3 uppercase tracking-wide text-sm"},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=h.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...a},i)=>{const o=n?TC:"button";return s.jsx(o,{className:me(md({variant:t,size:r,className:e})),ref:i,...a})});F.displayName="Button";function V9(){const{user:e}=jt(),{data:t=!1,isLoading:r,error:n}=v4({queryKey:["isAdmin",e==null?void 0:e.id],queryFn:async()=>
646{if(!(e!=null&&e.id))return!1;console.log("useIsAdmin: Checking admin role for user:",e.id);const{data:a,error:i}=await U.from("user_roles").select("role").eq("user_id",e.id).eq("role","admin").maybeSingle();if(i){console.error("useIsAdmin: Direct query error, trying RPC fallback:",i);const{data:l,error:c}=await U.rpc("has_role",{_user_id:e.id,_role:"admin"});return c?(console.error("useIsAdmin: RPC fallback also failed:",c),!1):(console.log("useIsAdmin: RPC result:",l),l===!0)}const o=(a==null?void 0:a.role)==="admin";return console.log("useIsAdmin: Direct query result:",o),o},enabled:!!(e!=null&&e.id),staleTime:5*60*1e3,gcTime:10*60*1e3});return{isAdmin:t,isLoading:r,error:n}}const Fe=({isMenuOpen:e,onMenuToggle:t})=>{const r=qe(),n=$s(),{user:a,signOut:i}=jt(),{isAdmin:o}=V9(),[l,c]=h.useState(!1);h.useEffect(()=>{const f=sessionStorage.getItem("isImpersonationSession")==="true";c(f)},[]);const d=n.pathname.startsWith("/admin"),u=o||d,m=async()=>{await i(),r("/")};return s.jsx("header",{className:"bg-white shadow-sm sticky top-0 z-[60]",children:s.jsxs("div",{className:"container mx-auto px-4 sm:px-6 py-3 sm:py-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center cursor-pointer",onClick:()=>r("/"),children:s.jsx("img",{src:"/lovable-uploads/463c9522-3313-4588-bd87-40273096d456.png",alt:"Well Be Workouts",className:"h-12 sm:h-14 md:h-16"})}),s.jsxs("nav",{className:"hidden lg:flex items-center space-x-4 xl:space-x-8",children:[s.jsx("button",{onClick:()=>r("/"),className:"text-foreground hover:text-primary transition-colors font-medium text-sm",children:"ÎÏÏική"}),s.jsx("button",{onClick:()=>r("/catalog?filter=workouts"),className:"text-foreground hover:text-primary transition-colors font-medium text-sm",children:"Workouts"}),s.jsx("button",{onClick:()=>r("/catalog?filter=dialogismoi"),className:"text-foreground hover:text-primary transition-colors font-medium text-sm",children:"ÎιαλογιÏμοί"}),s.jsx("button",{onClick:()=>r("/catalog?filter=breathworks"),className:"text-foreground hover:text-primary transition-colors font-medium text-sm",children:"Breathworks"}),s.jsx("button",{onClick:()=>r("/podcast"),className:"text-foreground hover:text-primary transition-colors font-medium text-sm",children:"Podcast"}),s.jsx("button",{onClick:()=>r("/recipes"),className:"text-foreground hover:text-primary transition-colors font-medium text-sm",children:"Î£Ï Î½ÏαγÎÏ"}),s.jsx("button",{onClick:()=>r("/community"),className:"text-foreground hover:text-primary transition-colors font-medium text-sm",children:"Community"}),a?s.jsxs("div",{className:"flex items-center space-x-2",children:[u&&s.jsxs(F,{variant:"ghost",size:"sm",onClick:()=>r("/admin"),className:"text-foreground hover:text-primary text-xs",children:[s.jsx(kl,{className:"w-3 h-3 mr-1"}),s.jsx("span",{className:"hidden lg:inline",children:"Admin"})]}),s.jsxs(F,{variant:"ghost",size:"sm",onClick:()=>r("/dashboard"),className:"text-foreground hover:text-primary text-xs",children:[s.jsx(Nn,{className:"w-3 h-3 mr-1"}),s.jsx("span",{className:"hidden lg:inline",children:"Î ÎογαÏιαÏμÏÏ Î¼Î¿Ï "})]}),s.jsxs(F,{variant:"ghost",size:"sm",onClick:m,className:"text-foreground hover:text-primary text-xs",children:[s.jsx(fy,{className:"w-3 h-3 mr-1"}),s.jsx("span",{className:"hidden lg:inline",children:"ÎξοδοÏ"})]})]}):s.jsx("button",{onClick:()=>{const f=window.location.pathname==="/dashboard"?"":window.location.pathname+window.location.search;r(f?`/auth?returnUrl=${encodeURIComponent(f)}`:"/auth")},className:"text-foreground hover:text-primary transition-colors font-medium text-sm",children:"ÎίÏοδοÏ"})]}),s.jsx(F,{variant:"ghost",size:"icon",className:"lg:hidden text-foreground hover:text-primary",onClick:t,children:e?s.jsx(qr,{className:"w-5 h-5 sm:w-6 sm:h-6"}):s.jsx(hE,{className:"w-5 h-5 sm:w-6 sm:h-6"})})]}),e&&s.jsx("nav",{className:"lg:hidden mt-4 pb-4",children:s.jsxs("div",{className:"flex flex-col space-y-2 bg-background border rounded-lg p-4 shadow-lg",children:[s.jsx("button",{onClick:()=>{r("/"),t()},className:"text-foreground hover:text-primary transition-colors font-medium py-2 text-left",children:"ÎÏÏική"}),s.jsx("button",{onClick:()=>{r("/catalog?filter=workouts"),t()},className:"text-foreground hover:text-primary transition-colors font-medium py-2 text-left",children:"Workouts"}),s.jsx("button",{onClick:()=>{r("/catalog?filter=dialogismoi"),t()},className:"text-foreground hover:text-primary transition-colors font-medium py-2 text-left",children:"ÎιαλογιÏμοί"}),s.jsx("button",{onClick:()=>{r("/catalog?filter=breathworks"),t()},className:"text-foreground hover:text-primary transition-colors font-medium py-2 text-left",children:"Breathworks"}),s.jsx("button",{onClick:()=>{r("/podcast"),t()},className:"text-foreground hover:text-primary transition-colors font-medium py-2 text-left",children:"Podcast"}),s.jsx("button",{onClick:()=>{r("/recipes"),t()},className:"text-foreground hover:text-primary transition-colors font-medium py-2 text-left",children:"Î£Ï Î½ÏαγÎÏ"}),s.jsx("button",{onClick:()=>{r("/community"),t()},className:"text-foreground hover:text-primary transition-colors font-medium py-2 text-left",children:"Community"}),a?s.jsxs(s.Fragment,{children:[u&&s.jsxs("button",{onClick:()=>{r("/admin"),t()},className:"text-foreground hover:text-primary transition-colors font-medium py-2 text-left flex items-center",children:[s.jsx(kl,{className:"w-4 h-4 mr-2"}),"Admin"]}),s.jsxs("button",{onClick:()=>{r("/dashboard"),t()},className:"text-foreground hover:text-primary transition-colors font-medium py-2 text-left flex items-center",children:[s.jsx(Nn,{className:"w-4 h-4 mr-2"}),"Î ÎογαÏιαÏμÏÏ Î¼Î¿Ï "]}),s.jsxs("button",{onClick:()=>{m(),t()},className:"text-foreground hover:text-primary transition-colors font-medium py-2 text-left flex items-center",children:[s.jsx(fy,{className:"w-4 h-4 mr-2"}),"ÎξοδοÏ"]})]}):s.jsx("button",{onClick:()=>{const f=window.location.pathname==="/dashboard"?"":window.location.pathname+window.location.search;r(f?`/auth?returnUrl=${encodeURIComponent(f)}`:"/auth"),t()},className:"text-foreground hover:text-primary transition-colors font-medium py-2 text-left",children:"ÎίÏοδοÏ"})]})})]})})},H9=({hapticFeedback:e="light",gradient:t=!1,elevation:r="low",onClick:n,...a})=>{const{lightImpact:i,mediumImpact:o,heavyImpact:l,selectionChanged:c}=xw(),d=async f=>{switch(e){case"light":await i();break;case"medium":await o();break;case"heavy":await l();break;case"selection":await c();break}n&&n(f)},m=` 647 touch-manipulation 648 min-h-[var(--mobile-touch-target)] 649 transition-all 650 duration-200 651 active:scale-95 652 ${(()=>{switch(r){case"none":return"";case"low":return"shadow-sm";case"medium":return"shadow-md";case"high":return"shadow-lg";default:return"shadow-sm"}})()} 653 ${t?"bg-gradient-to-r from-primary to-primary/80 text-primary-foreground border-0 hover:from-primary/90 hover:to-primary/70":""} 654 ${a.className||""} 655 `;return s.jsx(F,{...a,onClick:d,className:m.trim()})},q9=()=>{const e=qe();return s.jsxs("section",{className:"relative min-h-[80vh] sm:min-h-[75vh] md:min-
655h-[67vh] flex items-center justify-start bg-stone-50",children:[s.jsx("div",{className:"absolute inset-0",children:s.jsx("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"w-full h-full object-cover opacity-90","aria-label":"Fitness workout background video",children:s.jsx("source",{src:"/hero-video.mp4",type:"video/mp4"})})}),s.jsx("div",{className:"relative z-10 container mx-auto px-4 pt-16 sm:pt-20 md:pt-6",children:s.jsxs("div",{className:"max-w-4xl",children:[s.jsxs("h1",{className:"text-lg sm:text-xl md:text-3xl lg:text-4xl font-light text-stone-800 mb-6 md:mb-8 leading-tight tracking-wide text-left",children:["ΦΡÎÎΤÎΣΤΠΤÎÎ ÎÎΥΤΠΣÎΣ,",s.jsx("br",{}),"ÎÎ ÎÎ¥ÎÎÎ ÎΤÎ, ÎÎ ÎÎÎÎÎÎ ÎΤΠΣΤÎÎÎÎ."]}),s.jsx("div",{className:"mb-8 md:mb-12 text-center md:text-left",children:s.jsx(F,{size:"lg",className:"bg-white text-stone-800 hover:bg-stone-100 px-6 sm:px-8 md:px-10 lg:px-12 py-3 md:py-4 text-base sm:text-lg md:text-xl font-medium rounded-none border border-stone-300 shadow-sm transition-all duration-200 min-h-[44px]",onClick:()=>e("/subscription-plans"),children:"ÎÎÎÎÎÎΣΤΠÎΩΡÎÎÎ ÎÎÎ 7 ÎÎÎΡÎΣ!"})})]})}),s.jsx("div",{className:"absolute bottom-[-3rem] sm:bottom-[-6rem] md:bottom-[-8rem] left-4 right-4 z-20",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx("div",{className:"max-w-4xl mx-auto",children:s.jsxs("div",{className:"bg-white/80 backdrop-blur-sm p-4 sm:p-6 md:p-8 rounded-sm shadow-sm relative",children:[s.jsx("p",{className:"text-base sm:text-lg md:text-xl lg:text-2xl font-light text-stone-700 leading-relaxed text-center px-7 sm:px-0",children:"ÎγαÏήÏÏε Ïο ÏÏμα ÏÎ±Ï ÎºÎ±Î¹ δείÏε Ïο να αλλάζει Ïιζικά, με ÏÏογÏάμμαÏα ÏÎ¿Ï ÎºÎ±Î»ÏÏÏÎ¿Ï Î½ ÏÎ¹Ï Î±Î½Î¬Î³ÎºÎµÏ Î¼Î¹Î±Ï Î¿Î»Î¿ÎºÎ»Î·ÏÏμÎÎ½Î·Ï Î¬ÏκηÏηÏ: Î¼Ï Ïκή ÎµÎ½Î´Ï Î½Î¬Î¼ÏÏη, αεÏÏβια κίνηÏη, ÎµÏ Î»Ï Î³Î¹Ïία και ιÏοÏÏοÏία."}),s.jsx(H9,{className:"absolute bottom-0 right-0 transform translate-x-[35%] sm:translate-x-1/2 translate-y-1/2 rotate-[8deg] z-30 w-20 h-20 sm:w-24 sm:h-24 md:w-28 md:h-28 lg:w-32 lg:h-32 rounded-full bg-gradient-to-br from-[#e8a6a4] via-[#d38280] to-[#c17270] hover:from-[#f0bbb9] hover:via-[#e8a6a4] hover:to-[#d38280] text-white text-[9px] sm:text-[10px] md:text-xs lg:text-sm font-extrabold px-2 py-2 shadow-[0_8px_16px_rgba(0,0,0,0.15),0_4px_8px_rgba(211,130,128,0.3),inset_0_1px_0_rgba(255,255,255,0.2),inset_0_-1px_0_rgba(0,0,0,0.1)] hover:shadow-[0_12px_24px_rgba(0,0,0,0.2),0_6px_12px_rgba(211,130,128,0.4),inset_0_1px_0_rgba(255,255,255,0.3)] hover:scale-105 hover:translate-y-[-2px] hover:brightness-110 active:translate-y-[1px] active:scale-100 active:shadow-[0_4px_8px_rgba(0,0,0,0.2)] transition-all duration-300 ease-out flex items-center justify-center text-center leading-none",onClick:()=>e("/subscription-plans"),hapticFeedback:"medium",elevation:"high",style:{textShadow:"0 1px 2px rgba(0,0,0,0.3)",filter:"drop-shadow(0 2px 4px rgba(211,130,128,0.2))"},children:s.jsxs("span",{className:"flex flex-col items-center leading-tight",children:[s.jsx("span",{className:"text-[8px] sm:text-[9px] md:text-[10px] lg:text-xs",children:"ÎÏνο με"}),s.jsx("span",{className:"text-base sm:text-lg md:text-xl lg:text-2xl font-black",children:"9,90â¬"}),s.jsx("span",{className:"text-[8px] sm:text-[9px] md:text-[10px] lg:text-xs",children:"/μήνα"})]})})]})})})})]})};function G9(e,t=new Date){return e?new Date(e)<=t:!0}function Y9(e,t=new Date){return e.filter(r=>G9(r.published_at,t))}class K9{async getSectionsByPageType(t){const{data:r,error:n}=await U.from("workout_sections").select("*").contains("page_types",[t]).eq("is_active",!0).order("sort_order",{ascending:!0});if(n)throw n;return r||[]}async getAllSections(){const{data:t,error:r}=await U.from("workout_sections").select("*").order("sort_order",{ascending:!0});if(r)throw r;return t||[]}async getSectionBySlug(t){const{data:r,error:n}=await U.from("workout_sections").select("*").eq("slug",t).eq("is_active",!0).single();if(n){if(n.code==="PGRST116")return null;throw n}return r}async getVideosBySection(t){const{data:r,error:n}=await U.from("section_video_assignments").select("video_id, sort_order").eq("section_id",t).order("sort_order",{ascending:!0});if(n)throw n;if(!r||r.length===0)return[];const a=r.map(c=>c.video_id);new Map(r.map(c=>[c.video_id,c.sort_order]));const{data:i,error:o}=await U.from("videos").select(` 656 *, 657 instructors!instructor_id ( 658 id, 659 name, 660 bio, 661 photo_url 662 ) 663 `).in("vimeo_id",a).eq("is_visible",!0);if(o)throw o;return Y9(i||[]).sort((c,d)=>{const u=new Date(c.published_at??c.created_at).getTime(),m=new Date(d.published_at??d.created_at).getTime();return m!==u?m-u:c.vimeo_id.localeCompare(d.vimeo_id)})}async getAdminVideosBySection(t){const{data:r,error:n}=await U.from("section_video_assignments").select("video_id, sort_order").eq("section_id",t).order("sort_order",{ascending:!0});if(n)throw n;if(!r||r.length===0)return[];const a=r.map(l=>l.video_id);new Map(r.map(l=>[l.video_id,l.sort_order]));const{data:i,error:o}=await U.from("videos").select(` 664 *, 665 instructors!instructor_id ( 666 id, 667 name, 668 bio, 669 photo_url 670 ) 671 `).in("vimeo_id",a);if(o)throw o;return(i||[]).sort((l,c)=>{const d=new Date(l.published_at??l.created_at).getTime(),u=new Date(c.published_at??c.created_at).getTime();return u!==d?u-d:l.vimeo_id.localeCompare(c.vimeo_id)})}
671async getSectionsWithVideos(t){const r=await this.getSectionsByPageType(t);return(await Promise.all(r.map(async a=>{const i=await this.getVideosBySection(a.id);return{...a,videos:i}}))).filter(a=>a.videos.length>0)}async createSection(t){const{data:r,error:n}=await U.from("workout_sections").insert(t).select().single();if(n)throw n;return r}async updateSection(t,r){const{data:n,error:a}=await U.from("workout_sections").update(r).eq("id",t).select().single();if(a)throw a;return n}async deleteSection(t){const{error:r}=await U.from("workout_sections").delete().eq("id",t);if(r)throw r}async assignVideoToSection(t,r,n=0){const{error:a}=await U.from("section_video_assignments").insert({section_id:t,video_id:r,sort_order:n});if(a)throw a}async removeVideoFromSection(t,r){const{error:n}=await U.from("section_video_assignments").delete().eq("section_id",t).eq("video_id",r);if(n)throw n}async updateVideoSectionAssignment(t,r,n){const{error:a}=await U.from("section_video_assignments").update({sort_order:n}).eq("section_id",t).eq("video_id",r);if(a)throw a}async bulkAssignVideosToSection(t,r){const n=r.map((i,o)=>({section_id:t,video_id:i,sort_order:o})),{error:a}=await U.from("section_video_assignments").insert(n);if(a)throw a}}const gm=new K9,vw="/assets/workout-1-Cu3-2YLL.jpg",yw="/assets/workout-2-BZclJIP_.jpg",bw="/assets/workout-3-CHp5YhCU.jpg",ww="/assets/workout-4-DAW8P4fx.jpg",jw="/assets/workout-5-B9U30CK7.jpg",S1=[vw,yw,bw,ww,jw],Q9={phat:"/category-images/phat-3.png",pilates:"/category-images/pilates-new.jpg","body sculpting":"/category-images/sculpting-new.jpg","barre workout":"/category-images/barre-new.jpg",barre:"/category-images/barre-new.jpg",breathworks:"/category-images/breathworks-3.png",διαλογιÏμοι:"/category-images/dialogismoi-4.png",stretching:"/category-images/stretching-new.jpg","stretching & εÏ
λÏ
γιÏια":"/category-images/stretching-new.jpg","office workouts":"/category-images/office.png",office:"/category-images/office.png","pelvic floor":"/category-images/pelvic-3.png",pelvic:"/category-images/pelvic-3.png","face workouts":"/category-images/face.png",face:"/category-images/face.png","sweat 16":"/category-images/sweat16-4.png",sweat16:"/category-images/sweat16-4.png","prenatal + postnatal":"/category-images/prenatal-new.jpeg",prenatal:"/category-images/prenatal-new.jpeg",postnatal:"/category-images/prenatal-new.jpeg","strong bones workouts":"/category-images/strong-bones.jpg","strong bones":"/category-images/strong-bones.jpg",yoga:"/category-images/yoga-new.jpg","nadia's videos":"/category-images/nadias-videos.png"},Jy=(e,t)=>{const r=e.toLowerCase().trim();return Q9[r]||S1[t%S1.length]},X9=e=>{const t=e.toLowerCase().trim();return t==="face"||t==="face workouts"?"35% center":"center"},J9=e=>e.toLowerCase().trim().includes("strong bones")?"bg-gradient-to-t from-amber-900/40 via-black/15 to-black/10":"bg-gradient-to-t from-amber-900/30 via-amber-900/5 to-transparent",Z9=[{name:"ÎÎÎÎÎÎÎΣÎÎÎ",image:Jy("διαλογιÏμοι",0),description:"Î ÏακÏικÎÏ Î´Î¹Î±Î»Î¿Î³Î¹ÏÎ¼Î¿Ï ÎºÎ±Î¹ εÏÏÏεÏÎ¹ÎºÎ®Ï Î³Î±Î»Î®Î½Î·Ï",route:"/catalog?filter=dialogismoi"},{name:"BREATHWORKS",image:Jy("breathworks",1),description:"ÎÏκήÏÎµÎ¹Ï Î±Î½Î±ÏÎ½Î¿Î®Ï ÎºÎ±Î¹ ÏαλάÏÏÏηÏ",route:"/catalog?filter=breathworks"}],ez=()=>{const e=qe(),[t,r]=h.useState([]),[n,a]=h.useState(!0);h.useEffect(()=>{(async()=>{try{const d=await gm.getSectionsByPageType("workouts");r(d)}catch(d){console.error("Error fetching workout sections:",d)}finally{a(!1)}})()},[]);const i=c=>{e(c)},l=[...t.map((c,d)=>({name:c.name.toUpperCase(),image:Jy(c.name,d),description:c.description||`Î ÏοÏονήÏÎµÎ¹Ï ${c.name}`,route:`/section/${c.slug}`})),...Z9];return n?s.jsx("section",{className:"py-16 bg-background",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("div",{className:"text-center mb-12",children:s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"ÎÎΤÎÎÎΡÎÎΣ ΠΡÎÎ ÎÎÎΣÎΣ"})}),s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})]})}):s.jsx("section",{className:"pt-20 md:pt-32 lg:pt-40 pb-8 bg-background",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("div",{className:"text-center mb-12",children:s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"ÎÎΤÎÎÎΡÎÎΣ ΠΡÎÎ ÎÎÎΣÎΣ"})}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-7 gap-4 sm:gap-3 md:gap-2",children:l.map((c,d)=>s.jsxs("div",{className:"group relative aspect-[3/4] sm:aspect-[2/3] overflow-hidden rounded-lg cursor-pointer transform transition-all duration-300 hover:scale-105 hover:shadow-lg min-h-[44px]",onClick:()=>i(c.route),children:[s.jsx("div",{className:"absolute inset-0 bg-cover transition-transform duration-300 group-hover:scale-110",style:{backgroundImage:`url(${c.image})`,backgroundPosition:X9(c.name)}}),s.jsx("div",{className:`absolute inset-0 ${J9(c.name)}`}),s.jsxs("div",{className:"absolute inset-0",children:[s.jsx("h3",{className:"absolute bottom-6 left-1/2 -translate-x-1/2 w-[88%] text-white text-sm sm:text-base md:text-lg font-bold text-center whitespace-nowrap truncate transform transition-transform duration-300 group-hover:scale-105",children:c.name}),s.jsx("p",{className:"absolute bottom-[4.25rem] left-1/2 -translate-x-1/2 w-[88%] text-white/80 text-xs text-center transform transition-all duration-300 opacity-0 md:group-hover:opacity-100 line-clamp-2 hidden md:block",children:c.description})]})]},d))})]})})},tz="/assets/app-store-badge-CeSfv3FF.png",sz="/assets/google-play-badge-ja-q5zjW.png",rz=({vimeoUrl:e="",topSubtitle:t="ÎÎÎΩΣ ÎΡÎÎΤΠΣΤÎ",topHeading:r="Well Be Workouts",topColumns:n=[{title:"Î ÏοÏονήÏÎµÎ¹Ï Î³Î¹Î± ÏÎ»ÎµÏ ÏÎ¹Ï Î
671·Î»Î¹ÎºÎ¯ÎµÏ, ÏλοÏ
Ï ÏοÏ
Ï ÏÏμαÏÏÏÏ
ÏοÏ
Ï ÎºÎ±Î¹ Ïλα Ïα εÏίÏεδα δÏ
ÏκολίαÏ.",description:"ÎÎα ÏÏοÏεινÏμενα εβδομαδιαία ÏÏογÏάμμαÏα, κάθε ÎεÏ
ÏÎÏα! Îιάλεξε μÎÏα αÏÏ 300+ μοναδικÎÏ ÏÏοÏονήÏÎµÎ¹Ï Î´Î¹Î¬ÏÎºÎµÎ¹Î±Ï 5-70 λεÏÏÏν."},{title:"ÎÎα Challenges, μÎÏα αÏÏ Ïην ÎοινÏÏηÏα.",description:"ÎοκίμαÏε Ïον εαÏ
ÏÏ ÏοÏ
, γίνε καλÏÏεÏοÏ, ÎµÎ½Ï Î¼Î¿Î¹ÏάζεÏαι ÏÎ¹Ï ÏÏοÏονήÏÎµÎ¹Ï ÏοÏ
με Ïα Ï
ÏÏλοιÏα μÎλη και Î´ÎµÏ Ïον εαÏ
ÏÏ ÏοÏ
να μÏαίνει ÏÏο Hall Of Fame ÏÏν Well Be Workouts!"},{title:"ÎÏοÏ
δήÏοÏε και οÏοÏεδήÏοÏε.",description:"ΠαÏακολοÏθηÏε Ïα αγαÏημÎνα ÏοÏ
video αÏÏ Î¿ÏοιαδήÏοÏε ÏÏ
ÏκεÏ
ή ή καÏÎβαÏÎ Ïα για offline ÏÏοβολή."}]})=>{const[a,i]=h.useState(!1),o=h.useRef(null),l=()=>{var c;if(o.current){const d=a?'{"method":"pause"}':'{"method":"play"}';(c=o.current.contentWindow)==null||c.postMessage(d,"*"),i(!a)}};return s.jsx("section",{className:"relative py-8 md:py-12 bg-stone-50",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-6xl mx-auto grid grid-cols-1 md:grid-cols-[auto_1fr] gap-8 md:gap-10 lg:gap-12 items-center",children:[s.jsx("div",{className:"flex justify-center order-2 md:order-none md:col-start-1 md:self-center",children:s.jsx("div",{className:"relative w-[200px] sm:w-[240px] md:w-[260px]",children:s.jsxs("div",{className:"relative bg-stone-900 rounded-[2.5rem] p-3 shadow-2xl",children:[s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-32 h-6 bg-stone-900 rounded-b-3xl z-10"}),s.jsx("div",{className:"relative bg-black rounded-[2rem] overflow-hidden aspect-[9/19.5]",children:s.jsx("div",{className:"absolute inset-0 overflow-hidden",children:e?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"absolute top-1/2 left-1/2 h-full aspect-[16/9] -translate-x-1/2 -translate-y-1/2",children:s.jsx("iframe",{ref:o,src:e,className:"w-full h-full pointer-events-none",allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,title:"Workout Video"})}),s.jsx("button",{onClick:l,className:"absolute inset-0 flex items-center justify-center z-10 bg-transparent hover:bg-black/10 transition-colors","aria-label":a?"Pause video":"Play video",children:s.jsx("div",{className:"bg-black/50 backdrop-blur-sm rounded-full p-4 hover:bg-black/70 transition-colors",children:a?s.jsx(V5,{className:"w-8 h-8 text-white",fill:"white"}):s.jsx(Os,{className:"w-8 h-8 text-white",fill:"white"})})})]}):s.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-stone-400 text-center p-8",children:s.jsx("p",{className:"text-sm",children:"Video will appear here"})})})})]})})}),s.jsxs("div",{className:"contents md:flex md:flex-col md:gap-6 md:col-start-2 md:self-center",children:[s.jsxs("div",{className:"space-y-2 order-1 md:order-none",children:[s.jsx("p",{className:"text-xs sm:text-sm font-semibold tracking-wider text-primary uppercase",children:t}),s.jsx("h2",{className:"text-xl sm:text-2xl md:text-3xl lg:text-4xl xl:text-5xl font-light text-stone-800 dark:text-stone-100",children:r})]}),s.jsxs("div",{className:"space-y-6 order-3 md:order-none",children:[s.jsx("div",{className:"grid grid-cols-1 gap-4 sm:gap-6",children:n.map((c,d)=>s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-sm sm:text-base font-bold tracking-wide text-stone-900",children:W0(c.title)}),s.jsx("p",{className:"text-sm sm:text-base text-stone-600 leading-relaxed",children:c.description})]},d))}),s.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[s.jsx("h3",{className:"text-sm sm:text-base font-bold tracking-wide text-stone-900 dark:text-stone-100",children:"ÎαÏεβάÏÏε Ïο app."}),s.jsxs("div",{className:"flex flex-row gap-3",children:[s.jsx("a",{href:"https://apps.apple.com/us/app/well-be-workouts/id1631929495",target:"_blank",rel:"noopener noreferrer",className:"transition-transform hover:scale-105",children:s.jsx("img",{src:tz,alt:"Download on App Store",className:"h-9 sm:h-10 w-auto"})}),s.jsx("a",{href:"https://play.google.com/store/apps/details?id=tv.uscreen.wellbeworkouts",target:"_blank",rel:"noopener noreferrer",className:"transition-transform hover:scale-105",children:s.jsx("img",{src:sz,alt:"Get it on Google Play",className:"h-9 sm:h-10 w-auto"})})]})]})]})]})]})})})},oe=h.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:me("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
vendor: 9,051 bytes, line 671
671oe.displayName="Card";const xe=h.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:me("flex flex-col space-y-1.5 p-6",e),...t}));xe.displayName="CardHeader";const be=h.forwardRef(({className:e,...t},r)=>s.jsx("h3",{ref:r,className:me("text-2xl font-semibold leading-none tracking-tight",e),...t}));be.displayName="CardTitle";const gt=h.forwardRef(({className:e,...t},r)=>s.jsx("p",{ref:r,className:me("text-sm text-muted-foreground",e),...t}));gt.displayName="CardDescription";const ce=h.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:me("p-6 pt-0",e),...t}));ce.displayName="CardContent";const nz=h.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:me("flex items-center p-6 pt-0",e),...t}));nz.displayName="CardFooter";function az(e){return Object.prototype.toString.call(e)==="[object Object]"}function C1(e){return az(e)||Array.isArray(e)}function iz(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Nw(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const a=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return a!==i?!1:r.every(o=>{const l=e[o],c=t[o];return typeof l=="function"?`${l}`==`${c}`:!C1(l)||!C1(c)?l===c:Nw(l,c)})}function E1(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function oz(e,t){if(e.length!==t.length)return!1;const r=E1(e),n=E1(t);return r.every((a,i)=>{const o=n[i];return Nw(a,o)})}function _w(e){return typeof e=="number"}function Zy(e){return typeof e=="string"}function fg(e){return typeof e=="boolean"}function P1(e){return Object.prototype.toString.call(e)==="[object Object]"}function Kt(e){return Math.abs(e)}function kw(e){return Math.sign(e)}function $u(e,t){return Kt(e-t)}function lz(e,t){if(e===0||t===0||Kt(e)<=Kt(t))return 0;const r=$u(Kt(e),Kt(t));return Kt(r/e)}function cz(e){return Math.round(e*100)/100}function xm(e){return vm(e).map(Number)}function sa(e){return e[Gm(e)]}function Gm(e){return Math.max(0,e.length-1)}function Sw(e,t){return t===Gm(e)}function T1(e,t=0){return Array.from(Array(e),(r,n)=>t+n)}function vm(e){return Object.keys(e)}function xP(e,t){return[e,t].reduce((r,n)=>(vm(n).forEach(a=>{const i=r[a],o=n[a],l=P1(i)&&P1(o);r[a]=l?xP(i,o):o}),r),{})}function eb(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function dz(e,t){const r={start:n,center:a,end:i};function n(){return 0}function a(c){return i(c)/2}function i(c){return t-c}function o(c,d){return Zy(e)?r[e](c):e(t,c,d)}return{measure:o}}function ym(){let e=[];function t(a,i,o,l={passive:!0}){let c;if("addEventListener"in a)a.addEventListener(i,o,l),c=()=>a.removeEventListener(i,o,l);else{const d=a;d.addListener(o),c=()=>d.removeListener(o)}return e.push(c),n}function r(){e=e.filter(a=>a())}const n={add:t,clear:r};return n}function uz(e,t,r,n){const a=ym(),i=1e3/60;let o=null,l=0,c=0;function d(){a.add(e,"visibilitychange",()=>{e.hidden&&v()})}function u(){p(),a.clear()}function m(b){if(!c)return;o||(o=b,r(),r());const y=b-o;for(o=b,l+=y;l>=i;)r(),l-=i;const x=l/i;n(x),c&&(c=t.requestAnimationFrame(m))}function f(){c||(c=t.requestAnimationFrame(m))}function p(){t.cancelAnimationFrame(c),o=null,l=0,c=0}function v(){o=null,l=0}return{init:d,destroy:u,start:f,stop:p,update:r,render:n}}function mz(e,t){const r=t==="rtl",n=e==="y",a=n?"y":"x",i=n?"x":"y",o=!n&&r?-1:1,l=u(),c=m();function d(v){const{height:g,width:b}=v;return n?g:b}function u(){return n?"top":r?"right":"left"}function m(){return n?"bottom":r?"left":"right"}function f(v){return v*o}return{scroll:a,cross:i,startEdge:l,endEdge:c,measureSize:d,direction:f}}function Pl(e=0,t=0){const r=Kt(e-t);function n(d){return d<e}function a(d){return d>t}function i(d){return n(d)||a(d)}function o(d){return i(d)?n(d)?e:t:d}function l(d){return r?d-r*Math.ceil((d-t)/r):d}return{length:r,max:t,min:e,constrain:o,reachedAny:i,reachedMax:a,reachedMin:n,removeOffset:l}}function vP(e,t,r){const{constrain:n}=Pl(0,e),a=e+1;let i=o(t);function o(f){return r?Kt((a+f)%a):n(f)}function l(){return i}function c(f){return i=o(f),m}function d(f){return u().set(l()+f)}function u(){return vP(e,l(),r)}const m={get:l,set:c,add:d,clone:u};return m}function hz(e,t,r,n,a,i,o,l,c,d,u,m,f,p,v,g,b,y,x){const{cross:w,direction:j}=e,N=["INPUT","SELECT","TEXTAREA"],S={passive:!1},E=ym(),_=ym(),I=Pl(50,225).constrain(p.measure(20)),R={mouse:300,touch:400},T={mouse:500,touch:600},k=v?43:25;let C=!1,A=0,L=0,O=!1,P=!1,M=!1,D=!1;function $(re){if(!x)return;function de(Ee){(fg(x)||x(re,Ee))&&te(Ee)}const Pe=t;E.add(Pe,"dragstart",Ee=>Ee.preventDefault(),S).add(Pe,"touchmove",()=>{},S).add(Pe,"touchend",()=>{}).add(Pe,"touchstart",de).add(Pe,"mousedown",de).add(Pe,"touchcancel",le).add(Pe,"contextmenu",le).add(Pe,"click",J,!0)}function W(){E.clear(),_.clear()}function X(){const re=D?r:t;_.add(re,"touchmove",B,S).add(re,"touchend",le).add(re,"mousemove",B,S).add(re,"mouseup",le)}function q(re){const de=re.nodeName||"";return N.includes(de)}function H(){return(v?T:R)[D?"mouse":"touch"]}function se(re,de){const Pe=m.add(kw(re)*-1),Ee=u.byDistance(re,!v).distance;return v||Kt(re)<I?Ee:b&&de?Ee*.5:u.byIndex(Pe.get(),0).distance}function te(re){const de=eb(re,n);D=de,M=v&&de&&!re.buttons&&C,C=$u(a.get(),o.get())>=2,!(de&&re.button!==0)&&(q(re.target)||(O=!0,i.pointerDown(re),d.useFriction(0).useDuration(0),a.set(o),X(),A=i.readPoint(re),L=i.readPoint(re,w),f.emit("pointerDown")))}function B(re){if(!eb(re,n)&&re.touches.length>=2)return le(re);const Pe=i.readPoint(re),Ee=i.readPoint(re,w),tt=$u(Pe,A),ze=$u(Ee,L);if(!P&&!D&&(!re.cancelable||(P=tt>ze,!P)))return le(re);const et=i.pointerMove(re);tt>g&&(M=!0),d.useFriction(.3).useDuration(.75),l.start(),a.add(j(et)),re.preventDefault()}function le(re){const Pe=u.byDistance(0,!1).index!==m.get(),Ee=i.pointerUp(re)*H(),tt=se(j(Ee),Pe),ze=lz(Ee,tt),et=k-10*ze,st=y+ze/50;P=!1,O=!1,_.clear(),d.useDuration(et).useFriction(st),c.distance(tt,!v),D=!1,f.emit("pointerUp")}function J(re){M&&(re.stopPropagation(),re.preventDefault(),M=!1)}function K(){return O}return{init:$,destroy:W,pointerDown:K}}function fz(e,t){let n,a;function i(m){return m.timeStamp}function o(m,f){const v=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(eb(m,t)?m:m.touches[0])[v]}function l(m){return n=m,a=m,o(m)}function c(m){const f=o(m)-o(a),p=i(m)-i(n)>170;return a=m,p&&(n=m),f}function d(m){if(!n||!a)return 0;const f=o(a)-o(n),p=i(m)-i(n),v=i(m)-i(a)>170,g=f/p;return p&&!v&&Kt(g)>.1?g:0}return{pointerDown:l,pointerMove:c,pointerUp:d,readPoint:o}}function pz(){function e(r){const{offsetTop:n,offsetLeft:a,offsetWidth:i,offsetHeight:o}=r;return{top:n,right:a+i,bottom:n+o,left:a,width:i,height:o}}return{measure:e}}function gz(e){function t(n){return e*(n/100)}return{measure:t}}function xz(e,t,r,n,a,i,o){const l=[e].concat(n);let c,d,u=[],m=!1;function f(b){return a.measureSize(o.measure(b))}function p(b){if(!i)return;d=f(e),u=n.map(f);function y(x){for(const w of x){if(m)return;const j=w.target===e,N=n.indexOf(w.target),S=j?d:u[N],E=f(j?e:n[N]);if(Kt(E-S)>=.5){b.reInit(),t.emit("resize");break}}}c=new ResizeObserver(x=>{(fg(i)||i(b,x))&&y(x)}),r.requestAnimationFrame(()=>{l.forEach(x=>c.observe(x))})}function v(){m=!0,c&&c.disconnect()}return{init:p,destroy:v}}function vz(e,t,r,n,a,i){let o=0,l=0,c=a,d=i,u=e.get(),m=0;function f(){const S=n.get()-e.get(),E=!c;let _=0;return E?(o=0,r.set(n),e.set(n),_=S):(r.set(e),o+=S/c,o*=d,u+=o,e.add(o),_=u-m),l=kw(_),m=u,N}function p(){const S=n.get()-t.get();return Kt(S)<.001}function v(){return c}function g(){return l}function b(){return o}function y(){return w(a)}function x(){return j(i)}function w(S){return c=S,N}function j(S){return d=S,N}const N={direction:g,duration:v,velocity:b,seek:f,settled:p,useBaseFriction:x,useBaseDuration:y,useFriction:j,useDuration:w};return N}function yz(e,t,r,n,a){const i=a.measure(10),o=a.measure(50),l=Pl(.1,.99);let c=!1;function d(){return!(c||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function u(p){if(!d())return;const v=e.reachedMin(t.get())?"min":"max",g=Kt(e[v]-t.get()),b=r.get()-t.get(),y=l.constrain(g/o);r.subtract(b*y),!p&&Kt(b)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function m(p){c=!p}return{shouldConstrain:d,constrain:u,toggleActive:m}}function bz(e,t,r,n,a){const i=Pl(-t+e,0),o=m(),l=u(),c=f();function d(v,g){return $u(v,g)<=1}function u(){const v=o[0],g=sa(o),b=o.lastIndexOf(v),y=o.indexOf(g)+1;return Pl(b,y)}function m(){return r.map((v,g)=>{const{min:b,max:y}=i,x=i.constrain(v),w=!g,j=Sw(r,g);return w?y:j||d(b,x)?b:d(y,x)?y:x}).map(v=>parseFloat(v.toFixed(3)))}function f(){if(t<=e+a)return[i.max];if(n==="keepSnaps")return o;const{min:v,max:g}=l;return o.slice(v,g)}return{snapsContained:c,scrollContainLimit:l}}function wz(e,t,r){const n=t[0],a=r?n-e:sa(t);return{limit:Pl(a,n)}}function jz(e,t,r,n){const i=t.min+.1,o=t.max+.1,{reachedMin:l,reachedMax:c}=Pl(i,o);function d(f){return f===1?c(r.get()):f===-1?l(r.get()):!1}function u(f){if(!d(f))return;const p=e*(f*-1);
vendor: 7,662 bytes, line 671
671n.forEach(v=>v.add(p))}return{loop:u}}function Nz(e){const{max:t,length:r}=e;function n(i){const o=i-t;return r?o/-r:0}return{get:n}}function _z(e,t,r,n,a){const{startEdge:i,endEdge:o}=e,{groupSlides:l}=a,c=m().map(t.measure),d=f(),u=p();function m(){return l(n).map(g=>sa(g)[o]-g[0][i]).map(Kt)}function f(){return n.map(g=>r[i]-g[i]).map(g=>-Kt(g))}function p(){return l(d).map(g=>g[0]).map((g,b)=>g+c[b])}return{snaps:d,snapsAligned:u}}function kz(e,t,r,n,a,i){const{groupSlides:o}=a,{min:l,max:c}=n,d=u();function u(){const f=o(i),p=!e||t==="keepSnaps";return r.length===1?[i]:p?f:f.slice(l,c).map((v,g,b)=>{const y=!g,x=Sw(b,g);if(y){const w=sa(b[0])+1;return T1(w)}if(x){const w=Gm(i)-sa(b)[0]+1;return T1(w,sa(b)[0])}return v})}return{slideRegistry:d}}function Sz(e,t,r,n,a){const{reachedAny:i,removeOffset:o,constrain:l}=n;function c(v){return v.concat().sort((g,b)=>Kt(g)-Kt(b))[0]}function d(v){const g=e?o(v):l(v),b=t.map((x,w)=>({diff:u(x-g,0),index:w})).sort((x,w)=>Kt(x.diff)-Kt(w.diff)),{index:y}=b[0];return{index:y,distance:g}}function u(v,g){const b=[v,v+r,v-r];if(!e)return v;if(!g)return c(b);const y=b.filter(x=>kw(x)===g);return y.length?c(y):sa(b)-r}function m(v,g){const b=t[v]-a.get(),y=u(b,g);return{index:v,distance:y}}function f(v,g){const b=a.get()+v,{index:y,distance:x}=d(b),w=!e&&i(b);if(!g||w)return{index:y,distance:v};const j=t[y]-x,N=v+u(j,0);return{index:y,distance:N}}return{byDistance:f,byIndex:m,shortcut:u}}function Cz(e,t,r,n,a,i,o){function l(m){const f=m.distance,p=m.index!==t.get();i.add(f),f&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(r.set(t.get()),t.set(m.index),o.emit("select"))}function c(m,f){const p=a.byDistance(m,f);l(p)}function d(m,f){const p=t.clone().set(m),v=a.byIndex(p.get(),f);l(v)}return{distance:c,index:d}}function Ez(e,t,r,n,a,i,o,l){const c={passive:!0,capture:!0};let d=0;function u(p){if(!l)return;function v(g){if(new Date().getTime()-d>10)return;o.emit("slideFocusStart"),e.scrollLeft=0;const x=r.findIndex(w=>w.includes(g));_w(x)&&(a.useDuration(0),n.index(x,0),o.emit("slideFocus"))}i.add(document,"keydown",m,!1),t.forEach((g,b)=>{i.add(g,"focus",y=>{(fg(l)||l(p,y))&&v(b)},c)})}function m(p){p.code==="Tab"&&(d=new Date().getTime())}return{init:u}}function xu(e){let t=e;function r(){return t}function n(c){t=o(c)}function a(c){t+=o(c)}function i(c){t-=o(c)}function o(c){return _w(c)?c:c.get()}return{get:r,set:n,add:a,subtract:i}}function yP(e,t){const r=e.scroll==="x"?o:l,n=t.style;let a=null,i=!1;function o(f){return`translate3d(${f}px,0px,0px)`}function l(f){return`translate3d(0px,${f}px,0px)`}function c(f){if(i)return;const p=cz(e.direction(f));p!==a&&(n.transform=r(p),a=p)}function d(f){i=!f}function u(){i||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:u,to:c,toggleActive:d}}function Pz(e,t,r,n,a,i,o,l,c){const u=xm(a),m=xm(a).reverse(),f=y().concat(x());function p(E,_){return E.reduce((I,R)=>I-a[R],_)}function v(E,_){return E.reduce((I,R)=>p(I,_)>0?I.concat([R]):I,[])}function g(E){return i.map((_,I)=>({start:_-n[I]+.5+E,end:_+t-.5+E}))}function b(E,_,I){const R=g(_);return E.map(T=>{const k=I?0:-r,C=I?r:0,A=I?"end":"start",L=R[T][A];return{index:T,loopPoint:L,slideLocation:xu(-1),translate:yP(e,c[T]),target:()=>l.get()>L?k:C}})}function y(){const E=o[0],_=v(m,E);return b(_,r,!1)}function x(){const E=t-o[0]-1,_=v(u,E);return b(_,-r,!0)}function w(){return f.every(({index:E})=>{const _=u.filter(I=>I!==E);return p(_,t)<=.1})}function j(){f.forEach(E=>{const{target:_,translate:I,slideLocation:R}=E,T=_();T!==R.get()&&(I.to(T),R.set(T))})}function N(){f.forEach(E=>E.translate.clear())}return{canLoop:w,clear:N,loop:j,loopPoints:f}}function Tz(e,t,r){let n,a=!1;function i(c){if(!r)return;function d(u){for(const m of u)if(m.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{a||(fg(r)||r(c,u))&&d(u)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),a=!0}return{init:i,destroy:o}}function Az(e,t,r,n){const a={};let i=null,o=null,l,c=!1;function d(){l=new IntersectionObserver(v=>{c||(v.forEach(g=>{const b=t.indexOf(g.target);a[b]=g}),i=null,o=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(v=>l.observe(v))}function u(){l&&l.disconnect(),c=!0}function m(v){return vm(a).reduce((g,b)=>{const y=parseInt(b),{isIntersecting:x}=a[y];return(v&&x||!v&&!x)&&g.push(y),g},[])}function f(v=!0){if(v&&i)return i;if(!v&&o)return o;const g=m(v);return v&&(i=g),v||(o=g),g}return{init:d,destroy:u,get:f}}function Iz(e,t,r,n,a,i){const{measureSize:o,startEdge:l,endEdge:c}=e,d=r[0]&&a,u=v(),m=g(),f=r.map(o),p=b();function v(){if(!d)return 0;const x=r[0];return Kt(t[l]-x[l])}function g(){if(!d)return 0;const x=i.getComputedStyle(sa(n));return parseFloat(x.getPropertyValue(`margin-${c}`))}function b(){return r.map((x,w,j)=>{const N=!w,S=Sw(j,w);return N?f[w]+u:S?f[w]+m:j[w+1][l]-x[l]}).map(Kt)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:m}}function Rz(e,t,r,n,a,i,o,l,c){const{startEdge:d,endEdge:u,direction:m}=e,f=_w(r);function p(y,x){return xm(y).filter(w=>w%x===0).map(w=>y.slice(w,w+x))}function v(y){return y.length?xm(y).reduce((x,w,j)=>{const N=sa(x)||0,S=N===0,E=w===Gm(y),_=a[d]-i[N][d],I=a[d]-i[w][u],R=!n&&S?m(o):0,T=!n&&E?m(l):0,k=Kt(I-T-(_+R));return j&&k>t+c&&x.push(w),E&&x.push(y.length),x},[]).map((x,w,j)=>{const N=Math.max(j[w-1]||0);return y.slice(N,x)}):[]}function g(y){return f?p(y,r):v(y)}return{groupSlides:g}}function Mz(e,t,r,n,a,i,o){const{align:l,axis:c,direction:d,startIndex:u,loop:m,duration:f,dragFree:p,dragThreshold:v,inViewThreshold:g,slidesToScroll:b,skipSnaps:y,containScroll:x,watchResize:w,watchSlides:j,watchDrag:N,watchFocus:S}=i,E=2,_=pz(),I=_.measure(t),R=r.map(_.measure),T=mz(c,d),k=T.measureSize(I),C=gz(k),A=dz(l,k),L=!m&&!!x,O=m||!!x,{slideSizes:P,slideSizesWithGaps:M,startGap:D,endGap:$}=Iz(T,I,R,r,O,a),W=Rz(T,k,b,m,I,R,D,$,E),{snaps:X,snapsAligned:q}=_z(T,A,I,R,W),H=-sa(X)+sa(M),{snapsContained:se,scrollContainLimit:te}=bz(k,H,q,x,E),B=L?se:q,{limit:le}=wz(H,B,m),J=vP(Gm(B),u,m),K=J.clone(),Z=xm(r),re=({dragHandler:Ft,scrollBody:Nt,scrollBounds:Hs,options:{loop:Jt}})=>{Jt||Hs.constrain(Ft.pointerDown()),Nt.seek()},de=({scrollBody:Ft,translate:Nt,location:Hs,offsetLocation:Jt,previousLocation:_s,scrollLooper:Ts,slideLooper:xs,dragHandler:In,animation:mn,eventHandler:Wa,scrollBounds:Rn,options:{loop:Mn}},ua)=>{const os=Ft.settled(),Yr=!Rn.shouldConstrain(),Ge=Mn?os:os&&Yr,He=Ge&&!In.pointerDown();He&&mn.stop();const Ve=Hs.get()*ua+_s.get()*(1-ua);Jt.set(Ve),Mn&&(Ts.loop(Ft.direction()),xs.loop()),Nt.to(Jt.get()),He&&Wa.emit("settle"),Ge||Wa.emit("scroll")},Pe=uz(n,a,()=>re(bt),Ft=>de(bt,Ft)),Ee=.68,tt=B[J.get()],ze=xu(tt),et=xu(tt),st=xu(tt),z=xu(tt),Y=vz(ze,st,et,z,f,Ee),ne=Sz(m,B,H,le,z),fe=Cz(Pe,J,K,Y,ne,z,o),ee=Nz(le),ae=ym(),ge=Az(t,r,o,g),{slideRegistry:Ue}=kz(L,x,B,te,W,Z),Ze=Ez(e,r,Ue,fe,Y,ae,o,S),bt={ownerDocument:n,ownerWindow:a,eventHandler:o,containerRect:I,slideRects:R,animation:Pe,axis:T,dragHandler:hz(T,e,n,a,z,fz(T,a),ze,Pe,fe,Y,ne,J,o,C,p,v,y,Ee,N),eventStore:ae,percentOfView:C,index:J,indexPrevious:K,limit:le,location:ze,offsetLocation:st,previousLocation:et,options:i,resizeHandler:xz(t,o,a,r,T,w,_),scrollBody:Y,scrollBounds:yz(le,st,z,Y,C),scrollLooper:jz(H,le,st,[ze,st,et,z]),scrollProgress:ee,scrollSnapList:B.map(ee.get),scrollSnaps:B,scrollTarget:ne,scrollTo:fe,slideLooper:Pz(T,k,H,P,M,X,B,st,r),slideFocus:Ze,slidesHandler:Tz(t,o,j),slidesInView:ge,slideIndexes:Z,slideRegistry:Ue,slidesToScroll:W,target:z,translate:yP(T,t)};return bt}function Oz(){let e={},t;function r(d){t=d}function n(d){return e[d]||[]}
vendor: 4,655 bytes, line 671
671function a(d){return n(d).forEach(u=>u(t,d)),c}function i(d,u){return e[d]=n(d).concat([u]),c}function o(d,u){return e[d]=n(d).filter(m=>m!==u),c}function l(){e={}}const c={init:r,emit:a,off:o,on:i,clear:l};return c}const Dz={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Lz(e){function t(i,o){return xP(i,o||{})}function r(i){const o=i.breakpoints||{},l=vm(o).filter(c=>e.matchMedia(c).matches).map(c=>o[c]).reduce((c,d)=>t(c,d),{});return t(i,l)}function n(i){return i.map(o=>vm(o.breakpoints||{})).reduce((o,l)=>o.concat(l),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function Fz(e){let t=[];function r(i,o){return t=o.filter(({options:l})=>e.optionsAtMedia(l).active!==!1),t.forEach(l=>l.init(i,e)),o.reduce((l,c)=>Object.assign(l,{[c.name]:c}),{})}function n(){t=t.filter(i=>i.destroy())}return{init:r,destroy:n}}function ap(e,t,r){const n=e.ownerDocument,a=n.defaultView,i=Lz(a),o=Fz(i),l=ym(),c=Oz(),{mergeOptions:d,optionsAtMedia:u,optionsMediaQueries:m}=i,{on:f,off:p,emit:v}=c,g=T;let b=!1,y,x=d(Dz,ap.globalOptions),w=d(x),j=[],N,S,E;function _(){const{container:Z,slides:re}=w;S=(Zy(Z)?e.querySelector(Z):Z)||e.children[0];const Pe=Zy(re)?S.querySelectorAll(re):re;E=[].slice.call(Pe||S.children)}function I(Z){const re=Mz(e,S,E,n,a,Z,c);if(Z.loop&&!re.slideLooper.canLoop()){const de=Object.assign({},Z,{loop:!1});return I(de)}return re}function R(Z,re){b||(x=d(x,Z),w=u(x),j=re||j,_(),y=I(w),m([x,...j.map(({options:de})=>de)]).forEach(de=>l.add(de,"change",T)),w.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(K),y.eventHandler.init(K),y.resizeHandler.init(K),y.slidesHandler.init(K),y.options.loop&&y.slideLooper.loop(),S.offsetParent&&E.length&&y.dragHandler.init(K),N=o.init(K,j)))}function T(Z,re){const de=W();k(),R(d({startIndex:de},Z),re),c.emit("reInit")}function k(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),o.destroy(),l.clear()}function C(){b||(b=!0,l.clear(),k(),c.emit("destroy"),c.clear())}function A(Z,re,de){!w.active||b||(y.scrollBody.useBaseFriction().useDuration(re===!0?0:w.duration),y.scrollTo.index(Z,de||0))}function L(Z){const re=y.index.add(1).get();A(re,Z,-1)}function O(Z){const re=y.index.add(-1).get();A(re,Z,1)}function P(){return y.index.add(1).get()!==W()}function M(){return y.index.add(-1).get()!==W()}function D(){return y.scrollSnapList}function $(){return y.scrollProgress.get(y.offsetLocation.get())}function W(){return y.index.get()}function X(){return y.indexPrevious.get()}function q(){return y.slidesInView.get()}function H(){return y.slidesInView.get(!1)}function se(){return N}function te(){return y}function B(){return e}function le(){return S}function J(){return E}const K={canScrollNext:P,canScrollPrev:M,containerNode:le,internalEngine:te,destroy:C,off:p,on:f,emit:v,plugins:se,previousScrollSnap:X,reInit:g,rootNode:B,scrollNext:L,scrollPrev:O,scrollProgress:$,scrollSnapList:D,scrollTo:A,selectedScrollSnap:W,slideNodes:J,slidesInView:q,slidesNotInView:H};return R(t,r),setTimeout(()=>c.emit("init"),0),K}ap.globalOptions=void 0;function Cw(e={},t=[]){const r=h.useRef(e),n=h.useRef(t),[a,i]=h.useState(),[o,l]=h.useState(),c=h.useCallback(()=>{a&&a.reInit(r.current,n.current)},[a]);return h.useEffect(()=>{Nw(r.current,e)||(r.current=e,c())},[e,c]),h.useEffect(()=>{oz(n.current,t)||(n.current=t,c())},[t,c]),h.useEffect(()=>{if(iz()&&o){ap.globalOptions=Cw.globalOptions;const d=ap(o,r.current,n.current);return i(d),()=>d.destroy()}else i(void 0)},[o,i]),[l,a]}Cw.globalOptions=void 0;const bP=h.createContext(null);function pg(){const e=h.useContext(bP);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const Ew=h.forwardRef(({orientation:e="horizontal",opts:t,setApi:r,plugins:n,className:a,children:i,...o},l)=>{const[c,d]=Cw({...t,axis:e==="horizontal"?"x":"y"},n),[u,m]=h.useState(!1),[f,p]=h.useState(!1),v=h.useCallback(x=>{x&&(m(x.canScrollPrev()),p(x.canScrollNext()))},[]),g=h.useCallback(()=>{d==null||d.scrollPrev()},[d]),b=h.useCallback(()=>{d==null||d.scrollNext()},[d]),y=h.useCallback(x=>{x.key==="ArrowLeft"?(x.preventDefault(),g()):x.key==="ArrowRight"&&(x.preventDefault(),b())},[g,b]);return h.useEffect(()=>{!d||!r||r(d)},[d,r]),h.useEffect(()=>
671{if(d)return v(d),d.on("reInit",v),d.on("select",v),()=>{d==null||d.off("select",v)}},[d,v]),s.jsx(bP.Provider,{value:{carouselRef:c,api:d,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:b,canScrollPrev:u,canScrollNext:f},children:s.jsx("div",{ref:l,onKeyDownCapture:y,className:me("relative",a),role:"region","aria-roledescription":"carousel",...o,children:i})})});Ew.displayName="Carousel";const Pw=h.forwardRef(({className:e,...t},r)=>{const{carouselRef:n,orientation:a}=pg();return s.jsx("div",{ref:n,className:"overflow-hidden",children:s.jsx("div",{ref:r,className:me("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});Pw.displayName="CarouselContent";const ip=h.forwardRef(({className:e,...t},r)=>{const{orientation:n}=pg();return s.jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:me("min-w-0 shrink-0 grow-0 basis-full",n==="horizontal"?"pl-4":"pt-4",e),...t})});ip.displayName="CarouselItem";const Tw=h.forwardRef(({className:e,variant:t="outline",size:r="icon",...n},a)=>{const{orientation:i,scrollPrev:o,canScrollPrev:l}=pg();return s.jsxs(F,{ref:a,variant:t,size:r,className:me("absolute h-8 w-8 rounded-full",i==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:o,...n,children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Previous slide"})]})});Tw.displayName="CarouselPrevious";const Aw=h.forwardRef(({className:e,variant:t="outline",size:r="icon",...n},a)=>{const{orientation:i,scrollNext:o,canScrollNext:l}=pg();return s.jsxs(F,{ref:a,variant:t,size:r,className:me("absolute h-8 w-8 rounded-full",i==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:o,...n,children:[s.jsx(P5,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Next slide"})]})});Aw.displayName="CarouselNext";const A1=[{id:"1",name:"ΣοÏία Î.",text:"Îεν ÎÏÏ Î¾Î±Î½Î±Î´ÎµÎ¯ ÏÏÏο ÏλοÏÏιο, ÎγκÏ
Ïο και ÏοιοÏÎ¹ÎºÏ ÏεÏιεÏÏμενο Ïε άλλο wellness app ÏÏην Îλλάδα. ÎαÏικά, δεν ÎÏεÏε να ζηλÎÏεÏε ÏίÏοÏα αÏÏ Ïα ανÏίÏÏοιÏα ÏοÏ
εξÏÏεÏικοÏ."},{id:"2",name:"Îανάη Î.",text:"Îίμαι αÏκεÏοÏÏ Î¼Î®Î½ÎµÏ ÏÏην ÏλαÏÏÏÏμα και δεν μÏοÏÏ Î½Î± καÏÎ±Î»Î®Î¾Ï Ïε αγαÏημÎνο instructor! Keep up the good work, είÏÏε δÏÏο για εμάÏ!"},{id:"3",name:"ÎαÏεÏίνα Î .",text:"Îα ÏÏ Î£Î¥ÎΧÎΡÎΤÎΡÎΠγια Ïην ÏλαÏÏÏÏμα! ÎξαιÏεÏική δοÏ
λειά! ΠδιαÏοÏά ÏÏο ÏÏμα ÏαίνεÏαι! Îην Ïο ÏÏαμαÏήÏεÏε, γίναÏε ÏÏ
νήθεια!"},{id:"4",name:"ÎάÏÏ Î.",text:"ÎιÏÎ¸Ï ÏÏÏο ÏÏαία ÏοÏ
μÏοÏÏ Î½Î± ÎºÎ¬Î½Ï ÎºÎ±Î¹ κάÏι για Ïο ÏÏμα μοÏ
, ÏαÏ'Ïλο ÏοÏ
είμαι Ïλη μÎÏα με Ïη μικÏή μοÏ
!"},{id:"5",name:"ΧÏιÏÏίνα Î .",text:"Îίμαι beginner και ÎÏÏ Î´ÎµÎ¹ ÏÏομεÏή αλλαγή ÏÏο ÏÏμα μοÏ
αÏÏ Ïον ÎανοÏ
άÏιο ÏοÏ
ξεκίνηÏα. ÎÏει βελÏιÏθεί ÏοβεÏά η ανÏοÏή και η εÏ
λÏ
γιÏία μοÏ
!"},{id:"6",name:"ÎλεÏ
θεÏία Î.",text:"ÎεÏά Ïην αÏÏλεια 25 κιλÏν και μεÏά αÏÏ ÏÏεδÏν 2 ÏÏÏνια ÏηλεÏγαÏία, ÎÏÏ 10 μÎÏÎµÏ ÏοÏ
νιÏÎ¸Ï Î¬Î»Î»Î¿Ï Î¬Î½Î¸ÏÏÏοÏ! ÎÎ¬Î½Ï ÎºÎ±Î¹ διαλογιÏÎ¼Ï ÏοÏ
με ÎÏει βοηθήÏει!"},{id:"7",name:"ΣοÏία Î.",text:"Τα Phat workouts είναι κομμÎνα και ÏαμμÎνα ÏÏα μÎÏÏα μοÏ
! ÎÎ¿Î¼Î¯Î¶Ï ÏÏÏ Î±Ï
Ïή η ÏÏ
νδÏομή ήÏαν η καλÏÏεÏη εÏÎνδÏ
Ïη για εμÎνα!"},{id:"8",name:"Îγγελική Î.",text:"ΠάÏÏÏ Î±ÏÏ Î±Î³ÏÏδη διαÏαÏαÏή. Îίγο ÏÏιν με ÏιάÏει μια κÏίÏη Îβαλα να ÎºÎ¬Î½Ï Î´Î¹Î±Î»Î¿Î³Î¹ÏÎ¼Ï Î³Î¹Î± αÏοβολή ÏοÏ
άγÏοÏ
Ï. ÎÏÎμηÏα εÏιÏÏÏοÏ
. Îεν μοÏ
ÎÏει ξαναÏÏ
μβεί!"},{id:"9",name:"ΧÏιÏÏίνα Σ.",text:"Το καλÏÏεÏο δÏÏο ÏοÏ
Îκανα ÏÏον εαÏ
ÏÏ Î¼Î¿Ï
η εÏήÏια ÏÏ
νδÏομή! Îαι αÏ
Ïά Ïα ÏÏογÏάμμαÏα με Ïον ÎÏÏÏα ÏÎ¿Î»Ï Î¼Îµ βÏλεÏαν.. ÏεÏγοÏ
ν Ïα Ïαιδιά ÏÏολείο και Î¾ÎµÎºÎ¹Î½Î¬Ï ÎºÎ¬Î¸Îµ μÎÏα!"}],$z=e=>{const t=[...e];for(let r=t.length-1;r>0;r--){const n=Math.floor(Math.random()*(r+1));[t[r],t[n]]=[t[n],t[r]]}return t},Uz=()=>{const[e,t]=h.useState(A1);return h.useEffect(()=>{t($z(A1))},[]),s.jsx("section",{className:"pt-8 pb-16 bg-gradient-to-br from-stone-50 to-stone-100 dar
671k:from-stone-900 dark:to-stone-800",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("div",{className:"text-center mb-8",children:s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"ΤΠÎÎÎΠΤΠÎÎÎÎ ÎÎΣ"})}),s.jsx("div",{className:"relative max-w-7xl mx-auto",children:s.jsxs(Ew,{opts:{align:"start",loop:!0},className:"w-full",children:[s.jsx(Pw,{className:"-ml-2 md:-ml-4",children:e.map(r=>s.jsx(ip,{className:"pl-2 md:pl-4 basis-full sm:basis-1/2 lg:basis-1/4",children:s.jsx(oe,{className:"bg-white dark:bg-card shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border border-border/50 h-full",children:s.jsxs(ce,{className:"p-4 flex flex-col h-full",children:[s.jsxs("blockquote",{className:"text-foreground mb-3 leading-relaxed flex-grow",children:['"',r.text,'"']}),s.jsx("div",{className:"border-t border-border/30 pt-3 mt-auto",children:s.jsx("cite",{className:"font-semibold text-foreground not-italic",children:r.name})})]})})},r.id))}),s.jsx(Tw,{className:"absolute left-2 md:left-0 top-1/2 -translate-y-1/2 z-10 md:-ml-6 bg-white/20 hover:bg-white/40 md:bg-card md:hover:bg-muted border-border rounded-full shadow-md h-10 w-10 md:h-8 md:w-8 backdrop-blur-sm"}),s.jsx(Aw,{className:"absolute right-2 md:right-0 top-1/2 -translate-y-1/2 z-10 md:-mr-6 bg-white/20 hover:bg-white/40 md:bg-card md:hover:bg-muted border-border rounded-full shadow-md h-10 w-10 md:h-8 md:w-8 backdrop-blur-sm"})]})})]})})};var Ux="focusScope.autoFocusOnMount",Bx="focusScope.autoFocusOnUnmount",I1={bubbles:!1,cancelable:!0},Bz="FocusScope",Ym=h.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[l,c]=h.useState(null),d=rs(a),u=rs(i),m=h.useRef(null),f=Ye(t,g=>c(g)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(n){let g=function(w){if(p.paused||!l)return;const j=w.target;l.contains(j)?m.current=j:Li(m.current,{select:!0})},b=function(w){if(p.paused||!l)return;const j=w.relatedTarget;j!==null&&(l.contains(j)||Li(m.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const N of w)N.removedNodes.length>0&&Li(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const x=new MutationObserver(y);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),x.disconnect()}}},[n,l,p.paused]),h.useEffect(()=>{if(l){M1.add(p);const g=document.activeElement;if(!l.contains(g)){const y=new CustomEvent(Ux,I1);l.addEventListener(Ux,d),l.dispatchEvent(y),y.defaultPrevented||(zz(Gz(wP(l)),{select:!0}),document.activeElement===g&&Li(l))}return()=>{l.removeEventListener(Ux,d),setTimeout(()=>{const y=new CustomEvent(Bx,I1);l.addEventListener(Bx,u),l.dispatchEvent(y),y.defaultPrevented||Li(g??document.body,{select:!0}),l.removeEventListener(Bx,u),M1.remove(p)},0)}}},[l,d,u,p]);const v=h.useCallback(g=>{if(!r&&!n||p.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const x=g.currentTarget,[w,j]=Wz(x);w&&j?!g.shiftKey&&y===j?(g.preventDefault(),r&&Li(w,{select:!0})):g.shiftKey&&y===w&&(g.preventDefault(),r&&Li(j,{select:!0})):y===x&&g.preventDefault()}},[r,n,p.paused]);return s.jsx(Ce.div,{tabIndex:-1,...o,ref:f,onKeyDown:v})});Ym.displayName=Bz;function zz(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Li(n,{select:t}),document.activeElement!==r)return}function Wz(e){const t=wP(e),r=R1(t,e),n=R1(t.reverse(),e);return[r,n]}function wP(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function R1(e,t){for(const r of e)if(!Vz(r,{upTo:t}))return r}function Vz(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 Hz(e){return e instanceof HTMLInputElement&&"select"in e}function Li(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Hz(e)&&t&&e.select()}}var M1=qz();function qz(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=O1(e,t),e.unshift(t)},remove(t){var r;e=O1(e,t),(r=e[0])==null||r.resume()}}}function O1(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Gz(e){return e.filter(t=>t.tagName!=="A")}var zx=0;function gg(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??D1()),document.body.insertAdjacentElement("beforeend",e[1]??D1()),zx++,()=>{zx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),zx--}},[])}function D1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 5,651 bytes, lines 671-686
671style.position="fixed",e.style.pointerEvents="none",e}var Ca=function(){return Ca=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ca.apply(this,arguments)};function jP(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Yz(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var hf="right-scroll-bar-position",ff="width-before-scroll-bar",Kz="with-scroll-bars-hidden",Qz="--removed-body-scroll-bar-size";function Wx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Xz(e,t){var r=h.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var Jz=typeof window<"u"?h.useLayoutEffect:h.useEffect,L1=new WeakMap;function Zz(e,t){var r=Xz(null,function(n){return e.forEach(function(a){return Wx(a,n)})});return Jz(function(){var n=L1.get(r);if(n){var a=new Set(n),i=new Set(e),o=r.current;a.forEach(function(l){i.has(l)||Wx(l,null)}),i.forEach(function(l){a.has(l)||Wx(l,o)})}L1.set(r,e)},[e]),r}function eW(e){return e}function tW(e,t){t===void 0&&(t=eW);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var o=t(i,n);return r.push(o),function(){r=r.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(l){return i(l)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var l=r;r=[],l.forEach(i),o=r}var c=function(){var u=o;o=[],u.forEach(i)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(u){o.push(u),d()},filter:function(u){return o=o.filter(u),r}}}};return a}function sW(e){e===void 0&&(e={});var t=tW(null);return t.options=Ca({async:!0,ssr:!1},e),t}var NP=function(e){var t=e.sideCar,r=jP(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return h.createElement(n,Ca({},r))};NP.isSideCarExport=!0;function rW(e,t){return e.useMedium(t),NP}var _P=sW(),Vx=function(){},xg=h.forwardRef(function(e,t){var r=h.useRef(null),n=h.useState({onScrollCapture:Vx,onWheelCapture:Vx,onTouchMoveCapture:Vx}),a=n[0],i=n[1],o=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,m=e.shards,f=e.sideCar,p=e.noRelative,v=e.noIsolation,g=e.inert,b=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,w=e.gapMode,j=jP(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=f,S=Zz([r,t]),E=Ca(Ca({},j),a);return h.createElement(h.Fragment,null,u&&h.createElement(N,{sideCar:_P,removeScrollBar:d,shards:m,noRelative:p,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!b,lockRef:r,gapMode:w}),o?h.cloneElement(h.Children.only(l),Ca(Ca({},E),{ref:S})):h.createElement(x,Ca({},E,{className:c,ref:S}),l))});xg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xg.classNames={fullWidth:ff,zeroRight:hf};var nW=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aW(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nW();return t&&e.setAttribute("nonce",t),e}function iW(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oW(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lW=function(){var e=0,t=null;return{add:function(r){e==0&&(t=aW())&&(iW(t,r),oW(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cW=function(){var e=lW();return function(t,r){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},kP=function(){var e=cW(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},dW={left:0,top:0,right:0,gap:0},Hx=function(e){return parseInt(e||"",10)||0},uW=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Hx(r),Hx(n),Hx(a)]},mW=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dW;var t=uW(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},hW=kP(),Dc="data-scroll-locked",fW=function(e,t,r,n){var a=e.left,i=e.top,o=e.right,l=e.gap;return r===void 0&&(r="margin"),` 672 .`.concat(Kz,` { 673 overflow: hidden `).concat(n,`; 674 padding-right: `).concat(l,"px ").concat(n,`; 675 } 676 body[`).concat(Dc,`] { 677 overflow: hidden `).concat(n,`; 678 overscroll-behavior: contain; 679 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 680 padding-left: `.concat(a,`px; 681 padding-top: `).concat(i,`px; 682 padding-right: `).concat(o,`px; 683 margin-left:0; 684 margin-top:0; 685 margin-right: `).concat(l,"px ").concat(n,`; 686 `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";
686")].filter(Boolean).join(""),` 687 } 688 689 .`).concat(hf,` { 690 right: `).concat(l,"px ").concat(n,`; 691 } 692 693 .`).concat(ff,` { 694 margin-right: `).concat(l,"px ").concat(n,`; 695 } 696 697 .`).concat(hf," .").concat(hf,` { 698 right: 0 `).concat(n,`; 699 } 700 701 .`).concat(ff," .").concat(ff,` { 702 margin-right: 0 `).concat(n,`; 703 } 704 705 body[`).concat(Dc,`] { 706 `).concat(Qz,": ").concat(l,`px; 707 } 708`)},F1=function(){var e=parseInt(document.body.getAttribute(Dc)||"0",10);return isFinite(e)?e:0},pW=function(){h.useEffect(function(){return document.body.setAttribute(Dc,(F1()+1).toString()),function(){var e=F1()-1;e<=0?document.body.removeAttribute(Dc):document.body.setAttribute(Dc,e.toString())}},[])},gW=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;pW();var i=h.useMemo(function(){return mW(a)},[a]);return h.createElement(hW,{styles:fW(i,!t,a,r?"":"!important")})},tb=!1;if(typeof window<"u")try{var Uh=Object.defineProperty({},"passive",{get:function(){return tb=!0,!0}});window.addEventListener("test",Uh,Uh),window.removeEventListener("test",Uh,Uh)}catch{tb=!1}var nc=tb?{passive:!1}:!1,xW=function(e){return e.tagName==="TEXTAREA"},SP=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!xW(e)&&r[t]==="visible")},vW=function(e){return SP(e,"overflowY")},yW=function(e){return SP(e,"overflowX")},$1=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=CP(e,n);if(a){var i=EP(e,n),o=i[1],l=i[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},bW=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},wW=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},CP=function(e,t){return e==="v"?vW(t):yW(t)},EP=function(e,t){return e==="v"?bW(t):wW(t)},jW=function(e,t){return e==="h"&&t==="rtl"?-1:1},NW=function(e,t,r,n,a){var i=jW(e,window.getComputedStyle(t).direction),o=i*n,l=r.target,c=t.contains(l),d=!1,u=o>0,m=0,f=0;do{if(!l)break;var p=EP(e,l),v=p[0],g=p[1],b=p[2],y=g-b-i*v;(v||y)&&CP(e,l)&&(m+=y,f+=v);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(u&&(Math.abs(m)<1||!a)||!u&&(Math.abs(f)<1||!a))&&(d=!0),d},Bh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},U1=function(e){return[e.deltaX,e.deltaY]},B1=function(e){return e&&"current"in e?e.current:e},_W=function(e,t){return e[0]===t[0]&&e[1]===t[1]},kW=function(e){return` 709 .block-interactivity-`.concat(e,` {pointer-events: none;} 710 .allow-interactivity-`).concat(e,` {pointer-events: all;} 711`)},SW=0,ac=[];function CW(e){var t=h.useRef([]),r=h.useRef([0,0]),n=h.useRef(),a=h.useState(SW++)[0],i=h.useState(kP)[0],o=h.useRef(e);h.useEffect(function(){o.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var g=Yz([e.lockRef.current],(e.shards||[]).map(B1),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=h.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var y=Bh(g),x=r.current,w="deltaX"in g?g.deltaX:x[0]-y[0],j="deltaY"in g?g.deltaY:x[1]-y[1],N,S=g.target,E=Math.abs(w)>Math.abs(j)?"h":"v";if("touches"in g&&E==="h"&&S.type==="range")return!1;var _=$1(E,S);if(!_)return!0;if(_?N=E:(N=E==="v"?"h":"v",_=$1(E,S)),!_)return!1;if(!n.current&&"changedTouches"in g&&(w||j)&&(n.current=N),!N)return!0;var I=n.current||N;return NW(I,b,g,I==="h"?w:j,!0)},[]),c=h.useCallback(function(g){var b=g;if(!(!ac.length||ac[ac.length-1]!==i)){var y="deltaY"in b?U1(b):Bh(b),x=t.current.filter(function(N){return N.name===b.type&&(N.target===b.target||b.target===N.shadowParent)&&_W(N.delta,y)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}
vendor: 4,333 bytes, line 711
711if(!x){var w=(o.current.shards||[]).map(B1).filter(Boolean).filter(function(N){return N.contains(b.target)}),j=w.length>0?l(b,w[0]):!o.current.noIsolation;j&&b.cancelable&&b.preventDefault()}}},[]),d=h.useCallback(function(g,b,y,x){var w={name:g,delta:b,target:y,should:x,shadowParent:EW(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(j){return j!==w})},1)},[]),u=h.useCallback(function(g){r.current=Bh(g),n.current=void 0},[]),m=h.useCallback(function(g){d(g.type,U1(g),g.target,l(g,e.lockRef.current))},[]),f=h.useCallback(function(g){d(g.type,Bh(g),g.target,l(g,e.lockRef.current))},[]);h.useEffect(function(){return ac.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:f}),document.addEventListener("wheel",c,nc),document.addEventListener("touchmove",c,nc),document.addEventListener("touchstart",u,nc),function(){ac=ac.filter(function(g){return g!==i}),document.removeEventListener("wheel",c,nc),document.removeEventListener("touchmove",c,nc),document.removeEventListener("touchstart",u,nc)}},[]);var p=e.removeScrollBar,v=e.inert;return h.createElement(h.Fragment,null,v?h.createElement(i,{styles:kW(a)}):null,p?h.createElement(gW,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function EW(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const PW=rW(_P,CW);var Km=h.forwardRef(function(e,t){return h.createElement(xg,Ca({},e,{ref:t,sideCar:PW}))});Km.classNames=xg.classNames;var TW=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ic=new WeakMap,zh=new WeakMap,Wh={},qx=0,PP=function(e){return e&&(e.host||PP(e.parentNode))},AW=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=PP(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},IW=function(e,t,r,n){var a=AW(t,Array.isArray(e)?e:[e]);Wh[r]||(Wh[r]=new WeakMap);var i=Wh[r],o=[],l=new Set,c=new Set(a),d=function(m){!m||l.has(m)||(l.add(m),d(m.parentNode))};a.forEach(d);var u=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(f){if(l.has(f))u(f);else try{var p=f.getAttribute(n),v=p!==null&&p!=="false",g=(ic.get(f)||0)+1,b=(i.get(f)||0)+1;ic.set(f,g),i.set(f,b),o.push(f),g===1&&v&&zh.set(f,!0),b===1&&f.setAttribute(r,"true"),v||f.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return u(t),l.clear(),qx++,function(){o.forEach(function(m){var f=ic.get(m)-1,p=i.get(m)-1;ic.set(m,f),i.set(m,p),f||(zh.has(m)||m.removeAttribute(n),zh.delete(m)),p||m.removeAttribute(r)}),qx--,qx||(ic=new WeakMap,ic=new WeakMap,zh=new WeakMap,Wh={})}},vg=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=TW(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),IW(n,a,r,"aria-hidden")):function(){return null}},yg="Dialog",[TP,AP]=gs(yg),[RW,ca]=TP(yg),IP=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:o=!0}=e,l=h.useRef(null),c=h.useRef(null),[d,u]=xr({prop:n,defaultProp:a??!1,onChange:i,caller:yg});return s.jsx(RW,{scope:t,triggerRef:l,contentRef:c,contentId:Fr(),titleId:Fr(),descriptionId:Fr(),open:d,onOpenChange:u,onOpenToggle:h.useCallback(()=>u(m=>!m),[u]),modal:o,children:r})};IP.displayName=yg;var RP="DialogTrigger",MP=h.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=ca(RP,r),i=Ye(t,a.triggerRef);return s.jsx(Ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Mw(a.open),...n,ref:i,onClick:pe(e.onClick,a.onOpenToggle)})});MP.displayName=RP;var Iw="DialogPortal",[MW,OP]=TP(Iw,{forceMount:void 0}),DP=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,i=ca(Iw,t);return s.jsx(MW,{scope:t,forceMount:r,children:h.Children.map(n,o=>s.jsx(Ns,{present:r||i.open,children:s.jsx(kd,{asChild:!0,container:a,children:o})}))})};DP.displayName=Iw;var op="DialogOverlay",LP=h.forwardRef((e,t)=>{const r=OP(op,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=ca(op,e.__scopeDialog);return i.modal?s.jsx(Ns,{present:n||i.open,children:s.jsx(DW,{...a,ref:t})}):null});LP.displayName=op;var OW=wo("DialogOverlay.RemoveScroll"),DW=h.forwardRef((e,t)=>
vendor: 4,736 bytes, lines 711-715
711{const{__scopeDialog:r,...n}=e,a=ca(op,r);return s.jsx(Km,{as:OW,allowPinchZoom:!0,shards:[a.contentRef],children:s.jsx(Ce.div,{"data-state":Mw(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Tl="DialogContent",FP=h.forwardRef((e,t)=>{const r=OP(Tl,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=ca(Tl,e.__scopeDialog);return s.jsx(Ns,{present:n||i.open,children:i.modal?s.jsx(LW,{...a,ref:t}):s.jsx(FW,{...a,ref:t})})});FP.displayName=Tl;var LW=h.forwardRef((e,t)=>{const r=ca(Tl,e.__scopeDialog),n=h.useRef(null),a=Ye(t,r.contentRef,n);return h.useEffect(()=>{const i=n.current;if(i)return vg(i)},[]),s.jsx($P,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pe(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:pe(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:pe(e.onFocusOutside,i=>i.preventDefault())})}),FW=h.forwardRef((e,t)=>{const r=ca(Tl,e.__scopeDialog),n=h.useRef(!1),a=h.useRef(!1);return s.jsx($P,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((d=r.triggerRef.current)==null?void 0:d.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),$P=h.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=e,l=ca(Tl,r),c=h.useRef(null),d=Ye(t,c);return gg(),s.jsxs(s.Fragment,{children:[s.jsx(Ym,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(Fl,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Mw(l.open),...o,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(UW,{titleId:l.titleId}),s.jsx(zW,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Rw="DialogTitle",UP=h.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=ca(Rw,r);return s.jsx(Ce.h2,{id:a.titleId,...n,ref:t})});UP.displayName=Rw;var BP="DialogDescription",zP=h.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=ca(BP,r);return s.jsx(Ce.p,{id:a.descriptionId,...n,ref:t})});zP.displayName=BP;var WP="DialogClose",VP=h.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=ca(WP,r);return s.jsx(Ce.button,{type:"button",...n,ref:t,onClick:pe(e.onClick,()=>a.onOpenChange(!1))})});VP.displayName=WP;function Mw(e){return e?"open":"closed"}var HP="DialogTitleWarning",[$W,qP]=LD(HP,{contentName:Tl,titleName:Rw,docsSlug:"dialog"}),UW=({titleId:e})=>{const t=qP(HP),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 712 713If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 714 715For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},BW="DialogDescriptionWarning",zW=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qP(BW).contentName}}.`;return h.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Ow=IP,Dw=MP,Lw=DP,Qm=LP,Xm=FP,Jm=UP,Zm=zP,bg=VP;const gr=Ow,xl=Dw,WW=Lw,GP=h.forwardRef(({className:e,...t},r)=>s.jsx(Qm,{ref:r,className:me("fixed inset-0 z-[70] 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}));GP.displayName=Qm.displayName;const rr=h.forwardRef(({className:e,children:t,overlayClassName:r,...n},a)=>s.jsxs(WW,{children:[s.jsx(GP,{className:r}),s.jsxs(Xm,{ref:a,className:me("fixed left-[50%] top-[50%] z-[70] w-[92vw] sm:w-full sm:max-w-lg max-h-[85dvh] translate-x-[-50%] translate-y-[-50%] overflow-hidden flex flex-col gap-4 border bg-background p-4 sm: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
715nded-lg",e),...n,children:[t,s.jsxs(bg,{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:[s.jsx(qr,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));rr.displayName=Xm.displayName;const $r=({className:e,...t})=>s.jsx("div",{className:me("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});$r.displayName="DialogHeader";const Uu=({className:e,...t})=>s.jsx("div",{className:me("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Uu.displayName="DialogFooter";const Ur=h.forwardRef(({className:e,...t},r)=>s.jsx(Jm,{ref:r,className:me("text-lg font-semibold leading-none tracking-tight",e),...t}));Ur.displayName=Jm.displayName;const go=h.forwardRef(({className:e,...t},r)=>s.jsx(Zm,{ref:r,className:me("text-sm text-muted-foreground",e),...t}));go.displayName=Zm.displayName;const ke=h.forwardRef(({className:e,type:t,...r},n)=>s.jsx("input",{type:t,className:me("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));ke.displayName="Input";var VW="Label",YP=h.forwardRef((e,t)=>s.jsx(Ce.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));YP.displayName=VW;var KP=YP;const HW=Sd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),_e=h.forwardRef(({className:e,...t},r)=>s.jsx(KP,{ref:r,className:me(HW(),e),...t}));_e.displayName=KP.displayName;const QP=({open:e,onClose:t,onComplete:r,currentProfile:n})=>{const{user:a}=jt(),{toast:i}=at(),[o,l]=h.useState(!1),[c,d]=h.useState({first_name:n.first_name||"",last_name:n.last_name||""}),u=f=>f.includes("@")||f.includes("."),m=async()=>{if(a){if(!c.first_name.trim()){i({title:"ΣÏάλμα",description:"Το Ïνομα είναι Ï
ÏοÏÏεÏÏικÏ",variant:"destructive"});return}l(!0);try{const{error:f}=await U.from("profiles").update({first_name:c.first_name.trim(),last_name:c.last_name.trim()||null,updated_at:new Date().toISOString()}).eq("user_id",a.id);if(f)throw f;i({title:"ÎÏιÏÏ
Ïία",description:"Το ÏÏοÏίλ ÏÎ±Ï ÎµÎ½Î·Î¼ÎµÏÏθηκε εÏιÏÏ
ÏÏÏ"}),r()}catch(f){console.error("Error updating profile:",f),i({title:"ΣÏάλμα",description:"ÎÏοÏÏ
Ïία ενημÎÏÏÏÎ·Ï ÏÏοÏίλ. ΠαÏÎ±ÎºÎ±Î»Ï Î´Î¿ÎºÎ¹Î¼Î¬ÏÏε ξανά.",variant:"destructive"})}finally{l(!1)}}};return s.jsx(gr,{open:e,onOpenChange:t,children:s.jsxs(rr,{className:"sm:max-w-md",children:[s.jsxs($r,{children:[s.jsx(Ur,{children:"ÎλοκληÏÏÏÏε Ïο Î ÏοÏίλ ÏαÏ"}),s.jsx(go,{children:"ΠαÏÎ±ÎºÎ±Î»Ï ÏÏ
μÏληÏÏÏÏε Ïο Ï
715νομά ÏÎ±Ï Î³Î¹Î± να ÏÏ
νεÏίÏεÏε με Ïην αγοÏά ÏÏ
νδÏομήÏ."})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"first_name",children:"Îνομα *"}),s.jsx(ke,{id:"first_name",value:c.first_name,onChange:f=>d({...c,first_name:f.target.value}),placeholder:"Ï.Ï. ÎαÏία",className:u(c.first_name)?"border-orange-500":""}),u(c.first_name)&&s.jsx("p",{className:"text-xs text-orange-600",children:"ΦαίνεÏαι ÏÏι Ïο Ïνομα ÏεÏιÎÏει email. ΠαÏÎ±ÎºÎ±Î»Ï ÎµÎ¹ÏάγεÏε Ïο ÏÏαγμαÏÎ¹ÎºÏ ÏÎ±Ï Ïνομα."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"last_name",children:"ÎÏÏνÏ
μο (ÏÏοαιÏεÏικÏ)"}),s.jsx(ke,{id:"last_name",value:c.last_name,onChange:f=>d({...c,last_name:f.target.value}),placeholder:"Ï.Ï. ΠαÏαδοÏοÏλοÏ
"})]})]}),s.jsxs("div",{className:"flex gap-2 justify-end",children:[s.jsx(F,{variant:"outline",onClick:t,disabled:o,children:"ÎκÏÏÏÏη"}),s.jsx(F,{onClick:m,disabled:o||!c.first_name.trim(),children:o?"ÎÏοθήκεÏ
Ïη...":"ÎÏοθήκεÏ
Ïη & ΣÏ
νÎÏεια"})]})]})})},nn={PROMO_CODE:"BLACKFRIDAY",END_DATE:new Date("2025-12-05T23:59:59"),APPLICABLE_PLAN:"12_months",DISCOUNT_AMOUNT:4e3,ORIGINAL_PRICE:9900,FINAL_PRICE:5900},Ea=()=>new Date<nn.END_DATE,qW=()=>{const[e,t]=h.useState(!1),[r,n]=h.useState(null),[a,i]=h.useState(!1),[o,l]=h.useState({}),[c,d]=h.useState(null),u=qe(),{user:m,session:f}=jt(),{subscribed:p,isTrialUser:v,subscriptionTier:g,isAdminFreeAccess:b}=_i(),{toast:y}=at(),x=["ÎÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Ïλα Ïα Workouts","ÎÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε ÏλοÏ
Ï ÏοÏ
Ï ÎιαλογιÏμοÏÏ","ÎÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Ïλα Ïα Breathworks","Î Ïοβολή ÏλÏν ÏÏν podcast ÏÏÏÎ¯Ï Î´Î¹Î±ÏημίÏειÏ","ÎÏοκλειÏÏική ÏÏÏÏβαÏη ÏÏο Well Be community","ÎημιοÏ
Ïγία ÏÏοÏÏÏÎ¹ÎºÎ¿Ï ÏÏοÏίλ","ÎÏοκλειÏÏικοί διαγÏνιÏμοί για Ïα μÎλη","Î ÏÏÏβαÏη μÎÏÏ Ï
ÏολογιÏÏή & mobile app"],w=[{id:"1_month",name:"Îηνιαία",price:"9,90",period:"ανά μήνα",icon:id,popular:!1},{id:"6_months",name:"6 ÎήνεÏ",price:"49",period:"για 6 μήνεÏ",savings:"ÎξοικονÏμηÏη â¬10.40",icon:ui,popular:!0},{id:"12_months",name:"ÎÏήÏια",price:"99",period:"ανά ÎÏοÏ",savings:Ea()?"BLACK FRIDAY: â¬40 ÎκÏÏÏÏη!":"ÎξοικονÏμηÏη â¬19.80",icon:om,popular:Ea(),blackFriday:Ea()}],j=async(_,I)=>{if(!m){const k=encodeURIComponent(window.location.pathname+window.location.search);u(`/auth?mode=signup&plan=${_}&returnUrl=${k}`);return}if(b){y({title:"ÎÏεÏε ήδη ÏÏÏÏβαÏη",description:"ÎÏεÏε ήδη ÏλήÏη ÏÏÏÏβαÏη ÏÏην ÏλαÏÏÏÏμα. Îν θÎλεÏε να εγγÏάÏεÏε κάÏοιον άλλο, ÏαÏÎ±ÎºÎ±Î»Ï Î±ÏοÏÏ
νδεθείÏε ÏÏÏÏα.",variant:"default"});return}const{data:R}=await U.from("profiles").select("first_name, last_name").eq("user_id",m.id).single(),T=k=>(k==null?void 0:k.includes("@"))||(k==null?void 0:k.includes("."));if(!(R!=null&&R.first_name)||T(R.first_name)){l({first_name:R==null?void 0:R.first_name,last_name:R==null?void 0:R.last_name}),d(_),i(!0);return}await N(_,I)},N=async(_,I)=>{t(!0),n(_),console.log("Creating checkout",{planId:_,discountCode:I});try{const{data:R,error:T}=await U.functions.invoke("create-checkout",{body:{plan:_,discountCode:I},headers:{Authorization:`Bearer ${f==null?void 0:f.access_token}`}});if(T)throw T;if(R!=null&&R.error)throw new Error(R.error);window.location.href=R.url}catch(R){console.error("Error creating checkout:",R),y({title:"ΣÏάλμα",description:R.message||"ÎÏοÏÏ
Ïία δημιοÏ
ÏÎ³Î¯Î±Ï ÏÏ
νεδÏÎ¯Î±Ï ÏληÏÏμήÏ. ΠαÏÎ±ÎºÎ±Î»Ï Î´Î¿ÎºÎ¹Î¼Î¬ÏÏε ξανά.",variant:"destructive"})}finally{t(!1),n(null)}},S=async()=>{if(i(!1),c){const _=c==="12_months"?nn.PROMO_CODE:void 0;await N(c,_),d(null)}},E=_=>{if(_==="12_months"){u(`/subscription-plans?selected=12_months&promo=${nn.PROMO_CODE}`);return}j(_)};return s.jsxs("section",{className:"pt-8 pb-16 md:pt-12 md:pb-20 bg-[#fcefe7]",children:[s.jsx(QP,{open:a,onClose:()=>{i(!1),d(null)},onComplete:S,currentProfile:o}),s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"ÎÏιλÎξÏε Ïη ΣÏ
νδÏομή ÏαÏ"}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto",children:"ÎεκινήÏÏε Ïη δÏÏεάν δοκιμή ÏÏν 7 ημεÏÏν. ÎκÏ
ÏÏÏÏε ανά ÏάÏα ÏÏιγμή."})]}),s.jsx("div",{className:"max-w-4xl mx-auto mb-12",children:s.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:x.map((_,I)=>s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Ar,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"text-sm md:text-base text-foreground",children:_})]},I))})}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6 sm:gap-8 max-w-5xl mx-auto mb-12",children:w.map(_=>{const I=_.icon,R=p&&g===_.id,T=e&&r===_.id;return s.jsxs(oe,{className:`relative ${_.popular?"border-primary shadow-lg scale-105":""} ${R?"border-green-500":""}`,children:[_.blackFriday&&s.jsxs(ye,{className:"absolute -top-3 left-1/2 transform -translate-x-1/2 bg-gradient-to-r from-red-600 to-red-700 text-white hover:from-red-700 hover:to-red-800 flex items-center gap-1 px-3 py-1",children:[s.jsx(jo,{className:"h-3 w-3"}),"BLACK FRIDAY"]}),_.popular&&!_.blackFriday&&s.jsx(ye,{className:"absolute -top-3 left-1/2 transform -translate-x-1/2 bg-[#d38280] text-white hover:bg-[#d38280]",children:"Πιο ÎημοÏιλÎÏ"}),s.jsxs(xe,{className:"text-center",children:[s.jsx(I,{className:`w-12 h-12 mx-auto mb-4 ${_.popular?"text-primary":"text-muted-foreground"}`}),s.jsx(be,{className:"text-2xl",children:_.name}),_.blackFriday?s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-lg text-muted-foreground line-through",children:"â¬99"}),s.jsx("div",{className:"text-4xl font-bold text-primary",children:"â¬59"}),s.jsx("p",{className:"text-sm text-red-600 font-semibold",children:"ÎξοικονÏμηÏη â¬40!"}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["ÎÏνο για Ïην ÏÏÏÏη ÏÏÎÏÏη με Ïον κÏÎ´Î¹ÎºÏ ",s.jsx("strong",{children:"BLACK
715FRIDAY"})]})]}):s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"text-3xl font-bold",children:["â¬",_.price]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:_.period}),_.savings&&s.jsx(ye,{className:"bg-[#f1cdcc] text-[#8b4513] border-[#ffccb8] hover:bg-[#f1cdcc]",children:_.savings})]})]}),s.jsx(ce,{className:"pt-4",children:s.jsx(F,{className:`w-full min-h-[44px] text-sm sm:text-base ${_.popular?"bg-[#d38280] hover:bg-[#c17270] text-white":"border-[#d38280] text-[#d38280] hover:bg-[#d38280] hover:text-white"}`,variant:_.popular?"default":"outline",size:"lg",onClick:()=>E(_.id),disabled:e||R||b,children:T?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"animate-spin h-4 w-4 border-2 border-white border-t-transparent rounded-full"}),s.jsx("span",{className:"text-sm sm:text-base",children:"ÎÏεξεÏγαÏία..."})]}):b?"ÎÏεÏε ήδη Î ÏÏÏβαÏη":R?v?"ÎνεÏγή Îοκιμή":"ΤÏÎÏον Πλάνο":m?"ÎεκινήÏÏε ÎÏÏεάν Îοκιμή":"ÎγγÏαÏείÏε ΤÏÏα"})})]},_.id)})}),s.jsx("div",{className:"text-center text-sm text-muted-foreground max-w-2xl mx-auto",children:s.jsx("p",{children:"ÎÎ»ÎµÏ Î¿Î¹ ÏÏ
νδÏομÎÏ ÏεÏιλαμβάνοÏ
ν δÏÏεάν δοκιμή 7 ημεÏÏν. Î ÏÏ
νδÏομή ανανεÏνεÏαι αÏ
ÏÏμαÏα και μÏοÏείÏε να Ïην ακÏ
ÏÏÏεÏε ανά ÏάÏα ÏÏιγμή."})})]})]})};class GW{formatDuration(t){const r=Math.floor(t/60),n=t%60;return`${r}:${n.toString().padStart(2,"0")}`}parseVimeoId(t){return t.replace("/videos/","")}determinePageType(t){const r=t.map(n=>n.toLowerCase());
715return console.log("ð·ï¸ Determining page type from tags:",t,"lowercase:",r),r.includes("recipe")||r.includes("recipes")?(console.log("ð Found recipe tag, returning: recipes"),"recipes"):r.includes("podcast")||r.includes("podcasts")?(console.log("ðï¸ Found podcast tag, returning: podcast"),"podcast"):r.includes("workout")||r.includes("workouts")?(console.log("ðª Found workout tag, returning: workouts"),"workouts"):r.includes("breathwork")||r.includes("breathworks")?(console.log("ð« Found breathwork tag, returning: breathworks"),"breathworks"):r.includes("dialogismoi")?(console.log("ð Found dialogismoi tag, returning: dialogismoi"),"dialogismoi"):(console.log("â No matching tags found, returning: undefined"),"undefined")}assignOverlayColor(t,r){if(t!=="workouts"&&t!=="dialogismoi"&&t!=="breathworks")return null;const n=["overlay-beige-orange-1","overlay-beige-orange-2","overlay-beige-orange-3","overlay-beige-pink-2"],a=r.split("").reduce((i,o)=>i+o.charCodeAt(0),0);return n[a%4]}determineCategory(t){const r=t.map(n=>n.toLowerCase());return r.includes("sweat")?"Sweat":r.includes("strength")?"Strength":r.includes("mobility")||r.includes("κινηÏικÏÏηÏα")?"ÎινηÏικÏÏηÏα":r.includes("yoga")?"Yoga":r.includes("pilates")?"Pilates":r.includes("cardio")?"Cardio":r.includes("hiit")?"HIIT":"General"}processDescription(t){if(!t)return"";console.log("ð Original description:",t);let r=t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/ /g," ");r=r.replace(/â¢/g,"⢠").replace(/·/g,"⢠").replace(/â§/g,"⢠").replace(/\u2022/g,"⢠").replace(/\u00B7/g,"⢠").replace(/\u2027/g,"⢠");const n=r.split(` 716`);let a=!1,i=!1;const l=n.map((c,d)=>{const u=c.trim();if(!u||u.startsWith("â¢")||u.startsWith("-")||u.startsWith("*"))return c;const m=/ÏÏειαÏÏείÏε|Ï Î»Î¹ÎºÎ¬/i.test(u)&&u.endsWith(":"),f=/εκÏÎλεÏη|οδηγίεÏ|ÏαÏαÏÎºÎµÏ Î®/i.test(u)&&u.endsWith(":");return m?(a=!0,i=!1,c):f?(a=!1,i=!0,c):u.endsWith(":")||u.length>50&&u.includes("!")?(a=!1,i=!1,c):u===""?c:a&&u.length>3?(console.log("ð¥ Adding bullet to ingredient:",u),`⢠${u}`):i&&u.length>8&&/^[Î-Ω][α-Ïά-Ï]+/.test(u)?(console.log("ð¨âð³ Adding bullet to instruction:",u),`⢠${u}`):c}).join(` 717`).trim();return console.log("â Processed description:",l),l}async fetchAndSyncVimeoVideos(t=!1){try{const{data:r,error:n}=await U.functions.invoke("fetch-vimeo-videos");if(n)throw console.error("Vimeo API error:",n),n;if(!(r!=null&&r.videos)||!Array.isArray(r.videos))throw new Error("Invalid Vimeo API response");const a=r.videos.map(async o=>{const l=this.parseVimeoId(o.id),c=o.categories||[],{data:d}=await U.from("videos").select("*").eq("vimeo_id",l).single(),u={vimeo_id:l,instructor:o.instructor,duration_seconds:this.parseDuration(o.duration),thumbnail_url:o.thumbnail,embed_html:o.embedHtml,vimeo_tags:c};if((!(d!=null&&d.title_manually_edited)||t)&&(u.title=o.title,t&&(d!=null&&d.title_manually_edited)&&(u.title_manually_edited=!1)),(!(d!=null&&d.description_manually_edited)||t)&&(u.description=this.processDescription(o.description||""),t&&(d!=null&&d.description_manually_edited)&&(u.description_manually_edited=!1)),d){const m=this.determinePageType(c);console.log(`ð Updating existing video ${l} (${o.title}) with page type: ${m}`);const f={...u,page_type:m,category:this.determineCategory(c)};if(!d.overlay_color){const g=this.assignOverlayColor(m,l);g&&(f.overlay_color=g)}if(m==="podcast"&&(f.instructor="ÎάνÏια ÎÏÎ¿Ï Î»Î",!d.season_number)){const g=this.extractSeasonNumber(c);g&&(f.season_number=g,f.episode_number=await this.getNextEpisodeNumber(g),console.log(`ðï¸ Auto-assigning existing podcast: Season ${g}, Episode ${f.episode_number}`))}const{data:p,error:v}=await U.from("videos").update(f).eq("vimeo_id",l).select().single();return v?(console.error("Error updating existing video:",v),null):this.transformToVideo(p)}else{const m=this.determinePageType(c),f=this.assignOverlayColor(m,l);let p=null,v=null,g=u.instructor;m==="podcast"&&(g="ÎάνÏια ÎÏÎ¿Ï Î»Î",p=this.extractSeasonNumber(c),p&&(v=await this.getNextEpisodeNumber(p),c
717onsole.log(`ðï¸ Auto-assigning podcast: Season ${p}, Episode ${v}, Instructor: ${g}`)));const b={...u,instructor:g,page_type:m,category:this.determineCategory(c),overlay_color:f,season_number:p,episode_number:v,is_visible:!0,is_featured:!1,is_premium:!1,priority_order:0},{data:y,error:x}=await U.from("videos").insert(b).select().single();return x?(console.error("Error inserting new video:",x),null):this.transformToVideo(y)}});return(await Promise.all(a)).filter(o=>o!==null)}catch(r){throw console.error("Error in fetchAndSyncVimeoVideos:",r),r}}parseDuration(t){const r=t.split(":");return r.length===2?parseInt(r[0])*60+parseInt(r[1]):0}extractSeasonNumber(t){const r=t.map(n=>n.toLowerCase());for(const n of r){const a=n.match(/^s(\d+)$/);if(a)return parseInt(a[1])}return null}async getNextEpisodeNumber(t){const{data:r,error:n}=await U.from("videos").select("episode_number").eq("page_type","podcast").eq("season_number",t).order("episode_number",{ascending:!1}).limit(1).maybeSingle();return n||!(r!=null&&r.episode_number)?1:r.episode_number+1}transformToVideo(t){return{id:t.id,vimeoId:t.vimeo_id,title:t.title,description:t.description,instructor:t.instructor,instructor_id:t.instructor_id,duration:t.duration_seconds?this.formatDuration(t.duration_seconds):"0:00",durationSeconds:t.duration_seconds,thumbnail:t.custom_thumbnail||t.thumbnail_url||"/placeholder.svg",embedHtml:t.embed_html,pageType:t.page_type,category:t.category,subcategory:t.subcategory,difficultyLevel:t.difficulty_level,muscle_group:t.muscle_group,equipmentRequired:t.equipment_required,isFeatured:t.is_featured,isPremium:t.is_premium,isVisible:t.is_visible,priorityOrder:t.priority_order||0,releaseDate:t.release_date,expiryDate:t.expiry_date,isSeasonal:t.is_seasonal,seasonStartMonth:t.season_start_month,seasonEndMonth:t.season_end_month,vimeoTags:t.vimeo_tags,customThumbnail:t.custom_thumbnail,notes:t.notes,seasonNumber:t.season_number,episodeNumber:t.episode_number,seasonTitle:t.season_title,overlayColor:t.overlay_color,createdAt:t.created_at,publishedAt:t.published_at}}async getVideosByPage(t){try{let r=U.from("videos").select("*").or(`page_type.eq.${t},page_type.eq.all`).eq("is_visible",!0);t==="podcast"?r=r.order("season_number",{ascending:!1,nullsFirst:!1}).order("episode_number",{ascending:!1,nullsFirst:!1}).order("release_date",{ascending:!1,nullsFirst:!1}).order("created_at",{ascending:!1}):r=r.order("is_featured",{ascending:!1}).order("priority_order",{ascending:!1}).order("created_at",{ascending:!1});const{data:n,error:a}=await r;if(a)throw a;const i=new Date;return n.filter(l=>l.published_at?new Date(l.published_at)<=i:!0).map(l=>this.transformToVideo(l))}catch(r){return console.error("Error fetching videos by page:",r),[]}}async getRecipeVideosWithCategories(){try{const{data:t,error:r}=await U.from("videos").select("*").eq("page_type","recipes").eq("is_visible",!0).order("is_featured",{ascending:!1}).order("priority_order",{ascending:!1}).order("created_at",{ascending:!1});if(r)throw r;if(!t||t.length===0)return[];const n=new Date,a=t.filter(c=>c.published_at?new Date(c.published_at)<=n:!0),i=a.map(c=>c.vimeo_id),{data:o,error:l}=await U.from("video_category_assignments").select(` 718 video_id, 719 category_id, 720 video_categories!inner (name) 721 `).in("video_id",i);if(l)throw l;return a.map(c=>{const d=this.transformToVideo(c),u=(o==null?void 0:o.filter(p=>p.video_id===c.vimeo_id))||[],m=u.map(p=>p.category_id),f=u.map(p=>p.video_categories.name);return{...d,categoryIds:m,categories:f}})}catch(t){return console.error("Error fetching recipe videos with categories:",t),[]}}async getRecipeCategories(){try{const{data:t,error:r}=await U.from("video_categories").select("id, name, slug, color_hex").eq("is_active",!0).in("name",["ÎÎÎ¥ÎÎΤÎ","ΣÎÎÎΤÎΣ","ΣÎÎÎ","ÎÎÎ¥ÎÎ","ΡÎΦÎÎÎΤÎ"]).order("sort_order");if(r)throw r;return t||[]}catch(t){return console.error("Error fetching recipe categories:",t),[]}}async getAllVideos(){try{const{data:t,error:r}=await U.from("videos").select("*").eq("is_visible",!0).order("created_at",{ascending:!1});if(r)throw r;const n=new Date;return t.filter(i=>i.published_at?new Date(i.published_at)<=n:!0).map(i=>this.transformToVideo(i))}catch(t){return console.error("Error fetching all videos:",t),[]}}async getAdminAllVideos(){try{const{data:t,error:r}=await U.from("videos").select("*").order("created_at",{ascending:!1});if(r)throw r;return t.map(n=>this.transformToVideo(n))}catch(t){return console.error("Error fetching admin videos:",t),[]}}async updateVideo(t,r){try{const n={};r.title!==void 0&&(n.title=r.title),r.description!==void 0&&(n.description=r.description,n.description_manually_edited=!0),r.instructor!==void 0&&(n.instructor=r.instructor),r.instructor_id!==void 0&&(n.instructor_id=r.instructor_id),r.pageType!==void 0&&(n.page_type=r.pageType),r.category!==void 0&&(n.category=r.category),r.subcategory!==void 0&&(n.subcategory=r.subcategory),r.difficultyLevel!==void 0&&(n.difficulty_level=r.difficultyLevel),r.muscle_group!==void 0&&(n.muscle_group=r.muscle_group),r.equipmentRequired!==void 0&&(n.equipment_required=r.equipmentRequired),r.isFeatured!==void 0&&(n.is_featured=r.is
721Featured),r.isPremium!==void 0&&(n.is_premium=r.isPremium),r.isVisible!==void 0&&(n.is_visible=r.isVisible),r.priorityOrder!==void 0&&(n.priority_order=r.priorityOrder),r.customThumbnail!==void 0&&(n.custom_thumbnail=r.customThumbnail),r.notes!==void 0&&(n.notes=r.notes),r.releaseDate!==void 0&&(n.release_date=r.releaseDate),r.expiryDate!==void 0&&(n.expiry_date=r.expiryDate),r.seasonNumber!==void 0&&(n.season_number=r.seasonNumber),r.episodeNumber!==void 0&&(n.episode_number=r.episodeNumber),r.seasonTitle!==void 0&&(n.season_title=r.seasonTitle),r.publishedAt!==void 0&&(n.published_at=r.publishedAt),console.log("Updating video with data:",n);const{data:a,error:i}=await U.from("videos").update(n).eq("id",t).select().single();if(i)throw console.error("Database error details:",i),i;return this.transformToVideo(a)}catch(n){return console.error("Error updating video:",n),null}}async bulkUpdateVideos(t,r){try{const n={};r.isFeatured!==void 0&&(n.is_featured=r.isFeatured),r.isPremium!==void 0&&(n.is_premium=r.isPremium),r.isVisible!==void 0&&(n.is_visible=r.isVisible),r.pageType!==void 0&&(n.page_type=r.pageType),r.category!==void 0&&(n.category=r.category),r.difficultyLevel!==void 0&&(n.difficulty_level=r.difficultyLevel),r.muscle_group!==void 0&&(n.muscle_group=r.muscle_group);const{error:a}=await U.from("videos").update(n).in("id",t);if(a)throw a;return!0}catch(n){return console.error("Error bulk updating videos:",n),!1}}async getVideoByVimeoId(t){try{const{data:r,error:n}=await U.from("videos").select("*").eq("vimeo_id",t).single();return n||!r?null:this.transformToVideo(r)}catch(r){return console.error("Error fetching video by Vimeo ID:",r),null}}async getPodcastSeasons(){try{const{data:t,error:r}=await U.from("podcast_seasons").select("*").eq("is_active",!0).order("season_number",{ascending:!0});if(r)throw r;return t.map(n=>({id:n.id,seasonNumber:n.season_number,title:n.title,description:n.description,isActive:n.is_active,createdAt:n.created_at,updatedAt:n.updated_at}))}catch(t){return console.error("Error fetching podcast seasons:",t),[]}}async createPodcastSeason(t){try{const{data:r,error:n}=await U.from("podcast_seasons").insert({season_number:t.seasonNumber,title:t.title,description:t.description}).select().single();if(n)throw n;return{id:r.id,seasonNumber:r.season_number,title:r.title,description:r.description,isActive:r.is_active,createdAt:r.created_at,updatedAt:r.updated_at}}catch(r){return console.error("Error creating podcast season:",r),null}}async updatePodcastSeason(t,r){try{const n={};r.title!==void 0&&(n.title=r.title),r.description!==void 0&&(n.description=r.description);const{data:a,error:i}=await U.from("podcast_seasons").update(n).eq("id",t).select().single();if(i)throw i;return{id:a.id,seasonNumber:a.season_number,title:a.title,description:a.description,isActive:a.is_active,createdAt:a.created_at,updatedAt:a.updated_at}}catch(n){return console.error("Error updating podcast season:",n),null}}async autoAssignPodcastSeasons(){try{const{error:t}=await U.rpc("auto_assign_podcast_seasons");if(t)throw t}catch(t){throw console.error("Error auto-assigning podcast seasons:",t),t}}async getVideosBySeason(t){try{const{data:r,error:n}=await U.from("videos").select("*").eq("page_type","podcast").eq("season_number",t).eq("is_visible",!0).order("release_date",{ascending:!1,nullsFirst:!1}).order("episode_number",{ascending:!1,nullsFirst:!1}).order("created_at",{ascending:!1});if(n)throw n;return r.map(a=>this.transformToVideo(a))}catch(r){return console.error("Error fetching videos by season:",r),[]}}async resetDescriptionManualEditFlag(t){const{error:r}=await U.from("videos").update({description_manually_edited:!1}).eq("vimeo_id",t);if(r)throw console.error("Error resetting description manual edit flag:",r),r}async resetTitleManualEditFlag(t){const{error:r}=await U.from("videos").update({title_manually_edited:!1}).eq("vimeo_id",t);if(r)throw console.error("Error resetting title manual edit flag:",r),r}async resetAllTitleManualEditFlags(){const{error:t}=await U.from("videos").update({title_manually_edited:!1}).eq("title_manually_edited",!0);if(t)throw console.error("Error resetting all title manual edit flags:",t),t}async resetAllDescriptionManualEditFlags(){const{error:t}=await U.from("videos").update({description_manually_edited:!1}).eq("description_manually_edited",!0);if(t)throw console.error("Error resetting all description manual edit flags:",t),t}}const vl=new GW,ki=e=>{const t=g4(),r=e?["videos",e]:["videos","all"],{data:n=[],isLoading:a,error:i,refetch:o}=v4({queryKey:r,queryFn:async()=>e?await vl.getVideosByPage(e):await vl.getAllVideos(),staleTime:5*60*1e3,gcTime:30*60*1e3});return{videos:n,loading:a,error:i?"Failed to load videos":null,refetch:o,syncWithVimeo:async(c=!1)=>{try{await vl.fetchAndSyncVimeoVideos(c),await t.invalidateQueries({queryKey:["videos"]})}catch(d){throw console.error("Error syncing with Vimeo:",d),d}}}}
721,Fw=e=>e.map(t=>({id:t.vimeoId,title:t.title,overlayTitle:t.title,instructor:t.instructor||"Well Be Team",duration:t.duration,thumbnail:t.thumbnail,embedHtml:t.embedHtml,description:t.description,categories:t.category?[t.category]:[],difficultyLevel:t.difficultyLevel,isFeatured:t.isFeatured,isPremium:t.isPremium}));function wt({className:e,...t}){return s.jsx("div",{className:me("animate-pulse rounded-md bg-muted",e),...t})}var YW="AspectRatio",XP=h.forwardRef((e,t)=>{const{ratio:r=1/1,style:n,...a}=e;return s.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/r}%`},"data-radix-aspect-ratio-wrapper":"",children:s.jsx(Ce.div,{...a,ref:t,style:{...n,position:"absolute",top:0,right:0,bottom:0,left:0}})})});XP.displayName=YW;var KW=XP;const JP=KW,QW=()=>{const e=qe(),{videos:t,loading:r}=ki("podcast"),[n,a]=h.useState(!1),i=t[0],o=()=>{e("/podcast")},l=()=>{e("/podcast")};return r?s.jsx("section",{className:"w-full",children:s.jsxs("div",{className:"grid lg:grid-cols-[3fr_2fr] min-h-[500px]",children:[s.jsxs("div",{className:"bg-[#F5F1E8] p-8 md:p-12 lg:p-16 flex flex-col justify-center",children:[s.jsx(wt,{className:"h-12 w-3/4 mb-6"}),s.jsx(wt,{className:"h-24 w-full mb-8"}),s.jsx(wt,{className:"h-12 w-48"})]}),s.jsx("div",{className:"bg-muted min-h-[400px] lg:min-h-full",children:s.jsx(wt,{className:"w-full h-full"})})]})}):i?s.jsx("section",{className:"w-full relative overflow-hidden",children:s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:"absolute inset-0 hidden lg:flex",children:[s.jsx("div",{className:"w-[60%] bg-[#F5F1E8]"}),s.jsx("div",{className:"w-[40%] bg-[#E5DED0]"})]}),s.jsx("div",{className:"absolute inset-0 bg-[#F5F1E8] lg:hidden"}),s.jsx("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 md:px-12 lg:px-16 py-8 sm:py-12 lg:py-20",children:s.jsxs("div",{className:"flex flex-col lg:grid lg:grid-cols-2 gap-8 lg:gap-8 items-center",children:[s.jsxs("div",{className:"w-full lg:pr-32 order-2 lg:order-1",children:[s.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold text-[#2D2D2D] mb-4 sm:mb-6",children:"Nadia Talks Wellness Podcast"}),s.jsxs("div",{className:"mb-6 sm:mb-8",children:[s.jsx("p",{className:"text-sm sm:text-base text-gray-700 leading-relaxed",children:i.description?i.description.length>250&&!n?i.description.substring(0,250)+"...":i.description:"ÎκοÏÏÏε Ïο ÏελεÏ
Ïαίο εÏειÏÏδιο ÏοÏ
podcast μαÏ."}),i.description&&i.description.length>250&&s.jsx(F,{variant:"ghost",size:"sm",onClick:()=>a(!n),className:"mt-2 text-primary hover:text-primary/80 px-0 h-auto font-normal min-h-[44px]",children:n?"ÎιγÏÏεÏα":"ΠεÏιÏÏÏÏεÏα"})]}),s.jsx(F,{onClick:o,className:"bg-[#3D3D3D] hover:bg-[#2D2D2D] text-white px-6 sm:px-8 py-5 sm:py-6 text-sm sm:text-base tracking-wide w-full sm:w-fit min-h-[44px]",children:W0("ÎείÏε Ïλα Ïα εÏειÏÏδια")})]}),s.jsx("div",{className:"w-full order-1 lg:order-2 flex justify-center lg:justify-end",children:s.jsx("div",{className:"cursor-pointer group w-full max-w-[400px] sm:max-w-[500px] md:max-w-[600px] lg:max-w-[580px] xl:max-w-[620px]",onClick:l,children:s.jsxs(JP,{ratio:16/9,className:"relative",children:[s.jsx("img",{src:i.thumbnail,alt:i.title,className:"w-full h-full object-cover rounded-xl shadow-2xl transition-transform duration-300 group-hover:scale-[1.02]"}),s.jsx("div",{className:"absolute inset-0 rounded-xl bg-black/10 group-hover:bg-black/20 transition-all duration-300 flex items-center justify-center",children:s.jsx(qf,{className:"w-20 h-20 md:w-16 md:h-16 text-white drop-shadow-lg transition-transform duration-300 group-hover:scale-110"})})]})})})]})})]})}):null},ZP=()=>{const[e,t]=h.useState([]),[r,n]=h.useState([]),[a,i]=h.useState(!0),[o,l]=h.useState(null),c=async()=>{try{console.log("ð useRecipes: Starting to load data..."),console.log("ð useRecipes: Current state - loading:",a,"error:",o),i(!0),l(null),console.log("ð useRecipes: Calling videoService methods...");const[m,f]=await Promise.all([vl.getRecipeVideosWithCategories(),vl.getRecipeCategories()]);console.log("â
useRecipes: Videos loaded:",m.length),console.log("â
useRecipes: Categories loaded:",f.length),console.log("â
useRecipes: Sample video data:",m[0]),c
721onsole.log("â
useRecipes: Sample category data:",f[0]),t(m),n(f),console.log("â
useRecipes: Data loaded successfully, state updated")}catch(m){console.error("â useRecipes: Error loading recipes data:",m),console.error("â useRecipes: Error details:",{message:m instanceof Error?m.message:"Unknown error",stack:m instanceof Error?m.stack:void 0,type:typeof m,stringified:JSON.stringify(m,null,2)}),l(`Failed to load recipes: ${m instanceof Error?m.message:"Unknown error"}`),t([]),n([])}finally{console.log("ð useRecipes: Setting loading to false"),i(!1)}};h.useEffect(()=>{c()},[]);const d=h.useMemo(()=>e,[e]),u=h.useMemo(()=>r,[r]);return{videos:d,categories:u,loading:a,error:o,refetch:c}},Gx=768;function Wl(){const[e,t]=h.useState(void 0);return h.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Gx-1}px)`),n=()=>{t(window.innerWidth<Gx)};return r.addEventListener("change",n),t(window.innerWidth<Gx),()=>r.removeEventListener("change",n)},[]),!!e}const XW=()=>{const e=qe(),{videos:t,loading:r}=ZP(),n=Wl(),a=ie.useMemo(()=>{if(t.length===0)return[];const o=[...t].sort(()=>.5-Math.random()),l=n?2:3;return o.slice(0,l)},[t,n]),i=()=>{e("/recipes")};return r?s.jsx("section",{className:"py-20",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center",children:[s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[1,2,...n?[]:[3]].map(o=>s.jsx(wt,{className:"w-full aspect-[9/16]"},o))}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(wt,{className:"h-12 w-3/4"}),s.jsx(wt,{className:"h-24 w-full"}),s.jsx(wt,{className:"h-10 w-48"})]})]})})}):a.length===0?null:s.jsxs("section",{className:"relative overflow-hidden",children:[s.jsxs("div",{className:"absolute inset-0 hidden lg:flex",children:[s.jsx("div",{className:"w-[40%]",style:{backgroundColor:"#fcefe7"}}),s.jsx("div",{className:"w-[60%]",style:{backgroundColor:"#FFF7ED"}})]}),s.jsx("div",{className:"absolute inset-0 bg-[#FFF7ED] lg:hidden"}),s.jsx("div",{className:"container mx-auto px-4 sm:px-6 md:px-8 py-8 sm:py-12 lg:py-20 relative z-10",children:s.jsxs("div",{className:"flex flex-col lg:grid lg:grid-cols-2 gap-8 lg:gap-16 items-center",children:[s.jsx("div",{className:"w-full order-1 lg:order-1 flex justify-center lg:justify-start",children:s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 sm:gap-3 md:gap-4 w-full max-w-md md:max-w-lg lg:max-w-xl",children:a.map((o,l)=>s.jsx("div",{onClick:i,className:"group cursor-pointer transform hover:scale-105 transition-all duration-300 hover:z-10",style:{animation:`fade-in 0.6s ease-out ${l*.1}s backwards`},children:s.jsxs("div",{className:"bg-white p-2 shadow-lg hover:shadow-2xl transition-shadow duration-300 rounded-sm",children:[s.jsxs(JP,{ratio:9/16,className:"relative overflow-hidden rounded-sm",children:[o.thumbnail?s.jsx("img",{src:o.thumbnail,alt:o.title,className:"w-full h-full object-cover"}):s.jsx("div",{className:"w-full h-full bg-gradient-to-br from-orange-100 to-red-100 flex items-center justify-center",children:s.jsx(oE,{className:"w-6 h-6 sm:w-8 sm:h-8 text-orange-300"})}),s.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-all duration-300 flex items-center justify-center",children:s.jsx(qf,{className:"w-8 h-8 sm:w-8 sm:h-8 text-white opacity-0 group-hover:opacity-100 transform scale-75 group-hover:scale-100 transition-all duration-300"})})]}),s.jsx("p",{className:"mt-1 text-xs sm:text-[10px] font-medium text-gray-800 line-clamp-1 text-center",children:o.title})]})},o.vimeoId))})}),s.jsxs("div",{className:"w-full space-y-4 sm:space-y-6 md:pl-8 relative z-10 order-2 lg:order-2",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold text-gray-900 mb-3 sm:mb-4",children:"Nadia's Healthy Recipes"}),s.jsx("p",{className:"text-sm sm:text-base text-gray-700 leading-relaxed",children:"ÎνακαλÏÏÏε Ï
γιεινÎÏ ÎºÎ±Î¹ νÏÏÏÎ¹Î¼ÎµÏ ÏÏ
νÏαγÎÏ ÏοÏ
θα ÏÎ±Ï Î²Î¿Î·Î¸Î®ÏοÏ
ν να διαÏηÏήÏεÏε μια ιÏοÏÏοÏημÎνη διαÏÏοÏή. ÎÏκολα Ïνακ, γλÏ
κά ÏÏÏÎ¯Ï ÎµÏεξεÏγαÏμÎνη ζάÏαÏη και κÏ
ÏίÏÏ Î³ÎµÏμαÏα ÏοÏ
γίνονÏαι γÏήγοÏα."})]}),s.jsx(F,{onClick:i,variant:"default",size:"lg",className:"bg-[#3D3D3D] hover:bg-[#2D2D2D] text-white font-semibold px-6 sm:px-8 py-5 sm:py-6 text-sm sm:text-base w-full sm:w-fit min-h-[44px]",children:"ÎÎÎΤΠÎÎÎΣ ΤÎΣ ΣΥÎΤÎÎÎΣ"})]})]})})]})},JW=()=>{const e=qe();return s.jsx("section",{className:"py-12",style:{backgroundColor:"#ffffff"},children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("div",{className:"text-center mb-12",children:s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground",children:"WORK OUT ANYWHERE, ANYTIME!"})}),s.jsx("div",{className:"flex justify-center mb-8",children:s.jsx("img",{src:"/devices-mockup.png",alt:"Work out on any device - mobile, tablet, and desktop",className:"max-w-4xl w-full h-auto"})}),s.jsx("div",{className:"flex justify-center",children:s.jsx(F,{onClick:()=>e("/faq"),variant:"default",size:"lg",className:"bg-[#3D3D3D] hover:bg-[#2D2D2D] text-white font-semibold px-4 sm:px-6 md:px-8 py-5 sm:py-6 text-sm sm:text-base w-full sm:w-auto min-h-[44px]",children:"ÎΧÎΤΠÎΡΩΤÎΣÎÎΣ; ÎΧÎÎ¥ÎΠΤÎΣ ÎÎ ÎÎΤÎΣÎÎΣ!"})})]})})},ZW="/lovable-uploads/178aaf5e-1f4c-4907-9133-a1a16d90f133.png",eV="/lovable-uploads/9406647d-c219-48ca-93b6-829669b737c5.png",Be=()=>s.jsx(s.Fragment,{children:s.jsx("footer",{className:"bg-foreground
721/5 border-t border-border print:hidden",children:s.jsxs("div",{className:"container mx-auto px-4 py-12",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2",children:[s.jsx("div",{className:"flex items-center mb-4",children:s.jsx("img",{src:"/lovable-uploads/463c9522-3313-4588-bd87-40273096d456.png",alt:"Well Be Workouts",className:"h-12"})}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-md",children:"ÎάνÏε Ïην εγγÏαÏή ÏÎ±Ï online, ÏÏ
νδεθείÏε ÏÏο site ή καÏεβάÏÏε Ïο app και αÏοκÏήÏÏε ÏÏÏÏβαÏη Ïε Ïλα Ïα workouts, ÏοÏ
Ï Î´Î¹Î±Î»Î¿Î³Î¹ÏμοÏÏ, Ïα breathworks, Ïα podcast, ÏÎ¹Ï ÏÏ
νÏαγÎÏ ÎºÎ±Î¹ ÏÏο Well Be community!"}),s.jsxs("div",{className:"flex space-x-4",children:[s.jsx("a",{href:"https://www.youtube.com/@WellBebyNadiaBoule",target:"_blank",rel:"noopener noreferrer",className:"p-2 rounded-lg hover:bg-primary/10 hover:text-primary transition-colors","aria-label":"Visit our YouTube channel",children:s.jsx(n6,{className:"w-7 h-7"})}),s.jsx("a",{href:"https://www.instagram.com/wellbe.gr/",target:"_blank",rel:"noopener noreferrer",className:"p-2 rounded-lg hover:bg-primary/10 hover:text-primary transition-colors","aria-label":"Follow us on Instagram",children:s.jsx($5,{className:"w-7 h-7"})}),s.jsx("a",{href:"https://www.facebook.com/BbyNadiaBoule",target:"_blank",rel:"noopener noreferrer",className:"p-2 rounded-lg hover:bg-primary/10 hover:text-primary transition-colors","aria-label":"Like us on Facebook",children:s.jsx(O5,{className:"w-7 h-7"})}),s.jsx("a",{href:"https://www.tiktok.com/@wellbe.gr",target:"_blank",rel:"noopener noreferrer",className:"p-2 rounded-lg hover:bg-primary/10 hover:text-primary transition-colors","aria-label":"Follow us on TikTok",children:s.jsx("svg",{className:"w-7 h-7",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:s.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5 20.1a6.34 6.34 0 0 0 10.86-4.43v-7a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1-.1z"})})})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold text-foreground mb-4",children:"ÎÏήγοÏοι ΣÏνδεÏμοι"}),s.jsxs("ul",{className:"space-y-2",children:[s.jsx("li",{children:s.jsx(cs,{to:"/",className:"text-muted-foreground hover:text-primary transition-colors",children:"ÎÏÏική"})}),s.jsx("li",{children:s.jsx(cs,{to:"/community",className:"text-muted-foreground hover:text-primary transition-colors",children:"Well Be Community"})}),s.jsx("li",{children:s.jsx(cs,{to:"/dashboard",className:"text-muted-foreground hover:text-primary transition-colors",children:"Î ÎογαÏιαÏμÏÏ Î¼Î¿Ï
"})}),s.jsx("li",{children:s.jsx(cs,{to:"/about",className:"text-muted-foreground hover:text-primary transition-colors",children:"ΣÏεÏικά με Ïη ÎάνÏια"})}),s.jsx("li",{children:s.jsx(cs,{to:"/gift-cards",className:"text-muted-foreground hover:text-primary transition-colors",children:"ÎγοÏά ÎάÏÏÎ±Ï ÎÏÏοÏ
"})})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold text-foreground mb-4",children:"Î¥ÏοÏÏήÏιξη"}),s.jsxs("ul",{className:"space-y-2",children:[s.jsx("li",{children:s.jsx(cs,{to:"/help-center",className:"text-muted-foreground hover:text-primary transition-colors",children:"ÎÎνÏÏο ÎοήθειαÏ"})}),s.jsx("li",{children:s.jsx(cs,{to:"/contact",className:"text-muted-foreground hover:text-primary transition-colors",children:"ÎÏικοινÏνία"})}),s.jsx("li",{children:s.jsx(cs,{to:"/faq",className:"text-muted-foreground hover:text-primary transition-colors",children:"ΣÏ
ÏνÎÏ ÎÏÏÏήÏειÏ"})}),s.jsx("li",{children:s.jsx(cs,{to:"/privacy-policy",className:"text-muted-foreground hover:text-primary transition-colors",children:"ΠολιÏική ÎÏοÏÏήÏοÏ
"})}),s.jsx("li",{children:s.jsx(cs,{to:"/terms-of-service",className:"text-muted-foreground hover:text-primary transition-colors",children:"ÎÏοι ΧÏήÏηÏ"})})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold text-foreground mb-4",children:"ÎαÏεβάÏÏε Ïο Well Be App"}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsx("a",{href:"https://apps.apple.com/us/app/well-be-workouts/id1631929495",target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:s.jsx("img",{src:ZW,alt:"Download on the App Store",className:"h-10 w-auto object-contain hover:opacity-80 transition-opacity"})}),s.jsx("a",{href:"https://play.google.com/store/apps/details?id=tv.uscreen.wellbeworkouts",target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:s.jsx("img",{src:eV,alt:"Get it on Google Play",className:"h-10 w-auto object-contain hover:opacity-80 transition-opacity"})})]})]})]}),s.jsxs("div",{className:"border-t border-border mt-8 pt-8 flex flex-col md:flex-row justify-between items-center",children:[s.jsx("p",{className:"text-muted-foreground text-sm",children:"© 2025 Well Be By Nadia Boule. All rights Reserved."}),s.jsxs("div",{className:"flex space-x-6 mt-4 md:mt-0",children:[s.jsx(cs,{to:"/subscription-plans",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:"ÎγοÏά ΣÏ
νδÏομήÏ"}),s.jsx(cs,{to:"/gift-cards",className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:"ÎγοÏά ÎάÏÏÎ±Ï ÎÏÏÎ
721¿Ï
"})]})]})]})})}),z1="blackFridayBanner2025Dismissed",Yx=nn.PROMO_CODE,tV=nn.END_DATE,sV=()=>{const[e,t]=h.useState(!1),r=qe(),{toast:n}=at();h.useEffect(()=>{const l=localStorage.getItem(z1);if(l){const c=new Date(l);if((new Date().getTime()-c.getTime())/(1e3*60*60)<24)return}new Date<tV&&setTimeout(()=>t(!0),500)},[]);const a=()=>{localStorage.setItem(z1,new Date().toISOString()),t(!1)},i=()=>{navigator.clipboard.writeText(Yx),n({title:"Code copied!",description:"Promo code copied to clipboard"})},o=()=>{a(),r(`/subscription-plans?selected=12_months&promo=${Yx}`)};return e?s.jsxs("div",{className:"fixed inset-0 z-[90] flex items-center justify-center p-4 animate-fade-in",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:a}),s.jsxs("div",{className:"relative bg-gradient-to-br from-gray-900 via-purple-900 to-red-900 border-2 border-primary/30 rounded-2xl shadow-2xl max-w-lg w-full p-8 animate-scale-in",children:[s.jsx("button",{onClick:a,className:"absolute top-4 right-4 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Close banner",children:s.jsx(qr,{className:"h-5 w-5"})}),s.jsxs("div",{className:"text-center space-y-6",children:[s.jsx("div",{className:"space-y-2",children:s.jsxs("div",{className:"flex items-center justify-center gap-2 text-white",children:[s.jsx(jo,{className:"h-6 w-6"}),s.jsx("h2",{className:"text-2xl font-bold",children:"BLACK FRIDAY"}),s.jsx(jo,{className:"h-6 w-6"})]})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-5xl font-bold text-white",children:"40% ÎÎΠΤΩΣÎ"}),s.jsx("p",{className:"text-xl text-white",children:"ΣΤÎΣ ÎΤÎΣÎÎΣ ΣΥÎÎΡÎÎÎΣ"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Use code:"}),s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx("div",{className:"bg-background/50 border border-border px-6 py-3 rounded-lg",children:s.jsx("span",{className:"text-2xl font-mono font-bold tracking-wider text-black",children:Yx})}),s.jsx(F,{variant:"outline",size:"icon",onClick:i,className:"h-12 w-12",children:s.jsx(F0,{className:"h-5 w-5"})})]})]}),s.jsxs("div",{className:"flex items-center justify-center gap-2 text-muted-foreground",children:[s.jsx(Ms,{className:"h-5 w-5"}),s.jsx("span",{className:"font-semibold text-center",children:"Î ÏÏοÏÏοÏά ιÏÏÏει μÎÏÏι 5 ÎεκεμβÏίοÏ
2025"})]}),s.jsx(F,{onClick:o,size:"lg",className:"w-full text-lg font-semibold bg-background/50 border border-border hover:bg-background/70",children:"Î ÏÏλαβε Την Î ÏοÏÏοÏά"})]})]})]}):null},rV=()=>{if(typeof window>"u")return{shouldBlockSearchEngines:!1,isStaging:!1,currentDomain:""};const e=window.location.hostname,t=e==="app.wellbe.gr"||e.includes("lovable.app");return{shouldBlockSearchEngines:t,isStaging:t,currentDomain:e}},Fs=({title:e="Well Be by Nadia Boule",description:t="ΦΡÎÎΤÎΣΤΠΤÎÎ ÎÎΥΤΠΣÎΣ, ÎÎ ÎÎ¥ÎÎÎ ÎΤÎ, ÎÎ ÎÎÎÎÎÎ ÎΤΠΣΤÎÎÎÎ. ÎάνÏε ÎµÎ´Ï Ïην εγγÏαÏή ÏαÏ. ÎαÏεβάÏÏε Ïο APP Ïε iOS ή Android. ÎοκιμάÏÏε δÏÏεάν για 7 ημÎÏεÏ!",keywords:r="well be workouts, nadia boule, fitness videos, greek workouts, γÏ
μναÏÏική, pilates, yoga, barre",canonical:n,robots:a})=>{const i=rV(),o=n??(typeof window<"u"?window.location.pathname==="/"||window.location.pathname===""?"https://wellbe.gr/":`https://wellbe.gr${window.location.pathname}`:"https://wellbe.gr/");return ie.useEffect(()=>{var d;document.title=e;const l=(u,m)=>{let f=document.querySelector(`meta[name="${u}"]`)||document.querySelector(`meta[property="${u}"]`);f?f.setAttribute("content",m):(f=document.createElement("meta"),u.startsWith("og:")||u.startsWith("twitter:")?f.setAttribute("property",u):f.setAttribute("name",u),f.setAttribute("content",m),document.head.appendChild(f))};if(l("description",t),l("keywords",r),l("og:title",e),l("og:description",t),l("og:locale","el_GR"),l("og:url",o),a)l("robots",a);else if(i.shouldBlockSearchEngines)l("robots","noindex, nofollow, noarchive, nosnippet");else{const u=document.querySelector('meta[name="robots"]');u&&((d=u.getAttribute("content"))!=null&&d.includes("noindex"))&&u.remove()}if(o){let u=document.querySelector('link[rel="canonical"]');u?u.setAttribute("href",o):(u=document.createElement("link"),u.setAttribute("rel","canonical"),u.setAttribute("href",o),document.head.appendChild(u))}let c=document.querySelector('link[rel="alternate"][hreflang="el"]');o&&(c?c.setAttribute("href",o):(c=document.createElement("link"),
721c.setAttribute("rel","alternate"),c.setAttribute("hreflang","el"),c.setAttribute("href",o),document.head.appendChild(c)))},[e,t,r,o,a,i.shouldBlockSearchEngines]),null},nV=({name:e="Well Be by Nadia Boule",url:t="https://wellbe.gr",logo:r="https://storage.googleapis.com/gpt-engineer-file-uploads/y0Q8fPnSiXQVTzXbtYaJRfkoNZf1/uploads/1757860010511-wellbe_A_BLACK.png",description:n="ΠλαÏÏÏÏμα wellness με workouts, διαλογιÏμοÏÏ, breathworks, podcast και Ï
γιεινÎÏ ÏÏ
νÏαγÎÏ Î±ÏÏ Ïη ÎάνÏια ÎÏοÏλε",sameAs:a=["https://www.instagram.com/wellbe_by_nadia_boule/","https://www.facebook.com/wellbeworkouts","https://www.youtube.com/@WellBebyNadiaBoule"],contactPoint:i={telephone:"+30-210-654-8886",email:"[email protected]",contactType:"Customer Service"}})=>{const o={"@context":"https://schema.org","@type":"Organization",name:e,url:t,logo:r,description:n,sameAs:a,contactPoint:{"@type":"ContactPoint",...i}};return s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(o)}})},aV=({name:e="Well Be by Nadia Boule",url:t="https://wellbe.gr",description:r="ΠλαÏÏÏÏμα wellness με workouts, διαλογιÏμοÏÏ, breathworks, podcast και Ï
γιεινÎÏ ÏÏ
νÏαγÎÏ"})=>{const n={"@context":"https://schema.org","@type":"WebSite",name:e,url:t,description:r,potentialAction:{"@type":"SearchAction",target:`${t}/catalog?search={search_term_string}`,"query-input":"required name=search_term_string"}};return s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(n)}})},iV=({faqs:e})=>{const t={"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(r=>({"@type":"Question",name:r.question,acceptedAnswer:{"@type":"Answer",text:r.answer}}))};return s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(t)}})},oV=({name:e="Well Be by Nadia Boule",address:t={streetAddress:"ΧÏÏ
ÏοÏÏÏμοÏ
ΣμÏÏÎ½Î·Ï 6",addressLocality:"ΧολαÏγÏÏ",postalCode:"15562",addressCountry:"GR"},telephone:r="+30-210-654-8886",email:n="[email protected]",url:a="https://wellbe.gr"})=>{const i={"@context":"https://schema.org","@type":"LocalBusiness",name:e,address:{"@type":"PostalAddress",...t},telephone:r,email:n,url:a};return s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(i)}})},lV=()=>{const[e,t]=h.useState(!1);return qe(),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"Well Be by Nadia Boule - ÎÏ
μναÏÏική Online, Workouts ÏÏο ΣÏίÏι",description:"ÎνακαλÏÏÏε workouts, διαλογιÏμοÏÏ, breathworks, podcast και Ï
γιεινÎÏ ÏÏ
νÏαγÎÏ Î¼Îµ Ïη ÎάνÏια ÎÏοÏλε. ÎÏÏεάν δοκιμή 7 ημεÏÏν. ÎÏ
μναÏÏική ÏÏοÏ
και ÏÏοÏε θÎλεÏε.",keywords:"well be, nadia boule, γÏ
μναÏÏική online, workouts ÏÏίÏι, pilates, yoga, διαλογιÏμÏÏ, Ï
γιεινÎÏ ÏÏ
νÏαγÎÏ",canonical:"https://wellbe.gr/"}),s.jsx(nV,{}),s.jsx(aV,{}),s.jsx(sV,{}),s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsxs("main",{children:[s.jsx(q9,{}),s.jsx(ez,{}),s.jsx(rz,{vimeoUrl:"https://player.vimeo.com/video/1124628762?autoplay=0&loop=1&byline=0&title=0&controls=0&muted=0&playsinline=1"}),s.jsx(Uz,{}),s.jsx(qW,{}),s.jsx(QW,{}),s.jsx(XW,{}),s.jsx(JW,{})]}),s.jsx(Be,{})]})},cV=()=>{const[e,t]=h.useState(!1);return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"ΣÏεÏικά με Ïη ÎάνÏια ÎÏοÏλε - Well Be",description:"ÎνÏÏίÏÏε Ïη ÎάνÏια ÎÏοÏλε και Ïη ÏιλοÏοÏία ÏοÏ
Well Be. Îια διαδικÏÏ
ακή ÏλαÏÏÏÏμα για wellness, ÏÏ
νειδηÏÎÏ ÎµÏιλογÎÏ ÎºÎ±Î¹ ιÏοÏÏοÏημÎνη ζÏή.",keywords:"nadia boule, νάνÏια μÏοÏλε, well be, fitness instructor, wellness coach",canonical:"https://wellbe.gr/about"}),s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsxs("main",{className:"container mx-auto px-3 xs:px-4 sm:px-6 lg:px-8 py-6 xs:py-8 sm:py-12 pt-20 sm:pt-24 md:pt-28",children:[s.jsx("div",{className:"text-center mb-6 xs:mb-8 sm:mb-12",children:s.jsx("h1",{className:"text-xl xs:text-2xl sm:text-3xl md:text-4xl xl:text-5xl font-bold text-foreground mb-4 px-2",children:"ΣÏεÏικά με Ïη ÎάνÏια"})}),s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 sm:gap-8 lg:gap-12 items-center",children:[s.jsx("div",{className:"order-2 lg:order-1",children:s.jsx("div",{className:"relative max-w-md mx-auto lg:max-w-none",children:s.jsx("img",{src:"/lovable-uploads/9063ea14-8806-4bf2-b65f-fa9c9802fff9.png",alt:"ÎάνÏια ÎÏοÏλε - Well Be",className:"w-full h-auto rounded-lg shadow-lg"})})}
721),s.jsx("div",{className:"order-1 lg:order-2 space-y-4 sm:space-y-6",children:s.jsxs("div",{className:"prose prose-lg max-w-none",children:[s.jsx("p",{className:"text-sm xs:text-base sm:text-lg text-foreground leading-relaxed",children:"ΠαγάÏη μοÏ
για Ïην «καλή ζÏή» με οδήγηÏε ÏÏο να θÎÎ»Ï Î½Î± δημιοÏ
ÏγήÏÏ Îναν διαδικÏÏ
Î±ÎºÏ ÏÏÏο ÏοÏ
να ÏÏ
γκενÏÏÏνει Ïλα αÏ
Ïά ÏοÏ
κάνοÏ
ν ÏμοÏÏη και Ïη δική μοÏ
καθημεÏινÏÏηÏα."}),s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground mt-6 sm:mt-8 mb-3 sm:mb-4",children:"Τι Ïημαίνει ÏμÏÏ Â«ÎºÎ±Î»Î® ζÏή»;"}),s.jsx("p",{className:"text-sm xs:text-base sm:text-lg text-foreground leading-relaxed",children:"Îια εμÎνα είναι οι ÏÏ
νειδηÏÎÏ ÎµÏιλογÎÏ Ïε ÏλοÏ
Ï ÏοÏ
Ï ÏομείÏ: η διαÏÏοÏή ÏοÏ
ÏÏοÏÏÎÏει θÏÎÏη ÏÏο ÏÏμα, η ÏÏ
Ïνή και ήÏια κίνηÏη ÏοÏ
δÏ
ναμÏνει μÏ
Î±Î»Ï ÎºÎ±Î¹ ÏÏμα, η ÎνÏονη καθημεÏινÏÏηÏα ÏοÏ
ιÏοÏÏοÏεί με ÏÏιγμÎÏ ÏιÏÏÎ®Ï ÎºÎ±Î¹ διαλογιÏμοÏ, Ïα βιβλία ÏοÏ
ανοίγοÏ
ν Ïο μÏ
αλÏ, οι κοÏ
βÎνÏÎµÏ Î¼Îµ ανθÏÏÏοÏ
Ï ÏοÏ
Ïε ÏηγαίνοÏ
ν ÏαÏακάÏÏ ÎºÎ±Î¹ Ïα ÏÏοÏÏνÏα ÏοÏ
ÎÏοÏ
ν ÏÏο Ïο δÏ
ναÏÏν μικÏÏÏεÏο αÏοÏÏÏÏμα ÏÏο ÏεÏιβάλλον."}),s.jsx("div",{className:"mt-6 sm:mt-8 p-4 xs:p-6 bg-primary/10 rounded-lg border-l-4 border-primary",children:s.jsx("p",{className:"text-sm xs:text-base sm:text-lg font-medium text-foreground italic",children:"ÎÏ
ÏÏ ÎµÎ¯Î½Î±Î¹ Ïο Well Be. ΠκÏÏÎ¼Î¿Ï Î¼Î¿Ï
, μÎÏα ÏÏον οÏοίο ÏÎ±Ï ÎºÎ±Î»ÏÏοÏÎ¯Î¶Ï Î¼Îµ ÏαÏά!"})})]})})]}),s.jsxs("div",{className:"mt-12 sm:mt-16 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-6 sm:gap-8",children:[s.jsxs("div",{className:"text-center p-4 xs:p-6",children:[s.jsx("div",{className:"w-12 h-12 xs:w-16 xs:
721h-16 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3 xs:mb-4",children:s.jsx("span",{className:"text-xl xs:text-2xl",children:"ð±"})}),s.jsx("h3",{className:"text-base xs:text-lg font-semibold text-foreground mb-2",children:"ΣÏ
νειδηÏÎÏ ÎÏιλογÎÏ"}),s.jsx("p",{className:"text-muted-foreground text-xs xs:text-sm leading-relaxed",children:"ÎÏενδÏοÏ
με ÏÏη γνÏÏη και εÏιλÎγοÏ
με ÏÏ
Î½Î®Î¸ÎµÎ¹ÎµÏ ÏοÏ
βελÏιÏνοÏ
ν Ïην καθημεÏινÏÏηÏά μαÏ"})]}),s.jsxs("div",{className:"text-center p-4 xs:p-6",children:[s.jsx("div",{className:"w-12 h-12 xs:w-16 xs:h-16 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3 xs:mb-4",children:s.jsx("span",{className:"text-xl xs:text-2xl",children:"âï¸"})}),s.jsx("h3",{className:"text-base xs:text-lg font-semibold text-foreground mb-2",children:"ÎÏοÏÏοÏία"}),s.jsx("p",{className:"text-muted-foreground text-xs xs:text-sm leading-relaxed",children:"ΠιÏοÏÏοÏία μεÏÎ±Î¾Ï ÎνÏÎ¿Î½Î·Ï ÎºÎ±Î¸Î·Î¼ÎµÏινÏÏηÏÎ±Ï ÎºÎ±Î¹ ÏÏιγμÏν ηÏÎµÎ¼Î¯Î±Ï ÎºÎ±Î¹ διαλογιÏμοÏ"})]}),s.jsxs("div",{className:"text-center p-4 xs:p-6 sm:col-span-2 md:col-span-1",children:[s.jsx("div",{className:"w-12 h-12 xs:w-16 xs:
721h-16 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3 xs:mb-4",children:s.jsx("span",{className:"text-xl xs:text-2xl",children:"ðª"})}),s.jsx("h3",{className:"text-base xs:text-lg font-semibold text-foreground mb-2",children:"ÎÏια ÎίνηÏη"}),s.jsx("p",{className:"text-muted-foreground text-xs xs:text-sm leading-relaxed",children:"ΣÏ
Ïνή και ήÏια κίνηÏη ÏοÏ
δÏ
ναμÏνει μÏ
Î±Î»Ï ÎºÎ±Î¹ ÏÏμα"})]})]})]})]}),s.jsx(Be,{})]})},So=h.forwardRef(({className:e,...t},r)=>s.jsx("textarea",{className:me("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));So.displayName="Textarea";var Ct;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function r(a){throw new Error}e.assertNever=r,e.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(l=>typeof a[a[l]]!="number"),o={};for(const l of i)o[l]=a[l];return e.objectValues(o)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},e.find=(a,i)=>{for(const o of a)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Ct||(Ct={}));var W1;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(W1||(W1={}));const De=Ct.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ui=e=>{switch(typeof e){case"undefined":return De.undefined;case"string":return De.string;case"number":return Number.isNaN(e)?De.nan:De.number;case"boolean":return De.boolean;case"function":return De.function;case"bigint":return De.bigint;case"symbol":return De.symbol;case"object":return Array.isArray(e)?De.array:e===null?De.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?De.promise:typeof Map<"u"&&e instanceof Map?De.map:typeof Set<"u"&&e instanceof Set?De.set:typeof Date<"u"&&e instanceof Date?De.date:De.object;default:return De.unknown}}
vendor: 6,033 bytes, line 721
721,Ne=Ct.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class wi extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(i){return i.message},n={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let l=n,c=0;for(;c<o.path.length;){const d=o.path[c];c===o.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(r(o))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}};return a(this),n}static assert(t){if(!(t instanceof wi))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ct.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];r[i]=r[i]||[],r[i].push(t(a))}else n.push(t(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}wi.create=e=>new wi(e);const sb=(e,t)=>{let r;switch(e.code){case Ne.invalid_type:e.received===De.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ne.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ct.jsonStringifyReplacer)}`;break;case Ne.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ct.joinValues(e.keys,", ")}`;break;case Ne.invalid_union:r="Invalid input";break;case Ne.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ct.joinValues(e.options)}`;break;case Ne.invalid_enum_value:r=`Invalid enum value. Expected ${Ct.joinValues(e.options)}, received '${e.received}'`;break;case Ne.invalid_arguments:r="Invalid function arguments";break;case Ne.invalid_return_type:r="Invalid function return type";break;case Ne.invalid_date:r="Invalid date";break;case Ne.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Ct.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ne.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Ne.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Ne.custom:r="Invalid input";break;case Ne.invalid_intersection_types:r="Intersection results could not be merged";break;case Ne.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ne.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ct.assertNever(e)}return{message:r}};let dV=sb;function uV(){return dV}const mV=e=>{const{data:t,path:r,errorMaps:n,issueData:a}=e,i=[...r,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let l="";const c=n.filter(d=>!!d).slice().reverse();for(const d of c)l=d(o,{data:t,defaultError:l}).message;return{...a,path:i,message:l}};function Te(e,t){const r=uV(),n=mV({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===sb?void 0:sb].filter(a=>!!a)});e.common.issues.push(n)}class cn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const a of r){if(a.status==="aborted")return rt;a.status==="dirty"&&t.dirty(),n.push(a.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const a of r){const i=await a.key,o=await a.value;n.push({key:i,value:o})}return cn.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const a of r){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return rt;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}}const rt=Object.freeze({status:"aborted"}),vu=e=>({status:"dirty",value:e}),Tn=e=>
vendor: 16,526 bytes, line 721
721({status:"valid",value:e}),V1=e=>e.status==="aborted",H1=e=>e.status==="dirty",hd=e=>e.status==="valid",lp=e=>typeof Promise<"u"&&e instanceof Promise;var $e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})($e||($e={}));class Co{constructor(t,r,n,a){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const q1=(e,t)=>{if(hd(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new wi(e.common.issues);return this._error=r,this._error}}};function ht(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:a}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(o,l)=>{const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??n??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:c??r??l.defaultError}},description:a}}class St{get description(){return this._def.description}_getType(t){return Ui(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ui(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new cn,ctx:{common:t.parent.common,data:t.data,parsedType:Ui(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(lp(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ui(t)},a=this._parseSync({data:t,path:n.path,parent:n});return q1(n,a)}"~validate"(t){var n,a;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ui(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:r});return hd(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(a=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(i=>hd(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ui(t)},a=this._parse({data:t,path:n.path,parent:n}),i=await(lp(a)?a:Promise.resolve(a));return q1(n,i)}refine(t,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,i)=>{const o=t(a),l=()=>i.addIssue({code:Ne.custom,...n(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,r){return this._refinement((n,a)=>t(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(t){return new pd({schema:this,typeName:nt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return xo.create(this,this._def)}nullable(){return gd.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Oa.create(this)}promise(){return up.create(this,this._def)}or(t){return cp.create([this,t],this._def)}and(t){return dp.create(this,t,this._def)}transform(t){return new pd({...ht(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new ib({...ht(this._def),innerType:this,defaultValue:r,typeName:nt.ZodDefault})}brand(){return new OV({typeName:nt.ZodBranded,type:this,...ht(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new ob({...ht(this._def),innerType:this,catchValue:r,typeName:nt.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return $w.create(this,t)}readonly(){return lb.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const hV=/^c[^\s-]{8,}$/i,fV=/^[0-9a-z]+$/,pV=/^[0-9A-HJKMNP-TV-Z]{26}$/i,gV=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,xV=/^[a-z0-9_-]{21}$/i,vV=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,yV=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,bV=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,wV="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Kx;const jV=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,NV=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_V=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,kV=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,SV=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,CV=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,eT="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",EV=new RegExp(`^${eT}$`);function tT(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function PV(e){return new RegExp(`^${tT(e)}$`)}function TV(e){let t=`${eT}T${tT(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function AV(e,t){return!!((t==="v4"||!t)&&jV.test(e)||(t==="v6"||!t)&&_V.test(e))}function IV(e,t){if(!vV.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function RV(e,t){return!!((t==="v4"||!t)&&NV.test(e)||(t==="v6"||!t)&&kV.test(e))}class no extends St{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==De.string){const i=this._getOrReturnCtx(t);return Te(i,{code:Ne.invalid_type,expected:De.string,received:i.parsedType}),rt}const n=new cn;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),Te(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),Te(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,l=t.data.length<i.value;(o||l)&&(a=this._getOrReturnCtx(t,a),o?Te(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&Te(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")bV.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"email",code:Ne.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Kx||(Kx=new RegExp(wV,"u")),Kx.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"emoji",code:Ne.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")gV.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"uuid",code:Ne.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")xV.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"nanoid",code:Ne.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")hV.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"cuid",code:Ne.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")fV.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"cuid2",code:Ne.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")pV.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"ulid",code:Ne.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),Te(a,{validation:"url",code:Ne.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"regex",code:Ne.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),Te(a,{code:Ne.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),Te(a,{code:Ne.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),Te(a,{code:Ne.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?TV(i).test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{code:Ne.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?EV.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{code:Ne.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?PV(i).test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{code:Ne.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?yV.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"duration",code:Ne.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?AV(t.data,i.version)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"ip",code:Ne.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?IV(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"jwt",code:Ne.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?RV(t.data,i.version)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"cidr",code:Ne.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?SV.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"base64",code:Ne.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?CV.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"base64url",code:Ne.invalid_string,message:i.message}),n.dirty()):Ct.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(a=>t.test(a),{validation:r,code:Ne.invalid_string,...$e.errToObj(n)})}_addCheck(t){return new no({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...$e.errToObj(t)})}url(t){return this._addCheck({kind:"url",...$e.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...$e.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...$e.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...$e.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...$e.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...$e.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...$e.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...$e.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...$e.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...$e.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...$e.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...$e.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...$e.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...$e.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...$e.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...$e.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...$e.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...$e.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...$e.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...$e.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...$e.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...$e.errToObj(r)})}nonempty(t){return this.min(1,$e.errToObj(t))}trim(){return new no({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new no({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new no({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 4,670 bytes, line 721
721get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}no.create=e=>new no({checks:[],typeName:nt.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...ht(e)});function MV(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,a=r>n?r:n,i=Number.parseInt(e.toFixed(a).replace(".","")),o=Number.parseInt(t.toFixed(a).replace(".",""));return i%o/10**a}class bm extends St{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==De.number){const i=this._getOrReturnCtx(t);return Te(i,{code:Ne.invalid_type,expected:De.number,received:i.parsedType}),rt}let n;const a=new cn;for(const i of this._def.checks)i.kind==="int"?Ct.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Te(n,{code:Ne.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Te(n,{code:Ne.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Te(n,{code:Ne.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?MV(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),Te(n,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Te(n,{code:Ne.not_finite,message:i.message}),a.dirty()):Ct.assertNever(i);return{status:a.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,$e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,$e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,$e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,$e.toString(r))}setLimit(t,r,n,a){return new bm({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:$e.toString(a)}]})}_addCheck(t){return new bm({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:$e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:$e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$e.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ct.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}
vendor: 7,695 bytes, line 721
721}bm.create=e=>new bm({checks:[],typeName:nt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ht(e)});class wm extends St{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==De.bigint)return this._getInvalidInput(t);let n;const a=new cn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Te(n,{code:Ne.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Te(n,{code:Ne.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Te(n,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):Ct.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return Te(r,{code:Ne.invalid_type,expected:De.bigint,received:r.parsedType}),rt}gte(t,r){return this.setLimit("min",t,!0,$e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,$e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,$e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,$e.toString(r))}setLimit(t,r,n,a){return new wm({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:$e.toString(a)}]})}_addCheck(t){return new wm({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}wm.create=e=>new wm({checks:[],typeName:nt.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...ht(e)});class rb extends St{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==De.boolean){const n=this._getOrReturnCtx(t);return Te(n,{code:Ne.invalid_type,expected:De.boolean,received:n.parsedType}),rt}return Tn(t.data)}}rb.create=e=>new rb({typeName:nt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ht(e)});class jm extends St{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==De.date){const i=this._getOrReturnCtx(t);return Te(i,{code:Ne.invalid_type,expected:De.date,received:i.parsedType}),rt}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Te(i,{code:Ne.invalid_date}),rt}const n=new cn;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),Te(a,{code:Ne.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),Te(a,{code:Ne.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Ct.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new jm({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:$e.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:$e.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}jm.create=e=>new jm({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:nt.ZodDate,...ht(e)});class G1 extends St{_parse(t){if(this._getType(t)!==De.symbol){const n=this._getOrReturnCtx(t);return Te(n,{code:Ne.invalid_type,expected:De.symbol,received:n.parsedType}),rt}return Tn(t.data)}}G1.create=e=>new G1({typeName:nt.ZodSymbol,...ht(e)});class Y1 extends St{_parse(t){if(this._getType(t)!==De.undefined){const n=this._getOrReturnCtx(t);return Te(n,{code:Ne.invalid_type,expected:De.undefined,received:n.parsedType}),rt}return Tn(t.data)}}Y1.create=e=>new Y1({typeName:nt.ZodUndefined,...ht(e)});class K1 extends St{_parse(t){if(this._getType(t)!==De.null){const n=this._getOrReturnCtx(t);return Te(n,{code:Ne.invalid_type,expected:De.null,received:n.parsedType}),rt}return Tn(t.data)}}K1.create=e=>new K1({typeName:nt.ZodNull,...ht(e)});class Q1 extends St{constructor(){super(...arguments),this._any=!0}_parse(t){return Tn(t.data)}}Q1.create=e=>new Q1({typeName:nt.ZodAny,...ht(e)});class X1 extends St{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Tn(t.data)}}X1.create=e=>new X1({typeName:nt.ZodUnknown,...ht(e)});class Eo extends St{_parse(t){const r=this._getOrReturnCtx(t);return Te(r,{code:Ne.invalid_type,expected:De.never,received:r.parsedType}),rt}}Eo.create=e=>new Eo({typeName:nt.ZodNever,...ht(e)});class J1 extends St{_parse(t){if(this._getType(t)!==De.undefined){const n=this._getOrReturnCtx(t);return Te(n,{code:Ne.invalid_type,expected:De.void,received:n.parsedType}),rt}return Tn(t.data)}}J1.create=e=>new J1({typeName:nt.ZodVoid,...ht(e)});class Oa extends St{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),a=this._def;if(r.parsedType!==De.array)return Te(r,{code:Ne.invalid_type,expected:De.array,received:r.parsedType}),rt;if(a.exactLength!==null){const o=r.data.length>a.exactLength.value,l=r.data.length<a.exactLength.value;(o||l)&&(Te(r,{code:o?Ne.too_big:Ne.too_small,minimum:l?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(Te(r,{code:Ne.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(Te(r,{code:Ne.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,l)=>a.type._parseAsync(new Co(r,o,r.path,l)))).then(o=>cn.mergeArray(n,o));const i=[...r.data].map((o,l)=>a.type._parseSync(new Co(r,o,r.path,l)));return cn.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new Oa({...this._def,minLength:{value:t,message:$e.toString(r)}})}max(t,r){return new Oa({...this._def,maxLength:{value:t,message:$e.toString(r)}})}length(t,r){return new Oa({...this._def,exactLength:{value:t,message:$e.toString(r)}})}nonempty(t){return this.min(1,t)}}Oa.create=(e,t)=>new Oa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...ht(t)});function mc(e){if(e instanceof es){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=xo.create(mc(n))}return new es({...e._def,shape:()=>t})}else return e instanceof Oa?new Oa({...e._def,type:mc(e.element)}):e instanceof xo?xo.create(mc(e.unwrap())):e instanceof gd?gd.create(mc(e.unwrap())):e instanceof Al?Al.create(e.items.map(t=>mc(t))):e}class es extends St{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;
vendor: 4,259 bytes, line 721
721const t=this._def.shape(),r=Ct.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==De.object){const d=this._getOrReturnCtx(t);return Te(d,{code:Ne.invalid_type,expected:De.object,received:d.parsedType}),rt}const{status:n,ctx:a}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof Eo&&this._def.unknownKeys==="strip"))for(const d in a.data)o.includes(d)||l.push(d);const c=[];for(const d of o){const u=i[d],m=a.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Co(a,m,a.path,d)),alwaysSet:d in a.data})}if(this._def.catchall instanceof Eo){const d=this._def.unknownKeys;if(d==="passthrough")for(const u of l)c.push({key:{status:"valid",value:u},value:{status:"valid",value:a.data[u]}});else if(d==="strict")l.length>0&&(Te(a,{code:Ne.unrecognized_keys,keys:l}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const u of l){const m=a.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Co(a,m,a.path,u)),alwaysSet:u in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const d=[];for(const u of c){const m=await u.key,f=await u.value;d.push({key:m,value:f,alwaysSet:u.alwaysSet})}return d}).then(d=>cn.mergeObjectSync(n,d)):cn.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return $e.errToObj,new es({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,o;const a=((o=(i=this._def).errorMap)==null?void 0:o.call(i,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:$e.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new es({...this._def,unknownKeys:"strip"})}passthrough(){return new es({...this._def,unknownKeys:"passthrough"})}extend(t){return new es({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new es({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:nt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new es({...this._def,catchall:t})}pick(t){const r={};for(const n of Ct.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new es({...this._def,shape:()=>r})}omit(t){const r={};for(const n of Ct.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new es({...this._def,shape:()=>r})}deepPartial(){return mc(this)}partial(t){const r={};for(const n of Ct.objectKeys(this.shape)){const a=this.shape[n];t&&!t[n]?r[n]=a:r[n]=a.optional()}return new es({...this._def,shape:()=>r})}required(t){const r={};for(const n of Ct.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof xo;)i=i._def.innerType;r[n]=i}return new es({...this._def,shape:()=>r})}keyof(){return sT(Ct.objectKeys(this.shape))}}es.create=(e,t)=>new es({shape:()=>e,unknownKeys:"strip",catchall:Eo.create(),typeName:nt.ZodObject,...ht(t)});es.strictCreate=(e,t)=>new es({shape:()=>e,unknownKeys:"strict",catchall:Eo.create(),typeName:nt.ZodObject,...ht(t)});es.lazycreate=(e,t)=>new es({shape:e,unknownKeys:"strip",catchall:Eo.create(),typeName:nt.ZodObject,...ht(t)});class cp extends St{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function a(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;const o=i.map(l=>new wi(l.ctx.common.issues));return Te(r,{code:Ne.invalid_union,unionErrors:o}),rt}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const c of n){const d={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:d});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:d}),d.common.issues.length&&o.push(d.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const l=o.map(c=>new wi(c));return Te(r,{code:Ne.invalid_union,unionErrors:l}),rt}}get options(){return this._def.options}}cp.create=(e,t)=>
vendor: 4,409 bytes, line 721
721new cp({options:e,typeName:nt.ZodUnion,...ht(t)});function nb(e,t){const r=Ui(e),n=Ui(t);if(e===t)return{valid:!0,data:e};if(r===De.object&&n===De.object){const a=Ct.objectKeys(t),i=Ct.objectKeys(e).filter(l=>a.indexOf(l)!==-1),o={...e,...t};for(const l of i){const c=nb(e[l],t[l]);if(!c.valid)return{valid:!1};o[l]=c.data}return{valid:!0,data:o}}else if(r===De.array&&n===De.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const o=e[i],l=t[i],c=nb(o,l);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else return r===De.date&&n===De.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class dp extends St{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=(i,o)=>{if(V1(i)||V1(o))return rt;const l=nb(i.value,o.value);return l.valid?((H1(i)||H1(o))&&r.dirty(),{status:r.value,value:l.data}):(Te(n,{code:Ne.invalid_intersection_types}),rt)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}dp.create=(e,t,r)=>new dp({left:e,right:t,typeName:nt.ZodIntersection,...ht(r)});class Al extends St{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==De.array)return Te(n,{code:Ne.invalid_type,expected:De.array,received:n.parsedType}),rt;if(n.data.length<this._def.items.length)return Te(n,{code:Ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),rt;!this._def.rest&&n.data.length>this._def.items.length&&(Te(n,{code:Ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new Co(n,o,n.path,l)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>cn.mergeArray(r,o)):cn.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new Al({...this._def,rest:t})}}Al.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Al({items:e,typeName:nt.ZodTuple,rest:null,...ht(t)})};class Z1 extends St{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==De.map)return Te(n,{code:Ne.invalid_type,expected:De.map,received:n.parsedType}),rt;const a=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([l,c],d)=>({key:a._parse(new Co(n,l,n.path,[d,"key"])),value:i._parse(new Co(n,c,n.path,[d,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of o){const d=await c.key,u=await c.value;if(d.status==="aborted"||u.status==="aborted")return rt;(d.status==="dirty"||u.status==="dirty")&&r.dirty(),l.set(d.value,u.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const c of o){const d=c.key,u=c.value;if(d.status==="aborted"||u.status==="aborted")return rt;(d.status==="dirty"||u.status==="dirty")&&r.dirty(),l.set(d.value,u.value)}return{status:r.value,value:l}}}}Z1.create=(e,t,r)=>new Z1({valueType:t,keyType:e,typeName:nt.ZodMap,...ht(r)});class Nm extends St{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==De.set)return Te(n,{code:Ne.invalid_type,expected:De.set,received:n.parsedType}),rt;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(Te(n,{code:Ne.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(Te(n,{code:Ne.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const i=this._def.valueType;function o(c){const d=new Set;for(const u of c){if(u.status==="aborted")return rt;u.status==="dirty"&&r.dirty(),d.add(u.value)}return{status:r.value,value:d}}const l=[...n.data.values()].map((c,d)=>i._parse(new Co(n,c,n.path,d)));return n.common.async?Promise.all(l).then(c=>o(c)):o(l)}min(t,r){return new Nm({...this._def,minSize:{value:t,message:$e.toString(r)}})}max(t,r){return new Nm({...this._def,maxSize:{value:t,message:$e.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Nm.create=(e,t)=>
vendor: 9,874 bytes, line 721
721new Nm({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...ht(t)});class ek extends St{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ek.create=(e,t)=>new ek({getter:e,typeName:nt.ZodLazy,...ht(t)});class ab extends St{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Te(r,{received:r.data,code:Ne.invalid_literal,expected:this._def.value}),rt}return{status:"valid",value:t.data}}get value(){return this._def.value}}ab.create=(e,t)=>new ab({value:e,typeName:nt.ZodLiteral,...ht(t)});function sT(e,t){return new fd({values:e,typeName:nt.ZodEnum,...ht(t)})}class fd extends St{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return Te(r,{expected:Ct.joinValues(n),received:r.parsedType,code:Ne.invalid_type}),rt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return Te(r,{received:r.data,code:Ne.invalid_enum_value,options:n}),rt}return Tn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return fd.create(t,{...this._def,...r})}exclude(t,r=this._def){return fd.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}fd.create=sT;class tk extends St{_parse(t){const r=Ct.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==De.string&&n.parsedType!==De.number){const a=Ct.objectValues(r);return Te(n,{expected:Ct.joinValues(a),received:n.parsedType,code:Ne.invalid_type}),rt}if(this._cache||(this._cache=new Set(Ct.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=Ct.objectValues(r);return Te(n,{received:n.data,code:Ne.invalid_enum_value,options:a}),rt}return Tn(t.data)}get enum(){return this._def.values}}tk.create=(e,t)=>new tk({values:e,typeName:nt.ZodNativeEnum,...ht(t)});class up extends St{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==De.promise&&r.common.async===!1)return Te(r,{code:Ne.invalid_type,expected:De.promise,received:r.parsedType}),rt;const n=r.parsedType===De.promise?r.data:Promise.resolve(r.data);return Tn(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}up.create=(e,t)=>new up({type:e,typeName:nt.ZodPromise,...ht(t)});class pd extends St{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:o=>{Te(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async l=>{if(r.value==="aborted")return rt;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?rt:c.status==="dirty"||r.value==="dirty"?vu(c.value):c});{if(r.value==="aborted")return rt;const l=this._def.schema._parseSync({data:o,path:n.path,parent:n});return l.status==="aborted"?rt:l.status==="dirty"||r.value==="dirty"?vu(l.value):l}}if(a.type==="refinement"){const o=l=>{const c=a.refinement(l,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?rt:(l.status==="dirty"&&r.dirty(),o(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?rt:(l.status==="dirty"&&r.dirty(),o(l.value).then(()=>({status:r.value,value:l.value}))))}if(a.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!hd(o))return rt;const l=a.transform(o.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>hd(o)?Promise.resolve(a.transform(o.value,i)).then(l=>({status:r.value,value:l})):rt);Ct.assertNever(a)}}pd.create=(e,t,r)=>new pd({schema:e,typeName:nt.ZodEffects,effect:t,...ht(r)});pd.createWithPreprocess=(e,t,r)=>new pd({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...ht(r)});class xo extends St{_parse(t){return this._getType(t)===De.undefined?Tn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}xo.create=(e,t)=>new xo({innerType:e,typeName:nt.ZodOptional,...ht(t)});class gd extends St{_parse(t){return this._getType(t)===De.null?Tn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gd.create=(e,t)=>new gd({innerType:e,typeName:nt.ZodNullable,...ht(t)});class ib extends St{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===De.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}ib.create=(e,t)=>new ib({innerType:e,typeName:nt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ht(t)});class ob extends St{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return lp(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new wi(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new wi(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ob.create=(e,t)=>new ob({innerType:e,typeName:nt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ht(t)});class sk extends St{_parse(t){if(this._getType(t)!==De.nan){const n=this._getOrReturnCtx(t);return Te(n,{code:Ne.invalid_type,expected:De.nan,received:n.parsedType}),rt}return{status:"valid",value:t.data}}}sk.create=e=>new sk({typeName:nt.ZodNaN,...ht(e)});class OV extends St{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class $w extends St{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?rt:i.status==="dirty"?(r.dirty(),vu(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?rt:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(t,r){return new $w({in:t,out:r,typeName:nt.ZodPipeline})}}class lb extends St{_parse(t){const r=this._def.innerType._parse(t),n=a=>(hd(a)&&(a.value=Object.freeze(a.value)),a);return lp(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}lb.create=(e,t)=>new lb({innerType:e,typeName:nt.ZodReadonly,...ht(t)});es.lazycreate;var nt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(nt||(nt={}));const bn=no.create,cb=rb.create,rk=jm.create;Eo.create;Oa.create;const Uw=es.create;es.strictCreate;cp.create;dp.create;Al.create;const rT=ab.create;fd.create;up.create;xo.create;gd.create;const DV=Uw({name:bn().trim().min(1,"Το Ïνομα είναι Ï
ÏοÏÏεÏÏικÏ").max(100,"Το Ïνομα δεν μÏοÏεί να Ï
ÏεÏβαίνει ÏοÏ
Ï 100 ÏαÏακÏήÏεÏ"),email:bn().email("Îη ÎγκÏ
Ïη διεÏθÏ
νÏη email").max(255,"Το email δεν μÏοÏεί να Ï
ÏεÏβαίνει ÏοÏ
Ï 255 ÏαÏακÏήÏεÏ"),phone:bn().max(20,"Το ÏηλÎÏÏνο δεν μÏοÏεί να Ï
ÏεÏβαίνει ÏοÏ
Ï 20 ÏαÏακÏήÏεÏ").optional().or(rT("")),subject:bn().trim().min(1,"Το θÎμα είναι Ï
ÏοÏÏεÏÏικÏ").max(200,"Το θÎμα δεν μÏοÏεί να Ï
ÏεÏβαίνει ÏοÏ
Ï 200 ÏαÏακÏήÏεÏ"),message:bn().trim().min(10,"Το μήνÏ
μα ÏÏÎÏει να ÎÏει ÏοÏ
λάÏιÏÏον 10 ÏαÏακÏήÏεÏ").max(5e3,"Το μήνÏ
μα δεν μÏοÏεί να Ï
ÏεÏβαίνει ÏοÏ
Ï 5000 ÏαÏακÏήÏεÏ")}),LV=5*1024*1024,FV=["image/png","image/jpeg","image/jpg","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/plain"],$V=()=>
721{const[e,t]=h.useState({name:"",email:"",phone:"",subject:"",message:"",attachment:null}),[r,n]=h.useState(!1),[a,i]=h.useState(!1),[o,l]=h.useState({}),{toast:c}=at(),d=f=>{const{name:p,value:v}=f.target;t(g=>({...g,[p]:v}))},u=f=>{var v;const p=((v=f.target.files)==null?void 0:v[0])||null;if(p){if(p.size>LV){c({title:"ΣÏάλμα",description:"Το αÏÏείο δεν μÏοÏεί να Ï
ÏεÏβαίνει Ïα 5MB.",variant:"destructive"}),f.target.value="";return}if(!FV.includes(p.type)){c({title:"ΣÏάλμα",description:"Îη εÏιÏÏεÏÏÏÏ ÏÏÏÎ¿Ï Î±ÏÏείοÏ
. ÎÏιÏÏÎÏονÏαι μÏνο: PDF, DOC, DOCX, TXT, PNG, JPG, JPEG.",variant:"destructive"}),f.target.value="";return}}t(g=>({...g,attachment:p}))},m=async f=>{f.preventDefault(),n(!0),l({});try{const p=DV.safeParse({name:e.name,email:e.email,phone:e.phone,subject:e.subject,message:e.message});if(!p.success){const x={};p.error.errors.forEach(w=>{w.path[0]&&(x[w.path[0]]=w.message)}),l(x),c({title:"ΣÏάλμα εÏικÏÏÏÏηÏ",description:"ΠαÏÎ±ÎºÎ±Î»Ï ÎµÎ»ÎγξÏε Ïα Ïεδία ÏÎ·Ï ÏÏÏμαÏ.",variant:"destructive"}),n(!1);return}let v=null;if(e.attachment){const x=new FileReader;v=await new Promise(w=>{x.onload=()=>{var j,N;w({filename:(j=e.attachment)==null?void 0:j.name,content:x.result,contentType:(N=e.attachment)==null?void 0:N.type})},x.readAsDataURL(e.attachment)})}const{data:g,error:b}=await U.functions.invoke("send-support-email",{body:{name:p.data.name,email:p.data.email,phone:p.data.phone||"",subject:p.data.subject,message:p.data.message,attachment:v}});if(b)throw b;c({title:"Το μήνÏ
μά ÏÎ±Ï ÏÏάλθηκε!",description:"Îα εÏικοινÏνήÏοÏ
με μαζί ÏÎ±Ï Ïο ÏÏ
νÏομÏÏεÏο δÏ
ναÏÏ."}),t({name:"",email:"",phone:"",subject:"",message:"",attachment:null}),l({});const y=document.getElementById("contact-attachment");y&&(y.value="")}catch(p){console.error("Error sending contact form:",p),c({title:"ΣÏάλμα",description:"ÎάÏι Ïήγε ÏÏÏαβά. ΠαÏÎ±ÎºÎ±Î»Ï ÏÏοÏÏαθήÏÏε ξανά.",variant:"destructive"})}finally{n(!1)}};return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"ÎÏικοινÏνία - Well Be by Nadia Boule",description:"ÎÏικοινÏνήÏÏε με Ïο Well Be. ÎιεÏθÏ
νÏη: ΧÏÏ
ÏοÏÏÏμοÏ
ΣμÏÏÎ½Î·Ï 6, ΧολαÏγÏÏ. ΤηλÎÏÏνο: 210 654 88 86. Email: [email protected]",keywords:"εÏικοινÏνία well be, well be contact, ÏηλÎÏÏνο, email, διεÏθÏ
νÏη",canonical:"https://wellbe.gr/contact"}),s.jsx(oV,{}),s.jsx(Fe,{isMenuOpen:a,onMenuToggle:()=>i(!a)}),s.jsx("main",{className:"container mx-auto px-3 xs:px-4 sm:px-6 lg:px-8 py-8 xs:py-12 pt-8 sm:pt-12",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-6 xs:mb-8",children:[s.jsx("h1",{className:"text-2xl xs:text-3xl sm:text-4xl lg:text-5xl font-bold text-foreground mb-3 xs:mb-4",children:"ÎÏικοινÏνία"}),s.jsx("p",{className:"text-base xs:text-lg sm:text-xl text-muted-foreground max-w-2xl mx-auto leading-relaxed",children:"ÎÏεÏε εÏÏÏήÏειÏ; ÎÎλεÏε να μάθεÏε ÏεÏιÏÏÏÏεÏα για ÏÎ¹Ï Ï
ÏηÏεÏÎ¯ÎµÏ Î¼Î±Ï; ΣÏείλÏε Î¼Î±Ï Îνα μήνÏ
μα και θα εÏικοινÏνήÏοÏ
με μαζί ÏαÏ!"})]}),s.jsxs("div",{className:"grid lg:grid-cols-3 gap-6 xs:gap-8 lg:gap-12",children:[s.jsx("div",{className:"lg:col-span-1",children:s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(be,{className:"text-lg xs:text-xl sm:text-2xl text-foreground",children:"ΣÏοιÏεία ÎÏικοινÏνίαÏ"}),s.jsx(gt,{className:"text-sm xs:text-base",children:"ÎÏοÏείÏε να εÏικοινÏνήÏεÏε μαζί Î¼Î±Ï ÎºÎ±Î¹ με ÏοÏ
Ï ÏαÏακάÏÏ ÏÏÏÏοÏ
Ï."})]}),s.jsxs(ce,{className:"space-y-4 xs:space-y-6",children:[s.jsxs("div",{className:"flex items-start space-x-3 xs:space-x-4",children:[s.jsx(mE,{className:"h-5 w-5 xs:h-6 xs:w-6 text-primary mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground text-sm xs:text-base",children:"ÎιεÏθÏ
νÏη ÎλληλογÏαÏίαÏ"}),s.jsxs("p",{className:"text-muted-foreground text-sm xs:text-base",children:["ΧÏÏ
ÏοÏÏÏμοÏ
ΣμÏÏÎ½Î·Ï 6",s.jsx("br",{}),"ΧολαÏγÏÏ 15562, Îλλάδα"]})]})]}),s.jsxs("div",{className:"flex items-start space-x-4",children:[s.jsx(Fa,{className:"h-6 w-6 text-primary mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground",children:"Email"}),s.jsx("p",{className:"text-muted-foreground",children:"[email protected]"})]})]}),s.jsxs("div",{className:"flex items-start space-x-4",children:[s.jsx(gE,{className:"h-6 w-6 text-primary mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground",children:"ΤηλÎÏÏνο"}),s.jsx("p",{className:"text-muted-foreground",children:"210 654 88 86"})]})]}),s.jsxs("div",{className:"flex items-start space-x-4",children:[s.jsx(Ms,{className:"h-6 w-6 text-primary mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground",children:"ÎÏÎµÏ ÎειÏοÏ
ÏγίαÏ"}),s.jsx("p",{className:"text-muted-foreground",children:"ÎεÏ
ÏÎÏα - ΠαÏαÏκεÏ
ή: 11:00 - 17:00"})]})]})]})]})}),s.jsx("div",{className:"lg:col-span-2",children:s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(be,{className:"text-lg xs:text-xl sm:text-2xl text-foreground",children:"ΣÏείλÏε Î¼Î±Ï Î¼Î®Î½Ï
μα"}),s.jsx(gt,{className:"text-sm xs:text-base",children:"ΣÏ
μÏληÏÏÏÏε Ïη ÏÏÏμα και θα ÏÎ±Ï Î±ÏανÏήÏοÏ
με Ïο ÏÏ
νÏομÏÏεÏο δÏ
ναÏÏ."})]}),s.jsx(ce,{children:s.jsxs("form",{onSubmit:m,className:"space-y-4 xs:space-y-6",children:[s.jsxs("div",{className:"grid sm:grid-cols-2 gap-3 xs:gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"name",children:"ÎνομαÏεÏÏνÏ
μο *"}),s.jsx(ke,{id:"name",name:"name",value:e.name,onChange:d,required:!0,placeholder:"Το Ïνομά ÏαÏ",className:o.name?"border-destructive":""}),o.name&&s.jsx("p",{className:"text-sm text-destructive",children:o.name})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"email",children:"Email *"}),s.jsx(ke,{id:"email",name:"email",type:"email",value:e.email,onChange:d,required:!0,placeholder:"Ïο-email@ÏαÏ.com",className:o.email?"border-destructive":""}),o.email&&s.jsx("p",{className:"text-sm text-destructive",children:o.email})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"phone",children:"ΤηλÎÏÏνο"}),s.jsx(ke,{id:"phone",name:"phone",value:e.phone,onChange:d,placeholder:"Το ÏηλÎÏÏÎ½Ï ÏαÏ"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"contact-attachment",children:"ΣÏ
νημμÎνο"}),s.jsxs("div",{className:"relative",children:[s.jsx(ke,{id:"contact-attachment",type:"file",onChange:u,accept:"image/*,application/pdf,.doc,.docx,.txt",className:"file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-primary file:text-primary-foreground hover:file:bg-primary/90"}),s.jsx(W5,{className:"absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"})]}),e.attachment&&s.jsxs("p",{className:"text-sm text-muted-foreground",children:["ÎÏιλÎÏθηκε: ",e.attachment.name]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"subject",children:"ÎÎμα *"}),s.jsx(ke,{id:"subject",name:"subject",value:e.subject,onChange:d,required:!0,placeholder:"ÎÎμα ÏοÏ
μηνÏμαÏοÏ",className:o.subject?"border-destructive":""}),o.subject&&s.jsx("p",{className:"text-sm text-destructive",children:o.subject})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"message",children:"ÎήνÏ
μα *"}),s.jsx(So,{id:"message",name:"message",value:e.message,onChange:d,required:!0,placeholder:"ÎÏάÏÏε Ïο μήνÏ
μά ÏÎ±Ï ÎµÎ´Ï...",rows:6,className:o.message?"border-destructive":""}),o.message&&s.jsx("p",{className:"text-sm text-destructive",children:o.message})]}),s.jsx(F,{type:"submit",className:"w-full",disabled:r,children:r?"ÎÏοÏÏολή...":"ÎÏοÏÏολή ÎηνÏμαÏοÏ"})]})})]})})]})]})}),s.jsx(Be,{})]})};var wg="Collapsible",[UV,nT]=gs(wg),[BV,Bw]=UV(wg),aT=h.forwardRef((e,t)=>
vendor: 4,261 bytes, line 721
721{const{__scopeCollapsible:r,open:n,defaultOpen:a,disabled:i,onOpenChange:o,...l}=e,[c,d]=xr({prop:n,defaultProp:a??!1,onChange:o,caller:wg});return s.jsx(BV,{scope:r,disabled:i,contentId:Fr(),open:c,onOpenToggle:h.useCallback(()=>d(u=>!u),[d]),children:s.jsx(Ce.div,{"data-state":Hw(c),"data-disabled":i?"":void 0,...l,ref:t})})});aT.displayName=wg;var iT="CollapsibleTrigger",zw=h.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,a=Bw(iT,r);return s.jsx(Ce.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":Hw(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...n,ref:t,onClick:pe(e.onClick,a.onOpenToggle)})});zw.displayName=iT;var Ww="CollapsibleContent",Vw=h.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Bw(Ww,e.__scopeCollapsible);return s.jsx(Ns,{present:r||a.open,children:({present:i})=>s.jsx(zV,{...n,ref:t,present:i})})});Vw.displayName=Ww;var zV=h.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:a,...i}=e,o=Bw(Ww,r),[l,c]=h.useState(n),d=h.useRef(null),u=Ye(t,d),m=h.useRef(0),f=m.current,p=h.useRef(0),v=p.current,g=o.open||l,b=h.useRef(g),y=h.useRef(void 0);return h.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),is(()=>{const x=d.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();m.current=w.height,p.current=w.width,b.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),c(n)}},[o.open,n]),s.jsx(Ce.div,{"data-state":Hw(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!g,...i,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:g&&a})});function Hw(e){return e?"open":"closed"}var oT=aT,WV=zw,VV=Vw,HV=h.createContext(void 0);function Vl(e){const t=h.useContext(HV);return e||t||"ltr"}var da="Accordion",qV=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[qw,GV,YV]=$m(da),[jg,hte]=gs(da,[YV,nT]),Gw=nT(),lT=ie.forwardRef((e,t)=>{const{type:r,...n}=e,a=n,i=n;return s.jsx(qw.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(JV,{...i,ref:t}):s.jsx(XV,{...a,ref:t})})});lT.displayName=da;var[cT,KV]=jg(da),[dT,QV]=jg(da,{collapsible:!1}),XV=ie.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},collapsible:i=!1,...o}=e,[l,c]=xr({prop:r,defaultProp:n??"",onChange:a,caller:da});return s.jsx(cT,{scope:e.__scopeAccordion,value:ie.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:ie.useCallback(()=>i&&c(""),[i,c]),children:s.jsx(dT,{scope:e.__scopeAccordion,collapsible:i,children:s.jsx(uT,{...o,ref:t})})})}),JV=ie.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...i}=e,[o,l]=xr({prop:r,defaultProp:n??[],onChange:a,caller:da}),c=ie.useCallback(u=>l((m=[])=>[...m,u]),[l]),d=ie.useCallback(u=>l((m=[])=>m.filter(f=>f!==u)),[l]);return s.jsx(cT,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:d,children:s.jsx(dT,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(uT,{...i,ref:t})})})}),[ZV,Ng]=jg(da),uT=ie.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:a,orientation:i="vertical",...o}=e,l=ie.useRef(null),c=Ye(l,t),d=GV(r),m=Vl(a)==="ltr",f=pe(e.onKeyDown,p=>{var _;if(!qV.includes(p.key))return;const v=p.target,g=d().filter(I=>{var R;return!((R=I.ref.current)!=null&&R.disabled)}),b=g.findIndex(I=>I.ref.current===v),y=g.length;if(b===-1)return;p.preventDefault();let x=b;const w=0,j=y-1,N=()=>{x=b+1,x>j&&(x=w)},S=()=>{x=b-1,x<w&&(x=j)};switch(p.key){case"Home":x=w;break;case"End":x=j;break;case"ArrowRight":i==="horizontal"&&(m?N():S());break;case"ArrowDown":i==="vertical"&&N();break;case"ArrowLeft":i==="horizontal"&&(m?S():N());break;case"ArrowUp":i==="vertical"&&S();break}const E=x%y;(_=g[E].ref.current)==null||_.focus()});return s.jsx(ZV,{scope:r,disabled:n,direction:a,orientation:i,children:s.jsx(qw.Slot,{scope:r,children:s.jsx(Ce.div,{...o,"data-orientation":i,ref:c,onKeyDown:n?void 0:f})})})}),mp="AccordionItem",[e7,Yw]=jg(mp),mT=ie.forwardRef((e,t)=>
721{const{__scopeAccordion:r,value:n,...a}=e,i=Ng(mp,r),o=KV(mp,r),l=Gw(r),c=Fr(),d=n&&o.value.includes(n)||!1,u=i.disabled||e.disabled;return s.jsx(e7,{scope:r,open:d,disabled:u,triggerId:c,children:s.jsx(oT,{"data-orientation":i.orientation,"data-state":vT(d),...l,...a,ref:t,disabled:u,open:d,onOpenChange:m=>{m?o.onItemOpen(n):o.onItemClose(n)}})})});mT.displayName=mp;var hT="AccordionHeader",fT=ie.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=Ng(da,r),i=Yw(hT,r);return s.jsx(Ce.h3,{"data-orientation":a.orientation,"data-state":vT(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:t})});fT.displayName=hT;var db="AccordionTrigger",pT=ie.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=Ng(da,r),i=Yw(db,r),o=QV(db,r),l=Gw(r);return s.jsx(qw.ItemSlot,{scope:r,children:s.jsx(WV,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...l,...n,ref:t})})});pT.displayName=db;var gT="AccordionContent",xT=ie.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=Ng(da,r),i=Yw(gT,r),o=Gw(r);return s.jsx(VV,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation,...o,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});xT.displayName=gT;function vT(e){return e?"open":"closed"}var t7=lT,s7=mT,r7=fT,yT=pT,bT=xT;const ub=t7,Kw=h.forwardRef(({className:e,...t},r)=>s.jsx(s7,{ref:r,className:me("border-b",e),...t}));Kw.displayName="AccordionItem";const Qw=h.forwardRef(({className:e,children:t,...r},n)=>s.jsx(r7,{className:"flex",children:s.jsxs(yT,{ref:n,className:me("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,s.jsx($l,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Qw.displayName=yT.displayName;const Xw=h.forwardRef(({className:e,children:t,...r},n)=>s.jsx(bT,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:s.jsx("div",{className:me("pb-4 pt-0",e),children:t})}));Xw.displayName=bT.displayName;var n7="Separator",nk="horizontal",a7=["horizontal","vertical"],wT=h.forwardRef((e,t)=>{const{decorative:r,orientation:n=nk,...a}=e,i=i7(n)?n:nk,l=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return s.jsx(Ce.div,{"data-orientation":i,...l,...a,ref:t})});wT.displayName=n7;function i7(e){return a7.includes(e)}var jT=wT;const _m=h.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>s.jsx(jT,{ref:a,decorative:r,orientation:t,className:me("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));_m.displayName=jT.displayName;const o7=()=>{const[e,t]=h.useState(!1),r=[{question:"Τι είναι Ïο Well Be;",answer:"Το Well Be είναι μια ÏλαÏÏÏÏμα αÏιεÏÏμÎνη ÏÏο wellness. ΣοÏ
ÏÏοÏÏÎÏοÏ
με εÏιλογÎÏ Î³Î¹Î± Ï
γιεινή διαÏÏοÏή, αÏκήÏÎµÎ¹Ï ÎºÎ±Î¹ ενημÎÏÏÏη, ÏÏÏε να βελÏιÏÏÎµÎ¹Ï Ïην καθημεÏινÏÏηÏά ÏοÏ
."},{question:"Î ÏÏ Î¼ÏοÏÏ Î½Î± ξεκινήÏÏ;",answer:"ÎÏλά δημιοÏÏγηÏε Îναν λογαÏιαÏÎ¼Ï ÏÏην ÏλαÏÏÏÏμα Î¼Î±Ï ÎºÎ±Î¹ εÏίλεξε Ïη διάÏκεια ÏÎ·Ï ÏÏ
νδÏÎ¿Î¼Î®Ï ÏοÏ
ÏοÏ
ÏαιÏιάζει. ÎεÏά Ïην εγγÏαÏή, μÏοÏÎµÎ¯Ï Î½Î± ξεκινήÏÎµÎ¹Ï Î¬Î¼ÎµÏα."},{question:"Î¥ÏάÏÏει δÏÏεάν δοκιμή;",answer:"Îαι, κάθε νÎο μÎÎ»Î¿Ï Î¼ÏοÏεί να δοκιμάÏει Ïην ÏλαÏÏÏÏμα δÏÏεάν για 7 ημÎÏεÏ!"},{question:"Î ÏÏ
νδÏομή μοÏ
Ïι ÏεÏιλαμβάνει;",answer:"Îε μία ÏÏ
νδÏομή αÏοκÏÎ¬Ï Î±ÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Ïλα Ïα Workouts, ÎιαλογιÏμοÏÏ, Breathworks, Ï
γιεινÎÏ Î£Ï
νÏαγÎÏ ÎºÎ±Î¹ Ïο podcast Nadia Talks Wellness â Ïλα ÏÏÏÎ¯Ï Î´Î¹Î±Ï
721ημίÏειÏ. ÎÏιÏλÎον, ÏÏ
μμεÏÎÏÎµÎ¹Ï Ïε Challenges, ÏÏο Community και Ïε αÏοκλειÏÏικοÏÏ Î´Î¹Î±Î³ÏνιÏμοÏÏ Î³Î¹Î± Ïα μÎλη μαÏ."},{question:"Îν ÎºÎ¬Î½Ï ÏÏ
νδÏομή ÏÏα Workouts, ÎÏÏ ÏÏÏÏβαÏη και ÏÏο Ï
ÏÏλοιÏο Ï
λικÏ;",answer:"Îαι! ÎÎ»ÎµÏ Î¿Î¹ ÏÏ
νδÏομÎÏ ÏεÏιλαμβάνοÏ
ν ÏλήÏη ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏÏμενο ÏÎ·Ï ÏλαÏÏÏÏμαÏ: Workouts, ÎιαλογιÏμοÏÏ, Breathworks, Podcast, ΣÏ
νÏαγÎÏ ÎºÎ±Î¹ Community."},{question:"ÎÏει ÏÏογÏάμμαÏα για αÏÏάÏιοÏ
Ï Î® ÏÏÎÏει να ÎÏÏ ÎµÎ¼ÏειÏία;",answer:"Î¥ÏάÏÏοÏ
ν ÏÏογÏάμμαÏα για Ïλα Ïα εÏίÏεδα - αÏÏ Î±ÏÏάÏιοÏ
Ï Î¼ÎÏÏι ÏÏοÏÏÏημÎνοÏ
Ï."},{question:"ΧÏειάζομαι ÎµÎ¹Î´Î¹ÎºÏ ÎµÎ¾Î¿ÏλιÏÎ¼Ï Î³Î¹Î± ÏÎ¹Ï Î±ÏκήÏειÏ;",answer:"Îι ÏεÏιÏÏÏÏεÏÎµÏ Î±ÏκήÏÎµÎ¹Ï Î³Î¯Î½Î¿Î½Ïαι ÏÏÏÎ¯Ï ÎµÎ¾Î¿ÏλιÏÎ¼Ï Î® με αÏλά ανÏικείμενα ÏοÏ
Ï
ÏάÏÏοÏ
ν ÏÏο ÏÏίÏι. Îν ÏÏειάζεÏαι κάÏι εÏιÏλÎον, θα Ïο αναÏÎÏοÏ
με ÏÏο ÏÏÏγÏαμμα."},{question:"Îίμαι ÎγκÏ
οÏ. ÎÏοÏÏ Î½Î± βÏÏ ÏÏογÏάμμαÏα καÏάλληλα;",answer:"Îαι! Î¥ÏάÏÏοÏ
ν ειδικά ÏÏεδιαÏμÎνα ÏÏογÏάμμαÏα για εγκÏοÏ
Ï: Prenatal για Ïην ÏεÏίοδο ÏÎ·Ï ÎµÎ³ÎºÏ
μοÏÏÎ½Î·Ï ÎºÎ±Î¹ Postnatal για Ïην αÏοκαÏάÏÏαÏη μεÏά Ïον ÏοκεÏÏ. ΣημανÏικÏ: Î Ïιν ξεκινήÏÎµÎ¹Ï Î¿ÏοιοδήÏοÏε ÏÏÏγÏαμμα, ÏÏ
νιÏÏοÏμε να ÏÏ
μβοÏ
λεÏ
ÏÎµÎ¯Ï Ïον γιαÏÏÏ ÏοÏ
."},{question:"Τι είναι Ïα Challenges; ΧÏειάζομαι ειδική ÏÏ
νδÏομή για να ÏάÏÏ Î¼ÎÏοÏ;",answer:"Τα Challenges είναι θεμαÏικά ÏÏογÏάμμαÏα ÏοÏ
Ïε κÏαÏοÏν Ïε κίνηÏÏο. ΣÏ
μÏεÏιλαμβάνονÏαι ÏÏη ÏÏ
νδÏομή ÏοÏ
ÏÏÏÎ¯Ï ÎºÎ±Î¼Î¯Î± ÎξÏÏα ÏÏÎÏÏη. ÎÎα Î ÏοÏθήκη: ÎλοκληÏÏνονÏÎ±Ï Ïα Challenges μÏοÏÎµÎ¯Ï Î½Î± Î´ÎµÎ¹Ï Ïο Ïνομά ÏοÏ
ÏÏο Hall of Fame ÏοÏ
Well Be Community!"},{question:"Τι είναι Ïο Community;",answer:"Το Well Be Community είναι ο ÏÏÏÎ¿Ï ÏÏοÏ
Ïα μÎλη μοιÏάζονÏαι εμÏειÏίεÏ, θÎÏοÏ
ν εÏÏÏήÏειÏ, ÏÏ
μμεÏÎÏοÏ
ν Ïε αÏοκλειÏÏικοÏÏ Î´Î¹Î±Î³ÏνιÏμοÏÏ ÎºÎ±Î¹ αλληλεÏιδÏοÏν με Ïα Ï
ÏÏλοιÏα μÎλη!"},{question:"Î ÏÏ Î¼ÏοÏÏ Î½Î± ακÏ
ÏÏÏÏ Ïη ÏÏ
νδÏομή μοÏ
;",answer:"ÎÏοÏÎµÎ¯Ï Î½Î± ακÏ
ÏÏÏÎµÎ¹Ï Î±Î½Î¬ ÏάÏα ÏÏιγμή αÏÏ Ïον λογαÏιαÏÎ¼Ï ÏοÏ
, ÏÏÎ¹Ï ÏÏ
θμίÏÎµÎ¹Ï ÏÏ
νδÏομήÏ. Î ÏÏÏÏβαÏή ÏοÏ
ÏαÏαμÎνει ενεÏγή μÎÏÏι Ïη λήξη ÏÎ·Ï ÏÏÎÏοÏ
ÏÎ±Ï ÏεÏιÏδοÏ
."},{question:"Î ÏÏ
νδÏομή ανανεÏνεÏαι αÏ
ÏÏμαÏα;",answer:"Îαι, η ÏÏ
νδÏομή ανανεÏνεÏαι αÏ
ÏÏμαÏα ÏÏην εÏιλεγμÎνη ÏÏ
ÏνÏÏηÏα (Ï.Ï. μηνιαία ή εÏήÏια). ÎÏοÏÎµÎ¯Ï Î½Î± Ïη διακÏÏÎµÎ¹Ï Î¿ÏοιαδήÏοÏε ÏÏιγμή."},{question:"ÎÏοÏÏ Î½Î± ÏÏαμαÏήÏÏ Ïη ÏÏ
νδÏομή μοÏ
και να Ïην ξαναξεκινήÏÏ ÏÏοÏε θÎλÏ;",answer:"ΦÏ
Ïικά! ÎÏοÏÎµÎ¯Ï Î½Î± ακÏ
ÏÏÏÎµÎ¹Ï Î¿ÏοιαδήÏοÏε ÏÏιγμή και να εÏιÏÏÏÎÏÎµÎ¹Ï ÏÏοÏε θÎλειÏ, ÏÏÏÎ¯Ï Î½Î± ÏάÏÎµÎ¹Ï Ïα δεδομÎνα ÏοÏ
ÏÏοÏίλ ÏοÏ
(ιÏÏοÏικÏ, αγαÏημÎνα κ.ά.). Î ÏÏÏÏβαÏη θα ÏαÏαμείνει ενεÏγή μÎÏÏι Ïο ÏÎÎ»Î¿Ï ÏÎ·Ï ÏεÏιÏδοÏ
ÏοÏ
ÎÏÎµÎ¹Ï ÏÏεÏθεί, ÏÏÏÎ¯Ï Î½Î± ανανεÏθεί εκ νÎοÏ
."},{question:"ÎÏοÏÏ Î½Î± ÏÏηÏιμοÏÎ¿Î¹Ï Ïην ÏλαÏÏÏÏμα αÏÏ Ïο κινηÏÏ Î¼Î¿Ï
;",answer:"Îαι, λειÏοÏ
Ïγεί κανονικά αÏÏ Î¿ÏοιοδήÏοÏε κινηÏÏ Î® tablet μÎÏÏ browser, με ÎµÎ¹Î´Î¹ÎºÏ mobile optimization για εÏκολη ÏλοήγηÏη."},{question:"Î¥ÏάÏÏει App για Ïο κινηÏÏ;",answer:"Îαι! ÎÏοÏÎµÎ¯Ï Î½Î± καÏεβάÏÎµÎ¹Ï Ïο Well Be App για iOS και Android και να αÏοκÏήÏÎµÎ¹Ï ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏ
721Ïμενο και Ïα ÏÏοιÏεία ÏοÏ
λογαÏιαÏÎ¼Î¿Ï ÏοÏ
!"},{question:"ΧÏειάζομαι ξεÏÏÏιÏÏή ÏÏ
νδÏομή για Ïο App;",answer:"ÎÏι, ÏÏηÏιμοÏÎ¿Î¹ÎµÎ¯Ï Ïην ίδια ÏÏ
νδÏομή και λογαÏιαÏÎ¼Ï ÎºÎ±Î¹ ÏÏ
νδÎεÏαι ÏÏÏÏ ÎºÎ±Î¹ ÏÏο web."},{question:"ÎÏοÏÏ Î½Î± ÏαÏίÏÏ Î¼Î¹Î± ÏÏ
νδÏομή Ïε κάÏοιον άλλον;",answer:'Îαι, μÏοÏÎµÎ¯Ï Î½Î± αγοÏάÏÎµÎ¹Ï ÏÏ
νδÏομή ÏÏ Î´ÏÏο μÎÏÏ ÏÎ·Ï ÎµÎ¹Î´Î¹ÎºÎ®Ï ÎµÏÎ¹Î»Î¿Î³Î®Ï "ÎγοÏÎ¬Ï ÎάÏÏÎ±Ï ÎÏÏοÏ
" και να ÏÏαλεί Ïο δÏÏο αÏεÏ
Î¸ÎµÎ¯Î±Ï ÏÏο email ÏοÏ
θα δηλÏÏειÏ.'}];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"ΣÏ
ÏνÎÏ ÎÏÏÏήÏÎµÎ¹Ï - Well Be",description:"ÎÏανÏήÏÎµÎ¹Ï Ïε ÏÏ
ÏνÎÏ ÎµÏÏÏήÏÎµÎ¹Ï Î³Î¹Î± ÏÏ
νδÏομÎÏ, workouts, challenges, community και ÏεÏιÏÏÏÏεÏα. Îοήθεια και Ï
ÏοÏÏήÏιξη για Ïο Well Be.",keywords:"faq well be, εÏÏÏήÏÎµÎ¹Ï well be, ÏÏ
νδÏομή, δÏÏεάν δοκιμή, ακÏÏÏÏη",canonical:"https://wellbe.gr/faq"}),s.jsx(iV,{faqs:r}),s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsxs("main",{className:"container mx-auto px-3 xs:px-4 sm:px-6 lg:px-8 py-6 xs:py-8 space-y-6 xs:space-y-8 pt-8 sm:pt-12",children:[s.jsxs("section",{className:"text-center py-4 xs:py-6",children:[s.jsx("h1",{className:"text-2xl xs:text-3xl sm:text-4xl lg:text-5xl font-bold text-foreground mb-3 xs:mb-4",children:"ΣÏ
ÏνÎÏ ÎÏÏÏήÏειÏ"}),s.jsx("p",{className:"text-base xs:text-lg sm:text-xl text-muted-foreground max-w-2xl mx-auto leading-relaxed",children:"ÎÏείÏε αÏανÏήÏÎµÎ¹Ï ÏÏÎ¹Ï Ïιο ÏÏ
ÏνÎÏ ÎµÏÏÏήÏÎµÎ¹Ï ÏÏεÏικά με Ïην ÏλαÏÏÏÏμα Well Be και ÏÎ¹Ï Ï
ÏηÏεÏÎ¯ÎµÏ Î¼Î±Ï"})]}),s.jsx(_m,{}),s.jsx("section",{className:"max-w-4xl mx-auto",children:s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsx(be,{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-center",children:"ÎÏÏÏήÏÎµÎ¹Ï & ÎÏανÏήÏειÏ"})}),s.jsx(ce,{children:s.jsx(ub,{type:"single",collapsible:!0,className:"w-full",children:r.map((n,a)=>s.jsxs(Kw,{value:`item-${a}`,children:[s.jsx(Qw,{className:"text-left text-sm xs:text-base sm:text-lg font-medium",children:n.question}),s.jsx(Xw,{className:"text-muted-foreground leading-relaxed text-sm xs:text-base",children:n.answer})]},a))})})]})}),s.jsx("section",{className:"text-center py-6 xs:py-8",children:s.jsx(oe,{className:"max-w-2xl mx-auto",children:s.jsxs(ce,{className:"pt-4 xs:pt-6 px-4 xs:px-6",children:[s.jsx("h3",{className:"text-lg xs:text-xl font-semibold mb-3 xs:mb-4",children:"Îεν βÏήκαÏε Ïην αÏάνÏηÏη ÏοÏ
ÏάÏνεÏε;"}),s.jsx("p",{className:"text-muted-foreground mb-3 xs:mb-4 text-sm xs:text-base",children:"Πομάδα Ï
ÏοÏÏήÏÎ¹Î¾Î®Ï Î¼Î±Ï ÎµÎ¯Î½Î±Î¹ ÎµÎ´Ï Î³Î¹Î± να ÏÎ±Ï Î²Î¿Î·Î¸Î®Ïει με οÏοιαδήÏοÏε εÏÏÏηÏη ÎÏεÏε."}),s.jsx("a",{href:"/contact",className:"inline-flex items-center justify-center 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 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 py-2",children:"ÎÏικοινÏνήÏÏε μαζί μαÏ"})]})})})]}),s.jsx(Be,{})]})},l7=()=>{const[e,t]=h.useState(!1),[r,n]=h.useState(""),[a,i]=h.useState(""),[o,l]=h.useState(""),[c,d]=h.useState(""),[u,m]=h.useState(""),[f,p]=h.useState(""),[v,g]=h.useState(null),[b,y]=h.useState(""),[x,w]=h.useState(!1),[j,N]=h.useState("signin"),[S,E]=h.useState(null),[_,I]=h.useState(!1),[R,T]=h.useState("email"),[k,C]=h.useState(null),[A,L]=h.useState(!1),O=h.useRef(null),{signIn:P,signUp:M,user:D,checkUserStatus:$,sendPasswordSetupEmail:W,resetPassword:X,inviteLegacyUser:q}=jt(),{toast:H}=at(),se=qe(),te=$s(),{isMobileApp:B}=ar(),le=ee=>({"1_month":"Îηνιαία ΣÏ
νδÏομή - â¬9.90/μήνα","6_months":"6 ÎÎ®Î½ÎµÏ - â¬49 για 6 μήνεÏ","12_months":"ÎÏήÏια ΣÏ
νδÏομή - â¬99/ÎÏοÏ"})[ee]||ee,J=ee=>({"1_month":990,"6_months":4900,"12_months":9900})[ee]||0,K=ee=>{if(!v)return null;const ae=J(ee);if(v.discount_type==="percentage"){const ge=ae*v.discount_value/100;return ae-ge}else return Math.max(0,ae-v.discount_value)};h.useEffect(()=>{const ee=te.hash;if(ee&&(ee.includes("access_token")||ee.includes("recovery"))&&!(ee.includes("provider_token")||te.search.includes("oauth_flow"))){console.log("Detected password reset tokens in /auth, redirecting to /set-password"),se(`/set-password${ee}`,{replace:!0});return}const ae=new URLSearchParams(te.search),ge=ae.get("mode"),Ue=ae.get("plan"),Ze=ae.get("payment"),bt=ae.get("email");ge==="signup"&&N("signup"),Ue&&E(Ue),Ze==="success"&&bt&&Z(bt)},[te.search,te.hash,se]);const Z=async ee=>{t(!0);try{H({title:"ÎÏιÏÏ
ÏÎ®Ï ÏληÏÏμή!",description:"ΠλÎ
721¿Î³Î±ÏιαÏμÏÏ ÏÎ±Ï Î´Î·Î¼Î¹Î¿Ï
Ïγήθηκε. ÎÏοÏείÏε να ÏÏ
νδεθείÏε με Ïα ÏÏοιÏεία ÏαÏ."}),N("signin"),n(ee)}catch{H({title:"ΣÏάλμα",description:"Î¥ÏήÏξε ÏÏÏβλημα με Ïη ÏÏνδεÏη. ΠαÏÎ±ÎºÎ±Î»Ï Î´Î¿ÎºÎ¹Î¼Î¬ÏÏε να ÏÏ
νδεθείÏε.",variant:"destructive"})}finally{t(!1)}};h.useEffect(()=>{if(D!=null&&D.id&&te.pathname==="/auth"){if(O.current===D.id)return;O.current=D.id,(async()=>{var ae;try{const ge=new URLSearchParams(te.search);if(ge.get("oauth_flow")==="true"||te.hash.includes("access_token")){const{data:Nt,error:Hs}=await U.functions.invoke("validate-oauth-user",{body:{email:D.email,provider:((ae=D.app_metadata)==null?void 0:ae.provider)||"google"}});if(Hs||!(Nt!=null&&Nt.valid)){if(!(Nt!=null&&Nt.user_exists)){try{await U.functions.invoke("cleanup-unauthorized-oauth-user",{body:{userId:D.id,email:D.email}})}catch(Jt){console.warn("Could not cleanup unauthorized user:",Jt)}O.current=null,await U.auth.signOut(),C("not_found"),n(D.email||""),H({title:"Î ÏÏÏβαÏη αÏοÏÏίÏθηκε",description:"Το email δεν βÏÎθηκε. ÎλÎγξÏε αν Ïο γÏάÏαÏε ÏÏÏÏά, αλλιÏÏ ÏÏοÏÏÏήÏÏε Ïε εγγÏαÏή.",variant:"destructive"});return}if(Nt!=null&&Nt.user_exists&&!(Nt!=null&&Nt.has_subscription)){H({title:"ÎÏιλÎξÏε Ïλάνο ÏÏ
νδÏομήÏ",description:"ΠαÏακαλοÏμε εÏιλÎξÏε Îνα Ïλάνο ÏÏ
νδÏÎ¿Î¼Î®Ï Î³Î¹Î± να ÏÏ
νεÏίÏεÏε."}),se("/subscription-plans");return}}}const{data:Ze,error:bt}=await U.functions.invoke("check-subscription");if(!bt&&Ze&&!Ze.subscribed){C("no_subscription"),H({title:"ÎÏαιÏείÏαι ÏÏ
νδÏομή",description:"Îεν βÏÎθηκε ενεÏγή ÏÏ
νδÏομή για αÏ
ÏÏ Ïο λογαÏιαÏμÏ.",variant:"destructive"}),se("/subscription-plans");return}bt&&console.warn("Subscription check failed with transient error, proceeding to dashboard:",bt);const Ft=ge.get("returnUrl");se(Ft&&Ft!=="/"?Ft:"/dashboard")}catch(ge){console.error("Error checking authentication:",ge),console.warn("Proceeding to dashboard despite error, ProtectedRoute will verify subscription"),se("/dashboard")}})()}D!=null&&D.id||(O.current=null)},[D==null?void 0:D.id,se,te.pathname,te.search,H]);const re=async ee=>{if(ee.preventDefault(),!r)return;L(!0);const{status:ae,error:ge}=await $(r);if(ge){H({title:"ΣÏάλμα",description:"Îεν μÏοÏÎÏαμε να ελÎγξοÏ
με Ïην καÏάÏÏαÏη ÏοÏ
λογαÏιαÏμοÏ. ÎοκιμάÏÏε ξανά.",variant:"destructive"}),L(!1);return}C(ae),L(!1),(ae==="not_found"||ae==="imported_only")&&C(ae)},de=ee=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(ee),Pe=async()=>{if(!de(r))return;L(!0);const{status:ee,error:ae}=await $(r);ae||C(ee),L(!1)},Ee=async()=>{t(!0);let ee;ee=(await W(r)).error,ee?H({title:"ΣÏάλμα",description:"Îεν μÏοÏÎÏαμε να ÏÏείλοÏ
με Ïο email. ÎοκιμάÏÏε ξανά.",variant:"destructive"}):(H({title:"Email ÏÏάλθηκε!",description:"ÎλÎγξÏε Ïο email ÏÎ±Ï Î³Î¹Î± να οÏίÏεÏε κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏηÏ."}),T("setup")),t(!1)},tt=async ee=>{ee.preventDefault(),t(!0);const{error:ae}=await P(r,a);H(ae?{title:"ΣÏάλμα ÏÏνδεÏηÏ",description:ae.message,variant:"destructive"}:{title:"ÎÏιÏÏ
ÏÎ®Ï ÏÏνδεÏη",description:"ÎαλÏÏ Î®ÏθαÏε ÏίÏÏ!"}),t(!1)},ze=async()=>{if(f.trim()){w(!0),y("");try{const{data:ee,error:ae}=await U.functions.invoke("validate-promo-code",{body:{code:f.trim(),plan:S}});if(ae)throw ae;ee.valid?(g(ee),H({title:"ÎÏιÏÏ
Ïία!",description:`Î ÎκÏÏÏÏη εÏαÏμÏÏÏηκε: ${ee.discount_type==="percentage"?`${ee.discount_value}%`:`â¬${(ee.discount_value/100).toFixed(2)}`}`})):(y(ee.error||"Îη ÎγκÏ
ÏÎ¿Ï ÎºÏδικÏÏ ÎκÏÏÏÏηÏ"),g(null))}catch(ee){console.error("Error validating discount code:",ee),y("ΣÏάλμα καÏά Ïην εÏαλήθεÏ
Ïη ÏοÏ
κÏδικοÏ"),g(null)}finally{w(!1)}}};h.useEffect(()=>{v&&f&&ze()},[S]);const et=async()=>
721{if(!r){H({title:"ΣÏάλμα",description:"ΠαÏÎ±ÎºÎ±Î»Ï ÎµÎ¹ÏάγεÏε Ïο email ÏÎ±Ï ÏÏÏÏα.",variant:"destructive"});return}t(!0);const{error:ee}=await X(r);H(ee?{title:"ΣÏάλμα",description:"Îεν μÏοÏÎÏαμε να ÏÏείλοÏ
με Ïο email εÏαναÏοÏÎ¬Ï ÎºÏδικοÏ.",variant:"destructive"}:{title:"Email ÏÏάλθηκε!",description:"ÎλÎγξÏε Ïο email ÏÎ±Ï Î³Î¹Î± Î¿Î´Î·Î³Î¯ÎµÏ ÎµÏαναÏοÏÎ¬Ï ÎºÏδικοÏ."}),t(!1)},st=async()=>{t(!0);let ee;ee=(await W(r)).error,H(ee?{title:"ΣÏάλμα",description:"Îεν μÏοÏÎÏαμε να ÏÏείλοÏ
με Ïο email. ÎοκιμάÏÏε ξανά.",variant:"destructive"}:{title:"Email ÏÏάλθηκε!",description:"ÎλÎγξÏε Ïο email ÏÎ±Ï Î³Î¹Î± να οÏίÏεÏε κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏηÏ."}),t(!1)},z=async ee=>{ee.preventDefault(),t(!0);try{if(S){if(a!==u){H({title:"ΣÏάλμα",description:"Îι κÏδικοί ÏÏÏÏβαÏÎ·Ï Î´ÎµÎ½ ÏαιÏιάζοÏ
ν.",variant:"destructive"}),t(!1);return}if(a.length<6){H({title:"ΣÏάλμα",description:"ΠκÏδικÏÏ ÏÏÏÏβαÏÎ·Ï ÏÏÎÏει να ÎÏει ÏοÏ
λάÏιÏÏον 6 ÏαÏακÏήÏεÏ.",variant:"destructive"}),t(!1);return}const{data:ae,error:ge}=await U.functions.invoke("signup-checkout",{body:{email:r,firstName:o,lastName:c,password:a,plan:S,...v?{discountCode:f.trim()}:{}}});if(ge)throw new Error(ge.message||"ÎÏοÏÏ
Ïία δημιοÏ
ÏÎ³Î¯Î±Ï ÏληÏÏμήÏ");if(ae!=null&&ae.error)throw new Error(ae.error);if(H({title:"ÎεÏάβαÏη ÏÏην ÏληÏÏμή",description:"ΠαÏακαλοÏμε ολοκληÏÏÏÏε Ïην ÏληÏÏμή για Ïο εÏιλεγμÎνο Ïλάνο."}),ae!=null&&ae.url){try{window.top&&window.top!==window.self?window.top.location.href=ae.url:window.location.href=ae.url}catch{window.open(ae.url,"_blank"),H({title:"ΠαÏάθÏ
Ïο ÏληÏÏμήÏ",description:"Îνοιξε νÎα καÏÏÎλα για Ïην ÏληÏÏμή. Îάν δεν Ïην βλÎÏεÏε, ελÎγξÏε Ïον popup blocker."})}return}throw new Error("Îεν λάβαμε URL ÏληÏÏμήÏ")}else{const{error:ae}=await M(r,a,o,c);if(ae)throw ae;H({title:"ÎÏιÏÏ
ÏÎ®Ï ÎµÎ³Î³ÏαÏή",description:"ÎλÎγξÏε Ïο email ÏÎ±Ï Î³Î¹Î± εÏιβεβαίÏÏη."})}}catch(ae){H({title:"ΣÏάλμα εγγÏαÏήÏ",description:ae.message||"ÎάÏι Ïήγε ÏÏÏαβά. ÎοκιμάÏÏε ξανά.",variant:"destructive"})}finally{t(!1)}},Y=async()=>{try{const ae=new URLSearchParams(te.search).get("returnUrl"),ge=`${window.location.origin}/auth?oauth_flow=true${ae?`&returnUrl=${encodeURIComponent(ae)}`:""}`,{error:Ue}=await U.auth.signInWithOAuth({provider:"google",options:{redirectTo:ge}});Ue&&H({title:"ΣÏάλμα ÏÏνδεÏηÏ",description:Ue.message,variant:"destructive"})}catch{H({title:"ΣÏάλμα ÏÏνδεÏηÏ",description:"ÎάÏι Ïήγε ÏÏÏαβά. ΠαÏÎ±ÎºÎ±Î»Ï Î´Î¿ÎºÎ¹Î¼Î¬ÏÏε ξανά.",variant:"destructive"})}},ne=()=>s.jsx(F,{variant:"outline",className:"w-full h-11 sm:h-12 border-border hover:bg-accent hover:text-accent-foreground transition-colors",onClick:Y,children:s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:[s.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),s.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),s.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),s.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),s.jsx("span",{className:"text-xs sm:text-sm font-medium",children:"Sign in with Google"})]})}),fe=()=>{T("email"),C(null),n(""),i(""),m("")};return s.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[s.jsx(Fe,{isMenuOpen:_,onMenuToggle:()=>I(!_)}),s.jsx("div",{className:"flex-1 flex items-center justify-center p-4 pt-16 sm:pt-20 pb-20 sm:pb-24",children:s.jsxs("div",{className:"w-full max-w-md px-2 sm:px-0",children:[s.jsxs("div",{className:"text-center mb-6 sm:mb-8",children:[s.jsx("img",{src:"/lovable-uploads/463c9522-33
72113-4588-bd87-40273096d456.png",alt:"Well Be",className:"h-12 sm:h-14 md:h-16 mx-auto mb-4"}),s.jsx("h1",{className:"text-xl sm:text-2xl font-bold text-foreground",children:"ÎαλÏÏ Î®ÏθαÏε"}),s.jsx("p",{className:"text-sm sm:text-base text-muted-foreground mt-2",children:"ΣÏ
νδεθείÏε για ÏÏÏÏβαÏη ÏÏον λογαÏιαÏÎ¼Ï ÏαÏ"})]}),s.jsxs(oe,{children:[s.jsxs(xe,{className:"px-4 sm:px-6 pt-4 sm:pt-6",children:[s.jsxs(be,{children:[R==="password"&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(F,{variant:"ghost",size:"sm",onClick:fe,className:"p-1 h-auto",children:s.jsx(ea,{className:"h-4 w-4"})}),"ÎιÏάγεÏε Ïον κÏÎ´Î¹ÎºÏ ÏαÏ"]}),R==="setup"&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(F,{variant:"ghost",size:"sm",onClick:fe,className:"p-1 h-auto",children:s.jsx(ea,{className:"h-4 w-4"})}),"ÎνοίξÏε Ïο email ÏÎ±Ï Î³Î¹Î± να ÏÏ
νδεθείÏε"]}),R==="email"&&k==="has_password"&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(F,{variant:"ghost",size:"sm",onClick:fe,className:"p-1 h-auto",children:s.jsx(ea,{className:"h-4 w-4"})}),"ΣÏνδεÏη"]}),R==="email"&&k!=="has_password"&&"Î ÏÏÏβαÏη ÏÏον λογαÏιαÏμÏ"]}),s.jsxs(gt,{className:"mt-4",children:[R==="password"&&`ΣÏνδεÏη για ${r}`,R==="setup"&&k==="payment_success"&&"Î ÏληÏÏμή ÏÎ±Ï Î¿Î»Î¿ÎºÎ»Î·ÏÏθηκε εÏιÏÏ
ÏÏÏ! ΣÏείλαμε email για να οÏίÏεÏε κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏηÏ.",R==="setup"&&k!=="payment_success"&&"ÎάνÏε κλικ ÏÏον ÏÏνδεÏμο ÏοÏ
λάβαÏε για να οÏίÏεÏε εκ νÎοÏ
Ïον κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏÎ·Ï ÏÎ±Ï ÎºÎ±Î¹ να ÏÏ
νδεθείÏε ÏÏο ανανεÏμÎνο Well Be!",R==="email"&&k==="has_password"&&`ΣÏνδεÏη για ${r}`,R==="email"&&k==="needs_password"&&"Îα ÏÎ±Ï ÏÏείλοÏ
με Îνα email για να οÏίÏεÏε κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏηÏ",R==="email"&&k==="imported_only"&&"Îα ÏÎ±Ï ÏÏείλοÏ
με ÏÏÏÏκληÏη για να ενεÏγοÏοιήÏεÏε Ïον λογαÏιαÏÎ¼Ï ÏαÏ",R==="email"&&!k&&"ÎÏιλÎξÏε Ïον ÏÏÏÏο ÏÏÏÏβαÏηÏ"]})]}),s.jsxs(ce,{className:"px-4 sm:px-6 pb-4 sm:pb-6",children:[S&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-primary/10 border border-primary/20 rounded-lg p-3 sm:p-4",children:[s.jsx("h3",{className:"font-medium text-primary mb-2",children:"ÎÏιλεγμÎνο Ïλάνο"}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:le(S)}),v&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-sm text-muted-foreground line-through",children:["â¬",(J(S)/100).toFixed(2)]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("div",{className:"text-lg font-semibold text-green-600",children:["â¬",(K(S)/100).toFixed(2)]}),s.jsxs("div",{className:"text-xs text-green-600",children:["ÎξοικονομείÏε â¬",((J(S)-K(S))/100).toFixed(2)]})]})]})]})]}),!B&&s.jsxs("div",{className:"space-y-6 mb-6",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-center text-sm text-muted-foreground mb-4",children:"ÎÏήγοÏη εγγÏαÏή"}),ne()]}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx(_m,{className:"w-full"})}),s.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:s.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"ΠΣΥÎÎΧÎΣΤΠÎÎ EMAIL"})})]})]}),s.jsxs("form",{onSubmit:z,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"signup-email",children:"Email *"}),s.jsx(ke,{id:"signup-email",type:"email",placeholder:"[email protected]",value:r,onChange:ee=>n(ee.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"signup-firstName",children:"Îνομα *"}),s.jsx(ke,{id:"signup-firstName",type:"text",placeholder:"Το Ïνομά ÏαÏ",value:o,onChange:ee=>l(ee.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"signup-lastName",children:"ÎÏÏνÏ
μο *"}),s.jsx(ke,{id:"signup-lastName",type:"text",placeholder:"Το εÏÏνÏ
Î¼Ï ÏαÏ",value:c,onChange:ee=>d(ee.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"signup-password",children:"ÎÏδικÏÏ ÏÏÏÏβαÏÎ·Ï *"}),s.jsx(ke,{id:"signup-password",type:"password",placeholder:"ÎιÏάγεÏε κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏηÏ",value:a,onChange:ee=>i(ee.target.value),required:!0,minLength:6})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"signup-confirm-password",children:"ÎÏιβεβαίÏÏη κÏÎ´Î¹ÎºÎ¿Ï *"}),s.jsx(ke,{id:"signup-confirm-password",type:"password",placeholder:"ÎÏιβεβαιÏÏÏε Ïον κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏηÏ",value:u,onChange:ee=>m(ee.target.value),required:!0,minLength:6}),a&&u&&a!==u&&s.jsx("p",{className:"text-sm text-destructive",children:"Îι κÏδικοί ÏÏÏÏβαÏÎ·Ï Î´ÎµÎ½ ÏαιÏιάζοÏ
ν"})]}),s.jsxs("div",{className:"space-y-3 border-t pt-4",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx(_e,{className:"text-sm font-medium",children:"ÎÏδικÏÏ ÎκÏÏÏÏÎ·Ï (ÏÏοαιÏεÏικÏ)"})}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ke,{type:"text",placeholder:"ÎιÏάγεÏε κÏÎ´Î¹ÎºÏ ÎκÏÏÏÏηÏ",value:f,onChange:ee=>p(ee.target.value.toUpperCase()),className:"flex-1"}),s.jsx(F,{type:"button",variant:"outline",onClick:ze,disabled:!f.trim()||x,className:"shrink-0",children:x?s.jsx(mt,{className:"h-4 w-4 animate-spin"}):"ÎÏαÏμογή"})]}),b&&s.jsx("div",{className:"text-sm text-destructive",children:b}),v&&s.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3",children:s.jsxs("div",{className:"flex items-center gap-2 text-green-700",children:[s.jsx("svg",{className:"h-4 w-4",fill:"
721currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),s.jsxs("span",{className:"text-sm font-medium",children:["ÎκÏÏÏÏη εÏαÏμÏÏÏηκε: ",v.discount_type==="percentage"?`${v.discount_value}%`:`â¬${(v.discount_value/100).toFixed(2)}`]})]})})]}),s.jsxs(F,{type:"submit",className:"w-full h-11 sm:h-12",disabled:e||a&&u&&a!==u,children:[e&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"ΣÏ
νÎÏεια ÏÏην ÏληÏÏμή"]})]}),s.jsx("div",{className:"text-center",children:s.jsx(F,{variant:"link",onClick:()=>se("/subscription-plans"),className:"text-muted-foreground hover:text-foreground text-sm",children:"Îλλαγή ÏλάνοÏ
"})})]}),!S&&R==="email"&&s.jsxs(s.Fragment,{children:[!B&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-center text-sm text-muted-foreground mb-4",children:"ÎÏήγοÏη ÏÏνδεÏη"}),ne()]}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx(_m,{className:"w-full"})}),s.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:s.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"ΠΣΥÎÎΧÎΣΤΠÎÎ EMAIL"})})]})]}),k==="has_password"?s.jsxs("form",{onSubmit:tt,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"signin-email",children:"Email"}),s.jsx(ke,{id:"signin-email",type:"email",placeholder:"[email protected]",value:r,onChange:ee=>{n(ee.target.value),k&&C(null)},onBlur:Pe,required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"signin-password",children:"ÎÏδικÏÏ ÏÏÏÏβαÏηÏ"}),s.jsx(ke,{id:"signin-password",type:"password",value:a,onChange:ee=>i(ee.target.value),required:!0})]}),s.jsx(F,{type:"button",variant:"link",className:"p-0 h-auto text-sm text-muted-foreground hover:text-foreground",onClick:et,children:"ÎεÏάÏαÏε Ïον κÏÎ´Î¹ÎºÏ ÏαÏ;"}),s.jsxs(F,{type:"submit",className:"w-full h-11 sm:h-12",disabled:e,children:[e&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"ΣÏνδεÏη"]})]}):k==="needs_password"||k==="imported_only"?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"email-disabled",children:"Email"}),s.jsx(ke,{id:"email-disabled",type:"email",value:r,disabled:!0,className:"bg-muted"})]}),s.jsxs(F,{onClick:Ee,className:"w-full h-11 sm:h-12",disabled:e,children:[e&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),k==="imported_only"?"ΣÏείλÏε ÏÏÏÏκληÏη":"ΣÏείλÏε email"]})]}):k==="no_subscription"?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"email-disabled",children:"Email"}),s.jsx(ke,{id:"email-disabled",type:"email",value:r,disabled:!0,className:"bg-muted"})]}),s.jsxs("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-4 text-center",children:[s.jsx("p",{className:"text-sm text-destructive mb-2",children:"Îεν βÏÎθηκε ενεÏγή ÏÏ
νδÏομή για αÏ
ÏÏ Ïο λογαÏιαÏμÏ."}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"ΠαÏακαλοÏμε εÏιλÎξÏε Îνα Ïλάνο για να ÏÏ
νεÏίÏεÏε."})]}),s.jsx(F,{type:"button",onClick:()=>se("/subscription-plans"),className:"w-full",children:"Î Ïοβολή ΠλάνÏν ΣÏ
νδÏομήÏ"}),s.jsx(F,{type:"button",onClick:()=>{C(null),n("")},variant:"outline",className:"w-full",children:"ÎοκιμάÏÏε ξανά"})]}):k==="not_found"?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"email-disabled",children:"Email"}),s.jsx(ke,{id:"email-disabled",type:"email",value:r,disabled:!0,className:"bg-muted"})]}),s.jsx("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-4 text-center",children:s.jsxs("p",{className:"text-sm text-destructive mb-0",children:["Το email δεν βÏÎθηκε. ÎλÎγξÏε αν Ïο γÏάÏαÏε ÏÏÏÏά, αλλιÏÏ"," ",s.jsx(F,{variant:"link",className:"h-auto p-0 text-destructive underline font-normal text-sm",onClick:()=>se("/subscription-plans"),children:"ÏÏοÏÏÏήÏÏε Ïε εγγÏαÏή"}),"."]})}),s.jsx(F,{type:"button",onClick:()=>{C(null),n("")},variant:"outline",className:"w-full",children:"ÎοκιμάÏÏε ξανά"})]}):s.jsxs("form",{onSubmit:re,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"signin-email",children:"Email"}),s.jsx(ke,{id:"signin-email",type:"email",placeholder:"[email protected]",value:r,onChange:ee=>{n(ee.target.value),k&&C(null)},onBlur:Pe,required:!0})]}),s.jsx(F,{type:"submit",className:"w-full",disabled:A,children:A?s.jsxs(s.Fragment,{children:[s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"ÎλεγÏοÏ..."]}):"ΣÏ
νÎÏεια"})]})]}),!S&&R==="password"&&s.jsxs("form",{onSubmit:tt,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"password",children:"ÎÏδικÏÏ ÏÏÏÏβαÏηÏ"}),s.jsx(ke,{id:"password",type:"password",value:a,onChange:ee=>i(ee.target.value),required:!0})]}),s.jsx(F,{type:"button",variant:"link",className:"p-0 h-auto text-sm text-muted-foreground hover:text-foreground",onClick:et,children:"ÎεÏάÏαÏε Ïον κÏÎ´Î¹ÎºÏ ÏαÏ;"}),s.jsxs(F,{type:"submit",className:"w-full",disabled:e,children:[e&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"ΣÏνδεÏη"]})]}),!S&&R==="setup"&&s.jsxs("div",{className:"space-y-4 text-center",children:[k==="payment_success"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bg-green-500/10 border border-green-500/20 rounded-lg p-4",children:[s.jsx("p",{className:"text-sm text-green-700 dark:text-green-400 mb-2 font-medium",children:"ð ÎÏιÏÏ
ÏÎ®Ï ÏληÏÏμή!"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["ΠλογαÏιαÏμÏÏ ÏÎ±Ï Î´Î·Î¼Î¹Î¿Ï
Ïγήθηκε. ΣÏείλαμε email ÏÏο ",r," για να οÏίÏεÏε κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏηÏ."]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"ÎεÏά Ïον οÏιÏÎ¼Ï ÎºÏδικοÏ, θα μÏοÏείÏε να ÏÏ
νδεθείÏε και να ÎÏεÏε ÏλήÏη ÏÏÏÏβαÏη ÏÏο Well Be."})]}):s.jsxs("p",{className:"text-sm text-muted-foreground",children:["ΣÏείλαμε email ÏÏο ",r," με Î¿Î´Î·Î³Î¯ÎµÏ Î³Î¹Î± να οÏίÏεÏε κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏηÏ."]}),s.jsxs(F,{variant:"outline",onClick:st,disabled:e,className:"w-full",children:[e&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"ÎÏαναÏοÏÏολή email"]})]})]})]}),s.jsx("div",{className:"text-center mt-6 px-4",children:s.jsx(F,{variant:"link",onClick:()=>se("/subscription-plans"),className:"text-muted-foreground hover:text-foreground whitespace-normal h-auto py-2 text-xs sm:text-sm",children:"Îεν είÏÏε ακÏμη μÎλοÏ; ÎοκιμάÏÏε 7 ημÎÏÎµÏ Î´ÏÏεάν!"})})]})}),s.jsx(Be,{})]})},c7=()=>{const[e,t]=h.useState(!1),[r,n]=h.useState(!1),[a,i]=h.useState(null),[o,l]=h.useState(!1),[c,d]=h.useState({}),[u,m]=h.useState(null),[f,p]=h.useState(""),[v,g]=h.useState(null),[b,y]=h.useState(null),[x,w]=h.useState(!1),j=qe(),N=$s(),{user:S,session:E}
721=jt(),{subscribed:_,isTrialUser:I,subscriptionTier:R,isProfileComplete:T,checkProfileCompletion:k,checkSubscription:C,isAdminFreeAccess:A}=_i(),{toast:L}=at();h.useEffect(()=>{S&&k()},[S]);const[O,P]=h.useState(!1);h.useEffect(()=>{if(S&&T&&N.search){const B=new URLSearchParams(N.search),le=B.get("selected"),J=B.get("promo")||void 0;le&&!O&&(P(!0),se(le,J))}},[S,T,N.search,O]);const M=[{id:"1_month",name:"Îηνιαία",price:"9,90",period:"ανά μήνα",icon:id,popular:!1,features:["ÎÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Ïλα Ïα Workouts, ÎιαλογιÏμοÏÏ ÎºÎ±Î¹ Breathworks","Î Ïοβολή ÏλÏν ÏÏν podcast ÏÏÏÎ¯Ï Î´Î¹Î±ÏημίÏειÏ","ÎÏοκλειÏÏική ÏÏÏÏβαÏη ÏÏο Well Be community","ÎημιοÏ
Ïγία ÏÏοÏÏÏÎ¹ÎºÎ¿Ï ÏÏοÏίλ","Î ÏÏÏβαÏη μÎÏÏ Ï
ÏολογιÏÏή & mobile app","ÎκÏÏÏÏη ανά ÏάÏα ÏÏιγμή"]},{id:"6_months",name:"6 ÎήνεÏ",price:"49",period:"για 6 μήνεÏ",savings:"ÎξοικονÏμηÏη â¬10.40",icon:ui,popular:!0,features:["ÎÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Ïλα Ïα Workouts, ÎιαλογιÏμοÏÏ ÎºÎ±Î¹ Breathworks","Î Ïοβολή ÏλÏν ÏÏν podcast ÏÏÏÎ¯Ï Î´Î¹Î±ÏημίÏειÏ","ÎÏοκλειÏÏική ÏÏÏÏβαÏη ÏÏο Well Be community","ÎημιοÏ
Ïγία ÏÏοÏÏÏÎ¹ÎºÎ¿Ï ÏÏοÏίλ","Î ÏÏÏβαÏη μÎÏÏ Ï
ÏολογιÏÏή & mobile app","ÎαλÏÏεÏη αξία για Ïα ÏÏήμαÏά ÏαÏ","ÎκÏÏÏÏη ανά ÏάÏα ÏÏιγμή"]},{id:"12_months",name:"ÎÏήÏια",price:"99",period:"ανά ÎÏοÏ",savings:Ea()?"BLACK FRIDAY: â¬40 ÎκÏÏÏÏη!":"ÎξοικονÏμηÏη â¬19.80",icon:om,popular:Ea(),blackFriday:Ea(),features:["ÎÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Ïλα Ïα Workouts, ÎιαλογιÏμοÏÏ ÎºÎ±Î¹ Breathworks","Î Ïοβολή ÏλÏν ÏÏν podcast ÏÏÏÎ¯Ï Î´Î¹Î±ÏημίÏειÏ","ÎÏοκλειÏÏική ÏÏÏÏβαÏη ÏÏο Well Be community","ÎημιοÏ
Ïγία ÏÏοÏÏÏÎ¹ÎºÎ¿Ï ÏÏοÏίλ","Î ÏÏÏβαÏη μÎÏÏ Ï
ÏολογιÏÏή & mobile app","ÎαλÏÏεÏη Ïιμή - εξοικονομήÏÏε â¬19.80 Ïο ÏÏÏνο","ÎÏοκλειÏÏικοί διαγÏνιÏμοί για Ïα μÎλη","ÎκÏÏÏÏη ανά ÏάÏα ÏÏιγμή"]}],D=async(B,le)=>{if(!S){const Z=window.location.href;j(`/auth?mode=signup&plan=${B}&returnUrl=${encodeURIComponent(Z)}`);return}if(A){L({title:"ÎÏεÏε ήδη ÏÏÏÏβαÏη",description:"ÎÏεÏε ήδη ÏλήÏη ÏÏÏÏβαÏη ÏÏην ÏλαÏÏÏÏμα. Îν θÎλεÏε να εγγÏάÏεÏε κάÏοιον άλλο, ÏαÏÎ±ÎºÎ±Î»Ï Î±ÏοÏÏ
νδεθείÏε ÏÏÏÏα.",variant:"default"});return}const{data:J}=await U.from("profiles").select("first_name, last_name").eq("user_id",S.id).single(),K=Z=>(Z==null?void 0:Z.includes("@"))||(Z==null?void 0:Z.includes("."));if(!(J!=null&&J.first_name)||K(J.first_name)){d({first_name:J==null?void 0:J.first_name,last_name:J==null?void 0:J.last_name}),m(B),l(!0);return}await $(B,le)},$=async(B,le)=>{n(!0),i(B);try{const{data:J,error:K}=await U.functions.invoke("create-checkout",{body:{plan:B,discountCode:le,isUpgrade:_},headers:{Authorization:`Bearer ${E==null?void 0:E.access_token}`}});if(K)throw K;if(J!=null&&J.error)throw new Error(J.error);window.location.href=J.url}catch(J){console.error("Error creating checkout:",J),L({title:"ΣÏάλμα",description:J.message||"ÎÏοÏÏ
Ïία δημιοÏ
ÏÎ³Î¯Î±Ï ÏÏ
νεδÏÎ¯Î±Ï ÏληÏÏμήÏ. ΠαÏÎ±ÎºÎ±Î»Ï Î´Î¿ÎºÎ¹Î¼Î¬ÏÏε ξανά.",variant:"destructive"})}finally{n(!1),i(null)}},W=async()=>{if(l(!1),u){const B=u==="12_months"?nn.PROMO_CODE:void 0;await $(u,B),m(null)}},X=async()=>{var le;const B=f.trim();if(!B){g("ΠαÏÎ±ÎºÎ±Î»Ï ÎµÎ¹ÏάγεÏε Îναν κÏδικÏ");return}w(!0),g(null),y(null);try{const{data:J,error:K}=await U.functions.invoke("validate-promo-code",{body:{code:B}});if(K)throw K;if(J.valid){y({code:J.code,discount_type:J.discount_type,discount_value:J.discount_value,applicable_plans:J.applicable_plans||[]});let Z=`ΠκÏδικÏÏ ${J.code} εÏαÏμÏÏÏηκε εÏιÏÏ
ÏÏÏ`;if(J.applicable_plans&&J.applicable_plans.length>0){const re=J.applicable_plans.map(de=>de==="1_month"?"Îηνιαία":de==="6_months"?"6 ÎήνεÏ":de==="12_months"?"ÎÏήÏια":de).join(", ");Z+=` για Ïλάνα: ${re}`}L({title:"ÎÏιÏÏ
Ïία!",description:Z})}else(le=J.error)!=null&&le.includes("not valid for this subscription plan")?g("ΠκÏδικÏÏ Î¹ÏÏÏει μÏνο για ÏÏ
γκεκÏιμÎνο Ïλάνο ÏÏ
νδÏομήÏ. ÎοκίμαÏε να εÏιλÎÎ¾ÎµÎ¹Ï Ïο εÏήÏιο Ïλάνο για να Ïον ÏÏηÏιμοÏοιήÏειÏ."):g(J.error||"Îη ÎγκÏ
ÏÎ¿Ï ÎºÏδικÏÏ")}catch(J){console.error("Error validating promo code:",J),g("ΣÏάλμα εÏικÏÏÏÏÎ·Ï ÎºÏδικοÏ. ΠαÏÎ±ÎºÎ±Î»Ï Î´Î¿ÎºÎ¹Î¼Î¬ÏÏε ξανά.")}finally{w(!1)}},q=(B,le)=>{if(!b||b.applicable_plans.length>0&&!b.applicable_plans.includes(B))return null;if(b.discount_type==="percentage"){const J=le*b.discount_value/100;return le-J}else{const J=b.discount_value/100;return Math.max(0,le-J)}},H=B=>{let le;if(b&&(b.applicable_plans.length===0||b.applicable_plans.includes(B))&&(le=b.code),!le){const J=f.trim();J&&(le=J)}!le&&B==="12_months"&&Ea()&&(le=nn.PROMO_CODE),D(B,le)},se=(B,le)=>{let Z=f.trim()||void 0||(le||void 0);!Z&&B==="12_months"&&Ea()&&(Z=nn.PROMO_CODE),D(B,Z)},te=B=>_&&R===B?s.jsx(ye,{variant:"default",className:"absolute -top-3 left-1/2 transform -translate-x-1/2 bg-[#8B7355] hover:bg-[#8B7355] text-white z-10",children:I?"ÎÏÏεάν Îοκιμή":"ΤÏÎÏον Πλάνο"}):null;return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"Πλάνα ΣÏ
νδÏÎ¿Î¼Î®Ï - Well Be Workouts",description:"ÎÏιλÎξÏε Ïη ÏÏ
νδÏομή Well Be ÏοÏ
ÏÎ±Ï ÏαιÏιάζει: Îηνιαία â¬9.90, 6μηνη â¬49, ÎÏήÏια â¬99. ÎÏÏεάν δοκιμή 7 ημεÏÏν. ÎκÏÏÏÏη ανά ÏάÏα ÏÏιγμή.",keywords:"ÏιμÎÏ well be, ÏÏ
νδÏομή, ÏακÎÏα, δÏÏεάν δοκιμή, pricing",canonical:"https://wellbe.gr/subscription-plans"}),s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsx(QP,{open:o,onClose:()=>{l(!1),m(null)},onComplete:W,currentProfile:c}
721),s.jsxs("main",{className:"container mx-auto px-4 pt-2 pb-8",children:[s.jsxs(F,{variant:"ghost",onClick:()=>j(-1),className:"mb-6",children:[s.jsx(as,{className:"w-4 h-4 mr-2"}),"ΠίÏÏ"]}),s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"ÎÏιλÎξÏε Ïη ΣÏ
νδÏομή ÏαÏ"}),s.jsx("p",{className:"text-xl text-muted-foreground mb-6",children:"ÎεκινήÏÏε Ïη δÏÏεάν δοκιμή ÏÏν 7 ημεÏÏν. ÎκÏ
ÏÏÏÏε ανά ÏάÏα ÏÏιγμή."}),s.jsx("div",{className:"max-w-md mx-auto mb-8",children:s.jsxs("div",{className:"bg-gradient-to-r from-amber-50 to-orange-50 dark:from-amber-950/30 dark:to-orange-950/30 border-2 border-amber-200 dark:border-amber-800 rounded-lg p-6 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm font-medium text-amber-900 dark:text-amber-100",children:[s.jsx(Z5,{className:"w-5 h-5"}),s.jsx("span",{children:"ÎÏÎµÎ¹Ï ÎµÎºÏÏÏÏÎ¹ÎºÏ ÎºÏδικÏ;"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ke,{type:"text",value:f,onChange:B=>{p(B.target.value.toUpperCase()),g(null),y(null)},onKeyPress:B=>{B.key==="Enter"&&X()},placeholder:"Î .Ï. BLACKFRIDAY",className:"text-center font-medium border-amber-300 focus:border-amber-500",disabled:x}),s.jsx(F,{onClick:X,disabled:!f.trim()||x,className:"bg-amber-600 hover:bg-amber-700 text-white px-6",children:x?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"animate-spin h-4 w-4 border-2 border-white border-t-transparent rounded-full"}),"ÎλεγÏοÏ..."]}):"ÎÏαÏμογή"})]}),v&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 rounded-md p-2",children:[s.jsx("span",{children:"â"}),s.jsx("span",{children:v})]}),b&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-950/30 border border-green-200 dark:border-green-800 rounded-md p-2",children:[s.jsx("span",{children:"â"}),s.jsxs("span",{children:["ÎÏδικÏÏ ÎµÏαÏμÏÏÏηκε: ",s.jsx("strong",{children:b.code}),b.discount_type==="percentage"?` (-${b.discount_value}%)`:` (-â¬${(b.discount_value/100).toFixed(2)})`]})]}),s.jsx("p",{className:"text-xs text-center text-amber-700 dark:text-amber-300",children:b?"Îι νÎÎµÏ ÏιμÎÏ ÎµÎ¼ÏανίζονÏαι ÏαÏακάÏÏ":'ÎιÏάγεÏε Ïον κÏÎ´Î¹ÎºÏ ÎºÎ±Î¹ ÏαÏήÏÏε "ÎÏαÏμογή" για να δείÏε ÏÎ¹Ï Î½ÎÎµÏ ÏιμÎÏ'})]})})]}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-5xl mx-auto",children:M.map(B=>{const le=B.icon,J=_&&R===B.id,K=r&&a===B.id;return s.jsxs(oe,{className:`relative ${B.popular?"border-primary shadow-lg scale-105":""} ${J?"border-green-500":""}`,children:[B.blackFriday&&s.jsxs(ye,{className:"absolute -top-3 left-1/2 transform -translate-x-1/2 bg-gradient-to-r from-red-600 to-red-700 text-white hover:from-red-700 hover:to-red-800 flex items-center gap-1 px-3 py-1 z-10",children:[s.jsx(jo,{className:"h-3 w-3"}),"BLACK FRIDAY"]}),B.popular&&!B.blackFriday&&s.jsx(ye,{className:"absolute -top-3 left-1/2 transform -translate-x-1/2 bg-[#d38280] text-white hover:bg-[#d38280] z-10",children:"Πιο ÎημοÏιλÎÏ"}),te(B.id),s.jsxs(xe,{className:"text-center",children:[s.jsx(le,{className:`w-12 h-12 mx-auto mb-4 ${B.popular?"text-primary":"text-muted-foreground"}`}),s.jsx(be,{className:"text-2xl",children:B.name}),(()=>{const Z=parseFloat(B.price.replace(",",".")),re=q(B.id,Z),de=re!==null;return B.blackFriday?s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-lg text-muted-foreground line-through",children:"â¬99"}),s.jsx("div",{className:"text-4xl font-bold text-primary",children:"â¬59"}),s.jsx("p",{className:"text-sm text-red-600 font-semibold",children:"ÎξοικονÏμηÏη â¬40!"}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["ÎÏνο για Ïην ÏÏÏÏη ÏÏÎÏÏη με Ïον κÏÎ´Î¹ÎºÏ ",s.jsx("strong",{children:"BLACK
721FRIDAY"})]})]}):s.jsxs("div",{className:"space-y-1",children:[de&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-lg text-muted-foreground line-through",children:["â¬",Z.toFixed(2)]}),s.jsxs("div",{className:"text-4xl font-bold text-green-600",children:["â¬",re.toFixed(2)]}),s.jsxs(ye,{className:"bg-green-100 text-green-800 border-green-300",children:["ÎξοικονÏμηÏη â¬",(Z-re).toFixed(2)]})]}),!de&&s.jsxs("div",{className:"text-3xl font-bold",children:["â¬",B.price]}),s.jsx(gt,{children:B.period}),B.savings&&!de&&s.jsx(ye,{className:"bg-[#f1cdcc] text-[#8b4513] border-[#ffccb8] hover:bg-[#f1cdcc]",children:B.savings})]})})()]}),s.jsxs(ce,{className:"space-y-4",children:[s.jsx("div",{className:"space-y-3",children:B.features.map((Z,re)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ar,{className:"w-4 h-4 text-green-500 flex-shrink-0"}),s.jsx("span",{className:"text-sm",children:Z})]},re))}),s.jsx(F,{className:`w-full ${B.popular?"bg-[#d38280] hover:bg-[#c17270] text-white":"border-[#d38280] text-[#d38280] hover:bg-[#d38280] hover:text-white"}`,variant:B.popular?"default":"outline",size:"lg",onClick:()=>H(B.id),disabled:r||J||A,children:K?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"animate-spin h-4 w-4 border-2 border-white border-t-transparent rounded-full"}),"ÎÏεξεÏγαÏία..."]}):A?"ÎÏεÏε ήδη Î ÏÏÏβαÏη":J?I?"ÎνεÏγή Îοκιμή":"ΤÏÎÏον Πλάνο":_?"ÎναβάθμιÏη / Îλλαγή ΠλάνοÏ
":S?"ÎεκινήÏÏε ÎÏÏεάν Îοκιμή":"ÎγγÏαÏείÏε ΤÏÏα"})]})]},B.id)})}),s.jsxs("div",{className:"text-center mt-12 space-y-4",children:[s.jsx("h3",{className:"text-xl font-semibold",children:"ÎιαÏί να ÎÏιλÎξεÏε Ïη ΣÏ
νδÏομή ÏÏο Well Be;"}),s.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-4 max-w-4xl mx-auto",children:[s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("div",{className:"w-12 h-12 bg-[#d38280]/10 rounded-full flex items-center justify-center mx-auto",children:s.jsx(ui,{className:"w-6 h-6 text-[#d38280]"})}),s.jsx("h4",{className:"font-medium",children:"Premium ΠεÏιεÏÏμενο"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Î ÏÏÏβαÏη Ïε αÏοκλειÏÏικά workouts και ÏεÏιεÏÏμενο"})]}),s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("div",{className:"w-12 h-12 bg-[#d38280]/10 rounded-full flex items-center justify-center mx-auto",children:s.jsx(om,{className:"w-6 h-6 text-[#d38280]"})}),s.jsx("h4",{className:"font-medium",children:"ΧÏÏÎ¯Ï ÎιαÏημίÏειÏ"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Non-stop εμÏειÏία ÏαÏακολοÏθηÏηÏ"})]}),s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("div",{className:"w-12 h-12 bg-[#d38280]/10 rounded-full flex items-center justify-center mx-auto",children:s.jsx(id,{className:"w-6 h-6 text-[#d38280]"})}),s.jsx("h4",{className:"font-medium",children:"Community"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"ΣÏ
νδεθείÏε με Ïα Ï
ÏÏλοιÏα μÎλη ÏÎ·Ï ÎºÎ¿Î¹Î½ÏÏηÏÎ±Ï ÎºÎ±Î¹ ÏάÏÏε μÎÏÎ¿Ï Ïε αÏοκλειÏÏικοÏÏ Î´Î¹Î±Î³ÏνιÏμοÏÏ"})]}),s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("div",{className:"w-12 h-12 bg-[#d38280]/10 rounded-full flex items-center justify-center mx-auto",children:s.jsx(Ar,{className:"w-6 h-6 text-[#d38280]"})}),s.jsx("h4",{className:"font-medium",children:"7ήμεÏη Îοκιμή"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"ÎοκιμάÏÏε Ïα ÏάνÏα δÏÏεάν για μια εβδομάδα"})]})]})]}),s.jsx("div",{className:"text-center mt-8 text-sm text-muted-foreground",children:s.jsx("p",{children:"ÎÎ»ÎµÏ Î¿Î¹ ÏÏ
νδÏομÎÏ ÏεÏιλαμβάνοÏ
ν δÏÏεάν δοκιμή 7 ημεÏÏν. Î ÏÏ
νδÏομή ανανεÏνεÏαι αÏ
ÏÏμαÏα και μÏοÏείÏε να Ïην ακÏ
ÏÏÏεÏε ανά ÏάÏα ÏÏιγμή."})})]}),s.jsx(Be,{})]})},d7=()=>{const[e,t]=h.useState(!1),[r,n]=h.useState(!1),[a,i]=h.useState(""),o="https://app.cardivo.com/giftcards/wellbe",{toast:l}=at(),{user:c}=jt(),d=async u=>
721{if(u.preventDefault(),!c){l({title:"ΣÏάλμα",description:"Î ÏÎÏει να ÏÏ
νδεθείÏε για να εξαÏγÏ
ÏÏÏεÏε μια κάÏÏα δÏÏοÏ
.",variant:"destructive"});return}if(!a.trim()){l({title:"ΣÏάλμα",description:"ΠαÏÎ±ÎºÎ±Î»Ï ÎµÎ¹ÏάγεÏε Ïον κÏÎ´Î¹ÎºÏ ÏÎ·Ï ÎºÎ¬ÏÏÎ±Ï Î´ÏÏοÏ
.",variant:"destructive"});return}n(!0);try{const{data:m,error:f}=await U.functions.invoke("redeem-gift-card",{body:{giftCardCode:a.trim()}});if(f){console.error("Gift card redemption error:",f),l({title:"ΣÏάλμα",description:"ÎÏοÏÏ
Ïία εξαÏγÏÏÏÏÎ·Ï ÎºÎ¬ÏÏÎ±Ï Î´ÏÏοÏ
. ΠαÏÎ±ÎºÎ±Î»Ï Î´Î¿ÎºÎ¹Î¼Î¬ÏÏε ξανά.",variant:"destructive"});return}l({title:"ÎÏιÏÏ
Ïία!",description:m.message||"ΠκάÏÏα δÏÏοÏ
εξαÏγÏ
ÏÏθηκε εÏιÏÏ
ÏÏÏ!"}),i("")}catch(m){console.error("Unexpected error:",m),l({title:"ΣÏάλμα",description:"ÎάÏι Ïήγε ÏÏÏαβά. ΠαÏÎ±ÎºÎ±Î»Ï Î´Î¿ÎºÎ¹Î¼Î¬ÏÏε ξανά.",variant:"destructive"})}finally{n(!1)}};return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"ÎάÏÏÎµÏ ÎÏÏοÏ
Well Be - ΧαÏίÏÏε Wellness",description:"ÎγοÏάÏÏε κάÏÏÎµÏ Î´ÏÏοÏ
Well Be και ÏαÏίÏÏε ÏÏοÏ
Ï Î±Î³Î±ÏημÎνοÏ
Ï ÏÎ±Ï ÏÏÏÏβαÏη Ïε workouts, διαλογιÏμοÏÏ ÎºÎ±Î¹ Ï
γιεινÎÏ ÏÏ
νÏαγÎÏ.",keywords:"gift card well be, κάÏÏα δÏÏοÏ
, δÏÏο wellness, fitness gift",canonical:"https://wellbe.gr/gift-cards"}),s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsxs("main",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-8 sm:py-12",children:[s.jsxs("div",{className:"text-center mb-8 sm:mb-12",children:[s.jsx("h1",{className:"text-2xl sm:text-3xl lg:text-4xl font-bold text-foreground mb-4",children:"ÎάÏÏÎµÏ ÎÏÏοÏ
Well Be"}),s.jsx("p",{className:"text-base sm:text-lg lg:text-xl text-muted-foreground max-w-2xl mx-auto px-4",children:"ÎείξÏε Ïην αγάÏη ÏÎ±Ï Î¼Îµ μια κάÏÏα δÏÏοÏ
αÏÏ Ïο Well Be!"})]}),s.jsxs("div",{className:"grid gap-8 lg:grid-cols-2",children:[s.jsxs(oe,{className:"overflow-hidden",children:[s.jsxs(xe,{children:[s.jsx(La,{className:"w-12 h-12 mx-auto mb-4 text-primary"}),s.jsx(be,{children:"ÎγοÏά ÎάÏÏÎ±Ï ÎÏÏοÏ
"}),s.jsx(gt,{children:"ΧαÏίÏÏε ÏÏοÏ
Ï Î±Î³Î±ÏημÎνοÏ
Ï ÏÎ±Ï Î¼Î¹Î± ÏÏ
νδÏομή Well Be"})]}),s.jsx(ce,{className:"p-0",children:s.jsxs("div",{className:"flex flex-col items-center justify-center h-96 p-8 text-center",children:[s.jsx(La,{className:"w-16 h-16 text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-4",children:"ÎάνÏε κλικ ÎµÎ´Ï Î³Î¹Î± Ïην αγοÏά ÏÎ·Ï ÎάÏÏÎ±Ï ÎÏÏοÏ
"}),s.jsx(F,{onClick:()=>window.open(o,"_blank"),size:"lg",children:"Îνοιγμα Ïε νÎα καÏÏÎλα"})]})})]}),s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(Ul,{className:"w-12 h-12 mx-auto mb-4 text-primary"}),s.jsx(be,{children:"ÎξαÏγÏÏÏÏη ÎάÏÏÎ±Ï ÎÏÏοÏ
"}),s.jsx(gt,{children:"ÎÏεÏε κάÏÏα δÏÏοÏ
; ÎξαÏγÏ
ÏÏÏÏε Ïην εδÏ"})]}),s.jsxs(ce,{children:[s.jsxs("form",{onSubmit:d,className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"redeemCode",children:"ÎÏδικÏÏ ÎάÏÏÎ±Ï ÎÏÏοÏ
*"}),s.jsx(ke,{id:"redeemCode",value:a,onChange:u=>i(u.target.value.toUpperCase()),placeholder:"XXXX-XXXX-XXXX",className:"mt-1 font-mono text-center text-lg tracking-wider",maxLength:12,required:!0}),s.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"ÎιÏάγεÏε Ïον κÏÎ´Î¹ÎºÏ Î±ÏÏ Ïην κάÏÏα δÏÏοÏ
ÏαÏ"})]}),s.jsxs(F,{type:"submit",disabled:r,className:"w-full h-12",children:[s.jsx(Ar,{className:"w-4 h-4 mr-2"}),r?"ÎξαÏγÏÏÏÏη...":"ÎξαÏγÏÏÏÏη ÎάÏÏαÏ"]})]}),s.jsxs("div",{className:"mt-8 p-4 bg-muted rounded-lg",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"ΠληÏοÏοÏÎ¯ÎµÏ ÎάÏÏÎ±Ï ÎÏÏοÏ
"}),s.jsxs("ul",{className:"text-sm text-muted-foreground space-y-1",children:[s.jsx("li",{children:"⢠Îι κάÏÏÎµÏ Î´ÏÏοÏ
ιÏÏÏοÏ
ν για 12 μήνεÏ"}),s.jsx("li",{children:"⢠ÎÏοÏοÏν να ÏÏηÏιμοÏοιηθοÏν για ÏÏ
νδÏομÎÏ Î® ÏίÏÏÏÏη"}),s.jsx("li",{children:"⢠Îεν εÏιÏÏÏÎÏονÏαι ÏÏήμαÏα για αÏÏηÏιμοÏοίηÏο Ï
ÏÏλοιÏο"}),s.jsx("li",{children:"⢠Îάθε κάÏÏα μÏοÏεί να ÏÏηÏιμοÏοιηθεί μÏνο μία ÏοÏά"})]})]})]})]})]}),s.jsxs(oe,{className:"mt-8 max-w-4xl mx-auto",children:[s.jsx(xe,{children:s.jsx(be,{className:"text-center",children:"Τι ΠεÏιλαμβάνει η ΣÏ
νδÏομή ÏÏο Well Be"})}),s.jsx(ce,{children:s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ar,{className:"w-4 h-4 text-green-600 flex-shrink-0"}),s.jsx("span",{className:"text-sm",children:"ÎÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Ïλα Ïα Workouts, ÎιαλογιÏμοÏÏ ÎºÎ±Î¹ Breathworks"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ar,{className:"w-4 h-4 text-green-600 flex-shrink-0"}),s.jsx("span",{className:"text-sm",children:"Î Ïοβολή ÏλÏν ÏÏν podcast ÏÏÏÎ¯Ï Î´Î¹Î±Ï
721ημίÏειÏ"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ar,{className:"w-4 h-4 text-green-600 flex-shrink-0"}),s.jsx("span",{className:"text-sm",children:"Î ÏÏÏβαÏη Ïε ÏÎ»ÎµÏ ÏÎ¹Ï Ï
γιεινÎÏ ÏÏ
νÏαγÎÏ ÏÎ·Ï ÎάνÏιαÏ"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ar,{className:"w-4 h-4 text-green-600 flex-shrink-0"}),s.jsx("span",{className:"text-sm",children:"ÎÏοκλειÏÏική ÏÏÏÏβαÏη ÏÏο Well Be community, ÏÏα Challenges και Ïε ÎιαγÏνιÏμοÏÏ"})]})]})})]})]}),s.jsx(Be,{})]})},u7=()=>{const[e,t]=h.useState(!1),[r]=Do(),n=qe(),a=r.get("code"),i=()=>{const l=document.createElement("canvas");l.width=800,l.height=500;const c=l.getContext("2d");if(c){const d=c.createLinearGradient(0,0,800,500);d.addColorStop(0,"#6366f1"),d.addColorStop(1,"#8b5cf6"),c.fillStyle=d,c.fillRect(0,0,800,500),c.fillStyle="white",c.font="bold 48px Arial",c.textAlign="center",c.fillText("Well Be Workouts",400,120),c.font="24px Arial",c.fillText("Gift Card",400,160),c.font="bold 36px monospace",c.fillText(a||"GIFT-CARD",400,280),c.font="18px Arial",c.fillText("Visit wellbeworkouts.gr/gift-cards to redeem",400,350),c.fillText("Valid for 12 months from purchase date",400,380);const u=document.createElement("a");u.download=`wellbe-gift-card-${a}.png`,u.href=l.toDataURL(),u.click()}},o=async()=>{if(navigator.share)try{await navigator.share({title:"Well Be Workouts Gift Card",text:`Îλαβα μια κάÏÏα δÏÏοÏ
Well Be Workouts! ÎÏδικÏÏ: ${a}`,url:window.location.origin+"/gift-cards"})}catch(l){console.log("Error sharing:",l)}else navigator.clipboard.writeText(`ÎάÏÏα ÎÏÏοÏ
Well Be Workouts - ÎÏδικÏÏ: ${a}`)};return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsx("main",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-8 sm:py-12",children:s.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[s.jsxs("div",{className:"mb-8",children:[s.jsx(ta,{className:"w-16 h-16 text-green-600 mx-auto mb-4"}),s.jsx("h1",{className:"text-2xl sm:text-3xl lg:text-4xl font-bold text-foreground mb-4",children:"ÎÏιÏÏ
ÏÎ®Ï ÎγοÏά!"}),s.jsx("p",{className:"text-base sm:text-lg text-muted-foreground",children:"ΠκάÏÏα δÏÏοÏ
ÏÎ±Ï Î´Î·Î¼Î¹Î¿Ï
Ïγήθηκε εÏιÏÏ
ÏÏÏ"})]}),s.jsxs(oe,{className:"mb-8",children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center justify-center gap-2",children:[s.jsx(La,{className:"w-6 h-6"}),"Î ÎάÏÏα ÎÏÏοÏ
ΣαÏ"]})}),s.jsxs(ce,{className:"space-y-6",children:[a&&s.jsxs("div",{className:"p-6 bg-gradient-to-r from-primary to-primary/80 rounded-lg text-white",children:[s.jsx("div",{className:"text-lg font-semibold mb-2",children:"Well Be Workouts"}),s.jsx("div",{className:"text-3xl font-mono font-bold tracking-wider",children:a}),s.jsx("div",{className:"text-sm mt-2 opacity-90",children:"ÎÏÏÏει για 12 μήνεÏ"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsxs(F,{onClick:i,variant:"outline",className:"h-12",children:[s.jsx(vi,{className:"w-4 h-4 mr-2"}),"ÎαÏÎβαÏμα ÎάÏÏαÏ"]}),s.jsxs(F,{onClick:o,variant:"outline",className:"h-12",children:[s.jsx(K5,{className:"w-4 h-4 mr-2"}),"ÎοινοÏοίηÏη"]})]}),s.jsxs("div",{className:"text-left p-4 bg-muted/50 rounded-lg",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"ÎÏÏμενα ÎήμαÏα:"}),s.jsxs("ol",{className:"text-sm space-y-1 list-decimal list-inside",children:[s.jsx("li",{children:"ΣÏείλÏε Ïον κÏÎ´Î¹ÎºÏ ÏÏον ÏαÏαλήÏÏη"}),s.jsx("li",{children:"Î ÏαÏαλήÏÏÎ·Ï Î¼ÏοÏεί να εξαÏγÏ
ÏÏÏει Ïην κάÏÏα ÏÏη Ïελίδα κάÏÏÎ±Ï Î´ÏÏοÏ
"}),s.jsx("li",{children:"Îα λάβεÏε email εÏιβεβαίÏÏÎ·Ï Î¼Îµ Ïα ÏÏοιÏεία"})]})]})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(F,{onClick:()=>n("/gift-cards"),className:"w-full sm:w-auto",children:"ÎγοÏά ÎÎ»Î»Î·Ï ÎάÏÏÎ±Ï ÎÏÏÎ
721¿Ï
"}),s.jsx("div",{className:"block",children:s.jsx(F,{onClick:()=>n("/"),variant:"outline",className:"w-full sm:w-auto",children:"ÎÏιÏÏÏοÏή ÏÏην ÎÏÏική"})})]})]})}),s.jsx(Be,{})]})},m7=()=>{const[e,t]=h.useState(!1);return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"ΠολιÏική ÎÏοÏÏήÏοÏ
- Well Be",description:"ΠολιÏική ÏÏοÏÏαÏÎ¯Î±Ï ÏÏοÏÏÏικÏν δεδομÎνÏν ÏοÏ
Well Be. ÎιαβάÏÏε ÏÏÏ ÏÏοÏÏαÏεÏοÏ
με και ÏÏηÏιμοÏοιοÏμε Ïα δεδομÎνα ÏαÏ.",keywords:"privacy policy, ÏολιÏική αÏοÏÏήÏοÏ
, ÏÏοÏÏÏικά δεδομÎνα, GDPR",canonical:"https://wellbe.gr/privacy-policy"}),s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsx("main",{className:"container mx-auto px-3 xs:px-4 sm:px-6 lg:px-8 py-8 xs:py-12 pt-16 sm:pt-20 md:pt-24",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("h1",{className:"text-2xl xs:text-3xl sm:text-4xl lg:text-5xl font-bold text-foreground mb-6 xs:mb-8",children:"ΠολιÏική ÎÏοÏÏήÏοÏ
"}),s.jsx("div",{className:"prose prose-sm xs:prose-base lg:prose-lg max-w-none text-foreground",children:s.jsxs("div",{className:"bg-card p-4 xs:p-6 sm:p-8 rounded-lg border border-border space-y-4 xs:space-y-6",children:[s.jsxs("div",{className:"space-y-3 xs:space-y-4",children:[s.jsx("p",{className:"text-foreground leading-relaxed text-sm xs:text-base",children:"ΣÏο Well Be by Nadia Boule ÏεβÏμαÏÏε Ïα ÏÏοÏÏÏικά δεδομÎνα ÏÏν εÏιÏκεÏÏÏν ÏÎ·Ï Î¹ÏÏοÏÎµÎ»Î¯Î´Î±Ï www.wellbe.gr"}),s.jsx("p",{className:"text-foreground leading-relaxed text-sm xs:text-base",children:"Το Well Be by Nadia Boule ÏÏ
λλÎγει και ÏηÏεί αÏοκλειÏÏικά και μÏνο Ïα ÏÏοÏÏÏικά δεδομÎνα ÏοÏ
εÏÎµÎ¯Ï ÏÎ·Ï Î³Î½ÏÏÏοÏοιείÏε ειÏάγονÏÎ±Ï ÏÎ¹Ï Î±ÏαιÏοÏÎ¼ÎµÎ½ÎµÏ ÏÏοÏÏÏικÎÏ ÏληÏοÏοÏÎ¯ÎµÏ ÏÏα ανÏίÏÏοιÏα Ïεδία ή/και ÏÏν αÏανÏήÏεÏν ÏÎ±Ï ÏÏο ÏλαίÏιο ÏÏ
γκεκÏιμÎνÏν ενεÏγειÏν ÏοÏ
διεξάγει Ïο Well Be by Nadia Boule και οικειοθελÏÏ Î´ÏναÏθε να ÏÏ
μμεÏÎÏεÏε και είναι Ïα ελάÏιÏÏα αÏαÏαίÏηÏα για ÏÏÏÏή λειÏοÏ
Ïγία ÏηÏ."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:'ΣÏα ÏλαίÏια ÏÎ·Ï Ï
ÏοÏÏÎÏÏÎ·Ï Î´Î¹Î±ÏÏÎ»Î±Î¾Î·Ï ÎºÎ±Î¹ ÏÏοÏÏαÏÎ¯Î±Ï ÏÏν ÏληÏοÏοÏιÏν ÏÏν ÏελαÏÏν ÏηÏ, Ïο Well Be by Nadia Boule δεÏμεÏεÏαι να ÏÏοÏÏαÏεÏει και να ÏÏηÏιμοÏοιεί καÏά Ïον αÏμÏζονÏα ÏÏÏÏο ÏÎ¹Ï ÏÏοÏÏÏικÎÏ ÏληÏοÏοÏÎ¯ÎµÏ (εÏÎµÎ¾Î®Ï "ÏÏοÏÏÏικά δεδομÎνα") ÏοÏ
ÏÏ
λλÎγονÏαι είÏε διαδικÏÏ
ακά αÏÏ Ïον ÏαÏÏνÏα δικÏÏ
Î±ÎºÏ ÏÏÏο είÏε μÎÏÏ ÏÎ·Ï ÎµÏικοινÏνίαÏ/ÏÏ
νεÏγαÏÎ¯Î±Ï Î¼Îµ κάθε ÏÏίÏο.'}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ΣÏο ÏλαίÏιο ÏÎ·Ï Î´Î¹Î±Î´Î¹ÎºÎ±ÏÎ¯Î±Ï ÎµÎ³Î³ÏαÏήÏ, ÏÏ
λλÎγοÏ
με και εÏεξεÏγαζÏμαÏÏε Ïα ÏαÏακάÏÏ ÏÏοιÏεία:"})]}),s.jsxs("div",{className:"space-y-4 xs:space-y-6",children:[s.jsxs("section",{children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground mb-3 xs:mb-4",children:"1. ΣÏ
λλογή και ÏκοÏοί ÏÏήÏÎ·Ï ÏÏν ÏÏοÏÏÏικÏν δεδομÎνÏν"}),s.jsxs("div",{className:"space-y-3 xs:space-y-4 text-foreground leading-relaxed text-sm xs:text-base",children:[s.jsx("p",{children:"ΠλήÏη ÏÏν ÏÏοÏÏÏικÏν δεδομÎνÏν γίνεÏαι μÏνο εÏÏÏον εÏÎµÎ¯Ï ÎµÏιλÎξεÏε αÏ
ÏοβοÏλÏÏ Î½Î± Ïα ÏαÏÎÏεÏε - για ÏαÏάδειγμα, εάν εÏικοινÏνήÏεÏε με email ή αν εγγÏαÏείÏε ÏÏ ÏελάÏÎµÏ ÏÏν ÏÏοÏÏνÏÏν και Ï
ÏηÏεÏιÏν ÏοÏ
Well Be by Nadia Boule."}),s.jsx("p",{children:"Î ÏÏήÏη ÏÏν ÏÏοÏÏνÏÏν και Ï
ÏηÏεÏιÏν ÏοÏ
ÏαÏÎÏονÏαι αÏÏ Ïο www.wellbe.gr ÏÏ
μÏεÏιλαμβανομÎÎ½Î·Ï ÎºÎ±Î¹ ÏÎ·Ï ÏαÏοÏÎ®Ï Ï
ÏηÏεÏιÏν online ÏαÏαγγελιÏν ÏÏν ÏÏοÏÏνÏÏν ÏοÏ
Well Be by Nadia Boule ÏÏοÏÏοθÎÏει Ïη διαÏÏάλιÏη ÏÎ·Ï Î´Ï
ναÏÏÏηÏÎ¬Ï ÎµÏικοινÏÎ½Î¯Î±Ï Î¼Î±Î¶Î¯ ÏαÏ. ÎαÏά ÏÏ
νÎÏεια, είναι αÏαÏαίÏηÏο καÏά Ïην εγγÏαÏή ÏÎ±Ï ÏÏο διαδικÏÏ
Î±ÎºÏ ÏÏÏο www.wellbe.gr να δηλÏÏεÏε Ïα αληθή ÏÏοÏÏÏικά δεδομÎÎ
721½Î± ÏοÏ
θα ÏÎ±Ï Î¶Î·ÏηθοÏν, ÏÏÏÏ ÏÏοÏδιοÏίζονÏαι ανÏÏÎÏÏ."}),s.jsx("p",{children:"Îε Ïην εγγÏαÏή ÏÎ±Ï ÏÏÎ¹Ï Ï
ÏηÏεÏÎ¯ÎµÏ ÏοÏ
ÏαÏÎÏονÏαι αÏÏ Ïο www.wellbe.gr ÏÏ
ναινείÏε εÏίÏÎ·Ï ÏÏην αÏοθήκεÏ
Ïη και ÏÏήÏη ÏÏν ÏÏοÏÏÏικÏν δεδομÎνÏν ÏαÏ, ÏÏμÏÏνα με Ïην ÏαÏοÏÏα ÎήλÏÏη. ÎÏιÏÏÎÏεÏαι να εÏεξεÏγαζÏμαÏÏε Ïα ÏÏοÏÏÏικά ÏÎ±Ï Î´ÎµÎ´Î¿Î¼Îνα, ÏÏοκειμÎνοÏ
να ÏαÏÎÏοÏ
με ÏÏοÏÏÏοÏοιημÎÎ½ÎµÏ Ï
ÏηÏεÏίεÏ, βάÏει ÏοÏ
νÏμοÏ
(άÏθÏο 6(1β) ÏοÏ
ÎανονιÏÎ¼Î¿Ï (ÎÎ) 2016/679). Τα ÏÏοÏÏÏικά ÏÎ±Ï Î´ÎµÎ´Î¿Î¼Îνα δεν ÏÏηÏιμοÏοιοÏνÏαι για άλλοÏ
Ï ÏκοÏοÏÏ, Ïλην ÏÏν ÏÏÏν ÏεÏιγÏάÏονÏαι ÏÏη ÎήλÏÏη, εκÏÏÏ Î±Î½ λάβοÏ
με Ïην ÏÏοηγοÏμενη άδειά ÏαÏ, ή εκÏÏÏ Î±Î½ κάÏι ÏÎÏοιο αÏαιÏείÏαι ή εÏιÏÏÎÏεÏαι αÏÏ Ïο νÏμο."}),s.jsx("p",{children:"ΣκοÏÏÏ ÏÎ·Ï ÏÏ
λλογήÏ, ÏÏήÏÎ·Ï ÎºÎ±Î¹ εÏεξεÏγαÏÎ¯Î±Ï ÏÏν ÏÏοÏÏÏικÏν ÏÎ±Ï Î´ÎµÎ´Î¿Î¼ÎνÏν , αÏοÏελεί (α) η ÏαÏοÏή ÏÏν Ï
ÏηÏεÏιÏν και ÏÏν ÏÏοÏÏνÏÏν ÏοÏ
αιÏείÏÏε μÎÏÏ ÏοÏ
website, για Ïην λήÏη ÏÏν οÏοίÏν αÏαιÏείÏαι η ÏÏήÏη ή/ και η εÏεξεÏγαÏία ÏοÏ
Ï Ï.Ï. online ÏαÏÎ±Î³Î³ÎµÎ»Î¯ÎµÏ ÎºÎ±Î¹ η ÏÏ
νακÏλοÏ
θη Ï
λοÏοίηÏη ÏÏν ÏÏ
μβαÏικÏν Ï
ÏοÏÏεÏÏεÏν, ÏÏα ÏλαίÏια εκÏÎλεÏηÏ, ÏαÏάδοÏÎ·Ï ÎºÎ±Î¹ ÏιμολÏγηÏÎ·Ï ÏαÏαγγελιÏν Ï
ÏÏ ÏÎ¹Ï Î²ÎλÏιÏÏÎµÏ ÏÏ
Î½Î¸Î®ÎºÎµÏ ÎºÎ±Î¹ με Ïον αÏοÏελεÏμαÏικÏÏεÏο ÏÏÏÏο, (β) η ÏÏοÏθηÏη ÏÏν ÏÏοÏÏνÏÏν και ÏÏν Ï
ÏηÏεÏιÏν ÏοÏ
ÏαÏÎÏονÏαι αÏÏ Ïο Well Be by Nadia Boule ιδιαίÏεÏα μÎÏÏ ÏοÏ
www.wellbe.gr, (γ) η ÏαÏοÏή εξαÏομικεÏ
μÎνÏν Ï
ÏηÏεÏιÏν και η διεÏ
κÏλÏ
νÏη ÏÎ·Ï Î´Î¹Î±Î´Î¹ÎºÎ±ÏÎ¯Î±Ï ÏαÏαγγελίαÏ, με ÏκοÏÏ Ïην εÏ
κολία ÏοÏ
ÏÏήÏÏη και / ή η διαÏÏάλιÏη ÏÏι Ïο ÏεÏιεÏÏμενο ÏοÏ
δικÏÏ
Î±ÎºÎ¿Ï ÏÏÏοÏ
ÏαÏοÏ
ÏιάζεÏαι με Ïον Ïιο αÏοδοÏÎ¹ÎºÏ ÏÏÏÏο για εÏÎ¬Ï ÎºÎ±Î¹ Ïον Ï
ÏολογιÏÏή ÏαÏ."}),s.jsx("p",{children:"To Well Be by Nadia Boule μÏοÏεί να ζηÏήÏει αÏÏ ÎµÏÎ¬Ï Î½Î± ÏÎ·Ï ÏαÏÎÏεÏε οÏιÏμÎνα ÏÏοÏÏÏικά δεδομÎνα για Ïην αÏοÏÏολή ενημεÏÏÏικÏν μηνÏ
μάÏÏν ÏÏεÏικά με Ïα ÏÏοÏÏνÏα και ÏÎ¹Ï Ï
ÏηÏεÏÎ¯ÎµÏ Î®/και ÏÏεÏικÏν ÏÏοÏÏοÏÏν και ανακοινÏÏεÏν. To Well Be by Nadia Boule μÏοÏεί εÏίÏÎ·Ï Î½Î± ζηÏά Ïην άδειά ÏÎ±Ï Î³Î¹Î± οÏιÏμÎÎ½ÎµÏ ÏÏήÏÎµÎ¹Ï ÏÏν ÏÏοÏÏÏικÏν ÏÎ±Ï Î´ÎµÎ´Î¿Î¼ÎνÏν και μÏοÏείÏε είÏε να ÏÏ
ναινÎÏεÏε ή να αÏνηθείÏε αÏ
ÏÎÏ ÏÎ¹Ï ÏÏήÏειÏ. Îάν εÏιθÏ
μείÏε ÏÏ
γκεκÏιμÎÎ½ÎµÏ Ï
ÏηÏεÏÎ¯ÎµÏ Î® εÏικοινÏνίεÏ, ÏÏÏÏ Îνα ηλεκÏÏÎ¿Î½Î¹ÎºÏ ÎµÎ½Î·Î¼ÎµÏÏÏÎ¹ÎºÏ ÏÏ
λλάδιο (newsletter), θα ÎÏεÏε Ïη δÏ
ναÏÏÏηÏα να διαγÏαÏείÏε αÏÏ Ïον ÏÏεÏÎ¹ÎºÏ ÎºÎ±Ïάλογο ÏαÏαληÏÏÏν οÏοÏεδήÏοÏε ακολοÏ
θÏνÏÎ±Ï ÏÎ¹Ï Î¿Î´Î·Î³Î¯ÎµÏ ÏοÏ
ÏεÏιÎÏονÏαι Ïε κάθε εÏικοινÏνία. Îάν αÏοÏαÏίÏεÏε να διαγÏαÏείÏε αÏÏ ÎºÎ¬Ïοια Ï
ÏηÏεÏία ή εÏικοινÏνία, θα ÏÏοÏÏαθήÏοÏ
με να διαγÏάÏοÏ
με Ïα δεδομÎνα ÏÎ±Ï Ïο ÏÏ
νÏομÏÏεÏο δÏ
ναÏÏ, ÏαÏÏλο ÏοÏ
μÏοÏεί να ÏÏειαÏÏοÏμε οÏιÏμÎνο ÏÏÏνο ή/και ÏληÏοÏοÏÎ¯ÎµÏ ÏÏιν μÏοÏÎÏοÏ
με να εÏεξεÏγαÏÏοÏμε Ïο αίÏημά ÏαÏ."})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground mb-3 xs:mb-4",children:"2. Î ÏÏÏβαÏη ÏÏα ÏÏοÏÏÏικά δεδομÎÎ
721½Î± και ÎικαιÏμαÏα"}),s.jsxs("div",{className:"space-y-3 xs:space-y-4 text-foreground leading-relaxed text-sm xs:text-base",children:[s.jsx("p",{children:"Îάν Ïο εÏιθÏ
μείÏε, ÎÏεÏε Ïη δÏ
ναÏÏÏηÏα να αιÏηθείÏε οÏοÏεδήÏοÏε να ενημεÏÏθείÏε ÏÏεÏικά με Ïα ÏÏοÏÏÏικά ÏÎ±Ï Î´ÎµÎ´Î¿Î¼Îνα ÏοÏ
ÏηÏοÏνÏαι αÏÏ Ïο Well Be by Nadia Boule, ÏοÏ
Ï Î±ÏοδÎκÏÎµÏ ÏοÏ
Ï, Ïο ÏκοÏÏ ÏÎ·Ï ÏήÏηÏÎ·Ï ÎºÎ±Î¹ ÏÎ·Ï ÎµÏεξεÏγαÏÎ¯Î±Ï ÏοÏ
Ï ÎºÎ±Î¸ÏÏ ÎºÎ±Î¹ Ïην ÏÏοÏοÏοίηÏη, διÏÏθÏÏη ή Ïη διαγÏαÏή ÏοÏ
Ï, αÏοÏÏÎλλονÏÎ±Ï ÏÏεÏÎ¹ÎºÏ Î·Î»ÎµÎºÏÏÎ¿Î½Î¹ÎºÏ Î¼Î®Î½Ï
μα ÏÏην διεÏθÏ
νÏη [email protected] αÏÏ Ïην ηλεκÏÏονική διεÏθÏ
νÏη εÏικοινÏÎ½Î¯Î±Ï Ïην οÏοία ÎÏεÏε δηλÏÏει, εÏιÏÏ
νάÏÏονÏÎ±Ï Î±Î½ÏίγÏαÏο ÏÎ·Ï Î±ÏÏÏ
Î½Î¿Î¼Î¹ÎºÎ®Ï ÏÎ±Ï ÏαÏ
ÏÏÏηÏαÏ. ÎÏίÏηÏ, ÎÏεÏε Ïο δικαίÏμα να αναθεÏÏήÏεÏε Ïα ÏÏοÏÏÏικά δεδομÎνα ÏοÏ
ÏηÏοÏμε και γενικά να αÏκήÏεÏε κάθε δικαίÏμα ÏοÏ
ÏÏοβλÎÏεÏαι αÏÏ Ïη νομοθεÏία για Ïην ÏÏοÏÏαÏία δεδομÎνÏν ÏÏοÏÏÏÎ¹ÎºÎ¿Ï ÏαÏακÏήÏα."}),s.jsx("p",{children:"Tα ÏÏοÏÏÏικά δεδομÎνα ÏοÏ
γνÏÏÏοÏοιείÏε ÏÏο Well Be by Nadia Boule μÎÏÏ ÏοÏ
www.wellbe.gr, είÏε καÏά Ïην εγγÏαÏή ÏÎ±Ï ÎµÎ¯Ïε και Ïε μεÏαγενÎÏÏεÏο ÏÏάδιο, ÏÏ
λλÎγονÏαι και ÏÏ
γÏάνοÏ
ν ÏÏήÏÎ·Ï ÎºÎ±Î¹ εÏεξεÏγαÏÎ¯Î±Ï ÏÏμÏÏνα με ÏÎ¹Ï ÎµÎºÎ¬ÏÏοÏε ιÏÏÏοÏ
ÏÎµÏ Î´Î¹Î±ÏÎ¬Î¾ÎµÎ¹Ï ÏεÏί ÏÏοÏÏαÏÎ¯Î±Ï Î´ÎµÎ´Î¿Î¼ÎνÏν ÏÏοÏÏÏÎ¹ÎºÎ¿Ï ÏαÏακÏήÏα. και ÏÏ
γκεκÏιμÎνα, ÏÏμÏÏνα με Ïην ÏÎ¹Ï Î´Î¹Î±ÏÎ¬Î¾ÎµÎ¹Ï ÏοÏ
Î. 2472/1997 και ÏοÏ
Î. 3471/2006, ÏÏ Î¹ÏÏÏοÏ
ν αλλά και ÏοÏ
νÎοÏ
ÎÏ
ÏÏÏαÏÎºÎ¿Ï ÎÎµÎ½Î¹ÎºÎ¿Ï ÎανονιÏÎ¼Î¿Ï Î ÏοÏÏαÏÎ¯Î±Ï ÎεδομÎνÏν (ÎÎ) 2016/679 καθÏÏ ÎºÎ±Î¹ ÏÎ·Ï Î¿Î´Î·Î³Î¯Î±Ï 95/46/ÎÎ, ÏεÏί ÏÏοÏÏαÏÎ¯Î±Ï ÏÏοÏÏÏικÏν δεδομÎνÏν."}),s.jsx("p",{className:"font-medium text-sm xs:text-base",children:"ÎιαÏηÏείÏε Ïα ÎµÎ¾Î®Ï Î´Î¹ÎºÎ±Î¹ÏμαÏα αναλÏ
Ïικά:"}),s.jsxs("div",{className:"pl-3 xs:pl-4 space-y-2 xs:space-y-3 text-sm xs:text-base",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"ÎικαίÏμα ενημÎÏÏÏÎ·Ï ÏÏεÏικά με Ïα ÏÏοÏÏÏικά δεδομÎνα ÏαÏ."})," ÎεÏά αÏÏ ÏÏεÏÎ¹ÎºÏ Î±Î¯Ïημά ÏαÏ, θα ÏÎ±Ï ÏαÏÎÏοÏ
με ÏληÏοÏοÏÎ¯ÎµÏ ÏÏεÏικά με Ïα ÏÏοÏÏÏικά δεδομÎνα ÏοÏ
ÎÏοÏ
με για εÏάÏ."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"ÎικαίÏμα διÏÏθÏÏÎ·Ï ÎºÎ±Î¹ ÏÏ
μÏλήÏÏÏÎ·Ï ÏÏν ÏÏοÏÏÏικÏν δεδομÎνÏν ÏαÏ:"})," ΣÏην ÏεÏίÏÏÏÏη ÏοÏ
Î¼Î±Ï ÎµÎ¹Î´Î¿ÏοιήÏεÏε ÏÏεÏικά, θα διοÏθÏÏοÏ
με ÏÏ
ÏÏν ανακÏιβή ÏÏοÏÏÏικά δεδομÎνα ÏοÏ
ÏÎ±Ï Î±ÏοÏοÏν. Îα ÏÏ
μÏληÏÏÏοÏ
με αÏελή δεδομÎνα εÏÏÏον Î¼Î±Ï ÎµÎ¹Î´Î¿ÏοιήÏεÏε ÏÏεÏικά, Ï
ÏÏ Ïην ÏÏοÏÏÏθεÏη ÏÏι Ïα δεδομÎνα αÏ
Ïά είναι αναγκαία για ÏοÏ
Ï ÏκοÏοÏÏ ÎµÏεξεÏγαÏÎ¯Î±Ï ÏÏν δεδομÎνÏν ÏαÏ."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"ÎικαίÏμα για διαγÏαÏή ÏÏν ÏÏοÏÏÏικÏν δεδομÎνÏν ÏαÏ:"})," ÎεÏά αÏÏ ÏÏεÏÎ¹ÎºÏ Î±Î¯Ïημά ÏαÏ, θα διαγÏάÏοÏ
με Ïα ÏÏοÏÏÏικά δεδομÎνα ÏοÏ
ÏηÏοÏμε για εÏάÏ. ΩÏÏÏÏο, οÏιÏμÎνα δεδομÎνα θα διαγÏάÏονÏαι μÏνο μεÏά αÏÏ Î¼Î¹Î± καθοÏιÏμÎνη ÏεÏίοδο διακÏάÏηÏηÏ, για ÏαÏάδειγμα εÏειδή Ïε οÏιÏμÎÎ½ÎµÏ ÏεÏιÏÏÏÏÎµÎ¹Ï Ï
ÏοÏÏεοÏμαÏÏε εκ ÏοÏ
νÏμοÏ
να διαÏηÏοÏμε Ïα δεδομÎÎ
721½Î±, ή εÏειδή Ïα δεδομÎνα αÏαιÏοÏνÏαι για Ïην εκÏλήÏÏÏη ÏÏν ÏÏ
μβαÏικÏν Î¼Î±Ï Ï
ÏοÏÏεÏÏεÏν αÏÎνανÏι Ïε εÏάÏ."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"ÎικαίÏμα δÎÏμεÏ
ÏÎ·Ï ÏÏν ÏÏοÏÏÏικÏν δεδομÎνÏν ÏαÏ:"})," Σε οÏιÏμÎÎ½ÎµÏ ÏεÏιÏÏÏÏÎµÎ¹Ï ÏοÏ
ÏÏοβλÎÏονÏαι αÏÏ Ïο νÏμο, θα δεÏμεÏÏοÏ
με Ïα δεδομÎνα ÏαÏ, εάν Î¼Î±Ï Ïο ζηÏήÏεÏε. ΠεÏαιÏÎÏÏ ÎµÏεξεÏγαÏία δεÏμεÏ
μÎνÏν δεδομÎνÏν γίνεÏαι μÏνο Ïε ÏÎ¿Î»Ï ÏεÏιοÏιÏμÎνη ÎκÏαÏη."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"ÎικαίÏμα ανάκληÏÎ·Ï ÏÎ·Ï ÏÏ
γκαÏάθεÏÎ®Ï ÏαÏ:"})," ÎÏεÏε Ïη δÏ
ναÏÏÏηÏα ανά ÏάÏα ÏÏιγμή να ανακαλÎÏεÏε Ïη ÏÏ
γκαÏάθεÏή ÏÎ±Ï Î³Î¹Î± Ïην εÏεξεÏγαÏία ÏÏν ÏÏοÏÏÏικÏν δεδομÎνÏν ÏÎ±Ï ÏÏο μÎλλον. ΠνομιμÏÏηÏα ÏÎ·Ï ÎµÏεξεÏγαÏÎ¯Î±Ï ÏÏν δεδομÎνÏν ÏÎ±Ï ÏαÏαμÎνει ανεÏηÏÎαÏÏη αÏÏ Ïην ενÎÏγεια αÏ
Ïή, ÎÏÏ Ïο Ïημείο ανάκληÏÎ·Ï ÏÎ·Ï ÏÏ
γκαÏάθεÏÎ®Ï ÏαÏ."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"ÎικαίÏμά ÏÎ±Ï Î³Î¹Î± ÏÏοβολή ανÏιÏÏήÏεÏν καÏά ÏÎ·Ï ÎµÏεξεÏγαÏÎ¯Î±Ï ÏÏν δεδομÎνÏν ÏαÏ:"})," ÎÏοÏείÏε ανά ÏάÏα ÏÏιγμή να ÏÏοβάλεÏε ανÏιÏÏήÏÎµÎ¹Ï ÎºÎ±Ïά ÏÎ·Ï ÎµÏεξεÏγαÏÎ¯Î±Ï ÏÏν ÏÏοÏÏÏικÏν δεδομÎνÏν ÏÎ±Ï ÏÏο μÎλλον, εάν εÏεξεÏγαζÏμαÏÏε Ïα δεδομÎνα ÏÎ±Ï ÏÏη βάÏη Î¼Î¯Î±Ï ÎµÎº ÏÏν νομικÏν αιÏιολογήÏεÏν ÏοÏ
ÏÏοβλÎÏονÏαι ÏÏο άÏθÏο 6 (1ε ή 1ÏÏ) ÏοÏ
ÎανονιÏÎ¼Î¿Ï (ÎÎ) 2016/679. Îάν ÏÏοβάλεÏε ανÏιÏÏήÏειÏ, θα ÏÏαμαÏήÏοÏ
με Ïην εÏεξεÏγαÏία ÏÏν δεδομÎνÏν ÏαÏ, Ï
ÏÏ Ïην ÏÏοÏÏÏθεÏη ÏÏι δεν ÏÏ
νÏÏÎÏοÏ
ν νÏμιμοι λÏγοι για ÏεÏαιÏÎÏÏ ÎµÏεξεÏγαÏία ÏοÏ
Ï. ΠεÏεξεÏγαÏία ÏÏν δεδομÎνÏν ÏÎ±Ï Î³Î¹Î± ÏκοÏοÏÏ Î´Î¹Î±ÏήμιÏÎ·Ï Î´ÎµÎ½ ÏÏ
νιÏÏά νÏμιμο λÏγο."]})]})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground mb-3 xs:mb-4",children:"3. ÎιαβίβαÏη Î ÏοÏÏÏικÏν ÎεδομÎνÏν"}),s.jsxs("div",{className:"space-y-3 xs:space-y-4 text-foreground leading-relaxed text-sm xs:text-base",children:[s.jsx("p",{children:"To Well Be by Nadia Boule δεν μοιÏάζεÏαι οÏÏε διαβιβάζει ÏÏοÏÏÏικά δεδομÎνα με ÏÏίÏοÏ
Ï, εκÏÏÏ Î±Î½ κάÏι ÏÎÏοιο αÏαιÏείÏαι για ÏοÏ
Ï Î½ÏμιμοÏ
Ï ÎµÏαγγελμαÏικοÏÏ ÏκοÏοÏÏ ÎºÎ±Î¹ ÏÎ¹Ï ÎµÏιÏειÏημαÏικÎÏ Î±Î½Î¬Î³ÎºÎµÏ, ÏÏοκειμÎνοÏ
να ανÏαÏοκÏιθεί ÏÏα αιÏήμαÏά ÏÎ±Ï Î®/και εÏÏÏον εÏιβάλλεÏαι ή εÏιÏÏÎÏεÏαι αÏÏ Ïο νÏμο. Σε κάθε ÏεÏίÏÏÏÏη, η ÏÏÏÏβαÏη ÏÏα ÏÏοÏÏÏικά ÏÎ±Ï Î´ÎµÎ´Î¿Î¼Îνα εÏιÏÏÎÏεÏαι μÏνο Ïε εξοÏ
ÏιοδοÏημÎνα ÏÏÏÏÏÏα Ïα οÏοία αÏαιÏείÏαι να ÎÏοÏ
ν ÏÏÏÏβαÏη ÏÏοκειμÎνοÏ
να είναι δÏ
ναÏή η ολοκλήÏÏÏη ÏÏν ÏκοÏÏν ÏÎ·Ï ÏÏ
λλογήÏ, ÏÏήÏÎ·Ï ÎºÎ±Î¹ εÏεξεÏγαÏÎ¯Î±Ï ÏοÏ
Ï, ÏÏÏÏ Î±Ï
Ïή γνÏÏÏοÏοιείÏαι με Ïην ÏαÏοÏÏα ÎήλÏÏη."}),s.jsx("p",{children:"Σε οÏιÏμÎÎ½ÎµÏ ÏεÏιÏÏÏÏειÏ, Ïο Well Be by Nadia Boule ενδÎÏεÏαι να μοιÏαÏÏεί Ïα ÏÏοÏÏÏικά ÏÎ±Ï Î´ÎµÎ´Î¿Î¼Îνα με διάÏοÏÎµÏ ÎµÏαιÏÎ¯ÎµÏ Î® ÏαÏÏÏοÏ
Ï Ï
ÏηÏεÏιÏν ÏοÏ
ÏÏ
νεÏγάζονÏαι μαζί ÏηÏ, ÏÏοκειμÎνοÏ
να ανÏαÏεξÎλθει ÏÏα αιÏήμαÏά ÏÎ±Ï Î® Ïε ÏÏ
Ïικά ή νομικά ÏÏÏÏÏÏα ÏÏα οÏοία ÎÏει αναÏεθεί η εκÏÎλεÏη ÏÎ·Ï ÎµÏεξεÏγαÏίαÏ, Ï
ÏÏ Ïην ÏÏοÏÏÏθεÏη Ï
721Ïι θα ÏÎ±Ï ÎµÎ½Î·Î¼ÎµÏÏÏοÏ
με εκ ÏÏν ÏÏοÏÎÏÏν και θα λάβοÏ
με Ïην ÏÏοηγοÏμενη ÏÏ
ναίνεÏή ÏαÏ. Τα άÏομα ÏοÏ
ÎÏοÏ
ν ÏÏÏÏβαÏη ÏÏα δεδομÎνα είναι Ï
ÏοÏÏεÏμÎνα να ÏηÏοÏν Ïην εμÏιÏÏεÏ
ÏικÏÏηÏα αÏ
ÏÏν ÏÏν δεδομÎνÏν."}),s.jsx("p",{children:"To Well Be by Nadia Boule εÏιÏÏ
λάÏÏεÏαι ÏοÏ
δικαιÏμαÏÎ¿Ï ÏÎ·Ï Î½Î± ÏÏηÏιμοÏοιήÏει Ïα ÏÏοιÏεία ÏοÏ
ÏÎ·Ï Î³Î½ÏÏÏοÏοιείÏε μÎÏÏ ÏοÏ
www.wellbe.gr καÏά ÏÏÏÏο ÏοÏ
να μην είναι δÏ
ναÏή η ÏαÏ
ÏοÏοίηÏη ή η αÏοκάλÏ
Ïη ÏοÏ
ÏÏοÏÏÏοÏ
ÏοÏ
αÏ
Ïά αÏοÏοÏν, για ÏÏαÏιÏÏικοÏÏ, ÏÏοÏθηÏικοÏÏ, εÏεÏ
νηÏικοÏÏ Î® και διαÏημιÏÏικοÏÏ ÏκοÏοÏÏ, γνÏÏÏοÏοιÏνÏÎ±Ï Î±Ï
Ïά και Ïε ÏÏίÏα ÏÏÏÏÏÏα Ï.Ï. εÏαιÏÎµÎ¯ÎµÏ ÎµÏεÏ
νÏν αÏμÏδια για Ïην ολοκλήÏÏÏη ÏÏν ανÏÏÎÏÏ ÏκοÏÏν."})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground mb-3 xs:mb-4",children:"4. ÎÏÏάλεια ÏÏν Î ÏοÏÏÏικÏν ÎεδομÎνÏν"}),s.jsxs("div",{className:"space-y-3 xs:space-y-4 text-foreground leading-relaxed text-sm xs:text-base",children:[s.jsx("p",{children:"To Well Be by Nadia Boule εÏαÏμÏζει ÏÏ
γκεκÏιμÎÎ½ÎµÏ Î´Î¹Î±Î´Î¹ÎºÎ±ÏÎ¯ÎµÏ ÏεÏÎ½Î¹ÎºÎ®Ï ÎºÎ±Î¹ οÏγανÏÏÎ¹ÎºÎ®Ï Î±ÏÏαλείαÏ, με ÏκοÏÏ Î½Î± ÏÏοÏÏαÏεÏει Ïα ÏÏοÏÏÏικά δεδομÎνα και ÏληÏοÏοÏÎ¯ÎµÏ Î±ÏÏ Î±ÏÏλεια, κακή ÏÏήÏη, μεÏαβολή ή καÏαÏÏÏοÏή. Îι ÏÏ
νεÏγάÏÎµÏ Î¼Î±Ï ÏοÏ
Î¼Î±Ï Ï
ÏοÏÏηÏίζοÏ
ν ÏÏη λειÏοÏ
Ïγία αÏ
ÏÎ¿Ï ÏοÏ
διαδικÏÏ
Î±ÎºÎ¿Ï ÏÏÏοÏ
εÏίÏÎ·Ï ÏÏ
μμοÏÏÏνονÏαι με αÏ
ÏÎÏ ÏÎ¹Ï Î´Î¹Î±ÏάξειÏ."}),s.jsx("p",{children:"To Well Be by Nadia Boule καÏαβάλλει κάθε εÏλογη ÏÏοÏÏάθεια να ÏηÏεί Ïα ÏÏοÏÏÏικά δεδομÎνα ÏοÏ
ÏÏ
λλÎγονÏαι μÏνο για Ïο ÏÏÎ¿Î½Î¹ÎºÏ Î´Î¹Î¬ÏÏημα για Ïο οÏοίο ÏÏειάζεÏαι Ïα δεδομÎνα αÏ
Ïά για Ïον ÏκοÏÏ Î³Î¹Î± Ïον οÏοίο ÏÏ
νελÎγηÏαν ή μÎÏÏÎ¹Ï ÏÏοÏ
ζηÏηθεί η διαγÏαÏή ÏοÏ
Ï (εάν αÏ
ÏÏ ÏÏ
μβεί νÏÏίÏεÏα), εκÏÏÏ ÎµÎ¬Î½ ÏÏ
νεÏίÏει να Ïα ÏηÏεί καÏά Ïα ÏÏοβλεÏÏμενα ÏÏην κείμενη νομοθεÏία."})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground mb-3 xs:mb-4",children:"5. ÎνημÎÏÏÏη για Ïα Cookies"}),s.jsxs("div",{className:"space-y-3 xs:space-y-4 text-foreground leading-relaxed text-sm xs:text-base",children:[s.jsx("p",{children:"Το cookie είναι ÎÎ
721½Î± μικÏÏ Î·Î»ÎµÎºÏÏÎ¿Î½Î¹ÎºÏ Î±ÏÏείο, ÏÏ
νήθÏÏ Î±ÏοÏελοÏμενο αÏÏ Î³ÏάμμαÏα και αÏιθμοÏÏ, Ïο οÏοίο αÏοÏÏÎλλεÏαι αÏÏ Î¼Î¹Î± διαδικÏÏ
ακή ÏοÏοθεÏία και αÏοθηκεÏεÏαι ÏÏην ηλεκÏÏονική ÏÏ
ÏκεÏ
ή ÏοÏ
ÏÏήÏÏη, εÏιÏÏÎÏονÏÎ±Ï Ïην ÏαÏ
ÏοÏοίηÏη ÏÎ·Ï ÏÏ
γκεκÏιμÎÎ½Î·Ï ÏÏ
ÏκεÏ
ήÏ. Τα Cookies ÏαίζοÏ
ν ÏÎ¿Î»Ï ÏημανÏÎ¹ÎºÏ ÏÏλο ÏÏην εν γÎνει λειÏοÏ
Ïγία ÏοÏ
διαδικÏÏοÏ
καθÏÏ ÏÏ
μβάλοÏ
ν ÏÏην βελÏιÏÏοÏοίηÏη ÏÎ·Ï ÎµÎ¼ÏειÏÎ¯Î±Ï ÏλοήγηÏÎ·Ï ÏοÏ
ÏÏήÏÏη ÏÏο ÎιαδίκÏÏ
ο."}),s.jsx("p",{children:"ΣÏο ηλεκÏÏÎ¿Î½Î¹ÎºÏ Î¼Î±Ï ÎºÎ±ÏάÏÏημα ÏÏηÏιμοÏοιοÏμε Cookies για να βελÏιÏÏοÏ
με Ïην εμÏειÏία ÏÎ±Ï ÎºÎ±Ïά Ïη ÏÏήÏη ÏÎ·Ï Î¹ÏÏοÏÎµÎ»Î¯Î´Î±Ï Î¼Î±Ï ÏÏÏÏ ÎµÏίÏÎ·Ï Î³Î¹Î± να διαÏηÏοÏν ÏληÏοÏοÏÎ¯ÎµÏ Î¿Î¹ οÏÎ¿Î¯ÎµÏ ÏÏηÏιμοÏοιοÏνÏαι για Ïην ανάγκη ÏÏαÏιÏÏικÏν μελεÏÏν και αÏοθηκεÏοÏ
ν Ïα αγαÏημÎνα ÏÎ±Ï ÏÏοÏÏνÏα για ÏÏ
γκεκÏιμÎνο διάÏÏημα."}),s.jsx("p",{children:"Τα Cookies ÏοÏ
αÏοÏÏÎλλονÏαι αÏÏ Ïην διαδικÏÏ
ακή Î¼Î±Ï ÏοÏοθεÏία και αÏοθηκεÏονÏαι ÏÏην ηλεκÏÏονική ÏÎ±Ï ÏÏ
ÏκεÏ
ή είναι Ïα ÏαÏακάÏÏ: IIS session cookie, Tomcat session cookie, Sharethis cookie, DoubleClick (Google), Google Adwords, Google Adwords Conversion, Google Analytics, WishList"}),s.jsx("p",{children:"ÎÏενεÏγοÏοιÏνÏÎ±Ï Ïα Cookies ή κάνονÏÎ±Ï Î±Î½Î¬ÎºÎ»Î·Ïη ÏÎ·Ï ÏÏ
γκαÏάθεÏÎ·Ï ÏαÏ, ÏÏ
γκεκÏιμÎÎ½ÎµÏ Î»ÎµÎ¹ÏοÏ
ÏÎ³Î¯ÎµÏ ÏÎ·Ï Î¹ÏÏοÏÎµÎ»Î¯Î´Î±Ï Î´ÎµÎ½ θα είναι διαθÎÏιμεÏ."})]})]})]})]})})]})}),s.jsx(Be,{})]})},h7=()=>{const[e,t]=h.useState(!1);return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"ÎÏοι ΧÏήÏÎ·Ï - Well Be",description:"ÎÏοι και ÏÏοÏÏοθÎÏÎµÎ¹Ï ÏÏήÏÎ·Ï ÏÎ·Ï ÏλαÏÏÏÏÎ¼Î±Ï Well Be. ÎιαβάÏÏε ÏοÏ
Ï ÏÏοÏ
Ï ÏÏιν Ïην εγγÏαÏή και ÏÏήÏη ÏÏν Ï
ÏηÏεÏιÏν.",keywords:"terms of service, ÏÏοι ÏÏήÏηÏ, ÏÏοι ÏÏ
νδÏομήÏ",canonical:"https://wellbe.gr/terms-of-service"}),s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsx("main",{className:"container mx-auto px-3 xs:px-4 sm:px-6 lg:px-8 py-8 xs:py-12 pt-16 sm:pt-20 md:pt-24",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("h1",{className:"text-2xl xs:text-3xl sm:text-4xl lg:text-5xl font-bold text-foreground mb-6 xs:mb-8",children:"ÎÏοι ΧÏήÏηÏ"}),s.jsx("div",{className:"prose prose-sm xs:prose-base lg:prose-lg max-w-none text-foreground",children:s.jsxs("div",{className:"bg-card p-4 xs:p-6 sm:p-8 rounded-lg border border-border space-y-4 xs:space-y-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("p",{className:"text-foreground leading-relaxed",children:"ÎαλÏÏ Î®Î»Î¸Î±Ïε ÏÏην ιÏÏοÏελίδα ÏÎ·Ï ÎµÏαιÏÎµÎ¯Î±Ï Î¼Î±Ï. Το wellbe.gr είναι Ïο ηλεκÏÏÎ¿Î½Î¹ÎºÏ ÎµÎ¼ÏοÏÎ¹ÎºÏ ÎºÎ±ÏάÏÏημα ÏÏληÏÎ·Ï ÏÏοÏÏνÏÏν ή/και Ï
ÏηÏεÏιÏν (εÏÎµÎ¾Î®Ï Ïο «ηλεκÏÏÎ¿Î½Î¹ÎºÏ ÎºÎ±ÏάÏÏημα») ÏÎ·Ï ÎµÏαιÏÎµÎ¯Î±Ï Î¼Îµ Ïην εÏÏνÏ
μία «B by Nadia Boule» ÏοÏ
εδÏεÏει ÏÏη ÎαÏÏακÏο, οδÏÏ Î. ΠλαÏÏήÏα 13, ÎΦΠ130517918, email: [email protected] (εÏÎµÎ¾Î®Ï Î· «ÎΤÎÎΡÎÎλ)."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Îι ÏαÏακάÏÏ ÏÏοι και ÏÏοÏÏοθÎÏÎµÎ¹Ï ÎºÎ±Î»ÏÏÏοÏ
ν αÏοκλειÏÏικά κάθε ÏÏληÏη ÏÏοÏÏνÏÏν ο/και Ï
ÏηÏεÏιÏν μÎÏÏ ÏοÏ
ηλεκÏÏÎ¿Î½Î¹ÎºÎ¿Ï ÎºÎ±ÏαÏÏήμαÏÎ¿Ï ÏÎ·Ï ÎΤÎÎΡÎÎÎΣ ÏοÏ
βÏίÏκεÏαι ÏÏον ιÏÏÏÏοÏο wellbe.gr (εÏÎµÎ¾Î®Ï Ïο «site»). ÎÏοιοιδήÏοÏε άλλοι ÎÏοι και Î ÏοÏÏοθÎÏÎµÎ¹Ï Î±ÏοκλείονÏαι ÏηÏÏÏ. Îάθε ΧÏήÏÏÎ·Ï ÏοÏ
ειÏÎÏÏεÏαι και ÏÏ
ναλλάÏÏεÏαι ή κάνει ÏÏήÏη ÏÏν Ï
ÏηÏεÏιÏν ÏοÏ
ηλεκÏÏÎ¿Î½Î¹ÎºÎ¿Ï ÎºÎ±ÏαÏÏήμαÏÎ¿Ï (εÏÎµÎ¾Î®Ï Î¿ «ΠελάÏηÏ» ή «ΧÏήÏÏηÏ» ανÏίÏÏοιÏα) θεÏÏείÏαι ÏÏι ÏÏ
ναινεί και αÏοδÎÏεÏαι ανεÏιÏÏλακÏα ÏοÏ
Ï ÏÏοÏ
Ï ÏοÏ
ÎµÎ´Ï Î´Î¹Î±ÏÏ
ÏÏνονÏαι, ÏÏÏÎ¯Ï ÎºÎ±Î¼Î¯Î± εξαίÏεÏη. Îάν κάÏÎ¿Î¹Î¿Ï Î§ÏήÏÏÎ·Ï Î´ÎµÎ½ ÏÏ
μÏÏνεί με αÏ
ÏοÏÏ ÏοÏ
ÏÏοÏ
Ï Î¿Ïείλει να αÏÎÏει αÏÏ Ïη ÏÏήÏη ÏοÏ
ηλεκÏÏÎ¿Î½Î¹ÎºÎ¿Ï ÎºÎ±ÏαÏÏήμαÏÎ¿Ï ÎºÎ±Î¹ αÏÏ ÎºÎ¬Î¸Îµ ÏÏ
ναλλαγή με αÏ
ÏÏ. Î ÎΤÎÎΡÎÎΠδιαÏηÏεί Ïο δικαίÏμα να μεÏαβάλλει οÏοÏεδήÏοÏε ÏοÏ
Ï ÏÏοÏ
Ï ÏÏήÏηÏ."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"1. ΠληÏοÏοÏÎ¯ÎµÏ & Î ÏοÏÏνÏα"}),s.jsx("p",{className:"text-foreground leading-relaxed text-sm xs:text-base",children:"H ÎΤÎÎΡÎÎΠδεÏμεÏεÏαι ÏÏ ÏÏÎ¿Ï Ïην αλήθεια, Ïην ακÏίβεια και Ïην ÏληÏÏÏηÏα ÏÏν ÏληÏοÏοÏιÏν ÏοÏ
ÏαÏαÏίθενÏαι ÏÏο ηλεκÏÏÎ¿Î½Î¹ÎºÏ ÎºÎ±ÏάÏÏημα, αναÏοÏικά με Ïην ÏαÏ
ÏÏÏηÏα και Ïα ÏÏοιÏεία ÏÏÏο ÏÎ·Ï ÎΤÎÎΡÎÎÎΣ, ÏÏο και ÏÏν ÏÏομηθεÏ
ÏÏν ÏηÏ, αλλά και Ïα κÏÏια ÏαÏακÏηÏιÏÏικά ÏÏν ÏÏοÏÏνÏÏν ή Ï
ÏηÏεÏιÏν ÏοÏ
διαθÎÏει μÎÏÏ ÏοÏ
ηλεκÏÏÎ¿Î½Î¹ÎºÎ¿Ï ÎºÎ±ÏαÏÏήμαÏοÏ. Î ÎΤÎÎΡÎÎΠεÏιÏÏ
λάÏÏεÏαι και δεν δεÏμεÏεÏαι για ÏÏ
ÏÏν ÏεÏνικά ή ÏÏ
ÏογÏαÏικά λάθη, ÏοÏ
Îγιναν εκ ÏÏάλμαÏοÏ, ÏαÏαδÏÎ¿Î¼Î®Ï Î® οÏείλονÏαι Ïε λÏγοÏ
Ï Î±Î½ÏÏÎÏÎ±Ï Î²Î¯Î±Ï ÎºÎ±Î¹ Ïα οÏοία δÎÏεÏαι να διοÏθÏÏει εÏÏÏον Ï
ÏοÏÎÏοÏ
ν ÏÏην ανÏίληÏή ÏηÏ."})]}),s.jsxs("div",{className:"space-y-3 xs:space-y-4",children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground",children:"2. ΠεÏιοÏιÏμÏÏ ÎÏ
θÏνηÏ"}),s.jsxs("div",{className:"space-y-2 xs:space-y-3",children:[s.jsx("p",{className:"text-foreground leading-relaxed text-sm xs:text-base",children:"Î ÎΤÎÎΡÎÎÎ ÏÏ
μμοÏÏÏνεÏαι ÏλήÏÏÏ Î¼Îµ ÏÎ¹Ï Î´Î¹Î±ÏÎ¬Î¾ÎµÎ¹Ï ÏοÏ
ÎÏÏÎ¹ÎºÎ¿Ï ÎÏδικα αναÏοÏικά με Ïην ÏÏληÏη καθÏÏ ÎºÎ±Î¹ ÏÎ¹Ï Î´Î¹Î±ÏÎ¬Î¾ÎµÎ¹Ï ÏοÏ
Î. 2251/1994 για Ïην Î ÏοÏÏαÏία ÏÏν ÎαÏαναλÏÏÏν ÏÏÏÏ ÎÏει ÏÏοÏοÏοιηθεί και ιÏÏÏει."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Î ÎΤÎÎΡÎÎÎ ÏÏο ÏλαίÏιο ÏÏν ÏÏ
ναλλαγÏν ÏÎ·Ï Î±ÏÏ Ïο ηλεκÏÏÎ¿Î½Î¹ÎºÏ ÎºÎ±ÏάÏÏημα ενημεÏÏνει Ïον ΠελάÏη με βάÏη Ïα ÏηÏοÏμενα κάθε ÏοÏά ÏÏοιÏεία διαθεÏιμÏÏηÏÎ±Ï Î® μη ÏÏν ÏÏοÏÏνÏÏν και Ïε καμία ÏεÏίÏÏÏÏη δεν μÏοÏεί να εγγÏ
ηθεί για Ïη διαθεÏιμÏÏηÏα αÏ
ÏÏν. Σε κάθε ÏεÏίÏÏÏÏη η ÎΤÎÎΡÎÎΠαναλαμβάνει να ενημεÏÏÏει εγκαίÏÏÏ Ïον ΠελάÏη για Ïη μη διαθεÏιμÏÏηÏα, οÏÏÏε και ÏÏην ÏεÏίÏÏÏÏη αÏ
Ïή δεν Ï
ÏÎÏει καμία ÏεÏαιÏÎÏÏ ÎµÏ
θÏνη."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Î ÎΤÎÎΡÎÎÎ ÏÏοÏÏαθεί να ÏαÏÎÏει καθημεÏινά Ï
ÏηÏεÏÎ¯ÎµÏ Ï
ÏÎ·Î»Î®Ï ÏοιÏÏηÏαÏ. ΣÏο ÏλαίÏιο ÎºÎ±Î»Î®Ï ÏίÏÏηÏ, η ÎΤÎÎΡÎÎΠδεν εÏ
θÏνεÏαι και δεν δεÏμεÏεÏαι για ÏÏ
ÏÏν ÏÏάλμαÏα Ïε ÏαÏακÏηÏιÏÏικά, ÏÏÏογÏαÏÎ¯ÎµÏ ÎºÎ±Î¹ ÏιμÎÏ ÏÏοÏÏνÏÏν ÏοÏ
αναγÏάÏονÏαι ÏÏο site και δεν μÏοÏεί να εξαÏÏαλίÏει ÏÏι δεν θα Ï
ÏάÏÏοÏ
ν ÏÏάλμαÏα αÏÏ Î¿ÏοιαδήÏοÏε αιÏία καÏά Ïην ειÏαγÏγή ή/και ενημÎÏÏÏη ÏÏν ÏαÏακÏηÏιÏÏικÏν ή/και ÏÎ·Ï ÏÎ¹Î¼Î®Ï ÎµÎ½ÏÏ ÏÏοÏÏνÏοÏ."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Î ÎΤÎÎΡÎÎΠοÏ
δεμία εÏ
θÏνη ÎÏει αÏÏ ÏÏ
ÏÏν μη εÏιÏÏεÏÏÎ¼ÎµÎ½ÎµÏ ÏαÏεμβάÏÎµÎ¹Ï ÏÏίÏÏν Ïε ÏÏοÏÏνÏα ή/και Ï
ÏηÏεÏÎ¯ÎµÏ Î®/και ÏληÏοÏοÏÎ¯ÎµÏ ÏοÏ
διαÏίθενÏαι μÎÏÏ ÏοÏ
ηλεκÏÏÎ¿Î½Î¹ÎºÎ¿Ï ÎºÎ±ÏαÏÏήμαÏοÏ."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Î ÎΤÎÎΡÎÎΠδεν δηλÏνει με κανÎναν ÏÏÏÏο ÏÏι οι ÏληÏοÏοÏÎ¯ÎµÏ ÏοÏ
ÏεÏιλαμβάνονÏαι ÏÏα ÎγγÏαÏα και ÏÏÎ¹Ï Î±Î½Î±ÎºÎ¿Î¹Î½ÏÏÎµÎ¹Ï ÏοÏ
δημοÏιεÏονÏαι Ï' αÏ
ÏÏν Ïον διακομιÏÏή είναι καÏάλληλα για οÏοιονδήÏοÏε ÏκοÏÏ. Îάθε ÏÎÏοιο ÎγγÏαÏο και ÏÏεÏική γÏαÏική αÏεικÏνιÏη ÏαÏÎÏεÏαι «ÏÏ ÎÏει» ÏÏÏÎ¯Ï ÎºÎ±Î¼Î¹Î¬ αÏολÏÏÏÏ ÎµÎ³Î³ÏηÏη οÏοιοÏ
δήÏοÏε είδοÏ
Ï."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Î ÎΤÎÎΡÎÎΠδεν ÏÎÏει εÏ
θÏνη οÏÏε Ï
ÏοÏÏÎÏÏη αÏοζημίÏÏÎ·Ï Î³Î¹Î± οÏοιαδήÏοÏε ζημιά και ηθική βλάβη ÏοÏ
ÏÏοκÏÏÏει αÏÏ Î±Î´Ï
ναμία ÏαÏοÏÎ®Ï Ï
ÏηÏεÏιÏν Ï
ÏοÏÏήÏιξηÏ."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Î ÎΤÎÎΡÎÎΠκάνει κάθε δÏ
ναÏή ÏÏοÏÏάθεια να ÏαÏÎÏει Ï
ÏηÏεÏÎ¯ÎµÏ Ï
ÏÎ·Î»Î®Ï ÏοιÏÏηÏÎ±Ï Î±Î»Î»Î¬ δεν μÏοÏεί να εγγÏ
ηθεί ÏÏι δεν θα Ï
ÏάÏξοÏ
ν διακοÏÎÏ Î® λάθη."})]})]}),s.jsxs("div",{className:"space-y-3 xs:space-y-4",children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground",children:"3. ÎÏ
θÏνη ÏοÏ
ΧÏήÏÏη"}),s.jsx("p",{className:"text-foreground leading-relaxed text-sm xs:text-base",children:"Îάθε ΧÏήÏÏÎ·Ï ÎµÎ¯Î½Î±Î¹ ελεÏθεÏÎ¿Ï Î½Î± κάνει ÏÏήÏη ÏοÏ
site ÏÏμÏÏνα με Ïον ÎÏμο και Ïα ÏÏηÏÏά ήθη. ΠεÏ
θÏνη για Ïα ÏεÏιεÏ
721Ïμενα ÏÏν ÏÏ
ναλλαγÏν ανήκει αÏοκλειÏÏικά ÏÏον ΧÏήÏÏη. Î ÎΤÎÎΡÎÎΠδεν αÏκεί κανÎνα ÎµÎ¯Î´Î¿Ï Î´Î¹ÏÏθÏÏÎ·Ï Î® ÏαÏÎμβαÏÎ·Ï ÏÏα δεδομÎνα ÏοÏ
μεÏαÏÎÏει ο ΧÏήÏÏηÏ. ΠΧÏήÏÏÎ·Ï Î¿Ïείλει να ÏÏ
μÏληÏÏνει με οÏθÏÏηÏα και ακÏίβεια Ïα ÎµÎ¾Î®Ï Ïεδία: Ïνομα, διεÏθÏ
νÏη, μήνÏ
μα ÎºÎ»Ï ÏÏÎ¹Ï online ÏÏÏÎ¼ÎµÏ ÎµÏικοινÏνίαÏ. Î ÏÏήÏη ÏοÏ
site Ï
ÏÏκειÏαι ÏÏοÏ
Ï ÎλληνικοÏÏ, ÎÏ
ÏÏÏαÏκοÏÏ ÎºÎ±Î¹ ÏοÏ
Ï ÎÎ¹ÎµÎ¸Î½ÎµÎ¯Ï Î½ÏμοÏ
Ï ÎºÎ±Î¹ ο ΧÏήÏÏÎ·Ï ÏÏ
μÏÏνεί να μην ÏÏηÏιμοÏοιείÏαι Ïο site Î¼Î±Ï Î¼Îµ ÏκοÏÏ Î½Î± ÏαÏαβιάÏει αÏ
ÏοÏÏ ÏοÏ
Ï Î½ÏμοÏ
Ï."})]}),s.jsxs("div",{className:"space-y-3 xs:space-y-4",children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground",children:"4. Τιμολογιακή ΠολιÏική"}),s.jsx("p",{className:"text-foreground leading-relaxed text-sm xs:text-base",children:"Îι ÏιμÎÏ ÏοÏ
ηλεκÏÏÎ¿Î½Î¹ÎºÎ¿Ï ÎºÎ±ÏαÏÏήμαÏÎ¿Ï Î¼ÏοÏοÏν να αλλάξοÏ
ν οÏοÏεδήÏοÏε ÏÏÏÎ¯Ï ÏÏοειδοÏοίηÏη. H ÎΤÎÎΡÎÎΠδεν ÏÎÏει καμία εÏ
θÏνη και δεν καλÏÏÏει διαÏοÏÎÏ ÏÏÎ¹Ï ÏιμÎÏ ÏÏοÏÏνÏÏν ÏοÏ
αγοÏάÏθηκαν αÏÏ ÏÏ
ÏÎ¹ÎºÏ ÎºÎ±ÏάÏÏημα ή άλλο ηλεκÏÏÎ¿Î½Î¹ÎºÏ ÎºÎ±ÏάÏÏημα ÏÏην Îλλάδα ή Ïο εξÏÏεÏÎ¹ÎºÏ ÎºÎ±Î¹ ο ΠελάÏÎ·Ï Î´Î¹Î±ÏίÏÏÏÏε εκ ÏÏν Ï
ÏÏÎÏÏν Ïην ÏÏαÏξη ÏαμηλÏÏεÏÎ·Ï ÏÎ¹Î¼Î®Ï ÏÏο ηλεκÏÏÎ¿Î½Î¹ÎºÏ ÏÎ·Ï ÎºÎ±ÏάÏÏημα ή Ïο ανÏίÏÏÏοÏο."})]}),s.jsxs("div",{className:"space-y-3 xs:space-y-4",children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground",children:"5. ÎικαιÏμαÏα ΠνεÏ
μαÏÎ¹ÎºÎ®Ï & ÎιομηÏÎ±Î½Î¹ÎºÎ®Ï ÎδιοκÏηÏίαÏ"}),s.jsxs("div",{className:"space-y-2 xs:space-y-3",children:[s.jsx("p",{className:"text-foreground leading-relaxed text-sm xs:text-base",children:"Îλο Ïο ÏεÏιεÏÏμενο ÏοÏ
ηλεκÏÏÎ¿Î½Î¹ÎºÎ¿Ï ÎºÎ±ÏαÏÏήμαÏοÏ, ÏÏ
μÏεÏιλαμβανομÎνÏν και ÏÏν διακÏιÏικÏν ÏίÏλÏν, ÏημάÏÏν, εικÏνÏν, γÏαÏικÏν, ÏÏÏογÏαÏιÏν, ÏÏεδίÏν, κειμÎνÏν κ.λ.Ï. αÏοÏελοÏν Ïην ÏνεÏ
μαÏική ιδιοκÏηÏία ÏÎ·Ï ÎΤÎÎΡÎÎÎΣ και ÏÏοÏÏαÏεÏεÏαι καÏά ÏÎ¹Ï ÏÏεÏικÎÏ Î´Î¹Î±ÏÎ¬Î¾ÎµÎ¹Ï ÏοÏ
ÎµÎ»Î»Î·Î½Î¹ÎºÎ¿Ï Î´Î¹ÎºÎ±Î¯Î¿Ï
, ÏοÏ
εÏ
ÏÏÏαÏÎºÎ¿Ï Î´Î¹ÎºÎ±Î¯Î¿Ï
και ÏÏν διεθνÏν ÏÏ
μβάÏεÏν ή ÏνεÏ
μαÏική ιδιοκÏηÏία ÏÏίÏÏν για Ïην οÏοία η ÎΤÎÎΡÎÎÎ ÎÏει λάβει άδεια ÏÏήÏÎ·Ï Î³Î¹Î± ÏÎ¹Ï Î´Î¹ÎºÎÏ ÏÎ·Ï Î±ÏοκλειÏÏικά Î±Î½Î¬Î³ÎºÎµÏ ÎºÎ±Î¹ για Ïη λειÏοÏ
Ïγία ÏοÏ
ηλεκÏÏÎ¿Î½Î¹ÎºÎ¿Ï ÎºÎ±ÏαÏÏήμαÏοÏ."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ÎιδικÏÏεÏα, Ïα ονÏμαÏα, εικÏνεÏ, λογÏÏÏ
Ïα και διακÏιÏικά γνÏÏίÏμαÏα ÏοÏ
ανÏιÏÏοÏÏÏεÏοÏ
ν Ïο ηλεκÏÏÎ¿Î½Î¹ÎºÏ ÎºÎ±ÏάÏÏημα με Ïο εμÏοÏÎ¹ÎºÏ Ïήμα ή ÏÏίÏα μÎÏη και Ïα ÏÏοÏÏνÏα ή ÏÎ¹Ï Ï
ÏηÏεÏÎ¯ÎµÏ ÏοÏ
Ï, είναι αÏοκλειÏÏικά ÏήμαÏα ÏÎ·Ï ÎΤÎÎΡÎÎÎΣ ή ÏÏίÏÏν μεÏÏν ανÏίÏÏοιÏα ÏÏοÏÏαÏεÏ
Ïμενα αÏÏ ÏοÏ
Ï ÏÏεÏικοÏÏ Î½ÏμοÏ
Ï ÏεÏί εμÏοÏικÏν ÏημάÏÏν. ΠεμÏάνιÏή ÏοÏ
Ï ÏÏο site δεν θα ÏÏÎÏει καÏά κανÎνα ÏÏÏÏο να εκληÏθεί ÏÏ Î¼ÎµÏαβίβαÏη ή εκÏÏÏηÏη Î¬Î´ÎµÎ¹Î±Ï Î® δικαιÏμαÏÎ¿Ï ÏÏήÏÎ·Ï ÏοÏ
Ï."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ÎÏαγοÏεÏεÏαι οÏοιαδήÏοÏε ανÏιγÏαÏή, μεÏαÏοÏά ή δημιοÏ
Ïγία ÏαÏάγÏÎ³Î·Ï ÎµÏγαÏÎ¯Î±Ï Î¼Îµ βάÏη Ïο ÏεÏιεÏ
721Ïμενο αÏ
ÏÏ Î® ÏαÏαÏλάνηÏη ÏοÏ
ÎºÎ¿Î¹Î½Î¿Ï ÏÏεÏικά με Ïον ÏÏαγμαÏÎ¹ÎºÏ ÏάÏοÏο ÏοÏ
ηλεκÏÏÎ¿Î½Î¹ÎºÎ¿Ï ÎºÎ±ÏαÏÏήμαÏοÏ. ΠαναÏαÏαγÏγή, διάδοÏη, μεÏάδοÏη, αναμεÏάδοÏη ÏοÏ
Ï
λικοÏ, ή οÏοιαδήÏοÏε άλλη ÏÏήÏη ÏοÏ
ÏεÏιεÏομÎνοÏ
με οÏοιοδήÏοÏε ÏÏÏÏο ή μÎÏο για εμÏοÏικοÏÏ Î® άλλοÏ
Ï ÏκοÏοÏÏ ÎµÏιÏÏÎÏεÏαι μÏνο καÏÏÏιν ÏÏοηγοÏÎ¼ÎµÎ½Î·Ï ÎγγÏαÏÎ·Ï ÏÏ
ναίνεÏÎ·Ï ÏÎ·Ï ÎΤÎÎΡÎÎÎΣ ή οÏοιοÏ
δήÏοÏε άλλοÏ
δικαιοÏÏοÏ
ÏÏν ÏνεÏ
μαÏικÏν δικαιÏμάÏÏν."})]})]}),s.jsxs("div",{className:"space-y-3 xs:space-y-4",children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground",children:"6. «ΣÏνδεÏμοι» (links) ÏÏÎ¿Ï Î¬Î»Î»Î¿Ï
Ï Î¹ÏÏÏÏοÏοÏ
Ï"}),s.jsx("p",{className:"text-foreground leading-relaxed text-sm xs:text-base",children:"Î ÎΤÎÎΡÎÎΠδεν ελÎγÏει Ïη διαθεÏιμÏÏηÏα, Ïο ÏεÏιεÏÏμενο, Ïην ÏολιÏική ÏÏοÏÏαÏÎ¯Î±Ï ÏÏν ÏÏοÏÏÏικÏν δεδομÎνÏν, Ïην ÏοιÏÏηÏα και Ïην ÏληÏÏÏηÏα ÏÏν Ï
ÏηÏεÏιÏν άλλÏν ιÏÏÏÏοÏÏν (websites) και ιÏÏοÏελίδÏν ÏÏα οÏοία ÏαÏαÏÎμÏει μÎÏÏ Â«ÏÏ
νδÎÏμÏν», hyperlinks ή διαÏημιÏÏικÏν banners. ΣÏ
νεÏÏÏ Î³Î¹Î± οÏοιοδήÏοÏε ÏÏÏβλημα ÏαÏοÏ
ÏιαÏθεί καÏά Ïη ÏÏήÏη ÏοÏ
Ï, ο ΧÏήÏÏÎ·Ï Î¿Ïείλει να αÏεÏ
θÏνεÏαι αÏεÏ
Î¸ÎµÎ¯Î±Ï ÏÏοÏ
Ï Î±Î½ÏίÏÏοιÏοÏ
Ï Î¹ÏÏοÏÏÏοÏ
Ï ÎºÎ±Î¹ ιÏÏοÏελίδεÏ, οι οÏοίοι και ÏÎÏοÏ
ν Ïη ÏÏεÏική εÏ
θÏνη για Ïην ÏαÏοÏή ÏÏν Ï
ÏηÏεÏιÏν ÏοÏ
Ï. Î ÏαÏοÏή ÏÏν ÏÏ
νδÎÏμÏν ÏÏο ηλεκÏÏÎ¿Î½Î¹ÎºÏ ÎºÎ±ÏάÏÏημα γίνεÏαι για λÏγοÏ
Ï Î´Î¹ÎµÏ
κÏλÏ
νÏÎ·Ï ÏοÏ
ΧÏήÏÏη και η ÎΤÎÎΡÎÎÎ Ïε καμία ÏεÏίÏÏÏÏη δεν εγκÏίνει, δεν αÏοδÎÏεÏαι και δεν εÏ
θÏνεÏαι για Ïο ÏεÏιεÏÏμενο κάθε ÏÏ
νδÎÏμοÏ
."})]}),s.jsxs("div",{className:"space-y-3 xs:space-y-4",children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground",children:"7. ÎήλÏÏη ÎÏεμÏθειαÏ"}),s.jsxs("div",{className:"space-y-2 xs:space-y-3",children:[s.jsx("p",{className:"text-foreground leading-relaxed text-sm xs:text-base",children:"ÎÏαν ο ΧÏήÏÏÎ·Ï Î±ÏοÏÏÎλλει Îνα αίÏημα online, η ÏληÏοÏοÏία ÏοÏ
Î¼Î±Ï ÏαÏÎÏει ÏÏηÏιμοÏοιείÏαι για να ÏοÏ
αÏανÏήÏοÏ
με ηλεκÏÏονικά ÏÏην εÏÏÏηÏή ÏοÏ
. ÎνÏιμεÏÏÏίζοÏ
με ÏÎ¹Ï Î±Î¹ÏήÏÎµÎ¹Ï ÏοÏ
ÏÏ
μÏληÏÏνει κάθε ΧÏήÏÏÎ·Ï ÎºÎ±Î¸ÏÏ ÎºÎ±Î¹ Ïην ηλεκÏÏονική αλληλογÏαÏία ÏοÏ
αÏοÏÏÎλλει ÏÏ ÏÏοιÏεία αÏÏÏÏηÏα. Îεν μεÏαβιβάζοÏ
με Ïο ÏεÏιεÏÏμενο αÏ
ÏÏν ÏαÏά μÏνο ÏÏον άμεÏα ενδιαÏεÏÏμενο αÏοδÎκÏη και ÏÏÎ¹Ï ÏεÏιÏÏÏÏÎµÎ¹Ï ÏοÏ
ÏÏοβλÎÏει ο νÏμοÏ, εÏÏÏον αÏ
ÏÏ Î¶Î·Ïηθεί αÏÏ Ïην ÎΤÎÎΡÎÎΠή ÏÏην ÏεÏίÏÏÏÏη ÏοÏ
Ïο ÏεÏιεÏÏμενο ÏοÏ
μηνÏμαÏÎ¿Ï Î¸ÎµÏÏηθεί ÏÏι θίγει και ÏÏοÏβάλλει Ïην ÎΤÎÎΡÎÎÎ."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ΤÎÏοια ενÎÏγεια είναι αÏαÏαίÏηÏη ÏÏοκειμÎνοÏ
για:"}),s.jsxs("ol",{className:"list-decimal list-inside space-y-1 xs:space-y-2 text-foreground ml-3 xs:ml-4 text-sm xs:text-base",children:[s.jsx("li",{children:"Ïην ÏÏοÏÏαÏία ÏÏν δικαιÏμάÏÏν και ÏÎ·Ï ÏεÏιοÏ
ÏÎ¯Î±Ï ÏÎ·Ï ÎΤÎÎΡÎÎÎΣ"}),s.jsx("li",{children:"Ïην ÏÏοÏÏαÏία ενάνÏια ÏÏην κακή ή ÏÏην μη εξοÏ
ÏιοδοÏημÎνη ÏÏήÏη ÏοÏ
site"}),s.jsx("li",{children:"Ïην ÏÏοÏÏαÏία ÏÎ·Ï ÏÏοÏÏÏÎ¹ÎºÎ®Ï Î±ÏÏÎ¬Î»ÎµÎ¹Î±Ï Î® ÏÎ·Ï ÏεÏιοÏ
ÏÎ¯Î±Ï ÏÏν ÏÏηÏÏÏν και ÏοÏ
καÏαναλÏÏÎ¹ÎºÎ¿Ï ÎºÎ¿Î¹Î½Î¿Ï."})]}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ΠαÏ' Ïλα αÏ
Ïά, εάν ο ΧÏήÏÏÎ·Ï ÏοÏηγήÏει ÏÏην ÎΤÎÎΡÎÎÎ ÏεÏ
δή ηλεκÏÏονική διεÏθÏ
νÏη ή ÏÏοÏÏαθήÏει να λάβει Ïη θÎÏη κάÏοιοÏ
άλλοÏ
ÏÏοÏÏÏοÏ
ÏÏαν ÏÏÎλνει ÏληÏοÏοÏÎ¯ÎµÏ online, ÏÎ»ÎµÏ Î¿Î¹ ÏληÏοÏοÏÎ¯ÎµÏ â καθÏÏ ÎµÏίÏÎ·Ï ÎºÎ±Î¹ Ïο IP address â θα αÏοÏελοÏν μÎÏÎ¿Ï Î¿ÏοιαÏδήÏοÏε ÎÏεÏ
ναÏ. Îι άνθÏÏÏοι ÏÎ·Ï ÎΤÎÎΡÎÎÎΣ μÏοÏεί να ÏÏειαÏÏεί να εÏεξεÏγαÏÏοÏν Ïο ηλεκÏÏÎ¿Î½Î¹ÎºÏ Î¼Î®Î½Ï
μα ÏοÏ
ΧÏήÏÏη Ïε ÏÏ
νεÏγαÏία με Ïο ÏεÏÎ½Î¹ÎºÏ Ïμήμα. Î ÎΤÎÎΡÎÎΠδεν ÎÏει εÏ
θÏνη για Ïην ÏολιÏική αÏÏÎ±Î»ÎµÎ¯Î±Ï Î¬Î»Î»Ïν ιÏÏοÏÏÏÏν ή για Ïον ÏÏÏÏο με Ïον οÏοίο αÏ
Ïοί διαÏειÏίζονÏαι ÏοÏ
Ï Î·Î»ÎµÎºÏÏονικοÏÏ ÏοÏ
Ï ÎµÏιÏκÎÏÏεÏ."})]})]}),s.jsxs("div",{className:"space-y-3 xs:space-y-4",children:[s.jsx("h2",{className:"text-lg xs:text-xl sm:text-2xl font-semibold text-foreground",children:"8. ΣÏ
νδÏομηÏική Î¥ÏηÏεÏία ÎίνÏεο â ÎογαÏιαÏμÏÏ Î§ÏήÏÏη"}),s.jsxs("div",{className:"space-y-2 xs:space-y-3",children:[s.jsx("p",{className:"text-foreground leading-relaxed text-sm xs:text-base",children:"Îια να ÏÏηÏιμοÏοιήÏεÏε Ïην Î¥ÏηÏεÏία αÏαιÏείÏαι εγγÏαÏή και δημιοÏ
Ïγία ÏÏοÏÏÏÎ¹ÎºÎ¿Ï Î»Î¿Î³Î±ÏιαÏμοÏ."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ΠΧÏήÏÏÎ·Ï Ï
ÏοÏÏεοÏÏαι να ÏαÏÎÏει ακÏιβή και αληθή ÏÏοιÏεία."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ΠλÎ
721¿Î³Î±ÏιαÏμÏÏ ÎµÎ¯Î½Î±Î¹ αÏ
ÏÏηÏά ÏÏοÏÏÏικÏÏ ÎºÎ±Î¹ δεν εÏιÏÏÎÏεÏαι η μεÏαβίβαÏη ή Ïο μοίÏαÏμα Ïε ÏÏίÏοÏ
Ï."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ΠΧÏήÏÏÎ·Ï ÎµÏ
θÏνεÏαι για Ïη διαÏήÏηÏη ÏÎ·Ï ÎµÎ¼ÏιÏÏεÏ
ÏικÏÏηÏÎ±Ï ÏοÏ
κÏÎ´Î¹ÎºÎ¿Ï ÏοÏ
."})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"9. ΠακÎÏα ΣÏ
νδÏÎ¿Î¼Î®Ï â ÎÏÏεάν Îοκιμή"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-foreground leading-relaxed",children:"Î ÎΤÎÎΡÎÎÎ ÏÏοÏÏÎÏει ÏÏ
νδÏομÎÏ Î¼Î·Î½Î¹Î±Î¯ÎµÏ, ÎµÎ¾Î±Î¼Î·Î½Î¹Î±Î¯ÎµÏ ÎºÎ±Î¹ εÏήÏιεÏ."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ΠαÏÎÏεÏαι δÏÏεάν δοκιμαÏÏική ÏεÏÎ¯Î¿Î´Î¿Ï 7 ημεÏÏν, μεÏά Ïο ÏÎÏÎ±Ï ÏÎ·Ï Î¿ÏÎ¿Î¯Î±Ï Î³Î¯Î½ÎµÏαι αÏ
ÏÏμαÏη ÏÏÎÏÏη ÏÏμÏÏνα με Ïο εÏιλεγμÎνο ÏακÎÏο."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Îν ο ΧÏήÏÏÎ·Ï Î´ÎµÎ½ εÏιθÏ
μεί Ïη ÏÏ
νÎÏιÏη, οÏείλει να ακÏ
ÏÏÏει ÏÏιν Ïη λήξη ÏÎ·Ï Î´Î¿ÎºÎ¹Î¼Î±ÏÏÎ¹ÎºÎ®Ï ÏεÏιÏδοÏ
."})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"10. ΠληÏÏμÎÏ & ΧÏεÏÏειÏ"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-foreground leading-relaxed",children:"Îι ÏληÏÏμÎÏ Î³Î¯Î½Î¿Î½Ïαι μÎÏÏ ÏÏεÏÏÏικÏν/ÏιÏÏÏÏικÏν καÏÏÏν, PayPal ή ÏÏαÏÎµÎ¶Î¹ÎºÎ®Ï ÎºÎ±ÏάθεÏηÏ."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Îι ÏÏ
νδÏομÎÏ Î±Î½Î±Î½ÎµÏνονÏαι αÏ
ÏÏμαÏα με Ïην ανÏίÏÏοιÏη ÏÏÎÏÏη, εκÏÏÏ ÎµÎ¬Î½ ÏÏοηγηθεί ακÏÏÏÏη."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Îι ÏιμÎÏ Î¼ÏοÏοÏν να αλλάξοÏ
ν οÏοÏεδήÏοÏε· Ïε ÏεÏίÏÏÏÏη Î±Î»Î»Î±Î³Î®Ï Î¿ ΧÏήÏÏÎ·Ï Î¸Î± ενημεÏÏνεÏαι εγκαίÏÏÏ ÏÏιν αÏÏ Ïην εÏÏμενη ανανÎÏÏη."})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"11. ΠολιÏική ÎκÏÏÏÏηÏ"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-foreground leading-relaxed",children:"ΠΧÏήÏÏÎ·Ï Î¼ÏοÏεί να ακÏ
ÏÏÏει Ïη ÏÏ
νδÏομή ÏοÏ
οÏοιαδήÏοÏε ÏÏιγμή μÎÏÏ ÏοÏ
λογαÏιαÏÎ¼Î¿Ï ÏοÏ
."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ΠακÏÏÏÏη ιÏÏÏει για Ïην εÏÏμενη ÏεÏίοδο ÏÏÎÏÏηÏ· μÎÏÏι ÏÏÏε ο ΧÏήÏÏÎ·Ï Î´Î¹Î±ÏηÏεί ÏÏÏÏβαÏη ÏÏο ÏεÏιεÏÏμενο."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ÎαÏαβληθÎνÏα ÏοÏά δεν εÏιÏÏÏÎÏονÏαι, εκÏÏÏ ÎµÎ¬Î½ οÏίζεÏαι διαÏοÏεÏικά αÏÏ Ïο νÏμο."})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"12. ΧÏήÏη ΠεÏιεÏομÎνοÏ
"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-foreground leading-relaxed",children:"Το ÏεÏιεÏÏμενο ÏÎ·Ï Î¥ÏηÏεÏÎ¯Î±Ï Î±ÏοÏελεί ÏνεÏ
μαÏική ιδιοκÏηÏία ÏÎ·Ï ÎΤÎÎΡÎÎÎΣ."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ÎιαÏίθεÏαι αÏοκλειÏÏικά για ÏÏοÏÏÏική και μη εμÏοÏική ÏÏήÏη."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ÎÏαγοÏεÏεÏαι αÏ
ÏÏηÏά η αναÏαÏαγÏγή, ανÏιγÏαÏή, καÏαγÏαÏή (screen recording), διαμοιÏαÏμÏÏ Î® διάθεÏη ÏοÏ
ÏεÏιεÏ
721ομÎνοÏ
Ïε ÏÏίÏοÏ
Ï Î¼Îµ οÏοιονδήÏοÏε ÏÏÏÏο."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Î ÏαÏαβίαÏη ÏÏν ανÏÏÎÏÏ ÏÏ
νεÏάγεÏαι άμεÏη διακοÏή ÏÎ·Ï ÏÏ
νδÏÎ¿Î¼Î®Ï ÏÏÏÎ¯Ï ÎµÏιÏÏÏοÏή ÏÏημάÏÏν και εÏιÏÏλαξη κάθε νÏμιμοÏ
δικαιÏμαÏÎ¿Ï ÏÎ·Ï ÎΤÎÎΡÎÎÎΣ."})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"13. ÎιαθεÏιμÏÏηÏα Î¥ÏηÏεÏίαÏ"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-foreground leading-relaxed",children:"Î ÎΤÎÎΡÎÎΠκαÏαβάλλει κάθε ÏÏοÏÏάθεια για αÏÏÏÏκοÏÏη λειÏοÏ
Ïγία ÏÎ·Ï Î¥ÏηÏεÏίαÏ. ΩÏÏÏÏο δεν εγγÏ
άÏαι ÏÏι δεν θα Ï
ÏάÏξοÏ
ν διακοÏÎÏ Î® ÏÏάλμαÏα."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Το ÏεÏιεÏÏμενο είναι διαθÎÏιμο διεθνÏÏ, εκÏÏÏ Î±Î½ εÏιβάλλονÏαι ÏεÏιοÏιÏμοί λÏÎ³Ï ÏεÏνικÏν ή νομικÏν λÏγÏν."})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"14. Î ÏοÏÏαÏία ÎεδομÎνÏν Î ÏοÏÏÏÎ¹ÎºÎ¿Ï Î§Î±ÏακÏήÏα"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-foreground leading-relaxed",children:"Î ÎΤÎÎΡÎÎÎ ÏÏ
λλÎγει και εÏεξεÏγάζεÏαι ÏÏοÏÏÏικά δεδομÎνα (Ï.Ï. ÏÏοιÏεία λογαÏιαÏμοÏ, ÏληÏÏμÏν, cookies) ÏÏμÏÏνα με Ïον ÎÎµÎ½Î¹ÎºÏ ÎανονιÏÎ¼Ï Î ÏοÏÏαÏÎ¯Î±Ï ÎεδομÎνÏν (GDPR) και Ïην ιÏÏÏοÏ
Ïα νομοθεÏία."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Îια λεÏÏομÎÏÎµÎ¹ÎµÏ Î´ÎµÎ¯Ïε Ïην ΠολιÏική ÎÏοÏÏήÏοÏ
."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ΠΧÏήÏÏÎ·Ï ÎÏει δικαιÏμαÏα ÏÏÏÏβαÏηÏ, διÏÏθÏÏÎ·Ï ÎºÎ±Î¹ διαγÏαÏÎ®Ï ÏÏν δεδομÎνÏν ÏοÏ
."})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"15. ÎικαιÏμαÏα ÎαÏαναλÏÏή â Î¥ÏαναÏÏÏηÏη"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-foreground leading-relaxed",children:"ΠΧÏήÏÏÎ·Ï ÎÏει δικαίÏμα Ï
ÏαναÏÏÏηÏÎ·Ï ÎµÎ½ÏÏÏ 14 ημεÏÏν αÏÏ Ïην αγοÏά."}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"ÎξαίÏεÏη: Îν ο ΧÏήÏÏÎ·Ï Î¾ÎµÎºÎ¹Î½Î®Ïει να ÏÏηÏιμοÏοιεί Ïην Î¥ÏηÏεÏία (δηλ. ÎÏει ÏÏÏÏβαÏη ÏÏο ÏεÏιεÏÏμενο), ÏÏÏε Ïάνει Ïο δικαίÏμα Ï
ÏαναÏÏÏηÏηÏ, ÏÏμÏÏνα με Ïον Î. 2251/1994."})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"16. ΤÏοÏοÏοιήÏÎµÎ¹Ï ÎÏÏν"}),s.jsx("p",{className:"text-foreground leading-relaxed",children:"Î ÎΤÎÎΡÎÎΠδιαÏηÏεί Ïο δικαίÏμα να ÏÏοÏοÏοιεί ÏοÏ
Ï ÏαÏÏνÏÎµÏ ÎÏοÏ
Ï Î§ÏήÏÎ·Ï Î¿ÏοÏεδήÏοÏε. Îι αλλαγÎÏ Î¹ÏÏÏοÏ
ν αÏÏ Ïη δημοÏίεÏ
Ïή ÏοÏ
Ï ÏÏο wellbe.gr."})]})]})})]})}),s.jsx(Be,{})]})},ak="/assets/nav-header-C_zdXsJa.png",f7="/assets/home-hero-Djf8v3RC.png",p7="/assets/auth-login-DMrWcHRr.png",ik="/assets/plans-D-H3h0Z_.png",g7="/assets/paywall-TQzB3dLJ.png",x7="/assets/workouts-page-DF38oCsw.png",v7="/assets/filters-open-0l-jundt.png",y7="/assets/podcast-page-DcXbDX_q.png",b7="/assets/recipes-page-CdOQ_ZMy.png",w7="/assets/gift-cards-ByERrJvZ.png",ok="/assets/billing-account-button-DQ_1qqfR.png",Qx="/assets/billing-tab-CPvDpoOH.png",j7="/assets/billing-overview-BPjnkVe1.png",N7="/assets/billing-receipts-CmE-VpO7.png",_7="/assets/billing-payment-method-LMb-QQrP.png",k7="/assets/billing-cancel-button-DohFn1PH.png",S7="/assets/billing-cancel-dialog-DOZXsY4r.png",C7="/assets/billing-cancelled-state-23NbCr6G.png",E7="/assets/billing-payment-problem-BLI51OtH.png",P7="/assets/mobile-browser-home-BlRdUOeu.png",T7="/assets/app-home-full-DbnTXzH6.png",A7="/assets/app-nav-full-BLDtnF7d.png",I7="/assets/app-account-full-DTJEuIw8.png",R7="/assets/app-billing-full-BvKuPwux.png",M7="/assets/app-receipts-full-fd_Cwz9X.png",O7="/assets/app-payment-full-D5exWI1-.png",D7="/assets/app-cancel-full-Dg0giIr-.png",Zd=[{id:"getting-started",title:"ÎεκινήÏÏε με Ïο Well Be",description:"ÎγγÏαÏή, δÏÏεάν δοκιμή 7 ημεÏÏν, ÏÏÏÏη ÏλοήγηÏη",icon:No,guides:[{title:"Î ÏÏ Î´Î·Î¼Î¹Î¿Ï
ÏÎ³Ï Î»Î¿Î³Î±ÏιαÏÎ¼Ï ÎºÎ±Î¹ Î¾ÎµÎºÎ¹Î½Î¬Ï Ïη δÏÏεάν δοκιμή",intro:"ΠεγγÏαÏή γίνεÏαι μαζί με Ïην εÏιλογή ÏÏ
νδÏομήÏ. Πδοκιμή διαÏκεί 7 ημÎÏÎµÏ ÎºÎ±Î¹ δεν ÏÏεÏνεÏÏε αν ακÏ
ÏÏÏεÏε ÏÏιν Ïη λήξη ÏηÏ.",steps:[{text:"ΣÏην αÏÏική Ïελίδα ÏαÏήÏÏε «ÎοκιμάÏÏε ÎÏÏεάν» ή, αÏÏ Ïο ÏÎ¬Î½Ï Î¼ÎµÎ½Î¿Ï, «ÎίÏοδοÏ» â «Îεν είÏÏε ακÏμη μÎλοÏ; ÎοκιμάÏÏε 7 ημÎÏÎµÏ Î´ÏÏεάν!».",image:f7,caption:"ΠαÏÏική Ïελίδα ÏοÏ
wellbe.gr με Ïο κοÏ
μÏί ÎναÏÎ¾Î·Ï Î´ÏÏεάν δοκιμήÏ."},{text:"ÎÏιλÎξÏε ÏακÎÏο: Îηνιαία â¬9,90/μήνα, 6 ÎÎ®Î½ÎµÏ â¬49 (εξοικονÏμηÏη â¬10,40) ή ÎÏήÏια â¬99 (εξοικονÏμηÏη â¬19,80). Îαι Ïα ÏÏία ÏεÏιλαμβάνοÏ
ν 7 ημÎÏÎµÏ Î´ÏÏεάν.",image:ik,caption:"Î Ïελίδα «ÎÏιλÎξÏε Ïη ΣÏ
νδÏομή ÏαÏ» με Ïα ÏÏία ÏακÎÏα και Ïο Ïεδίο εκÏÏÏÏÎ¹ÎºÎ¿Ï ÎºÏδικοÏ."},{text:"Îν ÎÏεÏε εκÏÏÏÏÎ¹ÎºÏ ÎºÏδικÏ, γÏάÏÏε Ïον ÏÏο Ïεδίο «ÎÏÎµÎ¹Ï ÎµÎºÏÏÏÏÎ¹ÎºÏ ÎºÏδικÏ;» και ÏαÏήÏÏε «ÎÏαÏμογή» ÏÏιν ÏÏοÏÏÏήÏεÏε â οι νÎÎµÏ ÏιμÎÏ ÎµÎ¼ÏανίζονÏαι αμÎÏÏÏ ÏÏÎ¹Ï ÎºÎ¬ÏÏεÏ."},{text:"ΣÏ
μÏληÏÏÏÏε email, Ïνομα και κÏÎ´Î¹ÎºÏ ÎºÎ±Î¹ ÏÏ
νεÏίÏÏε ÏÏην αÏÏαλή Ïελίδα ÏληÏÏÎ¼Î®Ï ÏÎ·Ï Stripe για Ïην καÏαÏÏÏηÏη κάÏÏαÏ. Îεν γίνεÏαι ÏÏÎÏÏη καÏά Ïη διάÏκεια ÏÎ·Ï Î´Î¿ÎºÎ¹Î¼Î®Ï."},{text:"ÎεÏά Ïην ολοκλήÏÏÏη εÏιÏÏÏÎÏεÏε αÏ
ÏÏμαÏα ÏÏο Well Be με ενεÏγή ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏ
721Ïμενο."}],note:"Îν ήÏαÏÏαν ÏÎ±Î»Î¹Ï Î¼ÎÎ»Î¿Ï ÎºÎ±Î¹ Ïο email ÏÎ±Ï Ï
ÏάÏÏει ήδη, Ïο ÏÏÏÏημα αναγνÏÏίζει Ïον λογαÏιαÏÎ¼Ï ÏÎ±Ï ÎºÎ±Î¹ ÏÎ±Ï Î¶Î·Ïά να οÏίÏεÏε νÎο κÏÎ´Î¹ÎºÏ Î±Î½Ïί να δημιοÏ
ÏγήÏει διÏÎ»Ï Î»Î¿Î³Î±ÏιαÏμÏ."},{title:"Î ÏÏ ÏÏ
νδÎομαι ÏÏον λογαÏιαÏÎ¼Ï Î¼Î¿Ï
",steps:[{text:"ΠαÏήÏÏε «ÎίÏοδοÏ» ÏÏο ÏÎ¬Î½Ï Î´ÎµÎ¾Î¹Î¬ μÎÏÎ¿Ï ÏÎ·Ï ÏελίδαÏ.",image:ak,caption:"Το κενÏÏÎ¹ÎºÏ Î¼ÎµÎ½Î¿Ï: ÎÏÏική, Workouts, ÎιαλογιÏμοί, Breathworks, Podcast, ΣÏ
νÏαγÎÏ, Community, ÎίÏοδοÏ."},{text:"ÎÏιλÎξÏε «Sign in with Google» για γÏήγοÏη ÏÏνδεÏη ή γÏάÏÏε Ïο email ÏÎ±Ï ÎºÎ±Î¹ ÏαÏήÏÏε «ΣÏ
νÎÏεια» για ÏÏνδεÏη με κÏδικÏ.",image:p7,caption:"ΠοθÏνη «ΠÏÏÏβαÏη ÏÏον λογαÏιαÏμÏ»: ÏÏνδεÏη με Google ή με email."},{text:"Îν ξεÏάÏαÏε Ïον κÏÎ´Î¹ÎºÏ ÏαÏ, μεÏά Ïην ειÏαγÏγή ÏοÏ
email εÏιλÎξÏε Ïην εÏαναÏοÏά κÏÎ´Î¹ÎºÎ¿Ï ÎºÎ±Î¹ θα λάβεÏε email με ÏÏνδεÏμο για νÎο κÏδικÏ."}],note:"ΠαÏαμÎνεÏε ÏÏ
νδεδεμÎνοι ÏÏη ÏÏ
ÏκεÏ
ή ÏαÏ. Îν καθαÏίÏεÏε Ïα δεδομÎνα ÏοÏ
browser ή ÏÏηÏιμοÏοιείÏε ιδιÏÏική ÏεÏιήγηÏη, θα ÏÏειαÏÏεί νÎα ÏÏνδεÏη."},{title:"Î ÏÏ ÏλοηγοÏμαι ÏÏο ÏεÏιεÏÏμενο",steps:[{text:"ÎÏÏ Ïο κενÏÏÎ¹ÎºÏ Î¼ÎµÎ½Î¿Ï ÎµÏιλÎγεÏε μία αÏÏ ÏÎ¹Ï ÎµÎ½ÏÏηÏεÏ: Workouts, ÎιαλογιÏμοί, Breathworks, Podcast, ΣÏ
νÏαγÎÏ ÎºÎ±Î¹ Community.",image:ak},{text:"Σε κινηÏÏ, ÏαÏήÏÏε Ïο εικονίδιο Î¼ÎµÎ½Î¿Ï (â°) ÏÎ¬Î½Ï Î´ÎµÎ¾Î¹Î¬ για να εμÏανιÏÏοÏν οι Î¯Î´Î¹ÎµÏ ÎµÏιλογÎÏ."},{text:"Îάθε ενÏÏηÏα ÎÏει θεμαÏικÎÏ ÏειÏÎÏ Î²Î¯Î½Ïεο (Ï.Ï. «SWEAT 16») με Ïο κοÏ
μÏί «ΠÏοβολή ÏλÏν» δεξιά για να δείÏε ολÏκληÏη Ïη ÏειÏά."}]}]},{id:"videos",title:"ÎίνÏεο, ÏίλÏÏα & αναζήÏηÏη",description:"Workouts, ÎιαλογιÏμοί, Breathworks, αναÏαÏαγÏγή και εÏÏεÏη ÏεÏιεÏομÎνοÏ
",icon:No,guides:[{title:"Î ÏÏ Î²ÏίÏÎºÏ Ïο βίνÏεο ÏοÏ
θÎÎ»Ï Î¼Îµ Ïα ÏίλÏÏα",intro:"Τα ίδια ÏίλÏÏα Ï
ÏάÏÏοÏ
ν ÏÏην κενÏÏική Ïελίδα ÏÏν βίνÏεο και μÎÏα Ïε κάθε καÏηγοÏία.",steps:[{text:"ÎνοίξÏε Ï.Ï. Ïα Workouts και ενÏοÏίÏÏε Ïο κοÏ
μÏί «ΦίλÏÏα» ÏÎ¬Î½Ï Î±ÏÏ ÏÎ¹Ï ÏειÏÎÏ Î²Î¯Î½Ïεο.",image:x7,caption:"Î Ïελίδα Workouts με Ïο κοÏ
μÏί «ΦίλÏÏα» και ÏÎ¹Ï Î¸ÎµÎ¼Î±ÏικÎÏ ÏειÏÎÏ."},{text:"ΠαÏήÏÏε «ΦίλÏÏα» για να ανοίξει η μÏάÏα με ÏÎ¹Ï ÎµÏιλογÎÏ: ÎαÏηγοÏίεÏ, ÎÏίÏεδο ÎÏ
ÏκολίαÏ, Muscle Group, ÎιάÏκεια και ÎκÏαιδεÏ
ÏήÏ.",image:v7,caption:"ΠανοιÏÏή μÏάÏα ÏίλÏÏÏν με Ïα ÏÎνÏε διαθÎÏιμα κÏιÏήÏια."},{text:"ΣÏ
νδÏ
άÏÏε ÏÏα ÏίλÏÏα θÎλεÏε (Ï.Ï. ÎÏίÏεδο «Beginner» + ÎιάÏκεια «ÎÏÏ 20 λεÏÏά»). Τα αÏοÏελÎÏμαÏα ανανεÏνονÏαι αμÎÏÏÏ."},{text:"Îια να εÏιÏÏÏÎÏεÏε Ïε Ïλα Ïα βίνÏεο, εÏαναÏÎÏεÏε κάθε ÏίλÏÏο ÏÏην Ïιμή «Îλα»."}]},{title:"Î ÏÏ ÏαÏακολοÏ
Î¸Ï Îνα βίνÏεο και ÏÏ
νεÏÎ¯Î¶Ï Î±ÏÏ ÎµÎºÎµÎ¯ ÏοÏ
Îμεινα",steps:[{text:"ΠαÏήÏÏε Ïην κάÏÏα ÏοÏ
βίνÏεο. ΣÏην κάÏÏα ÏαίνονÏαι Ïο εÏίÏεδο (Ï.Ï. Advanced) και η διάÏκεια (Ï.Ï. 17 min)."},{text:"Το βίνÏεο ανοίγει Ïε δική ÏοÏ
Ïελίδα με Ïον player, Ïην ÏεÏιγÏαÏή και Ïον εκÏαιδεÏ
Ïή."},{text:"Î ÏÏÏÎ¿Î´Î¿Ï Î±ÏοθηκεÏεÏαι αÏ
ÏÏμαÏα κάθε λίγα δεÏ
ÏεÏÏλεÏÏα, οÏÏÏε αν ÏÏγεÏε και εÏιÏÏÏÎÏεÏε ÏÏην ίδια ÏÏ
ÏκεÏ
ή, η αναÏαÏαγÏγή ÏÏ
νεÏίζει αÏÏ Ïο Ïημείο ÏοÏ
ÏÏαμαÏήÏαÏε (για ÎÏÏ 7 ημÎÏεÏ)."},{text:"Îια ÏλήÏη οθÏνη ÏÏηÏιμοÏοιήÏÏε Ïο ανÏίÏÏοιÏο κοÏ
μÏί ÏοÏ
player. Σε κινηÏÏ Î¼ÏοÏείÏε να γÏ
ÏίÏεÏε Ïη ÏÏ
ÏκεÏ
ή οÏιζÏνÏια."}],note:"Îν Ïο βίνÏεο κολλάει: ελÎγξÏε Ïη ÏÏνδεÏή ÏαÏ, κάνÏε ανανÎÏÏη ÏÎ·Ï ÏÎµÎ»Î¯Î´Î±Ï ÎºÎ±Î¹ αÏενεÏγοÏοιήÏÏε ÏÏ
ÏÏν ad blocker για Ïο wellbe.gr."},{title:"ÎιαÏί βλÎÏÏ ÏαÏάθÏ
Ïο «ÎίνεÏε ÎÎλοÏ» ανÏί για Ïο βίνÏεο",steps:[{text:"Το ÏεÏιεÏ
721Ïμενο ÏÏν Workouts, ÎιαλογιÏμÏν και Breathworks είναι διαθÎÏιμο Ïε μÎλη. ΧÏÏÎ¯Ï ÎµÎ½ÎµÏγή ÏÏ
νδÏομή εμÏανίζεÏαι Ïο ÏαÏάθÏ
Ïο ÏÏ
νδÏομήÏ.",image:g7,caption:"Το ÏαÏάθÏ
Ïο «ÎίνεÏε ÎÎÎ»Î¿Ï ÏÏα Well Be Workouts»."},{text:"Îν είÏÏε ήδη μÎλοÏ, ÏαÏήÏÏε «ÎίÏÏε ήδη ÎÎλοÏ; ΣÏ
νδεθείÏε ÎδÏ» και ÏÏ
νδεθείÏε με Ïον λογαÏιαÏÎ¼Ï ÏαÏ."},{text:"Îν είÏÏε νÎÎ¿Ï ÏÏήÏÏηÏ, ÏαÏήÏÏε «ÎοκιμάÏÏε ÎÏÏεάν για 7 ημÎÏεÏ!» για να ξεκινήÏεÏε Ïη δοκιμή."},{text:"Îν είÏÏε ÏÏ
νδεδεμÎÎ½Î¿Ï ÎºÎ±Î¹ ÎÏεÏε ενεÏγή ÏÏ
νδÏομή αλλά βλÎÏεÏε Ïο ÏαÏάθÏ
Ïο, ανανεÏÏÏε Ïη Ïελίδα ή αÏοÏÏ
νδεθείÏε και ÏÏ
νδεθείÏε ξανά ÏÏÏε να ενημεÏÏθεί η καÏάÏÏαÏη ÏÏ
νδÏομήÏ."}]},{title:"Podcast: ακÏÏαÏη δÏÏεάν ή ÏÏοβολή Ïε βίνÏεο",steps:[{text:"ΣÏη Ïελίδα Podcast («Nadia Talks Wellness») Ï
ÏάÏÏοÏ
ν δÏο κοÏ
μÏιά: «ÎκοÏÏÏε Ïο Podcast (free)» και «ÎείÏε Ïο Podcast (members)».",image:y7,caption:"Î Ïελίδα ÏοÏ
podcast με ÏÎ¹Ï Î´Ïο εÏιλογÎÏ ÏαÏακολοÏθηÏηÏ."},{text:"ΠακÏÏαÏη ÏÏν εÏειÏοδίÏν είναι δÏÏεάν και γίνεÏαι αÏεÏ
Î¸ÎµÎ¯Î±Ï Î±ÏÏ Ïη Ïελίδα, ÏÏÏÎ¯Ï Î¼ÎµÏάβαÏη Ïε άλλη ÏλαÏÏÏÏμα."},{text:"Î ÏÏοβολή ÏÏν εÏειÏοδίÏν Ïε μοÏÏή βίνÏεο, ÏÏÏÎ¯Ï Î´Î¹Î±ÏημίÏειÏ, είναι διαθÎÏιμη ÏÏα μÎλη."},{text:"Τα εÏειÏÏδια εμÏανίζονÏαι με ÏειÏά αÏÏ Ïο Ïιο ÏÏÏÏÏαÏο ÏÏÎ¿Ï Ïα ÏαλαιÏÏεÏα, ανά ÏεζÏν."}]},{title:"ΣÏ
νÏαγÎÏ: αναζήÏηÏη και καÏηγοÏίεÏ",steps:[{text:"ΣÏη Ïελίδα «Nadia's Recipes» ÏÏηÏιμοÏοιήÏÏε Ïο Ïεδίο «ÎναζήÏηÏη ÏÏ
νÏαγÏν...» για να βÏείÏε ÏÏ
νÏαγή με λÎξη-κλειδί.",image:b7,caption:"Î Ïελίδα ÏÏ
νÏαγÏν με αναζήÏηÏη, καÏηγοÏÎ¯ÎµÏ ÎºÎ±Î¹ αÏÎ¹Î¸Î¼Ï Î±ÏοÏελεÏμάÏÏν."},{text:"ΦιλÏÏάÏεÏε με Ïα κοÏ
μÏιά καÏηγοÏιÏν: Îλα, ÎÎÎ¥ÎÎΤÎ, ΣÎÎÎΤÎΣ, ΣÎÎÎ, ÎÎÎ¥ÎÎ, ΡÎΦÎÎÎΤÎ."},{text:"ÎάÏÏ Î±ÏÏ Ïα ÏίλÏÏα βλÎÏεÏε ÏÏÏα αÏοÏελÎÏμαÏα Ï
ÏάÏÏοÏ
ν και Ïε Ïοια Ïελίδα βÏίÏκεÏÏε. ΧÏηÏιμοÏοιήÏÏε Ïη ÏελιδοÏοίηÏη ÏÏο ÏÎÎ»Î¿Ï Î³Î¹Î± ÏÎ¹Ï ÎµÏÏÎ¼ÎµÎ½ÎµÏ ÏÏ
νÏαγÎÏ."},{text:"ΠαÏήÏÏε Ïο εικονίδιο ⺠ÏÎ¬Î½Ï ÏÏη ÏÏÏογÏαÏία για να ανοίξει Ïο βίνÏεο ÏÎ·Ï ÏÏ
νÏαγήÏ."}]}]},{id:"subscriptions",title:"ΣÏ
νδÏομÎÏ, ÏÏεÏÏÎµÎ¹Ï & ÏαÏαÏÏαÏικά",description:"ΠακÎÏα, αλλαγή ÏλάνοÏ
, ακÏÏÏÏη, κάÏÏα ÏληÏÏμήÏ",icon:Ir,guides:[{title:"Τα ÏακÎÏα ÏÏ
νδÏομήÏ",steps:[{text:"Îηνιαία: â¬9,90 Ïον μήνα, με ανανÎÏÏη κάθε μήνα."},{text:"6 ÎήνεÏ: â¬49 ÏÏ
νολικά για 6 Î¼Î®Î½ÎµÏ (εξοικονÏμηÏη â¬10,40 Ïε ÏÏÎÏη με Ïη μηνιαία)."},{text:"ÎÏήÏια: â¬99 Ïον ÏÏÏνο (εξοικονÏμηÏη â¬19,80)."},{text:"Îλα Ïα ÏακÎÏα δίνοÏ
ν αÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Workouts, ÎιαλογιÏμοÏÏ ÎºÎ±Î¹ Breathworks, podcast ÏÏÏÎ¯Ï Î´Î¹Î±ÏημίÏειÏ, ÏÎ»ÎµÏ ÏÎ¹Ï ÏÏ
νÏαγÎÏ ÎºÎ±Î¹ ÏÏÏÏβαÏη ÏÏο Well Be community.",image:ik,caption:"ΣÏγκÏιÏη ÏÏν ÏÏιÏν ÏακÎÏÏν και ÏÏν ÏαÏοÏÏν ÏοÏ
Ï."}]},{title:"Î Î¿Ï Î²Î»ÎÏÏ Ïη ÏÏ
νδÏομή και ÏÎ¹Ï ÏÏεÏÏÎµÎ¹Ï Î¼Î¿Ï
",steps:[{text:"ΣÏ
νδεθείÏε και ÏαÏήÏÏε «ΠÎογαÏιαÏμÏÏ Î¼Î¿Ï
» ÏÎ¬Î½Ï Î´ÎµÎ¾Î¹Î¬ ÏÏο μενοÏ.",image:ok,imageAspect:"aspect-[1053/100]",caption:"Το κοÏ
μÏί «ΠÎογαÏιαÏμÏÏ Î¼Î¿Ï
» βÏίÏκεÏαι ÏÎ¬Î½Ï Î´ÎµÎ¾Î¹Î¬, δίÏλα ÏÏην «ÎξοδοÏ»."},{text:"ΣÏον λογαÏιαÏÎ¼Ï ÏÎ±Ï ÎµÏιλÎξÏε Ïην καÏÏÎλα «𧾠ΧÏεÏÏειÏ» (ÏÎÏαÏÏη καÏÏÎλα).",image:Qx,imageAspect:"aspect-[1185/100]",caption:"Îι καÏÏÎÎ»ÎµÏ ÏοÏ
λογαÏιαÏμοÏ: ÎÏιÏκÏÏηÏη, ÎÏÏοÏικÏ, ÎγαÏημÎνα, ΧÏεÏÏειÏ, Î ÏοÏίλ."},{text:"ΣÏÎ¹Ï Â«Î Î»Î·ÏοÏοÏÎ¯ÎµÏ ÎÎλοÏ
Ï» βλÎÏεÏε Ïην καÏάÏÏαÏη ÏÎ·Ï ÏÏ
νδÏομήÏ, Ïην ÏελεÏ
Ïαία ÏληÏÏμή, Ïην ημεÏομηνία εÏÏÎ¼ÎµÎ½Î·Ï Î±Î½Î±Î½ÎÏÏÎ·Ï ÎºÎ±Î¹ Ïην κάÏÏα ÏληÏÏμήÏ.",image:j7,imageAspect:"aspect-[366/100]",caption:"ÎÏιÏκÏÏηÏη ÏÏ
νδÏÎ¿Î¼Î®Ï Î¼Îµ ημεÏομηνία εÏÏÎ¼ÎµÎ½Î·Ï ÏÏÎÏÏÎ·Ï ÎºÎ±Î¹ ενεÏγή κάÏÏα."},{text:"Πιο κάÏÏ, ÏÏÎ¹Ï Â«ÎÏÎ¿Î´ÎµÎ¯Î¾ÎµÎ¹Ï Î Î±ÏοÏÎ®Ï Î¥ÏηÏεÏιÏν», καÏεβάζεÏε Ïο ΦοÏÎ¿Î»Î¿Î³Î¹ÎºÏ Î Î±ÏαÏÏαÏÎ¹ÎºÏ ÎºÎ¬Î¸Îµ ÏληÏÏÎ¼Î®Ï ÏαÏÏνÏÎ±Ï Â«PDF».",image:N7,imageAspect:"aspect-[248/100]",caption:"ΠαÏήÏÏε «PDF» ÏÏη γÏαμμή ÏÎ·Ï ÏληÏÏÎ¼Î®Ï Î³Î¹Î± να καÏεβάÏεÏε Ïο ÏαÏαÏÏαÏικÏ."}],note:"Îν ÏÏην κάÏÏα ÏληÏÏÎ¼Î®Ï ÎµÎ¼ÏανίζεÏαι «Îεν διαθÎÏιμο», ÏÏ
νήθÏÏ ÏÏÏκειÏαι για ÏαλαιÏÏεÏη ÏÏ
νδÏομή· εÏικοινÏνήÏÏε μαζί Î¼Î±Ï ÎºÎ±Î¹ Ïο διοÏθÏνοÏ
με."},{title:"Î ÏÏ Î±Î»Î»Î¬Î¶Ï ÏακÎÏο ή κάÏÏα ÏληÏÏμήÏ",steps:[{text:"ΠηγαίνεÏε «ΠÎογαÏιαÏμÏÏ Î¼Î¿Ï
» â καÏÏÎλα «𧾠ΧÏεÏÏειÏ».",image:Qx,imageAspect:"aspect-[1185/100]",caption:"ΠκαÏÏÎλα «ΧÏεÏÏειÏ» ÏÏον λογαÏιαÏÎ¼Ï ÏαÏ."},{text:"ΣÏην ενÏÏηÏα «ÎιαÏείÏιÏη ΣÏ
νδÏομήÏ» ÏαÏήÏÏε «ÎιαÏείÏιÏη ÎεθÏδÏν ΠληÏÏμήÏ» για να αλλάξεÏε κάÏÏα ή ÏÏοιÏεία ÏÏÎÏÏηÏ. Îνοίγει Ïο αÏÏαλÎÏ ÏεÏιβάλλον ÏÎ·Ï Stripe, ÏÏοÏ
ÏÏοÏθÎÏεÏε νÎα κάÏÏα και Ïην οÏίζεÏε ÏÏ ÏÏοεÏιλεγμÎνη.",image:_7,imageAspect:"aspect-[378/100]",caption:"Το κοÏ
μÏί «ÎιαÏείÏιÏη ÎεθÏδÏν ΠληÏÏμήÏ» δεξιά αÏÏ Ïην ÏÏÎÏοÏ
Ïα κάÏÏα."},{text:"Îια αλλαγή ÏακÎÏοÏ
ÏαÏήÏÏε «Îλλαγή ΠλάνοÏ
» (αναβάθμιÏη ή Ï
ÏοβάθμιÏη) και διαλÎξÏε Ïο νÎο Ïλάνο. ΠαναβάθμιÏη ενεÏγοÏοιείÏαι άμεÏα και η νÎα ÏιμολÏγηÏη ξεκινά ÏÏο ÏÎÎ»Î¿Ï ÏÎ·Ï ÏÏÎÏοÏ
ÏÎ±Ï ÏεÏιÏδοÏ
."},{text:"Îα λάβεÏε email εÏιβεβαίÏÏÎ·Ï Î³Î¹Î± κάθε αλλαγή."}],note:"Τα ÏÏοιÏεία ÏÎ·Ï ÎºÎ¬ÏÏÎ±Ï Î´ÎµÎ½ αÏοθηκεÏονÏαι ÏÏο Well Be â η καÏαÏÏÏηÏη γίνεÏαι αÏοκλειÏÏικά μÎÏα ÏÏο ÏεÏιβάλλον ÏÎ·Ï Stripe."},{title:"Î ÏÏ Î±ÎºÏ
ÏÏÎ½Ï Ïη ÏÏ
νδÏομή μοÏ
",steps:[{text:"ΣÏ
νδεθείÏε και ÏαÏήÏÏε «ΠÎογαÏιαÏμÏÏ Î¼Î¿Ï
» ÏÎ¬Î½Ï Î´ÎµÎ¾Î¹Î¬.",image:ok,imageAspect:"aspect-[1053/100]",caption:"ÎίÏÎ¿Î´Î¿Ï ÏÏον λογαÏιαÏÎ¼Ï ÏαÏ."},{text:"ÎÏιλÎξÏε Ïην καÏÏÎλα «𧾠ΧÏεÏÏειÏ».",image:Qx,imageAspect:"aspect-[1185/100]",caption:"ΠακÏÏÏÏη γίνεÏαι αÏÏ Ïην καÏÏÎλα «ΧÏεÏÏειÏ»."},{text:"ÎαÏεβείÏε ÏÏην ενÏÏηÏα «ÎιαÏείÏιÏη ΣÏ
νδÏομήÏ» και ÏαÏήÏÏε «ÎκÏÏÏÏη ΣÏ
νδÏομήÏ» (κÏκκινη εÏιλογή, κάÏÏ Î´ÎµÎ¾Î¹Î¬).",image:k7,imageAspect:"aspect-[378/100]",caption:"ΠεÏιλογή «ÎκÏÏÏÏη ΣÏ
νδÏÎ¿Î¼Î®Ï â ÎκÏÏÏÏη ÏÏο ÏÎÎ»Î¿Ï ÏÎ·Ï ÏεÏιÏδοÏ
»."},{text:"ΣÏο ÏαÏάθÏ
Ïο εÏιβεβαίÏÏÎ·Ï ÏαÏήÏÏε ξανά «ÎκÏÏÏÏη ΣÏ
νδÏομήÏ» για να ολοκληÏÏθεί.",image:S7,imageAspect:"aspect-[364/100]",caption:"Το κÏκκινο κοÏ
μÏί εÏιβεβαιÏνει Ïην ακÏÏÏÏη· Ïο «ÎκÏÏÏÏη» κλείνει Ïο ÏαÏάθÏ
Ïο ÏÏÏÎ¯Ï Î±Î»Î»Î±Î³Î®."},{text:"ÎεÏά Ïην ακÏÏÏÏη βλÎÏεÏε Ïην Îνδειξη «ΣÏ
νδÏομή Ïε ÎκÏÏÏÏη» με Ïην ημεÏομηνία λήξηÏ. ÎιαÏηÏείÏε ÏλήÏη ÏÏÏÏβαÏη μÎÏÏι εκείνη Ïην ημÎÏα.",image:C7,imageAspect:"aspect-[978/100]",caption:"ÎÏιβεβαίÏÏη: η ÏÏ
νδÏομή θα ακÏ
ÏÏθεί ÏÏην ημεÏομηνία ÏοÏ
εμÏανίζεÏαι."},{text:"Îν ακÏ
ÏÏÏεÏε μÎÏα ÏÏÎ¹Ï 7 ημÎÏÎµÏ ÏÎ·Ï Î´ÏÏεάν δοκιμήÏ, δεν γίνεÏαι καμία ÏÏÎÏÏη."},{text:"ÎÏοÏείÏε να εÏιÏÏÏÎÏεÏε ÏÏοÏε θÎλεÏε εÏιλÎγονÏÎ±Ï Î¾Î±Î½Î¬ ÏακÎÏο â Ïο ιÏÏοÏÎ¹ÎºÏ ÎºÎ±Î¹ Ïο ÏÏοÏίλ ÏÎ±Ï ÏαÏαμÎνοÏ
ν."}]},{title:"ÎÏÎÏÏ
Ïε η ÏληÏÏμή μοÏ
â Ïι κάνÏ;",steps:[{text:"Îα λάβεÏε email αÏÏ ÎµÎ¼Î¬Ï Î¼Îµ ενημÎÏÏÏη για Ïην αÏοÏÏ
ÏημÎÎ
721½Î· ÏÏÎÏÏη."},{text:"ΣÏην καÏÏÎλα «𧾠ΧÏεÏÏειÏ» θα δείÏε Ïο μήνÏ
μα «ΠÏÏβλημα με Ïη ΣÏ
νδÏομή». ΠαÏήÏÏε «ÎιαÏείÏιÏη ÎεθÏδÏν ΠληÏÏμήÏ».",image:E7,imageAspect:"aspect-[610/100]",caption:"Το κοÏ
μÏί μÎÏα ÏÏην κίÏÏινη ειδοÏοίηÏη ÏÎ±Ï Î¿Î´Î·Î³ÎµÎ¯ ÏÏην ενημÎÏÏÏη κάÏÏαÏ."},{text:"ÎλÎγξÏε αν η κάÏÏα ÎÏει λήξει ή αν Ï
ÏάÏÏει εÏαÏκÎÏ Ï
ÏÏλοιÏο και καÏαÏÏÏήÏÏε νÎα κάÏÏα αν ÏÏειάζεÏαι. Î ÏÏÎÏÏη εÏαναλαμβάνεÏαι αÏ
ÏÏμαÏα και η ÏÏÏÏβαÏη αÏοκαθίÏÏαÏαι."},{text:"Îν Ïο ÏÏÏβλημα ÏαÏαμÎνει, ÏÏείλÏε Î¼Î±Ï Î¼Î®Î½Ï
μα με Ïη ÏÏÏμα ÏÏο ÏÎÎ»Î¿Ï Î±Ï
ÏÎ®Ï ÏÎ·Ï ÏελίδαÏ."}]}]},{id:"gift-cards",title:"ÎάÏÏÎµÏ ÎÏÏοÏ
",description:"ÎγοÏά και εξαÏγÏÏÏÏη κάÏÏÎ±Ï Î´ÏÏοÏ
",icon:La,guides:[{title:"Î ÏÏ Î±Î³Î¿ÏÎ¬Î¶Ï ÎºÎ¬ÏÏα δÏÏοÏ
",steps:[{text:"ΠηγαίνεÏε ÏÏη Ïελίδα «ÎάÏÏÎµÏ ÎÏÏοÏ
Well Be» (αÏÏ Ïο footer: «ÎγοÏά ÎάÏÏÎ±Ï ÎÏÏοÏ
»).",image:w7,caption:"Î Ïελίδα καÏÏÏν δÏÏοÏ
: αÏιÏÏεÏά η αγοÏά, δεξιά η εξαÏγÏÏÏÏη."},{text:"ΣÏην αÏιÏÏεÏή κάÏÏα ÏαÏήÏÏε «Îνοιγμα Ïε νÎα καÏÏÎλα» για να ανοίξει Ïο αÏÏαλÎÏ ÏεÏιβάλλον αγοÏάÏ."},{text:"ÎÏιλÎξÏε αξία, ÏÏ
μÏληÏÏÏÏε Ïα ÏÏοιÏεία ÏοÏ
ÏαÏαλήÏÏη και Ïο μήνÏ
μά ÏÎ±Ï ÎºÎ±Î¹ ολοκληÏÏÏÏε Ïην ÏληÏÏμή."},{text:"Î ÏαÏαλήÏÏÎ·Ï Î»Î±Î¼Î²Î¬Î½ÎµÎ¹ email με Ïον Î¼Î¿Î½Î±Î´Î¹ÎºÏ ÎºÏÎ´Î¹ÎºÏ ÏÎ·Ï ÎºÎ¬ÏÏαÏ."}]},{title:"Î ÏÏ ÎµÎ¾Î±ÏγÏ
ÏÏÎ½Ï ÎºÎ¬ÏÏα δÏÏοÏ
",steps:[{text:"ΣÏην ίδια Ïελίδα, ÏÏη δεξιά κάÏÏα «ÎξαÏγÏÏÏÏη ÎάÏÏÎ±Ï ÎÏÏοÏ
», γÏάÏÏε Ïον κÏÎ´Î¹ÎºÏ ÏÏη μοÏÏή XXXX-XXXX-XXXX."},{text:"ΠαÏήÏÏε «ÎξαÏγÏÏÏÏη ÎάÏÏαÏ»."},{text:"Παξία εÏαÏμÏζεÏαι ÏÏη ÏÏ
νδÏομή ÏαÏ. Îι κάÏÏÎµÏ Î¹ÏÏÏοÏ
ν για 12 μήνεÏ, ÏÏηÏιμοÏοιοÏνÏαι μία ÏοÏά και δεν εÏιÏÏÏÎÏονÏαι Ïε ÏÏήμαÏα."}]}]},{id:"community",title:"Community",description:"ÎημοÏιεÏÏειÏ, ÏÏÏλια, αÏανÏήÏειÏ, emoji",icon:Ul,guides:[{title:"Î ÏÏ ÎºÎ¬Î½Ï Î´Î·Î¼Î¿ÏίεÏ
Ïη",steps:[{text:"ΣÏ
νδεθείÏε και εÏιλÎξÏε «Community» αÏÏ Ïο κενÏÏÎ¹ÎºÏ Î¼ÎµÎ½Î¿Ï. ΠκοινÏÏηÏα είναι διαθÎÏιμη ÏÏα μÎλη."},{text:"ΣÏη ÏÏÏμα δημοÏίεÏ
ÏÎ·Ï Î³ÏάÏÏε Ïο ÎºÎµÎ¯Î¼ÎµÎ½Ï ÏαÏ."},{text:"Î ÏοαιÏεÏικά ÏÏοÏθÎÏÏε ÏÏÏογÏαÏία ή GIF αÏÏ Ïον εÏιλογÎα μÎÏÏν και emoji αÏÏ Ïον εÏιλογÎα emoji."},{text:"ΠαÏήÏÏε δημοÏίεÏ
Ïη â Ïο post εμÏανίζεÏαι αμÎÏÏÏ ÏÏο feed με Ïο Ïνομά ÏαÏ."}],note:"Îν δεν ÎÏεÏε οÏίÏει nickname, εμÏανίζεÏαι Ïο ονομαÏεÏÏνÏ
Î¼Ï ÏαÏ. ÎÏοÏείÏε να οÏίÏεÏε nickname αÏÏ Ïο ÏÏοÏίλ ÏαÏ."},{title:"Î ÏÏ ÏÏÎ¿Î»Î¹Î¬Î¶Ï ÎºÎ±Î¹ αÏανÏÏ",steps:[{text:"ÎάÏÏ Î±ÏÏ ÎºÎ¬Î¸Îµ δημοÏίεÏ
Ïη ÏαÏήÏÏε Ïο εικονίδιο ÏÏολίοÏ
για να ανοίξει η ÏεÏιοÏή ÏÏολίÏν."},{text:"ÎÏάÏÏε Ïο ÏÏÏÎ»Î¹Ï ÏÎ±Ï ÎºÎ±Î¹ ÏÏοÏθÎÏÏε emoji με Ïο ανÏίÏÏοιÏο εικονίδιο δίÏλα ÏÏο Ïεδίο κειμÎνοÏ
."},{text:"Îια αÏάνÏηÏη Ïε ÏÏ
γκεκÏιμÎνο ÏÏÏλιο ÏαÏήÏÏε «ÎÏάνÏηÏη» κάÏÏ Î±ÏÏ Î±Ï
ÏÏ â η αÏάνÏηÏη εμÏανίζεÏαι Ïε νήμα."},{text:"Îε Ïην καÏδιά κάνεÏε like Ïε δημοÏιεÏÏÎµÎ¹Ï ÎºÎ±Î¹ ÏÏÏλια."}]}]},{id:"challenges",title:"Challenges & Badges",description:"ΣÏ
μμεÏοÏή Ïε ÏÏοκλήÏειÏ, ÏÏÏοδοÏ, διακÏίÏειÏ",icon:ss,guides:[{title:"Î ÏÏ ÏÏ
μμεÏÎÏÏ Ïε Îνα challenge",steps:[{text:"ÎÏαν ÏÏÎÏει ενεÏÎ³Ï challenge, εμÏανίζεÏαι banner ÏÏην κοÏÏ
Ïή ÏÏν ÏελίδÏν (Workouts, ΣÏ
νÏαγÎÏ, Podcast, Breathworks, ÎιαλογιÏμοί) με ανÏίÏÏÏοÏη μÎÏÏηÏη και κοÏ
μÏί «JOIN NOW!»."},{text:"ΠαÏήÏÏε Ïο banner ή ÏηγαίνεÏε ÏÏη Ïελίδα Challenges για να δείÏε Ïη λίÏÏα ÏÏν βίνÏεο ÏοÏ
challenge."},{text:"ΠαÏακολοÏ
θήÏÏε Ïα βίνÏεο με Ïη ÏειÏά â η ολοκλήÏÏÏη κάθε βίνÏεο καÏαγÏάÏεÏαι αÏ
ÏÏμαÏα ÏÏην ÏÏÏÎ¿Î´Ï ÏαÏ."},{text:"Î ÏÏÏοδÏÏ ÏÎ±Ï ÏαίνεÏαι ÏÏη Ïελίδα ÏοÏ
challenge και ÏÏον λογαÏιαÏÎ¼Ï ÏαÏ."}]},{title:"Badges και Hall of Fame",steps:[{text:"Τα badges αÏονÎμονÏαι αÏÏ Ïην ομάδα ÏοÏ
Well Be και εμÏανίζονÏαι δίÏλα ÏÏο avatar ÏÎ±Ï ÏÏην κοινÏÏηÏα."},{text:"ÎείÏε Ïα badges ÏÎ±Ï ÏÏο ÏÏοÏίλ ÏαÏ, ÏÏην καÏÏÎλα «Badges»."},{text:"ΣÏη Ïελίδα Hall of Fame ÏÏοβάλλονÏαι Ïα μÎλη ÏοÏ
ξεÏÏÏιÏαν."}]}]},{id:"account",title:"ÎογαÏιαÏμÏÏ & Î ÏοÏίλ",description:"ΣÏοιÏεία, κÏδικÏÏ, avatar, ιÏÏοÏικÏ, αγαÏημÎνα",icon:Qp,guides:[{title:"Î ÏÏ ÎµÎ½Î·Î¼ÎµÏÏÎ½Ï Ïα ÏÏοιÏεία και Ïη ÏÏÏογÏαÏία μοÏ
",steps:[{text:"ΠαÏήÏÏε Ïο avatar ÏÎ±Ï ÏÎ¬Î½Ï Î´ÎµÎ¾Î¹Î¬ και μÏείÏε ÏÏον λογαÏιαÏÎ¼Ï ÏαÏ."},{text:"ΣÏην καÏÏÎλα «ð¤ Î ÏοÏίλ» ÏÏ
μÏληÏÏÏÏε Ïνομα, εÏÏνÏ
μο, nickname και Ïα Ï
ÏÏλοιÏα ÏÏοιÏεία."},{text:"ÎνεβάÏÏε ÏÏÏογÏαÏία ÏÏοÏίλ αÏÏ Ïο ανÏίÏÏοιÏο Ïεδίο."},{text:"ÎÏοθηκεÏÏÏε ÏÎ¹Ï Î±Î»Î»Î±Î³ÎÏ â ενημεÏÏνονÏαι αμÎÏÏÏ ÎºÎ±Î¹ ÏÏην κοινÏÏηÏα."}]},{title:"Î ÏÏ Î±Î»Î»Î¬Î¶Ï ÎºÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏηÏ",steps:[{text:"Îν είÏÏε ÏÏ
νδεδεμÎνοι, ÏηγαίνεÏε ÏÏÎ¹Ï ÏÏ
θμίÏÎµÎ¹Ï ÏοÏ
ÏÏοÏίλ ÏÎ±Ï ÎºÎ±Î¹ εÏιλÎξÏε αλλαγή κÏδικοÏ."},{text:"Îν δεν θÏ
μάÏÏε Ïον κÏδικÏ, ÏÏη Ïελίδα «ÎίÏοδοÏ» δÏÏÏε Ïο email ÏÎ±Ï ÎºÎ±Î¹ ζηÏήÏÏε εÏαναÏοÏά κÏδικοÏ."},{text:"Îα λάβεÏε email με αÏÏαλή ÏÏνδεÏμο για να οÏίÏεÏε νÎο κÏδικÏ."},{text:"Îν ÏÏ
νδÎεÏÏε με Google, δεν ÏÏειάζεÏÏε κÏÎ´Î¹ÎºÏ â η ÏÏνδεÏη γίνεÏαι μÎÏÏ ÏοÏ
λογαÏιαÏÎ¼Î¿Ï Google ÏαÏ."}]},{title:"Î Î¿Ï Î²ÏίÏÎºÏ Ï,Ïι ÎÏÏ Î´ÎµÎ¹ και Ïα αγαÏημÎνα μοÏ
",steps:[{text:"ÎογαÏιαÏμÏÏ â καÏÏÎλα «ðº ÎÏÏοÏικÏ» για Ïλα Ïα βίνÏεο ÏοÏ
ÎÏεÏε ÏαÏακολοÏ
θήÏει."},{text:"ÎογαÏιαÏμÏÏ â καÏÏÎλα «â¤ï¸ ÎγαÏημÎνα» για ÏÏα ÎÏεÏε αÏοθηκεÏÏει με Ïην καÏδιά."},{text:"ΣÏην «ð ÎÏιÏκÏÏηÏη» βλÎÏεÏε ÏÏ
νοÏÏικά Ïη δÏαÏÏηÏιÏÏηÏά ÏαÏ."}]}]},{id:"mobile-browser",title:"ÎινηÏÏ (μÎÏÏ browser)",de
721scription:"ΧÏήÏη ÏοÏ
wellbe.gr αÏÏ Ïο κινηÏÏ ÏαÏ, ÏÏÏÎ¯Ï ÎµÏαÏμογή",icon:X5,guides:[{title:"Î ÏÏ ÏÏηÏιμοÏÎ¿Î¹Ï Ïο Well Be αÏÏ Ïον browser ÏοÏ
κινηÏοÏ",intro:"Το wellbe.gr λειÏοÏ
Ïγεί κανονικά αÏÏ ÎºÎ¬Î¸Îµ κινηÏÏ (Chrome, Safari κ.λÏ.) â δεν ÏÏειάζεÏαι να καÏεβάÏεÏε ÏίÏοÏα.",steps:[{text:"ÎνοίξÏε Ïο wellbe.gr αÏÏ Ïον browser ÏοÏ
κινηÏÎ¿Ï ÏαÏ. Το site ÏÏοÏαÏμÏζεÏαι ÏÏην οθÏνη και Ïο Î¼ÎµÎ½Î¿Ï Î²ÏίÏκεÏαι ÏÎ¬Î½Ï Î´ÎµÎ¾Î¹Î¬ (â°).",image:P7,caption:"Το wellbe.gr Ïε κινηÏÏ Î¼ÎÏÏ browser, με Ïο Î¼ÎµÎ½Î¿Ï (â°) ÏÎ¬Î½Ï Î´ÎµÎ¾Î¹Î¬.",imageAspect:"aspect-[390/844]"},{text:"Î ÏÏνδεÏη γίνεÏαι με email & κÏÎ´Î¹ÎºÏ Î® με Ïον λογαÏιαÏÎ¼Ï Google ÏαÏ."},{text:"ÎÏεÏε ÏÏÏÏβαÏη Ïε Ïλα: workouts, podcast, ÏÏ
νÏαγÎÏ, community, λογαÏιαÏμÏ, ÏÏεÏÏÎµÎ¹Ï ÎºÎ±Î¹ ÏαÏαÏÏαÏικά."},{text:"Î ÏοαιÏεÏικά μÏοÏείÏε να ÏÏοÏθÎÏεÏε Ïο site ÏÏην αÏÏική οθÏνη ÏοÏ
κινηÏοÏ: αÏÏ Ïο Î¼ÎµÎ½Î¿Ï ÏοÏ
browser εÏιλÎξÏε «ΠÏοÏθήκη ÏÏην αÏÏική οθÏνη»."}],note:"ΠεγγÏαÏή και η αγοÏά/ανανÎÏÏη ÏÏ
νδÏÎ¿Î¼Î®Ï Î³Î¯Î½Î¿Î½Ïαι ÏάνÏα αÏÏ Ïο wellbe.gr â είÏε αÏÏ ÎºÎ¹Î½Î·ÏÏ ÎµÎ¯Ïε αÏÏ Ï
ÏολογιÏÏή."},{title:"Ποια είναι η διαÏοÏά με Ïην εÏαÏμογή Well Be",steps:[{text:"Î browser εμÏανίζει Ïο site ÏÏÏÏ Ïο ξÎÏεÏε, με Ïο ίδιο design και Ïο Î¼ÎµÎ½Î¿Ï (â°)."},{text:"ΠεÏαÏμογή είναι ξεÏÏÏιÏÏή, με Ïιο αÏÎ»Ï ÏεÏιβάλλον ÏÏεδιαÏμÎνο για κινηÏÏ (λογÏÏÏ
Ïο ÏÏην κοÏÏ
Ïή, ÏλοήγηÏη αÏÏ Ïην κάÏÏ Î¼ÏάÏα)."},{text:"Το ÏεÏιεÏÏμενο και ο λογαÏιαÏμÏÏ ÎµÎ¯Î½Î±Î¹ Ïα ίδια και ÏÏα δÏο. ÎÏοÏείÏε να ÏÏηÏιμοÏοιείÏε ελεÏθεÏα και Ïα δÏο με Ïον ίδιο λογαÏιαÏμÏ."},{text:"ÎείÏε Ïην καÏηγοÏία «ÎÏαÏμογή Well Be (App)» για αναλÏ
ÏικÎÏ Î¿Î´Î·Î³Î¯ÎµÏ Î³Î¹Î± Ïην εÏαÏμογή."}]}]},{id:"app",title:"ÎÏαÏμογή Well Be (App)",description:"ÎήÏη αÏÏ Google Play / App Store, ÏÏνδεÏη και διαÏείÏιÏη λογαÏιαÏÎ¼Î¿Ï Î¼ÎÏα αÏÏ Ïην εÏαÏμογή",icon:vi,guides:[{title:"Τι είÎ
721½Î±Î¹ η εÏαÏμογή Well Be και αÏÏ ÏÎ¿Ï Ïην καÏεβάζÏ",intro:"ΠεÏαÏμογή Well Be είναι ξεÏÏÏιÏÏή αÏÏ Ïο site και καÏεβαίνει δÏÏεάν αÏÏ Ïο Google Play Store (Android) και Ïο App Store (iPhone). ÎναζηÏήÏÏε «Well Be».",steps:[{text:"Το ÏεÏιβάλλον ÏÎ·Ï ÎµÏαÏÎ¼Î¿Î³Î®Ï ÎµÎ¯Î½Î±Î¹ Ïιο αÏÎ»Ï Î±ÏÏ Ïο site: ÏÏην κοÏÏ
Ïή Ï
ÏάÏÏει μÏνο Ïο λογÏÏÏ
Ïο Well Be και η ÏλοήγηÏη γίνεÏαι αÏÏ Ïην κάÏÏ Î¼ÏάÏα με ÏÎνÏε εÏιλογÎÏ: Videos, Podcast, Account, Recipes, Community.",image:T7,caption:"ΠαÏÏική οθÏνη ÏÎ·Ï ÎµÏαÏÎ¼Î¿Î³Î®Ï Î¼Îµ ÏÎ¹Ï ÎºÎ±ÏηγοÏÎ¯ÎµÏ ÏÏοÏÏνηÏÎ·Ï ÎºÎ±Î¹ Ïην κάÏÏ Î¼ÏάÏα ÏλοήγηÏηÏ.",imageAspect:"aspect-[390/844]"},{text:"Το ÏεÏιεÏÏμενο είναι Ïο ίδιο με Ïο wellbe.gr και ενημεÏÏνεÏαι δÏ
ναμικά â Ï,Ïι ανεβαίνει ÏÏο site εμÏανίζεÏαι και ÏÏην εÏαÏμογή."}
721,{text:"ΠλογαÏιαÏμÏÏ ÎµÎ¯Î½Î±Î¹ ÎÎ½Î±Ï ÎºÎ±Î¹ ο ίδιοÏ: ÏÏÏοδοÏ, ιÏÏοÏÎ¹ÎºÏ ÎºÎ±Î¹ αγαÏημÎνα ÏÏ
γÏÏονίζονÏαι. ÎÏοÏείÏε να μÏαίνεÏε άλλοÏε αÏÏ Ïο site και άλλοÏε αÏÏ Ïην εÏαÏμογή, ÏÏÏÎ¯Ï ÎºÎ±Î½Îνα ÏÏÏβλημα."}],note:"Îεν ÏÏειάζεÏαι να εÏιλÎξεÏε Îνα αÏÏ Ïα δÏο. Îε Ïη ÏÏ
νδÏομή ÏÎ±Ï ÎÏεÏε ÏÏÏÏβαÏη και αÏÏ Ïο site και αÏÏ Ïην εÏαÏμογή."},{title:"Î ÏÏ ÏÏ
νδÎομαι ÏÏην εÏαÏμογή (και Ïι ιÏÏÏει αν μÏÎ±Î¯Î½Ï Î¼Îµ Google)",intro:"ΣÏην εÏαÏμογή δεν γίνεÏαι εγγÏαÏή. ΠεγγÏαÏή και η αγοÏά ÏÏ
νδÏÎ¿Î¼Î®Ï Î³Î¯Î½Î¿Î½Ïαι μÏνο ÏÏο wellbe.gr. ΣÏην εÏαÏμογή αÏλÏÏ ÏÏ
νδÎεÏÏε.",steps:[{text:"ÎάνÏε ÏÏÏÏα εγγÏαÏή και αÏοκÏήÏÏε ÏÏ
νδÏομή αÏÏ Ïο wellbe.gr."},{text:"ÎνοίξÏε Ïην εÏαÏμογή και ÏÏ
νδεθείÏε με email & κÏδικÏ. ΣÏην εÏαÏμογή δεν Ï
ÏάÏÏει ÏÏνδεÏη με Google â μÏνο email & κÏδικÏÏ."},{text:"Îν ÎÏεÏε κάνει εγγÏαÏή ή ÏÏ
νδÎεÏÏε ÏÏο site με Google, ÏÏÎÏει ÏÏÏÏα να οÏίÏεÏε κÏδικÏ: ÏÏο wellbe.gr â «ÎίÏοδοÏ» â «ÎÎÏαÏα Ïον κÏÎ´Î¹ÎºÏ Î¼Î¿Ï
», δÏÏÏε Ïο ίδιο email και θα λάβεÏε email με αÏÏαλή ÏÏνδεÏμο."},{text:"ÎÏίÏÏε νÎο κÏÎ´Î¹ÎºÏ ÎºÎ±Î¹ μεÏά ÏÏ
νδεθείÏε ÏÏην εÏαÏμογή με Ïο email ÏÎ±Ï ÎºÎ±Î¹ αÏ
ÏÏν Ïον κÏδικÏ. Îίναι ο Î¯Î´Î¹Î¿Ï Î»Î¿Î³Î±ÏιαÏμÏÏ Î¼Îµ Ïην ίδια ÏÏ
νδÏομή â δεν δημιοÏ
ÏγείÏαι νÎοÏ."}],note:"ΠκÏδικÏÏ ÏοÏ
οÏίζεÏε λειÏοÏ
Ïγεί και ÏÏο site: μεÏά μÏοÏείÏε να ÏÏ
νδÎεÏÏε είÏε με Google είÏε με email & κÏδικÏ."},{title:"Î ÏÏ ÏλοηγοÏμαι μÎÏα ÏÏην εÏαÏμογή",steps:[{text:"ÎÏÏ Ïην κάÏÏ Î¼ÏάÏα εÏιλÎγεÏε: Videos (βίνÏεο & ÏÏοÏονήÏειÏ), Podcast, Account (ο λογαÏιαÏμÏÏ ÏαÏ), Recipes (ÏÏ
νÏαγÎÏ) και Community.",image:A7,caption:"ÎίÏÏα βίνÏεο μÎÏα ÏÏην εÏαÏμογή, με Ïεδίο αναζήÏηÏÎ·Ï ÎºÎ±Î¹ Ïην κάÏÏ Î¼ÏάÏα ÏλοήγηÏηÏ.",imageAspect:"aspect-[390/844]"},{text:"ÎÎÏα Ïε κάθε καÏηγοÏία Ï
ÏάÏÏει Ïεδίο αναζήÏηÏÎ·Ï ÎºÎ±Î¹ ÏίλÏÏα (εÏίÏεδο, διάÏκεια, μÏ
Ïκή ομάδα), με ÏÎ¹Ï Î¯Î´Î¹ÎµÏ Î¸ÎµÎ¼Î±ÏικÎÏ ÎµÎ½ÏÏηÏÎµÏ ÏοÏ
ÎÏει και Ïο site."},{text:"ΠαÏÏνÏÎ±Ï Îνα βίνÏεο ανοίγει η αναÏαÏαγÏγή Ïε ÏλήÏη οθÏνη· η ÏÏÏÎ¿Î´Î¿Ï Î±ÏοθηκεÏεÏαι και ÏÏ
νεÏίζεÏε αÏÏ ÎµÎºÎµÎ¯ ÏοÏ
μείναÏε, ακÏμη κι αν ÏÏ
νεÏίÏεÏε αÏÏ Ïον Ï
ÏολογιÏÏή."}]},{title:"Î Î¿Ï Î²ÏίÏÎºÏ Ïον λογαÏιαÏÎ¼Ï Î¼Î¿Ï
μÎÏα αÏÏ Ïην εÏαÏμογή",steps:[{text:"ΣÏ
νδεδεμÎνοι ÏÏην εÏαÏμογή, ÏαÏήÏÏε «Account» ÏÏην κάÏÏ Î¼ÏάÏα. ΣÏην κοÏÏ
Ïή εμÏανίζεÏαι ο ÏαιÏεÏιÏμÏÏ Î¼Îµ Ïο Ïνομά ÏÎ±Ï ÎºÎ±Î¹ η Îνδειξη «⡠ÎνεÏÎ³Ï ÎÎλοÏ»."},{text:"ÎκÏιβÏÏ ÎºÎ¬ÏÏ Î±ÏÏ Ïον ÏαιÏεÏιÏÎ¼Ï Ï
ÏάÏÏοÏ
ν ÏÎνÏε καÏÏÎÎ»ÎµÏ Î¼Îµ εικονίδια. ΠαÏήÏÏε Ïην ð§¾ (ΧÏεÏÏειÏ) â εκεί βÏίÏκονÏαι η ÏÏ
νδÏομή, οι αÏοδείξειÏ, η κάÏÏα ÏληÏÏÎ¼Î®Ï ÎºÎ±Î¹ η ακÏÏÏÏη.",image:I7,caption:"Îι καÏÏÎÎ»ÎµÏ ÏοÏ
λογαÏιαÏÎ¼Î¿Ï ÏÏην εÏαÏμογή. Îε κÏκκινο η καÏÏÎλα «ΧÏεÏÏειÏ» (ð§¾).",imageAspect:"aspect-[390/844]"}],note:"ΣÏο κινηÏÏ Î¿Î¹ καÏÏÎÎ»ÎµÏ ÎµÎ¼ÏανίζονÏαι μÏνο με εικονίδια για να ÏÏÏάνε: ð ÎÏιÏκÏÏηÏη, ðº ÎÏÏοÏικÏ, â¤ï¸ ÎγαÏημÎνα, 𧾠ΧÏεÏÏειÏ, ð¤ Î ÏοÏίλ."},{title:"Î ÏÏ Î²Î»ÎÏÏ Ïη ÏÏ
νδÏομή και ÏÎ¹Ï Î±ÏÎ¿Î´ÎµÎ¯Î¾ÎµÎ¹Ï Î¼Î¿Ï
ÏÏην εÏαÏμογή",steps:[{text:"ΣÏην καÏÏÎλα 𧾠ΧÏεÏÏÎµÎ¹Ï Î±Î½Î¿Î¯Î³ÎµÎ¹ Ïο «ÎÏÏοÏÎ¹ÎºÏ Î Î»Î·ÏÏμÏν & ΤιμολογίÏν». ΣÏο ÏλαίÏιο «ΠληÏοÏοÏÎ¯ÎµÏ ÎÎλοÏ
Ï» βλÎÏεÏε ÏÏÏε γίναÏε μÎλοÏ, Ïην καÏάÏÏαÏη, Ïο ÏακÎÏο, Ïην ÏελεÏ
Ïαία και Ïην εÏÏμενη ÏληÏÏμή.",image:R7,caption:"ΠεÏιÏκÏÏηÏη ÏÏ
νδÏÎ¿Î¼Î®Ï Î¼ÎÏα ÏÏην εÏαÏμογή. Îε κÏκκινο Ïο ÏλαίÏιο «ΠληÏοÏοÏÎ¯ÎµÏ ÎÎλοÏ
Ï».",imageAspect:"aspect-[390/844]"},{text:"Πιο κάÏÏ Ï
ÏάÏÏει κάθε ÏληÏÏμή ÏÎ±Ï Î¼Îµ Ïην Îνδειξη «ΠληÏÏμÎνο», Ïο ÏοÏÏ, Ïην ημεÏομηνία και Ïον ÎÎΡÎ. ΠαÏήÏÏε «PDF» για να καÏεβάÏεÏε Ïο ÏοÏÎ¿Î»Î¿Î³Î¹ÎºÏ ÏαÏαÏÏαÏικÏ.",image:M7,caption:"Το ιÏÏοÏÎ¹ÎºÏ Î±ÏοδείξεÏν. Îε κÏκκινο Ïο κοÏ
μÏί λήÏÎ·Ï PDF.",imageAspect:"aspect-[390/844]"}],note:"Îι αÏÎ¿Î´ÎµÎ¯Î¾ÎµÎ¹Ï ÎµÎºÎ´Î¯Î´Î¿Î½Ïαι αÏ
ÏÏμαÏα μεÏά αÏÏ ÎºÎ¬Î¸Îµ εÏιÏÏ
ÏημÎÎ
721½Î· ÏληÏÏμή και ÏÎÏοÏ
ν ÎÎΡΠÎÎÎÎ."},{title:"Î ÏÏ Î±Î»Î»Î¬Î¶Ï ÎºÎ¬ÏÏα ή ÏÏοιÏεία ÏÏÎÏÏÎ·Ï Î±ÏÏ Ïην εÏαÏμογή",steps:[{text:"ÎάÏÏ Î±ÏÏ ÏÎ¹Ï Î±ÏοδείξειÏ, ÏÏην ενÏÏηÏα «ÎιαÏείÏιÏη ΣÏ
νδÏομήÏ» â «ΤÏÏÏÎ¿Ï Î Î»Î·ÏÏμήÏ», βλÎÏεÏε Ïην κάÏÏα ÏοÏ
ÏÏεÏνεÏαι και ÏαÏάÏε «ÎιαÏείÏιÏη ÎεθÏδÏν ΠληÏÏμήÏ». Îν μια ÏÏÎÏÏη αÏÎÏÏ
Ïε, εμÏανίζεÏαι και Ïο ÏλαίÏιο «ΠÏÏβλημα με Ïη ΣÏ
νδÏομή» με Ïο ίδιο κοÏ
μÏί.",image:O7,caption:"Îε κÏκκινο Ïο κοÏ
μÏί «ÎιαÏείÏιÏη ÎεθÏδÏν ΠληÏÏμήÏ» ÏÏην εÏαÏμογή.",imageAspect:"aspect-[390/844]"},{text:"Îνοίγει η αÏÏÎ±Î»Î®Ï Ïελίδα ÏÎ·Ï Stripe, ÏÏοÏ
ÏÏοÏθÎÏεÏε νÎα κάÏÏα, Ïην οÏίζεÏε ÏÏ ÏÏοεÏιλεγμÎνη και ενημεÏÏνεÏε Ïα ÏÏοιÏεία ÏÏÎÏÏηÏ."},{text:"ÎÏαν ÏελειÏÏεÏε, εÏιÏÏÏÎÏÏε ÏÏην εÏαÏμογή â η νÎα κάÏÏα εμÏανίζεÏαι ÏÏον «ΤÏÏÏο ΠληÏÏμήÏ»."}]},{title:"Î ÏÏ Î±ÎºÏ
ÏÏÎ½Ï Ïη ÏÏ
νδÏομή μοÏ
αÏÏ Ïην εÏαÏμογή",intro:"ΠακÏÏÏÏη γίνεÏαι Ïε ÏÏία βήμαÏα, μÎÏα αÏÏ Ïην καÏÏÎλα 𧾠ΧÏεÏÏειÏ.",steps:[{text:"ΣÏην ενÏÏηÏα «ÎιαÏείÏιÏη ΣÏ
νδÏομήÏ» ÏαÏήÏÏε Ïο κÏκκινο «ÎκÏÏÏÏη ΣÏ
νδÏÎ¿Î¼Î®Ï â ÎκÏÏÏÏη ÏÏο ÏÎÎ»Î¿Ï ÏÎ·Ï ÏεÏιÏδοÏ
».",image:D7,caption:"Îε κÏκκινο Ïο κοÏ
μÏί ακÏÏÏÏηÏ, κάÏÏ Î±ÏÏ Ïην «Îλλαγή ΠλάνοÏ
».",imageAspect:"aspect-[390/844]"},{text:"ΣÏο ÏαÏάθÏ
Ïο εÏιβεβαίÏÏÎ·Ï ÏαÏήÏÏε ξανά «ÎκÏÏÏÏη ΣÏ
νδÏομήÏ» για να ολοκληÏÏθεί."},{text:"ÎεÏά Ïην ακÏÏÏÏη εμÏανίζεÏαι η καÏάÏÏαÏη «ΣÏ
νδÏομή Ïε ÎκÏÏÏÏη» με Ïην ημεÏομηνία Î»Î®Î¾Î·Ï ÏÎ·Ï ÏÏÏÏβαÏÎ®Ï ÏαÏ."}]}]}],L7={α:"a",ά:"a",β:"v",γ:"g",δ:"d",ε:"e",Î:"e",ζ:"z",η:"i",ή:"i",θ:"th",ι:"i",ί:"i",Ï:"i",Î:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"x",ο:"o",Ï:"o",Ï:"p",Ï:"r",Ï:"s",Ï:"s",Ï:"t",Ï
:"y",Ï:"y",Ï:"y",ΰ:"y",Ï:"f",Ï:"ch",Ï:"ps",Ï:"o",Ï:"o"},F7=e=>e.toLowerCase().split("").map(t=>L7[t]??t).join("").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,70),Vh=e=>F7(e.title),Xx=()=>{var T,k;const e=qe(),{categorySlug:t,guideSlug:r}=la(),[n,a]=Do(),i=n.get("q")||"",[o,l]=h.useState(!1),[c,d]=h.useState({name:"",email:"",subject:"",message:"",attachment:null}),[u,m]=h.useState(!1),{toast:f}=at(),p=h.useRef({}),v=h.useRef(null),g=Zd.find(C=>C.id===t)||null,b=r?((T=g==null?void 0:g.guides.find(C=>Vh(C)===r))==null?void 0:T.title)||"":n.get("guide")&&((k=Zd.flatMap(C=>C.guides).find(C=>Vh(C)===n.get("guide")))==null?void 0:k.title)||"",y=b?`${(g==null?void 0:g.id)??"search"}-${b}`:"";h.useEffect(()=>{const C=v.current;if(!C||C!==y)return;const A=88;let L=0;const O=performance.now(),P=()=>{const M=p.current[C];if(M){const D=M.getBoundingClientRect().top-A;if(Math.abs(D)>2){const $=Math.max(document.documentElement.scrollHeight-window.innerHeight,0);window.scrollTo({top:Math.min(Math.max(window.scrollY+D,0),$)})}}performance.now()-O<900?L=requestAnimationFrame(P):v.current=null};return L=requestAnimationFrame(P),()=>cancelAnimationFrame(L)},[y]);const x=C=>{const A=C?Zd.flatMap(O=>O.guides).find(O=>C.endsWith(O.title)):void 0,L=A?Vh(A):"";if(v.current=C||null,i.trim()){const O=new URLSearchParams(n);L?O.set("guide",L):O.delete("guide"),a(O,{replace:!0,state:{preserveScroll:!0}});return}g&&e(L?`/help-center/${g.id}/${L}`:`/help-center/${g.id}`,{replace:!0,state:{preserveScroll:!0}})},w=C=>e(`/help-center/${C}`),j=()=>e("/help-center"),N=C=>{const A=new URLSearchParams;C.trim()&&A.set("q",C),e({pathname:"/help-center",search:A.toString()?`?${A}`:""},{replace:!0,state:{preserveScroll:!0}})},S=C=>{const{name:A,value:L}=C.target;d(O=>({...O,[A]:L}))},E=C=>{d(A=>{var L;return{...A,attachment:((L=C.target.files)==null?void 0:L[0])||null}})},_=async C=>{C.preventDefault(),m(!0);try{let A=null;if(c.attachment){const P=c.attachment,M=new FileReader;A=await new Promise(D=>{M.onload=()=>D({filename:P.name,content:M.result,contentType:P.type}),M.readAsDataURL(P)})}const{error:L}=await U.functions.invoke("send-support-email",{body:{name:c.name,email:c.email,phone:"",subject:c.subject,message:c.message,attachment:A}});if(L)throw L;f({title:"Το μήνÏ
μά ÏÎ±Ï ÏÏάλθηκε!",description:"Îα εÏικοινÏνήÏοÏ
με μαÎ
721¶Î¯ ÏÎ±Ï Ïο ÏÏ
νÏομÏÏεÏο δÏ
ναÏÏ."}),d({name:"",email:"",subject:"",message:"",attachment:null});const O=document.getElementById("help-attachment");O&&(O.value="")}catch(A){console.error("Error sending support form:",A),f({title:"ΣÏάλμα",description:"ÎάÏι Ïήγε ÏÏÏαβά. ΠαÏÎ±ÎºÎ±Î»Ï ÏÏοÏÏαθήÏÏε ξανά.",variant:"destructive"})}finally{m(!1)}},I=h.useMemo(()=>{const C=i.trim().toLowerCase();if(!C)return[];const A=[];return Zd.forEach(L=>{L.guides.forEach(O=>{[O.title,O.intro||"",...O.steps.map(M=>M.text),O.note||""].join(" ").toLowerCase().includes(C)&&A.push({categoryId:L.id,categoryTitle:L.title,guide:O})})}),A},[i]),R=(C,A)=>{const L=`${A}-${C.title}`;return s.jsxs(Kw,{value:L,ref:O=>{p.current[L]=O},className:"border rounded-lg px-4",children:[s.jsx(Qw,{className:"text-left text-sm sm:text-base font-semibold py-4",children:C.title}),s.jsxs(Xw,{className:"pb-5 space-y-4",children:[C.intro&&s.jsx("p",{className:"text-sm text-muted-foreground",children:C.intro}),s.jsx("ol",{className:"space-y-4",children:C.steps.map((O,P)=>{var M;return s.jsxs("li",{className:"space-y-2",children:[s.jsxs("div",{className:"flex gap-3",children:[s.jsx("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground text-xs font-semibold",children:P+1}),s.jsx("p",{className:"text-sm sm:text-base text-foreground leading-relaxed",children:O.text})]}),O.image&&s.jsxs("figure",{className:`ml-9 space-y-1 ${(M=O.imageAspect)!=null&&M.includes("390/844")?"max-w-[320px]":""}`,children:[s.jsx("div",{className:`w-full overflow-hidden rounded-lg border border-border shadow-sm bg-muted ${O.imageAspect||"aspect-[16/10]"}`,children:s.jsx("img",{src:O.image,alt:O.caption||O.text,loading:"lazy",className:`h-full w-full object-top ${O.imageAspect?"object-contain":"object-cover"}`})}),O.caption&&s.jsx("figcaption",{className:"text-xs text-muted-foreground",children:O.caption})]})]},P)})}),C.note&&s.jsxs("div",{className:"flex gap-2 rounded-lg bg-muted p-3",children:[s.jsx(uE,{className:"h-4 w-4 shrink-0 text-primary mt-0.5"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:C.note})]})]})]},L)};return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:b&&g?`${b} - ÎÎνÏÏο ÎÎ¿Î®Î¸ÎµÎ¹Î±Ï Well Be`:g?`${g.title} - ÎÎνÏÏο ÎÎ¿Î®Î¸ÎµÎ¹Î±Ï Well Be`:"ÎÎνÏÏο ÎÎ¿Î®Î¸ÎµÎ¹Î±Ï - Well Be by Nadia Boule",description:g?`${g.description}. ÎναλÏ
Ïικοί οδηγοί βήμα-βήμα με screenshots αÏÏ Ïο Well Be.`:"ÎναλÏ
Ïικοί οδηγοί με βήμαÏα και screenshots για Ïο Well Be: εγγÏαÏή, δÏÏεάν δοκιμή, βίνÏεο και ÏίλÏÏα, ÏÏ
νδÏομÎÏ, κάÏÏÎµÏ Î´ÏÏοÏ
, community και λογαÏιαÏμÏÏ.",keywords:"well be βοήθεια, κÎνÏÏο βοήθειαÏ, Î¿Î´Î·Î³Î¯ÎµÏ well be, ÏÏ
νδÏομή, Ï
ÏοÏÏήÏιξη",canonical:g?`https://wellbe.gr/help-center/${g.id}${b?`/${Vh({title:b,steps:[]})}`:""}`:"https://wellbe.gr/help-center"}),s.jsx(Fe,{isMenuOpen:o,onMenuToggle:()=>l(!o)}),s.jsx("main",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-10",children:s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-foreground mb-3",children:"ÎÎνÏÏο ÎοήθειαÏ"}),s.jsx("p",{className:"text-base sm:text-lg text-muted-foreground max-w-2xl mx-auto",children:"ÎναλÏ
Ïικοί οδηγοί βήμα-βήμα, με εικÏÎ½ÎµÏ Î±ÏÏ Ïο ίδιο Ïο Well Be."})]}),s.jsxs("div",{className:"relative max-w-2xl mx-auto mb-10",children:[s.jsx(Hr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(ke,{value:i,onChange:C=>{N(C.target.value)},placeholder:"ÎναζηÏήÏÏε Ï.Ï. «ακÏÏÏÏη», «ÏίλÏÏα», «κάÏÏα δÏÏοÏ
»...",className:"pl-9","aria-label":"ÎναζήÏηÏη ÏÏο ÎÎνÏÏο ÎοήθειαÏ"})]}),i.trim()?s.jsxs("section",{className:"mb-14",children:[s.jsxs("h2",{className:"text-xl font-bold text-foreground mb-4",children:[I.length," αÏοÏελÎÏμαÏα για «",i.trim(),"»"]}),I.length===0?s.jsx("p",{className:"text-muted-foreground",children:"Îεν βÏÎθηκε οδηγÏÏ. ÎοκιμάÏÏε άλλη λÎξη ή ÏÏείλÏε Î¼Î±Ï Î¼Î®Î½Ï
μα με Ïη ÏÏÏμα ÏαÏακάÏÏ."}):s.jsx(ub,{type:"single",collapsible:!0,className:"space-y-3",value:y,onValueChange:x,children:I.map(C=>R(C.guide,"search"))})]}):g?s.jsxs("section",{className:"mb-14",children:[s.jsxs(F,{variant:"ghost",className:"mb-4 -ml-2",onClick:j,children:[s.jsx(as,{className:"h-4 w-4 mr-2"}),"ÎÎ»ÎµÏ Î¿Î¹ καÏηγοÏίεÏ"]}),s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-1",children:g.title}),s.jsx("p",{className:"text-muted-foreground mb-6",children:g.description}),s.jsx(ub,{type:"single",collapsible:!0,className:"space-y-3",value:y,onValueChange:x,children:g.guides.map(C=>R(C,g.id))})]}):s.jsxs("section",{className:"mb-14",children:[s.jsx("h2",{className:"text-xl font-bold text-foreground mb-4",children:"ÎÏιλÎξÏε καÏηγοÏία"}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:Zd.map(C=>{const A=C.icon;return s.jsx("button",{type:"button",onClick:()=>w(C.id),className:"text-left",children:s.jsxs(oe,{className:"h-full transition-colors hover:border-primary",children:[s.jsxs(xe,{children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-muted",children:s.jsx(A,{className:"h-5 w-5 text-primary"})}),s.jsx(be,{className:"text-base",children:C.title})]}),s.jsx(gt,{className:"pt-2",children:C.description})]}),s.jsxs(ce,{className:"flex items-center text-sm text-primary font-medium",children:[C.guides.length," οδηγοί",s.jsx(Da,{className:"h-4 w-4 ml-1"})]})]})},C.id)})})]}),s.jsx("section",{children:s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsxs(be,{className:"flex items-center gap-2 text-lg",children:[s.jsx(Xp,{className:"h-5 w-5"}),"Îεν βÏήκαÏε Ïην αÏάνÏηÏη;"]}),s.jsx(gt,{children:"ΣÏείλÏε Î¼Î±Ï Î¼Î®Î½Ï
μα και θα ÏÎ±Ï Î±ÏανÏήÏοÏ
με Ïο ÏÏ
νÏομÏÏεÏο δÏ
ναÏÏ."})]}),s.jsx(ce,{children:s.jsxs("form",{onSubmit:_,className:"space-y-4",children:[s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"help-name",children:"Îνομα *"}),s.jsx(ke,{id:"help-name",name:"name",value:c.name,onChange:S,required:!0,placeholder:"Το Ïνομά ÏαÏ",className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"help-email",children:"Email *"}),s.jsx(ke,{id:"help-email",name:"email",type:"email",value:c.email,onChange:S,required:!0,placeholder:"[email protected]",className:"mt-1"})]})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"help-subject",children:"ÎαÏηγοÏία *"}),s.jsxs("select",{id:"help-subject",name:"subject",value:c.subject,onChange:S,required:!0,className:"mt-1 w-full px-3 py-2 border border-input bg-background rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-ring",children:[s.jsx("option",{value:"",children:"ÎÏιλÎξÏε καÏηγοÏία..."}),s.jsx("option",{value:"ÎίνÏεο & ÎναÏαÏαγÏγή",children:"ÎίνÏεο & ÎναÏαÏαγÏγή"}),s.jsx("option",{value:"ΣÏ
νδÏομÎÏ & ΧÏεÏÏειÏ",children:"ΣÏ
νδÏομÎÏ & ΧÏεÏÏειÏ"}),s.jsx("option",{value:"ÎογαÏιαÏμÏÏ & ΣÏνδεÏη",children:"ÎογαÏιαÏμÏÏ & ΣÏνδεÏη"}
721),s.jsx("option",{value:"ÎάÏÏÎµÏ ÎÏÏοÏ
",children:"ÎάÏÏÎµÏ ÎÏÏοÏ
"}),s.jsx("option",{value:"Community",children:"Community"}),s.jsx("option",{value:"Challenges",children:"Challenges"}),s.jsx("option",{value:"Îλλο",children:"Îλλο"})]})]}),s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"help-attachment",children:"ÎÏιÏÏναÏη"}),s.jsx(ke,{id:"help-attachment",type:"file",onChange:E,accept:"image/*,.pdf,.doc,.docx",className:"mt-1 file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-medium file:bg-muted file:text-muted-foreground hover:file:bg-muted/80"})]})]}),s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"help-message",children:"ÎήνÏ
μα *"}),s.jsx(So,{id:"help-message",name:"message",value:c.message,onChange:S,required:!0,rows:5,placeholder:"ΠεÏιγÏάÏÏε Î¼Î±Ï Ïο θÎμα ÏαÏ...",className:"mt-1 resize-none"})]}),s.jsxs(F,{type:"submit",className:"w-full",disabled:u,children:[s.jsx(Fa,{className:"h-4 w-4 mr-2"}),u?"ÎÏοÏÏολή...":"ÎÏοÏÏολή ÎηνÏμαÏοÏ"]})]})})]})})]})}),s.jsx(Be,{})]})},$7=()=>{const[e,t]=h.useState(""),[r,n]=h.useState(""),[a,i]=h.useState(!1),[o,l]=h.useState(!1),[c,d]=h.useState("checking"),[u,m]=h.useState(""),[f,p]=h.useState(!1),[v,g]=h.useState(!1),[b]=Do(),y=qe(),{toast:x}=at(),{resetPassword:w}=jt();h.useEffect(()=>{let S=!1;const E=async()=>{const{data:I}=await U.auth.getUser();return S?!1:I.user?(m(I.user.email||""),d("ready"),!0):!1};return(async()=>{const I=new URLSearchParams(window.location.hash.replace(/^#/,"")),R=I.get("error_code")||b.get("error_code");if(R){console.warn("Recovery link error:",R),d("invalid");return}const T=I.get("access_token")||b.get("access_token"),k=I.get("refresh_token")||b.get("refresh_token");if(T&&k){const{error:O}=await U.auth.setSession({access_token:T,refresh_token:k});if(!O&&await E())return}const C=b.get("code");if(C){const{error:O}=await U.auth.exchangeCodeForSession(C);if(!O&&await E())return}const A=b.get("token_hash")||I.get("token_hash"),L=b.get("type")||I.get("type")||"recovery";if(A){const{error:O}=await U.auth.verifyOtp({token_hash:A,type:L});if(!O&&await E())return}await E()||(await new Promise(O=>setTimeout(O,800)),!await E()&&(S||d("invalid")))})(),()=>{S=!0}},[b]);const j=async()=>{const S=u||window.prompt("Το email ÏαÏ:")||"";if(!S)return;g(!0);const{error:E}=await w(S.trim().toLowerCase());g(!1),x(E?{title:"Îεν ÏÏάλθηκε Ïο email",description:"ÎοκιμάÏÏε ξανά Ïε λίγο.",variant:"destructive"}:{title:"Î£Î±Ï ÏÏείλαμε νÎο ÏÏνδεÏμο",description:`ÎλÎγξÏε Ïο email ÏÏο ${S}.`})},N=async S=>{if(S.preventDefault(),e!==r){x({title:"Îι κÏδικοί δεν ÏαιÏιάζοÏ
ν",description:"ΠαÏÎ±ÎºÎ±Î»Ï Î²ÎµÎ²Î±Î¹ÏθείÏε ÏÏι οι κÏδικοί ÏÏÏÏβαÏÎ·Ï ÏαιÏιάζοÏ
ν.",variant:"destructive"});return}if(e.length<6){x({title:"ÎÏδικÏÏ ÏÎ¿Î»Ï ÏÏνÏομοÏ",description:"ΠκÏδικÏÏ ÏÏÏÏβαÏÎ·Ï ÏÏÎÏει να ÎÏει ÏοÏ
λάÏιÏÏον 6 ÏαÏακÏήÏεÏ.",variant:"destructive"});return}i(!0);try{const{error:E}=await U.auth.updateUser({password:e});if(E)throw E;const{data:_}=await U.auth.getUser();_.user&&(m(_.user.email||u),await U.from("profiles").update({password_set_at:new Date().toISOString()}).eq("user_id",_.user.id)),p(!0)}catch(E){console.error("Error setting password:",E),x({title:"ΣÏάλμα",description:E.message||"Î¥ÏήÏξε ÏÏÏβλημα με Ïον οÏιÏÎ¼Ï ÏοÏ
κÏδικοÏ. ÎοκιμάÏÏε ξανά.",variant:"destructive"})}finally{i(!1)}};return s.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[s.jsx(Fe,{isMenuOpen:o,onMenuToggle:()=>l(!o)}),s.jsx("div",{className:"flex-1 flex items-center justify-center p-4 pt-[80px] sm:pt-[88px] md:pt-[96px]",children:s.jsxs("div",{className:"w-full max-w-md",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("img",{src:"/lovable-uploads/463c9522-3313-4588-bd87-40273096d456.png",alt:"Well Be",className:"h-16 mx-auto mb-4"}),s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"ÎÏιÏμÏÏ ÎÏδικοÏ"}),s.jsx("p",{className:"text-muted-foreground mt-2",children:"ÎÏίÏÏε Îναν κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏÎ·Ï Î³Î¹Î± Ïον λογαÏιαÏÎ¼Ï ÏαÏ"})]}),c==="checking"&&s.jsx(oe,{children:s.jsxs(ce,{className:"py-10 flex flex-col items-center gap-3",children:[s.jsx(mt,{className:"h-6 w-6 animate-spin text-muted-foreground"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"ÎλεγÏÎ¿Ï ÏÏ
νδÎÏμοÏ
..."})]})}),c==="invalid"&&s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(be,{children:"Î ÏÏνδεÏÎ¼Î¿Ï Îληξε"}),s.jsx(gt,{children:"Î ÏÏνδεÏÎ¼Î¿Ï Î¿ÏιÏÎ¼Î¿Ï ÎºÏÎ´Î¹ÎºÎ¿Ï Î¹ÏÏÏει για ÏεÏιοÏιÏμÎνο ÏÏÏνο και μία μÏνο ÏÏήÏη."})]}),s.jsxs(ce,{className:"space-y-3",children:[s.jsxs(F,{className:"w-full",onClick:j,disabled:v,children:[v&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"ΣÏείλÏε μοÏ
νÎο ÏÏνδεÏμο"]}),s.jsx(F,{variant:"outline",className:"w-full",onClick:()=>y("/auth"),children:"ÎÏιÏÏÏοÏή ÏÏη ÏÏνδεÏη"})]})]}),c==="ready"&&f&&s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ms,{className:"h-5 w-5 text-primary"}),s.jsx(be,{children:"ÎÏοιμο!"})]}),s.jsx(gt,{children:"ΠκÏδικÏÏ ÏÎ±Ï Î¿ÏίÏÏηκε. ΣÏ
νδεθείÏε ÏÏην εÏαÏμογή Well Be με:"})]}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{className:"rounded-lg bg-muted p-4 text-sm",children:[s.jsx("p",{className:"text-muted-foreground",children:"Email"}),s.jsx("p",{className:"font-medium break-all",children:u}),s.jsx("p",{className:"text-muted-foreground mt-3",children:"ÎÏδικÏÏ"}),s.jsx("p",{className:"font-medium",children:"ο κÏδικÏÏ ÏοÏ
μÏÎ»Î¹Ï Î¿ÏίÏαÏε"})]}),s.jsx(F,{className:"w-full",onClick:()=>y("/auth"),children:"ΣÏνδεÏη με email και κÏδικÏ"}),s.jsx(F,{variant:"outline",className:"w-full",onClick:()=>
721y("/dashboard"),children:"ΣÏ
νÎÏεια ÏÏον λογαÏιαÏÎ¼Ï Î¼Î¿Ï
"})]})]}),c==="ready"&&!f&&s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(be,{children:"ÎÎÎ¿Ï ÎÏδικÏÏ Î ÏÏÏβαÏηÏ"}),s.jsx(gt,{children:u?`Îια Ïον λογαÏιαÏÎ¼Ï ${u}. Îα Ïον ÏÏηÏιμοÏοιείÏε για ÏÏνδεÏη ÏÏην εÏαÏμογή.`:"ÎÏιλÎξÏε Îναν ιÏÏÏ
ÏÏ ÎºÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏηÏ"})]}),s.jsx(ce,{children:s.jsxs("form",{onSubmit:N,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"password",children:"ÎÏδικÏÏ Î ÏÏÏβαÏηÏ"}),s.jsx(ke,{id:"password",type:"password",placeholder:"ÎιÏάγεÏε Ïον νÎο κÏδικÏ",value:e,onChange:S=>t(S.target.value),required:!0,minLength:6}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"ΤοÏ
λάÏιÏÏον 6 ÏαÏακÏήÏεÏ"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"confirmPassword",children:"ÎÏιβεβαίÏÏη ÎÏδικοÏ"}),s.jsx(ke,{id:"confirmPassword",type:"password",placeholder:"ÎÏαναλάβεÏε Ïον κÏδικÏ",value:r,onChange:S=>n(S.target.value),required:!0,minLength:6})]}),s.jsx(F,{type:"submit",className:"w-full",disabled:a,children:a?"ÎÏιÏμÏÏ ÎºÏδικοÏ...":"ÎÏιÏμÏÏ ÎºÏδικοÏ"})]})})]})]})}),s.jsx(Be,{})]})};function NT({images:e,currentIndex:t,isOpen:r,onClose:n,onNavigate:a}){const[i,o]=h.useState(null),[l,c]=h.useState(null),d=()=>{a(t>0?t-1:e.length-1)},u=()=>{a(t<e.length-1?t+1:0)},m=50,f=g=>{c(null),o(g.targetTouches[0].clientX)},p=g=>{c(g.targetTouches[0].clientX)},v=()=>{if(!i||!l)return;const g=i-l,b=g>m,y=g<-m;b?u():y&&d()};return h.useEffect(()=>{if(!r)return;const g=b=>{b.key==="ArrowLeft"&&d(),b.key==="ArrowRight"&&u(),b.key==="Escape"&&n()};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,t]),s.jsx(gr,{open:r,onOpenChange:g=>{g||n()},children:s.jsx(rr,{className:"w-full max-w-[90vw] sm:max-w-[420px] md:max-w-[520px] lg:max-w-[600px] max-h-[80vh] overflow-auto p-0 bg-background sm:rounded-xl shadow-lg",overlayClassName:"bg-black/30",children:s.jsxs("div",{className:"relative flex flex-col",children:[s.jsxs("div",{className:"relative bg-muted/30 p-3 sm:p-4 flex items-center justify-center min-h-0",onTouchStart:f,onTouchMove:p,onTouchEnd:v,style:{touchAction:"pan-y"},children:[s.jsx(F,{variant:"ghost",size:"icon",className:"hidden sm:flex absolute left-2 top-1/2 -translate-y-1/2 z-10 hover:bg-background/80 h-10 w-10",onClick:d,children:s.jsx(ea,{className:"w-5 h-5"})}),s.jsx(F,{variant:"ghost",size:"icon",className:"hidden sm:flex absolute right-2 top-1/2 -translate-y-1/2 z-10 hover:bg-background/80 h-10 w-10",onClick:u,children:s.jsx(Da,{className:"w-5 h-5"})}),s.jsx("img",{src:e[t],alt:`Image ${t+1}`,className:"max-h-[55vh] sm:max-h-[50vh] md:max-h-[55vh] lg:max-h-[60vh] max-w-full w-auto object-contain select-none",draggable:!1})]}),s.jsxs("div",{className:"flex items-center justify-between p-4 border-t bg-background",children:[s.jsxs("div",{className:"text-sm text-muted-foreground",children:[t+1," / ",e.length]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(F,{variant:"outline",size:"sm",onClick:d,children:[s.jsx(ea,{className:"w-4 h-4 mr-1"}),"Previous"]}),s.jsxs(F,{variant:"outline",size:"sm",onClick:u,children:["Next",s.jsx(Da,{className:"w-4 h-4 ml-1"})]})]})]})]})})})}const U7="/assets/journal-1-BFHAnUKe.webp",B7="/assets/journal-2-CAN43QXY.webp",z7="/assets/journal-3-XKLMaZuB.webp",W7="/assets/journal-4-B8864bPt.webp",V7="/assets/journal-5-CmtNe95W.webp",H7="/assets/journal-6-B7WLtfu2.webp",q7="/assets/journal-7-CfF3hb5Y.webp",G7="/assets/journal-8-D7uEpEEZ.webp",Y7="/assets/journal-9-ninNRbsJ.webp";function K7(){const[e,t]=h.useState(1),[r,n]=h.useState(!1),[a,i]=h.useState(null),[o,l]=h.useState(!0),[c,d]=h.useState(!1),[u,m]=h.useState(!1),[f,p]=h.useState(0),v=qe(),{toast:g}=at(),b={name:"Well Be Journal",price:25.9,currency:"â¬",dimensions:"15x23cm",pages:268,description:`H ÏÏίÏη ÎκδοÏη ÏοÏ
Well Be Journal είÎ
721½Î±Î¹ εδÏ! ÎÎ·Î¼Î¹Î¿Ï Ïγήθηκε για εÏÎ¬Ï Î¼Îµ Ïολλή ÏÏονÏίδα και αγάÏη, ÏÏ Îνα βήμα Î¼Î¹Î±Ï Ïιο ενÏÏ Î½ÎµÎ¯Î´Î·ÏÎ·Ï ÎºÎ±Î¸Î·Î¼ÎµÏινÏÏηÏαÏ. 722 723ΣÏÎ¹Ï ÏÏÏÏÎµÏ ÏÎµÎ»Î¯Î´ÎµÏ ÏÎ¿Ï journal θα βÏείÏε ÏÏÏο για να αξιολογήÏεÏε ÏÎ¿Ï Î²ÏίÏκεÏαι καθÎÎ½Î±Ï Î±ÏÏ ÏÎ¿Ï Ï 12 ÏÎ¿Î¼ÎµÎ¯Ï ÏÎ·Ï Î¶ÏÎ®Ï ÏÎ±Ï ÎºÎ±Î¹ ÏÏη ÏÏ Î½ÎÏεια θα καÏαγÏάÏεÏε Î±Î½Î±Î»Ï Ïικά Ïα ÏνειÏα και ÏÎ¿Ï Ï ÏÏÏÏÎ¿Ï Ï ÏαÏ, Ïε καθÎναν αÏÏ Î±Ï ÏοÏÏ. ÎÏίÏηÏ, θα βÏείÏε Ïα Ïιο ÏμοÏÏα trackers, για να καÏαγÏάÏεÏε Ïη διάθεÏή ÏαÏ, Ïα βιβλία ÏÎ¿Ï Î¸ÎλεÏε να διαβάÏεÏε, καθÏÏ ÎºÎ±Î¹ Ïα γενÎθλια ÏÏν αγαÏημÎνÏν ÏÎ±Ï Î±Î½Î¸ÏÏÏÏν! 724 725Το Journal ÏεÏιλαμβάνει καθημεÏÎ¹Î½Ï Î·Î¼ÎµÏολÏγιο για Ïλη Ïην ÏÏονιά, εβδομαδιαίο ÏÏογÏαμμαÏιÏμÏ, Ïα highlights ÏÎ¿Ï Î¼Î®Î½Î±, καθÏÏ ÎºÎ±Î¹ Îναν κενÏÏÎ¹ÎºÏ ÏÏÏÏο για κάθε εξάμηνο ÏÏÏε να εÏικενÏÏÏθείÏε ακÏμη και ÏÏÎ¹Ï Ïιο μικÏÎÏ Î±Î»Î»Î±Î³ÎÏ ÏÎ¿Ï Î¸Î± ÏÎ±Ï Î¿Î´Î·Î³Î®ÏÎ¿Ï Î½ ÏÏην εÏίÏÎµÏ Î¾Î· ÏÎ¿Ï ÏÏÏÏÎ¿Ï ÏαÏ! 726 727ΣÏο ÏÎÎ»Î¿Ï ÏÎ·Ï ÏÏÎ¿Î½Î¹Î¬Ï ÎºÎ¬Î½ÎµÏε Îναν ειλικÏινή αÏολογιÏμÏ, ÎµÎ½Ï Î¼ÎÏα ÏÏÎ¹Ï ÏÎµÎ»Î¯Î´ÎµÏ ÏÎ¿Ï journal θα βÏείÏε inspirational quotes ÏÎ¿Ï Î¸Î± ÏÎ±Ï ÎºÎ¹Î½Î·ÏοÏοιοÏν και θα ÏÎ±Ï ÎµÎ¼ÏνÎÎ¿Ï Î½ καθημεÏινά! ΣÏην ÏÎµÎ»ÎµÏ Ïαία Ïελίδα ÏÎ¿Ï journal ÏÎ±Ï ÏεÏιμÎνει μια ακÏμη νÎα ÏÏοÏθήκη. ÎÏ ÏοκÏλληÏα για να ξεÏÏÏίζεÏε ÏÎ¹Ï ÏημανÏικÎÏ ÏÏιγμÎÏ ÏÎ·Ï ÏÏÎ¿Î½Î¹Î¬Ï ÏαÏ, με Ïον Ïιο ÏαιÏνιδιάÏικο ÏÏÏÏο! 728 729Το Well Be Journal θα ÏÎ±Ï Î²Î¿Î·Î¸Î®Ïει να εξελίξεÏε Ïον ÎµÎ±Ï ÏÏ ÏαÏ, να οÏγανÏÏεÏε Ïη ζÏή ÏÎ±Ï Î¼Îµ ενÏÏ Î½Î±Î¯ÏθηÏη και να ÏÏαγμαÏοÏοιήÏεÏε ÎµÏ ÎºÎ¿Î»ÏÏεÏα ÏÎ¿Ï Ï ÏÏοÏÏÏικοÏÏ ÏÎ±Ï ÏÏÏÏÎ¿Ï Ï!`,images:[U7,B7,z7,W7,V7,H7,q7,G7,Y7]};h.useEffect(()=>{(async()=>{try{const{data:S,error:E}=await U.from("journal_inventory").select("available_stock, total_stock").single();if(E){console.error("Error loading inventory:",E),g({title:"ΣÏάλμα",description:"Îεν μÏοÏÎÏαμε να ÏοÏÏÏÏÎ¿Ï Î¼Îµ ÏÎ¹Ï ÏληÏοÏοÏÎ¯ÎµÏ Î±ÏοθÎμαÏοÏ.",variant:"destructive"});return}i(S)}catch(S){console.error("Error loading inventory:",S)}finally{l(!1)}})()},[g]);const y=()=>a?a.available_stock===0?"ÎξανÏλημÎνο":a.available_stock<=10?"ΠεÏιοÏιÏμÎνο αÏÏθεμα":"ÎιαθÎÏιμο":"ΦÏÏÏÏÏη...",x=()=>a?a.available_stock===0?"destructive":a.available_stock<=10?"default":"secondary":"secondary",w=N=>{a&&N>=1&&N<=Math.min(a.available_stock,5)&&t(N)},j=async()=>{if(!a||a.available_stock<e){g({title:"ÎνεÏαÏκÎÏ Î±ÏÏθεμα",description:"Îεν Ï ÏάÏÏει εÏαÏκÎÏ Î±ÏÏθεμα για Ïην εÏιλεγμÎνη ÏοÏÏÏηÏα.",variant:"destructive"});return}n(!0);try{const{data:N,error:S}=await U.functions.invoke("journal-checkout",{body:{quantity:e}});if(S)throw S;if(N!=null&&N.sessionUrl)window.location.href=N.sessionUrl;else throw new Error("No checkout URL received")}catch(N){console.error("Checkout error:",N),g({title:"ΣÏάλμα ÏÏην ÏαÏαγγελία",description:N.message||"ÎάÏι Ïήγε ÏÏÏαβά. ΠαÏÎ±ÎºÎ±Î»Ï Î´Î¿ÎºÎ¹Î¼Î¬ÏÏε ξανά.",variant:"destructive"})}finally{n(!1)}};return!o&&(a==null?void 0:a.available_stock)===0?s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"Well Be Journal - ÎξανÏλημÎνο",description:"Το Well Be Journal είναι ÏÏοÏÏÏινά εξανÏλημÎνο. ÎείνεÏε ÏÏ Î½ÏονιÏμÎνοι για νÎÎµÏ ÏαÏαγγελίεÏ."}),s.jsx(Fe,{isMenuOpen:c,onMenuToggle:()=>d(!c)}),s.jsx("main",{className:"container mx-auto px-4 py-16",children:s.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Well Be Journal"}),s.jsx("div",{className:"text-6xl mb-6",children:"ð"}),s.jsx("h2",{className:"text-2xl text-muted-foreground mb-6",children:"ÎξανÏλημÎÎ
729½Î¿"}),s.jsx("p",{className:"text-lg mb-8",children:"Το Well Be Journal είναι ÏÏοÏÏÏινά εξανÏλημÎνο. Î£Î±Ï ÎµÏ
ÏαÏιÏÏοÏμε για Ïο ενδιαÏÎÏον ÏαÏ!"}),s.jsx(F,{onClick:()=>v("/"),size:"lg",children:"ÎÏιÏÏÏοÏή ÏÏην αÏÏική"})]})}),s.jsx(Be,{})]}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"Well Be Journal - â¬25.90",description:"Î ÏÏίÏη ÎκδοÏη ÏοÏ
Well Be Journal. 268 ÏÎµÎ»Î¯Î´ÎµÏ Î¿ÏγάνÏÏÎ·Ï ÎºÎ±Î¹ αÏ
ÏοανάÏÏÏ
ξηÏ. ΠαÏάδοÏη Ïε Ïλη Ïην Îλλάδα.",keywords:"well be journal, ημεÏολÏγιο, self care, αÏ
ÏοανάÏÏÏ
ξη, ÏÏογÏαμμαÏιÏμÏÏ",robots:"noindex, nofollow"}),s.jsx(Fe,{isMenuOpen:c,onMenuToggle:()=>d(!c)}),s.jsx("main",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-6 sm:py-8 lg:py-12",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-6 sm:gap-8 lg:gap-12 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[s.jsx("div",{className:"aspect-square overflow-hidden rounded-xl sm:rounded-2xl border bg-card cursor-pointer touch-manipulation",onClick:()=>{p(0),m(!0)},children:s.jsx("img",{src:b.images[0],alt:b.name,className:"w-full h-full object-cover hover:scale-105 transition-transform duration-300"})}),s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 gap-2",children:b.images.slice(1).map((N,S)=>s.jsx("div",{className:"aspect-square overflow-hidden rounded-md sm:rounded-lg border bg-card cursor-pointer touch-manipulation",onClick:()=>{p(S+1),m(!0)},children:s.jsx("img",{src:N,alt:`${b.name} - ÎικÏνα ${S+2}`,className:"w-full h-full object-cover hover:scale-105 transition-transform duration-300"})},S))})]}),s.jsxs("div",{className:"space-y-6 sm:space-y-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold mb-3 sm:mb-4",children:b.name}),s.jsxs("div",{className:"flex items-center gap-3 sm:gap-4 mb-4 sm:mb-6",children:[s.jsxs("span",{className:"text-2xl sm:text-3xl lg:text-4xl font-bold text-primary",children:[b.currency,b.price]}),s.jsx(ye,{variant:x(),className:"text-xs sm:text-sm",children:y()})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:gap-4 mb-4 sm:mb-6 text-xs sm:text-sm text-muted-foreground",children:[s.jsxs("div",{children:["ð ÎιαÏÏάÏειÏ: ",b.dimensions]}),s.jsxs("div",{children:["ð ΣελίδεÏ: ",b.pages]})]}),s.jsx("div",{className:"text-sm sm:text-base text-muted-foreground leading-relaxed mb-4 sm:mb-6 whitespace-pre-line",children:b.description})]}),a&&a.available_stock>0&&s.jsx(oe,{children:s.jsxs(ce,{className:"p-4 sm:p-6 space-y-4 sm:space-y-6",children:[s.jsxs("h3",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2",children:[s.jsx(Sl,{className:"w-5 h-5"}),"ΠαÏαγγελία"]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{className:"text-sm sm:text-base",children:"ΠοÏÏÏηÏα"}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(F,{variant:"outline",size:"icon",onClick:()=>w(e-1),disabled:e<=1,className:"h-10 w-10 sm:h-11 sm:w-11 touch-manipulation",children:s.jsx(pE,{className:"w-4 h-4"})}),s.jsx("span",{className:"w-12 text-center font-medium text-base sm:text-lg",children:e}),s.jsx(F,{variant:"outline",size:"icon",onClick:()=>w(e+1),disabled:e>=Math.min(a.available_stock,5),className:"h-10 w-10 sm:h-11 sm:w-11 touch-manipulation",children:s.jsx(Ic,{className:"w-4 h-4"})})]}),s.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"ÎÎγιÏÏη ÏοÏÏÏηÏα ανά ÏαÏαγγελία: 5"})]}),s.jsx(F,{onClick:j,disabled:r||o,className:"w-full touch-manipulation",size:"lg",children:r?"Î ÏοεÏοιμαÏία ÏαÏαγγελίαÏ...":s.jsxs(s.Fragment,{children:[s.jsx(Sl,{className:"w-5 h-5 mr-2"}),"ΠαÏαγγελία ÏÏÏα"]})})]})}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 sm:gap-6 pt-4 sm:pt-6 border-t",children:[s.jsxs("div",{className:"text-center space-y-1.5 sm:space-y-2",children:[s.jsx(r6,{className:"w-7 h-7 sm:w-8 sm:h-8 mx-auto text-primary"}),s.jsx("p",{className:"text-xs sm:text-sm font-medium",children:"ÎÏήγοÏη αÏοÏÏολή"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"â¬3 για Îλλάδα"})]}),s.jsxs("div",{className:"text-center space-y-1.5 sm:space-y-2",children:[s.jsx(kl,{className:"w-7 h-7 sm:w-8 sm:h-8 mx-auto text-primary"}),s.jsx("p",{className:"text-xs sm:text-sm font-medium",children:"ÎÏÏÎ±Î»ÎµÎ¯Ï ÏληÏÏμÎÏ"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Stripe & SSL"})]}),s.jsxs("div",{className:"text-center space-y-1.5 sm:space-y-2",children:[s.jsx(Yp,{className:"w-7 h-7 sm:w-8 sm:h-8 mx-auto text-primary"}),s.jsx("p",{className:"text-xs sm:text-sm font-medium",children:"ΠοιÏÏηÏα"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Premium Ï
λικά"})]})]})]})]})}),s.jsx(NT,{images:b.images,currentIndex:f,isOpen:u,onClose:()=>m(!1),onNavigate:p}),s.jsx(Be,{})]})}function Q7(){const[e]=Do(),t=qe(),[r,n]=h.useState(null),[a,i]=h.useState(!1);return h.useEffect(()=>{const o=e.get("order_number");n(o)},[e]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"ÎÏιÏÏ
ÏÎ®Ï Î Î±Ïαγγελία - Well Be Journal",description:"Î ÏαÏαγγελία ÏÎ±Ï Î³Î¹Î± Ïο Well Be Journal ολοκληÏÏθηκε εÏιÏÏ
ÏÏÏ!"}),s.jsx(Fe,{isMenuOpen:a,onMenuToggle:()=>i(!a)}),s.jsx("main",{className:"container mx-auto px-4 py-16",children:s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsx(oe,{className:"text-center",children:s.jsxs(ce,{className:"p-8 space-y-6",children:[s.jsx("div",{className:"w-20 h-20 mx-auto bg-green-100 rounded-full flex items-center justify-center",children:s.jsx(ta,{className:"w-12 h-12 text-green-600"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h1",{className:"text-3xl font-bold text-green-600",children:"ΠαÏαγγελία ÎÏιÏÏ
ÏήÏ!"}),s.jsx("p",{className:"text-muted-foreground",children:"Î£Î±Ï ÎµÏ
ÏαÏιÏÏοÏμε για Ïην ÏαÏαγγελία ÏÎ±Ï ÏÏο Well Be Journal 2024"})]}),r&&s.jsxs("div",{className:"bg-muted p-4 rounded-lg",children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"ÎÏιθμÏÏ Î Î±ÏαγγελίαÏ"}),s.jsx("p",{className:"font-mono text-lg font-semibold",children:r})]}),s.jsxs("div",{className:"grid gap-4 text-left",children:[s.jsxs("div",{className:"flex items-start gap-3 p-4 bg-blue-50 rounded-lg",children:[s.jsx(Fa,{className:"w-5 h-5 text-blue-600 mt-0.5"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-blue-900",children:"Email εÏιβεβαίÏÏηÏ"}),s.jsx("p",{className:"text-sm text-blue-700",children:"Îα λάβεÏε ÏÏνÏομα email εÏιβεβαίÏÏÎ·Ï Î¼Îµ Ïα ÏÏοιÏεία ÏÎ·Ï ÏαÏÎ±Î³Î³ÎµÎ»Î¯Î±Ï ÏαÏ."})]})]}),s.jsxs("div",{className:"flex items-start gap-3 p-4 bg-orange-50 rounded-lg",children:[s.jsx(z5,{className:"w-5 h-5 text-orange-600 mt-0.5"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-orange-900",children:"ΠαÏάδοÏη"}),s.jsx("p",{className:"text-sm text-orange-700",children:"Το Well Be Journal θα αÏοÏÏαλεί ενÏÏÏ 2-3 εÏγάÏιμÏν ημεÏÏν. Îα λάβεÏε κÏÎ´Î¹ÎºÏ ÏαÏακολοÏθηÏÎ·Ï Î¼ÏÎ»Î¹Ï Î±ÏοÏÏαλεί."})]})]})]}),s.jsxs("div",{className:"pt-6 space-y-3",children:[s.jsxs(F,{onClick:()=>t("/"),className:"w-full",size:"lg",children:[s.jsx(Kp,{className:"w-5 h-5 mr-2"}),"ÎÏιÏÏÏοÏή ÏÏην αÏÏική"]}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Îια οÏοιαδήÏοÏε εÏÏÏηÏη, εÏικοινÏνήÏÏε μαζί Î¼Î±Ï ÏÏο"," ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]})]})]})}),s.jsxs("div",{className:"mt-8 text-center space-y-4",children:[s.jsx("h2",{className:"text-xl font-semibold",children:"Τι ακολοÏ
θεί;"}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"p-4 rounded-lg border",children:[s.jsx("div",{className:"text-2xl mb-2",children:"ð¦"}),s.jsx("h3",{className:"font-medium mb-1",children:"ΣÏ
ÏκεÏ
αÏία"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Î ÏοεÏοιμάζοÏ
με Ïην ÏαÏαγγελία ÏÎ±Ï Î¼Îµ ÏÏονÏίδα"})]}),s.jsxs("div",{className:"p-4 rounded-lg border",children:[s.jsx("div",{className:"text-2xl mb-2",children:"ð"}),s.jsx("h3",{className:"font-medium mb-1",children:"ÎÏοÏÏολή"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"ÎÏοÏÏολή ενÏÏÏ 2-3 εÏγάÏιμÏν ημεÏÏν"})]}),s.jsxs("div",{className:"p-4 rounded-lg border",children:[s.jsx("div",{className:"text-2xl mb-2",children:"ð¯"}),s.jsx("h3",{className:"font-medium mb-1",children:"ΠαÏάδοÏη"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"ΠαÏαλαμβάνεÏε Ïο journal ÏÏην ÏÏÏÏα ÏαÏ"})]})]})]})]})}),s.jsx(Be,{})]})}const X7=()=>{const[e,t]=h.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsx(Fs,{title:"ÎÏοι ΣÏ
μμεÏοÏÎ®Ï - Xmas Giveaway | Well Be",description:"ÎÏοι και ÏÏοÏÏοθÎÏÎµÎ¹Ï ÏÏ
μμεÏοÏÎ®Ï ÏÏον διαγÏνιÏÎ¼Ï Xmas Giveaway Ïε ÏÏ
νεÏγαÏία με Authentic Beauty Concept.",robots:"noindex, nofollow"}),s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsx("main",{className:"min-h-screen bg-background py-12 md:py-20",children:s.jsx("div",{className:"container mx-auto px-4 max-w-4xl",children:s.jsxs("div",{className:"bg-card rounded-xl shadow-lg p-6 md:p-10",children:[s.jsx("h1",{className:"text-2xl md:text-4xl font-bold text-foreground mb-2 text-center",children:"ÎÏοι ΣÏ
μμεÏοÏήÏ"}),s.jsx("h2",{className:"text-xl md:text-2xl text-primary font-semibold mb-8 text-center",children:"Xmas Giveaway"}),s.jsxs("div",{className:"prose prose-sm md:prose-base max-w-none text-foreground
729/90",children:[s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"1. ÎνÏικείμενο ÏοÏ
ÎιαγÏνιÏμοÏ"}),s.jsx("p",{className:"mb-4",children:"ΠεÏαιÏεία με Ïην εÏÏνÏ
μία «Cambo Advertising Agency A.E» και, με ÎΦΠ998297438 ÎδÏα ÏÏην ÎÏνÏÏανÏινοÏ
ÏÏλεÏÏ 44, 118 54 Îθήνα. (εÏÎµÎ¾Î®Ï ÎºÎ±Î»Î¿Ïμενη ÏάÏιν ÏÏ
νÏÎ¿Î¼Î¯Î±Ï Î¿ «ÎιοÏγανÏÏήÏ») διοÏγανÏνει διαγÏνιÏÎ¼Ï Ïε ÏÏ
νεÏγαÏία με Ïην influencer ÎάνÏια ÎÏοÏ
λΠ(«ΣÏ
νεÏγάÏηÏ» ή «Influencer») με Ïην ονομαÏία «Xmas Giveaway» (εÏÎµÎ¾Î®Ï ÎºÎ±Î»Î¿ÏÎ¼ÎµÎ½Î¿Ï ÏάÏιν ÏÏ
νÏÎ¿Î¼Î¯Î±Ï o «ÎιαγÏνιÏμÏÏ»)."}),s.jsxs("p",{className:"mb-4",children:["Î ÎιαγÏνιÏμÏÏ Î¸Î± διενεÏγηθεί μÎÏÏ ÏοÏ
ÏÏοÏίλ ÏÎ·Ï influencer ÏÏο μÎÏο κοινÏÎ½Î¹ÎºÎ®Ï Î´Î¹ÎºÏÏÏÏÎ·Ï Instagram «",s.jsx("a",{href:"https://www.instagram.com/nadiaboule/?hl=en",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://www.instagram.com/nadiaboule/?hl=en"}),"»."]}),s.jsxs("p",{className:"mb-4",children:["Î ÎιαγÏνιÏμÏÏ Î¸Î± εÏικοινÏνηθεί μÎÏÏ ÏοÏ
ÏÏοÏίλ ÏÎ·Ï influencer ÏÏο μÎÏο κοινÏÎ½Î¹ÎºÎ®Ï Î´Î¹ÎºÏÏÏÏÎ·Ï Instagram «",s.jsx("a",{href:"https://www.instagram.com/nadiaboule/?hl=en",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://www.instagram.com/nadiaboule/?hl=en"}),"»."]}),s.jsx("p",{className:"mb-4",children:"Î ÎιαγÏνιÏμÏÏ Î´ÎµÎ½ ÏοÏηγείÏαι, δεν Ï
ÏοÏÏηÏίζεÏαι και δεν διεξάγεÏαι αÏÏ Ïο Instagram, οÏÏε ÏÏ
νδÎεÏαι μαζί ÏοÏ
με οÏοιονδήÏοÏε ÏÏÏÏο, ÏÏ ÎµÎº ÏοÏÏοÏ
Ïο Instagram δεν ÏÎÏει οÏ
δεμία εÏ
θÏνη για οÏοιαδήÏοÏε αÏαίÏηÏη ή αξίÏÏη ÏÏ
μμεÏÎÏονÏα ή οÏοιοÏ
δήÏοÏε ÏÏίÏοÏ
ÏÏοκÏÏει αÏÏ Ïον ÏαÏÏνÏα ÎιαγÏνιÏÎ¼Ï Î® Ïε ÏÏÎÏη με αÏ
ÏÏν."}),s.jsx("p",{className:"mb-4",children:"Î ÎιαγÏνιÏμÏÏ Î¸Î± διεξαÏθεί ÏÏμÏÏνα με ÏοÏ
Ï Î±ÎºÏλοÏ
θοÏ
Ï ÏÏοÏ
Ï ÎºÎ±Î¹ ÏÏοÏÏοθÎÏειÏ, οι οÏοίοι ÏÏ
νομολογοÏνÏαι Ïλοι ÏÏ Î¿Ï
ÏιÏδειÏ."}),s.jsx("p",{className:"mb-4",children:"ΣκοÏÏÏ ÏÏν ÏαÏÏνÏÏν αναλÏ
ÏικÏν ÏÏÏν (εÏÎµÎ¾Î®Ï Î¿Î¹ «ÎÏοι») είναι ο καθοÏιÏμÏÏ ÏÏν ÏÏÏν ÏÏ
μμεÏοÏÎ®Ï ÏÏο ÎιαγÏνιÏμÏ, ÏÎ·Ï ÎºÎ»Î®ÏÏÏÎ·Ï ÎºÎ±Î¹ ÏÎ·Ï Î±Î½Î¬Î´ÎµÎ¹Î¾Î·Ï Î½Î¹ÎºÎ·ÏÏν, ÏÏο ÏλαίÏιο ÏοÏ
ÎιαγÏνιÏμοÏ."}),s.jsx("p",{className:"mb-4",children:"Î ÏÏ
μμεÏοÏή ÏÏο ÎιαγÏνιÏÎ¼Ï ÏÏ
νεÏάγεÏαι Ïην ÏλήÏη και ανεÏιÏÏλακÏη αÏοδοÏή αÏÏ ÏοÏ
Ï ÏÏ
μμεÏÎÏονÏÎµÏ ÏÏν ÏÏÏν αÏ
ÏοÏ, ÏÏÏÏ Î±Ï
Ïοί ÏεÏιγÏάÏονÏαι ÏÏο ÏαÏÏν. Î ÏÏ
μμεÏοÏή ÏÏο ÎιαγÏνιÏÎ¼Ï ÏÏοÏÏοθÎÏει και Ï
ÏοδηλÏνει Ïην ανεÏιÏÏλακÏη αÏοδοÏή ÏÏν ÏαÏÏνÏÏν ÏÏÏν. Îν οÏοιοÏδήÏοÏε ενδιαÏεÏÏÎ¼ÎµÎ½Î¿Ï Î´ÎµÎ½ αÏοδÎÏεÏαι ÏοÏ
Ï ÏαÏÏνÏÎµÏ ÎÏοÏ
Ï, Ï
ÏοÏÏεοÏÏαι να μη ÏÏ
μμεÏάÏÏει ÏÏον ÎιαγÏνιÏμÏ. Î ÏÏ
μμεÏοÏή εκάÏÏοÏ
ÏÏ
μμεÏÎÏονÏÎ¿Ï ÏÏο ÎιαγÏνιÏÎ¼Ï ÏεÏιλαμβάνει ÏηÏή και ανεÏιÏÏλακÏη δήλÏÏη ÏοÏ
ÏελεÏ
ÏαίοÏ
ÏÏι ÏληÏοί ÏÎ¹Ï ÏÏοÏÏοθÎÏÎµÎ¹Ï ÏÏ
μμεÏοÏÎ®Ï Ïε αÏ
ÏÏν."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"2. ÎικαίÏμα ΣÏ
μμεÏοÏήÏ"}),s.jsxs("p",{className:"mb-4",children:["ÎικαίÏμα ÏÏ
μμεÏοÏÎ®Ï ÏÏο ÎιαγÏνιÏÎ¼Ï ÎÏοÏ
ν ÏÏ
Ïικά ÏÏÏÏÏÏα ÏοÏ
ÎÏοÏ
ν ÏλήÏη δικαιοÏÏακÏική ικανÏÏηÏα, ÎÏοÏ
ν ÏÏ
μÏληÏÏÏει Ïο 18ο ÎÏÎ¿Ï ÏÎ·Ï Î·Î»Î¹ÎºÎ¯Î±Ï ÏοÏ
Ï, είναι νÏμιμοι και μÏνιμοι κάÏοικοι ÎλλάδοÏ, ÎÏοÏ
ν ÏÏÏÏβαÏη ÏÏο διαδίκÏÏ
ο και ενεÏÎ³Ï Î»Î
729¿Î³Î±ÏιαÏÎ¼Ï ÏÏον ιÏÏοÏÏÏο κοινÏÎ½Î¹ÎºÎ®Ï Î´Î¹ÎºÏÏÏÏÎ·Ï Instagram και ÏοÏ
θα εÏιÏκεÏθοÏν Ïον δικÏÏ
Î±ÎºÏ ÏÏÏο ",s.jsx("a",{href:"https://www.instagram.com/nadiaboule/?hl=en",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://www.instagram.com/nadiaboule/?hl=en"})," και θα λάβοÏ
ν μÎÏÎ¿Ï ÏÏο ÎιαγÏνιÏÎ¼Ï ÏοÏ
εμÏανίζεÏαι εκεί, ÏÏμÏÏνα με ÏÏα ÏεÏιγÏάÏονÏαι λεÏÏομεÏÏÏ ÏÏοÏ
Ï ÏαÏÏνÏÎµÏ ÏÏοÏ
Ï."]}),s.jsx("p",{className:"mb-4",children:"ÎξαιÏοÏνÏαι αÏÏ Ïο ÎιαγÏνιÏμÏ, (α) ÏÏελÎÏη και Ï
Ïάλληλοι/εÏγαζÏμενοι ÏÎ·Ï ÎιοÏγανÏÏÏιαÏ, ÏÎ·Ï ÎµÏαιÏÎµÎ¯Î±Ï Î¼Îµ Ïην εÏÏνÏ
μία «HENKEL ÎÎÎÎΣ ÎÎΩÎÎ¥ÎÎΣ ÎÎÎÎÎΧÎÎÎÎÎ ÎÎÎ ÎÎÎ ÎΡÎÎÎ ÎΤÎÎΡÎÎA» καθÏÏ ÎºÎ±Î¹ ÏοÏ
ΣÏ
νεÏγάÏη, ÏÏν ÏÏ
νδεδεμÎνÏν με αÏ
ÏοÏÏ ÎµÏιÏειÏήÏεÏν (β) οι ÏÏζÏ
γοι ή άÏομα με Ïα οÏοία Ïα εν λÏÎ³Ï ÏÏ
Ïικά ÏÏÏÏÏÏα ÎÏοÏ
ν Ï
ÏογÏάÏει ενεÏÎ³Ï ÏÏμÏÏνο ÏÏ
μβίÏÏÎ·Ï ÎºÎ±Î¹ οι ÏÏ
Î³Î³ÎµÎ½ÎµÎ¯Ï ÏÏν ανÏÏÎÏÏ ÏÏ
ÏικÏν ÏÏοÏÏÏÏν, εξ αίμαÏÎ¿Ï Î® εξ αγÏιÏÏείαÏ, μÎÏÏι και Ïο δεÏÏεÏο βαθμÏ, (γ) ÏÏÏÏÏÏα ÏοÏ
εμÏλÎκονÏαι άμεÏα με Ïη διοÏγάνÏÏη και διεξαγÏγή ÏοÏ
ÎιαγÏνιÏμοÏ, (δ) άÏομα Ïα οÏοία ÏÏεÏοÏνÏαι δικαιοÏÏακÏÎ¹ÎºÎ®Ï Î¹ÎºÎ±Î½ÏÏηÏαÏ, (ε) ÏÏοι δεν ÏληÏοÏν ÏÏοÏÏοθÎÏÎµÎ¹Ï ÏÏ
μμεÏοÏÎ®Ï Î²Î¬Ïει άλλοÏ
άÏθÏοÏ
ÏÏν ÏαÏÏνÏÏν ÏÏÏν."}),s.jsx("p",{className:"mb-4",children:"Î ÏÏ
μμεÏοÏή εκάÏÏοÏ
ÏÏ
μμεÏÎÏονÏÎ¿Ï ÏÏο ÎιαγÏνιÏÎ¼Ï ÏεÏιλαμβάνει ÏηÏή και ανεÏιÏÏλακÏη δήλÏÏη ÏοÏ
ÏελεÏ
ÏαίοÏ
ÏÏι ÏληÏοί ÏÎ¹Ï ÏÏοÏÏοθÎÏÎµÎ¹Ï ÏÏ
μμεÏοÏÎ®Ï ÎºÎ±Î¹ ÏÏι δεν ÏÏ
νÏÏÎÏοÏ
ν ÏÏο ÏÏÏÏÏÏÏ ÏοÏ
οι λÏγοι αÏοκλειÏÎ¼Î¿Ï ÏÎ·Ï ÏÏ
μμεÏοÏήÏ."}),s.jsx("p",{className:"mb-4",children:"Î ÎιοÏγανÏÏÏια δÏναÏαι να ακÏ
ÏÏÏει οÏοιαδήÏοÏε ÏÏ
μμεÏοÏή και να αÏοκλείÏει οÏοιονδήÏοÏε ΣÏ
μμεÏÎÏονÏα, Ïε οÏοιοδήÏοÏε ÏÏάδιο ÏοÏ
ÎιαγÏνιÏμοÏ, ακÏμη και καÏά Ïην αÏονομή ÏÏν ÎÏÏÏν, Ïε ÏεÏίÏÏÏÏη ÏοÏ
δεν ÏÏ
νÏÏÎÏοÏ
ν οι αναÏεÏÏÎ¼ÎµÎ½ÎµÏ ÏÏοÏ
Ï ÏαÏÏνÏÎµÏ ÎÏοÏ
Ï. ÎÏοιαδήÏοÏε ÏÏ
μμεÏοÏή ÏÏν ανÏÏÎÏÏ ÏÏοÏÏÏÏν ÏÏο ÎιαγÏνιÏÎ¼Ï ÎºÎ±Ïά ÏαÏάβαÏη ÏÏν ÏαÏÏνÏÏν ÎÏÏν θεÏÏείÏαι αÏ
ÏοδικαίÏÏ Î¬ÎºÏ
Ïη και θεÏÏείÏαι ÏÏ Î¿Ï
δÎÏοÏε ÏÏαγμαÏοÏοιηθείÏα. H ÏÏ
μμεÏοÏή ÏÏο ÎιαγÏνιÏÎ¼Ï ÎµÎ¯Î½Î±Î¹ αÏ
ÏÏηÏά ÏÏοÏÏÏική και δεν δÏναÏαι να μεÏαβιβαÏÏεί."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"3. ÎιάÏκεια ÎιαγÏνιÏμοÏ"}),s.jsx("p",{className:"mb-4",children:"Î ÎιαγÏνιÏμÏÏ ÏÏαγμαÏοÏοιείÏαι καÏά Ïο ÏÏÎ¿Î½Î¹ÎºÏ Î´Î¹Î¬ÏÏημα αÏÏ ÏÎ¹Ï 19 ÎεκεμβÏίοÏ
2025, ÎÏÏ ÎºÎ±Î¹ ÏÎ¹Ï 31 ÎεκεμβÏίοÏ
2025 (εÏÎµÎ¾Î®Ï Î· «ÎιάÏκεια ÏοÏ
ÎιαγÏνιÏμοÏ»)."}),s.jsx("p",{className:"mb-4",children:"ÎιεÏ
κÏινίζεÏαι ÏηÏά ÏÏι, ÎγκÏ
ÏÎµÏ Î¸ÎµÏÏοÏνÏαι οι ÏÏ
μμεÏοÏÎÏ ÏοÏ
θα Ï
ÏοβληθοÏν ενÏÏÏ ÏοÏ
ÏÏÎ¿Î½Î¹ÎºÎ¿Ï Î´Î¹Î±ÏÏήμαÏÎ¿Ï ÏÏ
μμεÏοÏÎ®Ï ÏÏ Î¿ÏίζεÏαι ÏαÏαÏÎ¬Î½Ï ÎºÎ±Î¹ θα ÏληÏοÏν ÏÎ¹Ï ÏÏοÏÏοθÎÏÎµÎ¹Ï ÏÏν ÏαÏÏνÏÏν ÎÏÏν. ÎεÏά Ïη λήξη ÏοÏ
ÎιαγÏνιÏμοÏ, καμία ÏÏ
μμεÏοÏή δεν θα γίνεÏαι δεκÏή και δεν θα δεÏμεÏει Ïη ÎιοÏγανÏÏÏια. ÎιεÏ
κÏινίζεÏαι ÏηÏά ÏÏι ÏÏ
ÏÏν Ï
ÏοβληθείÏÎµÏ ÏÏ
μμεÏοÏÎÏ Î¼ÎµÏά Ïη λήξη ÏÎ·Ï ÎιάÏÎºÎµÎ¹Î±Ï ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï Î¸Î± θεÏÏοÏνÏαι αÏ
ÏοδικαίÏÏ Î±Î½ÏÏαÏκÏÎµÏ ÏÏ Î¼Î· γενÏÎ¼ÎµÎ½ÎµÏ ÎºÎ±Î¹ οÏ
δÎν εÏάγονÏαι αÏοÏÎλεÏμα, οÏÏε θα δεÏμεÏοÏ
ν Ïη ÎιοÏγανÏÏÏια ή/και οÏοιονδήÏοÏε ÏÏίÏο."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"4. ΤÏÏÏÎ¿Ï Î£Ï
μμεÏοÏÎ®Ï ÏÏον ÎιαγÏνιÏμÏ"}),s.jsxs("p",{className:"mb-4",children:["Îι ΣÏ
μμεÏÎÏονÏÎµÏ ÎºÎ±Î»Î¿ÏνÏαι να ακολοÏ
θήÏοÏ
ν Ïη Ïελίδα ",s.jsx("a",{href:"https://www.instagram.com/authenticbeautyconceptgr/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"@authenticbeautyconceptgr"})," (follow) και Ïην Ïελίδα ",s.jsx("a",{href:"https://www.instagram.com/nadiaboule/?hl=en",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://www.instagram.com/nadiaboule/?hl=en"}),", να αναÏÏήÏοÏ
ν ÏÏÏλιο (comment) κάÏÏ Î±ÏÏ Ïην δημοÏίεÏ
Ïη/ÏÏÏογÏαÏία ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï ÏÏον δικÏÏ
Î±ÎºÏ ÏÏÏο ",s.jsx("a",{href:"https://www.instagram.com/nadiaboule/?hl=en",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://www.instagram.com/nadiaboule/?hl=en"})," ÏÏο οÏοίο θα εÏιÏημάνοÏ
ν Îνα άÏομο (tag) και να ÏαÏήÏοÏ
ν like ÏÏην ανάÏÏηÏη (δημοÏίεÏ
Ïη/ÏÏÏογÏαÏία ÏοÏ
ÎιαγÏνιÏμοÏ), ÏÏÏε να ÏάÏοÏ
ν μÎÏÎ¿Ï ÏÏην κλήÏÏÏη."]}),s.jsx("p",{className:"mb-4",children:"ΠανάÏÏηÏη ÏÏολίοÏ
και μÏνο ÏÏ
νιÏÏά δήλÏÏη ÏÏ
μμεÏοÏÎ®Ï ÏÏον ÎιαγÏνιÏÎ¼Ï ÎºÎ±Î¹ ÏÏην κλήÏÏÏη ÏÏÏÎ¯Ï Î¿ÏοιαδήÏοÏε ÏÏÎÏÏη ή ÏεÏαιÏÎÏÏ Î´Î¹Î±Î´Î¹ÎºÎ±Ïία και ÏαÏ
ÏÏÏÏονα ÏÏ
νιÏÏά δήλÏÏη ανεÏιÏÏλακÏÎ·Ï Î±ÏοδοÏÎ®Ï ÏÏν ÏÏÏν ÏοÏ
ÎιαγÏνιÏμοÏ."}),s.jsx("p",{className:"mb-4",children:"ÎγκÏ
ÏÎµÏ Î¸Î± θεÏÏηθοÏν οι ÏÏ
μμεÏοÏÎÏ ÏοÏ
ÎÏοÏ
ν ακολοÏ
θήÏει Ïα ανÏÏÎÏÏ Î²Î®Î¼Î±Ïα για Ïη ÏÏ
μμεÏοÏή ÏοÏ
Ï ÏÏην κλήÏÏÏη."}),s.jsx("p",{className:"mb-4",children:"ÎÏοιαδήÏοÏε ÏÏ
μμεÏοÏή Ïε αναδημοÏιεÏÏÎµÎ¹Ï ÏοÏ
ÏÏαγμαÏοÏοιοÏνÏαι Ïε λογαÏιαÏμοÏÏ ÎµÎºÏÏÏ ÏοÏ
ανÏÏÎÏÏ Î´Î¹ÎºÏÏ
Î±ÎºÎ¿Ï ÏÏÏοÏ
δεν θα λαμβάνονÏαι Ï
ÏÏÏη."}),s.jsx("p",{className:"mb-4",children:"Î ÏÏ
μμεÏοÏή ÏÏο ÎιαγÏνιÏÎ¼Ï Î´ÎµÎ½ ÏÏοÏÏοθÎÏει Ïην αγοÏά οÏοιοÏ
δήÏοÏε ÏÏοÏÏνÏÎ¿Ï Î® Ï
ÏηÏεÏίαÏ."}),s.jsx("p",{className:"mb-4",children:"ΠεÏιÏήμανÏη (mention) ÏÏήÏÏη Ïε ÏÏÏλιο ή/και η αναÏοÏά ÏοÏ
ονÏμαÏÏÏ ÏοÏ
Ïε ÏÏÏλιο δε ÏÏ
νεÏάγεÏαι Ïε καμία ÏεÏίÏÏÏÏη ÏÏ
μμεÏοÏή ÏοÏ
ÏÏίÏοÏ
ÏÏοÏÏÏοÏ
ÏÏο ÎιαγÏνιÏμÏ."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"5. ÎÏÏα"}),s.jsx("p",{className:"mb-4",children:"Τα δÏÏα ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï (εÏÎµÎ¾Î®Ï ÎºÎ±Î»Î¿Ïμενα Ïα «ÎÏÏα» ή Ïο «ÎÏÏÎ
729¿Â»), για ÏοÏ
Ï ÏÎνÏε (5) νικηÏÎÏ ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï ÎµÎ¯Î½Î±Î¹: ÏÎνÏε (5) ÏÎµÏ Î´ÏÏÏν Îuthentic Îeauty Concept."}),s.jsx("p",{className:"mb-4",children:"Îι νικηÏÎÏ ÏοÏ
θα ανακηÏÏ
ÏθοÏν αÏÏ Ïην κλήÏÏÏη, ÏÏμÏÏνα με Ïον ÏÏο 6 ÏοÏ
ÏαÏÏνÏοÏ, θα λάβοÏ
ν ο καθÎÎ½Î±Ï Ïο δÏÏο ÏοÏ
μεÏά Ïην Îήξη ÏοÏ
ÎιαγÏνιÏμοÏ, ÏÏμÏÏνα με Ïα ειδικÏÏεÏα οÏιζÏμενα ÏÏον ÏÏο 7 ÏοÏ
ÏαÏÏνÏοÏ."}),s.jsx("p",{className:"mb-4",children:"Τα ÎÏÏα είναι ÏÏοÏÏÏικά, δεν μεÏαβιβάζονÏαι και δεν ανÏαλλάÏÏονÏαι με ÏÏήμαÏα."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"6. ΤÏÏÏÎ¿Ï ÎÎ½Î¬Î´ÎµÎ¹Î¾Î·Ï ÎικηÏÏν ÎιαγÏνιÏμοÏ"}),s.jsx("p",{className:"mb-4",children:"Πανάδειξη ÏÏν νικηÏÏν θα ÏÏαγμαÏοÏοιηθεί μÎÏÏ Î·Î»ÎµÎºÏÏÎ¿Î½Î¹ÎºÎ¿Ï ÏÏ
ÏÏήμαÏÎ¿Ï Î±Î½Î¬Î´ÎµÎ¹Î¾Î·Ï Î½Î¹ÎºÎ·ÏÏν ÏÏ
ÏαίÏν κÏδικÏν."}),s.jsxs("p",{className:"mb-4",children:["ΠκλήÏÏÏη θα ÏÏαγμαÏοÏοιηθεί ÏÏÎ¹Ï 3/1/2026 αÏÏ Ïo λογαÏιαÏÎ¼Ï ÏοÏ
influencer ",s.jsx("a",{href:"https://www.instagram.com/nadiaboule/?hl=en",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://www.instagram.com/nadiaboule/?hl=en"})," και θα αναδειÏθοÏν ÏÎνÏε (5) νικηÏÎÏ ÎºÎ±Î¹ ÏÏÎµÎ¹Ï (3) εÏιλαÏÏνÏεÏ."]})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"7. ÎνημÎÏÏÏη για Ïην καÏακÏÏÏÏη â ΠαÏαλαβή ÏοÏ
ÎÏÏοÏ
"}),s.jsxs("p",{className:"mb-4",children:["Τα ονομαÏεÏÏνÏ
μα ÏÏν ÏÎνÏε (5) νικηÏÏν ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï Î¸Î± ανακοινÏθοÏν αμÎÏÏÏ Î¼ÎµÏά Ïην κλήÏÏÏη Ïε λίÏÏα νικηÏÏν με ÏÏÏλιο (comment) ÏÏο post ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï ÏÏον λογαÏιαÏÎ¼Ï ÏÏο Instagram «",s.jsx("a",{href:"https://www.instagram.com/nadiaboule/?hl=en",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://www.instagram.com/nadiaboule/?hl=en"}),"»."]}),s.jsxs("p",{className:"mb-4",children:["Îι νικηÏÎÏ Î¸Î± ÏÏÎÏει να εÏικοινÏνήÏοÏ
ν με Ïη Ïελίδα ÏÎ·Ï influencer ÏÏο Instagram ",s.jsx("a",{href:"https://www.instagram.com/nadiaboule/?hl=en",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://www.instagram.com/nadiaboule/?hl=en"})," με ÏÏεÏÎ¹ÎºÏ ÏÏοÏÏÏÎ¹ÎºÏ Î¼Î®Î½Ï
μα/inbox ÏÏoν λογαÏιαÏμÏ/ÏÏοÏίλ ÏÏο Instagram αÏÏ Ïον οÏοίο ÏÏ
μμεÏείÏαν ÏÏον ÎιαγÏνιÏμÏ, με Ïο οÏοίο μήνÏ
μα η influencer θα ζηÏάει αÏÏ ÏοÏ
Ï Î½Î¹ÎºÎ·ÏÎÏ Ïο ονομαÏεÏÏνÏ
Î¼Ï ÏοÏ
Ï, Ïην διεÏθÏ
νÏη αÏοÏÏÎ¿Î»Î®Ï ÎºÎ±Î¹ Ïον αÏÎ¹Î¸Î¼Ï ÏηλεÏÏνοÏ
ÏοÏ
Ï, για να ÏοÏ
Ï Î±ÏοÏÏείλοÏ
ν Ïα ÎÏÏα."]}),s.jsx("p",{className:"mb-4",children:"H influencer και ο ÎιοÏγανÏÏÎ®Ï Î´ÎµÎ½ ÏÎÏοÏ
ν εÏ
θÏνη για άκαÏÏη ÏÏοÏÏάθεια ειδοÏοίηÏÎ·Ï ÏÏν νικηÏÏν ή ÏÏν εÏιλαÏÏνÏÏν αÏ
ÏÏν ÏοÏ
οÏείλεÏαι Ïε μη αÏάνÏηÏή ÏοÏ
Ï ÏÏο μήνÏ
μα (inbox) ÏοÏ
θα ÏοÏ
Ï ÎÏει ÏÏαλεί, εÏÏÏον η ειδοÏοίηÏη ÎÏει γίνει ÏÏον λογαÏιαÏÎ¼Ï ÏοÏ
Ï ÏÏο Instagram αÏÏ Ïον οÏοίον ÏÏ
μμεÏείÏαν ÏÏον ÎιαγÏνιÏμÏ. ÎεÏά Ïην άκαÏÏη ÏÏοÏÏάθεια ειδοÏοίηÏÎ·Ï ÎºÎ¬Î¸Îµ Ï
ÏοÏÏÎÏÏή ÏοÏ
Ï ÎνανÏι ÏÏν νικηÏÏν ÏαÏει να Ï
ÏίÏÏαÏαι και δεν Ï
ÏÎÏοÏ
ν καμία εÏ
θÏνη οÏÏε αναλαμβάνοÏ
ν οÏοιαδήÏοÏε Ï
ÏοÏÏÎÏÏη ÎνανÏι ÏÏν ÏÏοÏÏÏÏν αÏ
ÏÏν."}),s.jsx("p",{className:"mb-4",children:"H influencer και ο ÎιοÏγανÏÏÎ®Ï Î´ÎµÎ½ ÏÎÏοÏ
ν εÏ
θÏνη για Ïη μη ÏαÏάδοÏη ÏοÏ
ÎÏÏÎ
729¿Ï
, λÏÎ³Ï ÏÎ·Ï Î¼Î· εÏÏεÏÎ·Ï ÏÏν νικηÏÏν ή εÏιλαÏÏνÏÏν ÏÏην διεÏθÏ
νÏη ÏοÏ
δήλÏÏαν ÏÏην influencer."}),s.jsx("p",{className:"mb-4",children:"Î ÏοÏÏÏθεÏη ÏαÏÎ±Î»Î±Î²Î®Ï ÏÏν ÎÏÏÏν είναι η ÏÏοÏκÏμιÏη αÏÏ Ïον νικηÏή ÏÏον εκÏÏÏÏÏÏο ÏοÏ
ÎιοÏγανÏÏή ÏοÏ
ÎελÏίοÏ
ÎÏÏÏ
Î½Î¿Î¼Î¹ÎºÎ®Ï Î¤Î±Ï
ÏÏÏηÏÎ¬Ï ÏοÏ
ή άλλοÏ
δημÏÏιοÏ
εγγÏάÏοÏ
, αÏÏ Ïο οÏοίο να ÏÏοκÏÏÏει η ÏαÏ
ÏοÏÏοÏÏÏία ÏοÏ
. ÎÏοιοÏδήÏοÏε αÏνηθεί να ÏÏοÏκομίÏει Ïα ανÏÏÎÏÏ Î±ÏαÏαίÏηÏα δικαιολογηÏικά για Ïην ÏιÏÏοÏοίηÏη ÏÎ·Ï ÏαÏ
ÏÏÏηÏÎ¬Ï ÏοÏ
, δεν δικαιοÏÏαι να ÏαÏαλάβει Ïο ÎÏÏο ÏοÏ
."}),s.jsx("p",{className:"mb-4",children:"H influencer διαÏηÏεί Ïο δικαίÏμα να ανακοινÏνει Ïο ονομαÏεÏÏνÏ
μο ÏÏν νικηÏÏν και εÏιλαÏÏνÏÏν ÏÏα μÎÏα Î¼Î±Î¶Î¹ÎºÎ®Ï ÎµÎ½Î·Î¼ÎÏÏÏÎ·Ï Î® Ïε ÏÏεÏικÎÏ Î´Î¹Î±ÏημιÏÏικÎÏ Î±Î½Î±ÎºÎ¿Î¹Î½ÏÏÎµÎ¹Ï ÎºÎ±Î¹ να ÏÏοβαίνει Ïε διαÏημιÏÏική εκμεÏάλλεÏ
Ïη κάθε ÏÏεÏÎ¹ÎºÎ¿Ï Î³ÎµÎ³Î¿Î½ÏÏÎ¿Ï Î¼Îµ κάθε ÏÏÏÏο ÏοÏ
κÏίνει ÏÏÏÏÏοÏο, ÏÏÏÎ¯Ï Ïην καÏαβολή οÏοιαÏδήÏοÏε Î±Î¼Î¿Î¹Î²Î®Ï Î® αÏοζημιÏÏεÏÏ Ïε αÏ
ÏοÏÏ."}),s.jsx("p",{className:"mb-4",children:"Σε ÏεÏίÏÏÏÏη ÏοÏ
οÏοιοÏδήÏοÏε αÏÏ ÏοÏ
Ï Î½Î¹ÎºÎ·ÏÎÏ Î´ÎµÎ½ ανÏαÏοκÏιθεί ενÏÏÏ Î´Ïδεκα (12) ημεÏÏν αÏÏ Ïην ημεÏομηνία ενημÎÏÏÏÎ®Ï ÏοÏ
, αμελήÏει, αδιαÏοÏήÏει, αÏνηθεί Ïο ÎÏÏÎ
729¿, Ïο οÏοίο δικαιοÏÏαι ή καÏαÏÏεί αδÏναÏη η εÏικοινÏνία μαζί ÏοÏ
για λÏγοÏ
Ï ÏοÏ
ανάγονÏαι ÏÏο ÏÏÏÏÏÏÏ ÏοÏ
, Ïάνει οÏιÏÏικά οÏοιοδήÏοÏε δικαίÏμά ÏοÏ
ÏÏον αÏοÏά Ïο ÎÏÏο αÏ
ÏÏ. ΣÏην ÏεÏίÏÏÏÏη αÏ
Ïή, η influencer ÎÏει Ïο δικαίÏμα να αÏοκλείÏει Ïον νικηÏή αÏ
ÏÏ ÎºÎ±Î¹ να εÏικοινÏνήÏει με ÏοÏ
Ï ÎµÏιλαÏÏνÏÎµÏ Î½Î¹ÎºÎ·ÏÎÏ Î±ÏÏ ÏοÏ
Ï ÎµÎ³ÎºÏÏÏÏ ÏÏ
μμεÏÎÏονÏεÏ. Îι νÎοι νικηÏÎÏ Î¸Î± ενημεÏÏθοÏν με ÏÏÏλιο (comment) κάÏÏ Î±ÏÏ Ïο ÏÏÏλιο ÏÎ·Ï ÏÏ
μμεÏοÏÎ®Ï ÏοÏ
Ï ÎºÎ±Î¹ θα ακολοÏ
θηθεί η διαδικαÏία ÏοÏ
ÏεÏιγÏάÏεÏαι ανÏÏÎÏÏ ÏÏεÏικά με Ïην ÏαÏαλαβή ÏÏν ÎÏÏÏν αÏÏ Î±Ï
ÏοÏÏ. ΠδιαδικαÏία ÏοÏ
ÏÏοβλÎÏεÏαι ÏÏην ÏαÏάγÏαÏο αÏ
Ïή θα εÏαναληÏθεί μÎÏÏι να βÏεθοÏν ÎγκÏ
Ïοι νικηÏÎÏ ÎºÎ±Î¹ να ÏαÏαληÏθοÏν Ïα ÎÏÏα αÏÏ Î±Ï
ÏοÏÏ, μÎÏÏι εξανÏλήÏεÏÏ ÏλÏν ÏÏν ονομάÏÏν ÏοÏ
ÎÏοÏ
ν κληÏÏθεί."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"8. Î ÏοÏÏÏικά ÎεδομÎνα"}),s.jsx("p",{className:"mb-4",children:"Î ÎιοÏγανÏÏÏια ÏÎβεÏαι και ÏÏοÏÏαÏεÏει Ïα ÏÏοÏÏÏικά δεδομÎνα ÏÏν ΣÏ
μμεÏεÏÏνÏÏν ÏÏον ÎιαγÏνιÏÎ¼Ï ÏÏμÏÏνα με Ïον ÎÎµÎ½Î¹ÎºÏ ÎανονιÏÎ¼Ï (ÎÎ) 2016/679 και Ïο ν. 4624/2019 για Ïην Î ÏοÏÏαÏία ÎεδομÎνÏν, ÏÏ
μÏεÏιλαμβανομÎνÏν ÏÏν ÏÏεÏικÏν οδηγιÏν, καÏεÏ
θÏ
νÏήÏιÏν γÏαμμÏν και αÏοÏάÏεÏν ÏÎ·Ï ÎµÎ»Î»Î·Î½Î¹ÎºÎ®Ï ÎÏÏÎ®Ï Î ÏοÏÏαÏÎ¯Î±Ï ÎεδομÎνÏν Î ÏοÏÏÏÎ¹ÎºÎ¿Ï Î§Î±ÏακÏήÏα (ÎÎ ÎΠΧ)."}),s.jsx("p",{className:"mb-4",children:"ΣÏο ÏλαίÏιο ÏοÏ
ÎιαγÏνιÏμοÏ, η ÎιοÏγανÏÏÏια και η Influencer ÏÏ
λλÎγοÏ
ν Ïα ÏÏ ÎµÎ¾Î®Ï ÏÏοÏÏÏικά δεδομÎνα ÏÏν ΣÏ
μμεÏεÏÏνÏÏν και ειδικÏÏεÏα Ïο ονομαÏεÏÏνÏ
Î¼Ï ÏοÏ
Ï ÎºÎ±Î¹ Ïο Ïνομα ÏÏοÏίλ ÏοÏ
Ï ÏÏο κοινÏÎ½Î¹ÎºÏ Î´Î¯ÎºÏÏ
ο instagram για ÏÎ¹Ï Î±Î½Î¬Î³ÎºÎµÏ Î´Î¹ÎµÎ¾Î±Î³ÏÎ³Î®Ï ÎºÎ±Î¹ δημοÏιÏÏηÏÎ±Ï ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï ÎºÎ±Î¸ÏÏ ÎºÎ±Î¹ διενÎÏÎ³ÎµÎ¹Î±Ï ÏÏν ÏÏεÏικÏν κληÏÏÏεÏν. ΠεÏαιÏÎÏÏ Î· ÎιοÏγανÏÏÏια και ο ΣÏ
νεÏγάÏÎ·Ï ÏÏ
λλÎγοÏ
ν Ïα ακÏλοÏ
θα δεδομÎνα ÏÏν νικηÏÏν και ÏÏν εÏιλαÏÏνÏÏν ή/και ÏοÏ
Ï ÎµÏιλαÏÏνÏÎµÏ Î½Î¹ÎºÎ·ÏÎÏ, ÏÏÏε να εξακÏιβÏÏει Ïα ÏÏοιÏεία ÏοÏ
Ï ÎºÎ±Î¹ να ÏÏοÏÏÏήÏει ÏÏην αÏοÏÏολή ÏÏν ÎÏÏÏν, ήÏοι ονομαÏεÏÏνÏ
μο, διεÏθÏ
νÏη ÏαÏάδοÏÎ·Ï ÏÏν ÎÏÏÏν και ÏηλÎÏÏνο εÏικοινÏνίαÏ."}),s.jsx("p",{className:"mb-4",children:"Τα ÏÏοÏÏÏικά αÏ
Ïά δεδομÎνα ÏÏ
λλÎγονÏαι και Ï
ÏÏκεινÏαι Ïε εÏεξεÏγαÏία αÏοκλειÏÏικά και μÏνο για ÏοÏ
Ï ÏκοÏοÏÏ Î´Î¹ÎµÎ¾Î±Î³ÏÎ³Î®Ï ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï ÎºÎ±Î¹ ÏÎ·Ï ÎºÎ»Î®ÏÏÏÎ·Ï Î³Î¹Î± Ïην ανάδειξη ÏÏν νικηÏÏν και ÏÏν εÏιλαÏÏνÏÏν νικηÏÏν και δεν θα ÏÏηÏιμοÏοιηθοÏν για άλλοÏ
Ï ÏκοÏοÏÏ Ïλην ÏÏν ÏÏ Î¬Î½Ï Î±Î½Î±ÏεÏομÎνÏν οÏÏε θα διαβιβαÏθοÏν Ïε ÏÏίÏοÏ
Ï, ÏÎÏαν ÏÏν κάÏÏθι αναÏεÏÏμενÏν ÏÏοÏÏÏÏν ÏοÏ
θα ÏαÏάÏÏοÏ
ν ÏÎ¹Ï Î±Î½Î±Î³ÎºÎ±Î¯ÎµÏ Ï
ÏηÏεÏÎ¯ÎµÏ Î³Î¹Î± Ïην ÏαÏάδοÏη ÏÏν ÎÏÏÏν ÏÏοÏ
Ï Î½Î¹ÎºÎ·ÏÎÏ. Î ÏÏÏβαÏη ÏÏα ελάÏιÏÏα αÏαÏαίÏηÏα ÏÏοÏÏÏικά δεδομÎÎ
729½Î± ÏÏν ÏÏ
μμεÏεÏÏνÏÏν και ÏÏν ÎικηÏÏν ÎÏοÏ
ν, ÏÎÏαν ÏοÏ
Influencer ÏοÏ
διαÏηÏεί Ïην ÏλαÏÏÏÏμα ÏοÏ
Instagram, μÏνο καÏάλληλα εξοÏ
ÏιοδοÏημÎνοι εÏγαζÏμενοι ή εξÏÏεÏικοί ÏÏ
νεÏγάÏÎµÏ ÏÎ·Ï ÎιοÏγανÏÏÏÎ¹Î±Ï (Ï.Ï. η εÏαιÏεία courier ÏοÏ
θα ÏαÏαδÏÏει Ïα δÏÏα) ÏοÏ
ενεÏγοÏν για λογαÏιαÏÎ¼Ï ÏοÏ
και αναλαμβάνοÏ
ν για λογαÏιαÏÎ¼Ï ÏοÏ
ÎιοÏγανÏÏή Ïην οÏγάνÏÏη και διενÎÏγεια ÏοÏ
ÎιαγÏνιÏμοÏ."}),s.jsx("p",{className:"mb-4",children:"Îάν οι ÏÏ
μμεÏÎÏονÏÎµÏ Î´ÎµÎ½ εÏιθÏ
μοÏν να ÏÏÏοÏ
ν Ïα ÏÏοÏÏÏικά δεδομÎνα ÏοÏ
Ï ÏÎ·Ï Î±Î½ÏÏÎÏÏ ÏεÏιγÏαÏÏÎ¼ÎµÎ½Î·Ï ÎµÏεξεÏγαÏίαÏ, δεν δÏνανÏαι να λάβοÏ
ν μÎÏÎ¿Ï ÏÏον ÎιαγÏνιÏÎ¼Ï ÎºÎ±Î¹ εάν οι νικηÏÎÏ Î® οι εÏιλαÏÏνÏÎµÏ Î´ÎµÎ½ εÏιθÏ
μοÏν να ÏαÏάÏÏοÏ
ν Ïα εÏιÏλÎον ÏÏοÏÏÏικά δεδομÎνα εÏικοινÏνίαÏ, δε θα δÏνανÏαι να ÏαÏαλάβοÏ
ν Ïο δÏÏο ÏοÏ
Ï."}),s.jsx("p",{className:"mb-4",children:"Τα ÏÏ Î¬Î½Ï ÏÏοÏÏÏικά δεδομÎνα ÏÏν ÏÏ
μμεÏεÏÏνÏÏν και νικηÏÏν θα ÏηÏοÏνÏαι αÏÏ Ïη ÎιοÏγανÏÏÏια αÏοκλειÏÏικά και μÏνο για ÏÏο ÏÏÎ¿Î½Î¹ÎºÏ Î´Î¹Î¬ÏÏημα αÏαιÏείÏαι για Ïην ανάδειξη ÏÏν νικηÏÏν, Ïην καÏακÏÏÏÏη και αÏοÏÏολή ÏÏν δÏÏÏν ÏÏοÏ
Ï Î½Î¹ÎºÎ·ÏÎÏ ÎºÎ±Î¹ Ïην ÏÏ
ÏÏν εÏίλÏ
Ïη οÏοιοÏ
δήÏοÏε θÎμαÏÎ¿Ï Î±ÏοÏά ÏÏη διενÎÏγεια ÏοÏ
ÏαÏÏνÏÎ¿Ï Î´Î¹Î±Î³ÏνιÏμοÏ. Σε κάθε ÏεÏίÏÏÏÏη, η ÏεÏÎ¯Î¿Î´Î¿Ï ÏήÏηÏÎ·Ï ÏÏν ÏÏοÏÏÏικÏν δεδομÎνÏν ÏÏν ÏÏ
μμεÏεÏÏνÏÏν δεν θα Ï
ÏεÏβαίνει ÏοÏ
Ï ÏÏÎµÎ¹Ï (3) Î¼Î®Î½ÎµÏ Î±ÏÏ Ïη διεξαγÏγή ÏÎ·Ï ÎºÎ»Î®ÏÏÏηÏ. Îε Ïο ÏÎÏÎ±Ï ÏοÏ
ÏÏÎ¿Î½Î¹ÎºÎ¿Ï Î±Ï
ÏÎ¿Ï Î´Î¹Î±ÏÏήμαÏοÏ, Ïα ÏÏ Î¬Î½Ï ÏÏοÏÏÏικά δεδομÎνα ÏÏν ÏÏ
μμεÏεÏÏνÏÏν θα διαγÏάÏονÏαι με αÏÏάλεια αÏÏ Ïα ÏÏ
ÏÏήμαÏα ÏÎ·Ï ÎιοÏγανÏÏÏιαÏ."}),s.jsx("p",{className:"mb-4",children:"Îια Ïην ÏαÏαλαβή ÏÏν ÎÏÏÏν οι νικηÏÎÏ Î®/και οι εÏιλαÏÏνÏÎµÏ Î½Î¹ÎºÎ·ÏÎÏ Î¸Î± ÏÏÎÏει να εÏιδείξοÏ
ν ÏÏο εξοÏ
ÏιοδοÏημÎνο αÏÏ Ïην εÏαιÏεία ÏÏÏÏÏÏο (courier), Ïο οÏοίο θα ÏÏαγμαÏοÏοιήÏει Ïην ÏαÏάδοÏη ÏÏν ÎÏÏÏν ÏÏοÏ
Ï Î½Î¹ÎºÎ·ÏÎÏ, Ïο ÏÏÏÏÏÏÏ
Ïο ÎÏÏÏ
Î½Î¿Î¼Î¹ÎºÏ ÎελÏίο ΤαÏ
ÏÏÏηÏÎ¬Ï ÏοÏ
Ï, ή άλλο ÎγγÏαÏο αÏÏÎ´ÎµÎ¹Î¾Î·Ï ÏαÏ
ÏοÏÏοÏÏÏÎ¯Î±Ï (Ï.Ï. δίÏλÏμα οδήγηÏηÏ, διαβαÏήÏιο) αÏÏ Ïο οÏοίο να ÏÏοκÏÏÏει η ÏαÏ
ÏÏÏηÏά ÏοÏ
Ï. Σε ανÏίθεÏη ÏεÏίÏÏÏÏη, η ÎιοÏγανÏÏÏια διαÏηÏεί Ïο δικαίÏμα να μην ÏÏοÏÏÏήÏει ÏÏην αÏÏδοÏη ÏÏν ÎÏÏÏν."}),s.jsx("p",{className:"mb-4",children:"Îάθε ΣÏ
μμεÏÎÏÏν μÏοÏεί να αÏκήÏει Ïα δικαιÏμαÏα ÏοÏ
αÏοÏÏÎοÏ
ν αÏÏ Ïα άÏθÏα 12 ÎÏÏ ÎºÎ±Î¹ 22 ÏοÏ
ÎÎµÎ½Î¹ÎºÎ¿Ï ÎανονιÏÎ¼Î¿Ï Î³Î¹Î± Ïην Î ÏοÏÏαÏία ÎεδομÎνÏν (ÎÎ) 2016/679 Ïε ÏÏÎÏη με Ïα ÏÏοÏÏÏικά δεδομÎνα ÏοÏ
ÏοÏ
ÏÏ
γÏάνοÏ
ν εÏεξεÏγαÏÎ¯Î±Ï Î±ÏÏ Ïη ÎιοÏγανÏÏÏια εÏικοινÏνÏνÏÎ±Ï Î¼ÎÏÏ ÏηλεÏÏνοÏ
ÏÏο 21 3005 3625. ÎιδικÏÏεÏα, οι ÏÏ
μμεÏÎÏονÏÎµÏ ÎÏοÏ
ν δικαίÏμα να ζηÏήÏοÏ
ν/δηλÏÏοÏ
ν:"}),s.jsx("p",{className:"mb-2",children:"α. ÏÏÏÏβαÏη ÏÏα ÏÏοÏÏÏικά ÏοÏ
Ï Î´ÎµÎ´Î¿Î¼ÎÎ
729½Î±,"}),s.jsx("p",{className:"mb-2",children:"β. διÏÏθÏÏη ÏÏν ÏÏοÏÏÏικÏν ÏοÏ
Ï Î´ÎµÎ´Î¿Î¼ÎνÏν εάν είναι ανακÏιβή ή ελλιÏή,"}),s.jsx("p",{className:"mb-2",children:"γ. διαγÏαÏή ÏÏν ÏÏοÏÏÏικÏν ÏοÏ
Ï Î´ÎµÎ´Î¿Î¼ÎνÏν, εÏÏÏον ÏÏ
νÏÏÎÏοÏ
ν οι ÏÏοÏÏοθÎÏÎµÎ¹Ï ÏοÏ
θÎÏει Ïο ÎµÎ¸Î½Î¹ÎºÏ ÎºÎ±Î¹ εÏ
ÏÏÏαÏÎºÏ Î½Î¿Î¼Î¿Î¸ÎµÏÎ¹ÎºÏ ÏλαίÏιο για Ïην άÏκηÏη ÏÏν δικαιÏμάÏÏν αÏ
ÏÏν,"}),s.jsx("p",{className:"mb-2",children:"δ. ÏεÏιοÏιÏÎ¼Ï ÏÎ·Ï ÎµÏεξεÏγαÏÎ¯Î±Ï ÏÏν ÏÏοÏÏÏικÏν ÏοÏ
Ï Î´ÎµÎ´Î¿Î¼ÎνÏν μÏνο για ÏÏ
γκεκÏιμÎνοÏ
Ï ÏκοÏοÏÏ,"}),s.jsx("p",{className:"mb-2",children:"ε. ενανÏίÏÏη ÏÏην εÏεξεÏγαÏία ÏÏν ÏÏοÏÏÏικÏν ÏοÏ
Ï Î´ÎµÎ´Î¿Î¼ÎνÏν,"}),s.jsx("p",{className:"mb-4",children:"ÏÏ. ÏοÏηÏÏÏηÏα ÏÏν δεδομÎνÏν ÏοÏ
ÎÏοÏ
ν ÏαÏάÏÏει, δηλαδή να λάβοÏ
ν Ïα δεδομÎνα ÏοÏ
ÎÏοÏ
ν ÏαÏάÏÏει Ïε δομημÎνο, κοινÏÏ ÏÏηÏιμοÏοιοÏμενο μοÏÏÏÏÏ
Ïο ή να ζηÏήÏοÏ
ν Ïην αÏοÏÏολή ÏοÏ
Ï Ïε ÏÏίÏο ÏοÏ
θα οÏίÏοÏ
ν."}),s.jsx("p",{className:"mb-4",children:"Îια οÏοιαδήÏοÏε ÏεÏαιÏÎÏÏ ÏληÏοÏοÏία ÏÏεÏικά με Ïην εÏεξεÏγαÏία ÏÏν δηλÏθÎνÏÏν ÏÏοÏÏÏικÏν δεδομÎνÏν ÏÏν ÏÏ
μμεÏεÏÏνÏÏν, καθÏÏ ÎºÎ±Î¹ για Ïην άÏκηÏη οÏοιοÏ
δήÏοÏε δικαιÏμαÏÏÏ ÏÎ±Ï Ïε ÏÏÎÏη με Ïην εν λÏÎ³Ï ÎµÏεξεÏγαÏία (δικαίÏμα ÏÏÏÏβαÏηÏ, διÏÏθÏÏηÏ, ανÏίÏÏηÏηÏ, διαγÏαÏÎ®Ï ÎºÎ»Ï.), οι ÏÏ
μμεÏÎÏονÏÎµÏ Î¼ÏοÏοÏν να αÏεÏ
θÏ
νθοÏν ÏÏο ÏηλÎÏÏνο 21 3005 3625."}),s.jsxs("p",{className:"mb-4",children:["ΤÎλοÏ, εάν κάÏÎ¿Î¹Î¿Ï Î£Ï
μμεÏÎÏÏν, νικηÏÎ®Ï Î®/και εÏιλαÏÏν θεÏÏεί ÏÏι η ÎιοÏγανÏÏÏια ÏαÏαβιάζει Ïη νομοθεÏία ÏεÏί ÏÏοÏÏαÏÎ¯Î±Ï ÏÏοÏÏÏικÏν δεδομÎνÏν, μÏοÏεί να αÏκήÏει Ïο δικαίÏμα Ï
ÏÎ¿Î²Î¿Î»Î®Ï ÎºÎ±ÏÎ±Î³Î³ÎµÎ»Î¯Î±Ï ÏÏην ÎÏÏή Î ÏοÏÏαÏÎ¯Î±Ï ÎεδομÎνÏν Î ÏοÏÏÏÎ¹ÎºÎ¿Ï Î§Î±ÏακÏήÏα ÏÏην ακÏλοÏ
θη διεÏθÏ
νÏη: ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"}),"."]})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"9. Î¥ÏοÏÏεÏÏÎµÎ¹Ï Î£Ï
μμεÏεÏÏνÏÏν"}),s.jsx("p",{className:"mb-4",children:"Îάθε ΣÏ
μμεÏÎÏÏν οÏείλει να ενεÏγεί νÏμιμα και μÎÏα ÏÏα ÏλαίÏια ÏÏν ÏÏηÏÏÏν και ÏÏ
ναλλακÏικÏν ηθÏν και να ÏÏ
μμοÏÏÏνεÏαι και αÏοδÎÏεÏαι ÏοÏ
Ï ÏαÏÏνÏÎµÏ ÏÏοÏ
Ï, οι οÏοίοι ÏÏο ÏÏÎ½Î¿Î»Ï ÏοÏ
Ï Î¸ÎµÏÏοÏνÏαι οÏ
ÏιÏδειÏ."}),s.jsx("p",{className:"mb-4",children:"Î ÎιοÏγανÏÏÎ®Ï Î´Î¹Î±ÏηÏεί Ïο δικαίÏμα να αÏοκλείει Ïην ανάÏÏηÏη ÏÏοÏβληÏικοÏ, ανήθικοÏ
και ÏαÏάνομοÏ
ÏεÏιεÏομÎνοÏ
ÏÏο διαδικÏÏ
Î±ÎºÏ ÏÏÏο ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï ÏÏÏÎ¯Ï ÏÏοειδοÏοίηÏη και οÏ
δεμία εÏ
θÏνη ÏÎÏει για ανάÏÏηÏη εκ μÎÏοÏ
Ï ÏÏν ΣÏ
μμεÏεÏÏνÏÏν Ï
Î»Î¹ÎºÎ¿Ï ÏÏον ανÏÏÎÏÏ Î´Î¹Î±Î´Î¹ÎºÏÏ
Î±ÎºÏ ÏÏÏο, Ïο οÏοίο μÏοÏεί να κÏιθεί ÏÏοÏβληÏικÏ, ανήθικο και ÏαÏάνομο αÏÏ Î¬Î»Î»Î¿Ï
Ï Î£Ï
μμεÏÎÏονÏεÏ."}),s.jsx("p",{className:"mb-4",children:"ÎÏοιαδήÏοÏε ενÎÏγεια ή ÏÏ
μÏεÏιÏοÏά ΣÏ
μμεÏÎÏονÏÎ¿Ï ÎºÏιθεί (βάÏει ενδείξεÏν) αÏÏ Ïον ÎιοÏγανÏÏή ή ÏαÏάνομη ή καÏαÏÏηÏÏική ή ανÏιÏÏ
μβαÏική (μη ÏÎÏονÏÎ¿Ï ÏοÏ
ÎιοÏγανÏÏή ÏοÏ
ÏÏεÏÎ¹ÎºÎ¿Ï Î²Î¬ÏοÏ
Ï ÏÎ·Ï Î±ÏοδείξεÏÏ) ÏÏÏε ο ÎιοÏγανÏÏÎ®Ï ÎÏει Ïο δικαίÏμα, καÏά Ïην αÏÏλÏ
Ïη διακÏιÏική ÏοÏ
εÏ
ÏÎÏεια, να Ïον αÏοκλείÏει ÏελείÏÏ Î±ÏÏ Ïον ÎιαγÏνιÏμÏ, ακÏ
ÏÏνονÏÎ±Ï Ïη ÏÏ
μμεÏοÏή ÏοÏ
Ïε οÏοιοδήÏοÏε ÏÏάδιο ÏοÏ
ÎιαγÏνιÏμοÏ, ακÏμα και καÏά Ïο ÏÏάδιο ÏÎ·Ï ÏαÏάδοÏÎ·Ï ÎºÎ±Î¹ ÏαÏÎ±Î»Î±Î²Î®Ï ÏοÏ
ÎÏÏÎ
729¿Ï
."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"10. ΠληÏοÏοÏÎ¯ÎµÏ â ΠαÏάÏονα"}),s.jsxs("p",{className:"mb-4",children:["Îια οÏοιαδήÏοÏε ÏληÏοÏοÏία ή ÏαÏάÏονο ÏÏεÏικά με Ïον ÎιαγÏνιÏÎ¼Ï Î¿ÏοιοÏδήÏοÏε ΣÏ
μμεÏÎÏÏν ή ÏÏίÏÎ¿Ï Î¼ÏοÏεί να εÏικοινÏνεί με Ïον ÎιοÏγανÏÏή ÏÏο ÏηλÎÏÏνο: ",s.jsx("strong",{children:"21 3005 3625"}),"."]})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"11. ÎνάκληÏη Î ÏοκήÏÏ
Î¾Î·Ï â ΤÏοÏοÏοίηÏη ÎÏÏν"}),s.jsxs("p",{className:"mb-4",children:["Î ÎιοÏγανÏÏÎ®Ï Î´Î¹ÎºÎ±Î¹Î¿ÏÏαι να ανακαλÎÏει Ïην ÏÏοκήÏÏ
ξη ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï Î® να μαÏαιÏÏει Ïο ÎιαγÏνιÏÎ¼Ï Î® να ÏÏοÏοÏοιήÏει οÏοιονδήÏοÏε αÏÏ ÏοÏ
Ï ÏαÏÏνÏÎµÏ ÏÏοÏ
Ï (ενδεικÏικά Ïη διάÏκεια ÏοÏ
ÎιαγÏνιÏμοÏ, ÏÏοÏοÏοίηÏη ÏÏν ÎÏÏÏν, ÏÏοÏοÏοίηÏη ÏÏν μηÏανιÏμÏν εÏÎ¹Î»Î¿Î³Î®Ï Î½Î¹ÎºÎ·ÏÏν, κλÏ), με ανάÏÏηÏη ÏÎ·Ï ÏÏεÏÎ¹ÎºÎ®Ï ÏληÏοÏοÏÎ¯Î±Ï ÏÏον λογαÏιαÏÎ¼Ï ÏÎ·Ï influencer «",s.jsx("a",{href:"https://www.instagram.com/nadiaboule/?hl=en",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://www.instagram.com/nadiaboule/?hl=en"}),"» ή/και με άλλον ÏÏ
ναλλακÏικά ÏÏÏÏÏοÏο ÏÏÏÏο, με ημεÏομηνία ιÏÏÏÎ¿Ï ÏÎ·Ï Î±Î½Î¬ÎºÎ»Î·ÏηÏ/ÏÏοÏοÏοίηÏÎ·Ï Î±Ï
ÏÎ®Ï Ïην ημεÏομηνία ÏÎ·Ï ÏÏεÏÎ¹ÎºÎ®Ï ÎµÎ½Î·Î¼ÎÏÏÏηÏ."]}),s.jsx("p",{className:"mb-4",children:"Σε ÏεÏίÏÏÏÏη αναβολήÏ, διακοÏÎ®Ï Î® μαÏαίÏÏÎ·Ï ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï Î¿Î¹ ΣÏ
μμεÏÎÏονÏÎµÏ Î´ÎµÎ½ αÏοκÏοÏν δικαίÏμα ή αÏαίÏηÏη καÏά ÏοÏ
ÎιοÏγανÏÏή οÏÏε νομιμοÏοιοÏνÏαι ή δικαιοÏνÏαι να ζηÏήÏοÏ
ν Ïη ÏÏ
νÎÏιÏη ή ανÏικαÏάÏÏαÏη ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï Î® οÏοιοδήÏοÏε ÏοÏÏ ÏÏ Î±ÏοζημίÏÏη."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"12. ÎÏαÏμοÏÏÎο Îίκαιο â ÎÏÏιδικία"}),s.jsx("p",{className:"mb-4",children:"Îι ÏαÏÏνÏÎµÏ ÏÏοι διÎÏονÏαι και ÏÏ
μÏληÏÏνονÏαι αÏÏ Ïο ÎµÎ»Î»Î·Î½Î¹ÎºÏ Î´Î¯ÎºÎ±Î¹Î¿. Îάθε διαÏοÏά ÏÏεÏικά με Ïον ÎιαγÏνιÏμÏ, ÏοÏ
ενδÎÏεÏαι να ÏÏοκÏÏει ÏÏο μÎλλον, Ï
ÏοβάλλεÏαι ÏÏην αÏοκλειÏÏική αÏμοδιÏÏηÏα ÏÏν ÎικαÏÏηÏίÏν ÏÎ·Ï ÎθήναÏ."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"13. ÎÏοδοÏή ÏÏν ÏÏÏν â ÏεÏιοÏιÏμÏÏ ÏÎ·Ï ÎµÏ
θÏνηÏ"}),s.jsx("p",{className:"mb-4",children:"Î ÏÏ
μμεÏοÏή ÏÏον ÎιαγÏνιÏÎ¼Ï ÏÏ
νεÏάγεÏαι Ïην ανεÏιÏÏλακÏη αÏοδοÏή ÏÏν ÏαÏÏνÏÏν ÏÏÏν, ÏαÏαιÏοÏμενοÏ
ÏοÏ
ΣÏ
μμεÏÎÏονÏα αÏÏ Ïην ÏÏοÏβολή ÏÎ·Ï ÎµÎ³ÎºÏ
ÏÏÏηÏÎ±Ï ÏÏν ÏαÏÏνÏÏν ÎενικÏν ÎÏÏν ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï ÎºÎ±Î¹ αÏÏ Ïη διεκδίκηÏη οιαÏδήÏοÏε αÏοζημιÏÏεÏÏ ÎµÎ¾' αÏ
ÏοÏ."}),s.jsx("p",{className:"mb-4",children:"Î ÎιοÏγανÏÏÏια και οι ÏÏ
ÏÏν ÏÏ
νδεδεμÎÎ½ÎµÏ Î¼Îµ αÏ
Ïήν εÏαιÏείεÏ, ο ΣÏ
νεÏγάÏηÏ, η εÏαιÏεία με Ïην εÏÏνÏ
μία «HENKEL ÎÎÎÎΣ ÎÎΩÎÎ¥ÎÎΣ ÎÎÎÎÎΧÎÎÎÎÎ ÎÎÎ ÎÎÎ ÎΡÎÎÎ ÎΤÎÎΡÎÎA», οι Ï
Ïάλληλοι και Ïα διεÏ
θÏνονÏα ÏÏελÎÏη αÏ
ÏÏν δεν ÏÎÏοÏ
ν εÏ
θÏνη για οÏοιαδήÏοÏε άμεÏη, ÎμμεÏη, ηθική, ή Ï
λική ζημία ÏοÏ
ÏÏ
ÏÏν Ï
ÏοÏÏοÏν οι ενδιαÏεÏÏμενοι να ÏÏ
μμεÏάÏÏοÏ
ν ÏÏο ÎιαγÏνιÏÎ¼Ï ÎºÎ±Î¹ οι ÏελικÏÏ Î£Ï
μμεÏÎÏονÏÎµÏ Ïε αÏ
ÏÏν και ÏοÏ
ÏÏοÎÏÏεÏαι αÏÏ Î® ÏÏ
νδÎεÏαι άμεÏα ή ÎμμεÏα και με οÏοιονδήÏοÏε ÏÏÏÏο με Ïη ÏÏαγμαÏοÏοίηÏη ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï ÎºÎ±Î¹ ÏοÏ
οÏείλεÏαι Ïε αμÎλειά ÏοÏ
Ï."}),s.jsx("p",{className:"mb-4",children:"Τα ÏαÏαÏÎ¬Î½Ï ÏÏÏÏÏÏα δεν ÏÎÏοÏ
ν καμία εÏ
θÏνη οÏοιαÏδήÏοÏε ÏÏÏεÏÏ ÏÏÎ¿Ï ÏοÏ
Ï ÎµÎ½Î´Î¹Î±ÏεÏÏμενοÏ
Ï Î½Î± ÏÏ
μμεÏάÏÏοÏ
ν ÏÏο ÎιαγÏνιÏμÏ, ÏοÏ
Ï Î£Ï
μμεÏÎÏονÏÎµÏ Î® οÏοιονδήÏοÏε ÏÏίÏο, για οÏοιοδήÏοÏε αÏÏÏημα ÏÏ
ÏÏν ÏÏ
μβεί ή/και για οÏοιαδήÏοÏε ζημία ή/και για οÏοιαδήÏοÏε ÏÏμαÏική βλάβη ÏÏ
ÏÏν ÏÏοκληθεί Ïε αÏ
ÏοÏÏ ÏÏεÏιζÏμενη άμεÏα ή ÎμμεÏα με Ïο ÎιαγÏνιÏÎ¼Ï Î®/και Ïο ÎÏÏÎ
729¿. Σε κάθε ÏεÏίÏÏÏÏη η εÏ
θÏνη ÏÏν ÏαÏαÏÎ¬Î½Ï ÏÏοÏÏÏÏν ÏεÏιοÏίζεÏαι Ïε ÏÏ
ÏÏν ÏÏÎ¬Î¾ÎµÎ¹Ï Î® ÏαÏαλείÏÎµÎ¹Ï ÏοÏ
Ï ÏελοÏÎ¼ÎµÎ½ÎµÏ Î±ÏÏ Î´Ïλο ή βαÏιά αμÎλεια και Ïε καμία ÏεÏίÏÏÏÏη δεν θα εκÏείνεÏαι Ïε ÏÏÎ¬Î¾ÎµÎ¹Ï Î® ÏαÏαλείÏÎµÎ¹Ï ÏοÏ
οÏείλονÏαι Ïε ελαÏÏά αμÎλεια, ÏÏ
ÏεÏά γεγονÏÏα ή γεγονÏÏα ανÏÏÎÏÎ±Ï Î²Î¯Î±Ï."}),s.jsx("p",{className:"mb-4",children:"Σε καμία ÏεÏίÏÏÏÏη δεν εÏ
θÏνονÏαι Ïα ÏαÏαÏÎ¬Î½Ï ÏÏÏÏÏÏα για ÏÏ
ÏÏν άμεÏÎµÏ Î® ÎμμεÏÎµÏ Î¶Î·Î¼Î¯ÎµÏ, δαÏÎ¬Î½ÎµÏ ÎºÎ±Î¹ Îξοδα ÏοÏ
μÏοÏεί να ÏÏοκÏÏοÏ
ν αÏÏ ÏÏ
ÏÏν διακοÏή, δÏ
ÏλειÏοÏ
Ïγία ή καθÏ
ÏÏÎÏηÏη ή οÏοιαδήÏοÏε άλλη αιÏία ÏÏεÏικά με Ïον ÎιαγÏνιÏÎ¼Ï Î® Ïην μαÏαίÏÏή ÏοÏ
."}),s.jsx("p",{className:"mb-4",children:"Τα ÎÏÏα ÏοÏ
θα ÏαÏαδοθοÏν καÏά ÏοÏ
Ï ÎÏοÏ
Ï ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï ÏαÏÎÏονÏαι ÏÏην καÏάÏÏαÏη ÏÏην οÏοία αÏ
Ïά εÏ
ÏίÏκονÏαι καÏά Ïον ÏÏÏνο ÏÏαγμαÏοÏοίηÏÎ·Ï ÏοÏ
ÎιαγÏνιÏμοÏ, αÏοκλειομÎÎ½Î·Ï ÏÎ·Ï ÎµÏαÏÎ¼Î¿Î³Î®Ï ÏÏν διαÏάξεÏν ÏεÏί εÏ
θÏÎ½Î·Ï ÏοÏ
ÏÏληÏή ή άλλÏν διαÏάξεÏν ÏοÏ
θεμελιÏνοÏ
ν εÏ
θÏνη αναÏοÏικά με ÏÏαγμαÏικά ελαÏÏÏμαÏα, ÏÏ
μÏÏνηθείÏÎµÏ Î¹Î´Î¹ÏÏηÏÎµÏ ÎºÏλ."}),s.jsx("p",{className:"mb-4",children:"ÎεÏά Ïην εκÏνοή ÏÎ·Ï Î´Î¹Î¬ÏÎºÎµÎ¹Î±Ï ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï ÎºÎ±Î¹ Ïην αÏÏδοÏη ÏÏν ÎÏÏÏν, κάθε Ï
ÏοÏÏÎÏÏη ÏÎ·Ï ÎιοÏγανÏÏÏÎ¹Î±Ï ÎºÎ±Î¹ ÏοÏ
ΣÏ
νεÏγάÏη ÏαÏει να Ï
ÏίÏÏαÏαι και η ÎιοÏγανÏÏÏια και ο ΣÏ
νεÏγάÏÎ·Ï Î´ÎµÎ½ θα αναλάβοÏ
ν οÏοιαδήÏοÏε Ï
ÏοÏÏÎÏÏη ÎνανÏι ÏÏν ÏÏ
μμεÏεÏÏνÏÏν ÏÏον ÎιαγÏνιÏμÏ."}),s.jsxs("p",{className:"mb-4",children:["Τα ÏαÏαÏÎ¬Î½Ï ÏÏÏÏÏÏα δεν ÏÎÏοÏ
ν οÏ
δεμία εÏ
θÏνη για οÏοιαδήÏοÏε βλάβη ÏÏοκÏÏει ÏÏον δικÏÏ
Î±ÎºÏ ÏÏÏο ",s.jsx("a",{href:"https://www.instagram.com/nadiaboule/?hl=en",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://www.instagram.com/nadiaboule/?hl=en"})," καÏά Ïο ÏÏÏνο διεξαγÏÎ³Î®Ï ÏοÏ
ÎιαγÏνιÏμοÏ. Î ÎιοÏγανÏÏÏια λαμβάνει κάθε καÏάλληλο και αναγκαίο μÎÏÏο, ÏÏοκειμÎνοÏ
να εξαÏÏαλιÏθεί η ομαλή διενÎÏγεια και λειÏοÏ
Ïγία ÏοÏ
ÎιαγÏνιÏμοÏ. Σε ÏεÏίÏÏÏÏη ÏοÏ
ÏαÏοÏ
ÏιαÏθοÏν ÏÏάλμαÏα, θα καÏαβληθεί κάθε δÏ
ναÏή ÏÏοÏÏάθεια για Ïον μεÏÏιαÏμÏ, διÏÏθÏÏη ή/και αÏάλειÏή ÏοÏ
Ï."]}),s.jsx("p",{className:"mb-4",children:"H influencer δεν ÏÎÏει καμία εÏ
θÏνη για ÏεÏιÏÏαÏικά, ÏοÏ
ÏÏ
νιÏÏοÏν γεγονÏÏα ανÏÏÎÏÎ±Ï Î²Î¯Î±Ï ÎºÎ±Î¹ Ïα οÏοία ÎÏοÏ
ν ÏÏ ÏÏ
νÎÏεια Ïην αδÏ
ναμία εκÏελÎÏεÏÏ ÏÏν καθηκÏνÏÏν ÏÎ·Ï ÏÏο ÏλαίÏιο ÏοÏ
ÎιαγÏνιÏμοÏ. Σε ÏεÏίÏÏÏÏη ÏÏ
νδÏÎ¿Î¼Î®Ï Î»ÏγοÏ
ανÏÏÎÏÎ±Ï Î²Î¯Î±Ï ÎµÎºÏÏÏ ÏÎ·Ï ÏÏαίÏÎ±Ï ÎµÏιÏÏÎ¿Î®Ï ÏÎ·Ï ÎιοÏγανÏÏÏÎ¹Î±Ï ÎºÎ±Î¹/ή ÏοÏ
ΣÏ
νεÏγάÏη, η ÎιοÏγανÏÏÏια δικαιοÏÏαι να μην ÏÏοÏÏÎÏει ÏÏοÏ
Ï Î½Î¹ÎºÎ·ÏÎÏ Ïα ÎÏÏα, οÏÏε εναλλακÏικά ÎÏÏα, οÏÏÏε και θα αÏαλλάÏÏεÏαι αÏÏ ÎºÎ¬Î¸Îµ εÏ
θÏνη και δεν θα Ï
ÏοÏÏεοÏÏαι Ïε ÏÏοÏÏοÏά εναλλακÏικÏν ÎÏÏÏν οÏοιαÏδήÏοÏε μοÏÏÎ®Ï ÎºÎ±Î¹ αξίαÏ."}),s.jsx("p",{className:"mb-4",children:"Τα ÏαÏαÏÎ¬Î½Ï ÏÏÏÏÏÏα δεν αναλαμβάνοÏ
ν καμία Ï
ÏοÏÏÎÏÏη αναÏοÏικά με Ïην εξαÏÏάλιÏη, Ïην Ï
ÏοβοήθηÏη ÏÎ·Ï ÏÏÏÏβαÏÎ·Ï Ïε ÏÏÏοÏ
Ï Î´Î¹Î±Î´Î¹ÎºÏÏοÏ
(websites) ή Ïην ÏαÏοÏή ÏÏεÏικÏν διεÏ
κολÏνÏεÏν ÏÏÎ¿Ï Î¿ÏοιοδήÏοÏε ενδιαÏεÏÏμενο. ΣÏ
νεÏÏÏ Î´ÎµÎ½ ÏÎÏοÏ
ν καμία αÏολÏÏÏÏ ÎµÏ
θÏνη εάν για λÏγοÏ
Ï ÏÎÏα αÏÏ Ïον ÎλεγÏÏ ÏοÏ
Ï Î® για λÏγοÏ
Ï Î±Î½ÏÏÎÏÎ±Ï Î²Î¯Î±Ï (ενδεικÏικά, ÏÏοβλήμαÏα ή ÏεÏνικÎÏ Î´Ï
ÏλειÏοÏ
ÏÎ³Î¯ÎµÏ ÏηλεÏÏνικÏν δικÏÏÏν ή γÏαμμÏν, online ÏÏ
ÏÏημάÏÏν ηλεκÏÏονικÏν Ï
ÏολογιÏÏÏν, server ή provider, εξαÏÏημάÏÏν Ï
ÏολογιÏÏÏν, λογιÏμικοÏ, μη αÏοÏÏολή ή λήÏη δεδομÎÎ
729½Ïν λÏÎ³Ï ÎλλειÏÎ·Ï Î´Î¹Î±Î¸ÎÏιμοÏ
ÏÏÏοÏ
ή λÏÎ³Ï ÏεÏνικÏν ÏÏοβλημάÏÏν ή ÏÏ
μÏÏÏηÏÎ·Ï ÏÏο διαδίκÏÏ
ο ή Ïε οÏοιοδήÏοÏε διαδικÏÏ
Î±ÎºÏ ÏÏÏο ή λÏÎ³Ï ÏÏ
νδÏ
αÏÎ¼Î¿Ï Î±Ï
ÏÏν ÏÏν γεγονÏÏÏν, διακοÏή ÏÏνδεÏÎ·Ï Î¼Îµ Ïο διαδίκÏÏ
ο, καθÏÏ ÎºÎ±Î¹ ÏÏοÏβολή αÏÏ Î¹Î¿ÏÏ Ï
ÏολογιÏÏÏν, κακÏβοÏ
Î»ÎµÏ Î® ÏαÏÎ¬Î½Î¿Î¼ÎµÏ ÎµÎ½ÎÏÎ³ÎµÎ¹ÎµÏ Î® εÏεμβάÏÎµÎ¹Ï ÏÏίÏÏν, αÏαÏηλÎÏ ÎµÎ½ÎÏγειεÏ) καθÏ
ÏÏεÏήÏει ή αÏοÏÏÏει η αÏοÏÏολή ÏÎ·Ï ÏÏ
μμεÏοÏÎ®Ï ÏÏο ÎιαγÏνιÏÎ¼Ï Ïα ÏαÏαÏÎ¬Î½Ï ÏÏÏÏÏÏα δεν ÏÎÏοÏ
ν καμία εÏ
θÏνη για Î¶Î·Î¼Î¯ÎµÏ Î® αÏÏÎ»ÎµÎ¹ÎµÏ ÏοÏ
ÏÏοκαλοÏνÏαι αÏÏ Î»Î¬Î¸Î·, καθÏ
ÏÏεÏήÏÎµÎ¹Ï Î® διακοÏÎÏ ÏÏη μεÏάδοÏη, δÏ
ÏλειÏοÏ
ÏÎ³Î¯ÎµÏ ÏοÏ
ÏεÏÎ½Î¹ÎºÎ¿Ï ÎµÎ¾Î¿ÏλιÏÎ¼Î¿Ï ÎºÎ±Î¹ ÏÏν Ï
ÏηÏεÏιÏν, εÏÏαλμÎνο ÏεÏιεÏÏμενο, Ïην αÏÏλεια ή διαγÏαÏή δεδομÎνÏν, ιοÏÏ, κλÏ. καÏά Ïη διάÏκεια ÏÎ·Ï ÏÏ
μμεÏοÏÎ®Ï ÏÏο ÎιαγÏνιÏÎ¼Ï Î® καÏά Ïην διαδικαÏία ÏÎ·Ï ÎµÎ½Î·Î¼ÎÏÏÏÎ·Ï ÏÏν νικηÏÏν."}),s.jsx("p",{className:"mb-4",children:"Î ÎιοÏγανÏÏÏια δεν θα εÏ
θÏνεÏαι ÏÏην ÏεÏίÏÏÏÏη ÏοÏ
, για οÏοιοδήÏοÏε ÏεÏÎ½Î¹ÎºÏ Î»Ïγο, είναι αδÏναÏη η λήÏη και καÏαÏÏÏηÏη ÏÏ
μμεÏοÏÎ®Ï ÎºÎ¬ÏοιοÏ
ενδιαÏεÏÏμενοÏ
."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"14. ÎÏοκλειÏμÏÏ Î£Ï
μμεÏεÏÏνÏÏν"}),s.jsx("p",{className:"mb-4",children:"Î ÎιοÏγανÏÏÏια δÏναÏαι -αλλά δεν Ï
ÏοÏÏεοÏÏαι- να αÏοκλείÏει αÏÏ Ïον ÎιαγÏνιÏμÏ, Ïε οÏοιοδήÏοÏε ÏÏάδιο διεξαγÏÎ³Î®Ï ÏοÏ
, οÏοιονδήÏοÏε ΣÏ
μμεÏÎÏονÏα ÏοÏ
καÏά Ïην άÏοÏη ÏÎ·Ï ÎµÎ¯Î½Î±Î¹ ÏÎ¹Î¸Î±Î½Ï Î½Î± ÎÏει ÏÏηÏιμοÏοιήÏει (ή να ÎÏει αÏοÏειÏαθεί να ÏÏηÏιμοÏοιήÏει) αθÎμιÏα μÎÏα αναÏοÏικά με Ïη ÏÏ
μμεÏοÏή ÏοÏ
ή ÎÏει ÏαÏαβεί (ή ÎÏει αÏοÏειÏαθεί να ÏαÏαβιάÏει) κάÏοιον αÏÏ ÏοÏ
Ï ÏαÏÏνÏÎµÏ ÏÏοÏ
Ï. Î©Ï Î±Î¸ÎμιÏα μÎÏα νοοÏνÏαι, ενδεικÏικά και ÏÏι ÏεÏιοÏιÏÏικά, η ÏÏήÏη ÏÏ
ÏκεÏ
Ïν, μÎÏÏν, ηλεκÏÏονικÏν Ï
ÏολογιÏÏÏν ή/και λογιÏÎ¼Î¹ÎºÎ¿Ï ÏÏÎ¿Ï Î´Î¹ÎµÏ
κÏλÏ
νÏη αÏ
ÏομαÏοÏοιημÎνÏν ή ÏολλαÏλÏν ÏÏ
μμεÏοÏÏν ÏÏÏÎ¯Ï Î±Î½Î¸ÏÏÏινη ÏαÏÎμβαÏη, Ï
ÏοκλοÏή κλÏ."}),s.jsx("p",{className:"mb-4",children:"ÎÏιÏλÎον, δεν θα γίνονÏαι αÏοδεκÏÎÏ, ÏÏ
μμεÏοÏÎÏ Î¼Îµ ÏεÏιεÏÏμενο ÏοÏ
ÏÏοÏβάλλει Ïη δημÏÏια Î±Î¹Î´Ï ÎºÎ±Î¹ Ïα ÏÏηÏÏά ήθη ή ÏαÏοÏ
ÏιάζοÏ
ν αÏάÏÎµÎ¹ÎµÏ Î® άλλα ÏεÏνικά ελαÏÏÏμαÏα. ÎÏίÏηÏ, θα ακÏ
ÏÏνονÏαι ÏÏ
μμεÏοÏÎÏ Î¼Îµ ÏεÏιεÏÏμενο Ï
βÏιÏÏικÏ, ÏÏ
δαίο, δÏ
ÏÏημιÏÏικÏ, εÏικίνδÏ
νο, ÏαÏÏιÏÏικÏ, ÏοÏ
ÏÏοÏβάλλει Ïην ανθÏÏÏινη αξιοÏÏÎÏεια ή εν γÎνει ανÏίκειÏαι ÏÏÎ¹Ï ÎºÎµÎ¯Î¼ÎµÎ½ÎµÏ Î´Î¹Î±ÏÎ¬Î¾ÎµÎ¹Ï Î® με οÏοιονδήÏοÏε άλλο ÏÏÏÏο αÏÏεÏÎÏ ÎºÎ±Ïά Ïην αÏÏλÏ
Ïη κÏίÏη ÏÎ·Ï ÎιοÏγανÏÏÏιαÏ."}),s.jsx("p",{className:"mb-4",children:"ÎÏοιοÏδήÏοÏε αÏÏ ÏοÏ
Ï Î½Î¹ÎºÎ·ÏÎÏ, Ïε οÏοιοδήÏοÏε ÏÏάδιο μÏοÏεί να ακÏ
ÏÏθεί για ÏοÏ
Ï ÎµÎ¾Î®Ï Î»ÏγοÏ
Ï:"}),s.jsx("p",{className:"mb-2",children:"(α) Ïε ÏεÏίÏÏÏÏη ÏοÏ
, για οÏοιονδήÏοÏε λÏγο, δεν αÏοδεÏθεί ÏλήÏÏÏ ÏοÏ
Ï ÏαÏÏνÏÎµÏ ÎÏοÏ
Ï Î® δεν ÏληÏοί ÏÎ¹Ï ÏÏοÏÏοθÎÏÎµÎ¹Ï ÎºÎ¬ÏοιοÏ
αÏÏ ÏοÏ
Ï ÎÏοÏ
Ï, οι οÏοίοι θεÏÏοÏνÏαι Ïλοι οÏ
ÏιÏδειÏ,"}),s.jsx("p",{className:"mb-2",children:"(β) Ïε ÏεÏίÏÏÏÏη ÏοÏ
για οÏοιονδήÏοÏε λÏγο δεν καÏαÏÏεί δÏ
ναÏή η εÏικοινÏνία με Ïον νικηÏή ενÏÏÏ ÏÏν ÏÏοκαθοÏιÏμÎνÏν ÏÏοθεÏμιÏν ÏοÏ
ÏάÏÏονÏαι ÏÏοÏ
Ï ÏαÏÏνÏÎµÏ ÏÏοÏ
Ï Î® για λÏγοÏ
Ï ÏοÏ
ανάγονÏαι ÏÏο ÏÏÏÏÏÏÏ ÏοÏ
,"}),s.jsx("p",{className:"mb-2",children:"(γ) Ïε ÏεÏίÏÏÏÏη ÏοÏ
κάÏοιο αÏÏ Ïα ÏÏοιÏεία ÏοÏ
είναι ÏεÏ
δÎÏ,"}),s.jsx("p",{className:"mb-2",children:"(δ) εάν Ïο ÏÏÏÎ»Î¹Ï ÏοÏ
ÏεÏιλαμβάνει -καÏά Ïην κÏίÏη ÏÎ·Ï ÎιοÏγανÏÏÏιαÏ- ÏεÏιεÏ
729Ïμενο Ï
βÏιÏÏικÏ, ÏαÏÏιÏÏικÏ, και εν γÎνει ÏÏοÏβληÏÎ¹ÎºÏ ÏÎ·Ï ÏÏοÏÏÏικÏÏηÏÎ±Ï Î¿ÏοιοÏ
δήÏοÏε ÏÏ
ÏÎ¹ÎºÎ¿Ï ÏÏοÏÏÏοÏ
ή/και ÏÎ·Ï ÏÎ®Î¼Î·Ï Î¿ÏοιοÏ
δήÏοÏε Î½Î¿Î¼Î¹ÎºÎ¿Ï ÏÏοÏÏÏοÏ
,"}),s.jsx("p",{className:"mb-4",children:"(ε) εάν Ï
ÏίÏÏανÏαι Ï
ÏÏÎ½Î¿Î¹ÎµÏ ÏÎ·Ï ÎιοÏγανÏÏÏÎ¹Î±Ï ÏÏι ÏÏηÏιμοÏοίηÏε αθÎμιÏα μÎÏα για Ïην ανάδειξη ÏοÏ
ÎικηÏή."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"15. ÎÏίλÏ
Ïη ÎιαÏοÏÏν â ÎÏαÏμοÏÏÎο Îίκαιο"}),s.jsx("p",{className:"mb-4",children:"ÎÏοιαδήÏοÏε διαÏοÏά ÏÏ
ÏÏν ανακÏÏει ÏÏεÏικά με Ïον ÎιαγÏνιÏÎ¼Ï ÎºÎ±Î¹ Ïην εÏαÏμογή ÏÏν ÏαÏÏνÏÏν ÏÏÏν ÏÏ
μμεÏοÏÎ®Ï Î¸Î± εÏιλÏεÏαι καÏαÏÏήν με ÏÎ¹Î»Î¹ÎºÏ Î´Î¹Î±ÎºÎ±Î½Î¿Î½Î¹ÏμÏ."}),s.jsx("p",{className:"mb-4",children:"Σε οÏοιαδήÏοÏε ÏεÏίÏÏÏÏη δικαÏÏÎ¹ÎºÎ®Ï ÎµÏίλÏ
ÏÎ·Ï ÏÎ·Ï Î´Î¹Î±ÏοÏÎ¬Ï Î±ÏοκλειÏÏικά αÏμÏδια οÏίζονÏαι Ïα καθ' Ïλην αÏμÏδια ÎικαÏÏήÏια ÏÏν ÎθηνÏν (αÏοκλειÏÎ¼ÎµÎ½Î·Ï Î¿ÏοιαÏδήÏοÏε Î¬Î»Î»Î·Ï Î´Î¹ÎºÎ±Î¹Î¿Î´Î¿ÏίαÏ, ακÏμη και ÏÏ
νÏÏÎÏοÏ
ÏαÏ) και εÏαÏμοÏÏÎο δίκαιο Ïο ÎλληνικÏ. ÎÏοιαδήÏοÏε διάÏαξη ÏÏν ανÏÏÎÏÏ ÏÏÏν κÏιθεί ανÏίθεÏη ÏÏÎ¿Ï Ïο ÎÏμο, ÏαÏει αÏ
ÏοδικαίÏÏ Î½Î± ιÏÏÏει, ÏÏÏÎ¯Ï Ïε καμία ÏεÏίÏÏÏÏη να θίγεÏαι η ιÏÏÏÏ ÏÏν λοιÏÏν ÏÏÏν."})]}),s.jsxs("section",{className:"mb-8",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground mb-4",children:"16. ÎημοÏιÏÏηÏα"}),s.jsx("p",{className:"mb-4",children:"Îι ÏÏοι ÏÏ
μμεÏοÏÎ®Ï ÏοÏ
ÎιαγÏνιÏÎ¼Î¿Ï ÎÏοÏ
ν αναÏÏηθεί ÏÏο ÎικÏÏ
Î±ÎºÏ Î¤ÏÏο."})]})]})]})})}),s.jsx(Be,{})]})};var Jx="rovingFocusGroup.onEntryFocus",J7={bubbles:!1,cancelable:!0},eh="RovingFocusGroup",[mb,_T,Z7]=$m(eh),[eH,Md]=gs(eh,[Z7]),[tH,sH]=eH(eh),kT=h.forwardRef((e,t)=>s.jsx(mb.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(mb.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(rH,{...e,ref:t})})}));kT.displayName=eh;var rH=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...m}=e,f=h.useRef(null),p=Ye(t,f),v=Vl(i),[g,b]=xr({prop:o,defaultProp:l??null,onChange:c,caller:eh}),[y,x]=h.useState(!1),w=rs(d),j=_T(r),N=h.useRef(!1),[S,E]=h.useState(0);return h.useEffect(()=>{const _=f.current;if(_)return _.addEventListener(Jx,w),()=>_.removeEventListener(Jx,w)},[w]),s.jsx(tH,{scope:r,orientation:n,dir:v,loop:a,currentTabStopId:g,onItemFocus:h.useCallback(_=>b(_),[b]),onItemShiftTab:h.useCallback(()=>x(!0),[]),onFocusableItemAdd:h.useCallback(()=>E(_=>_+1),[]),onFocusableItemRemove:h.useCallback(()=>E(_=>_-1),[]),children:s.jsx(Ce.div,{tabIndex:y||S===0?-1:0,"data-orientation":n,...m,ref:p,style:{outline:"none",...e.style},onMouseDown:pe(e.onMouseDown,()=>{N.current=!0}),onFocus:pe(e.onFocus,_=>{const I=!N.current;if(_.target===_.currentTarget&&I&&!y){const R=new CustomEvent(Jx,J7);if(_.currentTarget.dispatchEvent(R),!R.defaultPrevented){const T=j().filter(O=>O.focusable),k=T.find(O=>O.active),C=T.find(O=>
vendor: 5,184 bytes, line 729
729O.id===g),L=[k,C,...T].filter(Boolean).map(O=>O.ref.current);ET(L,u)}}N.current=!1}),onBlur:pe(e.onBlur,()=>x(!1))})})}),ST="RovingFocusGroupItem",CT=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,children:o,...l}=e,c=Fr(),d=i||c,u=sH(ST,r),m=u.currentTabStopId===d,f=_T(r),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:g}=u;return h.useEffect(()=>{if(n)return p(),()=>v()},[n,p,v]),s.jsx(mb.ItemSlot,{scope:r,id:d,focusable:n,active:a,children:s.jsx(Ce.span,{tabIndex:m?0:-1,"data-orientation":u.orientation,...l,ref:t,onMouseDown:pe(e.onMouseDown,b=>{n?u.onItemFocus(d):b.preventDefault()}),onFocus:pe(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:pe(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=iH(b,u.orientation,u.dir);if(y!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=f().filter(j=>j.focusable).map(j=>j.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const j=w.indexOf(b.currentTarget);w=u.loop?oH(w,j+1):w.slice(j+1)}setTimeout(()=>ET(w))}}),children:typeof o=="function"?o({isCurrentTabStop:m,hasTabStop:g!=null}):o})})});CT.displayName=ST;var nH={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function aH(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function iH(e,t,r){const n=aH(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return nH[n]}function ET(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function oH(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Jw=kT,Zw=CT,_g="Tabs",[lH,fte]=gs(_g,[Md]),PT=Md(),[cH,ej]=lH(_g),TT=h.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:a,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:c="automatic",...d}=e,u=Vl(l),[m,f]=xr({prop:n,onChange:a,defaultProp:i??"",caller:_g});return s.jsx(cH,{scope:r,baseId:Fr(),value:m,onValueChange:f,orientation:o,dir:u,activationMode:c,children:s.jsx(Ce.div,{dir:u,"data-orientation":o,...d,ref:t})})});TT.displayName=_g;var AT="TabsList",IT=h.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...a}=e,i=ej(AT,r),o=PT(r);return s.jsx(Jw,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:s.jsx(Ce.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});IT.displayName=AT;var RT="TabsTrigger",MT=h.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:a=!1,...i}=e,o=ej(RT,r),l=PT(r),c=LT(o.baseId,n),d=FT(o.baseId,n),u=n===o.value;return s.jsx(Zw,{asChild:!0,...l,focusable:!a,active:u,children:s.jsx(Ce.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...i,ref:t,onMouseDown:pe(e.onMouseDown,m=>{!a&&m.button===0&&m.ctrlKey===!1?o.onValueChange(n):m.preventDefault()}),onKeyDown:pe(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&o.onValueChange(n)}),onFocus:pe(e.onFocus,()=>{const m=o.activationMode!=="manual";!u&&!a&&m&&o.onValueChange(n)})})})});MT.displayName=RT;var OT="TabsContent",DT=h.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:a,children:i,...o}=e,l=ej(OT,r),c=LT(l.baseId,n),d=FT(l.baseId,n),u=n===l.value,m=h.useRef(u);return h.useEffect(()=>{const f=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(f)},[]),s.jsx(Ns,{present:a||u,children:({present:f})=>s.jsx(Ce.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:d,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:f&&i})})});DT.displayName=OT;function LT(e,t){return`${e}-trigger-${t}`}function FT(e,t){return`${e}-content-${t}`}var dH=TT,$T=IT,UT=MT,BT=DT;const Si=dH,Ci=h.forwardRef(({className:e,...t},r)=>s.jsx($T,{ref:r,className:me("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Ci.displayName=$T.displayName;const Pt=h.forwardRef(({className:e,...t},r)=>s.jsx(UT,{ref:r,className:me("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}));Pt.displayName=UT.displayName;const it=h.forwardRef(({className:e,...t},r)=>s.jsx(BT,{ref:r,className:me("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));it.displayName=BT.displayName;const tj=oT,sj=zw,rj=Vw,fs=()=>s.jsx("header",{className:"sticky top-0 z-50 w-full bg-white border-b border-border h-14 flex items-center px-4",children:s.jsx("img",{src:"/lovable-uploads/463c9522-33
72913-4588-bd87-40273096d456.png",alt:"Well Be",className:"h-12 w-auto"})}),uH="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAWCAYAAACFbNPBAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABa9JREFUeNrsWy1z40gQla8EDAwEDAQCDAIMAgwCDA0XBgYGBu5PyM84aLgw8KDBAoMDBgsEAgQEBAQEBARclZ2uepPrne2WRrbls7PqKpWc0UxPz0y//pIyen9/Dwa6LhqNRjNzmwmPcnOl5kzrYZdOQ+GwBVcDirG5LXGNG7rWpu/O3DcuUEz7ytxW7gDT76WtjzYXAdJcW8MjFWR+EoBMAF4ra3wRmmkdG/Psq/kdac8Vfg/mtpAMiRnzt88C/xpU7yrAEZvbMxR33NLdAukZ4/okmmturicz1yNA3Be9Ku0rM2+keNlFR14DQK4UHE+K9Wwi6v94RlHnfc4HD5Uojx8826zHyQeAfJ6w6tHDa2jhz7czizwzMi969iK1Mu/cCRMjJbTa9JKDSG7M0N5MWDn9iOeUHWpl+hTs2UQZF6HvnrVNIGMFfpq8ltdEUhQeiyvr+FgLm1Pl0WVvWtb8sT6+bkZL5aBJli1ZVLKGmN+GFDM8X3exlB6UCh4qUmTe9eRFKL96VTzVF/MshZ6sjg2tDknSF4pyECoTduALl69pr3CYpDB3aP7OnhOgqP3NXBkbeocFU9/bhjBj1yJjwpRFs3Al+IjzGB6Z4fHWdW+wJlpHaP7eWqBBqRdQ5n8VvksFHL8ov/ltZd8ZvkskwvmJlXMteLdnYa96zXtI1wCEmQDYZSBX9zqHVodWsSocuCVSphiKUDNFIcAU4B9D6DkUocCYqfUs8Dh2czN2AHQVZF3N3y4YXLms98hx2fXRvHMzvmBWmvf5sPgK6EiGG7pIhgaQuDxv2XoSgGTO+N7avZK8B5JMKbT6p+mgzbPtOWIpWPNdh4rXqUOtZ2F/NFnSrqHVoQDZw1rZQ3wDKCLwCq3bZ0qXQtljeIoMijMFWDhAJtQXVta2Fc7BlIq15uEQlzEDQCfwEr/1URSAP6cw5h4gyZRwy503tyAgQ0AApTUh6R5DnqxBDs0SJk6s3aagaln1RFWsQ/KUlyPBWRoepPBfPHOx10PnOvY9CB8/gfC5Yl1JMSZQlg8AADQhlDdCuwXR3uUHyypVODSaCB4iEviULaDJ4AHGSqIYO7lIBABUTLGXAE0Y/PcOoQvll/ISsKGMehb5yFMiMZ+1dN20GcNTAmTMFCtk8WbeUoasBcDMAI4pU6B7KFoBxc49LWuqKKpNgksnQZYSzJR5GNF7dtiniAExpBAKYaINtYh+KIl50GEfzwkIX6ufnDnU+triPY8KOTsDxFHQGiEVxaN7mzsIVi5ylCwHHwuQCjwKgO5GCq9gOXxjSQuOTLDUaYvXkWjqYd1TVqy4gww3dn54z0AArC/FweXT9lwTsVBrderQ6lCA0MFqJbwCSnSLqpEFTMhAVbAEr2IHnrHnFiA1S+K7hiEpqxJFx26S4XUDuWpPd73HAR3zZrlWPHjMwk4C3sYzUT2LRfeoFNVKZBB4hEsSSDbIxX6rbB4TWp0qB+GC2no8KdK9+V2Cv03g3Y/obEzPgWPzk7HkPaCsUtz7pliXBHMsqOLCQppYeHdR8QoVm8d6Ihr7o8m6C6Fd0BK2NSbXSjslpmuWe6XO/vwfAClRXUs8Ddj6yDDubOFo2HETqhaQJCwBj9m4TPAGBZ6VTiyeYbxrZdpCkj341Q5oQyZP5qGwlfB3hTXUDXvjjtkrVarSYy1W9lLwgJS7PZjnr4KC9fktVKq05Z7AuEryBkhDaCVVlFKPfqRAO6E9C359WWjb3zymb+XXtg7PeQ7am659ET5J3xQtUCxJmEGImUfuI95fB38gDZ+7XzARmPBmPFYqZctLrnx9Bho+Vrx8WjcktT7g2AxbOADkM3uRGiDpGucTqE79weIQYg10sSD5xt5ezwL9K1/K/xIl1yk98kOfPl1A6tPWVAjwqQIeOq6VRsP/pF8vOZ/L5MP/ovewxwNABhpIp58CDAChjQWETVMlnAAAAABJRU5ErkJggg==";function zT({onGifSelect:e,onClose:t}){const[r,n]=h.useState([]),[a,i]=h.useState(!0),[o,l]=h.useState(""),[c,d]=h.useState(!1),{toast:u}=at();h.useEffect(()=>{m()},[]);const m=async()=>{try{i(!0);const g=await fetch("https://gcpjvgszviytdocnvyao.supabase.co/functions/v1/fetch-gifs?q=trending&limit=20",{method:"GET",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdjcGp2Z3N6dml5dGRvY252eWFvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTYwNDQzMjEsImV4cCI6MjA3MTYyMDMyMX0.wgwX9pwjvnc5p3J8GsYXFtE4lVO2iW2KPOmJvzk93cU","Content-Type":"application/json"}}),b=await g.json();if(!g.ok||b.error)throw new Error(b.error||"Failed to fetch GIFs");n(b.gifs||[])}catch(g){console.error("Error fetching trending GIFs:",g),u({variant:"destructive",title:"Error",description:"Failed to load GIFs"})}finally{i(!1)}},f=async g=>{if(!g.trim()){m();return}try{d(!0),console.log("Searching for:",g);const b=await fetch(`https://gcpjvgszviytdocnvyao.supabase.co/functions/v1/fetch-gifs?q=${encodeURIComponent(g)}&limit=20`,{method:"GET",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdjcGp2Z3N6dml5dGRvY252eWFvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTYwNDQzMjEsImV4cCI6MjA3MTYyMDMyMX0.wgwX9pwjvnc5p3J8GsYXFtE4lVO2iW2KPOmJvzk93cU","Content-Type":"application/json"}}),y=await b.json();if(console.log("Search response:",y),!b.ok||y.error)throw new Error(y.error||"Failed to fetch GIFs");n(y.gifs||[])}catch(b){console.error("Error searching GIFs:",b),u({variant:"destructive",title:"Error",description:"Failed to search GIFs"})}finally{d(!1)}},p=()=>{f(o)},v=g=>{g.key==="Enter"&&p()};return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:s.jsxs("div",{className:"bg-background rounded-lg w-full max-w-2xl max-h-[80vh] flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-lg font-semibold",children:"Choose a GIF"}),s.jsx(F,{variant:"ghost",size:"sm",onClick:t,children:"â"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ke,{placeholder:"Search for GIFs...",value:o,onChange:g=>l(g.target.value),onKeyPress:v}
729),s.jsx(F,{variant:"outline",size:"sm",onClick:p,disabled:c,children:c?s.jsx(mt,{className:"h-4 w-4 animate-spin"}):s.jsx(Hr,{className:"h-4 w-4"})})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:a?s.jsx("div",{className:"flex items-center justify-center h-32",children:s.jsx(mt,{className:"h-8 w-8 animate-spin"})}):r.length===0?s.jsx("div",{className:"text-center text-muted-foreground py-8",children:"No GIFs found. Try a different search term."}):s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:r.map(g=>s.jsxs("div",{className:"relative cursor-pointer rounded-lg overflow-hidden hover:opacity-80 transition-opacity",onClick:()=>{e(g.url),t()},children:[s.jsx("img",{src:g.previewUrl,alt:g.title,className:"w-full h-32 object-cover",loading:"lazy"}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/60 to-transparent p-2",children:s.jsx("p",{className:"text-white text-xs truncate",children:g.title})})]},g.id))})}),s.jsxs("div",{className:"p-4 border-t",children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Popular:"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:["happy","excited","celebration","thumbs up","dancing","love"].map(g=>s.jsx(F,{variant:"outline",size:"sm",onClick:()=>{l(g),f(g)},className:"text-xs",children:g},g))}),s.jsx("div",{className:"flex items-center justify-center mt-4 pt-3 border-t",children:s.jsx("img",{src:uH,alt:"Powered by Giphy",className:"h-4 opacity-70"})})]})]})})}function mH({onClose:e,onAvatarUpdate:t,userId:r}){const[n,a]=ie.useState(!1),[i,o]=ie.useState(!1),l=h.useRef(null),{toast:c}=at(),d=async m=>{var p;const f=(p=m.target.files)==null?void 0:p[0];if(f){if(!f.type.startsWith("image/")){c({variant:"destructive",title:"Îη ÎγκÏ
Ïο αÏÏείο",description:"ΠαÏÎ±ÎºÎ±Î»Ï ÎµÏιλÎξÏε μια εικÏνα"});return}
729if(f.size>5*1024*1024){c({variant:"destructive",title:"Îεγάλο αÏÏείο",description:"ΠεικÏνα δεν μÏοÏεί να είναι μεγαλÏÏεÏη αÏÏ 5MB"});return}try{o(!0);const v=f.name.split(".").pop(),g=`${r}/${Date.now()}.${v}`,{data:b,error:y}=await U.storage.from("avatars").upload(g,f,{upsert:!0});if(y)throw y;const{data:{publicUrl:x}}=U.storage.from("avatars").getPublicUrl(g),{error:w}=await U.from("profiles").update({avatar_url:x,avatar_type:"image"}).eq("user_id",r);if(w)throw w;t(x,"image"),e(),c({title:"ÎÏιÏÏ
ÏÎ®Ï ÎµÎ½Î·Î¼ÎÏÏÏη",description:"Î ÏÏÏογÏαÏία ÏÎ±Ï ÎµÎ½Î·Î¼ÎµÏÏθηκε εÏιÏÏ
ÏÏÏ!"})}catch(v){console.error("Error uploading avatar:",v),c({variant:"destructive",title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ανÎβαÏμα ÏÎ·Ï ÏÏÏογÏαÏίαÏ"})}finally{o(!1)}}},u=async m=>{try{const{error:f}=await U.from("profiles").update({avatar_url:m,avatar_type:"gif"}).eq("user_id",r);if(f)throw f;t(m,"gif"),e(),c({title:"ÎÏιÏÏ
ÏÎ®Ï ÎµÎ½Î·Î¼ÎÏÏÏη",description:"Το GIF ÏÎ±Ï ÎµÎ½Î·Î¼ÎµÏÏθηκε εÏιÏÏ
ÏÏÏ!"})}catch(f){console.error("Error updating avatar with GIF:",f),c({variant:"destructive",title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ενημÎÏÏÏη με Ïο GIF"})}};return n?s.jsx(zT,{onGifSelect:u,onClose:()=>a(!1)}):s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:s.jsx(oe,{className:"w-full max-w-md",children:s.jsx(ce,{className:"p-6",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-700",children:"ÎÏιλÎξÏε Avatar"}),s.jsx("p",{className:"text-sm text-slate-600 mt-1",children:"ÎνεβάÏÏε μια ÏÏÏογÏαÏία ή εÏιλÎξÏε Îνα GIF"})]}),s.jsxs("div",{className:"grid gap-3",children:[s.jsx("input",{ref:l,type:"file",accept:"image/*",onChange:d,className:"hidden"}),s.jsxs(F,{onClick:()=>{var m;return(m=l.current)==null?void 0:m.click()},disabled:i,className:"h-16 flex-col space-y-2 bg-gradient-to-br from-slate-300 to-blue-300 hover:from-slate-400 hover:to-blue-400 text-slate-700 border-0",children:[i?s.jsx(mt,{className:"h-6 w-6 animate-spin"}):s.jsx(Kf,{className:"h-6 w-6"}),s.jsx("span",{className:"font-medium",children:i?"ÎνÎβαÏμα...":"ð· ÎνÎβαÏμα ΦÏÏογÏαÏίαÏ"})]}),s.jsxs(F,{onClick:()=>a(!0),className:"h-16 flex-col space-y-2 bg-gradient-to-br from-blue-300 to-indigo-300 hover:from-blue-400 hover:to-indigo-400 text-slate-700 border-0",children:[s.jsx($0,{className:"h-6 w-6"}),s.jsx("span",{className:"font-medium",children:"ð ÎÏιλογή GIF"})]})]}),s.jsx(F,{variant:"outline",onClick:e,className:"w-full mt-4",children:"ÎκÏ
Ïο"})]})})})})}const hH=e=>{const t=[];for(let r=0;r<sessionStorage.length;r++){const n=sessionStorage.key(r);n&&n.startsWith("tracked_")&&n.endsWith(`_${e}`)&&t.push(n)}t.forEach(r=>sessionStorage.removeItem(r)),console.log("ð§¹ Cleared session tracking for user:",e,"Keys:",t.length)},th=()=>{const{user:e}=jt();return{trackVideoActivity:h.useCallback(async r=>{if(!e){console.log("â No user found, skipping activity tracking");return}const{vimeoId:n,pageType:a,title:i}=r;console.log("ð¬ Tracking video activity:",{vimeoId:n,pageType:a,title:i});try{const o=`tracked_${n}_${e.id}`;if(sessionStorage.getItem(o)){console.log("â ï¸ Video already tracked in this session, skipping");return}const{data:l}=await U.from("user_activities").select("id").eq("user_id",e.id).eq("video_id",n).maybeSingle();if(l){console.log("â ï¸ Video already tracked in database, skipping"),sessionStorage.setItem(o,"true");return}let c="workout_video";a==="podcast"?c="podcast_video":a==="recipes"&&(c="recipe_video"),console.log("ð Inserting activity with type:",c);const{error:d}=await U.from("user_activities").insert([{user_id:e.id,video_id:n,activity_type:c}]);if(d){console.error("â Error inserting activity:",d),Dt.error("Failed to track video activity");return}sessionStorage.setItem(o,"true"),console.log("â
Video activity tracked successfully:",c,"Video ID:",n);const u=c==="podcast_video"?"podcast":c==="recipe_video"?"recipe":"workout";Dt.success(`${i||"Video"} added to your ${u} history!`),console.log("ð Dispatching manual refresh event for video:",n),console.log("ð Activity tracked summary:",{userId:e.id,videoId:n,activityType:c,sessionKey:o,pageType:a,title:i}),window.dispatchEvent(new CustomEvent("videoActivityTracked",{detail:{videoId:n}}))}catch(o){console.error("â Error in trackVideoActivity:",o),Dt.error("Failed to track video activity")}},[e]),clearUserSessionTracking:hH}},Od=({className:e,...t})=>s.jsx("nav",{role:"navigation","aria-label":"pagination",className:me("mx-auto flex w-full justify-center",e),...t});Od.displayName="Pagination";const Dd=h.forwardRef(({className:e,...t},r)=>s.jsx("ul",{ref:r,className:me("flex flex-row items-center gap-1",e),...t}));Dd.displayName="PaginationContent";const Ds=h.forwardRef(({className:e,...t},r)=>s.jsx("li",{ref:r,className:me("",e),...t}));Ds.displayName="PaginationItem";const Ld=({className:e,isActive:t,size:r="icon",...n})=>s.jsx("a",{"aria-current":t?"page":void 0,className:me(md({variant:t?"outline":"ghost",size:r}),e),...n});Ld.displayName="PaginationLink";const Fd=({className:e,...t})=>s.jsxs(Ld,{"aria-label":"Go to previous page",size:"default",className:me("gap-1 pl-2.5",e),...t,children:[s.jsx(ea,{className:"h-4 w-4"}),s.jsx("span",{children:"Previous"})]});Fd.displayName="PaginationPrevious";const $d=({className:e,...t})=>s.jsxs(Ld,{"aria-label":"Go to next page",size:"default",className:me("gap-1 pr-2.5",e),...t,children:[s.jsx("span",{children:"Next"}),s.jsx(Da,{className:"h-4 w-4"})]});$d.displayName="PaginationNext";const fH=({className:e,...t})=>
729s.jsxs("span",{"aria-hidden":!0,className:me("flex h-9 w-9 items-center justify-center",e),...t,children:[s.jsx(cE,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"More pages"})]});fH.displayName="PaginationEllipsis";var WT="AlertDialog",[pH,pte]=gs(WT,[AP]),Ei=AP(),VT=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ei(t);return s.jsx(Ow,{...n,...r,modal:!0})};VT.displayName=WT;var gH="AlertDialogTrigger",HT=h.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=Ei(r);return s.jsx(Dw,{...a,...n,ref:t})});HT.displayName=gH;var xH="AlertDialogPortal",qT=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ei(t);return s.jsx(Lw,{...n,...r})};qT.displayName=xH;var vH="AlertDialogOverlay",GT=h.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=Ei(r);return s.jsx(Qm,{...a,...n,ref:t})});GT.displayName=vH;var Lc="AlertDialogContent",[yH,bH]=pH(Lc),wH=IC("AlertDialogContent"),YT=h.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...a}=e,i=Ei(r),o=h.useRef(null),l=Ye(t,o),c=h.useRef(null);return s.jsx($W,{contentName:Lc,titleName:KT,docsSlug:"alert-dialog",children:s.jsx(yH,{scope:r,cancelRef:c,children:s.jsxs(Xm,{role:"alertdialog",...i,...a,ref:l,onOpenAutoFocus:pe(a.onOpenAutoFocus,d=>{var u;d.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[s.jsx(wH,{children:n}),s.jsx(NH,{contentRef:o})]})})})});YT.displayName=Lc;var KT="AlertDialogTitle",QT=h.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=Ei(r);return s.jsx(Jm,{...a,...n,ref:t})});QT.displayName=KT;var XT="AlertDialogDescription",JT=h.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=Ei(r);return s.jsx(Zm,{...a,...n,ref:t})});JT.displayName=XT;var jH="AlertDialogAction",ZT=h.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=Ei(r);return s.jsx(bg,{...a,...n,ref:t})});ZT.displayName=jH;var eA="AlertDialogCancel",tA=h.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:a}=bH(eA,r),i=Ei(r),o=Ye(t,a);return s.jsx(bg,{...i,...n,ref:o})});tA.displayName=eA;var NH=({contentRef:e})=>{const t=`\`${Lc}\` requires a description for the component to be accessible for screen reader users. 730 731You can add a description to the \`${Lc}\` by passing a \`${XT}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 732 733Alternatively, 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 \`${Lc}\`. 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. 734 735For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return h.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},_H=VT,kH=HT,SH=qT,sA=GT,rA=YT,nA=ZT,aA=tA,iA=QT,oA=JT;const si=_H,ri=kH,CH=SH,lA=h.forwardRef(({className:e,...t},r)=>s.jsx(sA,{className:me("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));lA.displayName=sA.displayName;const ya=h.forwardRef(({className:e,...t},r)=>s.jsxs(CH,{children:[s.jsx(lA,{}),s.jsx(rA,{ref:r,className:me("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})]}));ya.displayName=rA.displayName;const ba=({className:e,...t})=>s.jsx("div",{className:me("flex flex-col space-y-2 text-center sm:text-left",e),...t});ba.displayName="AlertDialogHeader";const wa=({className:e,...t})=>s.jsx("div",{className:me("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});wa.displayName="AlertDialogFooter";const ja=h.forwardRef(({className:e,...t},r)=>s.jsx(iA,{ref:r,className:me("text-lg font-semibold",e),...t}));ja.displayName=iA.displayName;const Na=h.forwardRef(({className:e,...t},r)=>s.jsx(oA,{ref:r,className:me("text-sm text-muted-foreground",e),...t}));
735Na.displayName=oA.displayName;const _a=h.forwardRef(({className:e,...t},r)=>s.jsx(nA,{ref:r,className:me(md(),e),...t}));_a.displayName=nA.displayName;const ka=h.forwardRef(({className:e,...t},r)=>s.jsx(aA,{ref:r,className:me(md({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));ka.displayName=aA.displayName;const cA=({userId:e})=>{const[t,r]=h.useState([]),[n,a]=h.useState(!0),[i,o]=h.useState(!1),[l,c]=h.useState(1),d=10,{toast:u}=at(),m=qe(),{clearUserSessionTracking:f}=th(),p=Wl();h.useEffect(()=>{e&&v()},[e]);const v=async()=>{if(e)try{a(!0);const{data:x,error:w}=await U.from("user_activities").select("*").eq("user_id",e).order("created_at",{ascending:!1});if(w)throw w;if(x&&x.length>0){const j=x.map(_=>_.video_id),{data:N,error:S}=await U.from("videos").select("vimeo_id, title, thumbnail_url, duration_seconds, instructor, description, category").in("vimeo_id",j);if(S)throw S;const E=x.map(_=>{const I=N==null?void 0:N.find(R=>R.vimeo_id===_.video_id);return{..._,video_data:I?{title:I.title,thumbnail:I.thumbnail_url,duration:I.duration_seconds?`${Math.floor(I.duration_seconds/60)}:${(I.duration_seconds%60).toString().padStart(2,"0")}`:null,instructor:I.instructor,description:I.description,categories:I.category?[I.category]:[]}:null}});r(E.filter(_=>_.video_data!==null))}else r([])}catch(x){console.error("Error fetching video history:",x),u({title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ÏÏÏÏÏÏη ÏοÏ
ιÏÏοÏικοÏ",variant:"destructive"})}finally{a(!1)}},g=async()=>{if(e)try{o(!0);const{error:x}=await U.from("user_activities").delete().eq("user_id",e);if(x)throw x;f(e),r([]),u({title:"ÎÏιÏÏ
Ïία",description:"Το ιÏÏοÏÎ¹ÎºÏ ÏÏοβολÏν διαγÏάÏηκε εÏιÏÏ
ÏÏÏ"})}catch(x){console.error("Error clearing history:",x),u({title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η διαγÏαÏή ÏοÏ
ιÏÏοÏικοÏ",variant:"destructive"})}finally{o(!1)}},b=x=>{var j;const w=((j=x.video_data)==null?void 0:j.categories)||[];if(w.length>0){const N=w[0].toLowerCase();if(N.includes("recipe"))return{label:"ΣÏ
νÏαγή",color:"bg-green-100 text-green-800",icon:"ð½ï¸"};if(N.includes("podcast"))return{label:"Podcast",color:"bg-purple-100 text-purple-800",icon:"ð§"};if(N.includes("workout")||N.includes("fitness"))return{label:"Workouts",color:"text-amber-900",style:{backgroundColor:"#ebe8e0"},icon:"ðª"}}switch(x.activity_type){case"workout_video":return{label:"Workouts",color:"text-amber-900",style:{backgroundColor:"#ebe8e0"},icon:"ðª"};case"podcast_video":return{label:"Podcast",color:"bg-purple-100 text-purple-800",icon:"ð§"};case"recipe_video":return{label:"ΣÏ
νÏαγή",color:"bg-green-100 text-green-800",icon:"ð½ï¸"};default:return{label:"ÎίνÏεο",color:"bg-gray-100 text-gray-800",icon:"ð¥"}}},y=(x,w)=>{w==="workout_video"?m(`/video/${x}`):w==="podcast_video"?m(`/video/${x}`):w==="recipe_video"&&m(`/video/${x}`)};return n?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):t.length===0?s.jsxs("div",{className:"text-center py-12 space-y-4",children:[s.jsx(No,{className:"w-16 h-16 mx-auto text-muted-foreground"}),s.jsx("h3",{className:"text-lg font-semibold text-muted-foreground",children:"Îεν Ï
ÏάÏÏει ιÏÏοÏικÏ"}),s.jsx("p",{className:"text-muted-foreground",children:"Îεν ÎÏεÏε ÏαÏακολοÏ
θήÏει κάÏοιο βίνÏεο ακÏμα. ÎεκινήÏÏε να εξεÏεÏ
νείÏε Ïο ÏεÏιεÏÏÎ¼ÎµÎ½Ï Î¼Î±Ï!"}),s.jsx(F,{onClick:()=>m("/catalog"),className:"mt-4",children:"ÎξεÏεÏ
νήÏÏε ÎίνÏεο"})]}):s.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[s.jsxs("div",{className:`${p?"flex-col space-y-3":"flex items-center justify-between"}`,children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(No,{className:"w-5 h-5 text-primary"}),s.jsxs("span",{className:`${p?"text-base":"text-lg"} font-semibold`,children:[t.length," βίνÏεο ÏÏο ιÏÏοÏικÏ"]})]}),s.jsxs(si,{children:[s.jsx(ri,{asChild:!0,children:s.jsxs(F,{variant:"outline",size:p?"default":"sm",className:`text-red-600 hover:text-red-700 ${p?"w-full min-h-[44px]":""}`,children:[s.jsx(jn,{className:"w-4 h-4 mr-2"}),"ÎιαγÏαÏή ÎÏÏοÏικοÏ"]})}),s.jsxs(ya,{children:[s.jsxs(ba,{children:[s.jsx(ja,{children:"ÎιαγÏαÏή ÎÏÏοÏικοÏ"}),s.jsx(Na,{children:"ÎίÏÏε ÏίγοÏ
Ïοι ÏÏι θÎλεÏε να διαγÏάÏεÏε Ïλο Ïο ιÏÏοÏÎ¹ÎºÏ ÏÏοβολÏν; ÎÏ
Ïή η ενÎÏγεια δεν μÏοÏεί να αναιÏεθεί."})]}),s.jsxs(wa,{children:[s.jsx(ka,{children:"ÎκÏÏÏÏη"}),s.jsx(_a,{onClick:g,disabled:i,className:"bg-red-600 hover:bg-red-700",children:i?"ÎιαγÏαÏή...":"ÎιαγÏαÏή"})]})]})]})]}
735),s.jsx("div",{className:`${p?"space-y-3":"space-y-2"}`,children:t.slice((l-1)*d,l*d).map(x=>{var N,S,E,_,I,R,T,k;const w=b(x),j=x.activity_type==="recipe_video";return s.jsx(oe,{className:"group hover:shadow-md transition-all duration-300 overflow-hidden",children:s.jsx("div",{className:`${p?"flex-col space-y-3 p-3":"flex items-center p-4 space-x-4"}`,children:p?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsxs("div",{className:"relative flex-shrink-0 w-20 h-14 sm:w-24 sm:h-16 rounded overflow-hidden",children:[s.jsx("img",{src:(N=x.video_data)==null?void 0:N.thumbnail,alt:(S=x.video_data)==null?void 0:S.title,className:`w-full h-full rounded object-cover ${j?"scale-[2.8] object-center":""}`}),s.jsx("div",{className:"absolute inset-0 overlay-beige-orange-medium"}),s.jsxs("div",{className:"absolute bottom-0.5 right-0.5 bg-black/70 text-white px-1 py-0.5 rounded text-xs flex items-center z-10",children:[s.jsx(Ms,{className:"w-2 h-2 mr-0.5"}),(E=x.video_data)==null?void 0:E.duration]})]}),s.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[s.jsx("h3",{className:"font-semibold text-sm line-clamp-2",children:(_=x.video_data)==null?void 0:_.title}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["ΠαÏακολοÏ
θήθηκε ÏÏÎ¹Ï ",new Date(x.created_at).toLocaleDateString("el-GR",{day:"numeric",month:"short",year:"numeric"})]})]})]}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs(ye,{className:`${w.color} text-xs`,style:w.style,children:[w.icon," ",w.label]}),s.jsxs(F,{size:"sm",onClick:()=>y(x.video_id,x.activity_type),className:"min-h-[40px] px-4",children:[s.jsx(Os,{className:"w-4 h-4 mr-1"}),"ÎείÏε Îανά"]})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative flex-shrink-0 w-24 h-16 rounded overflow-hidden",children:[s.jsx("img",{src:(I=x.video_data)==null?void 0:I.thumbnail,alt:(R=x.video_data)==null?void 0:R.title,className:`w-24 h-16 rounded object-cover ${j?"scale-[2.8] object-center":""}`}),s.jsx("div",{className:"absolute inset-0 overlay-beige-orange-medium"}),s.jsxs("div",{className:"absolute bottom-1 right-1 bg-black/70 text-white px-1 py-0.5 rounded text-xs flex items-center z-10",children:[s.jsx(Ms,{className:"w-2 h-2 mr-0.5"}),(T=x.video_data)==null?void 0:T.duration]})]}),s.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[s.jsx("h3",{className:"font-semibold text-sm line-clamp-2 pr-2",children:(k=x.video_data)==null?void 0:k.title}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["ΠαÏακολοÏ
θήθηκε ÏÏÎ¹Ï ",new Date(x.created_at).toLocaleDateString("el-GR",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),s.jsxs("div",{className:"flex items-center space-x-2 flex-shrink-0",children:[s.jsxs(ye,{className:`${w.color}`,style:w.style,children:[w.icon," ",w.label]}),s.jsxs(F,{size:"sm",onClick:()=>y(x.video_id,x.activity_type),className:"opacity-70 group-hover:opacity-100 transition-opacity",children:[s.jsx(Os,{className:"w-4 h-4 mr-1"}),"ÎείÏε Îανά"]})]})]})})},x.id)})}),t.length>d&&s.jsx("div",{className:"flex justify-center mt-6",children:s.jsx(Od,{children:s.jsxs(Dd,{children:[s.jsx(Ds,{children:s.jsx(Fd,{onClick:()=>c(x=>Math.max(x-1,1)),className:l===1?"pointer-events-none opacity-50":"cursor-pointer"})}),s.jsx(Ds,{children:s.jsxs("span",{className:"px-4 py-2 text-sm",children:["Σελίδα ",l," αÏÏ ",Math.ceil(t.length/d)]})}),s.jsx(Ds,{children:s.jsx($d,{onClick:()=>c(x=>Math.min(x+1,Math.ceil(t.length/d))),className:l===Math.ceil(t.length/d)?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]})},EH=()=>{const e=Ea();return[{id:"1_month",name:"Îηνιαία ΣÏ
νδÏομή",price:9.9,currency:"eur",interval:"month",description:"ΠλήÏÎ·Ï ÏÏÏÏβαÏη για 1 μήνα",features:["ÎÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Ïλα Ïα Workouts, ÎιαλογιÏμοÏÏ ÎºÎ±Î¹ Breathworks","Î Ïοβολή ÏλÏν ÏÏν podcast ÏÏÏÎ¯Ï Î´Î¹Î±ÏημίÏειÏ","ÎÏοκλειÏÏική ÏÏÏÏβαÏη ÏÏο Well Be community","ÎκÏÏÏÏη ανά ÏάÏα ÏÏιγμή"]},{id:"6_months",name:"Îξάμηνη ΣÏ
νδÏομή",price:49,currency:"eur",interval:"6 months",description:"ΠλήÏÎ·Ï ÏÏÏÏβαÏη για 6 μήνεÏ",features:["ÎÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Ïλα Ïα Workouts, ÎιαλογιÏμοÏÏ ÎºÎ±Î¹ Breathworks","Î Ïοβολή ÏλÏν ÏÏν podcast ÏÏÏÎ¯Ï Î´Î¹Î±Ï
735ημίÏειÏ","ÎÏοκλειÏÏική ÏÏÏÏβαÏη ÏÏο Well Be community","ÎξοικονÏμηÏη â¬10.40","ÎκÏÏÏÏη ανά ÏάÏα ÏÏιγμή"]},{id:"12_months",name:"ÎÏήÏια ΣÏ
νδÏομή",price:e?nn.FINAL_PRICE/100:99,currency:"eur",interval:"year",description:"ΠλήÏÎ·Ï ÏÏÏÏβαÏη για 12 μήνεÏ",features:["ÎÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Ïλα Ïα Workouts, ÎιαλογιÏμοÏÏ ÎºÎ±Î¹ Breathworks","Î Ïοβολή ÏλÏν ÏÏν podcast ÏÏÏÎ¯Ï Î´Î¹Î±ÏημίÏειÏ","ÎÏοκλειÏÏική ÏÏÏÏβαÏη ÏÏο Well Be community",e?"ÎξοικονÏμηÏη â¬59.80":"ÎξοικονÏμηÏη â¬19.80","ÎÎγιÏÏη εξοικονÏμηÏη ÏÏημάÏÏν","ÎκÏÏÏÏη ανά ÏάÏα ÏÏιγμή"]}]},PH=({currentPlan:e,onSuccess:t,onCancel:r})=>{const[n,a]=h.useState(!1),[i,o]=h.useState(null),{session:l}=jt(),{toast:c}=at(),d=Ea(),m=EH().filter(v=>v.id!==e).map(v=>({...v,isCurrentPlan:!1,isUpgrade:f(v.id,e)}));function f(v,g){const b={"1_month":1,"6_months":6,"12_months":12};return(b[v]||0)>(b[g]||0)}const p=async()=>{if(i)try{a(!0);const v=d&&i==="12_months"?nn.PROMO_CODE:void 0,{data:g,error:b}=await U.functions.invoke("create-checkout",{headers:{Authorization:`Bearer ${l==null?void 0:l.access_token}`},body:{plan:i,isUpgrade:!0,discountCode:v}});if(b)throw b;if(g!=null&&g.url){window.location.href=g.url;return}throw new Error("No checkout URL returned")}catch(v){console.error("Error changing plan:",v),c({title:"ΣÏάλμα",description:v.message||"Î¥ÏήÏξε ÏÏÏβλημα με Ïην αλλαγή ÏοÏ
ÏλάνοÏ
",variant:"destructive"})}finally{a(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Îλλαγή ΠλάνοÏ
ΣÏ
νδÏομήÏ"}),s.jsx("p",{className:"text-muted-foreground mb-2",children:"ÎÏιλÎξÏε Îνα νÎο Ïλάνο για Ïη ÏÏ
νδÏομή ÏαÏ"}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-3 text-sm text-blue-700 dark:text-blue-300",children:[s.jsx("strong",{children:"ΣημείÏÏη:"})," Î ÏÏÎÏÏη για Ïο νÎο Ïλάνο θα ξεκινήÏει μεÏά Ïη λήξη ÏÎ·Ï ÏÏÎÏοÏ
ÏÎ±Ï ÏεÏιÏδοÏ
ÏÏÎÏÏηÏ."]})]}),s.jsx("div",{className:"grid md:grid-cols-3 gap-4",children:m.map(v=>s.jsxs(oe,{className:`cursor-pointer transition-all relative ${i===v.id?"ring-2 ring-primary":""}`,onClick:()=>o(v.id),children:[d&&v.id==="12_months"&&s.jsx(ye,{className:"absolute -top-3 left-1/2 transform -translate-x-1/2 z-10 bg-gradient-to-r from-pink-500 to-purple-600 text-white font-bold px-4 py-1",children:"BLACK FRIDAY"}),s.jsxs(xe,{children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(be,{className:"text-lg",children:v.name}),v.isUpgrade&&s.jsxs(ye,{variant:"default",className:"flex items-center gap-1",children:[s.jsx(Bm,{className:"w-3 h-3"}),"ÎναβάθμιÏη"]})]}),s.jsx(gt,{children:v.description})]}),s.jsxs(ce,{children:[d&&v.id==="12_months"?s.jsxs("div",{className:"text-center mb-4",children:[s.jsxs("div",{className:"text-lg line-through text-muted-foreground",children:["â¬",nn.ORIGINAL_PRICE/100]}),s.jsxs("div",{className:"text-3xl font-bold text-pink-600 dark:text-pink-400",children:["â¬",nn.FINAL_PRICE/100]}),s.jsxs("div",{className:"text-sm font-semibold text-green-600 dark:text-green-400",children:["ÎξοικονÏμηÏη â¬",nn.DISCOUNT_AMOUNT/100]}),s.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:"ÎÏνο για Ïην ÏÏÏÏη ÏÏÎÏÏη"})]}):s.jsx("div",{className:"text-center mb-4",children:s.jsxs("div",{className:"text-3xl font-bold",children:["â¬",v.price,s.jsxs("span",{className:"text-lg font-normal text-muted-foreground",children:["/",v.interval==="month"?"μήνα":v.interval==="6 months"?"6μηνο":"ÎÏοÏ"]})]})}),s.jsx("ul",{className:"space-y-2",children:v.features.map((g,b)=>s.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Ar,{className:"w-4 h-4 text-green-500 flex-shrink-0"}),g]},b))})]})]},v.id))}),s.jsxs("div",{className:"flex gap-2 justify-center",children:[s.jsx(F,{variant:"outline",onClick:r,children:"ΠίÏÏ"}),i&&s.jsx(F,{onClick:p,disabled:n,children:n?s.jsxs(s.Fragment,{children:[s.jsx(mt,{className:"w-4 h-4 mr-2 animate-spin"}),"ÎνημÎÏÏÏη..."]}):"ÎÏιβεβαίÏÏη ÎλλαγήÏ"})]})]})},dA=({userId:e,memberSince:t})=>{var W,X,q,H,se,te;const[r,n]=h.useState([]),[a,i]=h.useState(null),[o,l]=h.useState(!0),[c,d]=h.useState(!1),[u,m]=h.useState(!1),[f,p]=h.useState(null),[v,g]=h.useState(!1),{user:b,session:y}=jt(),{isAdminFreeAccess:x,checkSubscription:w,freeAccessEndDate:j}=_i(),{toast:N}=at(),S=async B=>{if(B.pdf_url&&!B.pdf_url.includes("api.elorus.com")){window.open(B.pdf_url,"_blank");return}if(!(y!=null&&y.access_token)){N({title:"ΣÏάλμα",description:"Î ÏÎÏει να είÏÏε ÏÏ
νδεδεμÎνοι",variant:"destructive"});return}p(B.id);try{const J=await fetch(`https://gcpjvgszviytdocnvyao.supabase.co/functions/v1/download-elorus-invoice?invoice_id=${B.id}`,{headers:{Authorization:`Bearer ${y.access_token}`}});if(!J.ok){const re=await J.json().catch(()=>({error:"Download failed"}));throw new Error(re.error||"Download failed")}const K=await J.blob(),Z=URL.createObjectURL(K);window.open(Z,"_blank"),setTimeout(()=>URL.revokeObjectURL(Z),6e4)}catch(le){N({title:"ΣÏάλμα λήÏηÏ",description:le instanceof Error?le.message:"ÎÏοÏÏ
Ïία λήÏÎ·Ï PDF",variant:"destructive"})}finally{p(null)}};h.useEffect(()=>{b&&y?(E(),_()):l(!1)},[b,y]),h.useEffect(()=>{v&&window.scrollTo(0,0)},[v]);const E=async()=>
735{if(x){i({hasSubscription:!1,customer:null,subscription:null,paymentMethod:null,latestInvoice:null}),l(!1);return}try{l(!0);const{data:B,error:le}=await U.functions.invoke("get-subscription-details",{headers:{Authorization:`Bearer ${y==null?void 0:y.access_token}`}});if(le){console.error("Error fetching subscription details:",le),N({title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ÏÏÏÏÏÏη ÏÏν ÏÏοιÏείÏν ÏÏ
νδÏομήÏ",variant:"destructive"});return}i(B)}catch(B){console.error("Error fetching subscription details:",B),N({title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ÏÏÏÏÏÏη ÏÏν ÏÏοιÏείÏν ÏÏ
νδÏομήÏ",variant:"destructive"})}finally{l(!1)}},_=async()=>{try{d(!0);const{data:B,error:le}=await U.functions.invoke("fetch-elorus-invoices",{headers:{Authorization:`Bearer ${y==null?void 0:y.access_token}`}});if(le){console.error("Error fetching invoices:",le),N({title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ÏÏÏÏÏÏη ÏοÏ
ιÏÏοÏÎ¹ÎºÎ¿Ï Î±ÏοδείξεÏν",variant:"destructive"});return}n(B.invoices||[])}catch(B){console.error("Error fetching invoices:",B),N({title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ÏÏÏÏÏÏη ÏοÏ
ιÏÏοÏÎ¹ÎºÎ¿Ï Î±ÏοδείξεÏν",variant:"destructive"})}finally{d(!1)}},I=()=>t?new Date(t).toLocaleDateString("el-GR",{year:"numeric",month:"long",day:"numeric"}):"Îεν είναι διαθÎÏιμο",R=B=>{switch(B){case"paid":return"bg-wellbe-light text-wellbe-dark";case"pending":return"bg-wellbe-beige text-wellbe-dark-beige";case"failed":return"bg-red-50 text-red-700";default:return"bg-wellbe-beige text-wellbe-dark-beige"}},T=B=>{switch(B){case"paid":return"ΠληÏÏμÎνο";case"pending":case"open":return"ÎκκÏεμεί";case"failed":return"ÎÏοÏÏ
ÏημÎνο";case"draft":return"Î ÏοÏÏÎδιο";default:return B}},k=async()=>{if(y){m(!0);try{const{data:B,error:le}=await U.functions.invoke("cancel-subscription",{headers:{Authorization:`Bearer ${y.access_token}`}});if(le){N({title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ακÏÏÏÏη ÏÎ·Ï ÏÏ
νδÏομήÏ",variant:"destructive"});return}N({title:"ÎÏιÏÏ
Ïία",description:"Î ÏÏ
νδÏομή ÏÎ±Ï Î¸Î± ακÏ
ÏÏθεί ÏÏο ÏÎÎ»Î¿Ï ÏÎ·Ï ÏÏÎÏοÏ
ÏÎ±Ï ÏεÏιÏδοÏ
"}),await E()}catch(B){console.error("Error cancelling subscription:",B),N({title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ακÏÏÏÏη ÏÎ·Ï ÏÏ
νδÏομήÏ",variant:"destructive"})}finally{m(!1)}}},C=async()=>{try{l(!0);const{data:B,error:le}=await U.functions.invoke("customer-portal",{headers:{Authorization:`Bearer ${y==null?void 0:y.access_token}`}});if(le)throw le;window.open(B.url,"_blank"),N({title:"ÎνακαÏεÏθÏ
νÏη",description:"Îνοίγει νÎα καÏÏÎλα για Ïη διαÏείÏιÏη ÏÏν μεθÏδÏν ÏληÏÏÎ¼Î®Ï ÏαÏ"})}catch(B){console.error("Error opening customer portal:",B);const le=(B==null?void 0:B.message)||(B==null?void 0:B.details)||"Îεν ήÏαν δÏ
ναÏή η ÏÏÏÏβαÏη ÏÏη Ïελίδα διαÏείÏιÏÎ·Ï ÏληÏÏμÏν";N({title:"ΣÏάλμα ÎιαÏείÏιÏÎ·Ï Î Î»Î·ÏÏμÏν",description:le,variant:"destructive",action:(B==null?void 0:B.code)==="CUSTOMER_PORTAL_ERROR"?s.jsx("div",{className:"flex space-x-2",children:s.jsx(F,{variant:"outline",size:"sm",onClick:C,children:"Îοκιμή Îανά"})}):void 0})}finally{l(!1)}},A=async()=>{g(!1),await E(),await w(),N({title:"ÎÏιÏÏ
Ïία",description:"Το Ïλάνο ÏÏ
νδÏÎ¿Î¼Î®Ï ÎµÎ½Î·Î¼ÎµÏÏθηκε εÏιÏÏ
ÏÏÏ"})},L=(B,le)=>new Intl.NumberFormat("el-GR",{style:"currency",currency:le.toUpperCase()}).format(B/100),O=B=>new Date(B).toLocaleDateString("el-GR",{year:"numeric",month:"long",day:"numeric"}),P=B=>{switch(B){case"1_month":return"Îηνιαία ΣÏ
νδÏομή";case"6_months":return"Îξάμηνη ΣÏ
νδÏομή";case"12_months":return"ÎÏήÏια ΣÏ
νδÏομή";default:return"ΣÏ
νδÏομή Premium"}},M=a==null?void 0:a.paymentMethod,D=()=>M?M.brand&&M.last4?`${M.brand.charAt(0).toUpperCase()+M.brand.slice(1)} â¢â¢â¢â¢ ${M.last4}`:M.label||"ÎνεÏγÏÏ ÏÏÏÏÎ¿Ï ÏληÏÏμήÏ":"Îεν διαθÎÏιμο",$=()=>M?M.exp_month&&M.exp_year?`Îήγει ${String(M.exp_month).padStart(2,"0")}/${M.exp_year}`:"ÎνεÏγÏÏ ÏÏÏÏÎ¿Ï ÏληÏÏμήÏ":"ÎιαÏειÏιÏÏείÏε Ïον ÏÏÏÏο ÏληÏÏÎ¼Î®Ï ÏαÏ";return h.useEffect(()=>{v&&window.scrollTo({top:0,behavior:"smooth"})},[v]),v?s.jsxs("div",{className:"max-w-6xl mx-auto p-4 md:p-6",children:[s.jsx("div",{className:"mb-4",children:s.jsxs(F,{variant:"outline",onClick:()=>g(!1),className:"flex items-center space-x-2",children:[s.jsx("span",{children:"â"}),s.jsx("span",{children:"ÎÏιÏÏÏοÏή ÏÏη ÎιαÏείÏιÏη"})]})}),s.jsx(PH,{currentPlan:((W=a==null?void 0:a.subscription)==null?void 0:W.tier)||"",onSuccess:A,onCancel:()=>g(!1)})]}):s.jsxs("div",{className:"space-y-4 md:space-y-6",children:[s.jsxs(oe,{className:"bg-gradient-to-br from-wellbe-light to-wellbe-beige border-wellbe-beige",children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center space-x-2 text-wellbe-dark",children:[s.jsx(Ra,{className:"w-5 h-5"}),s.jsx("span",{children:"ΠληÏοÏοÏÎ¯ÎµÏ ÎÎλοÏ
Ï"})]})}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 md:gap-4",children:[s.jsxs("div",{className:"flex items-center space-x-3 p-3 md:p-4 bg-white/60 rounded-lg border border-wellbe-beige/50",children:[s.jsx("div",{className:"p-2 bg-wellbe-beige rounded-full flex-shrink-0",children:s.jsx(Ra,{className:"w-4 h-4 md:w-5 md:h-5 text-wellbe-dark"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-wellbe-dark-beige font-medium",children:"ÎÎÎ»Î¿Ï Î±ÏÏ"}),s.jsx("p",{className:"font-semibold text-wellbe-dark text-sm md:text-base truncate",children:I()})]})]}),s.jsxs("div",{className:"flex items-center space-x-3 p-3 md:p-4 bg-white/60 rounded-lg border border-wellbe-beige/50",children:[s.jsx("div",{className:"p-2 bg-wellbe-gold rounded-full flex-shrink-0",children:s.jsx(Ir,{className:"w-4 h-4 md:w-5 md:h-5 text-white"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-wellbe-dark-beige font-medium",children:"ÎαÏάÏÏαÏη ΣÏ
νδÏομήÏ"}),s.jsx(ye,{className:"bg-wellbe-gold text-white mt-1 text-xs",children:"ð ÎνεÏÎ³Ï ÎÎλοÏ"})]})]})]}),o?s.jsxs("div",{className:"flex items-center justify-center py-6",children:[s.jsx(mt,{className:"w-5 h-5 md:w-6 md:h-6 animate-spin mr-2"}),s.jsx("span",{className:"text-sm md:text-base",children:"ΦÏÏÏÏÏη ÏÏοιÏείÏν ÏÏ
νδÏομήÏ..."})]}):x?s.jsxs("div",{className:"bg-wellbe-light border border-wellbe-beige rounded-lg p-4 md:p-6",children:[s.jsx("div",{className:"flex items-center justify-center mb-3 md:mb-4",children:s.jsx("div",{className:"p-2 md:p-3 bg-wellbe-gold rounded-full",children:s.jsx(La,{className:"w-5 h-5 md:w-6 md:h-6 text-white"})})}),s.jsx("h3",{className:"text-base md:text-lg font-semibold text-wellbe-dark mb-2 text-center",children:"ÎÏÏεάν Î ÏÏÏβαÏη"}),s.jsx("p",{className:"text-wellbe-dark-beige text-sm md:text-base text-center mb-2",children:"Î ÏÏÏÏβαÏή ÏÎ±Ï ÎÏει ÏαÏαÏÏÏηθεί αÏÏ Ïον διαÏειÏιÏÏή."}),j&&s.jsxs("p",{className:"text-wellbe-gold text-sm md:text-base text-center font-medium mb-2",children:["ÎÏÏÏει ÎÏÏ: ",new Date(j).toLocaleDateString("el-GR",{year:"numeric",month:"long",day:"numeric"})]}),s.jsxs("p",{className:"text-wellbe-dark-beige text-sm text-center",children:["Îια οÏοιαδήÏοÏε αλλαγή,"," ",s.jsx(cs,{to:"/contact",className:"text-wellbe-gold hover:underline font-medium",children:"εÏικοινÏνήÏÏε μαζί μαÏ"}),"."]})]}):a!=null&&a.hasSubscription?s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-3 md:gap-4",children:[s.jsxs("div",{className:"flex items-center space-x-3 p-3 md:p-4 bg-white/60 rounded-lg border border-wellbe-beige/50",children:[s.jsx("div",{className:"p-2 bg-wellbe-gold rounded-full flex-shrink-0",children:s.jsx(b_,{className:"w-4 h-4 md:w-5 md:h-5 text-white"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-wellbe-dark-beige font-medium",children:"ΤελεÏ
Ïαία ΠληÏÏμή"}),s.jsx("p",{className:"font-semibold text-wellbe-dark text-sm md:text-base",children:a.latestInvoice?L(a.latestInvoice.amount_paid,a.latestInvoice.currency):a.subscription?L(a.subscription.amount,a.subscription.currency):"Îεν διαθÎÏιμο"}),s.jsx("p",{className:"text-xs text-wellbe-dark-beige",children:a.subscription?P(a.subscription.tier):"ΣÏ
νδÏομή Premium"})]})]}),s.jsxs("div",{className:"flex items-center space-x-3 p-3 md:p-4 bg-white/60 rounded-lg border border-wellbe-beige/50",children:[s.jsx("div",{className:"p-2 bg-wellbe-beige rounded-full flex-shrink-0",children:s.jsx(Ra,{className:"w-4 h-4 md:w-5 md:h-5 text-wellbe-dark"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-wellbe-dark-beige font-medium",children:(X=a.subscription)!=null&&X.cancel_at_period_end?"ΤελεÏ
Ïαία ÎμÎÏα Î ÏÏÏβαÏηÏ":"ÎÏÏμενη ΠληÏÏμή"}),s.jsx("p",{className:"font-semibold text-wellbe-dark text-sm md:text-base",children:(q=a.subscription)!=null&&q.current_period_end?O(a.subscription.current_period_end):"Îεν διαθÎÏιμο"}),s.jsx("p",{className:"text-xs text-wellbe-dark-beige",children:(H=a.subscription)!=null&&H.current_period_end?`Ïε ${Math.ceil((new Date(a.subscription.current_period_end).getTime()-Date.now())/(1e3*60*60*24))} ημÎÏεÏ`:""})]})]}),s.jsxs("div",{className:"flex items-center space-x-3 p-3 md:p-4 bg-white/60 rounded-lg border border-wellbe-beige/50",children:[s.jsx("div",{className:"p-2 bg-wellbe-dark-beige rounded-full flex-shrink-0",children:s.jsx(Ir,{className:"w-4 h-4 md:w-5 md:h-5 text-white"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-wellbe-dark-beige font-medium",children:"ΤÏÏÏÎ¿Ï Î Î»Î·ÏÏμήÏ"}),s.jsx("p",{className:"font-semibold text-wellbe-dark text-sm md:text-base",children:D()}),s.jsx("p",{className:"text-xs text-wellbe-dark-beige",children:$()})]})]})]}):s.jsx("div",{className:"text-center py-6",children:s.jsx("p",{className:"text-muted-foreground text-sm md:text-base",children:"Îεν βÏÎθηκαν ÏÏοιÏεία ενεÏÎ³Î®Ï ÏÏ
νδÏομήÏ"})})]})]}),s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(L5,{className:"w-5 h-5"}),s.jsx("span",{children:"ÎÏÎ¿Î´ÎµÎ¯Î¾ÎµÎ¹Ï Î Î±ÏοÏÎ®Ï Î¥ÏηÏεÏιÏν"})]}),s.jsx(F,{variant:"link",size:"sm",className:"self-start sm:self-auto",onClick:()=>{const B=document.getElementById("subscription-management");B&&B.scrollIntoView({behavior:"smooth",block:"start"})},children:"ÎεÏάβαÏη ÏÏη ÎιαÏείÏιÏη"})]})}),s.jsx(ce,{children:c?s.jsxs("div",{className:"flex items-center justify-center py-8",children:[s.jsx(mt,{className:"w-6 h-6 animate-spin mr-2"}),s.jsx("span",{children:"ΦÏÏÏÏÏη ιÏÏοÏÎ¹ÎºÎ¿Ï ÏληÏÏμÏν..."})]}):r.length>0?s.jsx("div",{className:"space-y-3 md:space-y-4",children:r.map(B=>s.jsx(oe,{className:"border-l-4 border-l-wellbe-gold",children:s.jsx(ce,{className:"p-3 md:p-4",children:s.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-start gap-3",children:[s.jsxs("div",{className:"space-y-1 flex-1 min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx(ye,{className:R(B.status==="issued"?"paid":B.status),children:B.status==="issued"?"ÎκδÏθηκε":T(B.status)}),B.invoice_number&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:["#",B.invoice_number]}),B.mydata_mark&&s.jsxs(ye,{variant:"outline",className:"text-xs border-green-300 text-green-700",children:[s.jsx(kl,{className:"w-3 h-3 mr-1"}),"ΦοÏÎ¿Î»Î¿Î³Î¹ÎºÏ Î Î±ÏαÏÏαÏικÏ"]})]}),s.jsx("p",{className:"font-semibold text-sm md:text-base",children:L(B.amount,B.currency)}),s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground break-words",children:B.description}),s.jsx("p",{className:"text-xs text-muted-foreground",children:O(B.date)}),B.mydata_mark&&s.jsxs("p",{className:"text-xs text-green-600",children:["ÎÎΡÎ: ",B.mydata_mark]})]}),s.jsxs("div",{className:"flex flex-row sm:flex-col gap-2 sm:gap-2 flex-shrink-0",children:[(B.pdf_url||B.elorus_invoice_id)&&s.jsxs(F,{variant:"outline",size:"sm",className:"text-xs px-2 py-1",disabled:f===B.id,onClick:()=>S(B),children:[f===B.id?s.jsx(mt,{className:"w-3 h-3 mr-1 animate-spin"}):s.jsx(vi,{className:"w-3 h-3 mr-1"}),"PDF"]}),B.tax_stamp_url&&s.jsxs(F,{variant:"ghost",size:"sm",className:"text-xs px-2 py-1",onClick:()=>window.open(B.tax_stamp_url,"_blank"),children:[s.jsx(im,{className:"w-3 h-3 mr-1"}),"Σήμα ÎÎÎÎ"]})]})]})})},B.id))}):s.jsx("div",{className:"text-center py-6 md:py-8",children:s.jsx("p",{className:"text-muted-foreground text-sm md:text-base",children:"Îεν βÏÎθηκαν αÏÎ¿Î´ÎµÎ¯Î¾ÎµÎ¹Ï ÏÏο ιÏÏοÏÎ¹ÎºÏ ÏαÏ"})})})]}),s.jsxs(oe,{id:"subscription-management",children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center space-x-2",children:[s.jsx(b_,{className:"w-5 h-5"}),s.jsx("span",{children:"ÎιαÏείÏιÏη ΣÏ
νδÏομήÏ"})]})}),s.jsx(ce,{className:"space-y-4",children:o?s.jsxs("div",{className:"flex items-center justify-center py-6 md:py-8",children:[s.jsx(mt,{className:"w-5 h-5 md:w-6 md:h-6 animate-spin mr-2"}),s.jsx("span",{className:"text-sm md:text-base",children:"ΦÏÏÏÏÏη ÏÏοιÏείÏν ÏÏ
νδÏομήÏ..."})]}):x?s.jsx("div",{className:"text-center py-6 md:py-8",children:s.jsxs("div",{className:"bg-wellbe-light border border-wellbe-beige rounded-lg p-4 md:p-6 mx-auto max-w-md",children:[s.jsx("div",{className:"flex items-center justify-center mb-3 md:mb-4",children:s.jsx("div",{className:"p-2 md:p-3 bg-wellbe-gold rounded-full",children:s.jsx(La,{className:"w-5 h-5 md:w-6 md:h-6 text-white"})})}),s.jsx("h3",{className:"text-base md:text-lg font-semibold text-wellbe-dark mb-2",children:"ÎÏÏεάν Î ÏÏÏβαÏη"}),s.jsx("p",{className:"text-wellbe-dark-beige text-sm md:text-base mb-2",children:"Î ÏÏÏÏβαÏή ÏÎ±Ï ÎÏει ÏαÏαÏÏÏηθεί αÏÏ Ïον διαÏειÏιÏÏή."}),j&&s.jsxs("p",{className:"text-wellbe-gold text-sm md:text-base font-medium mb-2",children:["ÎÏÏÏει ÎÏÏ: ",new Date(j).toLocaleDateString("el-GR",{year:"numeric",month:"long",day:"numeric"})]}),s.jsxs("p",{className:"text-wellbe-dark-beige text-sm",children:["Îια οÏοιαδήÏοÏε αλλαγή,"," ",s.jsx(cs,{to:"/contact",className:"text-wellbe-gold hover:underline font-medium",children:"εÏικοινÏνήÏÏε μαζί μαÏ"}),"."]})]})}):a!=null&&a.customer&&!(a!=null&&a.hasSubscription)?s.jsx("div",{className:"space-y-4",children:s.jsx("div",{className:"p-4 bg-amber-50 rounded-lg border border-amber-200",children:s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx(ns,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"font-semibold text-amber-800 text-sm md:text-base mb-1",children:"Î ÏÏβλημα με Ïη ΣÏ
νδÏομή"}),s.jsx("p",{className:"text-amber-700 text-sm mb-3",children:"Î¥ÏάÏÏει ÏÏÏβλημα με Ïη ÏÏ
νδÏομή ή Ïη μÎθοδο ÏληÏÏÎ¼Î®Ï ÏαÏ. ΠαÏακαλοÏμε ενημεÏÏÏÏε Ïα ÏÏοιÏεία ÏληÏÏÎ¼Î®Ï ÏαÏ."}),s.jsxs(F,{variant:"outline",className:"border-amber-300 hover:bg-amber-100 text-amber-800",onClick:C,disabled:o,children:[s.jsx(Ir,{className:"w-4 h-4 mr-2"}),"ÎιαÏείÏιÏη ÎεθÏδÏν ΠληÏÏμήÏ"]})]})]})})}):a!=null&&a.hasSubscription?s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"p-3 md:p-4 bg-wellbe-light rounded-lg bord
735er border-wellbe-beige",children:s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[s.jsx("div",{className:"p-2 bg-wellbe-beige rounded-full flex-shrink-0",children:s.jsx(Ir,{className:"w-4 h-4 md:w-5 md:h-5 text-wellbe-dark"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h4",{className:"font-semibold text-sm md:text-base",children:"ΤÏÏÏÎ¿Ï Î Î»Î·ÏÏμήÏ"}),s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:D()}),s.jsx("p",{className:"text-xs text-muted-foreground",children:$()})]})]}),s.jsxs(F,{variant:"outline",size:"sm",className:"self-start sm:self-auto flex-shrink-0",onClick:C,disabled:o,children:[s.jsx(Ir,{className:"w-4 h-4 mr-2"}),"ÎιαÏείÏιÏη ÎεθÏδÏν ΠληÏÏμήÏ"]})]})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 md:gap-4",children:[s.jsx(F,{variant:"outline",onClick:()=>g(!0),className:"h-auto p-3 md:p-4 justify-start",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:"p-2 bg-wellbe-gold rounded-full flex-shrink-0",children:s.jsx(Bm,{className:"w-4 h-4 md:w-5 md:h-5 text-white"})}),s.jsxs("div",{className:"text-left min-w-0 flex-1",children:[s.jsx("p",{className:"font-semibold text-sm md:text-base",children:"Îλλαγή ΠλάνοÏ
"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"ÎναβάθμιÏη ή Ï
ÏοβάθμιÏη ÏÏ
νδÏομήÏ"})]})]})}),(se=a.subscription)!=null&&se.cancel_at_period_end?s.jsx("div",{className:"p-3 md:p-4 bg-wellbe-light border border-wellbe-beige rounded-lg",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx(ns,{className:"w-4 h-4 md:w-5 md:h-5 text-wellbe-dark-beige flex-shrink-0"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-semibold text-wellbe-dark text-sm md:text-base",children:"ΣÏ
νδÏομή Ïε ÎκÏÏÏÏη"}),s.jsxs("p",{className:"text-xs md:text-sm text-wellbe-dark-beige",children:["Î ÏÏ
νδÏομή θα ακÏ
ÏÏθεί ÏÏÎ¹Ï ",(te=a.subscription)!=null&&te.current_period_end?O(a.subscription.current_period_end):"άγνÏÏÏη ημεÏομηνία"]})]})]})}):s.jsxs(si,{children:[s.jsx(ri,{asChild:!0,children:s.jsx(F,{variant:"outline",className:"h-auto p-3 md:p-4 justify-start border-red-200 hover:bg-red-50",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:"p-2 bg-red-100 rounded-full flex-shrink-0",children:s.jsx(Rs,{className:"w-4 h-4 md:w-5 md:h-5 text-red-600"})}),s.jsxs("div",{className:"text-left min-w-0 flex-1",children:[s.jsx("p",{className:"font-semibold text-red-700 text-sm md:text-base",children:"ÎκÏÏÏÏη ΣÏ
νδÏομήÏ"}),s.jsx("p",{className:"text-xs text-red-600",children:"ÎκÏÏÏÏη ÏÏο ÏÎÎ»Î¿Ï ÏÎ·Ï ÏεÏιÏδοÏ
"})]})]})})}),s.jsxs(ya,{className:"mx-4 max-w-md",children:[s.jsxs(ba,{children:[s.jsx(ja,{className:"text-base md:text-lg",children:"ÎκÏÏÏÏη ΣÏ
νδÏομήÏ"}),s.jsx(Na,{className:"text-sm md:text-base",children:"ÎίÏÏε ÏίγοÏ
Ïοι ÏÏι θÎλεÏε να ακÏ
ÏÏÏεÏε Ïη ÏÏ
νδÏομή ÏαÏ; Î ÏÏÏÏβαÏη θα ÏÏ
νεÏιÏÏεί μÎÏÏι Ïο ÏÎÎ»Î¿Ï ÏÎ·Ï ÏÏÎÏοÏ
ÏÎ±Ï ÏεÏιÏδοÏ
ÏληÏÏμήÏ."})]}),s.jsxs(wa,{className:"flex-col sm:flex-row gap-2",children:[s.jsx(ka,{className:"w-full sm:w-auto",children:"ÎκÏÏÏÏη"}),s.jsx(_a,{onClick:k,disabled:u,className:"bg-red-600 hover:bg-red-700 w-full sm:w-auto",children:u?s.jsxs(s.Fragment,{children:[s.jsx(mt,{className:"w-4 h-4 animate-spin mr-2"}),"ÎκÏÏÏÏη..."]}):"ÎκÏÏÏÏη ΣÏ
νδÏομήÏ"})]})]})]})]})]}):s.jsx("div",{className:"text-center py-6 md:py-8",children:s.jsx("p",{className:"text-muted-foreground text-sm md:text-base",children:"Îεν Ï
ÏάÏÏει ενεÏγή ÏÏ
νδÏομή για διαÏείÏιÏη"})})})]})]})};function kg(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Sg="Switch",[TH,gte]=gs(Sg),[AH,IH]=TH(Sg),uA=h.forwardRef((e,t)=>
735{const{__scopeSwitch:r,name:n,checked:a,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:d,form:u,...m}=e,[f,p]=h.useState(null),v=Ye(t,w=>p(w)),g=h.useRef(!1),b=f?u||!!f.closest("form"):!0,[y,x]=xr({prop:a,defaultProp:i??!1,onChange:d,caller:Sg});return s.jsxs(AH,{scope:r,checked:y,disabled:l,children:[s.jsx(Ce.button,{type:"button",role:"switch","aria-checked":y,"aria-required":o,"data-state":pA(y),"data-disabled":l?"":void 0,disabled:l,value:c,...m,ref:v,onClick:pe(e.onClick,w=>{x(j=>!j),b&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),b&&s.jsx(fA,{control:f,bubbles:!g.current,name:n,value:c,checked:y,required:o,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})});uA.displayName=Sg;var mA="SwitchThumb",hA=h.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,a=IH(mA,r);return s.jsx(Ce.span,{"data-state":pA(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})});hA.displayName=mA;var RH="SwitchBubbleInput",fA=h.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...a},i)=>{const o=h.useRef(null),l=Ye(o,i),c=kg(r),d=tg(t);return h.useEffect(()=>{const u=o.current;if(!u)return;const m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==r&&p){const v=new Event("click",{bubbles:n});p.call(u,r),u.dispatchEvent(v)}},[c,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});fA.displayName=RH;function pA(e){return e?"checked":"unchecked"}var gA=uA,MH=hA;const km=h.forwardRef(({className:e,...t},r)=>s.jsx(gA,{className:me("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:s.jsx(MH,{className:me("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));km.displayName=gA.displayName;const xA=({ranking:e,loading:t})=>{if(t)return s.jsx(oe,{className:"bg-gradient-to-br from-amber-50 to-yellow-50 border-amber-200",children:s.jsx(ce,{className:"p-6",children:s.jsxs("div",{className:"animate-pulse space-y-3",children:[s.jsx("div",{className:"h-4 bg-amber-200 rounded w-1/2"}),s.jsx("div",{className:"h-8 bg-amber-200 rounded w-3/4"})]})})});if(!e)return s.jsx(oe,{className:"bg-gradient-to-br from-slate-50 to-gray-50 border-slate-200",children:s.jsxs(ce,{className:"p-6 text-center",children:[s.jsx(Bm,{className:"h-12 w-12 text-slate-400 mx-auto mb-3"}),s.jsx("p",{className:"text-slate-600 font-medium",children:"ÎεκινήÏÏε να δÏαÏÏηÏιοÏοιείÏÏε για να δείÏε Ïην καÏάÏαξή ÏαÏ!"})]})});const r=e.total_users>=10,n=e.total_activity_score>=5,a=r&&n&&e.percentile<100,i=a&&e.percentile<=5,o=a&&e.percentile<=15,l=a&&e.percentile<=25;return s.jsx(oe,{className:`${i?"bg-gradient-to-br from-yellow-50 to-amber-50 border-yellow-300 shadow-lg ring-2 ring-yellow-200":o?"bg-gradient-to-br from-purple-50 to-pink-50 border-purple-300 shadow-lg ring-2 ring-purple-200":l?"bg-gradient-to-br from-blue-50 to-cyan-50 border-blue-300 shadow-lg ring-2 ring-blue-200":"bg-gradient-to-br from-slate-50 to-blue-50 border-slate-200"}`,children:s.jsxs(ce,{className:"p-6",children:[s.jsx("div",{className:"flex items-center justify-between mb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ss,{className:`h-8 w-8 ${i?"text-yellow-500":o?"text-purple-500":l?"text-blue-500":"text-slate-500"}`}),s.jsx("div",{children:s.jsx("h3",{className:`text-base font-semibold ${i?"text-yellow-800":o?"text-purple-800":l?"text-blue-800":"text-slate-700"}`,children:"ÎαÏάÏαξη ÎÏαÏÏηÏιÏÏηÏαÏ"})})]})}),i&&s.jsxs("div",{className:"mb-4 p-4 bg-gradient-to-r from-yellow-100 to-amber-100 rounded-lg border border-yellow-200",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(ss,{className:"h-5 w-5 text-yellow-600"}),s.jsx("span",{className:"font-semibold text-yellow-800",children:"ΣÏ
γÏαÏηÏήÏια!"})]}),s.jsx("p",{className:"text-yellow-800 text-sm",children:"ÎίÏÏε ÏÏο top 5% ÏÏν Ïιο δÏαÏÏήÏιÏν ÏÏηÏÏÏν ÏοÏ
Well Be! ð"})]}),o&&!i&&s.jsxs("div",{className:"mb-4 p-4 bg-gradient-to-r from-purple-100 to-pink-100 rounded-lg border border-purple-200",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-lg",children:"ð"}),s.jsx("span",{className:"font-semibold text-purple-800",children:"ΣÏ
γÏαÏηÏήÏια!"})]}),s.jsx("p",{className:"text-purple-800 text-sm",children:"ÎίÏÏε ÏÏο top 15% ÏÏν Ïιο δÏαÏÏήÏιÏν ÏÏηÏÏÏν ÏοÏ
Well Be! ð"}),s.jsxs("p",{className:"text-purple-700 text-sm mt-2 flex items-center gap-1",children:["ΣÏ
νεÏίÏÏε Ïη δÏαÏÏηÏιÏÏηÏά ÏÎ±Ï Î³Î¹Î± Ïο εÏÏμενο εÏίÏεδο! ",s.jsx("span",{className:"text-lg",children:"ð"})]})]}),l&&!o&&s.jsxs("div",{className:"mb-4 p-4 bg-gradient-to-r from-blue-100 to-cyan-100 rounded-lg border border-blue-200",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-lg",children:"ð"}),s.jsx("span",{className:"font-semibold text-blue-800",children:"ΣÏ
γÏαÏηÏήÏια!"})]}),s.jsx("p",{className:"text-blue-800 text-sm",children:"ÎίÏÏε ÏÏο top 25% ÏÏν Ïιο δÏαÏÏήÏιÏν ÏÏηÏÏÏν ÏοÏ
Well Be! ð"}),s.jsxs("p",{className:"text-blue-700 text-sm mt-2 flex items-center gap-1",children:["ΣÏ
νεÏίÏÏε Ïη δÏαÏÏηÏιÏÏηÏά ÏÎ±Ï Î³Î¹Î± Ïο εÏÏμενο εÏίÏεδο! ",s.jsx("span",{className:"text-lg",children:"ð"})]})]}),!a&&e.total_activity_score>0&&s.jsxs("div",{className:"mb-4 p-4 bg-gradient-to-r from-indigo-50 to-blue-50 rounded-lg border border-indigo-200",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Ul,{className:"h-5 w-5 text-indigo-600"}),s.jsx("span",{className:"font-semibold text-indigo-800",children:"ΧÏίζοÏ
με Ïην κοινÏÏηÏα!"})]}),!r&&s.jsx("p",{className:"text-indigo-800 text-sm mb-2",children:"ΠεÏιμÎνοÏ
με ÏεÏιÏÏÏÏεÏοÏ
Ï ÎµÎ½ÎµÏγοÏÏ ÏÏήÏÏÎµÏ Î³Î¹Î± να ξεκινήÏοÏ
με ÏÎ¹Ï ÎºÎ±ÏαÏάξειÏ."}),!n&&s.jsx("p",{className:"text-indigo-700 text-sm",children:"ΣÏ
νεÏίÏÏε Ïη δÏαÏÏηÏιÏÏηÏά ÏÎ±Ï Î³Î¹Î± να ÏÏ
μμεÏάÏÏεÏε ÏÏÎ¹Ï ÎºÎ±ÏαÏάξειÏ!"})]}),a&&s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"ÎαÏάÏαξη:"}),s.jsxs("span",{className:"font-semibold",children:["#",e.rank_position]})]})]})})},OH=({userId:e,initialProfile:t,onProfileUpdate:r})=>{const{toast:n}=at(),{session:a}
735=jt(),i=qe(),[o,l]=h.useState(!1),[c,d]=h.useState(!1),[u,m]=h.useState(!1),[f,p]=h.useState(!1),[v,g]=h.useState(null),[b,y]=h.useState(!0),[x,w]=h.useState(!1),[j,N]=h.useState(!1),[S,E]=h.useState(!1),[_,I]=h.useState(""),[R,T]=h.useState(!1),[k,C]=h.useState({first_name:"",last_name:"",nickname:"",email:"",phone_number:"",email_notifications_enabled:!0,password:"",confirmPassword:""}),[A,L]=h.useState("");h.useEffect(()=>{if(t){const H=[t.first_name,t.last_name].filter(Boolean).join(" ")||"";C({first_name:t.first_name||"",last_name:t.last_name||"",nickname:t.nickname||H,email:t.email||"",phone_number:t.phone_number||"",email_notifications_enabled:t.email_notifications_enabled??!0,password:"",confirmPassword:""}),L(t.email||"")}(async()=>{if(e)try{const{data:H,error:se}=await U.rpc("get_user_ranking",{_user_id:e});se?console.error("Error fetching user ranking:",se):H&&H.length>0&&g({rank_position:Number(H[0].rank_position),total_users:Number(H[0].total_users),percentile:Number(H[0].percentile),total_activity_score:Number(H[0].total_activity_score),badge_level:H[0].badge_level,current_badge:H[0].current_badge})}catch(H){console.error("Error in fetchUserRanking:",H)}finally{y(!1)}})()},[t,e]);const O=(q,H)=>{C(se=>({...se,[q]:H}))},P=()=>k.password.trim()&&k.password!==k.confirmPassword?(n({title:"ΣÏάλμα",description:"Îι κÏδικοί ÏÏÏÏβαÏÎ·Ï Î´ÎµÎ½ ÏαιÏιάζοÏ
ν",variant:"destructive"}),!1):k.password.trim()&&k.password.length<6?(n({title:"ΣÏάλμα",description:"ΠκÏδικÏÏ ÏÏÏÏβαÏÎ·Ï ÏÏÎÏει να ÎÏει ÏοÏ
λάÏιÏÏον 6 ÏαÏακÏήÏεÏ",variant:"destructive"}),!1):!0,M=async()=>{if(k.email===A){n({title:"ΠληÏοÏοÏία",description:"Îεν ÎÏεÏε αλλάξει Ïο email ÏαÏ"});return}p(!0);try{const{error:q}=await U.auth.updateUser({email:k.email});if(q)throw q;n({title:"Email ÎÏιβεβαίÏÏÎ·Ï Î£Ïάλθηκε",description:"ÎλÎγξÏε Ïο email ÏÎ±Ï ÎºÎ±Î¹ κάνÏε κλικ ÏÏον ÏÏνδεÏμο εÏιβεβαίÏÏÎ·Ï Î³Î¹Î± να ολοκληÏÏÏεÏε Ïην αλλαγή."})}catch(q){n({title:"ΣÏάλμα",description:q.message||"Îεν ήÏαν δÏ
ναÏή η αÏοÏÏολή email εÏιβεβαίÏÏηÏ",variant:"destructive"})}finally{p(!1)}},D=async q=>{if(q.preventDefault(),!!P()){l(!0);try{const H=k.email!==A;H&&await M();const se={first_name:k.first_name||null,last_name:k.last_name||null,nickname:k.nickname||null,email:H?A:k.email||null,phone_number:k.phone_number||null,email_notifications_enabled:k.email_notifications_enabled,updated_at:new Date().toISOString()},{data:te,error:B}=await U.from("profiles").update(se).eq("user_id",e).select().single();if(B)throw B;if(k.password.trim()){const{error:le}=await U.auth.updateUser({password:k.password});if(le)throw le;n({title:"ÎÏιÏÏ
Ïία",description:H?"Το ÏÏοÏίλ και ο κÏδικÏÏ ÎµÎ½Î·Î¼ÎµÏÏθηκαν. ÎλÎγξÏε Ïο email ÏÎ±Ï Î³Î¹Î± εÏιβεβαίÏÏη ÏÎ·Ï Î±Î»Î»Î±Î³Î®Ï email.":"Το ÏÏοÏίλ και ο κÏδικÏÏ ÏÏÏÏβαÏÎ·Ï ÎµÎ½Î·Î¼ÎµÏÏθηκαν εÏιÏÏ
ÏÏÏ"})}else n({title:"ÎÏιÏÏ
Ïία",description:H?"Το ÏÏοÏίλ ενημεÏÏθηκε. ÎλÎγξÏε Ïο email ÏÎ±Ï Î³Î¹Î± εÏιβεβαίÏÏη ÏÎ·Ï Î±Î»Î»Î±Î³Î®Ï email.":"Το ÏÏοÏίλ ενημεÏÏθηκε εÏιÏÏ
ÏÏÏ"});r(te),C(le=>({...le,password:"",confirmPassword:""}))}catch(H){console.error("Error updating profile:",H),n({title:"ΣÏάλμα",description:H.message||"Îεν ήÏαν δÏ
ναÏή η ενημÎÏÏÏη ÏοÏ
ÏÏοÏίλ",variant:"destructive"})}finally{l(!1)}}},$=async()=>{try{if(!(a!=null&&a.access_token))return!1;const{data:q,error:H}=await U.functions.invoke("check-subscription",{headers:{Authorization:`Bearer ${a.access_token}`}});return H?!1:q.subscribed&&!q.cancel_at_period_end}catch(q){return console.error("Error checking subscription status:",q),!1}},W=async()=>{if(_!=="DELETE"){n({title:"ΣÏάλμα",description:"ΠληκÏÏολογήÏÏε 'DELETE' για να εÏιβεβαιÏÏεÏε",variant:"destructive"});return}if(await $()){n({title:"ÎκÏÏÏÏη ΣÏ
νδÏÎ¿Î¼Î®Ï ÎÏαιÏείÏαι",description:"Î ÏÎÏει ÏÏÏÏα να ακÏ
ÏÏÏεÏε Ïη ÏÏ
νδÏομή ÏÎ±Ï ÏÏιν διαγÏάÏεÏε Ïον λογαÏιαÏμÏ.",variant:"destructive",action:s.jsx(F,{variant:"outline",onClick:()=>i("/dashboard?tab=invoices§ion=billing"),className:"ml-2",children:"ÎκÏÏÏÏη ΣÏ
νδÏομήÏ"})});return}T(!0);try{if(!(a!=null&&a.access_token))throw new Error("No authentication token found");
735console.log("[DELETE-ACCOUNT] Attempting to delete account...");let H,se;try{const{data:te,error:B}=await U.functions.invoke("self-delete-account",{headers:{Authorization:`Bearer ${a.access_token}`,apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdjcGp2Z3N6dml5dGRvY252eWFvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTYwNDQzMjEsImV4cCI6MjA3MTYyMDMyMX0.wgwX9pwjvnc5p3J8GsYXFtE4lVO2iW2KPOmJvzk93cU"},body:{action:"self_delete"}});B?(se=B,console.error("[DELETE-ACCOUNT] Invoke error:",B)):(H=te,console.log("[DELETE-ACCOUNT] Success via invoke"))}catch(te){se=te,console.error("[DELETE-ACCOUNT] Invoke exception:",te)}if(se){console.log("[DELETE-ACCOUNT] Falling back to direct fetch...");const te=await fetch("https://gcpjvgszviytdocnvyao.supabase.co/functions/v1/self-delete-account",{method:"POST",headers:{Authorization:`Bearer ${a.access_token}`,apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdjcGp2Z3N6dml5dGRvY252eWFvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTYwNDQzMjEsImV4cCI6MjA3MTYyMDMyMX0.wgwX9pwjvnc5p3J8GsYXFtE4lVO2iW2KPOmJvzk93cU","Content-Type":"application/json"},body:JSON.stringify({action:"self_delete"})});if(console.log("[DELETE-ACCOUNT] Fetch response status:",te.status),!te.ok){const le=await te.text();throw console.error("[DELETE-ACCOUNT] Fetch error response:",le),new Error(`Failed to delete account: ${te.status} - ${le}`)}const B=await te.json();console.log("[DELETE-ACCOUNT] Fetch response data:",B),H=B}n({title:"ÎογαÏιαÏμÏÏ ÎιαγÏάÏηκε",description:"ΠλÎ
735¿Î³Î±ÏιαÏμÏÏ ÏÎ±Ï Î´Î¹Î±Î³ÏάÏηκε εÏιÏÏ
ÏÏÏ. Îι διαÏειÏιÏÏÎÏ Î¼ÏοÏοÏν να ÏÎ±Ï ÎµÏαναÏÎÏοÏ
ν εάν ÏÏειαÏÏεί μÎÏÏ ÏοÏ
'Backfill User' ÏÏο admin panel."}),await U.auth.signOut(),i("/")}catch(H){console.error("[DELETE-ACCOUNT] Final error:",H),n({title:"ΣÏάλμα",description:H.message||"Îεν ήÏαν δÏ
ναÏή η διαγÏαÏή ÏοÏ
λογαÏιαÏμοÏ",variant:"destructive"})}finally{T(!1)}},X=()=>{i("/dashboard?tab=invoices§ion=billing"),N(!1)};return s.jsxs("form",{onSubmit:D,className:"space-y-6",children:[s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center space-x-2",children:[s.jsx(kl,{className:"w-5 h-5"}),s.jsx("span",{children:"Î ÏοÏÏÏικά ΣÏοιÏεία"})]})}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"firstName",children:"Îνομα"}),s.jsx(ke,{id:"firstName",value:k.first_name,onChange:q=>O("first_name",q.target.value),placeholder:"ÎιÏάγεÏε Ïο Ïνομά ÏαÏ"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"lastName",children:"ÎÏÏνÏ
μο"}),s.jsx(ke,{id:"lastName",value:k.last_name,onChange:q=>O("last_name",q.target.value),placeholder:"ÎιÏάγεÏε Ïο εÏÏνÏ
Î¼Ï ÏαÏ"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"nickname",children:"ΨεÏ
δÏνÏ
μο (Nickname) â"}),s.jsx(ke,{id:"nickname",value:k.nickname,onChange:q=>O("nickname",q.target.value),placeholder:"Το Ïνομα ÏοÏ
θα εμÏανίζεÏαι ÏÏην κοινÏÏηÏα"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["ð ",s.jsx("strong",{children:"ΣÏ
νιÏÏάÏαι:"})," ÎÏ
ÏÏ Ïο Ïνομα θα εμÏανίζεÏαι ÏÏÎ¹Ï Î±Î½Î±ÏÏήÏÎµÎ¹Ï ÎºÎ±Î¹ ÏÏÏλιά ÏÎ±Ï ÏÏην κοινÏÏηÏα"]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(_e,{htmlFor:"email",className:"flex items-center space-x-2",children:[s.jsx(Fa,{className:"w-4 h-4"}),s.jsx("span",{children:"Email"})]}),s.jsx(ke,{id:"email",type:"email",value:k.email,onChange:q=>O("email",q.target.value),placeholder:"ÎιÏάγεÏε Ïο email ÏαÏ"}),k.email!==A&&k.email.trim()&&s.jsxs("div",{className:"flex items-start space-x-2 p-3 bg-amber-50 border border-amber-200 rounded-md",children:[s.jsx(Rc,{className:"w-4 h-4 text-amber-600 mt-0.5 flex-shrink-0"}),s.jsxs("div",{className:"text-sm text-amber-800",children:[s.jsx("p",{className:"font-medium",children:"Îλλαγή Email"}),s.jsx("p",{children:"Îα ÏÏαλεί email εÏιβεβαίÏÏÎ·Ï ÏÏη νÎα διεÏθÏ
νÏη. Παλλαγή θα ολοκληÏÏθεί μÏνο αÏÎ¿Ï ÎµÏιβεβαιÏÏεÏε Ïη νÎα διεÏθÏ
νÏη."})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(_e,{htmlFor:"phone",className:"flex items-center space-x-2",children:[s.jsx(gE,{className:"w-4 h-4"}),s.jsx("span",{children:"ΤηλÎÏÏνο"})]}),s.jsx(ke,{id:"phone",type:"tel",value:k.phone_number,onChange:q=>O("phone_number",q.target.value),placeholder:"ÎιÏάγεÏε Ïον αÏÎ¹Î¸Î¼Ï ÏηλεÏÏνοÏ
ÏαÏ"})]})]})]}),s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center space-x-2",children:[s.jsx(kl,{className:"w-5 h-5"}),s.jsx("span",{children:"ÎÏÏάλεια"})]})}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"password",children:"ÎÎÎ¿Ï ÎÏδικÏÏ Î ÏÏÏβαÏηÏ"}),s.jsxs("div",{className:"relative",children:[s.jsx(ke,{id:"password",type:c?"text":"password",value:k.password,onChange:q=>O("password",q.target.value),placeholder:"ÎÏήÏÏε ÎºÎµÎ½Ï Î±Î½ δεν θÎλεÏε να αλλάξεÏε Ïον κÏδικÏ"}),s.jsx(F,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>d(!c),children:c?s.jsx(Gf,{className:"h-4 w-4"}):s.jsx(my,{className:"h-4 w-4"})})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:k.password?"â¢â¢â¢â¢â¢â¢â¢â¢":"Î ÏÏÎÏÏν κÏδικÏÏ ÏÎ±Ï ÏαÏαμÎνει κÏÏ
ÏÏÏ"})]}),k.password.trim()&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"confirmPassword",children:"ÎÏιβεβαίÏÏη ÎÏÎ´Î¹ÎºÎ¿Ï Î ÏÏÏβαÏηÏ"}),s.jsxs("div",{className:"relative",children:[s.jsx(ke,{id:"confirmPassword",type:u?"text":"password",value:k.confirmPassword,onChange:q=>O("confirmPassword",q.target.value),placeholder:"ÎÏιβεβαιÏÏÏε Ïον νÎο κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏηÏ",className:k.confirmPassword&&k.password!==k.confirmPassword?"border-red-500 focus:border-red-500":""}),s.jsx(F,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>m(!u),children:u?s.jsx(Gf,{className:"h-4 w-4"}
735):s.jsx(my,{className:"h-4 w-4"})})]}),k.confirmPassword&&k.password!==k.confirmPassword&&s.jsx("p",{className:"text-sm text-red-600",children:"Îι κÏδικοί ÏÏÏÏβαÏÎ·Ï Î´ÎµÎ½ ÏαιÏιάζοÏ
ν"}),k.confirmPassword&&k.password===k.confirmPassword&&s.jsx("p",{className:"text-sm text-green-600",children:"â Îι κÏδικοί ÏÏÏÏβαÏÎ·Ï ÏαιÏιάζοÏ
ν"})]})]})]}),s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center space-x-2",children:[s.jsx(Fa,{className:"w-5 h-5"}),s.jsx("span",{children:"Î ÏοÏιμήÏÎµÎ¹Ï Email"})]})}),s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(_e,{htmlFor:"emailNotifications",children:"ÎνημεÏÏÏÎµÎ¹Ï Î¼ÎÏÏ Email"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"ÎάβεÏε ενημεÏÏÏÎµÎ¹Ï Î³Î¹Î± νÎο ÏεÏιεÏÏμενο και ÏÏοÏÏοÏÎÏ. Τα emails ÏληÏÏμÏν και ανανεÏÏεÏν θα ÏÏ
νεÏίÏοÏ
ν να αÏοÏÏÎλλονÏαι."})]}),s.jsx(km,{id:"emailNotifications",checked:k.email_notifications_enabled,onCheckedChange:q=>O("email_notifications_enabled",q)})]})})]}),s.jsx("div",{className:"animate-fade-in",children:s.jsx(xA,{ranking:v,loading:b})}),s.jsx("div",{className:"flex justify-end pt-4",children:s.jsx(F,{type:"submit",disabled:o,className:"min-w-32",children:o?s.jsxs(s.Fragment,{children:[s.jsx(mt,{className:"w-4 h-4 mr-2 animate-spin"}),"ÎÏοθήκεÏ
Ïη..."]}):"ÎÏοθήκεÏ
Ïη ÎλλαγÏν"})}),s.jsxs(oe,{className:"border-red-200 bg-red-50/50",children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center space-x-2 text-red-800",children:[s.jsx(jn,{className:"w-5 h-5"}),s.jsx("span",{children:"ÎιαÏείÏιÏη ÎογαÏιαÏμοÏ"})]})}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"p-4 bg-amber-50 border border-amber-200 rounded-lg",children:s.jsxs("div",{className:"flex items-start space-x-2",children:[s.jsx(Rc,{className:"w-5 h-5 text-amber-600 mt-0.5 flex-shrink-0"}),s.jsxs("div",{className:"text-sm text-amber-800",children:[s.jsx("p",{className:"font-medium mb-1",children:"ÎναλλακÏική ÎÏιλογή"}),s.jsx("p",{children:"Îν θÎλεÏε να διαÏηÏήÏεÏε Ïον λογαÏιαÏÎ¼Ï ÏÎ±Ï Î±Î»Î»Î¬ να ÏÏαμαÏήÏεÏε ÏÎ¹Ï ÏÏεÏÏειÏ, μÏοÏείÏε να ακÏ
ÏÏÏεÏε Ïη ÏÏ
νδÏομή ÏÎ±Ï Î¼ÎÏÏ ÏÎ·Ï ÎºÎ±ÏÏÎÎ»Î±Ï ÏÏεÏÏεÏν. Îα ÏÏ
νεÏίÏεÏε να ÎÏεÏε ÏÏÏÏβαÏη ÏÏο ÏεÏιεÏÏμενο μÎÏÏι Ïο ÏÎÎ»Î¿Ï ÏÎ·Ï ÏεÏιÏδοÏ
ÏοÏ
ÎÏεÏε ήδη ÏληÏÏÏει."})]})]})}),s.jsx("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:s.jsxs("div",{className:"flex items-start space-x-2",children:[s.jsx(jn,{className:"w-5 h-5 text-red-600 mt-0.5 flex-shrink-0"}),s.jsxs("div",{className:"text-sm text-red-800",children:[s.jsx("p",{className:"font-medium mb-2",children:"ÎιαγÏαÏή ÎογαÏιαÏμοÏ"}),s.jsxs("ul",{className:"space-y-1 list-disc list-inside text-sm",children:[s.jsx("li",{children:"Îα διαγÏαÏοÏν Ïλα Ïα ÏÏοÏÏÏικά ÏÎ±Ï Î´ÎµÎ´Î¿Î¼Îνα"}),s.jsx("li",{children:"Îα ακÏ
ÏÏθοÏν άμεÏα ÏÎ»ÎµÏ Î¿Î¹ ενεÏγÎÏ ÏÏ
νδÏομÎÏ"}),s.jsx("li",{children:"Îεν θα Ï
ÏάÏξοÏ
ν εÏιÏÏÏοÏÎÏ ÏÏημάÏÏν"}),s.jsx("li",{children:"Îα ÏάÏεÏε Ïην ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏÏμενο"}),s.jsx("li",{children:"Îεν θα ÏÏεÏθείÏε ξανά"}),s.jsx("li",{children:"ΠενÎÏγεια είναι μη αναÏÏÏÎÏιμη"})]})]})]})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 pt-2",children:[s.jsxs(F,{type:"button",variant:"outline",onClick:()=>N(!0),className:"flex-1",children:[s.jsx(im,{className:"w-4 h-4 mr-2"}),"ÎκÏÏÏÏη ΣÏ
νδÏÎ¿Î¼Î®Ï ÎÏνο"]}),s.jsxs(F,{type:"button",variant:"destructive",onClick:()=>w(!0),className:"flex-1",children:[s.jsx(jn,{className:"w-4 h-4 mr-2"}),"ÎιαγÏαÏή ÎογαÏιαÏμοÏ"]})]})]})]}),s.jsx(gr,{open:j,onOpenChange:N,children:s.jsxs(rr,{className:"max-w-md",children:[s.jsxs($r,{children:[s.jsxs(Ur,{className:"flex items-center space-x-2",children:[s.jsx(im,{className:"w-5 h-5"}),s.jsx("span",{children:"ÎκÏÏÏÏη ΣÏ
νδÏομήÏ"})]}),s.jsx(go,{children:"ΣÏ
νιÏÏοÏμε αÏ
Ïή Ïην εÏιλογή αν θÎλεÏε αÏλά να ÏÏαμαÏήÏεÏε ÏÎ¹Ï ÏÏεÏÏειÏ."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"p-4 bg-green-50 border border-green-200 rounded-lg",children:s.jsxs("p",{className:"text-sm text-green-800",children:[s.jsx("strong",{children:"ΠλεονεκÏήμαÏα:"}),s.jsx("br",{}),"⢠ÎιαÏηÏείÏε Ïον λογαÏιαÏÎ¼Ï ÏαÏ",s.jsx("br",{}),"⢠ΣÏ
νεÏίζεÏε να ÎÏεÏε ÏÏÏÏβαÏη μÎÏÏι Ïο ÏÎÎ»Î¿Ï ÏÎ·Ï ÏληÏÏμÎÎ½Î·Ï ÏεÏιÏδοÏ
",s.jsx("br",{}),"⢠ÎÏοÏείÏε να εÏανενεÏγοÏοιήÏεÏε Ïη ÏÏ
νδÏομή αÏγÏÏεÏα",s.jsx("br",{}),"⢠ÎιαÏηÏείÏε Ïο ιÏÏοÏÎ¹ÎºÏ Î´ÏαÏÏηÏιÏÏηÏÎ¬Ï ÏαÏ"]})}),s.jsxs("div",{className:"flex space-x-3",children:[s.jsx(F,{variant:"outline",onClick:()=>N(!1),className:"flex-1",children:"ÎκÏÏÏÏη"}),s.jsx(F,{onClick:X,className:"flex-1",children:"Îνοιγμα ΧÏεÏÏεÏν"})]})]})]})}),s.jsx(gr,{open:x,onOpenChange:w,children:s.jsxs(rr,{className:"max-w-md",children:[s.jsxs($r,{children:[s.jsxs(Ur,{className:"flex items-center space-x-2 text-red-600",children:[s.jsx(Rc,{className:"w-5 h-5"}),s.jsx("span",{children:"ÎιαγÏαÏή ÎογαÏιαÏμοÏ"})]}),s.jsx(go,{children:"ÎίÏÏε ÏίγοÏ
Ïοι ÏÏι θÎλεÏε να διαγÏάÏεÏε οÏιÏÏικά Ïον λογαÏιαÏÎ¼Ï ÏαÏ;"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:[s.jsx("p",{className:"text-sm text-red-800 font-medium mb-2",children:"ÎÏ
Ïή η ενÎÏγεια θα:"}),s.jsxs("ul",{className:"text-sm text-red-700 space-y-1",children:[s.jsx("li",{children:"⢠ÎιαγÏάÏει Ïλα Ïα ÏÏοÏÏÏικά ÏÎ±Ï Î´ÎµÎ´Î¿Î¼ÎÎ
735½Î±"}),s.jsx("li",{children:"⢠ÎκÏ
ÏÏÏει άμεÏα ÏÎ»ÎµÏ ÏÎ¹Ï ÏÏ
νδÏομÎÏ (ÏÏÏÎ¯Ï ÎµÏιÏÏÏοÏή ÏÏημάÏÏν)"}),s.jsx("li",{children:"⢠ÎÏαιÏÎÏει Ïην ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏÏμενο"}),s.jsx("li",{children:"⢠Îίναι μη αναÏÏÏÎÏιμη"})]})]}),s.jsxs("div",{className:"flex space-x-3",children:[s.jsx(F,{variant:"outline",onClick:()=>w(!1),className:"flex-1",children:"ÎκÏÏÏÏη"}),s.jsx(F,{variant:"destructive",onClick:()=>{w(!1),E(!0)},className:"flex-1",children:"ΣÏ
νÎÏεια"})]})]})]})}),s.jsx(gr,{open:S,onOpenChange:E,children:s.jsxs(rr,{className:"max-w-md",children:[s.jsxs($r,{children:[s.jsxs(Ur,{className:"flex items-center space-x-2 text-red-600",children:[s.jsx(jn,{className:"w-5 h-5"}),s.jsx("span",{children:"Τελική ÎÏιβεβαίÏÏη"})]}),s.jsx(go,{children:'ΠληκÏÏολογήÏÏε "DELETE" για να εÏιβεβαιÏÏεÏε Ïη διαγÏαÏή ÏοÏ
λογαÏιαÏÎ¼Î¿Ï ÏαÏ.'})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"p-4 bg-red-100 border border-red-300 rounded-lg",children:s.jsx("p",{className:"text-sm text-red-800 font-bold text-center",children:"ΠΡÎΣÎΧÎ: ÎÏ
Ïή η ενÎÏγεια δεν μÏοÏεί να αναιÏεθεί!"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"deleteConfirm",children:'ΠληκÏÏολογήÏÏε "DELETE":'}),s.jsx(ke,{id:"deleteConfirm",value:_,onChange:q=>I(q.target.value),placeholder:"DELETE",className:"text-center font-mono"})]}),s.jsxs("div",{className:"flex space-x-3",children:[s.jsx(F,{variant:"outline",onClick:()=>{E(!1),I("")},className:"flex-1",children:"ÎκÏÏÏÏη"}),s.jsx(F,{variant:"destructive",onClick:W,disabled:_!=="DELETE"||R,className:"flex-1",children:R?s.jsxs(s.Fragment,{children:[s.jsx(mt,{className:"w-4 h-4 mr-2 animate-spin"}),"ÎιαγÏαÏή..."]}):"ÎιαγÏαÏή ÎογαÏιαÏμοÏ"})]})]})]})})]})},DH=e=>{if(!e)return"text-primary";const t=e.toLowerCase();return t==="all-levels"||t==="all"||t.includes("αÏÏάÏι")||t.includes("beginner")||t.includes("εÏκολο")||t.includes("easy")||t.includes("μεÏαίο")||t.includes("intermediate")||t.includes("μÎÏÏιο")||t.includes("medium")||t.includes("ÏÏοÏÏÏημÎÎ
735½Î¿")||t.includes("advanced")||t.includes("δÏÏκολο")||t.includes("hard"),"text-primary"},LH=e=>{if(!e)return e;const t=e.toLowerCase();return t==="all-levels"||t==="all"?"All Levels":t.includes("beginner")||t.includes("εÏκολο")||t.includes("easy")?"Beginners":t.includes("intermediate")||t.includes("μÎÏÏιο")||t.includes("medium")?"Intermediate":t.includes("advanced")||t.includes("δÏÏκολο")||t.includes("hard")?"Advanced":e},sh=({title:e,overlayTitle:t,instructor:r,duration:n,thumbnail:a,onClick:i,routePrefix:o,isWatched:l,difficultyLevel:c,overlayColor:d,debugOverlays:u=!1,createdAt:m,publishedAt:f,pageType:p})=>{const v=d||"overlay-beige-orange-medium",g=V0(f,m)&&(p==="workouts"||p==="dialogismoi"||p==="breathworks");return s.jsxs("div",{className:"group/card cursor-pointer transition-transform hover:scale-[1.02]",onClick:i,children:[s.jsxs("div",{className:"relative overflow-hidden rounded-lg mb-3 aspect-video",children:[s.jsx("img",{src:a,alt:e,className:"w-full h-full object-cover transition-transform duration-500 group-hover/card:scale-110"}),s.jsx("div",{className:`absolute inset-0 ${v}`}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center px-4",children:s.jsx("h3",{className:"text-white font-bold text-center text-sm leading-tight",children:Ro(t)})}),c&&s.jsx("div",{className:"absolute top-3 left-3",children:s.jsx("div",{className:`inline-flex items-center rounded-full px-2 py-1 text-xs font-semibold ${DH(c)}`,children:LH(c)})}),s.jsxs("div",{className:"absolute top-3 right-3 flex flex-col gap-1 items-end",children:[g&&s.jsx(ye,{className:"bg-gradient-to-r from-orange-500 to-pink-600 text-white font-bold text-xs px-2 py-1",children:"NEW"}),l&&s.jsx("div",{className:"inline-flex items-center rounded-full px-2 py-1 text-xs text-white bg-background/20",children:"â Watched"})]}),s.jsx("div",{className:"absolute bottom-3 right-3",children:s.jsx(ye,{variant:"secondary",className:"bg-primary/90 text-primary-foreground text-sm font-bold px-2 py-1",children:n})})]}),s.jsxs("div",{className:"px-1",children:[s.jsx("h4",{className:"font-medium text-foreground text-xs sm:text-sm line-clamp-2 mb-1 leading-tight",children:e}),u&&s.jsx("div",{className:"mt-2 px-2 py-1 bg-yellow-100 dark:bg-yellow-900 rounded text-xs font-mono text-yellow-900 dark:text-yellow-100",children:v})]})]})},Hl=()=>{const[e,t]=h.useState(new Set),[r,n]=h.useState(!0),a=h.useCallback(async()=>{try{const{data:{user:l}}=await U.auth.getUser();if(!l){console.log("ð No user found, skipping watched videos fetch"),n(!1);return}console.log("ð Fetching watched videos for user:",l.id);const{data:c,error:d}=await U.from("user_activities").select("video_id").eq("user_id",l.id);if(d){console.error("â Error fetching watched videos:",d);return}const u=new Set((c==null?void 0:c.map(m=>m.video_id))||[]);console.log("ðº Watched video IDs fetched:",Array.from(u)),t(u)}catch(l){console.error("â Error in fetchWatchedVideos:",l)}finally{n(!1)}},[]),i=h.useCallback(()=>{a()},[a]);return h.useEffect(()=>{let l=null;(async()=>{await a();const{data:{user:u}}=await U.auth.getUser();if(!u){console.log("ð No authenticated user, skipping real-time subscription");return}console.log("ð Setting up real-time subscription for user:",u.id),l=U.channel("user-activities-changes").on("postgres_changes",{event:"INSERT",schema:"public",table:"user_activities",filter:`user_id=eq.${u.id}`},m=>{var f;console.log("ð New video activity detected for current user:",m),(f=m.new)!=null&&f.video_id&&(console.log("â Adding video to watched set:",m.new.video_id),t(p=>new Set([...p,m.new.video_id])))}).subscribe(m=>{console.log("ð¡ Real-time subscription status:",m)})})();const d=u=>{var m;console.log("ð Manual refresh triggered for video:",(m=u.detail)==null?void 0:m.videoId),i()};return window.addEventListener("videoActivityTracked",d),()=>{l&&(console.log("ð Removing real-time subscription"),U.removeChannel(l)),window.removeEventListener("videoActivityTracked",d)}},[a,i]),{isVideoWatched:l=>{const c=e.has(l);return console.log("ð Checking if video is watched:",{videoId:l,isWatched:c,totalWatched:e.size,allWatchedIds:Array.from(e)}),c},loading:r,watchedVideoIds:Array.from(e),refreshWatchedVideos:i}},Cg=({isOpen:e,onClose:t,title:r="ÎίνεÏε ÎÎÎ»Î¿Ï ÏÏα Well Be Workouts",description:n="Îε μία ÏÏ
νδÏομή αÏοκÏήÏÏε ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏ
735Ïμενο ÏοÏ
Well Be."})=>{const a=qe(),i=$s(),o=()=>{a("/subscription-plans"),t()},l=()=>{const d=i.pathname+i.search;a(`/auth?returnUrl=${encodeURIComponent(d)}`),t()},c=d=>{d||a("/"),t()};return s.jsx(gr,{open:e,onOpenChange:c,modal:!1,children:s.jsxs(rr,{className:"max-w-[95vw] sm:max-w-md p-4 sm:p-6 max-h-[85vh] overflow-y-auto !top-[55%]",overlayClassName:"bg-black/30",onInteractOutside:d=>d.preventDefault(),onEscapeKeyDown:d=>d.preventDefault(),children:[s.jsxs($r,{children:[s.jsx("div",{className:"flex items-center justify-center w-10 h-10 sm:w-12 sm:h-12 mx-auto mb-3 sm:mb-4 bg-primary/10 rounded-full",children:s.jsx(Qp,{className:"w-5 h-5 sm:w-6 sm:h-6 text-primary"})}),s.jsx(Ur,{className:"text-center",children:r}),s.jsx(go,{className:"text-center",children:n})]}),s.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[s.jsxs(oe,{className:"border-2 border-primary/20",children:[s.jsx(xe,{className:"pb-2 sm:pb-3",children:s.jsxs(be,{className:"text-lg flex items-center gap-2",children:[s.jsx(id,{className:"w-5 h-5 text-yellow-500"}),"Î ÏÏ
νδÏομή ÏεÏιλαμβάνει:"]})}),s.jsxs(ce,{className:"space-y-1.5 sm:space-y-2",children:[s.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[s.jsx("div",{className:"w-2 h-2 bg-primary rounded-full mt-1.5 flex-shrink-0"}),s.jsx("span",{children:"ÎÏεÏιÏÏιÏÏη ÏÏÏÏβαÏη Ïε Ïλα Ïα Workouts, ÎιαλογιÏμοÏÏ ÎºÎ±Î¹ Breathworks"})]}),s.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[s.jsx("div",{className:"w-2 h-2 bg-primary rounded-full mt-1.5 flex-shrink-0"}),s.jsx("span",{children:"Î Ïοβολή ÏλÏν ÏÏν podcast ÏÏÏÎ¯Ï Î´Î¹Î±ÏημίÏειÏ"})]}),s.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[s.jsx("div",{className:"w-2 h-2 bg-primary rounded-full mt-1.5 flex-shrink-0"}),s.jsx("span",{children:"Î ÏÏÏβαÏη Ïε ÏÎ»ÎµÏ ÏÎ¹Ï Ï
γιεινÎÏ ÏÏ
νÏαγÎÏ ÏÎ·Ï ÎάνÏιαÏ"})]}),s.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[s.jsx("div",{className:"w-2 h-2 bg-primary rounded-full mt-1.5 flex-shrink-0"}),s.jsx("span",{children:"ÎÏοκλειÏÏική ÏÏÏÏβαÏη ÏÏο Well Be community, ÏÏα Challenges και Ïε ÎιαγÏνιÏμοÏÏ"})]})]})]}),s.jsxs("div",{className:"space-y-2.5 sm:space-y-3",children:[s.jsxs(F,{onClick:o,className:"w-full",size:"default",children:[s.jsx(ui,{className:"w-4 h-4 mr-2"}),"ÎοκιμάÏÏε ÎÏÏεάν για 7 ημÎÏεÏ!"]}),s.jsx(F,{onClick:l,variant:"outline",className:"w-full",children:"ÎίÏÏε ήδη ÎÎλοÏ; ΣÏ
νδεθείÏε ÎδÏ"})]}),s.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"ÎίνεÏε ΣÏ
νδÏομηÏÎ®Ï Î¼Îµ 7 ημÎÏÎµÏ ÎÏÏεάν Îοκιμή. ΣÏαμαÏήÏÏε Ïη ÏÏ
νδÏομή ÏÎ±Ï Î¿ÏοιαδήÏοÏε ÏÏιγμή."})]})]})})},FH=[{id:1,title:"Sweat 16 για Ïλο Ïο ÏÏμα, με βαÏάκια (ÏÏοÏÏÏημÎÎ
735½Î¿ εÏίÏεδο) - 16 λεÏÏά",overlayTitle:"SWEAT 16 WORKOUT ÎÎ ÎÎΡÎÎÎÎ",instructor:"ÎάνÏια ÎÏοÏ
λÎ",duration:"17:14",thumbnail:vw},{id:2,title:"ÎÏκήÏÎµÎ¹Ï ÎºÎ¹Î½Î·ÏικÏÏηÏÎ±Ï Î³Î¹Î± Ïλο Ïο ÏÏμα (Ïλα Ïα εÏίÏεδα) - 30 λεÏÏά",overlayTitle:"ÎΣÎÎΣÎÎΣ ÎÎÎÎΤÎÎÎΤÎΤÎΣ ÎÎÎ ÎÎΠΤΠΣΩÎÎ",instructor:"ÎÎÏÏοινα ΧÏÏ
ÏάνθοÏ
",duration:"29:21",thumbnail:yw},{id:3,title:"ÎÏήγοÏο Workout για ÏÎÏια, με βαÏάκια (Ïλα Ïα εÏίÏεδα) - 11 λεÏÏά",overlayTitle:"ÎΡÎÎÎΡΠWORKOUT ÎÎΠΧÎΡÎÎ, ÎÎ ÎÎΡÎÎÎÎ",instructor:"ÎÎÏÏοινα ΧÏÏ
ÏάνθοÏ
",duration:"11:20",thumbnail:bw},{id:4,title:"Pilates Workout για μεÏά Ïο γÏαÏείο, για ÏμοÏ
Ï ÎºÎ±Î¹ ÏλάÏη, με λάÏÏιÏο και μÏάλα (Ïλα Ïα εÏίÏεδα) - 24 λεÏÏά",overlayTitle:"PILATES WORKOUT ÎÎÎ ÎÎΤΠΤΠÎΡÎΦÎÎÎ, ÎÎΠΩÎÎΥΣ ÎÎÎ Î ÎÎΤÎ, ÎÎ ÎÎΣΤÎΧΠÎÎÎ ÎÎ ÎÎÎ",instructor:"ÎÎÏÏοινα ΧÏÏ
ÏάνθοÏ
",duration:"24:03",thumbnail:ww},{id:5,title:"Phat Workout για ÏÎÏια, ÏλάÏη και ÏμοÏ
Ï, με βαÏάκια και λάÏÏιÏο (Ïλα Ïα εÏίÏεδα) - 22 λεÏÏά",overlayTitle:"PHAT WORKOUT ÎÎΠΧÎΡÎÎ, Î ÎÎΤΠÎÎΠΩÎÎΥΣ, ÎÎ ÎÎΡÎÎÎÎ ÎÎÎ ÎÎΣΤÎ",instructor:"ÎάνÏια ÎÏοÏ
λÎ",duration:"21:59",thumbnail:jw}],vA=({showViewAllButton:e=!0,compact:t=!1,disablePaywall:r=!1})=>{const n=qe(),[a,i]=h.useState([]),[o,l]=h.useState(!0),[c,d]=h.useState(!1),{isVideoWatched:u}=Hl(),{user:m}=jt(),{subscribed:f,isTrialUser:p,isAdminFreeAccess:v}=_i(),g=m&&(f||p||v);h.useEffect(()=>{b()},[]);const b=async()=>{try{l(!0);const{data:x,error:w}=await U.functions.invoke("get-hot-videos");if(w){console.error("Error fetching hot videos:",w),Dt.error("Failed to load hot videos");return}x!=null&&x.videos?i(x.videos):console.warn("No hot videos found in response")}catch(x){console.error("Error calling hot videos function:",x),Dt.error("Failed to load hot videos")}finally{l(!1)}},y=a.length>0?a:FH.slice(0,9);return s.jsxs("div",{className:t?"space-y-4":"space-y-6",children:[s.jsx("div",{children:s.jsxs("h2",{className:`font-bold ${t?"text-xl":"text-3xl"} text-foreground flex items-center space-x-2`,children:[s.jsx("span",{children:"ð¥"}),s.jsx("span",{children:"Hot right now!"})]})}),s.jsx("div",{className:"relative",children:s.jsxs(Ew,{opts:{loop:!0,slidesToScroll:1,align:"start"},className:"w-full",children:[s.jsx(Pw,{className:"-ml-2 md:-ml-4",children:o?Array.from({length:9}).map((x,w)=>s.jsx(ip,{className:`pl-2 md:pl-4 ${t?"basis-64":"basis-72"}`,children:s.jsxs("div",{className:"animate-pulse",children:[s.jsx("div",{className:`w-full ${t?"h-36":"h-48"} bg-muted rounded-lg mb-3`}),s.jsx("div",{className:"h-4 bg-muted rounded mb-2"}),s.jsx("div",{className:"h-3 bg-muted rounded w-3/4"})]})},w)):y.map(x=>s.jsx(ip,{className:`pl-2 md:pl-4 ${t?"basis-64":"basis-72"}`,children:s.jsx(sh,{title:x.title,overlayTitle:Ro(x.overlayTitle),instructor:x.instructor,duration:x.duration,thumbnail:x.thumbnail,difficultyLevel:x.difficultyLevel,overlayColor:x.overlayColor,onClick:()=>{var j,N;if(!r&&!g){d(!0);return}const w=((j=x.categories)==null?void 0:j.includes("recipe"))||((N=x.categories)==null?void 0:N.includes("recipes"));n(w?`/recipes/${x.id}`:`/video/${x.id}`)},isWatched:u(x.id.toString())})},x.id))}),s.jsx(Tw,{className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 -ml-6 bg-card hover:bg-muted border-border rounded-full shadow-md h-8 w-8"}),s.jsx(Aw,{className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 -mr-6 bg-card hover:bg-muted border-border rounded-full shadow-md h-8 w-8"})]})}),e&&s.jsx("div",{className:"text-center",children:s.jsx(F,{size:t?"default":"lg",className:"px-8 font-bold text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 uppercase tracking-wide",style:{backgroundColor:"#b67672"},onClick:()=>n("/catalog"),children:"ÎÎÎΤΠÎÎÎ ÎÎΣ ΤΠΠΡÎÎΡÎÎÎÎΤÎ"})}),!r&&s.jsx(Cg,{isOpen:c,onClose:()=>d(!1),title:"Premium Content",description:"Subscribe to access our full video library and exclusive content."})]})},$H=({userId:e})=>{const[t,r]=h.useState([]),[n,a]=h.useState(!0),[i,o]=h.useState(!1),[l,c]=h.useState(1),d=10,{toast:u}=at(),m=qe(),f=Wl();h.useEffect(()=>{e&&p()},[e]);const p=async()=>
735{if(e)try{a(!0);const{data:x,error:w}=await U.from("user_favorites").select("*").eq("user_id",e).order("created_at",{ascending:!1});if(w)throw w;if(x&&x.length>0){const j=x.map(R=>R.video_id),{data:N,error:S}=await U.from("videos").select("vimeo_id, title, thumbnail_url, duration_seconds, instructor, description, category, page_type").in("vimeo_id",j);if(S)throw S;const{data:E,error:_}=await U.from("video_category_assignments").select(` 736 video_id, 737 video_categories!inner ( 738 name 739 ) 740 `).in("video_id",j);if(_&&console.warn("Category data not available:",_),S)throw S;const I=x.map(R=>{const T=N==null?void 0:N.find(L=>L.vimeo_id===R.video_id),k=(E==null?void 0:E.filter(L=>L.video_id===R.video_id))||[],C=k.length>0?k.map(L=>L.video_categories.name):T!=null&&T.category?[T.category]:[],A=(T==null?void 0:T.page_type)==="recipes"?"recipe_video":(T==null?void 0:T.page_type)==="podcast"?"podcast_video":"workout_video";return{...R,activity_type:A,video_data:T?{title:T.title,thumbnail:T.thumbnail_url,duration:T.duration_seconds?`${Math.floor(T.duration_seconds/60)}:${(T.duration_seconds%60).toString().padStart(2,"0")}`:"",instructor:T.instructor||"Well Be Team",description:T.description||"",categories:C}:{title:R.video_title||"Unknown Video",thumbnail:R.video_thumbnail||"",duration:"",instructor:"Well Be Team",description:"",categories:[]}}});r(I)}else r([])}catch(x){console.error("Error fetching favorites:",x),u({title:"ΣÏάλμα",description:"Îεν ήÏαν Î´Ï Î½Î±Ïή η ÏÏÏÏÏÏη ÏÏν αγαÏημÎνÏν",variant:"destructive"})}finally{a(!1)}},v=async()=>{if(e)try{o(!0);const{error:x}=await U.from("user_favorites").delete().eq("user_id",e);if(x)throw x;r([]),u({title:"ÎÏιÏÏ Ïία",description:"Îλα Ïα αγαÏημÎνα διαγÏάÏηκαν εÏιÏÏ ÏÏÏ"})}catch(x){console.error("Error clearing favorites:",x),u({title:"ΣÏάλμα",description:"Îεν ήÏαν Î´Ï Î½Î±Ïή η διαγÏαÏή ÏÏν αγαÏημÎνÏν",variant:"destructive"})}finally{o(!1)}},g=async x=>{try{const{error:w}=await U.from("user_favorites").delete().eq("id",x);if(w)throw w;r(j=>j.filter(N=>N.id!==x)),u({title:"ÎÏιÏÏ Ïία",description:"Το βίνÏεο αÏαιÏÎθηκε αÏÏ Ïα αγαÏημÎνα"})}catch(w){console.error("Error removing favorite:",w),u({title:"ΣÏάλμα",description:"Îεν ήÏαν Î´Ï Î½Î±Ïή η αÏαίÏεÏη αÏÏ Ïα αγαÏημÎνα",variant:"destructive"})}},b=x=>{var j;const w=((j=x.video_data)==null?void 0:j.categories)||[];if(w.length>0){const N=w[0].toLowerCase();if(N.includes("recipe"))return{label:"Î£Ï Î½Ïαγή",color:"bg-green-100 text-green-800",icon:"ð½ï¸"};if(N.includes("podcast"))return{label:"Podcast",color:"bg-purple-100 text-purple-800",icon:"ð§"};if(N.includes("workout")||N.includes("fitness"))return{label:"Workouts",color:"text-amber-900",style:{backgroundColor:"#ebe8e0"},icon:"ðª"}}switch(x.activity_type){case"workout_video":return{label:"Workouts",color:"text-amber-900",style:{backgroundColor:"#ebe8e0"},icon:"ðª"};case"podcast_video":return{label:"Podcast",color:"bg-purple-100 text-purple-800",icon:"ð§"};case"recipe_video":return{label:"Î£Ï Î½Ïαγή",color:"bg-green-100 text-green-800",icon:"ð½ï¸"};default:return{label:"ÎίνÏεο",color:"bg-gray-100 text-gray-800",icon:"ð¥"}}},y=(x,w)=>{w==="workout_video"?m(`/video/${x}`):w==="podcast_video"?m(`/video/${x}`):w==="recipe_video"&&m(`/video/${x}`)};return n?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):t.length===0?s.jsxs("div",{className:"text-center py-12 space-y-4",children:[s.jsx(ws,{className:"w-16 h-16 mx-auto text-muted-foreground"}),s.jsx("h3",{className:"text-lg font-semibold text-muted-foreground",children:"Îεν Ï ÏάÏÏÎ¿Ï Î½ αγαÏημÎνα"}),s.jsx("p",{className:"text-muted-foreground",children:"Îεν ÎÏεÏε ÏÏοÏθÎÏει κάÏοιο βίνÏεο ÏÏα αγαÏημÎνα ÏÎ±Ï Î±ÎºÏμα. ÎξεÏÎµÏ Î½Î®ÏÏε Ïο ÏεÏιεÏ
740ÏÎ¼ÎµÎ½Ï Î¼Î±Ï ÎºÎ±Î¹ ÏÏοÏθÎÏÏε Ïα αγαÏημÎνα ÏαÏ!"}),s.jsx(F,{onClick:()=>m("/catalog"),className:"mt-4",children:"ÎξεÏεÏ
νήÏÏε ÎίνÏεο"})]}):s.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[s.jsxs("div",{className:`${f?"flex-col space-y-3":"flex items-center justify-between"}`,children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(ws,{className:"w-5 h-5 text-red-500"}),s.jsxs("span",{className:`${f?"text-base":"text-lg"} font-semibold`,children:[t.length," αγαÏημÎνα βίνÏεο"]})]}),s.jsxs(si,{children:[s.jsx(ri,{asChild:!0,children:s.jsxs(F,{variant:"outline",size:f?"default":"sm",className:`text-red-600 hover:text-red-700 ${f?"w-full min-h-[44px]":""}`,children:[s.jsx(jn,{className:"w-4 h-4 mr-2"}),"ÎιαγÏαÏή ÎλÏν"]})}),s.jsxs(ya,{children:[s.jsxs(ba,{children:[s.jsx(ja,{children:"ÎιαγÏαÏή ÎγαÏημÎνÏν"}),s.jsx(Na,{children:"ÎίÏÏε ÏίγοÏ
Ïοι ÏÏι θÎλεÏε να διαγÏάÏεÏε Ïλα Ïα αγαÏημÎνα βίνÏεο; ÎÏ
Ïή η ενÎÏγεια δεν μÏοÏεί να αναιÏεθεί."})]}),s.jsxs(wa,{children:[s.jsx(ka,{children:"ÎκÏÏÏÏη"}),s.jsx(_a,{onClick:v,disabled:i,className:"bg-red-600 hover:bg-red-700",children:i?"ÎιαγÏαÏή...":"ÎιαγÏαÏή ÎλÏν"})]})]})]})]}),s.jsx("div",{className:`${f?"space-y-3":"space-y-2"}`,children:t.slice((l-1)*d,l*d).map(x=>{var N,S,E,_,I,R,T,k;const w=b(x),j=x.activity_type==="recipe_video";return s.jsx(oe,{className:"group hover:shadow-md transition-all duration-300 overflow-hidden",children:s.jsx("div",{className:`${f?"flex-col space-y-3 p-3":"flex items-center p-4 space-x-4"}`,children:f?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsxs("div",{className:"relative flex-shrink-0 w-20 h-14 sm:w-24 sm:h-16 rounded overflow-hidden",children:[s.jsx("img",{src:((N=x.video_data)==null?void 0:N.thumbnail)||x.video_thumbnail||"",alt:((S=x.video_data)==null?void 0:S.title)||x.video_title||"Video thumbnail",className:`w-full h-full rounded object-cover ${j?"scale-[2.8] object-center":""}`}),s.jsx("div",{className:"absolute inset-0 overlay-beige-orange-medium"}),((E=x.video_data)==null?void 0:E.duration)&&s.jsxs("div",{className:"absolute bottom-0.5 right-0.5 bg-black/70 text-white px-1 py-0.5 rounded text-xs flex items-center z-10",children:[s.jsx(Ms,{className:"w-2 h-2 mr-0.5"}),x.video_data.duration]}),s.jsx("div",{className:"absolute top-0.5 right-0.5 z-10",children:s.jsx(ws,{className:"w-3 h-3 text-red-500 fill-red-500"})})]}),s.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[s.jsx("h3",{className:"font-semibold text-sm line-clamp-2",children:((_=x.video_data)==null?void 0:_.title)||x.video_title}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Î ÏοÏÏÎθηκε ÏÏÎ¹Ï ",new Date(x.created_at).toLocaleDateString("el-GR",{day:"numeric",month:"short",year:"numeric"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(ye,{className:`${w.color} text-xs w-fit`,style:w.style,children:[w.icon," ",w.label]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(F,{size:"sm",onClick:()=>y(x.video_id,x.activity_type),className:"flex-1 min-h-[40px]",children:[s.jsx(Os,{className:"w-4 h-4 mr-1"}),"ÎείÏε Îανά"]}),s.jsxs(F,{size:"sm",variant:"outline",onClick:()=>g(x.id),className:"flex-1 min-h-[40px] text-red-600 hover:text-red-700",children:[s.jsx(w_,{className:"w-4 h-4 mr-1"}),"ÎÏαίÏεÏη"]})]})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative flex-shrink-0 w-24 h-16 rounded overflow-hidden",children:[s.jsx("img",{src:((I=x.video_data)==null?void 0:I.thumbnail)||x.video_thumbnail||"",alt:((R=x.video_data)==null?void 0:R.title)||x.video_title||"Video thumbnail",className:`w-24 h-16 rounded object-cover ${j?"scale-[2.8] object-center":""}`}),s.jsx("div",{className:"absolute inset-0 overlay-beige-orange-medium"}),((T=x.video_data)==null?void 0:T.duration)&&s.jsxs("div",{className:"absolute bottom-1 right-1 bg-black/70 text-white px-1 py-0.5 rounded text-xs flex items-center z-10",children:[s.jsx(Ms,{className:"w-2 h-2 mr-0.5"}),x.video_data.duration]}),s.jsx("div",{className:"absolute top-1 right-1 z-10",children:s.jsx(ws,{className:"w-4 h-4 text-red-500 fill-red-500"})})]}),s.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[s.jsx("h3",{className:"font-semibold text-sm line-clamp-2 pr-2",children:((k=x.video_data)==null?void 0:k.title)||x.video_title}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Î ÏοÏÏÎθηκε ÏÏÎ¹Ï ",new Date(x.created_at).toLocaleDateString("el-GR",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),s.jsxs("div",{className:"flex items-center space-x-2 flex-shrink-0",children:[s.jsxs(ye,{className:`${w.color}`,style:w.style,children:[w.icon," ",w.label]}),s.jsxs(F,{size:"sm",onClick:()=>y(x.video_id,x.activity_type),className:"opacity-70 group-hover:opacity-100 transition-opacity",children:[s.jsx(Os,{className:"w-4 h-4 mr-1"}),"ÎείÏε Îανά"]}),s.jsxs(F,{size:"sm",variant:"outline",onClick:()=>g(x.id),className:"opacity-70 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",children:[s.jsx(w_,{className:"w-4 h-4 mr-1"}),"ÎÏαίÏεÏη"]})]})]})})},x.id)})}),t.length>d&&s.jsx("div",{className:"flex justify-center mt-6",children:s.jsx(Od,{children:s.jsxs(Dd,{children:[s.jsx(Ds,{children:s.jsx(Fd,{onClick:()=>c(x=>Math.max(x-1,1)),className:l===1?"pointer-events-none opacity-50":"cursor-pointer"})}),s.jsx(Ds,{children:s.jsxs("span",{className:"px-4 py-2 text-sm",children:["Σελίδα ",l," αÏÏ ",Math.ceil(t.length/d)]})}),s.jsx(Ds,{children:s.jsx($d,{onClick:()=>c(x=>Math.min(x+1,Math.ceil(t.length/d))),className:l===Math.ceil(t.length/d)?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]})},UH=e=>{if(!e)return 32;const t=e.matchAll(/(?:sm:|md:|lg:|xl:|2xl:)?(?:h|w)-(\d+)/g);let r=32;for(const n of t){const a=parseInt(n[1])*4;a>r&&(r=a)}return r},BH=e=>e<=24?{size:"w-2.5 h-2.5",emoji:"text-[8px]",position:"-bottom-0 -right-0"}:e<=32?{size:"w-3 h-3",emoji:"text-[9px]",position:"-bottom-0 -right-0"}:e<=48?{size:"w-3.5 h-3.5",emoji:"text-[10px]",position:"-bottom-0 -right-0"}:e<=80?{size:"w-5 h-5",emoji:"text-xs",position:"-bottom-0.5 -right-0.5"}:{size:"w-7 h-7",emoji:"text-base",position:"-bottom-1 -right-1"},lk=["bg-gradient-to-br from-rose-200 to-rose-300","bg-gradient-to-br from-amber-200 to-orange-300","bg-gradient-to-br from-lime-200 to-green-300","bg-gradient-to-br from-cyan-200 to-sky-300","bg-gradient-to-br from-violet-200 to-purple-300","bg-gradient-to-br from-fuchsia-200 to-pink-300","bg-gradient-to-br from-teal-200 to-emerald-300","bg-gradient-to-br from-indigo-200 to-blue-300","bg-gradient-to-br from-yellow-200 to-amber-300","bg-gradient-to-br from-slate-200 to-gray-300"],zH=e=>{let t=0;for(let r=0;r<e.length;r++)t=e.charCodeAt(r)+((t<<5)-t);return lk[Math.abs(t)%lk.length]},Po=({userId:e,avatarUrl:t,firstName:r,lastName:n,email:a,className:i,showOnlineStatus:o=!0,children:l,onClick:c})=>{const d=UH(i),u=BH(d),[m,f]=h.useState(null),[p,v]=h.useState(!0),{registerBadgeComponent:g,unregisterBadgeComponent:b}=tP(),{isUserOnline:y}=pw();h.useEffect(()=>{if(e)return x(),g(e,x),()=>{b(e,x)}},[e,g,b]);const x=async()=>{try{v(!0),f(null);const{data:N,error:S}=await U.rpc("get_assigned_user_badge",{_user_id:e});if(S)throw S;if(N&&N.length>0)f(N[0]);else{const{data:E,error:_}=await U.rpc("get_user_badge",{_user_id:e});if(_)throw _;E&&E.length>0?f(E[0]):f(null)}}catch(N){console.error("Error fetching user badge:",N),f(null)}finally{v(!1)}},w=()=>r&&n?`${r[0]}${n[0]}`.toUpperCase():r?r[0].toUpperCase():a?a[0].toUpperCase():"U",j=o&&y(e);return s.jsxs("div",{className:"relative inline-block",children:[s.jsxs(to,{className:me(i),onClick:c,children:[t?s.jsx(so,{src:t,alt:"Avatar"}):s.jsx(ro,{className:me(zH(e),"text-slate-700 text-4xl font-bold"),children:w()}),l]}),j&&s.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-green-500 border-2 border-background rounded-full z-20"}),!p&&m&&m.badge_name!=="No Badge"&&s.jsx("div",{className:`absolute rounded-full flex items-center justify-center z-10 ${u.position} ${u.size} bg-background/95 border border-border/50 shadow-sm`,children:s.jsx("span",{className:`leading-none ${u.emoji}`,children:m.badge_emoji})})]})},ck=({userId:e,className:t,showMessage:r=!1,size:n="md",textSize:a="md"})=>{const[i,o]=h.useState(null),[l,c]=h.useState(!0);h.useEffect(()=>{e&&d()},[e]);const d=async()=>{try{c(!0);const{data:p,error:v}=await U.rpc("get_assigned_user_badge",{_user_id:e});if(v)throw v;if(p&&p.length>0)o(p[0]);else{const{data:g,error:b}=await U.rpc("get_user_badge",{_user_id:e});if(b)throw b;g&&g.length>0&&o(g[0])}}catch(p){console.error("Error fetching user badge:",p)}finally{c(!1)}},u=()=>{switch(n){case"sm":return"text-sm p-1";case"lg":return"text-lg p-3";default:return"text-base p-2"}},m=p=>{switch(p){case"ð":return"bg-gradient-to-r from-orange-200/30 via-amber-200/30 to-orange-300/30 border-orange-300/40";case"ð":return"bg-gradient-to-r from-slate-200/30 via-gray-200/30 to-slate-300/30 border-slate-300/40";case"ð":return"bg-gradient-to-r from-yellow-200/30 via-amber-200/30 to-yellow-300/30 border-yellow-400/40";default:return"bg-gradient-to-r from-primary/10 via-secondary/10 to-accent/10 border-primary/20"}};if(l)return s.jsxs("div",{className:me("inline-flex items-center gap-2 rounded-full bg-muted animate-pulse",u(),t),children:[s.jsx("div",{className:"w-4 h-4 bg-muted-foreground
740/20 rounded-full"}),s.jsx("div",{className:"w-12 h-3 bg-muted-foreground/20 rounded"})]});if(!i||i.badge_name==="No Badge")return null;const f=()=>{switch(a){case"xs":return"text-xs font-normal";case"sm":return"text-sm font-normal";case"lg":return"text-lg font-semibold";default:return"text-base font-medium"}};return s.jsx("div",{className:me("space-y-2 flex justify-center",t),children:r&&i.badge_description&&s.jsx("div",{className:"relative inline-block",children:s.jsx("div",{className:`${m(i.badge_emoji)} border rounded-lg p-2 sm:p-3 shadow-sm w-fit max-w-full`,children:s.jsx("p",{className:`${f()} text-foreground leading-relaxed text-center sm:whitespace-nowrap`,children:i.badge_description})})})})};function Je(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 Gr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Js(e,t){const r=Je(e);return isNaN(t)?Gr(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function ia(e,t){const r=Je(e);if(isNaN(t))return Gr(e,NaN);if(!t)return r;const n=r.getDate(),a=Gr(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return n>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),n),r)}const nj=6048e5,WH=864e5,VH=6e4,HH=36e5,Hh=43200,dk=1440;let qH={};function Ud(){return qH}function Ua(e,t){var l,c,d,u;const r=Ud(),n=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,a=Je(e),i=a.getDay(),o=(i<n?7:0)+i-n;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function Il(e){return Ua(e,{weekStartsOn:1})}function yA(e){const t=Je(e),r=t.getFullYear(),n=Gr(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const a=Il(n),i=Gr(e,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const o=Il(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function xd(e){const t=Je(e);return t.setHours(0,0,0,0),t}function vd(e){const t=Je(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Xn(e,t){const r=xd(e),n=xd(t),a=+r-vd(r),i=+n-vd(n);return Math.round((a-i)/WH)}function GH(e){const t=yA(e),r=Gr(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Il(r)}function hb(e,t){const r=t*7;return Js(e,r)}function YH(e,t){return ia(e,t*12)}function KH(e){let t;return e.forEach(function(r){const n=Je(r);(t===void 0||t<n||isNaN(Number(n)))&&(t=n)}),t||new Date(NaN)}function QH(e){let t;return e.forEach(r=>{const n=Je(r);(!t||t>n||isNaN(+n))&&(t=n)}),t||new Date(NaN)}function pf(e,t){const r=Je(e),n=Je(t),a=r.getTime()-n.getTime();return a<0?-1:a>0?1:a}function XH(e){return Gr(e,Date.now())}function Mr(e,t){const r=xd(e),n=xd(t);return+r==+n}function aj(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function JH(e){if(!aj(e)&&typeof e!="number")return!1;const t=Je(e);return!isNaN(Number(t))}function yd(e,t){const r=Je(e),n=Je(t),a=r.getFullYear()-n.getFullYear(),i=r.getMonth()-n.getMonth();return a*12+i}function ZH(e,t,r){const n=Ua(e,r),a=Ua(t,r),i=+n-vd(n),o=+a-vd(a);return Math.round((i-o)/nj)}function bA(e,t){const r=Je(e),n=Je(t),a=uk(r,n),i=Math.abs(Xn(r,n));r.setDate(r.getDate()-a*i);const o=+(uk(r,n)===-a),l=a*(i-o);return l===0?0:l}function uk(e,t){const r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function ij(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function oj(e,t){return+Je(e)-+Je(t)}function wA(e,t,r){const n=oj(e,t)/HH;return ij(r==null?void 0:r.roundingMethod)(n)}function jA(e,t,r){const n=oj(e,t)/VH;return ij(r==null?void 0:r.roundingMethod)(n)}function eq(e){const t=Je(e);return t.setHours(23,59,59,999),t}function Eg(e){const t=Je(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function tq(e){const t=Je(e);return+eq(t)==+Eg(t)}
vendor: 14,637 bytes, line 740
740function sq(e,t){const r=Je(e),n=Je(t),a=pf(r,n),i=Math.abs(yd(r,n));let o;if(i<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-a*i);let l=pf(r,n)===-a;tq(Je(e))&&i===1&&pf(e,n)===1&&(l=!1),o=a*(i-Number(l))}return o===0?0:o}function lj(e,t,r){const n=oj(e,t)/1e3;return ij(r==null?void 0:r.roundingMethod)(n)}function Br(e){const t=Je(e);return t.setDate(1),t.setHours(0,0,0,0),t}function NA(e){const t=Je(e),r=Gr(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function cj(e,t){var l,c,d,u;const r=Ud(),n=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,a=Je(e),i=a.getDay(),o=(i<n?-7:0)+6-(i-n);return a.setDate(a.getDate()+o),a.setHours(23,59,59,999),a}function _A(e){return cj(e,{weekStartsOn:1})}const rq={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"}},nq=(e,t,r)=>{let n;const a=rq[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Zx(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const aq={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},iq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},oq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lq={date:Zx({formats:aq,defaultWidth:"full"}),time:Zx({formats:iq,defaultWidth:"full"}),dateTime:Zx({formats:oq,defaultWidth:"full"})},cq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dq=(e,t,r,n)=>cq[e];function eu(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):o;a=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const uq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hq={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"]},fq={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},pq={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"}},gq={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"}},xq=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},vq={ordinalNumber:xq,era:eu({values:uq,defaultWidth:"wide"}),quarter:eu({values:mq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:eu({values:hq,defaultWidth:"wide"}),day:eu({values:fq,defaultWidth:"wide"}),dayPeriod:eu({values:pq,defaultWidth:"wide",formattingValues:gq,defaultFormattingWidth:"wide"})};function tu(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const o=i[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?bq(l,m=>m.test(o)):yq(l,m=>m.test(o));let d;d=e.valueCallback?e.valueCallback(c):c,d=r.valueCallback?r.valueCallback(d):d;const u=t.slice(o.length);return{value:d,rest:u}}}function yq(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function bq(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function wq(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;const l=t.slice(a.length);return{value:o,rest:l}}}const jq=/^(\d+)(th|st|nd|rd)?/i,Nq=/\d+/i,_q={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},kq={any:[/^b/i,/^(a|c)/i]},Sq={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Cq={any:[/1/i,/2/i,/3/i,/4/i]},Eq={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},Pq={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]},Tq={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},Aq={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]},Iq={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},Rq={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}},Mq={ordinalNumber:wq({matchPattern:jq,parsePattern:Nq,valueCallback:e=>parseInt(e,10)}),era:tu({matchPatterns:_q,defaultMatchWidth:"wide",parsePatterns:kq,defaultParseWidth:"any"}),quarter:tu({matchPatterns:Sq,defaultMatchWidth:"wide",parsePatterns:Cq,defaultParseWidth:"any",valueCallback:e=>e+1}),month:tu({matchPatterns:Eq,defaultMatchWidth:"wide",parsePatterns:Pq,defaultParseWidth:"any"}),day:tu({matchPatterns:Tq,defaultMatchWidth:"wide",parsePatterns:Aq,defaultParseWidth:"any"}),dayPeriod:tu({matchPatterns:Iq,defaultMatchWidth:"any",parsePatterns:Rq,defaultParseWidth:"any"})},dj={code:"en-US",formatDistance:nq,formatLong:lq,formatRelative:dq,localize:vq,match:Mq,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Oq(e){const t=Je(e);return Xn(t,NA(t))+1}function kA(e){const t=Je(e),r=+Il(t)-+GH(t);return Math.round(r/nj)+1}function SA(e,t){var u,m,f,p;const r=Je(e),n=r.getFullYear(),a=Ud(),i=(t==null?void 0:t.firstWeekContainsDate)??((m=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(f=a.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,o=Gr(e,0);o.setFullYear(n+1,0,i),o.setHours(0,0,0,0);const l=Ua(o,t),c=Gr(e,0);c.setFullYear(n,0,i),c.setHours(0,0,0,0);const d=Ua(c,t);return r.getTime()>=l.getTime()?n+1:r.getTime()>=d.getTime()?n:n-1}function Dq(e,t){var l,c,d,u;const r=Ud(),n=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,a=SA(e,t),i=Gr(e,0);return i.setFullYear(a,0,n),i.setHours(0,0,0,0),Ua(i,t)}function CA(e,t){const r=Je(e),n=+Ua(r,t)-+Dq(r,t);return Math.round(n/nj)+1}function It(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Mi={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return It(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):It(r+1,2)},d(e,t){return It(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return It(e.getHours()%12||12,t.length)},H(e,t){return It(e.getHours(),t.length)},m(e,t){return It(e.getMinutes(),t.length)},s(e,t){return It(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return It(a,t.length)}},oc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},mk={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return Mi.y(e,t)},Y:function(e,t,r,n){const a=SA(e,n),i=a>0?a:1-a;if(t==="YY"){const o=i%100;return It(o,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):It(i,t.length)},R:function(e,t){const r=yA(e);return It(r,t.length)},u:function(e,t){const r=e.getFullYear();return It(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return It(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return It(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Mi.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return It(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=CA(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):It(a,t.length)},I:function(e,t,r){const n=kA(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):It(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Mi.d(e,t)},D:function(e,t,r){const n=Oq(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):It(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return It(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return It(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return It(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=oc.noon:n===0?a=oc.midnight:a=n/12>
vendor: 4,371 bytes, line 740
740=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=oc.evening:n>=12?a=oc.afternoon:n>=4?a=oc.morning:a=oc.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Mi.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Mi.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):It(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):It(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Mi.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Mi.s(e,t)},S:function(e,t){return Mi.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return fk(n);case"XXXX":case"XX":return Zo(n);case"XXXXX":case"XXX":default:return Zo(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return fk(n);case"xxxx":case"xx":return Zo(n);case"xxxxx":case"xxx":default:return Zo(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hk(n,":");case"OOOO":default:return"GMT"+Zo(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hk(n,":");case"zzzz":default:return"GMT"+Zo(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return It(n,t.length)},T:function(e,t,r){const n=e.getTime();return It(n,t.length)}};function hk(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return i===0?r+String(a):r+String(a)+t+It(i,2)}function fk(e,t){return e%60===0?(e>0?"-":"+")+It(Math.abs(e)/60,2):Zo(e,t)}function Zo(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=It(Math.trunc(n/60),2),i=It(n%60,2);return r+a+t+i}const pk=(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"})}},EA=(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"})}},Lq=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return pk(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",pk(n,t)).replace("{{time}}",EA(a,t))},Fq={p:EA,P:Lq},$q=/^D+$/,Uq=/^Y+$/,Bq=["D","DD","YY","YYYY"];function zq(e){return $q.test(e)}function Wq(e){return Uq.test(e)}function Vq(e,t,r){const n=Hq(e,t,r);if(console.warn(n),Bq.includes(e))throw new RangeError(n)}function Hq(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const qq=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Gq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yq=/^'([^]*?)'?$/,Kq=/''/g,Qq=/[a-zA-Z]/;function fr(e,t,r){var u,m,f,p,v,g,b,y;const n=Ud(),a=(r==null?void 0:r.locale)??n.locale??dj,i=(r==null?void 0:r.firstWeekContainsDate)??((m=(u=r==null?void 0:r.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(f=n.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,o=(r==null?void 0:r.weekStartsOn)??((g=(v=r==null?void 0:r.locale)==null?void 0:v.options)==null?void 0:g.weekStartsOn)??n.weekStartsOn??((y=(b=n.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0,l=Je(e);
740if(!JH(l))throw new RangeError("Invalid time value");let c=t.match(Gq).map(x=>{const w=x[0];if(w==="p"||w==="P"){const j=Fq[w];return j(x,a.formatLong)}return x}).join("").match(qq).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:Xq(x)};if(mk[w])return{isToken:!0,value:x};if(w.match(Qq))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:x}});a.localize.preprocessor&&(c=a.localize.preprocessor(l,c));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return c.map(x=>{if(!x.isToken)return x.value;const w=x.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&Wq(w)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&zq(w))&&Vq(w,t,String(e));const j=mk[w[0]];return j(l,w,a.localize,d)}).join("")}function Xq(e){const t=e.match(Yq);return t?t[1].replace(Kq,"'"):e}function Jq(e,t,r){const n=Ud(),a=(r==null?void 0:r.locale)??n.locale??dj,i=2520,o=pf(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const l=Object.assign({},r,{addSuffix:r==null?void 0:r.addSuffix,comparison:o});let c,d;o>0?(c=Je(t),d=Je(e)):(c=Je(e),d=Je(t));const u=lj(d,c),m=(vd(d)-vd(c))/1e3,f=Math.round((u-m)/60);let p;if(f<2)return r!=null&&r.includeSeconds?u<5?a.formatDistance("lessThanXSeconds",5,l):u<10?a.formatDistance("lessThanXSeconds",10,l):u<20?a.formatDistance("lessThanXSeconds",20,l):u<40?a.formatDistance("halfAMinute",0,l):u<60?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",1,l):f===0?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",f,l);if(f<45)return a.formatDistance("xMinutes",f,l);if(f<90)return a.formatDistance("aboutXHours",1,l);if(f<dk){const v=Math.round(f/60);return a.formatDistance("aboutXHours",v,l)}else{if(f<i)return a.formatDistance("xDays",1,l);if(f<Hh){const v=Math.round(f/dk);return a.formatDistance("xDays",v,l)}else if(f<Hh*2)return p=Math.round(f/Hh),a.formatDistance("aboutXMonths",p,l)}if(p=sq(d,c),p<12){const v=Math.round(f/Hh);return a.formatDistance("xMonths",v,l)}else{const v=p%12,g=Math.trunc(p/12);return v<3?a.formatDistance("aboutXYears",g,l):v<9?a.formatDistance("overXYears",g,l):a.formatDistance("almostXYears",g+1,l)}}function fb(e,t){return Jq(e,XH(e),t)}function Zq(e){const t=Je(e),r=t.getFullYear(),n=t.getMonth(),a=Gr(e,0);return a.setFullYear(r,n+1,0),a.setHours(0,0,0,0),a.getDate()}function eG(e){return Math.trunc(+Je(e)/1e3)}function tG(e){const t=Je(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function sG(e,t){return ZH(tG(e),Br(e),t)+1}function yl(e,t){const r=Je(e),n=Je(t);return r.getTime()>n.getTime()}function Fc(e,t){const r=Je(e),n=Je(t);return+r<+n}function uj(e,t){const r=Je(e),n=Je(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function rG(e,t){const r=Je(e),n=Je(t);return r.getFullYear()===n.getFullYear()}function ev(e,t){return Js(e,-t)}function tv(e,t){const r=Je(e),n=r.getFullYear(),a=r.getDate(),i=Gr(e,0);i.setFullYear(n,t,15),i.setHours(0,0,0,0);const o=Zq(i);return r.setMonth(t,Math.min(a,o)),r}function gk(e,t){const r=Je(e);return isNaN(+r)?Gr(e,NaN):(r.setFullYear(t),r)}function Fo(){const e=qe(),[t,r]=h.useState(null),[n,a]=h.useState(!0),[i,o]=h.useState(!0),[l,c]=h.useState("");h.useEffect(()=>{d()},[]),h.useEffect(()=>{if(t){const v=setInterval(u,1e3);return()=>clearInterval(v)}},[t]);const d=async()=>{try{const{data:v,error:g}=await U.from("challenges").select("*").eq("is_active",!0).order("start_date",{ascending:!1});if(g)throw g;if(v&&v.length>0){const b=new Date,y=v.find(x=>{const w=new Date(x.end_date);return Fc(b,w)});y&&r(y)}}catch(v){console.error("Error fetching active challenge:",v)}finally{o(!1)}},u=()=>{if(!t)return;const v=new Date,g=new Date(t.start_date),b=new Date(t.end_date);let y,x;if(Fc(v,g))y=g,x="Starts in";else if(Fc(v,b))y=b,x="Ends in";else{c("Challenge Ended");return}const w=bA(y,v),j=wA(y,v)%24,N=jA(y,v)%60,S=lj(y,v)%60;c(`${x}: ${w}d ${j}h ${N}m ${S}s`)},m=()=>{e("/challenges")},f=()=>{console.log("Challenge banner dismiss clicked"),a(!1)};if(i||!t||!n)return null;const p=yl(new Date,new Date(t.start_date));return s.jsx("div",{className:"w-full mb-6 animate-fade-in",children:s.jsxs("div",{className:"relative overflow-hidden rounded-xl bg-gradient-to-br from-slate-800 via-slate-700 to-slate-900 shadow-2xl",children:[t.banner_url&&s.jsx("img",{src:t.banner_url,alt:"Challenge Banner",className:"absolute inset-0 w-full h-full object-cover mix-blend-overlay opacity-30"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-slate-900/40 via-slate-800/40 to-slate-900/40"}),s.jsx("button",{onClick:f,className:"absolute top-4 right-4 text-white/70 hover:text-white transition-colors bg-black/30 rounded-full w-8 h-8 flex items-center justify-center hover:bg-black/50 z-20","aria-label":"Dismiss banner",style:{zIndex:20},children:s.jsx(qr,{className:"h-4 w-4"})}),s.jsx("div",{className:"relative z-10 p-4 sm:p-6 text-white",children:s.jsxs("div",{className:"flex flex-col lg:grid lg:grid-cols-3 items-center gap-4 lg:gap-6",children:[s.jsxs("div",{className:"text-center lg:text-left",children:[s.jsxs("div",{className:"flex items-center justify-center lg:justify-start gap-2 mb-2",children:[s.jsx(ss,{className:"h-5 w-5 sm:h-6 sm:w-6 text-yellow-500 animate-pulse"}),s.jsx("h2",{className:"text-base sm:text-lg font-bold bg-gradient-to-r from-yellow-500 to-yellow-600 bg-clip-text text-transparent",children:"NEW CHALLENGE"})]}),s.jsx("h3",{className:"text-sm sm:text-base font-semibold text-white/95",children:t.title})]}),s.jsx("div",{className:"text-center",children:p?s.jsxs("div",{className:"flex items-center justify-center gap-2 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-sm sm:text-lg font-bold text-white",children:"LIVE NOW!"}),s.jsx("span",{className:"animate-pulse",children:"â¡"})]}),s.jsx("span",{className:"text-sm sm:text-lg font-mono font-bold bg-gradient-to-r from-yellow-500 to-yellow-600 bg-clip-text text-transparent",children:l.replace(/^(Starts in|Ends in):\s*/,"")})]}):s.jsxs("div",{className:"flex flex-col items-center gap-1",children:[s.jsx("span",{className:"text-sm sm:text-lg font-bold text-white",children:"STARTS IN:"}),s.jsx("span",{className:"text-sm sm:text-lg font-mono font-bold bg-gradient-to-r from-yellow-500 to-yellow-600 bg-clip-text text-transparent",children:l.replace(/^(Starts in|Ends in):\s*/,"")})]})}),s.jsx("div",{className:"text-center lg:text-right w-full lg:w-auto",children:s.jsx(F,{onClick:m,className:"bg-gradient-to-r from-yellow-500 to-yellow-600 text-slate-900 hover:from-yellow-600 hover:to-yellow-700 font-bold px-4 sm:px-6 py-2 rounded-full shadow-lg transform hover:scale-105 transition-all duration-200 text-sm sm:text-base",children:"JOIN NOW!"})})]})})]})})}const nG=()=>{const{user:e,signOut:t,loading:r,session:n}=jt(),{subscribed:a,isTrialUser:i,subscriptionTier:o,subscriptionEnd:l,trialEnd:c,checkSubscription:d,isProfileComplete:u,isAdminFreeAccess:m}=_i(),{toast:f}=at(),p=qe(),v=$s(),g=Wl(),{isMobileApp:b}=ar(),[y,x]=h.useState(null),[w,j]=h.useState(null),[N,S]=h.useState(!1),[E,_]=h.useState(!1),[I,R]=h.useState(!1),[T,k]=h.useState(!1),[C,A]=h.useState("overview"),[L,O]=h.useState(!1);h.useEffect(()=>{console.log("ð Dashboard useEffect triggered:",{pathname:v.pathname,search:v.search,user:!!e,loading:r,userEmail:e==null?void 0:e.email});const H=new URLSearchParams(v.search),se=H.get("payment"),te=H.get("email"),B=H.get("tab"),le=H.get("section");if(se==="success"&&te){console.log("ð Payment success flow triggered"),P(te),p("/dashboard",{replace:!0});return}if(!r&&!e){console.log("ð No user found, redirecting to auth");try{Object.keys(sessionStorage).forEach(K=>{K.startsWith("profile_cache_")&&sessionStorage.removeItem(K)})}catch(J){console.error("Error clearing profile cache:",J)}p("/auth");return}e&&(console.log("ð User found, fetching profile and stats"),M(),$(),B&&["overview","history","favorites","invoices","profile"].includes(B)&&(console.log("ð Setting active tab from URL:",B),A(B),le==="billing"&&B==="invoices"&&setTimeout(()=>
740{const J=document.getElementById("subscription-management");J&&J.scrollIntoView({behavior:"smooth",block:"start"})},100)))},[e,r,p,v.search]);const P=async H=>{try{const{error:se}=await U.auth.resetPasswordForEmail(H,{redirectTo:`${window.location.origin}/set-password`});se&&console.log("Error sending password reset",se.message),f({title:"ÎÏιÏÏ
ÏÎ®Ï ÏληÏÏμή!",description:"ΠλογαÏιαÏμÏÏ ÏÎ±Ï Î´Î·Î¼Î¹Î¿Ï
Ïγήθηκε. ÎλÎγξÏε Ïο email ÏÎ±Ï Î³Î¹Î± να οÏίÏεÏε κÏÎ´Î¹ÎºÏ ÏÏÏÏβαÏÎ·Ï ÎºÎ±Î¹ να ÏÏ
νδεθείÏε."})}catch{f({title:"ΣÏάλμα",description:"Î¥ÏήÏξε ÏÏÏβλημα με Ïη ÏÏνδεÏη. ΠαÏÎ±ÎºÎ±Î»Ï ÎµÎ»ÎγξÏε Ïο email ÏÎ±Ï Î³Î¹Î± οδηγίεÏ.",variant:"destructive"})}},M=async()=>{if(!e)return;const H=`profile_cache_${e.id}`,se=sessionStorage.getItem(H);if(se)try{const{profile:te,timestamp:B}=JSON.parse(se),le=Date.now()-B,J=24*60*60*1e3;if(le<J){x(te),_(!0),D(!1);return}}catch(te){console.error("Error reading profile cache:",te)}E||S(!0),await D(!0)},D=async H=>{if(e)try{const{data:se,error:te}=await U.from("profiles").select("*").eq("user_id",e.id).maybeSingle();if(te)throw te;x(se);const B=`profile_cache_${e.id}`;sessionStorage.setItem(B,JSON.stringify({profile:se,timestamp:Date.now()})),_(!0)}catch(se){console.error("Error fetching profile:",se),f({title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ÏÏÏÏÏÏη ÏοÏ
ÏÏοÏίλ",variant:"destructive"})}finally{H&&S(!1)}},$=async()=>{if(e)try{const{data:H,error:se}=await U.rpc("get_user_activity_stats",{_user_id:e.id});if(se)throw se;H&&H.length>0&&j({workouts_done:Number(H[0].workouts_done),podcasts_heard:Number(H[0].podcasts_heard),recipes_done:Number(H[0].recipes_done),posts_made:Number(H[0].posts_made),posts_liked:Number(H[0].posts_liked)})}catch(H){console.error("Error fetching activity stats:",H),j({workouts_done:0,podcasts_heard:0,recipes_done:0,posts_made:0,posts_liked:0})}},W=(H,se)=>{x(te=>te?{...te,avatar_url:H,avatar_type:se}:null)},X=H=>{x(H)},q=()=>y?y.nickname?y.nickname:y.first_name||y.last_name?`${y.first_name||""} ${y.last_name||""}`.trim():y.email||"ÎÎλοÏ":"ÎÎλοÏ";return r||N?s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("img",{src:"/lovable-uploads/463c9522-3313-4588-bd87-40273096d456.png",alt:"Well Be",className:"h-16 mx-auto mb-4"}),s.jsx("p",{className:"text-muted-foreground",children:"ΦÏÏÏÏÏη..."})]})}):e?s.jsxs("div",{className:"min-h-screen bg-background",children:[b?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:I,onMenuToggle:()=>R(!I)}),s.jsx("main",{className:`container mx-auto px-4 sm:px-6 py-4 sm:py-8 ${b?"pt-6":"pt-8 sm:pt-12"}`,children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsx("div",{className:"mb-6 sm:mb-8 animate-fade-in",children:s.jsxs(oe,{className:`bg-card shadow-lg hover:shadow-xl transition-all duration-300 overflow-hidden relative ${b?"bg-gradient-to-br from-primary/5 via-background to-primary/10 border-primary/20":"border-border"}`,children:[!b&&s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-muted/30 via-muted/20 to-accent/30"}),s.jsx(ce,{className:"p-4 sm:p-8 relative z-10",children:s.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-start gap-3 sm:gap-4 sm:flex sm:flex-row sm:justify-between",children:[s.jsxs("div",{className:"space-y-3 sm:space-y-4 sm:flex-1 min-w-0",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"flex items-center space-x-3",children:s.jsxs("h2",{className:"text-lg sm:text-2xl lg:text-3xl font-bold bg-gradient-to-r from-foreground via-primary to-primary bg-clip-text text-transparent leading-tight",children:["ÎαλÏÏ Î®ÏθαÏε ÏÏο Well Be, ",q(
740),"!"]})}),s.jsx(ye,{className:"bg-gradient-to-r from-secondary to-primary text-primary-foreground px-2 sm:px-4 py-1 sm:py-2 text-xs sm:text-sm font-semibold animate-pulse w-fit border-0",children:"â¡ ÎνεÏÎ³Ï ÎÎÎ»Î¿Ï â¡"})]}),s.jsx("p",{className:"text-base sm:text-lg text-muted-foreground font-medium hidden sm:block",children:"ÎξεÏεÏ
νήÏÏε Ïο ÏεÏιεÏÏÎ¼ÎµÎ½Ï Î¼Î±Ï ÎºÎ±Î¹ γίνεÏε η καλÏÏεÏη εκδοÏή ÏοÏ
εαÏ
ÏÎ¿Ï ÏαÏ! ðª"}),s.jsx("div",{className:"hidden sm:flex items-center gap-2 sm:gap-3 flex-wrap",children:s.jsx(ck,{userId:e.id,showMessage:!0,textSize:"xs"})})]}),s.jsx("div",{className:"flex flex-col items-center space-y-3 flex-shrink-0",children:s.jsx(Po,{userId:e.id,avatarUrl:y==null?void 0:y.avatar_url,firstName:y==null?void 0:y.first_name,lastName:y==null?void 0:y.last_name,email:y==null?void 0:y.email,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 ring-4 ring-border cursor-pointer hover:ring-ring transition-all duration-300 hover:scale-105",onClick:()=>k(!T)})}),s.jsx("div",{className:"col-span-2 sm:hidden flex items-center gap-2 flex-wrap mt-1",children:s.jsx(ck,{userId:e.id,showMessage:!0,textSize:"xs"})})]})})]})}),g&&!b&&s.jsx("div",{className:"mb-6 animate-fade-in",children:s.jsxs(tj,{open:L,onOpenChange:O,children:[s.jsx(sj,{asChild:!0,children:s.jsx(F,{variant:"outline",className:"w-full h-12 bg-card border-border shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-[1.02] text-base font-semibold",children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsx("span",{children:"â¡ ÎÏήγοÏÎµÏ ÎνÎÏγειεÏ"}),L?s.jsx(L0,{className:"h-5 w-5"}):s.jsx($l,{className:"h-5 w-5"})]})})}),s.jsx(rj,{className:"space-y-0",children:s.jsx("div",{className:"mt-4 p-4 bg-card border border-border rounded-lg shadow-lg",children:s.jsxs("div",{className:"grid gap-3 grid-cols-2",children:[s.jsxs(F,{className:"h-20 flex-col space-y-2 bg-muted hover:bg-accent text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>{p("/catalog?category=workout"),O(!1)},children:[s.jsx(Za,{className:"h-6 w-6"}),s.jsx("span",{className:"font-semibold text-xs text-center",children:"Workouts"})]}),s.jsxs(F,{className:"h-20 flex-col space-y-2 bg-accent hover:bg-muted text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>{p("/catalog?filter=dialogismoi"),O(!1)},children:[s.jsx("span",{className:"text-2xl",children:"ð§"}),s.jsx("span",{className:"font-semibold text-xs text-center",children:"ÎιαλογιÏμοί"})]}),s.jsxs(F,{className:"h-20 flex-col space-y-2 bg-secondary hover:bg-secondary/80 text-secondary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>{p("/catalog?filter=breathworks"),O(!1)},children:[s.jsx("span",{className:"text-2xl",children:"ð¬ï¸"}),s.jsx("span",{className:"font-semibold text-xs text-center",children:"Breathworks"})]}),s.jsxs(F,{className:"h-20 flex-col space-y-2 bg-primary hover:bg-primary/90 text-primary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>{p("/podcast"),O(!1)},children:[s.jsx(pa,{className:"h-6 w-6"}),s.jsx("span",{className:"font-semibold text-xs text-center",children:"Podcast"})]}),s.jsxs(F,{className:"h-20 flex-col space-y-2 bg-muted hover:bg-accent text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>{p("/recipes"),O(!1)},children:[s.jsx(N_,{className:"h-6 w-6"}),s.jsx("span",{className:"font-semibold text-xs text-center",children:"ΣÏ
νÏαγÎÏ"})]}),s.jsxs(F,{className:"h-20 flex-col space-y-2 bg-secondary hover:bg-secondary/80 text-secondary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>{p("/community"),O(!1)},children:[s.jsx(ws,{className:"h-6 w-6"}),s.jsx("span",{className:"font-semibold text-xs text-center",children:"Community"})]})]})})})]})}),s.jsxs(Si,{value:C,onValueChange:H=>{console.log("ð Tab changed to:",H),A(H)},className:"w-full",children:[s.jsxs(Ci,{className:"grid w-full grid-cols-5 h-12 sm:h-14 bg-muted border border-border rounded-xl p-1 overflow-x-auto",children:[s.jsxs(Pt,{value:"overview",className:"data-[state=active]:bg-accent data-[state=active]:text-accent-foreground font-semibold rounded-lg transition-all duration-300 hover:scale-105 text-xs sm:text-sm whitespace-nowrap px-1 sm:px-3",children:[s.jsx("span",{className:"hidden sm:inline",children:"ð ÎÏιÏκÏÏηÏη"}),s.jsx("span",{className:"sm:hidden",children:"ð"})]}),s.jsxs(Pt,{value:"history",className:"data-[state=active]:bg-accent data-[state=active]:text-accent-foreground font-semibold rounded-lg transition-all duration-300 hover:scale-105 text-xs sm:text-sm whitespace-nowrap px-1 sm:px-3",children:[s.jsx("span",{className:"hidden sm:inline",children:"ðº ÎÏÏοÏικÏ"}),s.jsx("span",{className:"sm:hidden",children:"ðº"})]}),s.jsxs(Pt,{value:"favorites",className:"data-[state=active]:bg-accent data-[state=active]:text-accent-foreground font-semibold rounded-lg transition-all duration-300 hover:scale-105 text-xs sm:text-sm whitespace-nowrap px-1 sm:px-3",children:[s.jsx("span",{className:"hidden sm:inline",children:"â¤ï¸ ÎγαÏημÎνα"}),s.jsx("span",{className:"sm:hidden",children:"â¤ï¸"})]}),s.jsxs(Pt,{value:"invoices",className:"data-[state=active]:bg-accent data-[state=active]:text-accent-foreground font-semibold rounded-lg transition-all duration-300 hover:scale-105 text-xs sm:text-sm whitespace-nowrap px-1 sm:px-3",children:[s.jsx("span",{className:"hidden sm:inline",children:"𧾠ΧÏεÏÏειÏ"}),s.jsx("span",{className:"sm:hidden",children:"ð§¾"})]}),s.jsxs(Pt,{value:"profile",className:"data-[state=active]:bg-accent data-[state=active]:text-accent-foreground font-semibold rounded-lg transition-all duration-300 hover:scale-105 text-xs sm:text-sm whitespace-nowrap px-1 sm:px-3",children:[s.jsx("span",{className:"hidden sm:inline",children:"ð¤ Î ÏοÏίλ"}),s.jsx("span",{className:"sm:hidden",children:"ð¤"})]})]}
740),s.jsxs(it,{value:"overview",className:"space-y-4 sm:space-y-6 mt-4 sm:mt-6",children:[!a&&!m&&s.jsxs(oe,{className:"bg-card border-border shadow-lg",children:[s.jsx(xe,{className:"pb-3",children:s.jsx(be,{className:"text-lg font-bold text-foreground flex items-center space-x-2",children:s.jsx("span",{children:"ð ÎαÏάÏÏαÏη ΣÏ
νδÏομήÏ"})})}),s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(ye,{variant:"secondary",children:"ΧÏÏÎ¯Ï Î£Ï
νδÏομή"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"ÎάνÏε Ïην εγγÏαÏή ÏÎ±Ï Î³Î¹Î± να αÏοκÏήÏεÏε ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏÏμενο"})]}),s.jsx("div",{className:"flex gap-2",children:s.jsx(F,{onClick:()=>p("/subscription-plans"),size:"sm",children:"ΣÏ
νδÏομή"})})]})})]}),s.jsxs("div",{className:"grid gap-3 sm:gap-6 grid-cols-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 animate-fade-in",children:[s.jsxs(oe,{className:"bg-card border-border shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105",children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(be,{className:"text-sm font-semibold text-foreground",children:"ðª ÎÏ
μναÏÏική"}),s.jsx(Za,{className:"h-6 w-6 text-muted-foreground"})]}),s.jsxs(ce,{children:[s.jsx("div",{className:"text-3xl font-bold text-foreground",children:(w==null?void 0:w.workouts_done)||0}),s.jsx("p",{className:"text-sm text-muted-foreground font-medium",children:"ÎίνÏεο ÏοÏ
είδαÏε"})]})]}),s.jsxs(oe,{className:"bg-card border-border shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105",children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(be,{className:"text-sm font-semibold text-foreground",children:"ð§ Podcasts"}),s.jsx(pa,{className:"h-6 w-6 text-muted-foreground"})]}),s.jsxs(ce,{children:[s.jsx("div",{className:"text-3xl font-bold text-foreground",children:(w==null?void 0:w.podcasts_heard)||0}),s.jsx("p",{className:"text-sm text-muted-foreground font-medium",children:"ÎÏειÏÏδια ÏοÏ
ακοÏÏαÏε"})]})]}),s.jsxs(oe,{className:"bg-card border-border shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105",children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(be,{className:"text-sm font-semibold text-foreground",children:"ð½ï¸ ΣÏ
νÏαγÎÏ"}),s.jsx(N_,{className:"h-6 w-6 text-muted-foreground"})]}),s.jsxs(ce,{children:[s.jsx("div",{className:"text-3xl font-bold text-foreground",children:(w==null?void 0:w.recipes_done)||0}),s.jsx("p",{className:"text-sm text-muted-foreground font-medium",children:"ΣÏ
νÏαγÎÏ ÏοÏ
δοκιμάÏαÏε"})]})]}),s.jsxs(oe,{className:"bg-card border-border shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105",children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(be,{className:"text-sm font-semibold text-foreground",children:"ð¬ ΣÏÏλια"}),s.jsx(Xp,{className:"h-6 w-6 text-muted-foreground"})]}),s.jsxs(ce,{children:[s.jsx("div",{className:"text-3xl font-bold text-foreground",children:(w==null?void 0:w.posts_made)||0}),s.jsx("p",{className:"text-sm text-muted-foreground font-medium",children:"ÎναÏÏήÏÎµÎ¹Ï ÏÏην κοινÏÏηÏα"})]})]}),s.jsxs(oe,{className:"bg-card border-border shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105",children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(be,{className:"text-sm font-semibold text-foreground",children:"ð Likes"}),s.jsx(t6,{className:"h-6 w-6 text-muted-foreground"})]}),s.jsxs(ce,{children:[s.jsx("div",{className:"text-3xl font-bold text-foreground",children:(w==null?void 0:w.posts_liked)||0}),s.jsx("p",{className:"text-sm text-muted-foreground font-medium",children:"ÎναÏÏήÏÎµÎ¹Ï ÏοÏ
αγαÏήÏαÏε"})]})]})]}),s.jsx(Fo,{}),!b&&s.jsx(oe,{className:"bg-card border-border shadow-xl",children:s.jsx(ce,{className:"p-6",children:s.jsx(vA,{showViewAllButton:!1,compact:!0})})}),s.jsxs(oe,{className:"bg-card border-border shadow-xl hidden md:block",children:[s.jsxs(xe,{className:"pb-3 sm:pb-4",children:[s.jsx(be,{className:"text-lg sm:text-xl font-bold text-foreground flex items-center space-x-2",children:s.jsx("span",{children:"â¡ ÎÏήγοÏÎµÏ ÎνÎÏγειεÏ"})}),s.jsx(gt,{className:"text-muted-foreground font-medium text-sm sm:text-base",children:"ð ÎÏήγοÏη ÏÏÏÏβαÏη ÏÏÎ¹Ï ÎºÏ
ÏιÏÏεÏÎµÏ Î»ÎµÎ¹ÏοÏ
ÏγίεÏ"})]}),s.jsx(ce,{className:"p-4 sm:p-6",children:s.jsxs("div",{className:"grid gap-3 sm:gap-6 grid-cols-2 lg:grid-cols-4",children:[s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-muted hover:bg-accent text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/catalog?category=workout"),children:[s.jsx(Za,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ðª ÎείÏε Workouts"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-accent hover:bg-muted text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/podcast"),children:[s.jsx(pa,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð§ ÎκοÏÏÏε Podcast"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-secondary hover:bg-secondary/80 text-secondary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/community"),children:[s.jsx(ws,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð Community"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-primary hover:bg-primary/90 text-primary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>A("profile"),children:[s.jsx(Nn,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð¤ Î ÎογαÏιαÏμÏÏ ÎοÏ
"})]})]})})]})]}
740),s.jsxs(it,{value:"history",className:"space-y-4 sm:space-y-6 mt-4 sm:mt-6",children:[s.jsxs(oe,{children:[s.jsxs(xe,{className:"pb-3 sm:pb-6",children:[s.jsxs(be,{className:"flex items-center space-x-2 text-base sm:text-lg",children:[s.jsx(No,{className:"w-5 h-5 sm:w-6 sm:h-6"}),s.jsx("span",{children:"ÎÏÏοÏÎ¹ÎºÏ Î ÏοβολÏν"})]}),s.jsx(gt,{className:"text-sm",children:"Τα βίνÏεο ÏοÏ
ÎÏεÏε ÏαÏακολοÏ
θήÏει - ÏÏ
νεÏίÏÏε αÏÏ ÎµÎºÎµÎ¯ ÏοÏ
ÏÏαμαÏήÏαÏε ή ξαναδείÏε Ïα αγαÏημÎνα ÏαÏ"})]}),s.jsx(ce,{className:"p-3 sm:p-6 pt-0",children:s.jsx(cA,{userId:e==null?void 0:e.id})})]}),s.jsxs(oe,{className:"bg-card border-border shadow-xl hidden md:block",children:[s.jsxs(xe,{className:"pb-3 sm:pb-4",children:[s.jsx(be,{className:"text-lg sm:text-xl font-bold text-foreground flex items-center space-x-2",children:s.jsx("span",{children:"â¡ ÎÏήγοÏÎµÏ ÎνÎÏγειεÏ"})}),s.jsx(gt,{className:"text-muted-foreground font-medium text-sm sm:text-base",children:"ð ÎÏήγοÏη ÏÏÏÏβαÏη ÏÏÎ¹Ï ÎºÏ
ÏιÏÏεÏÎµÏ Î»ÎµÎ¹ÏοÏ
ÏγίεÏ"})]}),s.jsx(ce,{className:"p-4 sm:p-6",children:s.jsxs("div",{className:"grid gap-3 sm:gap-6 grid-cols-2 lg:grid-cols-4",children:[s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-muted hover:bg-accent text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/catalog?category=workout"),children:[s.jsx(Za,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ðª ÎείÏε Workouts"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-accent hover:bg-muted text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/podcast"),children:[s.jsx(pa,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð§ ÎκοÏÏÏε Podcast"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-secondary hover:bg-secondary/80 text-secondary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/community"),children:[s.jsx(ws,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð Community"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-primary hover:bg-primary/90 text-primary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>A("profile"),children:[s.jsx(Nn,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð¤ Î ÎογαÏιαÏμÏÏ ÎοÏ
"})]})]})})]})]}),s.jsxs(it,{value:"favorites",className:"space-y-4 sm:space-y-6 mt-4 sm:mt-6",children:[s.jsxs(oe,{children:[s.jsxs(xe,{className:"pb-3 sm:pb-6",children:[s.jsxs(be,{className:"flex items-center space-x-2 text-base sm:text-lg",children:[s.jsx(ws,{className:"w-5 h-5 sm:w-6 sm:h-6 text-red-500"}),s.jsx("span",{children:"ÎγαÏημÎνα ÎίνÏεο"})]}),s.jsx(gt,{className:"text-sm",children:"Τα βίνÏεο ÏοÏ
ÎÏεÏε ÏÏοÏθÎÏει ÏÏα αγαÏημÎνα ÏÎ±Ï Î³Î¹Î± εÏκολη ÏÏÏÏβαÏη"})]}),s.jsx(ce,{className:"p-3 sm:p-6 pt-0",children:s.jsx($H,{userId:e==null?void 0:e.id})})]}),s.jsxs(oe,{className:"bg-card border-border shadow-xl hidden md:block",children:[s.jsxs(xe,{className:"pb-3 sm:pb-4",children:[s.jsx(be,{className:"text-lg sm:text-xl font-bold text-foreground flex items-center space-x-2",children:s.jsx("span",{children:"â¡ ÎÏήγοÏÎµÏ ÎνÎÏγειεÏ"})}),s.jsx(gt,{className:"text-muted-foreground font-medium text-sm sm:text-base",children:"ð ÎÏήγοÏη ÏÏÏÏβαÏη ÏÏÎ¹Ï ÎºÏ
ÏιÏÏεÏÎµÏ Î»ÎµÎ¹ÏοÏ
ÏγίεÏ"})]}),s.jsx(ce,{className:"p-4 sm:p-6",children:s.jsxs("div",{className:"grid gap-3 sm:gap-6 grid-cols-2 lg:grid-cols-4",children:[s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-muted hover:bg-accent text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/catalog?category=workout"),children:[s.jsx(Za,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ðª ÎείÏε Workouts"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-accent hover:bg-muted text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/podcast"),children:[s.jsx(pa,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð§ ÎκοÏÏÏε Podcast"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-secondary hover:bg-secondary/80 text-secondary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/community"),children:[s.jsx(ws,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð Community"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-primary hover:bg-primary/90 text-primary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>A("profile"),children:[s.jsx(Nn,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð¤ Î ÎογαÏιαÏμÏÏ ÎοÏ
"})]})]})})]})]}),s.jsxs(it,{value:"invoices",className:"space-y-6 mt-6",children:[s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsxs(be,{className:"flex items-center space-x-2",children:[s.jsx(Ra,{className:"w-6 h-6"}),s.jsx("span",{children:"ÎÏÏοÏÎ¹ÎºÏ Î Î»Î·ÏÏμÏν & ΤιμολογίÏν"})]}),s.jsx(gt,{children:"Î ÏοβάλεÏε Ïο ιÏÏοÏÎ¹ÎºÏ ÏÏν ÏληÏÏμÏν ÏÎ±Ï ÎºÎ±Î¹ καÏεβάÏÏε ÏιμολÏγια"})]}),s.jsx(ce,{children:s.jsx(dA,{userId:e==null?void 0:e.id,memberSince:y==null?void 0:y.created_at})})]}),s.jsxs(oe,{className:"bg-card border-border shadow-xl hidden md:block",children:[s.jsxs(xe,{className:"pb-3 sm:pb-4",children:[s.jsx(be,{className:"text-lg sm:text-xl font-bold text-foreground flex items-center space-x-2",children:s.jsx("span",{children:"â¡ ÎÏήγοÏÎµÏ ÎνÎÏγειεÏ"})}),s.jsx(gt,{className:"text-muted-foreground font-medium text-sm sm:text-base",children:"ð ÎÏήγοÏη ÏÏÏÏβαÏη ÏÏÎ¹Ï ÎºÏ
ÏιÏÏεÏÎµÏ Î»ÎµÎ¹ÏοÏ
ÏγίεÏ"})]}),s.jsx(ce,{className:"p-4 sm:p-6",children:s.jsxs("div",{className:"grid gap-3 sm:gap-6 grid-cols-2 lg:grid-cols-4",children:[s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-muted hover:bg-accent text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/catalog?category=workout"),children:[s.jsx(Za,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ðª ÎείÏε Workouts"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-accent hover:bg-muted text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/podcast"),children:[s.jsx(pa,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð§ ÎκοÏÏÏε Podcast"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-secondary hover:bg-secondary/80 text-secondary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/community"),children:[s.jsx(ws,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð Community"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-primary hover:bg-primary/90 text-primary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>A("profile"),children:[s.jsx(Nn,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð¤ Î ÎογαÏιαÏμÏÏ ÎοÏ
"})]})]})})]})]}),s.jsxs(it,{value:"profile",className:"space-y-6 mt-6",children:[s.jsx(OH,{userId:e.id,initialProfile:y,onProfileUpdate:X}),s.jsxs(oe,{className:"bg-card border-border shadow-xl hidden md:block",children:[s.jsxs(xe,{className:"pb-3 sm:pb-4",children:[s.jsx(be,{className:"text-lg sm:text-xl font-bold text-foreground flex items-center space-x-2",children:s.jsx("span",{children:"â¡ ÎÏήγοÏÎµÏ ÎνÎÏγειεÏ"})}),s.jsx(gt,{className:"text-muted-foreground font-medium text-sm sm:text-base",children:"ð ÎÏήγοÏη ÏÏÏÏβαÏη ÏÏÎ¹Ï ÎºÏ
ÏιÏÏεÏÎµÏ Î»ÎµÎ¹ÏοÏ
ÏγίεÏ"})]}),s.jsx(ce,{className:"p-4 sm:p-6",children:s.jsxs("div",{className:"grid gap-3 sm:gap-6 grid-cols-2 lg:grid-cols-4",children:[s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-muted hover:bg-accent text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/catalog?category=workout"),children:[s.jsx(Za,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ðª ÎείÏε Workouts"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-accent hover:bg-muted text-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/podcast"),children:[s.jsx(pa,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð§ ÎκοÏÏÏε Podcast"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-secondary hover:bg-secondary/80 text-secondary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>p("/community"),children:[s.jsx(ws,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð Community"})]}),s.jsxs(F,{className:"h-20 sm:h-24 flex-col space-y-2 sm:space-y-3 bg-primary hover:bg-primary/90 text-primary-foreground shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 border-0",onClick:()=>A("overview"),children:[s.jsx(aE,{className:"h-6 w-6 sm:h-8 sm:w-8"}),s.jsx("span",{className:"font-semibold text-xs sm:text-sm text-center",children:"ð ÎÏιÏκÏÏηÏη"})]})]})})]})]})]}),b&&s.jsx("div",{className:"mt-8 pb-8 px-4",children:s.jsxs(F,{onClick:async()=>{await t(),p("/auth")},variant:"outline",className:"w-full h-12 flex items-center justify-center space-x-2 text-destructive border-destructive hover:bg-destructive hover:text-destructive-foreground",children:[s.jsx(fy,{className:"h-5 w-5"}),s.jsx("span",{className:"font-semibold",children:"ÎÏοÏÏνδεÏη"})]})})]})}),T&&e&&s.jsx(mH,{onClose:()=>k(!1),onAvatarUpdate:W,userId:e.id}),!b&&s.jsx(Be,{})]}):null};var mj="Radio",[aG,PA]=gs(mj),[iG,oG]=aG(mj),TA=h.forwardRef((e,t)=>
vendor: 2,769 bytes, line 740
740{const{__scopeRadio:r,name:n,checked:a=!1,required:i,disabled:o,value:l="on",onCheck:c,form:d,...u}=e,[m,f]=h.useState(null),p=Ye(t,b=>f(b)),v=h.useRef(!1),g=m?d||!!m.closest("form"):!0;return s.jsxs(iG,{scope:r,checked:a,disabled:o,children:[s.jsx(Ce.button,{type:"button",role:"radio","aria-checked":a,"data-state":MA(a),"data-disabled":o?"":void 0,disabled:o,value:l,...u,ref:p,onClick:pe(e.onClick,b=>{a||c==null||c(),g&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),g&&s.jsx(RA,{control:m,bubbles:!v.current,name:n,value:l,checked:a,required:i,disabled:o,form:d,style:{transform:"translateX(-100%)"}})]})});TA.displayName=mj;var AA="RadioIndicator",IA=h.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...a}=e,i=oG(AA,r);return s.jsx(Ns,{present:n||i.checked,children:s.jsx(Ce.span,{"data-state":MA(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t})})});IA.displayName=AA;var lG="RadioBubbleInput",RA=h.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...a},i)=>{const o=h.useRef(null),l=Ye(o,i),c=kg(r),d=tg(t);return h.useEffect(()=>{const u=o.current;if(!u)return;const m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==r&&p){const v=new Event("click",{bubbles:n});p.call(u,r),u.dispatchEvent(v)}},[c,r,n]),s.jsx(Ce.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});RA.displayName=lG;function MA(e){return e?"checked":"unchecked"}var cG=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Pg="RadioGroup",[dG,xte]=gs(Pg,[Md,PA]),OA=Md(),DA=PA(),[uG,mG]=dG(Pg),LA=h.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:a,value:i,required:o=!1,disabled:l=!1,orientation:c,dir:d,loop:u=!0,onValueChange:m,...f}=e,p=OA(r),v=Vl(d),[g,b]=xr({prop:i,defaultProp:a??null,onChange:m,caller:Pg});return s.jsx(uG,{scope:r,name:n,required:o,disabled:l,value:g,onValueChange:b,children:s.jsx(Jw,{asChild:!0,...p,orientation:c,dir:v,loop:u,children:s.jsx(Ce.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:v,...f,ref:t})})})});LA.displayName=Pg;var FA="RadioGroupItem",$A=h.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...a}=e,i=mG(FA,r),o=i.disabled||n,l=OA(r),c=DA(r),d=h.useRef(null),u=Ye(t,d),m=i.value===a.value,f=h.useRef(!1);return h.useEffect(()=>{const p=g=>{cG.includes(g.key)&&(f.current=!0)},v=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",v)}},[]),s.jsx(Zw,{asChild:!0,...l,focusable:!o,active:m,children:s.jsx(TA,{disabled:o,required:i.required,
740checked:m,...c,...a,name:i.name,ref:u,onCheck:()=>i.onValueChange(a.value),onKeyDown:pe(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:pe(a.onFocus,()=>{var p;f.current&&((p=d.current)==null||p.click())})})})});$A.displayName=FA;var hG="RadioGroupIndicator",UA=h.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,a=DA(r);return s.jsx(IA,{...a,...n,ref:t})});UA.displayName=hG;var BA=LA,zA=$A,fG=UA;const WA=h.forwardRef(({className:e,...t},r)=>s.jsx(BA,{className:me("grid gap-2",e),...t,ref:r}));WA.displayName=BA.displayName;const pb=h.forwardRef(({className:e,...t},r)=>s.jsx(zA,{ref:r,className:me("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx(fG,{className:"flex items-center justify-center",children:s.jsx(lE,{className:"h-2.5 w-2.5 fill-current text-current"})})}));pb.displayName=zA.displayName;const gb=({userId:e,userEmail:t,stripeCustomerId:r,membershipData:n,onUpdate:a,isPendingSetup:i=!1,userProfile:o})=>{const[l,c]=h.useState(!1),[d,u]=h.useState(!1),[m,f]=h.useState(""),[p,v]=h.useState(""),[g,b]=h.useState("forever"),[y,x]=h.useState(""),{toast:w}=at(),j=async()=>{if(m){c(!0);try{const{supabase:A}=await ut(async()=>{const{supabase:P}=await Promise.resolve().then(()=>Ri);return{supabase:P}},void 0),{data:L,error:O}=await A.functions.invoke("update-next-invoice-date",{body:{email:t,next_invoice_date:m}});if(O)throw O;w({title:"ÎÏιÏÏ
Ïία",description:(L==null?void 0:L.user_type)==="stripe"?"ΠημεÏομηνία εÏÏÎ¼ÎµÎ½Î·Ï ÏιμολÏγηÏÎ·Ï ÎµÎ½Î·Î¼ÎµÏÏθηκε ÏÏο Stripe και Ïη βάÏη δεδομÎνÏν":"ΠημεÏομηνία εÏÏÎ¼ÎµÎ½Î·Ï ÏιμολÏγηÏÎ·Ï ÎµÎ½Î·Î¼ÎµÏÏθηκε"}),f(""),a()}catch(A){w({title:"ΣÏάλμα",description:A.message||"ÎÏοÏÏ
Ïία ενημÎÏÏÏÎ·Ï Î·Î¼ÎµÏομηνίαÏ",variant:"destructive"})}finally{c(!1)}}},N=async()=>{if(p.trim()){c(!0);try{await new Promise(A=>setTimeout(A,1500)),w({title:"Success",description:`Coupon "${p}" applied successfully`}),v(""),a()}catch{w({title:"Error",description:"Failed to apply coupon",variant:"destructive"})}finally{c(!1)}}},S=async()=>{if(!(n!=null&&n.stripe_customer_id)){w({title:"Error",description:"No Stripe customer ID found for this user",variant:"destructive"});return}c(!0);try{const{supabase:A}=await ut(async()=>{const{supabase:M}=await Promise.resolve().then(()=>Ri);return{supabase:M}},void 0),{data:L,error:O}=await A.functions.invoke("cancel-subscription",{body:{userEmail:t}});if(O)throw O;const P=new Date(L.subscription.current_period_end);w({title:"Success",description:`Membership will be cancelled on ${P.toLocaleDateString()}`}),a()}catch(A){console.error("Error cancelling membership:",A),w({title:"Error",description:A.message||"Failed to cancel membership",variant:"destructive"})}finally{c(!1)}},E=async()=>{if(!(n!=null&&n.stripe_customer_id)){w({title:"Error",description:"No Stripe customer ID found for this user",variant:"destructive"});return}c(!0);try{const{supabase:A}=await ut(async()=>{const{supabase:P}=await Promise.resolve().then(()=>Ri);return{supabase:P}},void 0),{data:L,error:O}=await A.functions.invoke("end-subscription-immediately",{body:{userEmail:t}});if(O)throw O;w({title:"Success",description:"Membership ended immediately. User access has been revoked."}),a()}catch(A){console.error("Error ending membership:",A),w({title:"Error",description:A.message||"Failed to end membership",variant:"destructive"})}finally{c(!1)}},_=async()=>{c(!0);try{const{supabase:A}=await ut(async()=>{const{supabase:$}=await Promise.resolve().then(()=>Ri);return{supabase:$}},void 0),{data:L,error:O}=await A.from("profiles").select("email").eq("user_id",e).single();if(O||!(L!=null&&L.email))throw new Error("Could not find user email");let P=null;g==="until_date"&&y&&(P=new Date(y).toISOString()),console.log("Making user free access:",{userId:e,email:L.email,endDate:P});const{data:M,error:D}=await A.functions.invoke("admin-grant-free-access",{body:{userId:e,email:L.email,endDate:P}});if(console.log("Upsert result:",{data:M,error:D}),D)throw D;w({title:"Success",description:P?`User now has free access until ${new Date(P).toLocaleDateString()}`:"User now has permanent free access"}),b("forever"),x(""),a()}catch(A){console.error("Error granting free access:",A),w({title:"Error",description:`Failed to grant free access: ${A.message}`,variant:"destructive"})}finally{c(!1)}},I=async()=>{c(!0);try{const{supabase:A}=await ut(async()=>{const{supabase:D}=await Promise.resolve().then(()=>Ri);return{supabase:D}},void 0),{data:L,error:O}=await A.from("profiles").select("email").eq("user_id",e).single();if(O||!(L!=null&&L.email))throw new Error("Could not find user email");console.log("Revoking free access:",{userId:e,email:L.email});const{data:P,error:M}=await A.functions.invoke("admin-revoke-free-access",{body:{userId:e,email:L.email}});if(M)throw M;w({title:"Success",description:"Free access has been revoked"}),a()}catch(A){console.error("Error revoking free access:",A),w({title:"Error",description:`Failed to revoke free access: ${A.message}`,variant:"destructive"})}finally{c(!1)}},R=async()=>{u(!0);try{const{supabase:A}=await ut(async()=>{const{supabase:P}=await Promise.resolve().then(()=>Ri);return{supabase:P}},void 0),{data:L,error:O}=await A.functions.invoke("sync-user-stripe-data",{body:{email:t,userId:e}});if(O)throw O;w({title:"ÎÏιÏÏ
Ïία",description:`Î ÏÏ
νδÏομή ÏÏ
γÏÏονίÏÏηκε εÏιÏÏ
ÏÏÏ. ΤÎλοÏ: ${new Date(L.data.subscriptionEnd).toLocaleDateString("el-GR")}`}),a()}catch(A){w({title:"ΣÏάλμα",description:A.message||"ÎÏοÏÏ
Ïία ÏÏ
γÏÏονιÏÎ¼Î¿Ï Î´ÎµÎ´Î¿Î¼ÎÎ
740½Ïν Stripe",variant:"destructive"})}finally{u(!1)}},T=async()=>{c(!0);try{const{supabase:A}=await ut(async()=>{const{supabase:P}=await Promise.resolve().then(()=>Ri);return{supabase:P}},void 0),{data:L,error:O}=await A.functions.invoke("mark-expired-subscriptions");if(O)throw O;w({title:"ÎÏιÏÏ
Ïία",description:`ÎνημεÏÏθηκαν ${L.users_updated} ληγμÎÎ½ÎµÏ ÏÏ
νδÏομÎÏ`}),a()}catch(A){console.error("Error fixing expired subscriptions:",A),w({title:"ΣÏάλμα",description:A.message||"ÎÏοÏÏ
Ïία ενημÎÏÏÏÎ·Ï Î»Î·Î³Î¼ÎνÏν ÏÏ
νδÏομÏν",variant:"destructive"})}finally{c(!1)}},k=async()=>{var A;c(!0);try{const{supabase:L}=await ut(async()=>{const{supabase:$}=await Promise.resolve().then(()=>Ri);return{supabase:$}},void 0),{data:O}=await L.auth.getSession(),P=(A=O==null?void 0:O.session)==null?void 0:A.access_token;let M=null,D=null;try{const{data:$,error:W}=await L.functions.invoke("delete-user",{headers:P?{Authorization:`Bearer ${P}`,apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdjcGp2Z3N6dml5dGRvY252eWFvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTYwNDQzMjEsImV4cCI6MjA3MTYyMDMyMX0.wgwX9pwjvnc5p3J8GsYXFtE4lVO2iW2KPOmJvzk93cU"}:{apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdjcGp2Z3N6dml5dGRvY252eWFvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTYwNDQzMjEsImV4cCI6MjA3MTYyMDMyMX0.wgwX9pwjvnc5p3J8GsYXFtE4lVO2iW2KPOmJvzk93cU"},body:{userIdToDelete:e}});W?(D=W,console.error("[ADMIN DELETE] Invoke error:",W)):M=$}catch($){D=$,console.error("[ADMIN DELETE] Invoke exception:",$)}if(D||M&&M.success===!1){const $=await fetch("https://gcpjvgszviytdocnvyao.supabase.co/functions/v1/delete-user",{method:"POST",headers:{Authorization:P?`Bearer ${P}`:"",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdjcGp2Z3N6dml5dGRvY252eWFvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTYwNDQzMjEsImV4cCI6MjA3MTYyMDMyMX0.wgwX9pwjvnc5p3J8GsYXFtE4lVO2iW2KPOmJvzk93cU","Content-Type":"application/json"},body:JSON.stringify({userIdToDelete:e})});if(!$.ok){const W=await $.text();throw console.error("[ADMIN DELETE] Fetch error:",$.status,W),new Error(`Failed to delete user: ${$.status} - ${W}`)}M=await $.json()}if(M&&M.success===!1)throw console.error("[ADMIN DELETE] API failure payload:",M),new Error(M.error||"Failed to delete user account");w({title:"Success",description:"User account has been permanently deleted"}),window.location.href="/admin"}catch(L){console.error("Error deleting user account:",L),w({title:"Error",description:L.message||"Failed to delete user account",variant:"destructive"})}finally{c(!1)}},C=()=>{if(n.is_admin_free_access)return s.jsx(ye,{className:"bg-emerald-100 text-emerald-800 border-emerald-300",children:"Free Admin Access"});if(!n.subscribed&&(o!=null&&o.created_at)&&new Date(o.created_at).getTime()>Date.now()-6048e5)return s.jsx(ye,{variant:"outline",className:"border-orange-500 text-orange-500",children:"Payment Pending/Failed"});switch(n.subscription_status){case"active":return s.jsx(ye,{className:"bg-green-100 text-green-800",children:"Active"});case"trial":return s.jsx(ye,{className:"bg-blue-100 text-blue-800",children:"Trial"});case"expired":return s.jsx(ye,{className:"bg-red-100 text-red-800",children:"Expired"});default:return s.jsx(ye,{variant:"outline",children:"No Subscription"})}};return s.jsxs(oe,{className:"border-l-4 border-l-primary",children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(Ir,{className:"h-5 w-5"}),"Membership Management"]})}),s.jsxs(ce,{className:"space-y-6",children:[i&&s.jsxs("div",{className:"p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[s.jsx("p",{className:"text-sm text-blue-900",children:"ð This is an active customer who hasn't set their password yet. All subscription and payment data is available below. They will set the
740ir password on first login."}),r&&s.jsxs("p",{className:"text-xs text-blue-700 mt-2",children:[s.jsx("strong",{children:"Stripe Customer ID:"})," ",r]})]}),s.jsxs("div",{className:"p-4 bg-muted/50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h4",{className:"font-semibold",children:"Current Status"}),C()]}),s.jsxs("div",{className:"grid gap-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Tier:"}),s.jsx("span",{children:n.subscription_tier||"None"})]}),n.subscription_end&&s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Ends:"}),s.jsx("span",{children:new Date(n.subscription_end).toLocaleDateString()})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Stripe Customer:"}),s.jsx("span",{children:n.stripe_customer_id?"â
Connected":"â Not Found"})]}),n.is_admin_free_access&&s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Access Type:"}),s.jsx("span",{className:"text-emerald-600 font-medium",children:"ð¡ï¸ Admin-Granted Free Access"})]})]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsxs(si,{children:[s.jsx(ri,{asChild:!0,children:s.jsxs(F,{variant:"outline",className:"flex items-center gap-2 bg-blue-50 border-blue-200 text-blue-700 hover:bg-blue-100",children:[s.jsx(Yt,{className:"h-4 w-4"}),"ÎλεγÏÎ¿Ï ÎηγμÎνÏν ΣÏ
νδÏομÏν"]})}),s.jsxs(ya,{children:[s.jsxs(ba,{children:[s.jsx(ja,{children:"ÎλεγÏÎ¿Ï ÎηγμÎνÏν ΣÏ
νδÏομÏν"}),s.jsx(Na,{children:"ÎÏ
ÏÏ Î¸Î± ελÎγξει ÏÎ»ÎµÏ ÏÎ¹Ï ÏÏ
νδÏομÎÏ PayPal ÏοÏ
ÎÏοÏ
ν λήξει και θα ÏÎ¹Ï ÏημειÏÏει ÏÏ Î±Î½ÎµÎ½ÎµÏγÎÏ. Îι ÏÏήÏÏÎµÏ Stripe δεν θα εÏηÏεαÏÏοÏν καθÏÏ Î´Î¹Î±ÏειÏίζονÏαι αÏ
ÏÏμαÏα αÏÏ webhooks."})]}),s.jsxs(wa,{children:[s.jsx(ka,{children:"ÎκÏÏÏÏη"}),s.jsx(_a,{onClick:T,disabled:l,className:"bg-blue-600 hover:bg-blue-700",children:l?"ÎλεγÏοÏ...":"ÎλεγÏÎ¿Ï Î¤ÏÏα"})]})]})]}),s.jsxs(si,{children:[s.jsx(ri,{asChild:!0,children:s.jsxs(F,{variant:"outline",className:"flex items-center gap-2 bg-purple-50 border-purple-200 text-purple-700 hover:bg-purple-100",disabled:!n.stripe_customer_id,children:[s.jsx(Yt,{className:"h-4 w-4"}),"ΣÏ
γÏÏονιÏμÏÏ Stripe"]})}),s.jsxs(ya,{children:[s.jsxs(ba,{children:[s.jsx(ja,{children:"ΣÏ
γÏÏονιÏμÏÏ ÎεδομÎνÏν Stripe"}),s.jsxs(Na,{children:["ÎÏ
ÏÏ Î¸Î± ανακÏήÏει Ïα ÏελεÏ
Ïαία δεδομÎνα ÏληÏÏÎ¼Î®Ï Î±ÏÏ Ïο Stripe και θα ενημεÏÏÏει Ïην καÏάÏÏαÏη ÏÏ
νδÏÎ¿Î¼Î®Ï ÏοÏ
ÏÏήÏÏη με βάÏη Ïην Ïιο ÏÏÏÏÏαÏη εÏιÏÏ
ÏημÎνη ÏληÏÏμή.",s.jsx("br",{}),s.jsx("br",{}),s.jsx("strong",{children:"ΧÏήÏιμο για:"})," ÎÏιδιÏÏθÏÏη καÏαÏÏάÏεÏν ÏÏοÏ
αÏÎÏÏ
Ïαν webhooks ή ÏÏοÏ
η καÏάÏÏαÏη είναι εÏÏαλμÎνη."]})]}),s.jsxs(wa,{children:[s.jsx(ka,{children:"ÎκÏÏÏÏη"}),s.jsx(_a,{onClick:R,disabled:d,className:"bg-purple-600 hover:bg-purple-700",children:d?"ΣÏ
γÏÏονιÏμÏÏ...":"ΣÏ
γÏÏονιÏμÏÏ Î¤ÏÏα"})]})]})]}),s.jsxs(gr,{children:[s.jsx(xl,{asChild:!0,children:s.jsxs(F,{variant:"outline",className:"flex items-center gap-2",disabled:i,title:i?"Not available for password-not-set users":"",children:[s.jsx(Ra,{className:"h-4 w-4"}),"Edit Invoice Date"]})}),s.jsxs(rr,{children:[s.jsx($r,{children:s.jsx(Ur,{children:"Edit Next Invoice Date"})}),s.jsx("div",{className:"space-y-4",children:s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"invoice-date",children:"Next Invoice Date"}),s.jsx(ke,{id:"invoice-date",type:"date",value:m,onChange:A=>f(A.target.value)})]})}),s.jsx(Uu,{children:s.jsx(F,{onClick:j,disabled:l||!m,children:l?"Updating...":"Update Date"})})]})]}),s.jsxs(gr,{children:[s.jsx(xl,{asChild:!0,children:s.jsxs(F,{variant:"outline",className:"flex items-center gap-2",children:[s.jsx(La,{className:"h-4 w-4"}),"Apply Coupon"]})}),s.jsxs(rr,{children:[s.jsx($r,{children:s.jsx(Ur,{children:"Apply Coupon to Membership"})}),s.jsx("div",{className:"space-y-4",children:s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"coupon-code",children:"Coupon Code"}),s.jsx(ke,{id:"coupon-code",placeholder:"Enter coupon code",value:p,onChange:A=>v(A.target.value)})]})}),s.jsx(Uu,{children:s.jsx(F,{onClick:N,disabled:l||!p.trim(),children:l?"Applying...":"Apply Coupon"})})]})]}),n.is_admin_free_access?s.jsxs(si,{children:[s.jsx(ri,{asChild:!0,children:s.jsxs(F,{variant:"outline",className:"flex items-center gap-2 bg-red-50 border-red-200 text-red-700 hover:bg-red-100",children:[s.jsx(Rs,{className:"h-4 w-4"}),"Stop Free Access"]})}),s.jsxs(ya,{children:[s.jsxs(ba,{children:[s.jsx(ja,{children:"Revoke Free Access"}),s.jsxs(Na,{children:["This will revoke the user's admin-granted free access. They will no longer have access to premium content unless they subscribe.",n.free_access_end_date&&s.jsxs("p",{className:"mt-2 text-sm",children:["Current access expires: ",new Date(n.free_access_end_date).toLocaleDateString()]})]})]}),s.jsxs(wa,{children:[s.jsx(ka,{children:"Cancel"}),s.jsx(_a,{onClick:I,disabled:l,className:"bg-red-600 hover:bg-red-700",children:l?"Revoking...":"Revoke Access"})]})]})]}):s.jsxs(gr,{children:[s.jsx(xl,{asChild:!0,children:s.jsxs(F,{variant:"outline",className:"flex items-center gap-2 bg-green-50 border-green-200 text-green-700 hover:bg-green-100",children:[s.jsx(kl,{className:"h-4 w-4"}),"Make Free Member"]})}),s.jsxs(rr,{children:[s.jsx($r,{children:s.jsx(Ur,{children:"Grant Free Full Access"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"This will grant the user full access to all content without going through Stripe."}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(_e,{children:"Access Duration"}),s.jsxs(WA,{value:g,onValueChange:A=>b(A),className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(pb,{value:"forever",id:"forever"}),s.jsx(_e,{htmlFor:"forever",className:"cursor-pointer",children:"Forever (permanent access)"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(pb,{value:"until_date",id:"until_date"}),s.jsx(_e,{htmlFor:"until_date",className:"cursor-pointer",children:"Until a specific date"})]})]}),g==="until_date"&&s.jsxs("div",{className:"mt-3",children:[s.jsx(_e,{htmlFor:"free-access-end-date",children:"End Date"}),s.jsx(ke,{id:"free-access-end-date",type:"date",value:y,onChange:A=>x(A.target.value),min:new Date().toISOString().split("T")[0],className:"mt-1"})]})]}),s.jsx("div",{className:"p-4 bg-green-50 rounded-lg border border-green-200",children:s.jsxs("p",{className:"text-sm text-green-800",children:["â
Full access to all premium content",s.jsx("br",{}),"â
No billing or Stripe involvement",s.jsx("br",{}),"â
Admin-controlled access"]})})]}),s.jsx(Uu,{children:s.jsx(F,{onClick:_,disabled:l||g==="until_date"&&!y,className:"bg-green-600 hover:bg-green-700",children:l?"Granting Access...":"Grant Free Access"})})]})]}),s.jsxs(si,{children:[s.jsx(ri,{asChild:!0,children:s.jsxs(F,{variant:"outline",className:"flex items-center gap-2 text-orange-600 border-orange-200 hover:bg-orange-50",children:[s.jsx(A5,{className:"h-4 w-4"}),"Cancel Membership"]})}),s.jsxs(ya,{children:[s.jsxs(ba,{children:[s.jsx(ja,{children:"Cancel Membership"}),s.jsx(Na,{children:"This will cancel the member's subscription. Their access will be revoked when the current subscription period expires. This action cannot be undone."})]}),s.jsxs(wa,{children:[s.jsx(ka,{children:"Cancel"}),s.jsx(_a,{onClick:S,disabled:l,className:"bg-orange-600 hover:bg-orange-700",children:l?"Canceling...":"Cancel Membership"})]})]})]}),s.jsxs(si,{children:[s.jsx(ri,{asChild:!0,children:s.jsxs(F,{variant:"outline",className:"flex items-center gap-2 text-red-600 border-red-200 hover:bg-red-50",children:[s.jsx(om,{className:"h-4 w-4"}),"End Immediately"]})}),s.jsxs(ya,{children:[s.jsxs(ba,{children:[s.jsx(ja,{children:"End Membership Immediately"}),s.jsx(Na,{children:"This will immediately revoke the member's access and end their subscription. This is a destructive action and cannot be undone."})]}),s.jsxs(wa,{children:[s.jsx(ka,{children:"Cancel"}),s.jsx(_a,{onClick:E,disabled:l,className:"bg-red-600 hover:bg-red-700",children:l?"Ending...":"End Immediately"})]})]})]}),s.jsxs(si,{children:[s.jsx(ri,{asChild:!0,children:s.jsxs(F,{variant:"outline",className:"flex items-center gap-2 text-red-700 border-red-300 hover:bg-red-100 bg-red-50",disabled:i,title:i?"N
740o account to delete - user hasn't logged in yet":"",children:[s.jsx(jn,{className:"h-4 w-4"}),i?"No Account to Delete":"Delete Account"]})}),s.jsxs(ya,{children:[s.jsxs(ba,{children:[s.jsx(ja,{className:"text-red-600",children:"â ï¸ Delete User Account"}),s.jsxs(Na,{className:"space-y-2",children:[s.jsx("p",{className:"font-semibold text-red-800",children:"This action is PERMANENT and IRREVERSIBLE!"}),s.jsx("p",{children:"This will completely delete the user's account including:"}),s.jsxs("ul",{className:"list-disc list-inside space-y-1 text-sm",children:[s.jsx("li",{children:"User authentication credentials"}),s.jsx("li",{children:"Profile information"}),s.jsx("li",{children:"Subscription data"}),s.jsx("li",{children:"Activity history"}),s.jsx("li",{children:"All associated data"})]}),s.jsx("p",{className:"text-red-600 font-medium",children:"The user will no longer be able to log in and all their data will be lost forever."})]})]}),s.jsxs(wa,{children:[s.jsx(ka,{children:"Cancel"}),s.jsx(_a,{onClick:k,disabled:l,className:"bg-red-700 hover:bg-red-800",children:l?"Deleting...":"Permanently Delete Account"})]})]})]})]})]})]})},pG=({userId:e,userEmail:t})=>{const[r,n]=h.useState(!1),[a,i]=h.useState(""),[o,l]=h.useState(!1),[c,d]=h.useState(!1),[u,m]=h.useState(null),[f,p]=h.useState(!1),{toast:v}=at(),g=async()=>{try{p(!0);const{data:j,error:N}=await U.functions.invoke("check-user-status",{body:{email:t}});if(N)throw N;m({hasPassword:j.has_password||!1,emailConfirmed:j.email_confirmed||!1,passwordSetAt:j.password_set_at?new Date(j.password_set_at).toLocaleString("el-GR"):void 0}),v({title:"User Status",description:`Has password: ${j.has_password?"Yes":"No"} | Email confirmed: ${j.email_confirmed?"Yes":"No"}`})}catch(j){console.error("Error checking user status:",j),v({title:"Error",description:"Failed to retrieve user status",variant:"destructive"})}finally{p(!1)}},b=async()=>{n(!0);try{const{data:j,error:N}=await U.functions.invoke("send-password-setup-email",{body:{email:t,redirect_to:`${window.location.origin}/set-password`}});if(N)throw N;v({title:"Success",description:`Password reset email sent to ${t}`})}catch(j){console.error("Error sending password reset:",j),v({title:"Error",description:j.message||"Failed to send password reset email",variant:"destructive"})}finally{n(!1)}},y=async()=>{var j;if(!a||a.length<6){v({title:"Error",description:"Password must be at least 6 characters long",variant:"destructive"});return}n(!0);try{const{data:N,error:S}=await U.auth.getSession();if(S)throw S;const E=N==null?void 0:N.session;if(!(E!=null&&E.access_token)||!E.user){v({title:"Not signed in",description:"Please sign in again to continue.",variant:"destructive"}),n(!1);return}const{data:_,error:I}=await U.rpc("has_role",{_user_id:E.user.id,_role:"admin"});if(I)console.warn("Admin role check failed (continuing to call function for definitive check):",I);else if(!_){v({title:"Forbidden",description:"Admin access required.",variant:"destructive"}),n(!1);return}const{data:R,error:T}=await U.functions.invoke("admin-update-user-password",{body:{userId:e,newPassword:a},headers:{Authorization:`Bearer ${E.access_token}`}});if(T){console.error("Error calling admin-update-user-password function:",T);const C=(R==null?void 0:R.code)||"unknown_error",A=(R==null?void 0:R.error)||T.message||"Failed to update password";v({variant:"destructive",title:"Error",description:`${A} (${C})`});return}if(!(R!=null&&R.success)){console.error("Password update failed:",R);const C=(R==null?void 0:R.code)||"update_failed";v({variant:"destructive",title:"Error",description:`${(R==null?void 0:R.error)||"Failed to update password"} (${C})`});return}const k=R!=null&&R.updatedAt?new Date(R.updatedAt).toLocaleString("el-GR"):new Date().toLocaleString("el-GR");m(C=>({hasPassword:!0,emailConfirmed:(C==null?void 0:C.emailConfirmed)||!1,passwordSetAt:k})),v({title:"Success",description:`Password updated at ${k}. User can now log in with the new password.`}),i(""),d(!1)}catch(N){console.error("Error updating password:",N);let S="Failed to update password. Please try again.";N!=null&&N.message?S=N.message:(j=N==null?void 0:N.context)!=null&&j.error?S=N.context.error:typeof N=="string"&&(S=N),v({title:"Error",description:S,variant:"destructive"})}finally{n(!1)}},x=()=>{const j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*";let N="";for(let S=0;S<12;S++)N+=j.charAt(Math.floor(Math.random()*j.length));i(N)},w=async()=>{n(!0);try{const{data:j}=await U.auth.getSession(),N=j==null?void 0:j.session;if(!(N!=null&&N.access_token))throw new Error("Not authenticated");const{data:S,error:E}=await U.functions.invoke("admin-reconcile-user",{body:{email:t},headers:{Authorization:`Bearer ${N.access_token}`}});if(E)throw E;v({title:"Success",description:S.message||"User ID reconciled successfully"}),await g()}catch(j){v({title:"Error",description:j.message||"Failed to reconcile user ID",variant:"destructive"})}finally{n(!1)}};return s.jsxs(oe,{className:"border-l-4 border-l-blue-400",children:[s.jsxs(xe,{children:[s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(U5,{className:"h-5 w-5"}),"Password Management"]}),u&&s.jsxs("div",{className:"mt-3 p-3 bg-muted/30 rounded-lg space-y-1 text-sm",children:[s.jsxs("p",{children:["Has password: ",s.jsx("strong",{className:u.hasPassword?"text-green-600":"text-red-600",children:u.hasPassword?"Yes":"No"})]}),s.jsxs("p",{children:["Email confirmed: ",s.jsx("strong",{className:u.emailConfirmed?"text-green-600":"text-red-600",children:u.emailConfirmed?"Yes":"No"})]}),u.passwordSetAt&&s.jsxs("p",{children:["Last updated: ",s.jsx("strong",{children:u.passwordSetAt})]})]})]}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{className:"p-4 bg-muted/50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Fa,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:"User Email:"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),s.jsx(F,{onClick:g,disabled:f,variant:"outline",className:"w-full",children:f?"Checking...":"Check User Status"}),s.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[s.jsxs(F,{variant:"outline",onClick:b,disabled:r,className:"flex items-center gap-2",children:[s.jsx(Fa,{className:"h-4 w-4"}),r?"Sending...":"Send Reset Email"]}),s.jsxs(gr,{open:c,onOpenChange:d,children:[s.jsx(xl,{asChild:!0,children:s.jsxs(F,{variant:"outline",className:"flex items-center gap-2",children:[s.jsx(Qp,{className:"h-4 w-4"}),"Set New Password"]})}),s.jsxs(rr,{children:[s.jsx($r,{children:s.jsx(Ur,{children:"Set New Password"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"new-password",children:"New Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(ke,{id:"new-password",type:o?"text":"password",value:a,onChange:j=>i(j.target.value),placeholder:"Enter new password (min 6 characters)",className:"pr-20"}),s.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex gap-1",children:s.jsx(F,{type:"button",variant:"ghost",size:"sm",onClick:()=>l(!o),className:"h-7 w-7 p-0",children:o?s.jsx(Gf,{className:"h-3 w-3"}
740):s.jsx(my,{className:"h-3 w-3"})})})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Password strength: ",a.length<6?"Weak":a.length<10?"Medium":"Strong"]}),s.jsx(F,{type:"button",variant:"ghost",size:"sm",onClick:x,className:"text-xs",children:"Generate"})]})]}),s.jsx("div",{className:"p-3 bg-blue-50 border border-blue-200 rounded-lg",children:s.jsxs("p",{className:"text-xs text-blue-800",children:[s.jsx("strong",{children:"Note:"})," This will immediately update the user's password. The user will be able to log in with the new password right away."]})})]}),s.jsx(Uu,{children:s.jsx(F,{onClick:y,disabled:r||a.length<6,children:r?"Updating...":"Update Password"})})]})]}),s.jsxs(F,{variant:"outline",onClick:w,disabled:r,className:"flex items-center gap-2",children:[s.jsx(Yt,{className:"h-4 w-4"}),"Fix User ID"]})]}),s.jsx("div",{className:"p-3 bg-amber-50 border border-amber-200 rounded-lg",children:s.jsxs("p",{className:"text-xs text-amber-800",children:[s.jsx("strong",{children:"User ID Mismatch Fix:"}),` Use "Fix User ID" if the user can't login despite having a password set. This resolves imported user issues.`]})}),s.jsx("div",{className:"p-3 bg-blue-50 border border-blue-200 rounded-lg",children:s.jsxs("p",{className:"text-xs text-blue-800",children:[s.jsx("strong",{children:"Recommendation:"}),' Use "Send Reset Email" for security. The user will receive a secure link to reset their password.']})})]})]})},gG=({title:e,children:t,defaultExpanded:r=!1,maxInitialItems:n=3,className:a})=>{const[i,o]=h.useState(r),l=ie.Children.toArray(t),c=i?l:l.slice(0,n),d=l.length>n;return s.jsxs("div",{className:me("space-y-4",a),children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-lg font-semibold",children:e}),d&&s.jsx(F,{variant:"outline",size:"sm",onClick:()=>o(!i),className:"flex items-center gap-2",children:i?s.jsxs(s.Fragment,{children:["Show Less",s.jsx(L0,{className:"h-4 w-4"})]}):s.jsxs(s.Fragment,{children:["Show More (",l.length-n," more)",s.jsx($l,{className:"h-4 w-4"})]})})]}),s.jsx("div",{className:"space-y-3",children:c}),!i&&d&&s.jsx("div",{className:"text-center py-2",children:s.jsxs(F,{variant:"ghost",size:"sm",onClick:()=>o(!0),className:"text-muted-foreground hover:text-foreground",children:["View ",l.length-n," more items..."]})})]})},xG=({userId:e})=>{const[t,r]=h.useState([]),[n,a]=h.useState(!0);h.useEffect(()=>{i()},[e]);const i=async()=>{try{a(!0);const[m,f,p,v,g]=await Promise.all([U.from("user_activities").select("*").eq("user_id",e).order("created_at",{ascending:!1}),U.from("post_likes").select("*, posts(content)").eq("user_id",e).order("created_at",{ascending:!1}),U.from("posts").select("*").eq("user_id",e).eq("is_hidden",!1).order("created_at",{ascending:!1}),U.from("user_badge_history").select("*").eq("user_id",e).order("earned_at",{ascending:!1}),U.from("challenge_completions").select("*, challenges(title)").eq("user_id",e).order("completed_at",{ascending:!1})]),b=[];m.data&&m.data.forEach(y=>{b.push({id:`video_${y.id}`,type:"video_watch",timestamp:y.created_at,details:y,description:`Watched ${y.activity_type.replace("_"," ")} - Video ID: ${y.video_id}`})}),f.data&&f.data.forEach(y=>{var x,w;b.push({id:`like_${y.id}`,type:"post_like",timestamp:y.created_at,details:y,description:`Liked a post: "${(w=(x=y.posts)==null?void 0:x.content)==null?void 0:w.substring(0,50)}..."`})}),p.data&&p.data.forEach(y=>{b.push({id:`post_${y.id}`,type:"post_create",timestamp:y.created_at,details:y,description:`Created post: "${y.content.substring(0,50)}..."`})}),v.data&&v.data.forEach(y=>{b.push({id:`badge_${y.id}`,type:"badge_earned",timestamp:y.earned_at,details:y,description:`Earned ${y.badge_level} badge`})}),g.data&&g.data.forEach(y=>{var x;b.push({id:`challenge_${y.id}`,type:"challenge_complete",timestamp:y.completed_at,details:y,description:`Completed challenge: ${((x=y.challenges)==null?void 0:x.title)||"Unknown Challenge"}`})}),b.sort((y,x)=>new Date(x.timestamp).getTime()-new Date(y.timestamp).getTime()),r(b)}catch(m){console.error("Error loading activity data:",m)}finally{a(!1)}},o=m=>{switch(m){case"video_watch":return s.jsx(Os,{className:"h-4 w-4"});case"post_like":return s.jsx(ws,{className:"h-4 w-4"});case"post_create":return s.jsx(fE,{className:"h-4 w-4"});case"badge_earned":return s.jsx(Yp,{className:"h-4 w-4"});case"challenge_complete":return s.jsx(Ra,{className:"h-4 w-4"});default:return s.jsx(Ms,{className:"h-4 w-4"})}},l=m=>{switch(m){case"video_watch":return"bg-blue-100 text-blue-800";case"post_like":return"bg-red-100 text-red-800";case"post_create":return"bg-green-100 text-green-800";
740case"badge_earned":return"bg-yellow-100 text-yellow-800";case"challenge_complete":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},c=m=>{switch(m){case"video_watch":return"Video Watch";case"post_like":return"Post Like";case"post_create":return"Post Created";case"badge_earned":return"Badge Earned";case"challenge_complete":return"Challenge Complete";default:return"Activity"}},d=m=>{const f=new Date(m),v=(new Date().getTime()-f.getTime())/(1e3*60*60);return v<24?f.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}):v<168?f.toLocaleDateString("en-US",{weekday:"short",hour:"2-digit",minute:"2-digit",hour12:!1}):f.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})};if(n)return s.jsx(oe,{children:s.jsx(ce,{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary"})})});const u=t.map(m=>s.jsxs("div",{className:"flex items-start gap-3 p-3 bg-muted/30 rounded-lg border border-border/50 hover:bg-muted/50 transition-colors",children:[s.jsx("div",{className:`p-2 rounded-full ${l(m.type)}`,children:o(m.type)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[s.jsx(ye,{variant:"outline",className:l(m.type),children:c(m.type)}),s.jsx("span",{className:"text-xs text-muted-foreground",children:d(m.timestamp)})]}),s.jsx("p",{className:"text-sm text-foreground truncate",title:m.description,children:m.description}),s.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[s.jsx(Ms,{className:"h-3 w-3 text-muted-foreground"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(m.timestamp).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]})]},m.id));return s.jsxs(oe,{className:"border-l-4 border-l-green-400",children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(Ms,{className:"h-5 w-5"}),"Activity Timeline (",t.length," activities)"]})}),s.jsx(ce,{children:t.length===0?s.jsxs("div",{className:"text-center py-8",children:[s.jsx(Ms,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),s.jsx("p",{className:"text-muted-foreground",children:"No activity recorded yet"})]}):s.jsx(gG,{title:"",maxInitialItems:5,defaultExpanded:!1,children:u})})]})},vG=({userDetails:e,onUpdate:t})=>{const{toast:r}=at(),[n,a]=h.useState(!1),[i,o]=h.useState(!1),[l,c]=h.useState(!1),[d,u]=h.useState(e.email||""),[m,f]=h.useState({first_name:e.first_name||"",last_name:e.last_name||"",nickname:e.nickname||"",phone_number:e.phone_number||"",postal_address:e.postal_address||"",postal_code:e.postal_code||"",city:e.city||"",country:e.country||""}),p=(y,x)=>{f(w=>({...w,[y]:x}))},v=async()=>{try{o(!0);const{error:y}=await U.from("profiles").update(m).eq("user_id",e.user_id);if(y)throw y;r({title:"Success",description:"Profile updated successfully."}),a(!1),t()}catch(y){console.error("Error updating profile:",y),r({title:"Error",description:"Failed to update profile.",variant:"destructive"})}finally{o(!1)}},g=()=>{f({first_name:e.first_name||"",last_name:e.last_name||"",nickname:e.nickname||"",phone_number:e.phone_number||"",postal_address:e.postal_address||"",postal_code:e.postal_code||"",city:e.city||"",country:e.country||""}),a(!1)},b=async()=>{if(!d||!d.includes("@")){r({title:"Error",description:"Please enter a valid email address.",variant:"destructive"});return}try{c(!0);const{error:y}=await U.from("profiles").update({email:d}).eq("user_id",e.user_id);if(y)throw y;r({title:"Success",description:"Email updated in profile. Auth email update requires additional admin privileges."}),t()}catch(y){console.error("Error updating email:",y),r({title:"Error",description:"Failed to update email.",variant:"destructive"})}finally{c(!1)}};return s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(Nn,{className:"h-5 w-5"}),"Personal Information"]}),n?s.jsxs("div",{className:"flex gap-2",children:[s.jsx(F,{variant:"outline",size:"sm",onClick:g,children:"Cancel"}),s.jsxs(F,{size:"sm",onClick:v,disabled:i,children:[s.jsx(U0,{className:"h-4 w-4 mr-2"}),i?"Saving...":"Save"]})]}):s.jsxs(F,{variant:"outline",size:"sm",onClick:()=>a(!0),children:[s.jsx(vE,{className:"h-4 w-4 mr-2"}),"Edit"]})]})}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"first_name",children:"First Name"}),n?s.jsx(ke,{id:"first_name",value:m.first_name,onChange:y=>p("first_name",y.target.value)}):s.jsx("div",{className:"p-2 bg-muted/50 rounded",children:m.first_name||"Not provided"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"last_name",children:"Last Name"}),n?s.jsx(ke,{id:"last_name",value:m.last_name,onChange:y=>p("last_name",y.target.value)}):s.jsx("div",{className:"p-2 bg-muted/50 rounded",children:m.last_name||"Not provided"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"nickname",children:"Nickname"}),n?s.jsx(ke,{id:"nickname",value:m.nickname,onChange:y=>p("nickname",y.target.value)}):s.jsx("div",{className:"p-2 bg-muted/50 rounded",children:m.nickname||"Not provided"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"phone_number",children:"Phone Number"}),n?s.jsx(ke,{id:"phone_number",value:m.phone_number,onChange:y=>p("phone_number",y.target.value)}):s.jsx("div",{className:"p-2 bg-muted/50 rounded",children:m.phone_number||"Not provided"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"postal_address",children:"Address"}),n?s.jsx(ke,{id:"postal_address",value:m.postal_address,onChange:y=>p("postal_address",y.target.value)}):s.jsx("div",{className:"p-2 bg-muted/50 rounded",children:m.postal_address||"Not provided"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"city",children:"City"}),n?s.jsx(ke,{id:"city",value:m.city,onChange:y=>p("city",y.target.value)}):s.jsx("div",{className:"p-2 bg-muted/50 rounded",children:m.city||"Not provided"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"postal_code",children:"Postal Code"}),n?s.jsx(ke,{id:"postal_code",value:m.postal_code,onChange:y=>p("postal_code",y.target.value)}):s.jsx("div",{className:"p-2 bg-muted/50 rounded",children:m.postal_code||"Not provided"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"country",children:"Country"}),n?s.jsx(ke,{id:"country",value:m.country,onChange:y=>p("country",y.target.value)}):s.jsx("div",{className:"p-2 bg-muted/50 rounded",children:m.country||"Not provided"})]})]}),s.jsxs("div",{className:"space-y-4 border-t pt-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Fa,{className:"h-4 w-4 text-primary"}),s.jsx(_e,{className:"text-base font-semibold",children:"Email Management"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"email",children:"User Email"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ke,{id:"email",type:"email",value:d,onChange:y=>u(y.target.value),placeholder:"Enter email address"}),s.jsx(F,{onClick:b,disabled:l||d===e.email,size:"sm",children:l?"Updating...":"Update Email"})]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Current: ",e.email||"Not set"]})]})]})]})]})};function xb(e,[t,r]){return Math.min(r,Math.max(t,e))}var yG=[" ","Enter","ArrowUp","ArrowDown"],bG=[" ","Enter"],Rl="Select",[Tg,Ag,wG]=$m(Rl),[Bd,vte]=gs(Rl,[wG,Mo]),Ig=Mo(),[jG,$o]=Bd(Rl),[NG,_G]=Bd(Rl),VA=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:a,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:d,name:u,autoComplete:m,disabled:f,required:p,form:v}=e,g=Ig(t),[b,y]=h.useState(null),[x,w]=h.useState(null),[j,N]=h.useState(!1),S=Vl(d),[E,_]=xr({prop:n,defaultProp:a??!1,onChange:i,caller:Rl}),[I,R]=xr({prop:o,defaultProp:l,onChange:c,caller:Rl}),T=h.useRef(null),k=b?v||!!b.closest("form"):!0,[C,A]=h.useState(new Set),L=Array.from(C).map(O=>O.props.value).join(";");return s.jsx(sg,{...g,children:s.jsxs(jG,{required:p,scope:t,trigger:b,onTriggerChange:y,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:j,onValueNodeHasChildrenChange:N,contentId:Fr(),value:I,onValueChange:R,open:E,onOpenChange:_,dir:S,triggerPointerDownPosRef:T,disabled:f,children:[s.jsx(Tg.Provider,{scope:t,children:s.jsx(NG,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(O=>{A(P=>new Set(P).add(O))},[]),onNativeOptionRemove:h.useCallback(O=>{A(P=>{const M=new Set(P);return M.delete(O),M})},[]),children:r})}),k?s.jsxs(fI,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:m,value:I,onChange:O=>R(O.target.value),disabled:f,form:v,children:[I===void 0?s.jsx("option",{value:""}):null,Array.from(C)]},L):null]})})};
vendor: 16,816 bytes, line 740
740VA.displayName=Rl;var HA="SelectTrigger",qA=h.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...a}=e,i=Ig(r),o=$o(HA,r),l=o.disabled||n,c=Ye(t,o.onTriggerChange),d=Ag(r),u=h.useRef("touch"),[m,f,p]=gI(g=>{const b=d().filter(w=>!w.disabled),y=b.find(w=>w.value===o.value),x=xI(b,g,y);x!==void 0&&o.onValueChange(x.value)}),v=g=>{l||(o.onOpenChange(!0),p()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return s.jsx(Wm,{asChild:!0,...i,children:s.jsx(Ce.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":pI(o.value)?"":void 0,...a,ref:c,onClick:pe(a.onClick,g=>{g.currentTarget.focus(),u.current!=="mouse"&&v(g)}),onPointerDown:pe(a.onPointerDown,g=>{u.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:pe(a.onKeyDown,g=>{const b=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(b&&g.key===" ")&&yG.includes(g.key)&&(v(),g.preventDefault())})})})});qA.displayName=HA;var GA="SelectValue",YA=h.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:a,children:i,placeholder:o="",...l}=e,c=$o(GA,r),{onValueNodeHasChildrenChange:d}=c,u=i!==void 0,m=Ye(t,c.onValueNodeChange);return is(()=>{d(u)},[d,u]),s.jsx(Ce.span,{...l,ref:m,style:{pointerEvents:"none"},children:pI(c.value)?s.jsx(s.Fragment,{children:o}):i})});YA.displayName=GA;var kG="SelectIcon",KA=h.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...a}=e;return s.jsx(Ce.span,{"aria-hidden":!0,...a,ref:t,children:n||"â¼"})});KA.displayName=kG;var SG="SelectPortal",QA=e=>s.jsx(kd,{asChild:!0,...e});QA.displayName=SG;var Ml="SelectContent",XA=h.forwardRef((e,t)=>{const r=$o(Ml,e.__scopeSelect),[n,a]=h.useState();if(is(()=>{a(new DocumentFragment)},[]),!r.open){const i=n;return i?Ll.createPortal(s.jsx(JA,{scope:e.__scopeSelect,children:s.jsx(Tg.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),i):null}return s.jsx(ZA,{...e,ref:t})});XA.displayName=Ml;var Un=10,[JA,Uo]=Bd(Ml),CG="SelectContentImpl",EG=wo("SelectContent.RemoveScroll"),ZA=h.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:v,hideWhenDetached:g,avoidCollisions:b,...y}=e,x=$o(Ml,r),[w,j]=h.useState(null),[N,S]=h.useState(null),E=Ye(t,B=>j(B)),[_,I]=h.useState(null),[R,T]=h.useState(null),k=Ag(r),[C,A]=h.useState(!1),L=h.useRef(!1);h.useEffect(()=>{if(w)return vg(w)},[w]),gg();const O=h.useCallback(B=>{const[le,...J]=k().map(re=>re.ref.current),[K]=J.slice(-1),Z=document.activeElement;for(const re of B)if(re===Z||(re==null||re.scrollIntoView({block:"nearest"}),re===le&&N&&(N.scrollTop=0),re===K&&N&&(N.scrollTop=N.scrollHeight),re==null||re.focus(),document.activeElement!==Z))return},[k,N]),P=h.useCallback(()=>O([_,w]),[O,_,w]);h.useEffect(()=>{C&&P()},[C,P]);const{onOpenChange:M,triggerPointerDownPosRef:D}=x;h.useEffect(()=>{if(w){let B={x:0,y:0};const le=K=>{var Z,re;B={x:Math.abs(Math.round(K.pageX)-(((Z=D.current)==null?void 0:Z.x)??0)),y:Math.abs(Math.round(K.pageY)-(((re=D.current)==null?void 0:re.y)??0))}},J=K=>{B.x<=10&&B.y<=10?K.preventDefault():w.contains(K.target)||M(!1),document.removeEventListener("pointermove",le),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,M,D]),h.useEffect(()=>{const B=()=>M(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[M]);const[$,W]=gI(B=>{const le=k().filter(Z=>!Z.disabled),J=le.find(Z=>Z.ref.current===document.activeElement),K=xI(le,B,J);K&&setTimeout(()=>K.ref.current.focus())}),X=h.useCallback((B,le,J)=>{const K=!L.current&&!J;(x.value!==void 0&&x.value===le||K)&&(I(B),K&&(L.current=!0))},[x.value]),q=h.useCallback(()=>w==null?void 0:w.focus(),[w]),H=h.useCallback((B,le,J)=>{const K=!L.current&&!J;(x.value!==void 0&&x.value===le||K)&&T(B)},[x.value]),se=n==="popper"?vb:eI,te=se===vb?{side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:v,hideWhenDetached:g,avoidCollisions:b}:{};return s.jsx(JA,{scope:r,content:w,viewport:N,onViewportChange:S,itemRefCallback:X,selectedItem:_,onItemLeave:q,itemTextRefCallback:H,focusSelectedItem:P,selectedItemText:R,position:n,isPositioned:C,searchRef:$,children:s.jsx(Km,{as:EG,allowPinchZoom:!0,children:s.jsx(Ym,{asChild:!0,trapped:x.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:pe(a,B=>{var le;(le=x.trigger)==null||le.focus({preventScroll:!0}),B.preventDefault()}),children:s.jsx(Fl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:s.jsx(se,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:B=>B.preventDefault(),...y,...te,onPlaced:()=>A(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:pe(y.onKeyDown,B=>{const le=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!le&&B.key.length===1&&W(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let K=k().filter(Z=>!Z.disabled).map(Z=>Z.ref.current);if(["ArrowUp","End"].includes(B.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const Z=B.target,re=K.indexOf(Z);K=K.slice(re+1)}setTimeout(()=>O(K)),B.preventDefault()}})})})})})})});ZA.displayName=CG;var PG="SelectItemAlignedPosition",eI=h.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...a}=e,i=$o(Ml,r),o=Uo(Ml,r),[l,c]=h.useState(null),[d,u]=h.useState(null),m=Ye(t,E=>u(E)),f=Ag(r),p=h.useRef(!1),v=h.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:y,focusSelectedItem:x}=o,w=h.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&d&&g&&b&&y){const E=i.trigger.getBoundingClientRect(),_=d.getBoundingClientRect(),I=i.valueNode.getBoundingClientRect(),R=y.getBoundingClientRect();if(i.dir!=="rtl"){const Z=R.left-_.left,re=I.left-Z,de=E.left-re,Pe=E.width+de,Ee=Math.max(Pe,_.width),tt=window.innerWidth-Un,ze=xb(re,[Un,Math.max(Un,tt-Ee)]);l.style.minWidth=Pe+"px",l.style.left=ze+"px"}else{const Z=_.right-R.right,re=window.innerWidth-I.right-Z,de=window.innerWidth-E.right-re,Pe=E.width+de,Ee=Math.max(Pe,_.width),tt=window.innerWidth-Un,ze=xb(re,[Un,Math.max(Un,tt-Ee)]);l.style.minWidth=Pe+"px",l.style.right=ze+"px"}const T=f(),k=window.innerHeight-Un*2,C=g.scrollHeight,A=window.getComputedStyle(d),L=parseInt(A.borderTopWidth,10),O=parseInt(A.paddingTop,10),P=parseInt(A.borderBottomWidth,10),M=parseInt(A.paddingBottom,10),D=L+O+C+M+P,$=Math.min(b.offsetHeight*5,D),W=window.getComputedStyle(g),X=parseInt(W.paddingTop,10),q=parseInt(W.paddingBottom,10),H=E.top+E.height/2-Un,se=k-H,te=b.offsetHeight/2,B=b.offsetTop+te,le=L+O+B,J=D-le;if(le<=H){const Z=T.length>0&&b===T[T.length-1].ref.current;l.style.bottom="0px";const re=d.clientHeight-g.offsetTop-g.offsetHeight,de=Math.max(se,te+(Z?q:0)+re+P),Pe=le+de;l.style.height=Pe+"px"}else{const Z=T.length>0&&b===T[0].ref.current;l.style.top="0px";const de=Math.max(H,L+g.offsetTop+(Z?X:0)+te)+J;l.style.height=de+"px",g.scrollTop=le-H+g.offsetTop}l.style.margin=`${Un}px 0`,l.style.minHeight=$+"px",l.style.maxHeight=k+"px",n==null||n(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,l,d,g,b,y,i.dir,n]);is(()=>w(),[w]);const[j,N]=h.useState();is(()=>{d&&N(window.getComputedStyle(d).zIndex)},[d]);const S=h.useCallback(E=>{E&&v.current===!0&&(w(),x==null||x(),v.current=!1)},[w,x]);return s.jsx(AG,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:s.jsx(Ce.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});eI.displayName=PG;var TG="SelectPopperPosition",vb=h.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:a=Un,...i}=e,o=Ig(r);return s.jsx(rg,{...o,...i,ref:t,align:n,collisionPadding:a,style:{boxSizing:"border-box",...i.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)"}})});vb.displayName=TG;var[AG,hj]=Bd(Ml,{}),yb="SelectViewport",tI=h.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...a}=e,i=Uo(yb,r),o=hj(yb,r),l=Ye(t,i.onViewportChange),c=h.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),s.jsx(Tg.Slot,{scope:r,children:s.jsx(Ce.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:pe(a.onScroll,d=>{const u=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&m){const p=Math.abs(c.current-u.scrollTop);if(p>0){const v=window.innerHeight-Un*2,g=parseFloat(m.style.minHeight),b=parseFloat(m.style.height),y=Math.max(g,b);if(y<v){const x=y+p,w=Math.min(v,x),j=x-w;m.style.height=w+"px",m.style.bottom==="0px"&&(u.scrollTop=j>0?j:0,m.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});tI.displayName=yb;var sI="SelectGroup",[IG,RG]=Bd(sI),MG=h.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=Fr();return s.jsx(IG,{scope:r,id:a,children:s.jsx(Ce.div,{role:"group","aria-labelledby":a,...n,ref:t})})});MG.displayName=sI;var rI="SelectLabel",nI=h.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=RG(rI,r);return s.jsx(Ce.div,{id:a.id,...n,ref:t})});nI.displayName=rI;var hp="SelectItem",[OG,aI]=Bd(hp),iI=h.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:a=!1,textValue:i,...o}=e,l=$o(hp,r),c=Uo(hp,r),d=l.value===n,[u,m]=h.useState(i??""),[f,p]=h.useState(!1),v=Ye(t,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,n,a)}),g=Fr(),b=h.useRef("touch"),y=()=>{a||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(OG,{scope:r,value:n,disabled:a,textId:g,isSelected:d,onItemTextChange:h.useCallback(x=>{m(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:s.jsx(Tg.ItemSlot,{scope:r,value:n,disabled:a,textValue:u,children:s.jsx(Ce.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":d&&f,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...o,ref:v,onFocus:pe(o.onFocus,()=>p(!0)),onBlur:pe(o.onBlur,()=>p(!1)),onClick:pe(o.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:pe(o.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:pe(o.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:pe(o.onPointerMove,x=>{var w;b.current=x.pointerType,a?(w=c.onItemLeave)==null||w.call(c):b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:pe(o.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:pe(o.onKeyDown,x=>{var j;((j=c.searchRef)==null?void 0:j.current)!==""&&x.key===" "||(bG.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});iI.displayName=hp;var yu="SelectItemText",oI=h.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:a,...i}=e,o=$o(yu,r),l=Uo(yu,r),c=aI(yu,r),d=_G(yu,r),[u,m]=h.useState(null),f=Ye(t,y=>m(y),c.onItemTextChange,y=>{var x;return(x=l.itemTextRefCallback)==null?void 0:x.call(l,y,c.value,c.disabled)}),p=u==null?void 0:u.textContent,v=h.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=d;return is(()=>(g(v),()=>b(v)),[g,b,v]),s.jsxs(s.Fragment,{children:[s.jsx(Ce.span,{id:c.textId,...i,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ll.createPortal(i.children,o.valueNode):null]})});oI.displayName=yu;var lI="SelectItemIndicator",cI=h.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return aI(lI,r).isSelected?s.jsx(Ce.span,{"aria-hidden":!0,...n,ref:t}):null});cI.displayName=lI;var bb="SelectScrollUpButton",dI=h.forwardRef((e,t)=>{const r=Uo(bb,e.__scopeSelect),n=hj(bb,e.__scopeSelect),[a,i]=h.useState(!1),o=Ye(t,n.onScrollButtonChange);return is(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollTop>0;i(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?s.jsx(mI,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});dI.displayName=bb;var wb="SelectScrollDownButton",uI=h.forwardRef((e,t)=>{const r=Uo(wb,e.__scopeSelect),n=hj(wb,e.__scopeSelect),[a,i]=h.useState(!1),o=Ye(t,n.onScrollButtonChange);return is(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<d;i(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?s.jsx(mI,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});uI.displayName=wb;var mI=h.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...a}=e,i=Uo("SelectScrollButton",r),o=h.useRef(null),l=Ag(r),c=h.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return h.useEffect(()=>()=>c(),[c]),is(()=>{var u;const d=l().find(m=>m.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[l]),s.jsx(Ce.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:pe(a.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:pe(a.onPointerMove,()=>{var d;(d=i.onItemLeave)==null||d.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:pe(a.onPointerLeave,()=>{c()})})}),DG="SelectSeparator",hI=h.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return s.jsx(Ce.div,{"aria-hidden":!0,...n,ref:t})});hI.displayName=DG;var jb="SelectArrow",LG=h.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=Ig(r),i=$o(jb,r),o=Uo(jb,r);return i.open&&o.position==="popper"?s.jsx(ng,{...a,...n,ref:t}):null});LG.displayName=jb;var FG="SelectBubbleInput",fI=h.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const a=h.useRef(null),i=Ye(n,a),o=kg(t);return h.useEffect(()=>{const l=a.current;if(!l)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&u){const m=new Event("change",{bubbles:!0});u.call(l,t),l.dispatchEvent(m)}},[o,t]),s.jsx(Ce.select,{...r,style:{...DC,...r.style},ref:i,defaultValue:t})});fI.displayName=FG;function pI(e){return e===""||e===void 0}function gI(e){const t=rs(e),r=h.useRef(""),n=h.useRef(0),a=h.useCallback(o=>{const l=r.current+o;t(l),function c(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),i=h.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,a,i]}function xI(e,t,r){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=$G(e,Math.max(i,0));a.length===1&&(o=o.filter(d=>d!==r));const c=o.find(d=>d.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==r?c:void 0}function $G(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var UG=VA,vI=qA,BG=YA,zG=KA,WG=QA,yI=XA,VG=tI,bI=nI,wI=iI,HG=oI,qG=cI,jI=dI,NI=uI,_I=hI;const ql=UG,Gl=BG,Bo=h.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(vI,{ref:n,className:me("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
740ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,s.jsx(zG,{asChild:!0,children:s.jsx($l,{className:"h-4 w-4 opacity-50"})})]}));Bo.displayName=vI.displayName;const kI=h.forwardRef(({className:e,...t},r)=>s.jsx(jI,{ref:r,className:me("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(L0,{className:"h-4 w-4"})}));kI.displayName=jI.displayName;const SI=h.forwardRef(({className:e,...t},r)=>s.jsx(NI,{ref:r,className:me("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx($l,{className:"h-4 w-4"})}));SI.displayName=NI.displayName;const zo=h.forwardRef(({className:e,children:t,position:r="popper",...n},a)=>s.jsx(WG,{children:s.jsxs(yI,{ref:a,className:me("relative z-[80] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[s.jsx(kI,{}),s.jsx(VG,{className:me("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(SI,{})]})}));zo.displayName=yI.displayName;const GG=h.forwardRef(({className:e,...t},r)=>s.jsx(bI,{ref:r,className:me("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));GG.displayName=bI.displayName;const sr=h.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(wI,{ref:n,className:me("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),...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(qG,{children:s.jsx(Ar,{className:"h-4 w-4"})})}),s.jsx(HG,{children:t})]}));sr.displayName=wI.displayName;const YG=h.forwardRef(({className:e,...t},r)=>s.jsx(_I,{ref:r,className:me("-mx-1 my-1 h-px bg-muted",e),...t}));YG.displayName=_I.displayName;const KG=({userId:e,onUpdate:t})=>{const[r,n]=h.useState(!1),[a,i]=h.useState("none"),[o,l]=h.useState(!1),[c,d]=h.useState([]),[u,m]=h.useState(null),{refreshUserBadge:f}=tP();h.useEffect(()=>{p(),v()},[e]);const p=async()=>{try{const{data:y,error:x}=await U.from("badge_rules").select("*").eq("is_active",!0).order("priority");if(x)throw x;d(y||[])}catch(y){console.error("Error fetching badge rules:",y)}},v=async()=>{try{const{data:y,error:x}=await U.from("user_badges").select(` 741 badge_rule_id, 742 badge_rule:badge_rules(*) 743 `).eq("user_id",e).maybeSingle();if(x)throw x;m(y),i((y==null?void 0:y.badge_rule_id)||"none")}catch(y){console.error("Error fetching current badge:",y)}},g=async()=>{l(!0);try{if(a==="none"){const{error:y}=await U.rpc("assign_user_badge",{_user_id:e,_badge_rule_id:null});if(y)throw y}else{const{error:y}=await U.rpc("assign_user_badge",{_user_id:e,_badge_rule_id:a});if(y)throw y}Dt.success("Badge updated successfully"),n(!1),t(),f(e),v()}catch(y){console.error("Error updating badge:",y),Dt.error(`Failed to update badge: ${y.message}`)}finally{l(!1)}},b=()=>{i((u==null?void 0:u.badge_rule_id)||"none"),n(!1)};return r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(ql,{value:a,onValueChange:i,children:[s.jsx(Bo,{className:"w-48",children:s.jsx(Gl,{})}),s.jsxs(zo,{children:[s.jsx(sr,{value:"none",children:s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:"No Badge"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Remove badge"})]})})}),c.map(y=>s.jsx(sr,{value:y.id,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-lg",children:y.emoji}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:y.name}),s.jsxs("div",{className:"text-xs text-muted-foreground",children:[y.point_threshold," points"]})]})]})},y.id))]})]}),s.jsx(F,{size:"sm",onClick:g,disabled:o||a===((u==null?void 0:u.badge_rule_id)||"none"),className:"px-2",children:s.jsx(U0,{className:"h-3 w-3"})}),s.jsx(F,{size:"sm",variant:"outline",onClick:b,disabled:o,className:"px-2",children:s.jsx(qr,{className:"h-3 w-3"})})]}):s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex items-center gap-2",children:u!=null&&u.badge_rule?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-lg",children:u.badge_rule.emoji}),s.jsx("span",{className:"text-sm font-medium",children:u.badge_rule.name})]}):s.jsx("span",{className:"text-muted-foreground",children:"No Badge"})}),s.jsx(F,{size:"sm",variant:"ghost",onClick:()=>n(!0),className:"px-2",children:s.jsx(H5,{className:"h-3 w-3"})})]})},QG=({userId:e,stripeData:t,onDataUpdate:r})=>{const[n,a]=h.useState(!1),{toast:i}=at(),o=async()=>{a(!0);try{const{data:u,error:m}=await U.functions.invoke("sync-user-stripe-data",{body:{userId:e}});if(m)throw new Error(m.message);i({title:"Success",description:"Stripe data synced successfully"}),r()}catch(u){console.error("Error syncing Stripe data:",u),i({title:"Error",description:(u==null?void 0:u.message)||"Failed to sync Stripe data",variant:"destructive"})}finally{a(!1)}},l=u=>new Intl.NumberFormat("en-US",{style:"currency",currency:"EUR"}).format(u/100),c=u=>(typeof u=="string"?new Date(u):new Date(u*1e3)).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),d=u=>{const m={active:{color:"bg-green-100 text-green-800",label:"Active"},trialing:{color:"bg-blue-100 text-blue-800",label:"Trial"},canceled:{color:"bg-red-100 text-red-800",label:"Canceled"},past_due:{color:"bg-yellow-100 text-yellow-800",label:"Past Due"},incomplete:{color:"bg-gray-100 text-gray-800",label:"Incomplete"}}
743,f=m[u]||m.incomplete;return s.jsx(ye,{className:f.color,children:f.label})};return s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(Ir,{className:"h-5 w-5"}),"Stripe Customer Data"]}),s.jsxs(F,{variant:"outline",size:"sm",onClick:o,disabled:n,children:[s.jsx(Yt,{className:`h-4 w-4 mr-2 ${n?"animate-spin":""}`}),n?"Syncing...":"Sync Data"]})]})}),s.jsxs(ce,{children:[!t&&s.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[s.jsx(Ir,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),s.jsx("p",{children:"No Stripe data available"}),s.jsxs(F,{variant:"outline",onClick:o,disabled:n,className:"mt-4",children:[s.jsx(Yt,{className:`h-4 w-4 mr-2 ${n?"animate-spin":""}`}),"Sync Stripe Data"]})]}),t&&s.jsxs(Si,{defaultValue:"overview",className:"w-full",children:[s.jsxs(Ci,{className:"grid w-full grid-cols-4",children:[s.jsx(Pt,{value:"overview",children:"Overview"}),s.jsx(Pt,{value:"payments",children:"Payments"}),s.jsx(Pt,{value:"subscriptions",children:"Subscriptions"}),s.jsx(Pt,{value:"billing",children:"Billing"})]}),s.jsxs(it,{value:"overview",className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(oe,{children:s.jsx(ce,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Bm,{className:"h-8 w-8 text-green-600"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Lifetime Value"}),s.jsx("p",{className:"text-2xl font-bold",children:t.lifetime_value_cents?l(t.lifetime_value_cents):"â¬0.00"})]})]})})}),s.jsx(oe,{children:s.jsx(ce,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(hy,{className:"h-8 w-8 text-blue-600"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Total Invoices"}),s.jsx("p",{className:"text-2xl font-bold",children:t.invoice_count||0})]})]})})}),s.jsx(oe,{children:s.jsx(ce,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ms,{className:"h-8 w-8 text-purple-600"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Last Payment"}),s.jsx("p",{className:"text-sm font-semibold",children:t.last_payment_date?c(t.last_payment_date):"No payments"})]})]})})})]}),t.failed_payment_count&&t.failed_payment_count>0&&s.jsx(oe,{className:"border-red-200 bg-red-50",children:s.jsx(ce,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-2 w-2 bg-red-500 rounded-full"}),s.jsxs("p",{className:"text-sm text-red-700",children:[t.failed_payment_count," failed payment attempts"]})]})})})]}),s.jsx(it,{value:"payments",className:"space-y-4",children:s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"font-semibold",children:"Payment Methods"}),t.payment_methods&&t.payment_methods.length>0?s.jsx("div",{className:"space-y-2",children:t.payment_methods.map(u=>s.jsx(oe,{children:s.jsx(ce,{className:"pt-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ir,{className:"h-5 w-5 text-muted-foreground"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"font-medium",children:u.card?`${u.card.brand.toUpperCase()} â¢â¢â¢â¢ ${u.card.last4}`:u.type}),u.card&&s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Expires ",u.card.exp_month,"/",u.card.exp_year]})]})]})})},u.id))}):s.jsx("p",{className:"text-muted-foreground",children:"No payment methods found"})]})}),s.jsx(it,{value:"subscriptions",className:"space-y-4",children:s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"font-semibold",children:"Subscription History"}),t.subscription_history&&t.subscription_history.length>0?s.jsx("div",{className:"space-y-3",children:t.subscription_history.map(u=>s.jsx(oe,{children:s.jsx(ce,{className:"pt-4",children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("p",{className:"font-medium",children:["Subscription ",u.id.slice(-8)]}),d(u.status)]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:c(u.created)})]}
743),u.items&&u.items.length>0&&s.jsxs("div",{className:"text-sm text-muted-foreground",children:[l(u.items[0].amount)," / ",u.items[0].interval||"month"]}),u.current_period_start&&u.current_period_end&&s.jsxs("div",{className:"text-sm text-muted-foreground",children:["Period: ",c(u.current_period_start)," - ",c(u.current_period_end)]}),u.canceled_at&&s.jsxs("div",{className:"text-sm text-red-600",children:["Canceled on ",c(u.canceled_at)]}),u.cancel_at_period_end&&s.jsx("div",{className:"text-sm text-orange-600",children:"Will cancel at period end"})]})})},u.id))}):s.jsx("p",{className:"text-muted-foreground",children:"No subscription history found"})]})}),s.jsx(it,{value:"billing",className:"space-y-4",children:s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"font-semibold",children:"Billing Address"}),t.billing_address&&Object.keys(t.billing_address).length>0?s.jsx(oe,{children:s.jsx(ce,{className:"pt-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(mE,{className:"h-5 w-5 text-muted-foreground mt-0.5"}),s.jsxs("div",{className:"space-y-1",children:[t.billing_address.line1&&s.jsx("p",{children:t.billing_address.line1}),t.billing_address.line2&&s.jsx("p",{children:t.billing_address.line2}),s.jsx("p",{children:[t.billing_address.city,t.billing_address.state,t.billing_address.postal_code].filter(Boolean).join(", ")}),t.billing_address.country&&s.jsx("p",{children:t.billing_address.country})]})]})})}):s.jsx("p",{className:"text-muted-foreground",children:"No billing address found"}),t.customer_metadata&&Object.keys(t.customer_metadata).length>0&&s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"font-semibold",children:"Customer Metadata"}),s.jsx(oe,{children:s.jsx(ce,{className:"pt-4",children:s.jsx("div",{className:"space-y-2",children:Object.entries(t.customer_metadata).map(([u,m])=>s.jsxs("div",{className:"flex justify-between",children:[s.jsxs("span",{className:"text-sm font-medium",children:[u,":"]}),s.jsx("span",{className:"text-sm text-muted-foreground",children:String(m)})]},u))})})})]})]})})]}),t&&t.last_sync_at&&s.jsxs("div",{className:"mt-4 pt-4 border-t text-xs text-muted-foreground",children:["Last synced: ",c(t.last_sync_at)]})]})]})},xk=()=>{var I;const{userId:e}=la(),{user:t,loading:r}=jt(),{toast:n}=at(),a=qe(),[i,o]=h.useState(null),[l,c]=h.useState(null),[d,u]=h.useState(null),[m,f]=h.useState("none"),[p,v]=h.useState(!0),[g,b]=h.useState(!1);h.useState(!1);const[y,x]=h.useState(!1),[w,j]=h.useState("none");h.useEffect(()=>{(async()=>{if(!r){if(!t){a("/auth");return}try{const{data:T,error:k}=await U.from("user_roles").select("role").eq("user_id",t.id).maybeSingle();if(k||(T==null?void 0:T.role)!=="admin"){n({title:"Access Denied",description:"You don't have permission to view user profiles.",variant:"destructive"}),a("/");return}if(b(!0),!e){a("/admin");return}await N(e),await S(e),await E(e)}catch(T){console.error("Error checking admin status:",T),v(!1)}}})()},[t,r,e,a,n]);const N=async R=>{try{v(!0);const{data:T,error:k}=await U.from("profiles").select("*").eq("user_id",R).single();if(k){console.error("Error loading user profile:",k),n({title:"Error",description:"Failed to load user profile.",variant:"destructive"});return}const{data:C,error:A}=await U.from("subscribers").select("*").eq("user_id",R).single();let L=null,O=A;O&&console.error("Error loading subscription data:",O);const P=C;let M="none";P&&(P.is_admin_free_access?M="free":P.is_trial?M="trial":P.subscribed?M="active":P.subscription_end&&(M="expired")),P&&(console.log("Subscriber data:",P),c({subscription_status:M,subscription_tier:P.subscription_tier,subscription_end:P.subscription_end,subscribed:P.subscribed,is_trial:P.is_trial,stripe_customer_id:P.stripe_customer_id,is_admin_free_access:P.is_admin_free_access}));const D=P!=null&&P.lifetime_value_cents?P.lifetime_value_cents/100:0,$={...T,subscription_status:M,subscription_tier:P==null?void 0:P.subscription_tier,subscription_end:P==null?void 0:P.subscription_end,lifetime_value:D,lifetime_value_cents:P==null?void 0:P.lifetime_value_cents,payment_methods:(P==null?void 0:P.payment_methods)||[],billing_address:(P==null?void 0:P.billing_address)||{},customer_metadata:(P==null?void 0:P.customer_metadata)||{},last_payment_date:P==null?void 0:P.last_payment_date,subscription_history:(P==null?void 0:P.subscription_history)||[],invoice_count:P==null?void 0:P.invoice_count,failed_payment_count:P==null?void 0:P.failed_payment_count,last_sync_at:P==null?void 0:P.last_sync_at};o($)}catch(T){console.error("Error loading user details:",T),n({title:"Error",description:"Failed to load user details.",variant:"destructive"})}finally{v(!1)}},S=async R=>{try{const{data:T,error:k}=await U.rpc("get_user_activity_stats",{_user_id:R});if(k)throw k;T&&T.length>0&&u(T[0])}catch(T){console.error("Error loading user stats:",T)}},E=async R=>{var T;try{const{data:k,error:C}=await U.rpc("get_user_ranking",{_user_id:R});C&&console.error("Error from get_user_ranking:",C);const{data:A,error:L}=await U.from("user_badge_history").select("badge_level").eq("user_id",R).eq("is_active",!0).order("earned_at",{ascending:!1}).limit(1).maybeSingle();L&&L.code!=="PGRST116"&&console.error("Error from user_badge_history:",L);let O="none";k&&k.length>0&&k[0].current_badge!=="none"?O=k[0].current_badge:A!=null&&A.badge_level&&(O=A.badge_level),f(O),j(O),console.log("Badge calculation for user:",R,{rankingBadge:((T
743=k==null?void 0:k[0])==null?void 0:T.current_badge)||"none",storedBadge:(A==null?void 0:A.badge_level)||"none",finalBadge:O})}catch(k){console.error("Error loading current badge:",k)}},_=()=>{e&&(N(e),S(e),E(e))};return p?s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fe,{isMenuOpen:y,onMenuToggle:()=>x(R=>!R)}),s.jsx("main",{className:"container mx-auto px-4 py-8 mt-20",children:s.jsx("div",{className:"text-center",children:"Loading user profile..."})}),s.jsx(Be,{})]}):i?s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fe,{isMenuOpen:y,onMenuToggle:()=>x(R=>!R)}),s.jsxs("main",{className:"container mx-auto px-4 py-8 mt-20",children:[s.jsxs("div",{className:"mb-6",children:[s.jsxs(F,{variant:"outline",onClick:()=>a("/admin/users"),className:"mb-4",children:[s.jsx(as,{className:"h-4 w-4 mr-2"}),"Back to Users"]}),s.jsx(oe,{className:"mb-6",children:s.jsx(ce,{className:"pt-6",children:s.jsxs("div",{className:"flex items-start gap-6",children:[s.jsx(Po,{userId:e,avatarUrl:i.avatar_url,firstName:i.first_name,lastName:i.last_name,email:i.email,className:"h-20 w-20"}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsxs("h1",{className:"text-3xl font-bold",children:[i.first_name," ",i.last_name,i.nickname&&s.jsxs("span",{className:"text-muted-foreground",children:["(",i.nickname,")"]})]}),m!=="none"&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-2xl",children:m==="gold"?"ð":m==="crown"?"ð":m==="rocket"?"ð":""}),s.jsx("span",{className:"text-sm font-medium",children:m==="gold"?"Gold Member":m==="crown"?"Royal Member":m==="rocket"?"Rising Star":""})]})]}),s.jsx("p",{className:"text-muted-foreground mb-1",children:i.email}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Member since ",new Date(i.created_at).toLocaleDateString()]})]}),l&&s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 min-w-[400px]",children:[s.jsxs("div",{className:`text-center p-3 rounded-lg border ${l.is_admin_free_access?"bg-emerald-50 border-emerald-200":"bg-primary/10"}`,children:[s.jsx("div",{className:`text-lg font-bold ${l.is_admin_free_access?"text-emerald-700":"text-primary"}`,children:l.is_admin_free_access||l.subscription_status==="free"?"FREE ACCESS":l.subscription_status==="active"?"ACTIVE":l.subscription_status==="trial"?"TRIAL":l.subscription_status==="expired"?"EXPIRED":"NONE"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:l.is_admin_free_access?"Admin Granted":"Status"})]}),s.jsxs("div",{className:"text-center p-3 bg-secondary/10 rounded-lg border",children:[s.jsx("div",{className:"text-lg font-bold text-secondary-foreground",children:l.is_admin_free_access?"Admin Free Access":l.subscription_tier||"No Plan"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Plan"})]}),s.jsxs("div",{className:"text-center p-3 bg-green-50 border-green-200 rounded-lg border",children:[s.jsxs("div",{className:"text-lg font-bold text-green-700",children:["â¬",((I=i.lifetime_value)==null?void 0:I.toFixed(2))||"0.00"]}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Lifetime Value"})]}),s.jsxs("div",{className:"text-center p-3 bg-blue-50 border-blue-200 rounded-lg border",children:[s.jsx("div",{className:"text-lg font-bold text-blue-700",children:i.invoice_count||0}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Invoices"})]})]}),i.failed_payment_count&&i.failed_payment_count>0&&s.jsx("div",{className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-lg",children:s.jsxs("div",{className:"flex items-center gap-2 text-red-700",children:[s.jsx("div",{className:"h-2 w-2 bg-red-500 rounded-full"}),s.jsxs("span",{className:"text-sm font-medium",children:[i.failed_payment_count," failed payment attempts"]})]})}),i.last_payment_date&&s.jsx("div",{className:"mt-4 p-3 bg-gray-50 border border-gray-200 rounded-lg",children:s.jsxs("div",{className:"flex items-center gap-2 text-gray-700",children:[s.jsx(Ra,{className:"h-4 w-4"}),s.jsxs("span",{className:"text-sm",children:["Last payment: ",new Date(i.last_payment_date).toLocaleDateString()]})]})})]})})})]}),s.jsxs(Si,{defaultValue:"overview",className:"space-y-6",children:[s.jsxs(Ci,{className:"grid w-full grid-cols-6",children:[s.jsxs(Pt,{value:"overview",className:"flex items-center gap-2",children:[s.jsx(Nn,{className:"h-4 w-4"}),"Overview"]}),s.jsxs(Pt,{value:"membership",className:"flex items-center gap-2",children:[s.jsx(Ir,{className:"h-4 w-4"}),"Membership"]}),s.jsxs(Pt,{value:"activity",className:"flex items-center gap-2",children:[s.jsx(aE,{className:"h-4 w-4"}),"Activity"]}),s.jsxs(Pt,{value:"badges",className:"flex items-center gap-2",children:[s.jsx(id,{className:"h-4 w-4"}),"Badges"]}),s.jsxs(Pt,{value:"watch-history",className:"flex items-center gap-2",children:[s.jsx(hy,{className:"h-4 w-4"}),"History"]}),s.jsxs(Pt,{value:"settings",className:"flex items-center gap-2",children:[s.jsx(B0,{className:"h-4 w-4"}),"Settings"]})]}),s.jsx(it,{value:"overview",className:"space-y-6",children:s.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[s.jsx(vG,{userDetails:i,onUpdate:_}),s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(R5,{className:"h-5 w-5"}),"Quick Stats"]})}),s.jsx(ce,{className:"space-y-4",children:d?s.jsxs("div",{className:"grid gap-3",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Total Activities:"}),s.jsx("span",{className:"font-semibold",children:d.workouts_done+d.podcasts_heard+d.recipes_done})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Community Posts:"}),s.jsx("span",{className:"font-semibold",children:d.posts_made})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Likes Given:"}),s.jsx("span",{className:"font-semibold",children:d.posts_liked})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Current Badge:"}),g?s.jsx(KG,{userId:e,onUpdate:_}):s.jsx("div",{children:m!=="none"?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-lg",children:m==="gold"?"ð":m==="crown"?"ð":m==="rocket"?"ð":""}),s.jsx("span",{className:"text-sm font-medium",children:m==="gold"?"Gold Member":m==="crown"?"Royal Member":m==="rocket"?"Rising Star":""})]}):s.jsx(ye,{variant:"outline",children:"No Badge"})})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Member Since:"}),s.jsx("span",{className:"font-semibold",children:new Date(i.created_at).toLocaleDateString()})]})]}):s.jsx("div",{className:"text-center py-4",children:s.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary mx-auto"})})})]})]})}),s.jsxs(it,{value:"membership",className:"space-y-6",children:[l?s.jsx(gb,{userId:e,userEmail:(i==null?void 0:i.email)||"",membershipData:l,onUpdate:_}):s.jsx(gb,{userId:e,userEmail:(i==null?void 0:i.email)||"",membershipData:{subscription_status:"none",subscription_tier:null,subscription_end:null,
743subscribed:!1,is_trial:!1,stripe_customer_id:null,is_admin_free_access:!1},onUpdate:_}),s.jsx(QG,{userId:e,stripeData:{lifetime_value_cents:i.lifetime_value_cents,payment_methods:i.payment_methods,billing_address:i.billing_address,customer_metadata:i.customer_metadata,last_payment_date:i.last_payment_date,subscription_history:i.subscription_history,invoice_count:i.invoice_count,failed_payment_count:i.failed_payment_count,last_sync_at:i.last_sync_at},onDataUpdate:_}),s.jsx(dA,{userId:e,memberSince:i.created_at})]}),s.jsx(it,{value:"activity",className:"space-y-6",children:s.jsx(xG,{userId:e})}),s.jsx(it,{value:"watch-history",className:"space-y-6",children:s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(hy,{className:"h-5 w-5"}),"Watch History"]})}),s.jsx(ce,{children:s.jsx(cA,{userId:e})})]})}),s.jsx(it,{value:"settings",className:"space-y-6",children:s.jsx(pG,{userId:e,userEmail:i.email})})]})]}),s.jsx(Be,{})]}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fe,{isMenuOpen:y,onMenuToggle:()=>x(R=>!R)}),s.jsx("main",{className:"container mx-auto px-4 py-8 mt-20",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"text-2xl font-bold mb-4",children:"User Not Found"}),s.jsx(F,{onClick:()=>a("/admin"),children:"Back to Admin"})]})}),s.jsx(Be,{})]})},XG=({isOpen:e,onClose:t,title:r,children:n,size:a="medium",showHandle:i=!0})=>{const{isNative:o}=gw(),{lightImpact:l,selectionChanged:c}=xw(),[d,u]=h.useState(!1),m=()=>{switch(a){case"small":return"h-1/3";case"medium":return"h-1/2";case"large":return"h-2/3";case"full":return"h-full";default:return"h-1/2"}},f=async()=>{o&&await l(),u(!0),setTimeout(()=>{t(),u(!1)},200)},p=v=>{v.target===v.currentTarget&&f()};return h.useEffect(()=>{e&&o&&c()},[e,o]),e?s.jsxs("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",children:[s.jsx("div",{className:"absolute inset-0",onClick:p}),s.jsxs("div",{className:` 744 absolute bottom-0 left-0 right-0 bg-background rounded-t-3xl shadow-2xl 745 ${m()} 746 ${d?"animate-mobile-slide-down":"animate-mobile-slide-up"} 747 safe-area-inset-bottom 748 `,children:[i&&s.jsx("div",{className:"flex justify-center pt-3 pb-2",children:s.jsx("div",{className:"w-10 h-1 bg-muted-foreground/30 rounded-full"})}),r&&s.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[s.jsx("h2",{className:"text-lg font-semibold",children:r}),s.jsx(F,{variant:"ghost",size:"icon",onClick:f,className:"h-8 w-8 rounded-full",children:s.jsx(qr,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto mobile-scroll p-6",children:n})]})]}):null},zr=h.forwardRef(({className:e,...t},r)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:r,className:me("w-full caption-bottom text-sm",e),...t})}));zr.displayName="Table";const Wr=h.forwardRef(({className:e,...t},r)=>s.jsx("thead",{ref:r,className:me("[&_tr]:border-b",e),...t}));Wr.displayName="TableHeader";const Vr=h.forwardRef(({className:e,...t},r)=>s.jsx("tbody",{ref:r,className:me("[&_tr:last-child]:border-0",e),...t}));Vr.displayName="TableBody";const JG=h.forwardRef(({className:e,...t},r)=>s.jsx("tfoot",{ref:r,className:me("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));JG.displayName="TableFooter";const Lt=h.forwardRef(({className:e,...t},r)=>s.jsx("tr",{ref:r,className:me("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Lt.displayName="TableRow";const Ae=h.forwardRef(({className:e,...t},r)=>s.jsx("th",{ref:r,className:me("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Ae.displayName="TableHead";const Ie=h.forwardRef(({className:e,...t},r)=>s.jsx("td",{ref:r,className:me("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Ie.displayName="TableCell";const ZG=h.forwardRef(({className:e,...t},r)=>s.jsx("caption",{ref:r,className:me("mt-4 text-sm text-muted-foreground",e),...t}));ZG.displayName="TableCaption";var rh=e=>e.type==="checkbox",al=e=>e instanceof Date,hr=e=>e==null;const CI=e=>typeof e=="object";var ps=e=>!hr(e)&&!Array.isArray(e)&&CI(e)&&!al(e),EI=e=>ps(e)&&e.target?rh(e.target)?e.target.checked:e.target.value:e,eY=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,PI=(e,t)=>e.has(eY(t)),tY=e=>{const t=e.constructor&&e.constructor.prototype;return ps(t)&&t.hasOwnProperty("isPrototypeOf")},fj=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ss(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(fj&&(e instanceof Blob||n))&&(r||ps(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!tY(e))t=e;else for(const a in e)e.hasOwnProperty(a)&&(t[a]=Ss(e[a]));else return e;return t}var Rg=e=>/^\w*$/.test(e),ds=e=>
748e===void 0,pj=e=>Array.isArray(e)?e.filter(Boolean):[],gj=e=>pj(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Se=(e,t,r)=>{if(!t||!ps(e))return r;const n=(Rg(t)?[t]:gj(t)).reduce((a,i)=>hr(a)?a:a[i],e);return ds(n)||n===e?ds(e[t])?r:e[t]:n},Jr=e=>typeof e=="boolean",At=(e,t,r)=>{let n=-1;const a=Rg(t)?[t]:gj(t),i=a.length,o=i-1;for(;++n<i;){const l=a[n];let c=r;if(n!==o){const d=e[l];c=ps(d)||Array.isArray(d)?d:isNaN(+a[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=c,e=e[l]}};const fp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Kn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ga={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},xj=ie.createContext(null);xj.displayName="HookFormContext";const Mg=()=>ie.useContext(xj),sY=e=>{const{children:t,...r}=e;return ie.createElement(xj.Provider,{value:r},t)};var TI=(e,t,r,n=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const o=i;return t._proxyFormState[o]!==Kn.all&&(t._proxyFormState[o]=!n||Kn.all),r&&(r[o]=!0),e[o]}});return a};const vj=typeof window<"u"?ie.useLayoutEffect:ie.useEffect;function rY(e){const t=Mg(),{control:r=t.control,disabled:n,name:a,exact:i}=e||{},[o,l]=ie.useState(r._formState),c=ie.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return vj(()=>r._subscribe({name:a,formState:c.current,exact:i,callback:d=>{!n&&l({...r._formState,...d})}}),[a,n,i]),ie.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),ie.useMemo(()=>TI(o,r,c.current,!1),[o,r])}var Ta=e=>typeof e=="string",AI=(e,t,r,n,a)=>Ta(e)?(n&&t.watch.add(e),Se(r,e,a)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),Se(r,i))):(n&&(t.watchAll=!0),r),Nb=e=>hr(e)||!CI(e);function ai(e,t,r=new WeakSet){if(Nb(e)||Nb(t))return e===t;if(al(e)&&al(t))return e.getTime()===t.getTime();const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const i of n){const o=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const l=t[i];if(al(o)&&al(l)||ps(o)&&ps(l)||Array.isArray(o)&&Array.isArray(l)?!ai(o,l,r):o!==l)return!1}}return!0}function nY(e){const t=Mg(),{control:r=t.control,name:n,defaultValue:a,disabled:i,exact:o,compute:l}=e||{},c=ie.useRef(a),d=ie.useRef(l),u=ie.useRef(void 0);d.current=l;const m=ie.useMemo(()=>r._getWatch(n,c.current),[r,n]),[f,p]=ie.useState(d.current?d.current(m):m);return vj(()=>r._subscribe({name:n,formState:{values:!0},exact:o,callback:v=>{if(!i){const g=AI(n,r._names,v.values||r._formValues,!1,c.current);if(d.current){const b=d.current(g);ai(b,u.current)||(p(b),u.current=b)}else p(g)}}}),[r,i,n,o]),ie.useEffect(()=>r._removeUnmounted()),f}function aY(e){const t=Mg(),{name:r,disabled:n,control:a=t.control,shouldUnregister:i,defaultValue:o}=e,l=PI(a._names.array,r),c=ie.useMemo(()=>Se(a._formValues,r,Se(a._defaultValues,r,o)),[a,r,o]),d=nY({control:a,name:r,defaultValue:c,exact:!0}),u=rY({control:a,name:r,exact:!0}),m=ie.useRef(e),f=ie.useRef(a.register(r,{...e.rules,value:d,...Jr(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const p=ie.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Se(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!Se(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Se(u.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Se(u.validatingFields,r)},error:{enumerable:!0,get:()=>Se(u.errors,r)}}),[u,r]),v=ie.useCallback(x=>f.current.onChange({target:{value:EI(x),name:r},type:fp.CHANGE}),[r]),g=ie.useCallback(()=>f.current.onBlur({target:{value:Se(a._formValues,r),name:r},type:fp.BLUR}),[r,a._formValues]),b=ie.useCallback(x=>{const w=Se(a._fields,r);w&&x&&(w._f.ref={focus:()=>x.focus&&x.focus(),select:()=>x.select&&x.select(),setCustomValidity:j=>x.setCustomValidity(j),reportValidity:()=>x.reportValidity()})},[a._fields,r]),y=ie.useMemo(()=>({name:r,value:d,...Jr(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:v,onBlur:g,ref:b}),[r,n,u.disabled,v,g,b,d]);return ie.useEffect(()=>{const x=a._options.shouldUnregister||i;a.register(r,{...m.current.rules,...Jr(m.current.disabled)?{disabled:m.current.disabled}:{}});const w=(j,N)=>{const S=Se(a._fields,j);S&&S._f&&(S._f.mount=N)};if(w(r,!0),x){const j=Ss(Se(a._options.defaultValues,r));At(a._defaultValues,r,j),ds(Se(a._formValues,r))&&At(a._formValues,r,j)}return!l&&a.register(r),()=>{(l?x&&!a._state.action:x)?a.unregister(r):w(r,!1)}},[r,a,l,i]),ie.useEffect(()=>{a._setDisabledField({disabled:n,name:r})},[n,r,a]),ie.useMemo(()=>({field:y,formState:u,fieldState:p}),[y,u,p])}const iY=e=>e.render(aY(e));var II=(e,t,r,n,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:a||!0}}:{},Bu=e=>Array.isArray(e)?e:[e],vk=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}},Sr=e=>ps(e)&&!Object.keys(e).length,yj=e=>e.type==="file",Qn=e=>typeof e=="function",pp=e=>{if(!fj)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},RI=e=>e.type==="select-multiple",bj=e=>e.type==="radio",oY=e=>bj(e)||rh(e),sv=e=>pp(e)&&e.isConnected;function lY(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=ds(e)?n++:e[t[n++]];return e}function cY(e){for(const t in e)if(e.hasOwnProperty(t)&&!ds(e[t]))return!1;return!0}function bs(e,t){const r=Array.isArray(t)?t:Rg(t)?[t]:gj(t),n=r.length===1?e:lY(e,r),a=r.length-1,i=r[a];return n&&delete n[i],a!==0&&(ps(n)&&Sr(n)||Array.isArray(n)&&cY(n))&&bs(e,r.slice(0,-1)),e}var MI=e=>{for(const t in e)if(Qn(e[t]))return!0;return!1};function gp(e,t={}){const r=Array.isArray(e);if(ps(e)||r)for(const n in e)Array.isArray(e[n])||ps(e[n])&&!MI(e[n])?(t[n]=Array.isArray(e[n])?[]:{},gp(e[n],t[n])):hr(e[n])||(t[n]=!0);return t}function OI(e,t,r){const n=Array.isArray(e);if(ps(e)||n)for(const a in e)Array.isArray(e[a])||ps(e[a])&&!MI(e[a])?ds(t)||Nb(r[a])?r[a]=Array.isArray(e[a])?gp(e[a],[]):{...gp(e[a])}:OI(e[a],hr(t)?{}:t[a],r[a]):r[a]=!ai(e[a],t[a]);return r}var su=(e,t)=>OI(e,t,gp(t));const yk={value:!1,isValid:!1},bk={value:!0,isValid:!0};var DI=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ds(e[0].attributes.value)?ds(e[0].value)||e[0].value===""?bk:{value:e[0].value,isValid:!0}:bk:yk}return yk},LI=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>ds(e)?e:t?e===""?NaN:e&&+e:r&&Ta(e)?new Date(e):n?n(e):e;const wk={isValid:!1,value:null};var FI=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,wk):wk;function jk(e){const t=e.ref;return yj(t)?t.files:bj(t)?FI(e.refs).value:RI(t)?[...t.selectedOptions].map(({value:r})=>r):rh(t)?DI(e.refs).value:LI(ds(t.value)?e.ref.value:t.value,e)}var dY=(e,t,r,n)=>{const a={};for(const i of e){const o=Se(t,i);o&&At(a,i,o._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:n}},xp=e=>e instanceof RegExp,ru=e=>ds(e)?e:xp(e)?e.source:ps(e)?xp(e.value)?e.value.source:e.value:e,Nk=e=>({isOnSubmit:!e||e===Kn.onSubmit,isOnBlur:e===Kn.onBlur,isOnChange:e===Kn.onChange,isOnAll:e===Kn.all,isOnTouch:e===Kn.onTouched});const _k="AsyncFunction";var uY=e=>!!e&&!!e.validate&&!!(Qn(e.validate)&&e.validate.constructor.name===_k||ps(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===_k)),mY=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),kk=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const zu=(e,t,r,n)=>{for(const a of r||Object.keys(e)){const i=Se(e,a);if(i){const{_f:o,...l}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!n)return!0;
vendor: 4,104 bytes, line 748
748if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(zu(l,t))break}else if(ps(l)&&zu(l,t))break}}};function Sk(e,t,r){const n=Se(e,r);if(n||Rg(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const i=a.join("."),o=Se(t,i),l=Se(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(l&&l.type)return{name:i,error:l};if(l&&l.root&&l.root.type)return{name:`${i}.root`,error:l.root};a.pop()}return{name:r}}var hY=(e,t,r,n)=>{r(e);const{name:a,...i}=e;return Sr(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||Kn.all))},fY=(e,t,r)=>!e||!t||e===t||Bu(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),pY=(e,t,r,n,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(t||e):(r?n.isOnBlur:a.isOnBlur)?!e:(r?n.isOnChange:a.isOnChange)?e:!0,gY=(e,t)=>!pj(Se(e,t)).length&&bs(e,t),xY=(e,t,r)=>{const n=Bu(Se(e,r));return At(n,"root",t[r]),At(e,r,n),e},gf=e=>Ta(e);function Ck(e,t,r="validate"){if(gf(e)||Array.isArray(e)&&e.every(gf)||Jr(e)&&!e)return{type:r,message:gf(e)?e:"",ref:t}}var lc=e=>ps(e)&&!xp(e)?e:{value:e,message:""},Ek=async(e,t,r,n,a,i)=>{const{ref:o,refs:l,required:c,maxLength:d,minLength:u,min:m,max:f,pattern:p,validate:v,name:g,valueAsNumber:b,mount:y}=e._f,x=Se(r,g);if(!y||t.has(g))return{};const w=l?l[0]:o,j=k=>{a&&w.reportValidity&&(w.setCustomValidity(Jr(k)?"":k||""),w.reportValidity())},N={},S=bj(o),E=rh(o),_=S||E,I=(b||yj(o))&&ds(o.value)&&ds(x)||pp(o)&&o.value===""||x===""||Array.isArray(x)&&!x.length,R=II.bind(null,g,n,N),T=(k,C,A,L=Ga.maxLength,O=Ga.minLength)=>{const P=k?C:A;N[g]={type:k?L:O,message:P,ref:o,...R(k?L:O,P)}};if(i?!Array.isArray(x)||!x.length:c&&(!_&&(I||hr(x))||Jr(x)&&!x||E&&!DI(l).isValid||S&&!FI(l).isValid)){const{value:k,message:C}=gf(c)?{value:!!c,message:c}:lc(c);if(k&&(N[g]={type:Ga.required,message:C,ref:w,...R(Ga.required,C)},!n))return j(C),N}if(!I&&(!hr(m)||!hr(f))){let k,C;const A=lc(f),L=lc(m);if(!hr(x)&&!isNaN(x)){const O=o.valueAsNumber||x&&+x;hr(A.value)||(k=O>A.value),hr(L.value)||(C=O<L.value)}else{const O=o.valueAsDate||new Date(x),P=$=>new Date(new Date().toDateString()+" "+$),M=o.type=="time",D=o.type=="week";Ta(A.value)&&x&&(k=M?P(x)>P(A.value):D?x>A.value:O>new Date(A.value)),Ta(L.value)&&x&&(C=M?P(x)<P(L.value):D?x<L.value:O<new Date(L.value))}if((k||C)&&(T(!!k,A.message,L.message,Ga.max,Ga.min),!n))return j(N[g].message),N}if((d||u)&&!I&&(Ta(x)||i&&Array.isArray(x))){const k=lc(d),C=lc(u),A=!hr(k.value)&&x.length>+k.value,L=!hr(C.value)&&x.length<+C.value;if((A||L)&&(T(A,k.message,C.message),!n))return j(N[g].message),N}if(p&&!I&&Ta(x)){const{value:k,message:C}=lc(p);if(xp(k)&&!x.match(k)&&(N[g]={type:Ga.pattern,message:C,ref:o,...R(Ga.pattern,C)},!n))return j(C),N}if(v){if(Qn(v)){const k=await v(x,r),C=Ck(k,w);if(C&&(N[g]={...C,...R(Ga.validate,C.message)},!n))return j(C.message),N}else if(ps(v)){let k={};for(const C in v){if(!Sr(k)&&!n)break;const A=Ck(await v[C](x,r),w,C);A&&(k={...A,...R(C,A.message)},j(A.message),n&&(N[g]=k))}if(!Sr(k)&&(N[g]={ref:w,...k},!n))return N}}return j(!0),N};const vY={mode:Kn.onSubmit,reValidateMode:Kn.onChange,shouldFocusError:!0};function yY(e={}){let t={...vY,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Qn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},a=ps(t.defaultValues)||ps(t.values)?Ss(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Ss(a),o={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...u};const f={array:vk(),state:vk()},p=t.criteriaMode===Kn.all,v=z=>Y=>{clearTimeout(d),d=setTimeout(z,Y)},g=async z=>{if(!t.disabled&&(u.isValid||m.isValid||z)){const Y=t.resolver?Sr((await E()).errors):await I(n,!0);Y!==r.isValid&&f.state.next({isValid:Y})}},b=(z,Y)=>{!t.disabled&&(u.isValidating||u.validatingFields||m.isValidating||m.validatingFields)&&((z||Array.from(l.mount)).forEac
vendor: 4,534 bytes, line 748
748h(ne=>{ne&&(Y?At(r.validatingFields,ne,Y):bs(r.validatingFields,ne))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Sr(r.validatingFields)}))},y=(z,Y=[],ne,fe,ee=!0,ae=!0)=>{if(fe&&ne&&!t.disabled){if(o.action=!0,ae&&Array.isArray(Se(n,z))){const ge=ne(Se(n,z),fe.argA,fe.argB);ee&&At(n,z,ge)}if(ae&&Array.isArray(Se(r.errors,z))){const ge=ne(Se(r.errors,z),fe.argA,fe.argB);ee&&At(r.errors,z,ge),gY(r.errors,z)}if((u.touchedFields||m.touchedFields)&&ae&&Array.isArray(Se(r.touchedFields,z))){const ge=ne(Se(r.touchedFields,z),fe.argA,fe.argB);ee&&At(r.touchedFields,z,ge)}(u.dirtyFields||m.dirtyFields)&&(r.dirtyFields=su(a,i)),f.state.next({name:z,isDirty:T(z,Y),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else At(i,z,Y)},x=(z,Y)=>{At(r.errors,z,Y),f.state.next({errors:r.errors})},w=z=>{r.errors=z,f.state.next({errors:r.errors,isValid:!1})},j=(z,Y,ne,fe)=>{const ee=Se(n,z);if(ee){const ae=Se(i,z,ds(ne)?Se(a,z):ne);ds(ae)||fe&&fe.defaultChecked||Y?At(i,z,Y?ae:jk(ee._f)):A(z,ae),o.mount&&g()}},N=(z,Y,ne,fe,ee)=>{let ae=!1,ge=!1;const Ue={name:z};if(!t.disabled){if(!ne||fe){(u.isDirty||m.isDirty)&&(ge=r.isDirty,r.isDirty=Ue.isDirty=T(),ae=ge!==Ue.isDirty);const Ze=ai(Se(a,z),Y);ge=!!Se(r.dirtyFields,z),Ze?bs(r.dirtyFields,z):At(r.dirtyFields,z,!0),Ue.dirtyFields=r.dirtyFields,ae=ae||(u.dirtyFields||m.dirtyFields)&&ge!==!Ze}if(ne){const Ze=Se(r.touchedFields,z);Ze||(At(r.touchedFields,z,ne),Ue.touchedFields=r.touchedFields,ae=ae||(u.touchedFields||m.touchedFields)&&Ze!==ne)}ae&&ee&&f.state.next(Ue)}return ae?Ue:{}},S=(z,Y,ne,fe)=>{const ee=Se(r.errors,z),ae=(u.isValid||m.isValid)&&Jr(Y)&&r.isValid!==Y;if(t.delayError&&ne?(c=v(()=>x(z,ne)),c(t.delayError)):(clearTimeout(d),c=null,ne?At(r.errors,z,ne):bs(r.errors,z)),(ne?!ai(ee,ne):ee)||!Sr(fe)||ae){const ge={...fe,...ae&&Jr(Y)?{isValid:Y}:{},errors:r.errors,name:z};r={...r,...ge},f.state.next(ge)}},E=async z=>{b(z,!0);const Y=await t.resolver(i,t.context,dY(z||l.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(z),Y},_=async z=>{const{errors:Y}=await E(z);if(z)for(const ne of z){const fe=Se(Y,ne);fe?At(r.errors,ne,fe):bs(r.errors,ne)}else r.errors=Y;return Y},I=async(z,Y,ne={valid:!0})=>{for(const fe in z){const ee=z[fe];if(ee){const{_f:ae,...ge}=ee;if(ae){const Ue=l.array.has(ae.name),Ze=ee._f&&uY(ee._f);Ze&&u.validatingFields&&b([fe],!0);const bt=await Ek(ee,l.disabled,i,p,t.shouldUseNativeValidation&&!Y,Ue);if(Ze&&u.validatingFields&&b([fe]),bt[ae.name]&&(ne.valid=!1,Y))break;!Y&&(Se(bt,ae.name)?Ue?xY(r.errors,bt,ae.name):At(r.errors,ae.name,bt[ae.name]):bs(r.errors,ae.name))}!Sr(ge)&&await I(ge,Y,ne)}}return ne.valid},R=()=>{for(const z of l.unMount){const Y=Se(n,z);Y&&(Y._f.refs?Y._f.refs.every(ne=>!sv(ne)):!sv(Y._f.ref))&&B(z)}l.unMount=new Set},T=(z,Y)=>!t.disabled&&(z&&Y&&At(i,z,Y),!ai($(),a)),k=(z,Y,ne)=>AI(z,l,{...o.mount?i:ds(Y)?a:Ta(z)?{[z]:Y}:Y},ne,Y),C=z=>pj(Se(o.mount?i:a,z,t.shouldUnregister?Se(a,z,[]):[])),A=(z,Y,ne={})=>{const fe=Se(n,z);let ee=Y;if(fe){const ae=fe._f;ae&&(!ae.disabled&&At(i,z,LI(Y,ae)),ee=pp(ae.ref)&&hr(Y)?"":Y,RI(ae.ref)?[...ae.ref.options].forEach(ge=>ge.selected=ee.includes(ge.value)):ae.refs?rh(ae.ref)?ae.refs.forEach(ge=>{(!ge.defaultChecked||!ge.disabled)&&(Array.isArray(ee)?ge.checked=!!ee.find(Ue=>Ue===ge.value):ge.checked=ee===ge.value||!!ee)}):ae.refs.forEach(ge=>ge.checked=ge.value===ee):yj(ae.ref)?ae.ref.value="":(ae.ref.value=ee,ae.ref.type||f.state.next({name:z,values:Ss(i)})))}(ne.shouldDirty||ne.shouldTouch)&&N(z,ee,ne.shouldTouch,ne.shouldDirty,!0),ne.shouldValidate&&D(z)},L=(z,Y,ne)=>{for(const fe in Y){if(!Y.hasOwnProperty(fe))return;const ee=Y[fe],ae=z+"."+fe,ge=Se(n,ae);(l.array.has(z)||ps(ee)||ge&&!ge._f)&&!al(ee)?L(ae,ee,ne):A(ae,ee,ne)}},O=(z,Y,ne={})=>{const fe=Se(n,z),ee=l.array.has(z),ae=Ss(Y);At(i,z,ae),ee?(f.array.next({name:z,values:Ss(i)}),(u.isDirty||u.dirtyFields||m.isDirty||m.dirtyFields)&&ne.shouldDirty&&f.state.next({name:z,dirtyFields:su(a,i),isDirty:T(z,ae)})):fe&&!fe._f&&!hr(ae)?L(z,ae,ne):A(z,ae,ne),kk(z,l)&&f.state.next({...r,name:z}),f.state.next({name:o.mount?z:void 0,values:Ss(i)})},P=async z=>{o.mount=!0;const Y=z.target;let ne=Y.name,fe=!0;const ee=Se(n,ne),ae=Ze=>{fe=Number.isNaN(Ze)||al(Ze)&&isNaN(Ze.getTime())||ai(Ze,Se(i,ne,Ze))},ge=Nk(t.mode),Ue=Nk(t.reValidateMode);if(ee){let Ze,bt;const Ft=Y.type?jk(ee._f):EI(z),Nt=z.type===fp.BLUR||z.type===fp.FOCUS_OUT,Hs=!mY(ee._f)&&!t.resolver&&!Se(r.errors,ne)&&!ee._f.deps||pY(Nt,Se(r.touchedFields,ne),r.isSubmitted,Ue,ge),Jt=kk(ne,l,Nt);
vendor: 4,242 bytes, line 748
748At(i,ne,Ft),Nt?(!Y||!Y.readOnly)&&(ee._f.onBlur&&ee._f.onBlur(z),c&&c(0)):ee._f.onChange&&ee._f.onChange(z);const _s=N(ne,Ft,Nt),Ts=!Sr(_s)||Jt;if(!Nt&&f.state.next({name:ne,type:z.type,values:Ss(i)}),Hs)return(u.isValid||m.isValid)&&(t.mode==="onBlur"?Nt&&g():Nt||g()),Ts&&f.state.next({name:ne,...Jt?{}:_s});if(!Nt&&Jt&&f.state.next({...r}),t.resolver){const{errors:xs}=await E([ne]);if(ae(Ft),fe){const In=Sk(r.errors,n,ne),mn=Sk(xs,n,In.name||ne);Ze=mn.error,ne=mn.name,bt=Sr(xs)}}else b([ne],!0),Ze=(await Ek(ee,l.disabled,i,p,t.shouldUseNativeValidation))[ne],b([ne]),ae(Ft),fe&&(Ze?bt=!1:(u.isValid||m.isValid)&&(bt=await I(n,!0)));fe&&(ee._f.deps&&D(ee._f.deps),S(ne,bt,Ze,_s))}},M=(z,Y)=>{if(Se(r.errors,Y)&&z.focus)return z.focus(),1},D=async(z,Y={})=>{let ne,fe;const ee=Bu(z);if(t.resolver){const ae=await _(ds(z)?z:ee);ne=Sr(ae),fe=z?!ee.some(ge=>Se(ae,ge)):ne}else z?(fe=(await Promise.all(ee.map(async ae=>{const ge=Se(n,ae);return await I(ge&&ge._f?{[ae]:ge}:ge)}))).every(Boolean),!(!fe&&!r.isValid)&&g()):fe=ne=await I(n);return f.state.next({...!Ta(z)||(u.isValid||m.isValid)&&ne!==r.isValid?{}:{name:z},...t.resolver||!z?{isValid:ne}:{},errors:r.errors}),Y.shouldFocus&&!fe&&zu(n,M,z?ee:l.mount),fe},$=z=>{const Y={...o.mount?i:a};return ds(z)?Y:Ta(z)?Se(Y,z):z.map(ne=>Se(Y,ne))},W=(z,Y)=>({invalid:!!Se((Y||r).errors,z),isDirty:!!Se((Y||r).dirtyFields,z),error:Se((Y||r).errors,z),isValidating:!!Se(r.validatingFields,z),isTouched:!!Se((Y||r).touchedFields,z)}),X=z=>{z&&Bu(z).forEach(Y=>bs(r.errors,Y)),f.state.next({errors:z?r.errors:{}})},q=(z,Y,ne)=>{const fe=(Se(n,z,{_f:{}})._f||{}).ref,ee=Se(r.errors,z)||{},{ref:ae,message:ge,type:Ue,...Ze}=ee;At(r.errors,z,{...Ze,...Y,ref:fe}),f.state.next({name:z,errors:r.errors,isValid:!1}),ne&&ne.shouldFocus&&fe&&fe.focus&&fe.focus()},H=(z,Y)=>Qn(z)?f.state.subscribe({next:ne=>"values"in ne&&z(k(void 0,Y),ne)}):k(z,Y,!0),se=z=>f.state.subscribe({next:Y=>{fY(z.name,Y.name,z.exact)&&hY(Y,z.formState||u,ze,z.reRenderRoot)&&z.callback({values:{...i},...r,...Y,defaultValues:a})}}).unsubscribe,te=z=>(o.mount=!0,m={...m,...z.formState},se({...z,formState:m})),B=(z,Y={})=>{for(const ne of z?Bu(z):l.mount)l.mount.delete(ne),l.array.delete(ne),Y.keepValue||(bs(n,ne),bs(i,ne)),!Y.keepError&&bs(r.errors,ne),!Y.keepDirty&&bs(r.dirtyFields,ne),!Y.keepTouched&&bs(r.touchedFields,ne),!Y.keepIsValidating&&bs(r.validatingFields,ne),!t.shouldUnregister&&!Y.keepDefaultValue&&bs(a,ne);f.state.next({values:Ss(i)}),f.state.next({...r,...Y.keepDirty?{isDirty:T()}:{}}),!Y.keepIsValid&&g()},le=({disabled:z,name:Y})=>{(Jr(z)&&o.mount||z||l.disabled.has(Y))&&(z?l.disabled.add(Y):l.disabled.delete(Y))},J=(z,Y={})=>{let ne=Se(n,z);const fe=Jr(Y.disabled)||Jr(t.disabled);return At(n,z,{...ne||{},_f:{...ne&&ne._f?ne._f:{ref:{name:z}},name:z,mount:!0,...Y}}),l.mount.add(z),ne?le({disabled:Jr(Y.disabled)?Y.disabled:t.disabled,name:z}):j(z,!0,Y.value),{...fe?{disabled:Y.disabled||t.disabled}:{},...t.progressive?{required:!!Y.required,min:ru(Y.min),max:ru(Y.max),minLength:ru(Y.minLength),maxLength:ru(Y.maxLength),pattern:ru(Y.pattern)}:{},name:z,onChange:P,onBlur:P,ref:ee=>{if(ee){J(z,Y),ne=Se(n,z);const ae=ds(ee.value)&&ee.querySelectorAll&&ee.querySelectorAll("input,select,textarea")[0]||ee,ge=oY(ae),Ue=ne._f.refs||[];if(ge?Ue.find(Ze=>Ze===ae):ae===ne._f.ref)return;At(n,z,{_f:{...ne._f,...ge?{refs:[...Ue.filter(sv),ae,...Array.isArray(Se(a,z))?[{}]:[]],ref:{type:ae.type,name:z}}:{ref:ae}}}),j(z,!1,void 0,ae)}else ne=Se(n,z,{}),ne._f&&(ne._f.mount=!1),(t.shouldUnregister||Y.shouldUnregister)&&!(PI(l.array,z)&&o.action)&&l.unMount.add(z)}}},K=()=>t.shouldFocusError&&zu(n,M,l.mount),Z=z=>{Jr(z)&&(f.state.next({disabled:z}),zu(n,(Y,ne)=>{const fe=Se(n,ne);fe&&(Y.disabled=fe._f.disabled||z,Array.isArray(fe._f.refs)&&fe._f.refs.forEach(ee=>{ee.disabled=fe._f.disabled||z}))},0,!1))},re=(z,Y)=>async ne=>{let fe;ne&&(ne.preventDefault&&ne.preventDefault(),ne.persist&&ne.persist());let ee=Ss(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:ae,values:ge}=await E();r.errors=ae,ee=Ss(ge)}else await I(n);if(l.disabled.size)for(const ae of l.disabled)bs(ee,ae);if(bs(r.errors,"root"),Sr(r.errors)){f.state.next({errors:{}});try{await z(ee,ne)}catch(ae){fe=ae}}
748else Y&&await Y({...r.errors},ne),K(),setTimeout(K);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sr(r.errors)&&!fe,submitCount:r.submitCount+1,errors:r.errors}),fe)throw fe},de=(z,Y={})=>{Se(n,z)&&(ds(Y.defaultValue)?O(z,Ss(Se(a,z))):(O(z,Y.defaultValue),At(a,z,Ss(Y.defaultValue))),Y.keepTouched||bs(r.touchedFields,z),Y.keepDirty||(bs(r.dirtyFields,z),r.isDirty=Y.defaultValue?T(z,Ss(Se(a,z))):T()),Y.keepError||(bs(r.errors,z),u.isValid&&g()),f.state.next({...r}))},Pe=(z,Y={})=>{const ne=z?Ss(z):a,fe=Ss(ne),ee=Sr(z),ae=ee?a:fe;if(Y.keepDefaultValues||(a=ne),!Y.keepValues){if(Y.keepDirtyValues){const ge=new Set([...l.mount,...Object.keys(su(a,i))]);for(const Ue of Array.from(ge))Se(r.dirtyFields,Ue)?At(ae,Ue,Se(i,Ue)):O(Ue,Se(ae,Ue))}else{if(fj&&ds(z))for(const ge of l.mount){const Ue=Se(n,ge);if(Ue&&Ue._f){const Ze=Array.isArray(Ue._f.refs)?Ue._f.refs[0]:Ue._f.ref;if(pp(Ze)){const bt=Ze.closest("form");if(bt){bt.reset();break}}}}if(Y.keepFieldsRef)for(const ge of l.mount)O(ge,Se(ae,ge));else n={}}i=t.shouldUnregister?Y.keepDefaultValues?Ss(a):{}:Ss(ae),f.array.next({values:{...ae}}),f.state.next({values:{...ae}})}l={mount:Y.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!Y.keepIsValid||!!Y.keepDirtyValues,o.watch=!!t.shouldUnregister,f.state.next({submitCount:Y.keepSubmitCount?r.submitCount:0,isDirty:ee?!1:Y.keepDirty?r.isDirty:!!(Y.keepDefaultValues&&!ai(z,a)),isSubmitted:Y.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:ee?{}:Y.keepDirtyValues?Y.keepDefaultValues&&i?su(a,i):r.dirtyFields:Y.keepDefaultValues&&z?su(a,z):Y.keepDirty?r.dirtyFields:{},touchedFields:Y.keepTouched?r.touchedFields:{},errors:Y.keepErrors?r.errors:{},isSubmitSuccessful:Y.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Ee=(z,Y)=>Pe(Qn(z)?z(i):z,Y),tt=(z,Y={})=>{const ne=Se(n,z),fe=ne&&ne._f;if(fe){const ee=fe.refs?fe.refs[0]:fe.ref;ee.focus&&(ee.focus(),Y.shouldSelect&&Qn(ee.select)&&ee.select())}},ze=z=>{r={...r,...z}},st={control:{register:J,unregister:B,getFieldState:W,handleSubmit:re,setError:q,_subscribe:se,_runSchema:E,_focusError:K,_getWatch:k,_getDirty:T,_setValid:g,_setFieldArray:y,_setDisabledField:le,_setErrors:w,_getFieldArray:C,_reset:Pe,_resetDefaultValues:()=>Qn(t.defaultValues)&&t.defaultValues().then(z=>{Ee(z,t.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:R,_disableForm:Z,_subjects:f,_proxyFormState:u,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(z){o=z},get _defaultValues(){return a},get _names(){return l},set _names(z){l=z},get _formState(){return r},get _options(){return t},set _options(z){t={...t,...z}}},subscribe:te,trigger:D,register:J,handleSubmit:re,watch:H,setValue:O,getValues:$,reset:Ee,resetField:de,clearErrors:X,unregister:B,setError:q,setFocus:tt,getFieldState:W};return{...st,formControl:st}}function $I(e={}){const t=ie.useRef(void 0),r=ie.useRef(void 0),[n,a]=ie.useState({isDirty:!1,isValidating:!1,isLoading:Qn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Qn(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Qn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...l}=yY(e);t.current={...l,formState:n}}const i=t.current.control;return i._options=e,vj(()=>{const o=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(l=>({...l,isReady:!0})),i._formState.isReady=!0,o},[i]),ie.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),ie.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),ie.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),ie.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),ie.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),ie.useEffect(()=>{e.values&&!ai(e.values,r.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),r.current=e.values,a(o=>({...o}))):i._resetDefaultValues()},[i,e.values]),ie.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=TI(n,i),t.current}const Pk=(e,t,r)=>{if(e&&"reportValidity"in e){const n=Se(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},UI=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Pk(n.ref,r,e):n.refs&&n.refs.forEac
748h(a=>Pk(a,r,e))}},bY=(e,t)=>{t.shouldUseNativeValidation&&UI(e,t);const r={};for(const n in e){const a=Se(t.fields,n),i=Object.assign(e[n]||{},{ref:a&&a.ref});if(wY(t.names||Object.keys(e),n)){const o=Object.assign({},Se(r,n));At(o,"root",i),At(r,n,o)}else At(r,n,i)}return r},wY=(e,t)=>e.some(r=>r.startsWith(t+"."));var jY=function(e,t){for(var r={};e.length;){var n=e[0],a=n.code,i=n.message,o=n.path.join(".");if(!r[o])if("unionErrors"in n){var l=n.unionErrors[0].errors[0];r[o]={message:l.message,type:l.code}}else r[o]={message:i,type:a};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(m){return e.push(m)})}),t){var c=r[o].types,d=c&&c[n.code];r[o]=II(o,t,r,a,d?[].concat(d,n.message):n.message)}e.shift()}return r},BI=function(e,t,r){return r===void 0&&(r={}),function(n,a,i){try{return Promise.resolve(function(o,l){try{var c=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(d){return i.shouldUseNativeValidation&&UI({},i),{errors:{},values:r.raw?n:d}})}catch(d){return l(d)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(function(l){return Array.isArray(l==null?void 0:l.errors)}(o))return{values:{},errors:bY(jY(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},Xe=function(){return Xe=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Xe.apply(this,arguments)};function NY(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function zI(e,t,r){for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function nh(e){return e.mode==="multiple"}function ah(e){return e.mode==="range"}function Og(e){return e.mode==="single"}var _Y={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function kY(e,t){return fr(e,"LLLL y",t)}function SY(e,t){return fr(e,"d",t)}function CY(e,t){return fr(e,"LLLL",t)}function EY(e){return"".concat(e)}function PY(e,t){return fr(e,"cccccc",t)}function TY(e,t){return fr(e,"yyyy",t)}var AY=Object.freeze({__proto__:null,formatCaption:kY,formatDay:SY,formatMonthCaption:CY,formatWeekNumber:EY,formatWeekdayName:PY,formatYearCaption:TY}),IY=function(e,t,r){return fr(e,"do MMMM (EEEE)",r)},RY=function(){return"Month: "},MY=function(){return"Go to next month"},OY=function(){return"Go to previous month"},DY=function(e,t){return fr(e,"cccc",t)},LY=function(e){return"Week n. ".concat(e)},FY=function(){return"Year: "},$Y=Object.freeze({__proto__:null,labelDay:IY,labelMonthDropdown:RY,labelNext:MY,labelPrevious:OY,labelWeekNumber:LY,labelWeekday:DY,labelYearDropdown:FY});function UY(){var e="buttons",t=_Y,r=dj,n={},a={},i=1,o={},l=new Date;return{captionLayout:e,classNames:t,formatters:AY,labels:$Y,locale:r,modifiersClassNames:n,modifiers:a,numberOfMonths:i,styles:o,today:l,mode:"default"}}function BY(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,a=e.toMonth,i=e.fromDate,o=e.toDate;return n?i=Br(n):t&&(i=new Date(t,0,1)),a?o=Eg(a):r&&(o=new Date(r,11,31)),{fromDate:i?xd(i):void 0,toDate:o?xd(o):void 0}}var WI=h.createContext(void 0);function zY(e){var t,r=e.initialProps,n=UY(),a=BY(r),i=a.fromDate,o=a.toDate,l=(t=r.captionLayout)!==null&&t!==void 0?t:n.captionLayout;l!=="buttons"&&(!i||!o)&&(l="buttons");var c;(Og(r)||nh(r)||ah(r))&&(c=r.onSelect);var d=Xe(Xe(Xe({},n),r),{captionLayout:l,classNames:Xe(Xe({},n.classNames),r.classNames),components:Xe({},r.components),formatters:Xe(Xe({},n.formatters),r.formatters),fromDate:i,labels:Xe(Xe({},n.labels),r.labels),mode:r.mode||n.mode,modifiers:Xe(Xe({},n.modifiers),r.modifiers),modifiersClassNames:Xe(Xe({},n.modifiersClassNames),r.modifiersClassNames),onSelect:c,styles:Xe(Xe({},n.styles),r.styles),toDate:o});return s.jsx(WI.Provider,{value:d,children:e.children})}function Bt(){var e=h.useContext(WI);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function VI(e){var t=Bt(),r=t.locale,n=t.classNames,a=t.styles,i=t.formatters.formatCaption;return s.jsx("div",{className:n.caption_label,style:a.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:r})})}function WY(e){return s.jsx("svg",Xe({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:s.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.7
74878175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function HI(e){var t,r,n=e.onChange,a=e.value,i=e.children,o=e.caption,l=e.className,c=e.style,d=Bt(),u=(r=(t=d.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&r!==void 0?r:WY;return s.jsxs("div",{className:l,style:c,children:[s.jsx("span",{className:d.classNames.vhidden,children:e["aria-label"]}),s.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:d.classNames.dropdown,style:d.styles.dropdown,value:a,onChange:n,children:i}),s.jsxs("div",{className:d.classNames.caption_label,style:d.styles.caption_label,"aria-hidden":"true",children:[o,s.jsx(u,{className:d.classNames.dropdown_icon,style:d.styles.dropdown_icon})]})]})}function VY(e){var t,r=Bt(),n=r.fromDate,a=r.toDate,i=r.styles,o=r.locale,l=r.formatters.formatMonthCaption,c=r.classNames,d=r.components,u=r.labels.labelMonthDropdown;if(!n)return s.jsx(s.Fragment,{});if(!a)return s.jsx(s.Fragment,{});var m=[];if(rG(n,a))for(var f=Br(n),p=n.getMonth();p<=a.getMonth();p++)m.push(tv(f,p));else for(var f=Br(new Date),p=0;p<=11;p++)m.push(tv(f,p));var v=function(b){var y=Number(b.target.value),x=tv(Br(e.displayMonth),y);e.onChange(x)},g=(t=d==null?void 0:d.Dropdown)!==null&&t!==void 0?t:HI;return s.jsx(g,{name:"months","aria-label":u(),className:c.dropdown_month,style:i.dropdown_month,onChange:v,value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:o}),children:m.map(function(b){return s.jsx("option",{value:b.getMonth(),children:l(b,{locale:o})},b.getMonth())})})}
748function HY(e){var t,r=e.displayMonth,n=Bt(),a=n.fromDate,i=n.toDate,o=n.locale,l=n.styles,c=n.classNames,d=n.components,u=n.formatters.formatYearCaption,m=n.labels.labelYearDropdown,f=[];if(!a)return s.jsx(s.Fragment,{});if(!i)return s.jsx(s.Fragment,{});for(var p=a.getFullYear(),v=i.getFullYear(),g=p;g<=v;g++)f.push(gk(NA(new Date),g));var b=function(x){var w=gk(Br(r),Number(x.target.value));e.onChange(w)},y=(t=d==null?void 0:d.Dropdown)!==null&&t!==void 0?t:HI;return s.jsx(y,{name:"years","aria-label":m(),className:c.dropdown_year,style:l.dropdown_year,onChange:b,value:r.getFullYear(),caption:u(r,{locale:o}),children:f.map(function(x){return s.jsx("option",{value:x.getFullYear(),children:u(x,{locale:o})},x.getFullYear())})})}function qY(e,t){var r=h.useState(e),n=r[0],a=r[1],i=t===void 0?n:t;return[i,a]}function GY(e){var t=e.month,r=e.defaultMonth,n=e.today,a=t||r||n||new Date,i=e.toDate,o=e.fromDate,l=e.numberOfMonths,c=l===void 0?1:l;if(i&&yd(i,a)<0){var d=-1*(c-1);a=ia(i,d)}return o&&yd(a,o)<0&&(a=o),Br(a)}function YY(){var e=Bt(),t=GY(e),r=qY(t,e.month),n=r[0],a=r[1],i=function(o){var l;if(!e.disableNavigation){var c=Br(o);a(c),(l=e.onMonthChange)===null||l===void 0||l.call(e,c)}};return[n,i]}function KY(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,a=Br(e),i=Br(ia(a,n)),o=yd(i,a),l=[],c=0;c<o;c++){var d=ia(a,c);l.push(d)}return r&&(l=l.reverse()),l}function QY(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,a=t.numberOfMonths,i=a===void 0?1:a,o=n?i:1,l=Br(e);if(!r)return ia(l,o);var c=yd(r,e);if(!(c<i))return ia(l,o)}}function XY(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,a=t.numberOfMonths,i=a===void 0?1:a,o=n?i:1,l=Br(e);if(!r)return ia(l,-o);var c=yd(l,r);if(!(c<=0))return ia(l,-o)}}var qI=h.createContext(void 0);function JY(e){var t=Bt(),r=YY(),n=r[0],a=r[1],i=KY(n,t),o=QY(n,t),l=XY(n,t),c=function(m){return i.some(function(f){return uj(m,f)})},d=function(m,f){c(m)||(f&&Fc(m,f)?a(ia(m,1+t.numberOfMonths*-1)):a(m))},u={currentMonth:n,displayMonths:i,goToMonth:a,goToDate:d,previousMonth:l,nextMonth:o,isDateDisplayed:c};return s.jsx(qI.Provider,{value:u,children:e.children})}function ih(){var e=h.useContext(qI);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function Tk(e){var t,r=Bt(),n=r.classNames,a=r.styles,i=r.components,o=ih().goToMonth,l=function(u){o(ia(u,e.displayIndex?-e.dis
748playIndex:0))},c=(t=i==null?void 0:i.CaptionLabel)!==null&&t!==void 0?t:VI,d=s.jsx(c,{id:e.id,displayMonth:e.displayMonth});return s.jsxs("div",{className:n.caption_dropdowns,style:a.caption_dropdowns,children:[s.jsx("div",{className:n.vhidden,children:d}),s.jsx(VY,{onChange:l,displayMonth:e.displayMonth}),s.jsx(HY,{onChange:l,displayMonth:e.displayMonth})]})}function ZY(e){return s.jsx("svg",Xe({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:s.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function eK(e){return s.jsx("svg",Xe({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:s.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var vp=h.forwardRef(function(e,t){var r=Bt(),n=r.classNames,a=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var o=i.join(" "),l=Xe(Xe({},a.button_reset),a.button);return e.style&&Object.assign(l,e.style),s.jsx("button",Xe({},e,{ref:t,type:"button",className:o,style:l}))});function tK(e){var t,r,n=Bt(),a=n.dir,i=n.locale,o=n.classNames,l=n.styles,c=n.labels,d=c.labelPrevious,u=c.labelNext,m=n.components;if(!e.nextMonth&&!e.previousMonth)return s.jsx(s.Fragment,{});var f=d(e.previousMonth,{locale:i}),p=[o.nav_button,o.nav_button_previous].join(" "),v=u(e.nextMonth,{locale:i}),g=[o.nav_button,o.nav_button_next].join(" "),b=(t=m==null?void 0:m.IconRight)!==null&&t!==void 0?t:eK,y=(r=m==null?void 0:m.IconLeft)!==null&&r!==void 0?r:ZY;return s.jsxs("div",{className:o.nav,style:l.nav,children:[!e.hidePrevious&&s.jsx(vp,{name:"previous-month","aria-label":f,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:a==="rtl"?s.jsx(b,{className:o.nav_icon,style:l.nav_icon}):s.jsx(y,{className:o.nav_icon,style:l.nav_icon})}),!e.hideNext&&s.jsx(vp,{name:"next-month","aria-label":v,className:g,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:a==="rtl"?s.jsx(y,{className:o.nav_icon,style:l.nav_icon}):s.jsx(b,{className:o.nav_icon,style:l.nav_icon})})]})}function Ak(e){var t=Bt().numberOfMonths,r=ih(),n=r.previousMonth,a=r.nextMonth,i=r.goToMonth,o=r.displayMonths,l=o.findIndex(function(v){return uj(e.displayMonth,v)}),c=l===0,d=l===o.length-1,u=t>1&&(c||!d),m=t>1&&(d||!c),f=function(){n&&i(n)},p=function(){a&&i(a)};return s.jsx(tK,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:m,nextMonth:a,previousMonth:n,onPreviousClick:f,onNextClick:p})}function sK(e){var t,r=Bt(),n=r.classNames,a=r.disableNavigation,i=r.styles,o=r.captionLayout,l=r.components,c=(t=l==null?void 0:l.CaptionLabel)!==null&&t!==void 0?t:VI,d;return a?d=s.jsx(c,{id:e.id,displayMonth:e.displayMonth}):o==="dropdown"?d=s.jsx(Tk,{displayMonth:e.displayMonth,id:e.id}):o==="dropdown-buttons"?d=s.jsxs(s.Fragment,{children:[s.jsx(Tk,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),s.jsx(Ak,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):d=s.jsxs(s.Fragment,{children:[s.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(Ak,{displayMonth:e.displayMonth,id:e.id})]}),s.jsx("div",{className:n.caption,style:i.caption,children:d})}function rK(e){var t=Bt(),r=t.footer,n=t.styles,a=t.classNames.tfoot;return r?s.jsx("tfoot",{className:a,style:n.tfoot,children:s.jsx("tr",{children:s.jsx("td",{colSpan:8,children:r})})}):s.jsx(s.Fragment,{})}function nK(e,t,r){for(var n=r?Il(new Date):Ua(new Date,{locale:e,weekStartsOn:t}),a=[],i=0;i<7;i++){var o=Js(n,i);a.push(o)}return a}function aK(){var e=Bt(),t=e.classNames,r=e.styles,n=e.showWeekNumber,a=e.locale,i=e.weekStartsOn,o=e.ISOWeek,l=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,d=nK(a,i,o);return s.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&s.jsx("td",{style:r.head_cell,className:t.head_cell}),d.map(function(u,m){return s.jsx("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":c(u,{locale:a}),children:l(u,{locale:a})},m)})]})}function iK(){var e,t=Bt(),r=t.classNames,n=t.styles,a=t.components,i=(e=a==null?void 0:a.HeadRow)!==null&&e!==void 0?e:aK;return s.jsx("thead",{style:n.head,className:r.head,children:s.jsx(i,{})})}function oK(e){var t=Bt(),r=t.locale,n=t.formatters.formatDay;return s.jsx(s.Fragment,{children:n(e.date,{locale:r})})}var wj=h.createContext(void 0);function lK(e){if(!nh(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return s.jsx(wj.Provider,{value:t,children:e.children})}return s.jsx(cK,{initialProps:e.initialProps,children:e.children})}function cK(e){var t=e.initialProps,r=e.children,n=t.selected,a=t.min,i=t.max,o=function(d,u,m){var f,p;(f=t.onDayClick)===null||f===void 0||f.call(t,d,u,m);var v=!!(u.selected&&a&&(n==null?void 0:n.length)===a);if(!v){var g=!!(!u.selected&&i&&(n==null?void 0:n.length)===i);if(!g){var b=n?zI([],n):[];if(u.selected){var y=b.findIndex(function(x){return Mr(d,x)});b.splice(y,1)}else b.push(d);(p=t.onSelect)===null||p===void 0||p.call(t,b,d,u,m)}
748}},l={disabled:[]};n&&l.disabled.push(function(d){var u=i&&n.length>i-1,m=n.some(function(f){return Mr(f,d)});return!!(u&&!m)});var c={selected:n,onDayClick:o,modifiers:l};return s.jsx(wj.Provider,{value:c,children:r})}function jj(){var e=h.useContext(wj);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function dK(e,t){var r=t||{},n=r.from,a=r.to;return n&&a?Mr(a,e)&&Mr(n,e)?void 0:Mr(a,e)?{from:a,to:void 0}:Mr(n,e)?void 0:yl(n,e)?{from:e,to:a}:{from:n,to:e}:a?yl(e,a)?{from:a,to:e}:{from:e,to:a}:n?Fc(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}var Nj=h.createContext(void 0);function uK(e){if(!ah(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return s.jsx(Nj.Provider,{value:t,children:e.children})}return s.jsx(mK,{initialProps:e.initialProps,children:e.children})}function mK(e){var t=e.initialProps,r=e.children,n=t.selected,a=n||{},i=a.from,o=a.to,l=t.min,c=t.max,d=function(p,v,g){var b,y;(b=t.onDayClick)===null||b===void 0||b.call(t,p,v,g);var x=dK(p,n);(y=t.onSelect)===null||y===void 0||y.call(t,x,p,v,g)},u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(u.range_start=[i],o?(u.range_end=[o],Mr(i,o)||(u.range_middle=[{after:i,before:o}])):u.range_end=[i]):o&&(u.range_start=[o],u.range_end=[o]),l&&(i&&!o&&u.disabled.push({after:ev(i,l-1),before:Js(i,l-1)}),i&&o&&u.disabled.push({after:i,before:Js(i,l-1)}),!i&&o&&u.disabled.push({after:ev(o,l-1),before:Js(o,l-1)})),c){if(i&&!o&&(u.disabled.push({before:Js(i,-c+1)}),u.disabled.push({after:Js(i,c-1)})),i&&o){var m=Xn(o,i)+1,f=c-m;u.disabled.push({before:ev(i,f)}),u.disabled.push({after:Js(o,f)})}!i&&o&&(u.disabled.push({before:Js(o,-c+1)}),u.disabled.push({after:Js(o,c-1)}))}return s.jsx(Nj.Provider,{value:{selected:n,onDayClick:d,modifiers:u},children:r})}function _j(){var e=h.useContext(Nj);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function xf(e){return Array.isArray(e)?zI([],e):e!==void 0?[e]:[]}function hK(e){var t={};return Object.entries(e).forEach(function(r){var n=r[0],a=r[1];t[n]=xf(a)}),t}var oa;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(oa||(oa={}));var fK=oa.Selected,Ya=oa.Disabled,pK=oa.Hidden,gK=oa.Today,rv=oa.RangeEnd,nv=oa.RangeMiddle,av=oa.RangeStart,xK=oa.Outside;function vK(e,t,r){var n,a=(n={},n[fK]=xf(e.selected),n[Ya]=xf(e.disabled),n[pK]=xf(e.hidden),n[gK]=[e.today],n[rv]=[],n[nv]=[],n[av]=[],n[xK]=[],n);return e.fromDate&&a[Ya].push({before:e.fromDate}),e.toDate&&a[Ya].push({after:e.toDate}),nh(e)?a[Ya]=a[Ya].concat(t.modifiers[Ya]):ah(e)&&(a[Ya]=a[Ya].concat(r.modifiers[Ya]),a[av]=r.modifiers[av],a[nv]=r.modifiers[nv],a[rv]=r.modifiers[rv]),a}var GI=h.createContext(void 0);function yK(e){var t=Bt(),r=jj(),n=_j(),a=vK(t,r,n),i=hK(t.modifiers),o=Xe(Xe({},a),i);return s.jsx(GI.Provider,{value:o,children:e.children})}function YI(){var e=h.useContext(GI);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function bK(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function wK(e){return!!(e&&typeof e=="object"&&"from"in e)}function jK(e){return!!(e&&typeof e=="object"&&"after"in e)}function NK(e){return!!(e&&typeof e=="object"&&"before"in e)}function _K(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function kK(e,t){var r,n=t.from,a=t.to;if(n&&a){var i=Xn(a,n)<0;i&&(r=[a,n],n=r[0],a=r[1]);var o=Xn(e,n)>=0&&Xn(a,e)>=0;return o}return a?Mr(a,e):n?Mr(n,e):!1}function SK(e){return aj(e)}function CK(e){return Array.isArray(e)&&e.every(aj)}function EK(e,t){return t.some(function(r){if(typeof r=="boolean")return r;if(SK(r))return Mr(e,r);if(CK(r))return r.includes(e);if(wK(r))return kK(e,r);if(_K(r))return r.dayOfWeek.includes(e.getDay());if(bK(r)){var n=Xn(r.before,e),a=Xn(r.after,e),i=n>0,o=a<0,l=yl(r.before,r.after);return l?o&&i:i||o}return jK(r)?Xn(e,r.after)>0:NK(r)?Xn(r.before,e)>0:typeof r=="function"?r(e):!1})}function kj(e,t,r){var n=Object.keys(t).reduce(function(i,o){var l=t[o];return EK(e,l)&&i.push(o),i},[]),a={};
748return n.forEach(function(i){return a[i]=!0}),r&&!uj(e,r)&&(a.outside=!0),a}function PK(e,t){for(var r=Br(e[0]),n=Eg(e[e.length-1]),a,i,o=r;o<=n;){var l=kj(o,t),c=!l.disabled&&!l.hidden;if(!c){o=Js(o,1);continue}if(l.selected)return o;l.today&&!i&&(i=o),a||(a=o),o=Js(o,1)}return i||a}var TK=365;function KI(e,t){var r=t.moveBy,n=t.direction,a=t.context,i=t.modifiers,o=t.retry,l=o===void 0?{count:0,lastFocused:e}:o,c=a.weekStartsOn,d=a.fromDate,u=a.toDate,m=a.locale,f={day:Js,week:hb,month:ia,year:YH,startOfWeek:function(b){return a.ISOWeek?Il(b):Ua(b,{locale:m,weekStartsOn:c})},endOfWeek:function(b){return a.ISOWeek?_A(b):cj(b,{locale:m,weekStartsOn:c})}},p=f[r](e,n==="after"?1:-1);n==="before"&&d?p=KH([d,p]):n==="after"&&u&&(p=QH([u,p]));var v=!0;if(i){var g=kj(p,i);v=!g.disabled&&!g.hidden}return v?p:l.count>TK?l.lastFocused:KI(p,{moveBy:r,direction:n,context:a,modifiers:i,retry:Xe(Xe({},l),{count:l.count+1})})}var QI=h.createContext(void 0);function AK(e){var t=ih(),r=YI(),n=h.useState(),a=n[0],i=n[1],o=h.useState(),l=o[0],c=o[1],d=PK(t.displayMonths,r),u=a??(l&&t.isDateDisplayed(l))?l:d,m=function(){c(a),i(void 0)},f=function(b){i(b)},p=Bt(),v=function(b,y){if(a){var x=KI(a,{moveBy:b,direction:y,context:p,modifiers:r});Mr(a,x)||(t.goToDate(x,a),f(x))}},g={focusedDay:a,focusTarget:u,blur:m,focus:f,focusDayAfter:function(){return v("day","after")},focusDayBefore:function(){return v("day","before")},focusWeekAfter:function(){return v("week","after")},focusWeekBefore:function(){return v("week","before")},focusMonthBefore:function(){return v("month","before")},focusMonthAfter:function(){return v("month","after")},focusYearBefore:function(){return v("year","before")},focusYearAfter:function(){return v("year","after")},focusStartOfWeek:function(){return v("startOfWeek","before")},focusEndOfWeek:function(){return v("endOfWeek","after")}};return s.jsx(QI.Provider,{value:g,children:e.children})}function Sj(){var e=h.useContext(QI);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function IK(e,t){var r=YI(),n=kj(e,r,t);return n}var Cj=h.createContext(void 0);function RK(e){if(!Og(e.initialProps)){var t={selected:void 0};return s.jsx(Cj.Provider,{value:t,children:e.children})}return s.jsx(MK,{initialProps:e.initialProps,children:e.children})}function MK(e){var t=e.initialProps,r=e.children,n=function(i,o,l){var c,d,u;if((c=t.onDayClick)===null||c===void 0||c.call(t,i,o,l),o.selected&&!t.required){(d=t.onSelect)===null||d===void 0||d.call(t,void 0,i,o,l);return}(u=t.onSelect)===null||u===void 0||u.call(t,i,i,o,l)},a={selected:t.selected,onDayClick:n};return s.jsx(Cj.Provider,{value:a,children:r})}function XI(){var e=h.useContext(Cj);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function OK(e,t){var r=Bt(),n=XI(),a=jj(),i=_j(),o=Sj(),l=o.focusDayAfter,c=o.focusDayBefore,d=o.focusWeekAfter,u=o.focusWeekBefore,m=o.blur,f=o.focus,p=o.focusMonthBefore,v=o.focusMonthAfter,g=o.focusYearBefore,b=o.focusYearAfter,y=o.focusStartOfWeek,x=o.focusEndOfWeek,w=function(P){var M,D,$,W;Og(r)?(M=n.onDayClick)===null||M===void 0||M.call(n,e,t,P):nh(r)?(D=a.onDayCl
748ick)===null||D===void 0||D.call(a,e,t,P):ah(r)?($=i.onDayClick)===null||$===void 0||$.call(i,e,t,P):(W=r.onDayClick)===null||W===void 0||W.call(r,e,t,P)},j=function(P){var M;f(e),(M=r.onDayFocus)===null||M===void 0||M.call(r,e,t,P)},N=function(P){var M;m(),(M=r.onDayBlur)===null||M===void 0||M.call(r,e,t,P)},S=function(P){var M;(M=r.onDayMouseEnter)===null||M===void 0||M.call(r,e,t,P)},E=function(P){var M;(M=r.onDayMouseLeave)===null||M===void 0||M.call(r,e,t,P)},_=function(P){var M;(M=r.onDayPointerEnter)===null||M===void 0||M.call(r,e,t,P)},I=function(P){var M;(M=r.onDayPointerLeave)===null||M===void 0||M.call(r,e,t,P)},R=function(P){var M;(M=r.onDayTouchCancel)===null||M===void 0||M.call(r,e,t,P)},T=function(P){var M;(M=r.onDayTouchEnd)===null||M===void 0||M.call(r,e,t,P)},k=function(P){var M;(M=r.onDayTouchMove)===null||M===void 0||M.call(r,e,t,P)},C=function(P){var M;(M=r.onDayTouchStart)===null||M===void 0||M.call(r,e,t,P)},A=function(P){var M;(M=r.onDayKeyUp)===null||M===void 0||M.call(r,e,t,P)},L=function(P){var M;switch(P.key){case"ArrowLeft":P.preventDefault(),P.stopPropagation(),r.dir==="rtl"?l():c();break;case"ArrowRight":P.preventDefault(),P.stopPropagation(),r.dir==="rtl"?c():l();break;case"ArrowDown":P.preventDefault(),P.stopPropagation(),d();break;case"ArrowUp":P.preventDefault(),P.stopPropagation(),u();break;case"PageUp":P.preventDefault(),P.stopPropagation(),P.shiftKey?g():p();break;case"PageDown":P.preventDefault(),P.stopPropagation(),P.shiftKey?b():v();break;case"Home":P.preventDefault(),P.stopPropagation(),y();break;case"End":P.preventDefault(),P.stopPropagation(),x();break}(M=r.onDayKeyDown)===null||M===void 0||M.call(r,e,t,P)},O={onClick:w,onFocus:j,onBlur:N,onKeyDown:L,onKeyUp:A,onMouseEnter:S,onMouseLeave:E,onPointerEnter:_,onPointerLeave:I,onTouchCancel:R,onTouchEnd:T,onTouchMove:k,onTouchStart:C};return O}function DK(){var e=Bt(),t=XI(),r=jj(),n=_j(),a=Og(e)?t.selected:nh(e)?r.selected:ah(e)?n.selected:void 0;return a}function LK(e){return Object.values(oa).includes(e)}function FK(e,t){var r=[e.classNames.day];return Object.keys(t).forEach(function(n){var a=e.modifiersClassNames[n];if(a)r.push(a);else if(LK(n)){var i=e.classNames["day_".concat(n)];i&&r.push(i)}}),r}function $K(e,t){var r=Xe({},e.styles.day);return Object.keys(t).forEach(function(n){var a;r=Xe(Xe({},r),(a=e.modifiersStyles)===null||a===void 0?void 0:a[n])}),r}function UK(e,t,r){var n,a,i,o=Bt(),l=Sj(),c=IK(e,t),d=OK(e,c),u=DK(),m=!!(o.onDayCl
748ick||o.mode!=="default");h.useEffect(function(){var S;c.outside||l.focusedDay&&m&&Mr(l.focusedDay,e)&&((S=r.current)===null||S===void 0||S.focus())},[l.focusedDay,e,r,m,c.outside]);var f=FK(o,c).join(" "),p=$K(o,c),v=!!(c.outside&&!o.showOutsideDays||c.hidden),g=(i=(a=o.components)===null||a===void 0?void 0:a.DayContent)!==null&&i!==void 0?i:oK,b=s.jsx(g,{date:e,displayMonth:t,activeModifiers:c}),y={style:p,className:f,children:b,role:"gridcell"},x=l.focusTarget&&Mr(l.focusTarget,e)&&!c.outside,w=l.focusedDay&&Mr(l.focusedDay,e),j=Xe(Xe(Xe({},y),(n={disabled:c.disabled,role:"gridcell"},n["aria-selected"]=c.selected,n.tabIndex=w||x?0:-1,n)),d),N={isButton:m,isHidden:v,activeModifiers:c,selectedDays:u,buttonProps:j,divProps:y};return N}function BK(e){var t=h.useRef(null),r=UK(e.date,e.displayMonth,t);return r.isHidden?s.jsx("div",{role:"gridcell"}):r.isButton?s.jsx(vp,Xe({name:"day",ref:t},r.buttonProps)):s.jsx("div",Xe({},r.divProps))}function zK(e){var t=e.number,r=e.dates,n=Bt(),a=n.onWeekNumberClick,i=n.styles,o=n.classNames,l=n.locale,c=n.labels.labelWeekNumber,d=n.formatters.formatWeekNumber,u=d(Number(t),{locale:l});if(!a)return s.jsx("span",{className:o.weeknumber,style:i.weeknumber,children:u});var m=c(Number(t),{locale:l}),f=function(p){a(t,r,p)};return s.jsx(vp,{name:"week-number","aria-label":m,className:o.weeknumber,style:i.weeknumber,onClick:f,children:u})}function WK(e){var t,r,n=Bt(),a=n.styles,i=n.classNames,o=n.showWeekNumber,l=n.components,c=(t=l==null?void 0:l.Day)!==null&&t!==void 0?t:BK,d=(r=l==null?void 0:l.WeekNumber)!==null&&r!==void 0?r:zK,u;return o&&(u=s.jsx("td",{className:i.cell,style:a.cell,children:s.jsx(d,{number:e.weekNumber,dates:e.dates})})),s.jsxs("tr",{className:i.row,style:a.row,children:[u,e.dates.map(function(m){return s.jsx("td",{className:i.cell,style:a.cell,role:"presentation",children:s.jsx(c,{displayMonth:e.displayMonth,date:m})},eG(m))})]})}function Ik(e,t,r){for(var n=r!=null&&r.ISOWeek?_A(t):cj(t,r),a=r!=null&&r.ISOWeek?Il(e):Ua(e,r),i=Xn(n,a),o=[],l=0;l<=i;l++)o.push(Js(a,l));var c=o.reduce(function(d,u){var m=r!=null&&r.ISOWeek?kA(u):CA(u,r),f=d.find(function(p){return p.weekNumber===m});return f?(f.dates.push(u),d):(d.push({weekNumber:m,dates:[u]}),d)},[]);return c}function VK(e,t){var r=Ik(Br(e),Eg(e),t);if(t!=null&&t.useFixedWeeks){var n=sG(e,t);if(n<6){var a=r[r.length-1],i=a.dates[a.dates.length-1],o=hb(i,6-n),l=Ik(hb(i,1),o,t);r.push.apply(r,l)}}return r}function HK(e){var t,r,n,a=Bt(),i=a.locale,o=a.classNames,l=a.styles,c=a.hideHead,d=a.fixedWeeks,u=a.components,m=a.weekStartsOn,f=a.firstWeekContainsDate,p=a.ISOWeek,v=VK(e.displayMonth,{useFixedWeeks:!!d,ISOWeek:p,locale:i,weekStartsOn:m,firstWeekContainsDate:f}),g=(t=u==null?void 0:u.Head)!==null&&t!==void 0?t:iK,b=(r=u==null?void 0:u.Row)!==null&&r!==void 0?r:WK,y=(n=u==null?void 0:u.Footer)!==null&&n!==void 0?n:rK;return s.jsxs("table",{id:e.id,className:o.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&s.jsx(g,{}),s.jsx("tbody",{className:o.tbody,style:l.tbody,children:v.map(function(x){return s.jsx(b,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),s.jsx(y,{displayMonth:e.displayMonth})]})}function qK(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var GK=qK()?h.useLayoutEffect:h.useEffect,iv=!1,YK=0;function Rk(){return"react-day-picker-".concat(++YK)}function KK(e){var t,r=e??(iv?Rk():null),n=h.useState(r),a=n[0],i=n[1];return GK(function(){a===null&&i(Rk())},[]),h.useEffect(function(){iv===!1&&(iv=!0)},[]),(t=e??a)!==null&&t!==void 0?t:void 0}function QK(e){var t,r,n=Bt(),a=n.dir,i=n.classNames,o=n.styles,l=n.components,c=ih().displayMonths,d=KK(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),u=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,m=[i.month],f=o.month,p=e.displayIndex===0,v=e.displayIndex===c.length-1,g=!p&&!v;a==="rtl"&&(t=[p,v],v=t[0],p=t[1]),p&&(m.push(i.caption_start),f=Xe(Xe({},f),o.caption_start)),v&&(m.push(i.caption_end),f=Xe(Xe({},f),o.caption_end)),g&&(m.push(i.caption_between),f=Xe(Xe({},f),o.caption_between));var b=(r=l==null?void 0:l.Caption)!==null&&r!==void 0?r:sK;return s.jsxs("div",{className:m.join(" "),style:f,children:[s.jsx(b,{id:d,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(HK,{id:u,"aria-labelledby":d,displayMonth:e.displayMonth})]},e.displayIndex)}function XK(e){var t=Bt(),r=t.classNames,n=t.styles;return s.jsx("div",{className:r.months,style:n.months,children:e.children})}function JK(e){var t,r,n=e.initialProps,a=Bt(),i=Sj(),o=ih(),l=h.useState(!1),c=l[0],d=l[1];h.useEffect(function(){a.initialFocus&&i.focusTarget&&(c||(i.focus(i.focusTarget),d(!0)))},[a.initialFocus,c,i.focus,i.focusTarget,i]);var u=[a.classNames.root,a.className];a.numberOfMonths>1&&u.push(a.classNames.multiple_months),a.showWeekNumber&&u.push(a.classNames.with_weeknumber);var m=Xe(Xe({},a.styles.root),a.style),f=Object.keys(n).filter(function(v){return v.startsWith("data-")}).reduce(function(v,g){var b;return Xe(Xe({},v),(b={},b[g]=n[g],b))},{}),p=(r=(t=n.components)===null||t===void 0?void 0:t.Months)!==null&&r!==void 0?r:XK;return s.jsx("div",Xe({className:u.join(" "),style:m,dir:a.dir,id:a.id,nonce:n.nonce,title:n.title,lang:n.lang},f,{children:s.jsx(p,{children:o.displayMonths.map(function(v,g){return s.jsx(QK,{displayIndex:g,displayMonth:v},g)})})}))}function ZK(e){var t=e.children,r=NY(e,["children"]);return s.jsx(zY,{initialProps:r,children:s.jsx(JY,{children:s.jsx(RK,{initialProps:r,children:s.jsx(lK,{initialProps:r,children:s.jsx(uK,{initialProps:r,children:s.jsx(yK,{children:s.jsx(AK,{children:t})})})})})})})}function eQ(e){return s.jsx(ZK,Xe({},e,{children:s.jsx(JK,{initialProps:e})}))}function _b({className:e,classNames:t,showOutsideDays:r=!0,...n}){return s.jsx(eQ,{showOutsideDays:r,className:me("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:sp
748ace-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:me(md({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:me(md({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({...a})=>s.jsx(ea,{className:"h-4 w-4"}),IconRight:({...a})=>s.jsx(Da,{className:"h-4 w-4"})},...n})}_b.displayName="Calendar";var Dg="Popover",[JI,yte]=gs(Dg,[Mo]),oh=Mo(),[tQ,Wo]=JI(Dg),ZI=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:o=!1}=e,l=oh(t),c=h.useRef(null),[d,u]=h.useState(!1),[m,f]=xr({prop:n,defaultProp:a??!1,onChange:i,caller:Dg});return s.jsx(sg,{...l,children:s.jsx(tQ,{scope:t,contentId:Fr(),triggerRef:c,open:m,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:d,onCustomAnchorAdd:h.useCallback(()=>u(!0),[]),onCustomAnchorRemove:h.useCallback(()=>u(!1),[]),modal:o,children:r})})};ZI.displayName=Dg;var eR="PopoverAnchor",sQ=h.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=Wo(eR,r),i=oh(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=a;return h.useEffect(()=>(o(),()=>l()),[o,l]),s.jsx(Wm,{...i,...n,ref:t})});sQ.displayName=eR;var tR="PopoverTrigger",sR=h.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=Wo(tR,r),i=oh(r),o=Ye(t,a.triggerRef),l=s.jsx(Ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":oR(a.open),...n,ref:o,onClick:pe(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:s.jsx(Wm,{asChild:!0,...i,children:l})});sR.displayName=tR;var Ej="PopoverPortal",[rQ,nQ]=JI(Ej,{forceMount:void 0}),rR=e=>{const{__scopePopover:t,forceMount:r,children:n,container:a}=e,i=Wo(Ej,t);return s.jsx(rQ,{scope:t,forceMount:r,children:s.jsx(Ns,{present:r||i.open,children:s.jsx(kd,{asChild:!0,container:a,children:n})})})};rR.displayName=Ej;var bd="PopoverContent",nR=h.forwardRef((e,t)=>{const r=nQ(bd,e.__scopePopover),{forceMount:n=r.forceMount,...a}=e,i=Wo(bd,e.__scopePopover);return s.jsx(Ns,{present:n||i.open,children:i.modal?s.jsx(iQ,{...a,ref:t}):s.jsx(oQ,{...a,ref:t})})});nR.displayName=bd;var aQ=wo("PopoverContent.RemoveScroll"),iQ=h.forwardRef((e,t)=>{const r=Wo(bd,e.__scopePopover),n=h.useRef(null),a=Ye(t,n),i=h.useRef(!1);return h.useEffect(()=>{const o=n.current;if(o)return vg(o)},[]),s.jsx(Km,{as:aQ,allowPinchZoom:!0,children:s.jsx(aR,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pe(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),i.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:pe(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;i.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:pe(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),oQ=h.forwardRef((e,t)=>{const r=Wo(bd,e.__scopePopover),n=h.useRef(!1),a=h.useRef(!1);return s.jsx(aR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((d=r.triggerRef.current)==null?void 0:d.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),aR=h.forwardRef((e,t)=>
748{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...m}=e,f=Wo(bd,r),p=oh(r);return gg(),s.jsx(Ym,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(Fl,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:s.jsx(rg,{"data-state":oR(f.open),role:"dialog",id:f.contentId,...p,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),iR="PopoverClose",lQ=h.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=Wo(iR,r);return s.jsx(Ce.button,{type:"button",...n,ref:t,onClick:pe(e.onClick,()=>a.onOpenChange(!1))})});lQ.displayName=iR;var cQ="PopoverArrow",dQ=h.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=oh(r);return s.jsx(ng,{...a,...n,ref:t})});dQ.displayName=cQ;function oR(e){return e?"open":"closed"}var uQ=ZI,mQ=sR,hQ=rR,lR=nR;const kb=uQ,Sb=mQ,yp=h.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},a)=>s.jsx(hQ,{children:s.jsx(lR,{ref:a,align:t,sideOffset:r,className:me("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));yp.displayName=lR.displayName;const cR=sY,dR=h.createContext({}),xn=({...e})=>s.jsx(dR.Provider,{value:{name:e.name},children:s.jsx(iY,{...e})}),Lg=()=>{const e=h.useContext(dR),t=h.useContext(uR),{getFieldState:r,formState:n}=Mg(),a=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},uR=h.createContext({}),Zr=h.forwardRef(({className:e,...t},r)=>{const n=h.useId();return s.jsx(uR.Provider,{value:{id:n},children:s.jsx("div",{ref:r,className:me("space-y-2",e),...t})})});Zr.displayName="FormItem";const en=h.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:a}=Lg();return s.jsx(_e,{ref:r,className:me(n&&"text-destructive",e),htmlFor:a,...t})});en.displayName="FormLabel";const tn=h.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:a,formMessageId:i}=Lg();return s.jsx(TC,{ref:t,id:n,"aria-describedby":r?`${a} ${i}`:`${a}`,"aria-invalid":!!r,...e})});tn.displayName="FormControl";const fQ=h.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Lg();return s.jsx("p",{ref:r,id:n,className:me("text-sm text-muted-foreground",e),...t})});fQ.displayName="FormDescription";const Yn=h.forwardRef(({className:e,children:t,...r},n)=>{const{error:a,formMessageId:i}=Lg(),o=a?String(a==null?void 0:a.message):t;return o?s.jsx("p",{ref:n,id:i,className:me("text-sm font-medium text-destructive",e),...r,children:o}):null});Yn.displayName="FormMessage";class Kr extends ie.Component{constructor(r){super(r);rN(this,"resetError",()=>{this.setState({hasError:!1,error:void 0})});this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){console.error("Admin Error Boundary caught error:",{error:r.message,stack:r.stack,componentStack:n.componentStack})}render(){if(this.state.hasError){if(this.props.fallback){const r=this.props.fallback;return s.jsx(r,{error:this.state.error,resetError:this.resetError})}return s.jsx("div",{className:"flex items-center justify-center p-8 rounded-lg border border-destructive/20 bg-destructive/5",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Rc,{className:"h-12 w-12 text-destructive mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:"ÎάÏι Ïήγε ÏÏÏαβά"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"ΠαÏοÏ
ÏιάÏÏηκε Îνα ÏÏάλμα ÏÏο admin panel."}),s.jsx(F,{onClick:this.resetError,variant:"outline",children:"Îοκιμή ξανά"})]})})}return this.props.children}}const pQ=e=>{if(!e.current_period_start||!e.current_period_end)return"";const t=new Date(e.current_period_start*1e3),r=new Date(e.current_period_end*1e3),n=Math.round((r.getTime()-t.getTime())/(1e3*60*60*24));return n>=335?"year":n>=150?"6 months":n>=80?"3 months":n>=20?"month":n>=5?"week":`${n} days`},gQ=({userId:e,stripeData:t,onDataUpdate:r})=>{const{toast:n}=at(),[a,i]=h.useState(!1),[o,l]=h.useState([]),[c,d]=h.useState(!1),u=async()=>{i(!0);try{const{data:b,error:y}=await U.functions.invoke("sync-user-stripe-data",{body:{userId:e}});if(y)throw y;n({title:"Success",description:"Stripe data synced successfully"}),r()}catch(b){console.error("Error syncing Stripe data:",b),n({title:"Error",description:b.message||"Failed to sync Stripe data",variant:"destructive"})}finally{i(!1)}},m=async()=>
748{if(t!=null&&t.stripe_customer_id){d(!0);try{const{data:b,error:y}=await U.functions.invoke("fetch-invoices",{body:{customerId:t.stripe_customer_id,limit:20}});if(y)throw y;l(b.invoices||[])}catch(b){console.error("Error loading invoices:",b),n({title:"Error",description:"Failed to load invoice history",variant:"destructive"})}finally{d(!1)}}},f=(b,y="EUR")=>new Intl.NumberFormat("en-US",{style:"currency",currency:y.toUpperCase()}).format(b/100),p=b=>(typeof b=="number"?new Date(b*1e3):new Date(b)).toLocaleDateString(),v=b=>{const y={active:"bg-green-100 text-green-800",past_due:"bg-yellow-100 text-yellow-800",canceled:"bg-red-100 text-red-800",unpaid:"bg-red-100 text-red-800",trialing:"bg-blue-100 text-blue-800",incomplete:"bg-gray-100 text-gray-800"};return s.jsx(ye,{className:y[b]||"bg-gray-100 text-gray-800",children:b.charAt(0).toUpperCase()+b.slice(1)})},g=b=>{switch(b){case"paid":return s.jsxs(ye,{className:"bg-green-100 text-green-800",children:[s.jsx(ta,{className:"h-3 w-3 mr-1"}),"Paid"]});case"open":return s.jsxs(ye,{className:"bg-blue-100 text-blue-800",children:[s.jsx(Ms,{className:"h-3 w-3 mr-1"}),"Open"]});case"draft":return s.jsx(ye,{className:"bg-gray-100 text-gray-800",children:"Draft"});case"uncollectible":return s.jsxs(ye,{className:"bg-red-100 text-red-800",children:[s.jsx(ns,{className:"h-3 w-3 mr-1"}),"Failed"]});default:return s.jsx(ye,{variant:"outline",children:b})}};return h.useEffect(()=>{t!=null&&t.stripe_customer_id&&m()},[t==null?void 0:t.stripe_customer_id]),t!=null&&t.stripe_customer_id?s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(Ir,{className:"h-5 w-5"}),"Stripe Customer Data"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[t.last_sync_at&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:["Last synced: ",p(t.last_sync_at)]}),s.jsx(F,{variant:"outline",size:"sm",onClick:u,disabled:a,children:a?s.jsx(Yt,{className:"h-4 w-4 animate-spin"}):s.jsx(Yt,{className:"h-4 w-4"})})]})]})}),s.jsx(ce,{children:s.jsxs(Si,{defaultValue:"overview",className:"w-full",children:[s.jsxs(Ci,{className:"grid w-full grid-cols-4",children:[s.jsx(Pt,{value:"overview",children:"Overview"}),s.jsx(Pt,{value:"payments",children:"Payment Methods"}),s.jsx(Pt,{value:"subscriptions",children:"Subscriptions"}),s.jsx(Pt,{value:"invoices",children:"Invoices"})]}),s.jsxs(it,{value:"overview",className:"space-y-4",children:[s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsxs("div",{className:"p-4 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(M5,{className:"h-4 w-4 text-green-600"}),s.jsx("span",{className:"text-sm font-medium",children:"Lifetime Value"})]}),s.jsx("div",{className:"text-2xl font-bold",children:f(t.lifetime_value_cents||0)})]}),s.jsxs("div",{className:"p-4 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(G5,{className:"h-4 w-4 text-blue-600"}),s.jsx("span",{className:"text-sm font-medium",children:"Total Invoices"})]}),s.jsx("div",{className:"text-2xl font-bold",children:t.invoice_count||0})]}),s.jsxs("div",{className:"p-4 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(ns,{className:"h-4 w-4 text-red-600"}),s.jsx("span",{className:"text-sm font-medium",children:"Failed Payments"})]}),s.jsx("div",{className:"text-2xl font-bold",children:t.failed_payment_count||0})]}),s.jsxs("div",{className:"p-4 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Ra,{className:"h-4 w-4 text-purple-600"}),s.jsx("span",{className:"text-sm font-medium",children:"Last Payment"})]}),s.jsx("div",{className:"text-sm",children:t.last_payment_date?p(t.last_payment_date):"None"})]})]}),t.billing_address&&Object.keys(t.billing_address).length>0&&s.jsxs("div",{className:"p-4 border rounded-lg",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Billing Address"}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:[t.billing_address.line1,s.jsx("br",{}),t.billing_address.line2&&s.jsxs(s.Fragment,{children:[t.billing_address.line2,s.jsx("br",{})]}),t.billing_address.city,", ",t.billing_address.state," ",t.billing_address.postal_code,s.jsx("br",{}),t.billing_address.country]})]})]}),s.jsx(it,{value:"payments",className:"space-y-4",children:t.payment_methods&&t.payment_methods.length>0?s.jsx("div",{className:"space-y-3",children:t.payment_methods.map((b,y)=>{var x;return s.jsx("div",{className:"p-4 border rounded-lg",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ir,{className:"h-5 w-5"}),s.jsxs("div",{children:[s.jsxs("div",{className:"font-medium",children:[(x=b.brand)==null?void 0:x.toUpperCase()," â¢â¢â¢â¢ ",b.last4]}),b.exp_month&&b.exp_year&&s.jsxs("div",{className:"text-sm text-muted-foreground",children:["Expires ",b.exp_month,"/",b.exp_year]})]})]}),s.jsx(ye,{variant:y===0?"default":"outline",children:y===0?"Primary":"Secondary"})]})},b.id)})}):s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No payment methods found"})}),s.jsx(it,{value:"subscriptions",className:"space-y-4",children:t.subscription_history&&t.subscription_history.length>0?s.jsx("div",{className:"space-y-3",children:t.subscription_history.map(b=>s.jsxs("div",{className:"p-4 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"font-medium",children:["Subscription ",b.id.slice(-8)]}),v(b.status)]}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:["Created ",p(b.created)]})]}),s.jsxs("div",{className:"space-y-2",children:[b.current_period_start&&b.current_period_end&&s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Period:"})," ",p(b.current_period_start)," - ",p(b.current_period_end)]}),b.canceled_at&&s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Canceled:"})," ",p(b.canceled_at)]}),b.items&&b.items.length>0&&s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Items:"}),s.jsx("ul",{className:"ml-4 mt-1",children:b.items.map((y,x)=>{const w=pQ(b);return s.jsxs("li",{children:[y.amount&&f(y.amount,y.currency),w&&` / ${w}`]},x)})})]})]})]},b.id))}):s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No subscription history found"})}),s.jsxs(it,{value:"invoices",className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"font-medium",children:"Invoice History"}
748),s.jsx(F,{variant:"outline",size:"sm",onClick:m,disabled:c,children:c?s.jsx(Yt,{className:"h-4 w-4 animate-spin"}):s.jsx(Yt,{className:"h-4 w-4"})})]}),o.length>0?s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"Invoice"}),s.jsx(Ae,{children:"Date"}),s.jsx(Ae,{children:"Amount"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Actions"})]})}),s.jsx(Vr,{children:o.map(b=>s.jsxs(Lt,{children:[s.jsx(Ie,{className:"font-medium",children:b.number||b.id.slice(-8)}),s.jsx(Ie,{children:p(b.created)}),s.jsx(Ie,{children:f(b.amount_due,b.currency)}),s.jsx(Ie,{children:g(b.status)}),s.jsx(Ie,{children:b.invoice_pdf&&s.jsx(F,{variant:"outline",size:"sm",onClick:()=>window.open(b.invoice_pdf,"_blank"),children:s.jsx(vi,{className:"h-4 w-4"})})})]},b.id))})]}):c?s.jsxs("div",{className:"text-center py-8",children:[s.jsx(Yt,{className:"h-6 w-6 animate-spin mx-auto mb-2"}),s.jsx("p",{className:"text-muted-foreground",children:"Loading invoices..."})]}):s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No invoices found"})]})]})})]}):s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(Ir,{className:"h-5 w-5"}),"Stripe Customer Data"]})}),s.jsxs(ce,{className:"text-center py-8",children:[s.jsx(ns,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"No Stripe customer data found"}),s.jsx(F,{onClick:u,disabled:a,children:a?s.jsxs(s.Fragment,{children:[s.jsx(Yt,{className:"h-4 w-4 mr-2 animate-spin"}),"Syncing..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Yt,{className:"h-4 w-4 mr-2"}),"Sync with Stripe"]})})]})]})},xQ=()=>{const{toast:e}=at(),[t,r]=h.useState(!1),[n,a]=h.useState(null),i=async()=>{r(!0),a(null);try{const{data:o,error:l}=await U.functions.invoke("sync-stripe-subscribers",{body:{only_active:!1,page_limit:100}});if(l)throw l;a(o),e({title:"Sync Complete",description:`Synced ${o.syncedCount} subscribers. ${o.errorCount} errors.`})}catch(o){console.error("Error syncing subscribers:",o),e({title:"Sync Failed",description:o.message||"Failed to sync subscribers from Stripe",variant:"destructive"})}finally{r(!1)}};return s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(Yt,{className:"h-5 w-5"}),"Sync Stripe Subscribers"]}
748),s.jsx(gt,{children:"Sync all subscription data from Stripe to update subscriber statuses and cancellation flags"})]}),s.jsxs(ce,{className:"space-y-4",children:[s.jsx("div",{className:"flex gap-4",children:s.jsx(F,{onClick:i,disabled:t,className:"w-full sm:w-auto",children:t?s.jsxs(s.Fragment,{children:[s.jsx(mt,{className:"h-4 w-4 mr-2 animate-spin"}),"Syncing..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Yt,{className:"h-4 w-4 mr-2"}),"Sync All Subscribers"]})})}),n&&s.jsxs("div",{className:"p-4 bg-muted/50 rounded-lg space-y-3",children:[s.jsxs("h4",{className:"font-semibold flex items-center gap-2",children:[s.jsx(ta,{className:"h-4 w-4 text-green-600"}),"Sync Results"]}),s.jsxs("div",{className:"grid gap-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Processed:"}),s.jsx(ye,{variant:"outline",children:n.totalInBatch})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Successfully Synced:"}),s.jsxs(ye,{className:"bg-green-100 text-green-800",children:[s.jsx(ta,{className:"h-3 w-3 mr-1"}),n.syncedCount]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Errors:"}),s.jsxs(ye,{className:"bg-red-100 text-red-800",children:[s.jsx(Rs,{className:"h-3 w-3 mr-1"}),n.errorCount]})]}),n.hasMore&&s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"More Available:"}),s.jsx(ye,{className:"bg-blue-100 text-blue-800",children:"Yes"})]})]}),n.hasMore&&s.jsx("p",{className:"text-xs text-muted-foreground",children:"Note: More subscriptions available. Run sync again to process next batch."})]})]})]})};var Fg="Checkbox",[vQ,bte]=gs(Fg),[yQ,Pj]=vQ(Fg);function bQ(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:a,disabled:i,form:o,name:l,onCheckedChange:c,required:d,value:u="on",internal_do_not_use_render:m}=e,[f,p]=xr({prop:r,defaultProp:a??!1,onChange:c,caller:Fg}),[v,g]=h.useState(null),[b,y]=h.useState(null),x=h.useRef(!1),w=v?!!o||!!v.closest("form"):!0,j={checked:f,disabled:i,setChecked:p,control:v,setControl:g,name:l,form:o,value:u,hasConsumerStoppedPropagationRef:x,required:d,defaultChecked:vo(a)?!1:a,isFormControl:w,bubbleInput:b,setBubbleInput:y};return s.jsx(yQ,{scope:t,...j,children:wQ(m)?m(j):n})}var mR="CheckboxTrigger",hR=h.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},a)=>{const{control:i,value:o,disabled:l,checked:c,required:d,setControl:u,setChecked:m,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:v}=Pj(mR,e),g=Ye(a,u),b=h.useRef(c);return h.useEffect(()=>{const y=i==null?void 0:i.form;if(y){const x=()=>m(b.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[i,m]),s.jsx(Ce.button,{type:"button",role:"checkbox","aria-checked":vo(c)?"mixed":c,"aria-required":d,"data-state":vR(c),"data-disabled":l?"":void 0,disabled:l,value:o,...n,ref:g,onKeyDown:pe(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:pe(r,y=>{m(x=>vo(x)?!0:!x),v&&p&&(f.current=y.isPropagationStopped(),f.current||y.stopPropagation())})})});hR.displayName=mR;var Tj=h.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:a,defaultChecked:i,required:o,disabled:l,value:c,onCheckedChange:d,form:u,...m}=e;return s.jsx(bQ,{__scopeCheckbox:r,checked:a,defaultChecked:i,disabled:l,required:o,onCheckedChange:d,name:n,form:u,value:c,internal_do_not_use_render:({isFormControl:f})=>s.jsxs(s.Fragment,{children:[s.jsx(hR,{...m,ref:t,__scopeCheckbox:r}),f&&s.jsx(xR,{__scopeCheckbox:r})]})})});Tj.displayName=Fg;var fR="CheckboxIndicator",pR=h.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...a}=e,i=Pj(fR,r);return s.jsx(Ns,{present:n||vo(i.checked)||i.checked===!0,children:s.jsx(Ce.span,{"data-state":vR(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});pR.displayName=fR;var gR="CheckboxBubbleInput",xR=h.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:o,required:l,disabled:c,name:d,value:u,form:m,bubbleInput:f,setBubbleInput:p}=Pj(gR,e),v=Ye(r,p),g=kg(i),b=tg(n);h.useEffect(()=>{const x=f;if(!x)return;const w=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(w,"checked").set,S=!a.current;if(g!==i&&N){const E=new Event("click",{bubbles:S});x.indeterminate=vo(i),N.call(x,vo(i)?!1:i),x.dispatchEvent(E)}},[f,g,i,a]);const y=h.useRef(vo(i)?!1:i);return s.jsx(Ce.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??y.current,required:l,disabled:c,name:d,value:u,form:m,...t,tabIndex:-1,ref:v,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});xR.displayName=gR;function wQ(e){return typeof e=="function"}function vo(e){return e==="indeterminate"}function vR(e){return vo(e)?"indeterminate":e?"checked":"unchecked"}const yR=h.forwardRef(({className:e,...t},r)=>s.jsx(Tj,{ref:r,className:me("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:s.jsx(pR,{className:me("flex items-center justify-center text-current"),children:s.jsx(Ar,{className:"h-4 w-4"})})}));yR.displayName=Tj.displayName;const qh={wellbe_monthly:"1_month",wellbe_annual:"12_months",wellbe_6month:"6_months"},jQ=[{value:"1_month",label:"1 Month"},{value:"6_months",label:"6 Months"},{value:"12_months",label:"12 Months"}];function NQ(){const{toast:e}=at(),[t,r]=h.useState("input"),[n,a]=h.useState(""),[i,o]=h.useState(!1),[l,c]=h.useState(null),[d,u]=h.useState(""),[m,f]=h.useState(""),[p,v]=h.useState([]),g=async(j,N={})=>{var R,T,k;const{data:{session:S},error:E}=await U.auth.getSession();if(E||!S)throw new Error("No active session - please refresh the page and log in again");const{data:_,error:I}=await U.functions.invoke(j,N);if(I){const C=((T=(R=I==null?void 0:I.context)==null?void 0:R.response)==null?void 0:T.status)||500;let A="";const L=(k=I==null?void 0:I.context)==null?void 0:k.response;if(L)try{const P=await L.clone().text();try{const M=JSON.parse(P);A=M.details||M.message||M.error||P}catch{A=P}}catch{}let O=I.message||"Unknown error";throw C===401?O="Session expired - please refresh and try again":C===403?O="Admin access required":C===404?O=A||"Purchase token not found":A&&(O=A),new Error(O)}return _},b=async()=>
748{if(!n.trim()){e({title:"Input Required",description:"Please enter a purchase token",variant:"destructive"});return}o(!0);try{const j=await g("verify-google-play-purchase",{body:{purchaseToken:n.trim()}});if(j.success&&j.data){c(j.data);const N=qh[j.data.productId];N&&f(N),j.data.email&&u(j.data.email),r("verify"),e({title:"Token Verified",description:`Order ID: ${j.data.orderId}`})}else throw new Error("Invalid response from verification")}catch(j){console.error("Verification error:",j),e({title:"Verification Failed",description:j.message||"Failed to verify purchase token",variant:"destructive"})}finally{o(!1)}},y=async()=>{var N,S;if(!l)return;const j=d.trim();if(!j){e({title:"Email Required",description:"Please enter the user's email address",variant:"destructive"});return}if(!m){e({title:"Tier Required",description:"Please select a subscription tier",variant:"destructive"});return}o(!0);try{const E=[{email:j,purchaseToken:l.purchaseToken,orderId:l.orderId,productId:l.productId,expiryDate:l.expiryTime,autoRenewing:l.autoRenewing}],_={...qh,[l.productId]:m},I=await g("import-google-play-subscriptions",{body:{imports:E,productTierMap:_}});if(I.imported>0)v(R=>[{email:j,orderId:l.orderId,productId:l.productId,tier:m,timestamp:new Date},...R.slice(0,4)]),r("import"),e({title:"Import Successful",description:`Subscription imported for ${j}`});else throw new Error(((S=(N=I.results)==null?void 0:N[0])==null?void 0:S.error)||"Import failed")}catch(E){console.error("Import error:",E),e({title:"Import Failed",description:E.message||"Failed to import subscription",variant:"destructive"})}finally{o(!1)}},x=()=>{r("input"),a(""),c(null),u(""),f("")},w=j=>j.includes("ACTIVE")?"bg-green-500/10 text-green-700 border-green-200":j.includes("EXPIRED")||j.includes("CANCELED")?"bg-red-500/10 text-red-700 border-red-200":"bg-yellow-500/10 text-yellow-700 border-yellow-200";return s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(be,{children:"Import from Purchase Token"}),s.jsx(gt,{children:"Verify and import individual Google Play subscriptions using purchase tokens"})]}),s.jsxs(ce,{className:"space-y-6",children:[t==="input"&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"purchaseToken",children:"Purchase Token"}),s.jsx(ke,{id:"purchaseToken",placeholder:"Paste purchase token from Google Play Console...",value:n,onChange:j=>a(j.target.value),className:"font-mono text-sm"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Copy the purchase token from Order Management in Google Play Console"})]}),s.jsxs(F,{onClick:b,disabled:i||!n.trim(),children:[i&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"Verify Token"]})]}),t==="verify"&&l&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-2 p-4 bg-green-50 dark:bg-green-950/20 border border-green-200 dark:border-green-800 rounded-lg",children:[s.jsx(ms,{className:"h-5 w-5 text-green-600 mt-0.5"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"font-semibold text-green-900 dark:text-green-100",children:"Token Verified Successfully"}),s.jsx("p",{className:"text-sm text-green-700 dark:text-green-300 mt-1",children:"Review the subscription details below before importing"})]})]}),s.jsxs("div",{className:"grid gap-4 p-4 bg-muted/50 rounded-lg",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(_e,{className:"text-xs text-muted-foreground",children:"Order ID"}),s.jsx("p",{className:"font-mono text-sm mt-1",children:l.orderId})]}),s.jsxs("div",{children:[s.jsx(_e,{className:"text-xs text-muted-foreground",children:"Product ID"}),s.jsx("p",{className:"font-mono text-sm mt-1",children:l.productId})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(_e,{className:"text-xs text-muted-foreground",children:"Status"}),s.jsx(ye,{className:`mt-1 ${w(l.subscriptionState)}`,children:l.subscriptionState.replace("SUBSCRIPTION_STATE_","")})]}),s.jsxs("div",{children:[s.jsx(_e,{className:"text-xs text-muted-foreground",children:"Auto-Renew"}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.autoRenewing?s.jsx(ms,{className:"h-4 w-4 text-green-600"}):s.jsx(Rs,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm",children:l.autoRenewing?"Yes":"No"})]})]})]}),l.expiryTime&&s.jsxs("div",{children:[s.jsx(_e,{className:"text-xs text-muted-foreground",children:"Expiry Date"}),s.jsx("p",{className:"text-sm mt-1",children:new Date(l.expiryTime).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]}),s.jsxs("div",{className:"space-y-4 p-4 border rounded-lg",children:[s.jsx("h3",{className:"font-semibold text-sm",children:"Import Details"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(_e,{htmlFor:"email",children:["User Email ",!l.email&&s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsx(ke,{id:"email",type:"email",placeholder:"[email protected]",value:d,onChange:j=>u(j.target.value)}),l.email?s.jsxs("p",{className:"text-xs text-green-600 flex items-center gap-1",children:[s.jsx(ms,{className:"h-3 w-3"}),"Email found in Google Play data"]}):s.jsxs("p",{className:"text-xs text-amber-600 flex items-center gap-1",children:[s.jsx(ns,{className:"h-3 w-3"}),"Email not found - please enter manually"]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(_e,{htmlFor:"tier",children:["Subscription Tier ",!qh[l.productId]&&s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsxs(ql,{value:m,onValueChange:f,children:[s.jsx(Bo,{id:"tier",children:s.jsx(Gl,{placeholder:"Select tier..."})}),s.jsx(zo,{children:jQ.map(j=>s.jsx(sr,{value:j.value,children:j.label},j.value))})]}),qh[l.productId]?s.jsxs("p",{className:"text-xs text-green-600 flex items-center gap-1",children:[s.jsx(ms,{className:"h-3 w-3"}),"Auto-mapped from product ID"]}):s.jsxs("p",{className:"text-xs text-amber-600 flex items-center gap-1",children:[s.jsx(ns,{className:"h-3 w-3"}),"Unknown product - please select tier manually"]})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(F,{onClick:y,disabled:i,children:[i&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"Import Subscription"]}),s.jsx(F,{variant:"outline",onClick:x,children:"Cancel"})]})]}),t==="import"&&l&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-2 p-4 bg-green-50 dark:bg-green-950/20 border border-green-200 dark:border-green-800 rounded-lg",children:[s.jsx(ms,{className:"h-5 w-5 text-green-600 mt-0.5"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"font-semibold text-green-900 dark:text-green-100",children:"Successfully Imported!"}),s.jsxs("div",{className:"space-y-1 mt-2 text-sm text-green-700 dark:text-green-300",children:[s.jsxs("p",{children:["User: ",d]}),s.jsxs("p",{children:["Order ID: ",l.orderId]}),s.jsxs("p",{children:["Subscription tier: ",m]}),l.expiryTime&&s.jsxs("p",{children:["Active until: ",new Date(l.expiryTime).toLocaleDateString()]})]})]})]}),s.jsxs(F,{onClick:x,variant:"outline",className:"w-full",children:[s.jsx(Y5,{className:"mr-2 h-4 w-4"}),"Import Another"]})]}),p.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-sm font-semibold text-muted-foreground",children:"Recent Imports"}),s.jsx("div",{className:"space-y-2",children:p.map((j,N)=>s.jsxs("div",{className:"flex items-center justify-between p-3 bg-muted/30 rounded-lg text-sm",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"font-medium",children:j.email}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[j.orderId," ⢠",j.tier]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:j.timestamp.toLocaleTimeString()})]},N))})]})]})]})}function _Q(){const{toast:e}=at(),[t,r]=h.useState(1),[n,a]=h.useState(!1),[i,o]=h.useState(!1),[l,c]=h.useState(null),[d,u]=h.useState(null),[m,f]=h.useState(null),[p,v]=h.useState(new Set),[g,b]=h.useState(null),[y,x]=h.useState(!1),w={wellbe_monthly:"1_month",wellbe_annual:"12_months",wellbe_6month:"6_months"},j=async(k,C={})=>{var M,D,$;const{data:{session:A},error:L}=await U.auth.getSession();if(L||!A)throw new Error("No active session - please refresh the page and log in again");const{data:O,error:P}=await U.functions.invoke(k,{...C});if(P){const W=((D=(M=P==null?void 0:P.context)==null?void 0:M.response)==null?void 0:D.status)||500;let X="";const q=($=P==null?void 0:P.context)==null?void 0:$.response;if(q)try{const se=await q.clone().text();try{const te=JSON.parse(se);X=te.details||te.message||te.error||se}catch{X=se}}catch{}let H=P.message||"Unknown error";throw W===401?H="Session expired or invalid - please refresh and try again":W===403?H="Admin access required (check user_roles table)":W===500&&X&&(H=X),new Error(`[${W}] ${H}`)}return O},N=async()=>{o(!0);try{const k=await j("get-google-play-subscriber-metrics");c({activeSubscribers:k.activeSubscribers,date:k.date}),e({title:"Metrics Retrieved",description:`${k.activeSubscribers} active subscribers as of ${new Date(k.date).toLocaleDateString()}`})}catch(k){console.error("Metrics error:",k),e({title:"Metrics Failed",description:k.message||"Failed to fetch Google Play metrics",variant:"destructive"})}finally{o(!1)}},S=async()=>{a(!0);try{const k=await j("discover-google-play-subscriptions");u(k),e({title:"Discovery Complete",description:`Found ${k.totalFound} subscriptions (${k.activeSubscriptions} active)`}),await E(k.subscriptions)}catch(k){console.error("Discovery error:",k),e({title:"Discovery Failed",description:k.message||"Failed to discover Google Play subscriptions",variant:"destructive"})}finally{a(!1)}},E=async k=>{a(!0);try{const C=await j("match-google-play-users",{body:{subscriptions:k}});f(C),v(new Set(C.matchedUsers.map(A=>A.purchaseToken))),r(2),e({title:"Matching Complete",description:`Matched ${C.matched} users, ${C.unmatched} unmatched`})}catch(C){console.error("Matching error:",C),e({title:"Matching Failed",description:C.message||"Failed to match Google Play users",variant:"destructive"})}finally{a(!1)}},_=async()=>
748{if(p.size===0){e({title:"No Selections",description:"Please select at least one subscription to import",variant:"destructive"});return}a(!0);try{const k=m.matchedUsers.filter(A=>p.has(A.purchaseToken)).map(A=>({userId:A.userId,email:A.email,purchaseToken:A.purchaseToken,orderId:A.proposedUpdate.google_play_order_id,productId:A.proposedUpdate.google_play_product_id,expiryDate:A.proposedUpdate.subscription_end,autoRenewing:A.proposedUpdate.google_play_auto_renewing})),C=await j("import-google-play-subscriptions",{body:{imports:k,productTierMap:w}});b({imported:C.imported,failed:C.failed,details:C.results}),r(3),e({title:"Import Complete",description:`Successfully imported ${C.imported} subscriptions${C.failed>0?`, ${C.failed} failed`:""}`})}catch(k){console.error("Import error:",k),e({title:"Import Failed",description:k.message||"Failed to import Google Play subscriptions",variant:"destructive"})}finally{a(!1)}},I=()=>{r(1),u(null),f(null),v(new Set),b(null)},R=k=>{const C=new Set(p);C.has(k)?C.delete(k):C.add(k),v(C)},T=()=>{p.size===(m==null?void 0:m.matchedUsers.length)?v(new Set):v(new Set((m==null?void 0:m.matchedUsers.map(k=>k.purchaseToken))||[]))};return s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(be,{children:"Google Play Subscriptions Manager"}),s.jsx(gt,{children:"Discover and import Google Play subscription data"})]}),s.jsx(ce,{className:"space-y-6",children:s.jsxs(Si,{defaultValue:"bulk",className:"w-full",children:[s.jsxs(Ci,{className:"grid w-full grid-cols-2",children:[s.jsx(Pt,{value:"bulk",children:"Bulk Discovery"}),s.jsx(Pt,{value:"token",children:"Import from Token"})]}),s.jsxs(it,{value:"bulk",className:"space-y-6 mt-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold",children:"Active Subscriber Count"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Get the current number of active Google Play subscriptions"})]}),s.jsxs(F,{onClick:N,disabled:i,variant:"outline",children:[i&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"Get Metrics"]})]}),l&&s.jsx(oe,{className:"bg-primary/5 border-primary/20",children:s.jsx(ce,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-3xl font-bold text-primary",children:l.activeSubscribers.toLocaleString()}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:["Active subscribers as of ",new Date(l.date).toLocaleDateString()]})]}),s.jsx(ms,{className:"h-12 w-12 text-primary/40"})]})})})]}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("span",{className:"w-full border-t"})}),s.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:s.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or discover individual subscriptions"})})]}),s.jsxs(tj,{open:y,onOpenChange:x,children:[s.jsx(sj,{asChild:!0,children:s.jsxs(F,{variant:"ghost",size:"sm",className:"w-full justify-between",children:["Product ID Mapping Configuration",s.jsx($l,{className:`h-4 w-4 transition-transform ${y?"rotate-180":""}`})]})}),s.jsx(rj,{children:s.jsx("div",{className:"grid gap-2 text-sm p-4 bg-muted/50 rounded-lg mt-2",children:Object.entries(w).map(([k,C])=>s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"font-mono text-muted-foreground",children:k}),s.jsxs("span",{className:"font-semibold",children:["â ",C]})]},k))})})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ye,{variant:t>=1?"default":"outline",children:"1. Discover"}),s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx(ye,{variant:t>=2?"default":"outline",children:"2. Match"}),s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx(ye,{variant:t>=3?"default":"outline",children:"3. Import"})]}),t===1&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs(F,{onClick:S,disabled:n,children:[n&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"Discover Google Play Subscriptions"]}),d&&s.jsx("div",{className:"space-y-2",children:s.jsxs("div",{className:"flex gap-4",children:[s.jsxs(ye,{variant:"outline",children:["Total: ",d.totalFound]}),s.jsxs(ye,{variant:"default",children:["Active: ",d.activeSubscriptions]})]})})]}),t===2&&m&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex gap-4",children:[s.jsxs(ye,{variant:"default",className:"gap-1",children:[s.jsx(ms,{className:"h-3 w-3"}
748),"Matched: ",m.matched]}),s.jsxs(ye,{variant:"outline",className:"gap-1",children:[s.jsx(ns,{className:"h-3 w-3"}),"Unmatched: ",m.unmatched]})]}),m.matchedUsers.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h3",{className:"text-sm font-semibold",children:["Matched Users (",p.size," selected)"]}),s.jsx(F,{variant:"ghost",size:"sm",onClick:T,children:p.size===m.matchedUsers.length?"Deselect All":"Select All"})]}),s.jsx("div",{className:"border rounded-lg",children:s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{className:"w-12"}),s.jsx(Ae,{children:"Email"}),s.jsx(Ae,{children:"Product ID"}),s.jsx(Ae,{children:"Tier"}),s.jsx(Ae,{children:"Expires"}),s.jsx(Ae,{children:"Auto-Renew"})]})}),s.jsx(Vr,{children:m.matchedUsers.map(k=>s.jsxs(Lt,{children:[s.jsx(Ie,{children:s.jsx(yR,{checked:p.has(k.purchaseToken),onCheckedChange:()=>R(k.purchaseToken)})}),s.jsx(Ie,{className:"font-medium",children:k.email}),s.jsx(Ie,{className:"font-mono text-xs",children:k.proposedUpdate.google_play_product_id}),s.jsx(Ie,{children:s.jsx(ye,{variant:"outline",children:k.proposedUpdate.subscription_tier})}),s.jsx(Ie,{className:"text-sm",children:new Date(k.proposedUpdate.subscription_end).toLocaleDateString()}),s.jsx(Ie,{children:k.proposedUpdate.google_play_auto_renewing?s.jsx(ms,{className:"h-4 w-4 text-green-600"}):s.jsx(Rs,{className:"h-4 w-4 text-muted-foreground"})})]},k.purchaseToken))})]})})]}),m.unmatchedSubscriptions.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-sm font-semibold text-amber-600",children:"Unmatched Subscriptions (Manual Review Required)"}),s.jsx("div",{className:"border rounded-lg bg-amber-50 dark:bg-amber-950/20",children:s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"Order ID"}),s.jsx(Ae,{children:"Product ID"}),s.jsx(Ae,{children:"Expires"})]})}),s.jsx(Vr,{children:m.unmatchedSubscriptions.map(k=>s.jsxs(Lt,{children:[s.jsx(Ie,{className:"font-mono text-xs",children:k.orderId}),s.jsx(Ie,{className:"font-mono text-xs",children:k.productId}),s.jsx(Ie,{className:"text-sm",children:new Date(k.expiryDate).toLocaleDateString()})]},k.purchaseToken))})]})})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(F,{variant:"outline",onClick:I,disabled:n,children:"Start Over"}),s.jsxs(F,{onClick:_,disabled:n||p.size===0,children:[n&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"Import ",p.size," Subscription",p.size!==1?"s":""]})]})]}),t===3&&g&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsx(oe,{children:s.jsx(ce,{className:"pt-6",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-3xl font-bold text-green-600",children:g.imported}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Imported"})]})})}),s.jsx(oe,{children:s.jsx(ce,{className:"pt-6",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-3xl font-bold text-red-600",children:g.failed}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed"})]})})}),s.jsx(oe,{children:s.jsx(ce,{className:"pt-6",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-3xl font-bold",children:g.imported+g.failed}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Total"})]})})})]}),g.details&&g.details.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-sm font-semibold",children:"Import Details"}),s.jsx("div",{className:"border rounded-lg max-h-64 overflow-y-auto",children:s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Email"}),s.jsx(Ae,{children:"Message"})]})}),s.jsx(Vr,{children:g.details.map((k,C)=>s.jsxs(Lt,{children:[s.jsx(Ie,{children:k.success?s.jsx(ms,{className:"h-4 w-4 text-green-600"}):s.jsx(Rs,{className:"h-4 w-4 text-red-600"})}),s.jsx(Ie,{className:"font-medium",children:k.email}),s.jsx(Ie,{className:"text-sm text-muted-foreground",children:k.message})]},C))})]})})]}),s.jsx(F,{onClick:I,children:"Start Over"})]})]}),s.jsx(it,{value:"token",className:"space-y-6 mt-6",children:s.jsx(NQ,{})})]})})]})}const kQ=Sd("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),er=h.forwardRef(({className:e,variant:t,...r},n)=>s.jsx("div",{ref:n,role:"alert",className:me(kQ({variant:t}),e),...r}));er.displayName="Alert";const bu=h.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:me("mb-1 font-medium leading-none tracking-tight",e),...t}));bu.displayName="AlertTitle";const tr=h.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:me("text-sm [&_p]:leading-relaxed",e),...t}));
748tr.displayName="AlertDescription";function SQ(){var C,A,L,O,P,M,D;const[e,t]=h.useState("subscribers"),[r,n]=h.useState(!1),[a,i]=h.useState([]),[o,l]=h.useState([]),[c,d]=h.useState(null),[u,m]=h.useState(null),[f,p]=h.useState(null),[v,g]=h.useState("all"),[b,y]=h.useState(""),[x,w]=h.useState(""),[j,N]=h.useState(null),S=async($,W={},X=0)=>{var K,Z,re;const{data:{session:q},error:H}=await U.auth.getSession();if(H||!q)throw Dt.error("Session expired. Please log in again."),new Error("No active session. Please log in again.");let se=q;const te=Math.floor(Date.now()/1e3),B=q.expires_at??0;if(B&&B-te<300){const{data:de,error:Pe}=await U.auth.refreshSession();if(Pe||!(de!=null&&de.session))throw Dt.error("Session refresh failed. Please log in again."),new Error("Session refresh failed");se=de.session}const{data:le,error:J}=await U.functions.invoke($,{...W,headers:{...(W==null?void 0:W.headers)||{},Authorization:`Bearer ${se.access_token}`}});if(J){const de=((Z=(K=J==null?void 0:J.context)==null?void 0:K.response)==null?void 0:Z.status)||500,Pe=(re=J==null?void 0:J.context)==null?void 0:re.response;let Ee="";if(Pe)try{const ze=await Pe.clone().text();try{const et=JSON.parse(ze);Ee=et.details||et.error||ze}catch{Ee=ze}}catch{}const tt=Ee||J.message||"Unknown error";if((de===401||/AuthSessionMissingError/i.test(tt))&&X===0){const{data:ze,error:et}=await U.auth.refreshSession();if(!et&&(ze!=null&&ze.session))return S($,W,1);Dt.error("Authentication failed. Please log out and log back in.")}throw{message:tt,status:de}}return le},E=async()=>{n(!0);try{const{data:$,error:W}=await U.auth.refreshSession();W?Dt.error("Session refresh failed: "+W.message):$!=null&&$.session&&Dt.success("Session refreshed successfully")}catch($){Dt.error("Session refresh error: "+$.message)}finally{n(!1)}},_=async()=>{n(!0);const $={products:{success:!1,message:""},metrics:{success:!1,message:""},subscriptions:{success:!1,message:""}};try{try{await S("list-google-play-products"),$.products={success:!0,status:200,message:"Products API accessible"}}catch(q){$.products={success:!1,status:q.status,message:q.message}}try{const q=await S("get-google-play-subscriber-metrics");$.metrics={success:!0,status:200,message:q.source==="internal_db"?"DB-backed metrics accessible":"Metrics API accessible"}}catch(q){$.metrics={success:!1,status:q.status,message:q.message}}try{const q=await S("discover-google-play-subscriptions");$.subscriptions={success:!0,status:200,message:q.source==="internal_db"?"DB-backed subscriptions accessible":"Subscriptions API accessible"}}catch(q){$.subscriptions={success:!1,status:q.status,message:q.message}}p($),Object.values($).every(q=>q.success)?Dt.success("All tests passed! Configuration is valid."):Dt.error("Some tests failed. Check the diagnostics below.");const X=Object.values($).some(q=>q.message.includes("Missing Google Play configuration")||q.message.includes("GOOGLE_PLAY_SERVICE_ACCOUNT_JSON")||q.message.includes("GOOGLE_PLAY_PACKAGE_NAME"));m({serviceAccount:!X&&($.products.success||$.metrics.success||$.subscriptions.success),packageName:$.products.success||!$.products.message.includes("404"),projectId:$.subscriptions.success,dataset:$.subscriptions.success,table:$.subscriptions.success})}catch{Dt.error("Configuration test failed")}finally{n(!1)}},I=async()=>{n(!0);try{let W=(await S("discover-google-play-subscriptions")).subscriptions||[];v!=="all"&&(W=W.filter(X=>X.subscriptionState===v)),b&&(W=W.filter(X=>X.productId.includes(b))),i(W),N(null),Dt.success(`Loaded ${W.length} subscribers`)}catch($){Dt.error($.message),i([])}finally{n(!1)}},R=async()=>{var $;n(!0);try{const W=await S("list-google-play-products");l(W.products||[]),Dt.success(`Loaded ${(($=W.products)==null?void 0:$.length)||0} products`)}catch(W){Dt.error(W.message),l([])}finally{n(!1)}},T=async()=>{n(!0);try{const $=await S("get-google-play-subscriber-metrics");d($),$.source==="internal_db"?Dt.success("Metrics loaded from database"):Dt.success("Metrics loaded")}catch($){Dt.error($.message),d(null)}finally{n(!1)}},k=()=>{const $=["Email","User ID","Order ID","Product ID","State","Subscribed","Subscription
748End","Auto Renew","Tier","Last Sync"],W=a.map(te=>[te.email,te.userId||"N/A",te.orderId,te.productId,te.subscriptionState,te.subscribed,te.subscriptionEnd||"N/A",te.autoRenewing,te.tier||"N/A",te.lastSyncAt||"N/A"]),X=[$,...W].map(te=>te.join(",")).join(` 749`),q=new Blob([X],{type:"text/csv"}),H=URL.createObjectURL(q),se=document.createElement("a");se.href=H,se.download=`google-play-subscribers-${Date.now()}.csv`,se.click(),Dt.success("CSV exported")};return s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(be,{children:"Google Play Subscribers Explorer"}),s.jsx(gt,{children:"View and manage Google Play subscription data from your Supabase database"}),s.jsxs(er,{className:"mt-4",children:[s.jsx(ns,{className:"h-4 w-4"}),s.jsxs(tr,{children:[s.jsx("strong",{children:"Data Sources:"}),s.jsxs("ul",{className:"mt-2 space-y-1 text-sm",children:[s.jsxs("li",{children:["⢠",s.jsx("strong",{children:"Products API"})," â Tests Google Play connectivity (lists subscription SKUs)"]}),s.jsxs("li",{children:["⢠",s.jsx("strong",{children:"Metrics"})," ð DB-backed aggregate statistics (active users, product breakdown)"]}),s.jsxs("li",{children:["⢠",s.jsx("strong",{children:"Subscriptions"})," ð DB-backed subscriber list (emails, status, products)"]})]})]})]}),s.jsxs("div",{className:"flex gap-2 mt-4",children:[s.jsx(F,{onClick:_,disabled:r,variant:"outline",children:r?s.jsx(mt,{className:"w-4 h-4 animate-spin"}):"Test Configuration"}),s.jsx(F,{onClick:E,disabled:r,variant:"outline",size:"sm",children:"Refresh Session"})]}),f&&s.jsxs("div",{className:"mt-4 space-y-2",children:[s.jsx("h4",{className:"text-sm font-medium",children:"API Diagnostics"}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.products.success?s.jsx(ms,{className:"w-4 h-4 text-green-600"}):s.jsx(Rs,{className:"w-4 h-4 text-red-600"}),s.jsx("span",{className:"font-medium",children:"Products (Google API):"}),s.jsx("span",{className:"text-muted-foreground",children:f.products.message}),f.products.status&&s.jsx(ye,{variant:"outline",children:f.products.status})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.metrics.success?s.jsx(ms,{className:"w-4 h-4 text-green-600"}):s.jsx(Rs,{className:"w-4 h-4 text-red-600"}),s.jsx("span",{className:"font-medium",children:"Metrics (DB-backed):"}),s.jsx("span",{className:"text-muted-foreground",children:f.metrics.message}),f.metrics.status&&s.jsx(ye,{variant:"outline",children:f.metrics.status})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.subscriptions.success?s.jsx(ms,{className:"w-4 h-4 text-green-600"}):s.jsx(Rs,{className:"w-4 h-4 text-red-600"}),s.jsx("span",{className:"font-medium",children:"Subscriptions (DB-backed):"}),s.jsx("span",{className:"text-muted-foreground",children:f.subscriptions.message}),f.subscriptions.status&&s.jsx(ye,{variant:"outline",children:f.subscriptions.status})]})]})]})]}),s.jsx(ce,{children:s.jsxs(Si,{value:e,onValueChange:t,children:[s.jsxs(Ci,{className:"grid w-full grid-cols-3",children:[s.jsx(Pt,{value:"subscribers",children:"Subscribers"}),s.jsx(Pt,{value:"metrics",children:"Metrics"}),s.jsx(Pt,{value:"products",children:"Products"})]}),s.jsxs(it,{value:"subscribers",className:"space-y-4",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(ql,{value:v,onValueChange:g,children:[s.jsx(Bo,{className:"w-[200px]",children:s.jsx(Gl,{placeholder:"Filter by status"})}),s.jsxs(zo,{children:[s.jsx(sr,{value:"all",children:"All States"}),s.jsx(sr,{value:"SUBSCRIPTION_STATE_ACTIVE",children:"Active"}),s.jsx(sr,{value:"SUBSCRIPTION_STATE_CANCELED",children:"Canceled"}),s.jsx(sr,{value:"SUBSCRIPTION_STATE_EXPIRED",children:"Expired"})]})]}),s.jsx(ke,{placeholder:"Product ID filter",value:b,onChange:$=>y($.target.value),className:"w-[200px]"}),s.jsx(F,{onClick:I,disabled:r,children:r?s.jsx(mt,{className:"w-4 h-4 animate-spin"}):"Load Subscribers"}),s.jsxs(F,{onClick:k,disabled:a.length===0,variant:"outline",children:[s.jsx(vi,{className:"w-4 h-4 mr-2"}),"Export CSV"]})]}),f&&!f.products.success&&!f.metrics.success&&!f.subscriptions.success&&s.jsxs(er,{children:[s.jsx(ns,{className:"w-4 h-4"}),s.jsx(tr,{children:f.products.message.includes("Missing Google Play configuration")||f.metrics.message.includes("Missing Google Play configuration")||f.subscriptions.message.includes("Missing Google Play configuration")?"Google Play not configured. Please set GOOGLE_PLAY_SERVICE_ACCOUNT_JSON and GOOGLE_PLAY_PACKAG
749E_NAME secrets.":f.products.message.includes("AuthSessionMissingError")||f.metrics.message.includes("AuthSessionMissingError")||f.subscriptions.message.includes("AuthSessionMissingError")?'Authentication issue detected. Please use the "Refresh Session" button or log out and back in.':f.products.status===404?"Google Play Products API returned 404. Verify package name and ensure the API is enabled in Google Cloud Console.":"Configuration test failed. Check the diagnostics above for details."})]}),s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"Email"}),s.jsx(Ae,{children:"Order ID"}),s.jsx(Ae,{children:"Product"}),s.jsx(Ae,{children:"State"}),s.jsx(Ae,{children:"Subscription End"}),s.jsx(Ae,{children:"Auto Renew"}),s.jsx(Ae,{children:"Tier"}),s.jsx(Ae,{children:"Last Sync"})]})}),s.jsx(Vr,{children:a.map(($,W)=>s.jsxs(Lt,{children:[s.jsx(Ie,{className:"font-medium",children:$.email}),s.jsx(Ie,{className:"font-mono text-xs",children:$.orderId}),s.jsx(Ie,{children:$.productId}),s.jsx(Ie,{children:s.jsx(ye,{variant:$.isActive?"default":"secondary",children:$.subscriptionState.replace("SUBSCRIPTION_STATE_","")})}),s.jsx(Ie,{className:"text-xs",children:$.subscriptionEnd?new Date($.subscriptionEnd).toLocaleDateString():"N/A"}),s.jsx(Ie,{children:$.autoRenewing?s.jsx(ms,{className:"w-4 h-4 text-green-600"}):s.jsx(Rs,{className:"w-4 h-4 text-gray-400"})}),s.jsx(Ie,{children:$.tier||"-"}),s.jsx(Ie,{className:"text-xs",children:$.lastSyncAt?new Date($.lastSyncAt).toLocaleDateString():"Never"})]},`${$.email}-${W}`))})]}),a.length===0&&!r&&s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'No subscribers loaded. Click "Load Subscribers" to fetch data.'}),j&&s.jsx("div",{className:"flex justify-center",children:s.jsx(F,{onClick:()=>{w(j),I()},variant:"outline",children:"Load More"})})]}),s.jsxs(it,{value:"metrics",className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(F,{onClick:T,disabled:r,children:r?s.jsx(mt,{className:"w-4 h-4 animate-spin"}):"Load Metrics"}),(c==null?void 0:c.source)==="internal_db"&&s.jsx(ye,{variant:"outline",children:"Source: Internal DB"})]}),c&&s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsx(be,{children:"Total Google Play Users"})}),s.jsxs(ce,{children:[s.jsx("div",{className:"text-4xl font-bold",children:((C=c.totals)==null?void 0:C.totalGooglePlayUsers)||0}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"All time"})]})]}),s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsx(be,{children:"Active Subscribers"})}),s.jsxs(ce,{children:[s.jsx("div",{className:"text-4xl font-bold",children:((A=c.totals)==null?void 0:A.activeSubscribers)||0}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Currently active"})]})]}),s.jsxs(oe,{className:"md:col-span-2",children:[s.jsx(xe,{children:s.jsx(be,{children:"Breakdown by Product"})}),s.jsx(ce,{children:(L=c.breakdowns)!=null&&L.byProduct&&Object.keys(c.breakdowns.byProduct).length>0?s.jsx("div",{className:"space-y-2",children:Object.entries(c.breakdowns.byProduct).map(([$,W])=>s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"font-medium",children:$}),s.jsx(ye,{children:W})]},$))}):s.jsx("p",{className:"text-sm text-muted-foreground",children:"No product data available"})})]}),s.jsxs(oe,{className:"md:col-span-2",children:[s.jsx(xe,{children:s.jsx(be,{children:"Auto-Renewal Status"})}),s.jsx(ce,{children:s.jsxs("div",{className:"flex gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold text-green-600",children:((P=(O=c.breakdowns)==null?void 0:O.byAutoRenewal)==null?void 0:P.active)||0}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Auto-renewing"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xl font-bold text-gray-600",children:((D=(M=c.breakdowns)==null?void 0:M.byAutoRenewal)==null?void 0:D.inactive)||0}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Not auto-renewing"})]})]})})]})]}),!c&&!r&&s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'No metrics loaded. Click "Load Metrics" to fetch data from database.'})]}),s.jsxs(it,{value:"products",className:"space-y-4",children:[s.jsx(F,{onClick:R,disabled:r,children:r?s.jsx(mt,{className:"w-4 h-4 animate-spin"}):"Load Products"}),s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"Product ID"}),s.jsx(Ae,{children:"Package"}),s.jsx(Ae,{children:"Base Plans"})]})}),s.jsx(Vr,{children:o.map($=>s.jsxs(Lt,{children:[s.jsx(Ie,{className:"font-mono",children:$.productId}),s.jsx(Ie,{className:"text-xs",children:$.packageName}),s.jsx(Ie,{children:s.jsx("div",{className:"flex gap-1 flex-wrap",children:$.basePlans.map(W=>s.jsx(ye,{variant:"outline",children:W.basePlanId},W.basePlanId))})})]},$.productId))})]})]})]})})]})}const CQ=h.lazy(()=>ut(()=>import("./DashboardOverview-B8jzTR21.js"),__vite__mapDeps([0,1]))),EQ=h.lazy(()=>ut(()=>import("./CommentsManager-CjySRslw.js"),[])),PQ=h.lazy(()=>ut(()=>import("./BadgeSystemManager-BpflxNPz.js"),[]).then(e=>({default:e.BadgeSystemManager}))),TQ=h.lazy(()=>ut(()=>import("./HallOfFameManager-BHDc0C4R.js"),[]).then(e=>({default:e.HallOfFameManager}))),AQ=h.lazy(()=>ut(()=>import("./StreamlinedVideoManagement-CwPxwP-B.js"),[]).then(e=>({default:e.StreamlinedVideoManagement}))),IQ=h.lazy(()=>ut(()=>import("./FeaturedCatalogManager-Cs6LwIMc.js"),__vite__mapDeps([2,3])).then(e=>({default:e.FeaturedCatalogManager}))),RQ=h.lazy(()=>ut(()=>import("./SectionManagement-C1vDJiwD.js"),__vite__mapDeps([4,3])).then(e=>({default:e.SectionManagement}
749))),MQ=h.lazy(()=>ut(()=>import("./InstructorManager-Bl7YnBUk.js"),__vite__mapDeps([5,6])).then(e=>({default:e.InstructorManager}))),OQ=h.lazy(()=>ut(()=>import("./WeeklyProposalManager-BQvl8OoX.js"),[]).then(e=>({default:e.WeeklyProposalManager}))),DQ=h.lazy(()=>ut(()=>import("./PromoCodeManager-BwSuCDcI.js"),__vite__mapDeps([7,6])).then(e=>({default:e.PromoCodeManager}))),LQ=h.lazy(()=>ut(()=>import("./UserUtilities-BY2oXGTn.js"),__vite__mapDeps([8,1])).then(e=>({default:e.UserUtilities}))),FQ=h.lazy(()=>ut(()=>Promise.resolve().then(()=>dee),void 0).then(e=>({default:e.default}))),$Q=h.lazy(()=>ut(()=>import("./EmailManagement-BocmuXqc.js"),[]).then(e=>({default:e.EmailManagement}))),UQ=h.lazy(()=>ut(()=>import("./EmailSubscribersList-BN6Ayrg4.js"),[]).then(e=>({default:e.EmailSubscribersList}))),BQ=h.lazy(()=>ut(()=>Promise.resolve().then(()=>Mee),void 0)),zQ=h.lazy(()=>ut(()=>import("./LoginActivityManager-CxnjXz3_.js"),[]).then(e=>({default:e.LoginActivityManager}))),WQ=h.lazy(()=>ut(()=>import("./FailedPaymentsManager-zWKN1cEp.js"),[]).then(e=>({default:e.FailedPaymentsManager}))),VQ=Uw({title:bn().min(1,"Title is required"),description:bn().min(1,"Description is required"),banner_url:bn().url("Must be a valid URL").optional().or(rT("")),start_date:rk({required_error:"Start date is required"}),end_date:rk({required_error:"End date is required"}),is_active:cb().default(!0),reset_progress:cb().default(!1)}).refine(e=>e.end_date>e.start_date,{message:"End date must be after start date",path:["end_date"]}),HQ=Uw({email:bn().email("Invalid email address"),first_name:bn().min(1,"First name is required"),last_name:bn().min(1,"Last name is required"),password:bn().optional(),grant_free_access:cb().default(!1)}),qQ=({onUserCreated:e})=>{const[t,r]=h.useState(!1),[n,a]=h.useState(!1),{toast:i}=at(),o=$I({resolver:BI(HQ),defaultValues:{email:"",first_name:"",last_name:"",password:"",grant_free_access:!1}}),l=async c=>{var d;a(!0);try{const{data:u}=await U.auth.getSession(),{data:m,error:f}=await U.functions.invoke("admin-create-user",{body:{email:c.email,first_name:c.first_name,last_name:c.last_name,password:c.password||void 0,grant_free_access:c.grant_free_access},headers:{Authorization:`Bearer ${(d=u.session)==null?void 0:d.access_token}`}});if(f)throw f;i({title:"Success",description:`User ${c.email} has been created successfully${c.password?"":". Password setup email sent."}`}),o.reset(),r(!1),e()}catch(u){console.error("Error creating user:",u),i({title:"Error",description:u.message||"Failed to create user",variant:"destructive"})}finally{a(!1)}};return s.jsxs(gr,{open:t,onOpenChange:r,children:[s.jsx(xl,{asChild:!0,children:s.jsxs(F,{variant:"default",size:"sm",className:"gap-2",children:[s.jsx(Ic,{className:"h-4 w-4"}),"Add User"]})}),s.jsxs(rr,{className:"sm:max-w-[500px]",children:[s.jsxs($r,{children:[s.jsx(Ur,{children:"Add New User"}),s.jsx(go,{children:"Create a new user account. If no password is provided, the user will receive an email to set their password."})]}),s.jsx(cR,{...o,children:s.jsxs("form",{onSubmit:o.handleSubmit(l),className:"space-y-4",children:[s.jsx(xn,{control:o.control,name:"email",render:({field:c})=>s.jsxs(Zr,{children:[s.jsx(en,{children:"Email *"}),s.jsx(tn,{children:s.jsx(ke,{placeholder:"[email protected]",...c})}),s.jsx(Yn,{})]})}),s.jsx(xn,{control:o.control,name:"first_name",render:({field:c})=>s.jsxs(Zr,{children:[s.jsx(en,{children:"First Name *"}),s.jsx(tn,{children:s.jsx(ke,{placeholder:"John",...c})}),s.jsx(Yn,{})]})}),s.jsx(xn,{control:o.control,name:"last_name",render:({field:c})=>s.jsxs(Zr,{children:[s.jsx(en,{children:"Last Name *"}),s.jsx(tn,{children:s.jsx(ke,{placeholder:"Doe",...c})}),s.jsx(Yn,{})]})}),s.jsx(xn,{control:o.control,name:"password",render:({field:c})=>s.jsxs(Zr,{children:[s.jsx(en,{children:"Password (Optional)"}),s.jsx(tn,{children:s.jsx(ke,{type:"password",placeholder:"Leave empty to send setup email",...c})}),s.jsx(Yn,{})]})}),s.jsx(xn,{control:o.control,name:"grant_free_access",render:({field:c})=>s.jsxs(Zr,{className:"flex flex-row items-center justify-between rounded-lg border p-4",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(en,{className:"text-base",children:"Grant Free Access"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Give this user immediate free access to all content"})]}),s.jsx(tn,{children:s.jsx("input",{type:"checkbox",checked:c.value,onChange:c.onChange,className:"h-4 w-4"})})]})}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(F,{type:"button",variant:"outline",onClick:()=>r(!1),disabled:n,children:"Cancel"}),s.jsx(F,{type:"submit",disabled:n,children:n?"Creating...":"Create User"})]})]})})]})]})},hn=()=>{console.log("AdminPanel component is rendering");const{user:e}=jt(),{toast:t}=at(),r=qe(),[n,a]=h.useState(!1),[i,o]=h.useState(!0),[l,c]=h.useState([]),[d,u]=
749h.useState(0),[m,f]=h.useState(1),[p,v]=h.useState(""),[g,b]=h.useState("active"),[y,x]=h.useState("all"),[w,j]=h.useState(!1),[N,S]=h.useState(null),[E,_]=h.useState(!1),[I,R]=h.useState([]),[T,k]=h.useState([]),[C,A]=h.useState([]),[L,O]=h.useState(null),[P,M]=h.useState(null),[D,$]=h.useState({title:"",description:"",banner_url:"",start_date:"",end_date:""}),[W,X]=h.useState({}),[q,H]=h.useState({}),[se,te]=h.useState(!1),[B,le]=h.useState(!1),[J,K]=h.useState({}),[Z,re]=h.useState({}),[de,Pe]=h.useState(!1),Ee=$s(),[tt,ze]=h.useState(!1),[et,st]=h.useState({usersStarted:0,usersCompleted:0,loading:!1}),z=Wl(),Y=20,ne=$I({resolver:BI(VQ),defaultValues:{title:"",description:"",banner_url:"",start_date:new Date,end_date:new Date,is_active:!0,reset_progress:!1}}),fe=()=>{if(!D.start_date||!D.end_date)return[];const V=new Date(D.start_date),ue=new Date(D.end_date),ve=Math.abs(ue.getTime()-V.getTime()),Ke=Math.ceil(ve/(1e3*60*60*24))+1;return Array.from({length:Ke},(dt,Et)=>Et+1)},ee=()=>{if(!P)return[];const V=new Date(P.start_date),ue=new Date(P.end_date),ve=Math.abs(ue.getTime()-V.getTime()),Ke=Math.ceil(ve/(1e3*60*60*24))+1;return Array.from({length:Ke},(dt,Et)=>Et+1)},ae=V=>{const ue=J[V]||"";return ue?C.filter(ve=>{var Ke;return ve.title.toLowerCase().includes(ue.toLowerCase())||((Ke=ve.description)==null?void 0:Ke.toLowerCase().includes(ue.toLowerCase()))}):C},ge=(V,ue)=>{X(ve=>({...ve,[V]:[...ve[V]||[],ue]}))},Ue=(V,ue)=>{X(ve=>({...ve,[V]:(ve[V]||[]).filter((Ke,dt)=>dt!==ue)}))};console.log("Current user:",e),h.useEffect(()=>{(async()=>{if(console.log("Checking admin status..."),!e){console.log("No user found, setting loading to false"),o(!1),a(!1);return}try{console.log("Querying user role for:",e.id);const{data:ue,error:ve}=await U.from("user_roles").select("role").eq("user_id",e.id).maybeSingle();if(console.log("Role query result:",{data:ue,error:ve}),ve){console.error("Error fetching user role:",ve),o(!1);return}if((ue==null?void 0:ue.role)!=="admin"){console.log("User is not admin. Role:",ue==null?void 0:ue.role),a(!1),o(!1);return}console.log("User is admin!"),a(!0)}catch(ue){console.error("Error in admin check:",ue),a(!1)}finally{o(!1)}})()},[e,r]),h.useEffect(()=>{n&&(Nt(),bt())},[n]);const Ze=async(V=1,ue="",ve="active",Ke="all")=>{var dt,Et;console.log("Loading users...",{page:V,search:ue,statusFilterParam:ve,accountTypeFilterParam:Ke}),Pe(!0);try{const Mt=(V-1)*Y,{data:Ot,error:As}=await U.rpc("admin_list_profiles",{p_search:ue,p_status:ve,p_limit:Y,p_offset:Mt});if(As)throw As;if(!Ot||Ot.length===0){c([]),u(0);return}const On=Ot.filter(ct=>Ke==="all"||ct.account_type===Ke).map(ct=>({id:ct.user_id||ct.email,user_id:ct.user_id,first_name:ct.first_name,last_name:ct.last_name,email:ct.email,phone_number:null,postal_address:null,postal_code:null,city:null,country:null,avatar_url:ct.avatar_url,created_at:ct.created_at,subscription_status:ct.subscription_status,account_type:ct.account_type,user_roles:[],lifetime_value:ct.lifetime_value_cents?ct.lifetime_value_cents/100:0,stripe_sync_status:ct.stripe_customer_id&&ct.last_sync_at?"synced":"unsynced",last_sync_at:ct.last_sync_at||void 0}));c(On),u(((dt=Ot[0])==null?void 0:dt.total_count)||0),console.log("Users loaded via RPC:",On.length,"Total:",(Et=Ot[0])==null?void 0:Et.total_count)}catch(Mt){console.error("Error loading users:",Mt),t({title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ÏÏÏÏÏÏη ÏÏν ÏÏηÏÏÏν.",variant:"destructive"})}},bt=async()=>{try{const{data:V,error:ue}=await U.from("challenges").select("*").order("created_at",{ascending:!1});if(ue)throw ue;R(V||[])}catch(V){console.error("Error loading challenges:",V)}},Ft=async V=>{try{const{data:ue,error:ve}=await U.from("challenge_videos").select("*").eq("challenge_id",V).order("day_number");if(ve)throw ve;k(ue||[])}catch(ue){console.error("Error loading challenge videos:",ue)}},Nt=async()=>{try{const{data:V,error:ue}=await U.from("videos").select("id, vimeo_id, title, thumbnail_url, description, category, page_type").eq("is_visible",!0).order("title",{ascending:!0});if(ue)throw ue;A(V||[]),console.log(`Loaded ${(V==null?void 0:V.length)||0} platform videos`)}catch(V){console.error("Error loading platform videos:",V),t({title:"Error",description:"Failed to load videos for challenge creation",variant:"destructive"}),A([])}},Hs=V=>{const ue=Z[V]||"";return ue?C.filter(ve=>{var Ke;return ve.title.toLowerCase().includes(ue.toLowerCase())||((Ke=ve.description)==null?void 0:Ke.toLowerCase().includes(ue.toLowerCase()))}):C},Jt=(V,ue)=>{H(ve=>({...ve,[V]:[...ve[V]||[],ue]}))},_s=(V,ue)=>{H(ve=>({...ve,[V]:(ve[V]||[]).filter((Ke,dt)=>dt!==ue)}))},Ts=async V=>{M(V),st({usersStarted:0,usersCompleted:0,loading:!0}
749),ne.reset({title:V.title,description:V.description,banner_url:V.banner_url||"",start_date:new Date(V.start_date),end_date:new Date(V.end_date),is_active:V.is_active,reset_progress:!1}),Ft(V.id).then(()=>{const ue={};T.forEach(ve=>{ue[ve.day_number]||(ue[ve.day_number]=[]),ue[ve.day_number].push(ve.video_id)}),H(ue)});try{const[ue,ve]=await Promise.all([U.from("user_challenge_progress").select("user_id",{count:"exact",head:!0}).eq("challenge_id",V.id),U.from("challenge_completions").select("user_id",{count:"exact",head:!0}).eq("challenge_id",V.id)]);st({usersStarted:ue.count||0,usersCompleted:ve.count||0,loading:!1})}catch(ue){console.error("Error fetching challenge progress stats:",ue),st({usersStarted:0,usersCompleted:0,loading:!1})}le(!0)},xs=async V=>{try{const ue=new Date(V.start_date),Ke=new Date(V.end_date).getTime()-ue.getTime(),dt=new Date;dt.setHours(0,0,0,0);const Et=new Date(dt.getTime()+Ke),{data:Mt,error:Ot}=await U.from("challenges").insert([{title:`${V.title} (Copy)`,description:V.description,banner_url:V.banner_url,start_date:dt.toISOString(),end_date:Et.toISOString(),is_active:!1,is_hall_of_fame_eligible:V.is_hall_of_fame_eligible}]).select().single();if(Ot)throw Ot;const{data:As,error:On}=await U.from("challenge_videos").select("*").eq("challenge_id",V.id);if(On)console.error("Error fetching challenge videos:",On);else if(As&&As.length>0){const ct=As.map(ir=>({challenge_id:Mt.id,video_id:ir.video_id,day_number:ir.day_number,video_title:ir.video_title,video_thumbnail:ir.video_thumbnail})),{error:ls}=await U.from("challenge_videos").insert(ct);ls&&console.error("Error copying challenge videos:",ls)}t({title:"Success",description:`Challenge duplicated as "${Mt.title}". It's set to inactive by default.`}),await bt()}catch(ue){console.error("Error duplicating challenge:",ue),t({title:"Error",description:"Failed to duplicate challenge",variant:"destructive"})}},In=async V=>{if(P)try{if(V.reset_progress){if(!window.confirm(`Are you sure you want to reset all progress? 750 751This will permanently delete: 752⢠${et.usersStarted} user progress records 753⢠${et.usersCompleted} challenge completions 754 755This action cannot be undone.`))return;const{error:Et}=await U.from("user_challenge_progress").delete().eq("challenge_id",P.id);if(Et)throw console.error("Error deleting user_challenge_progress:",Et),Et;const{error:Mt}=await U.from("user_challenge_video_progress").delete().eq("challenge_id",P.id);Mt&&console.error("Error deleting user_challenge_video_progress:",Mt);const{error:Ot}=await U.from("challenge_completions").delete().eq("challenge_id",P.id);if(Ot)throw console.error("Error deleting challenge_completions:",Ot),Ot;const{error:As}=await U.from("hall_of_fame_challenges").delete().eq("challenge_id",P.id);As&&console.error("Error deleting hall_of_fame_challenges:",As)}const{error:ue}=await U.from("challenges").update({title:V.title,description:V.description,banner_url:V.banner_url||null,start_date:V.start_date.toISOString(),end_date:V.end_date.toISOString(),is_active:V.is_active}).eq("id",P.id);if(ue)throw ue;const{error:ve}=await U.from("challenge_videos").delete().eq("challenge_id",P.id);if(ve)throw ve;const Ke=Object.entries(q).flatMap(([dt,Et])=>Et.filter(Mt=>Mt&&Mt.trim().length>0).map(Mt=>{const Ot=C.find(As=>As.id===Mt);return{challenge_id:P.id,video_id:Mt,video_title:(Ot==null?void 0:Ot.title)||"",video_thumbnail:(Ot==null?void 0:Ot.thumbnail_url)||"",day_number:parseInt(dt)}}));if(Ke.length>0){const{error:dt}=await U.from("challenge_videos").insert(Ke);if(dt)throw dt}t({title:"Success",description:V.reset_progress?"Challenge updated and all progress has been reset!":"Challenge updated successfully!"}),le(!1),M(null),H({}),st({usersStarted:0,usersCompleted:0,loading:!1}),await bt()}catch(ue){console.error("Error updating challenge:",ue),t({title:"Error",description:"Failed to update challenge",variant:"destructive"})}},mn=async()=>{try{const{data:V,error:ue}=await U.from("challenges").insert([D]).select().single();if(ue)throw ue;const ve=Object.entries(W).flatMap(([Ke,dt])=>dt.filter(Et=>Et&&Et.trim().length>0).map(Et=>{const Mt=C.find(Ot=>Ot.id===Et);return{challenge_id:V.id,video_id:Et,video_title:(Mt==null?void 0:Mt.title)||"",video_thumbnail:(Mt==null?void 0:Mt.thumbnail_url)||"",day_number:parseInt(Ke)}}));if(ve.length>0){const{error:Ke}=await U.from("challenge_videos").insert(ve);if(Ke)throw Ke}t({title:"Success",description:"Challenge created successfully!"}),$({title:"",description:"",banner_url:"",start_date:"",end_date:""}),X({}),te(!1),await bt()}catch(V){console.error("Error creating challenge:",V),t({title:"Error",description:"Failed to create challenge",variant:"destructive"})}},Wa=async(V,ue)=>{var Ke,dt,Et,Mt,Ot,As,On;if(!confirm(`Are you sure you want to impersonate ${ue}? This will open a new window where you'll be logged in as this user.`))return;const ve=window.open("","_blank","noopener,noreferrer");
755if(ve)try{ve.document.write('<!doctype html><title>Impersonating...</title><body style="font-family:sans-serif;padding:20px;">Opening impersonation session for user...</body>')}catch{}try{const{data:ct,error:ls}=await U.functions.invoke("admin-impersonate-user",{body:{targetUserId:V,origin:window.location.origin}});if(ls){console.error("Impersonation error:",ls);try{ve==null||ve.close()}catch{}const ir=((dt=(Ke=ls==null?void 0:ls.context)==null?void 0:Ke.response)==null?void 0:dt.status)||(ls==null?void 0:ls.status);let vs;try{const Dn=((Ot=(Mt=(Et=ls==null?void 0:ls.context)==null?void 0:Et.response)==null?void 0:Mt.error)==null?void 0:Ot.body)||((On=(As=ls==null?void 0:ls.context)==null?void 0:As.response)==null?void 0:On.data);Dn&&typeof Dn=="string"?vs=JSON.parse(Dn):Dn&&typeof Dn=="object"&&(vs=Dn)}catch{}let Va=(vs==null?void 0:vs.error)||(vs==null?void 0:vs.details)||`Impersonation failed: ${ls.message}`;if(ir===403)Va="Access denied. Admin role required for impersonation.";else if(ir===404)Va=(vs==null?void 0:vs.details)||"Target user not found in the system.";else if(ir===500){const Dn=((vs==null?void 0:vs.code)||"").toString();Dn==="email_exists"?Va="Email already exists in Auth. Retrying impersonation failed.":Dn==="legacy_generate_link_failed"?Va="Unable to create impersonation link for legacy user. User may need manual verification.":Va=(vs==null?void 0:vs.error)||"Server error during impersonation. Please try again."}t({title:"Impersonation Error",description:Va,variant:"destructive"});return}if(ct!=null&&ct.actionLink)if(console.log("Opening impersonation link:",ct.actionLink),ve&&!ve.closed)ve.location.href=ct.actionLink,t({title:"Impersonation Started",description:`Opening new window to impersonate ${ue}`}),t({title:"Success",description:`Impersonating ${ue} in new window`});else{const ir=window.open(ct.actionLink,"_blank");!ir||ir.closed||typeof ir.closed>"u"?(console.warn("Popup blocked, using same-tab navigation"),window.location.href=ct.actionLink):t({title:"Impersonation Started",description:`Opening new window to impersonate ${ue}`})}else{try{ve==null||ve.close()}catch{}t({title:"Error",description:"Failed to generate impersonation session",variant:"destructive"})}}catch(ct){console.error("Impersonation error:",ct);try{ve==null||ve.close()}catch{}t({title:"Error",description:"Failed to impersonate user",variant:"destructive"})}},Rn=async V=>{try{const{error:ue}=await U.from("challenges").delete().eq("id",V);if(ue)throw ue;t({title:"Success",description:"Challenge deleted successfully!"}),await bt()}catch(ue){console.error("Error deleting challenge:",ue),t({title:"Error",description:"Failed to delete challenge",variant:"destructive"})}},Mn=async V=>{v(V),f(1),await Ze(1,V,g,y)},ua=async V=>{b(V),f(1),await Ze(1,p,V,y)},os=async V=>{f(V),await Ze(V,p,g,y)},Yr=Math.ceil(d/Y),Ge=(m-1)*Y+1,He=Math.min(m*Y,d);if(i)return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background to-muted/20",children:[s.jsx(Fe,{isMenuOpen:w,onMenuToggle:()=>j(!w)}),s.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})})]});if(!e)return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background to-muted/20",children:[s.jsx(Fe,{isMenuOpen:w,onMenuToggle:()=>j(!w)}),s.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:s.jsx("div",{className:"text-center",children:s.jsxs("div",{className:"bg-destructive/10 p-6 rounded-lg",children:[s.jsx("h2",{className:"text-xl font-semibold text-destructive mb-2",children:"Authentication Required"}),s.jsx("p",{className:"text-muted-foreground",children:"You need to be logged in to access the admin panel."}),s.jsx(F,{onClick:()=>r("/auth"),className:"mt-4",children:"Sign In"})]})})})]});if(!n&&!i)return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background to-muted/20",children:[s.jsx(Fe,{isMenuOpen:w,onMenuToggle:()=>j(!w)}),s.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:s.jsx("div",{className:"text-center",children:s.jsxs("div",{className:"bg-destructive/10 p-6 rounded-lg",children:[s.jsx("h2",{className:"text-xl font-semibold text-destructive mb-2",children:"Unauthorized Access"}),s.jsx("p",{className:"text-muted-foreground",children:"You don't have permission to access the admin panel."}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["User: ",e==null?void 0:e.email]}),s.jsx(F,{onClick:()=>
755r("/dashboard"),className:"mt-4",variant:"outline",children:"Go to Dashboard"})]})})})]});const Ve=Ee.pathname.split("/").pop()||"dashboard",qs=[{id:"dashboard",label:"Dashboard",shortLabel:"Dashboard",icon:ss,color:"text-wellbe-gold"},{id:"users",label:"Users",shortLabel:"Users",icon:Ul,color:"text-blue-500"},{id:"videos",label:"Videos",shortLabel:"Videos",icon:No,color:"text-green-500"},{id:"badges",label:"Badge System",shortLabel:"Badges",icon:Yp,color:"text-purple-500"},{id:"challenges",label:"Challenges",shortLabel:"Challenges",icon:ss,color:"text-yellow-500"},{id:"promo-codes",label:"Promo Codes",shortLabel:"Promo",icon:s6,color:"text-pink-500"},{id:"login-activity",label:"Login Activity",shortLabel:"Activity",icon:df,color:"text-emerald-500"},{id:"content",label:"Content",shortLabel:"Content",icon:id,color:"text-orange-500"},{id:"comments",label:"Comments",shortLabel:"Comments",icon:fE,color:"text-cyan-500"},{id:"settings",label:"Settings",shortLabel:"Settings",icon:B0,color:"text-gray-500"},{id:"emails",label:"Email",shortLabel:"Email",icon:Fa,color:"text-red-500"}],Gs=()=>s.jsx("div",{className:"space-y-2",children:qs.map(V=>s.jsx(F,{variant:"ghost",asChild:!0,className:`w-full justify-start text-left ${Ve===V.id?"bg-wellbe-gold/20 text-wellbe-dark font-medium":"hover:bg-wellbe-gold/10 text-wellbe-dark-beige hover:text-wellbe-dark"} transition-all duration-200`,children:s.jsxs(cs,{to:`/admin/${V.id}`,onClick:()=>{ze(!1),V.id==="users"&&!de&&Ze(1,p,g,y)},children:[s.jsx(V.icon,{className:`mr-3 h-5 w-5 ${Ve===V.id?V.color:"text-wellbe-dark-beige"}`}),V.label]})},V.id))});return s.jsxs("div",{className:"min-h-screen w-full bg-gradient-to-br from-background to-muted/20",children:[s.jsx(Fe,{isMenuOpen:w,onMenuToggle:()=>j(!w)}),z&&s.jsxs(s.Fragment,{children:[s.jsx(XG,{isOpen:tt,onClose:()=>ze(!1),title:"Admin Panel",size:"large",children:Gs()}),s.jsx("div",{className:"fixed top-20 left-4 z-50 lg:hidden",children:s.jsx(F,{variant:"outline",size:"icon",onClick:()=>ze(!0),className:"bg-background/90 backdrop-blur-sm border-wellbe-gold/30 hover:bg-wellbe-gold/10 shadow-lg",children:s.jsx(hE,{className:"h-5 w-5"})})})]}),!z&&s.jsx("div",{className:"sticky top-16 z-40 bg-background/95 backdrop-blur-sm border-b border-wellbe-gold/20 shadow-sm",children:s.jsx("div",{className:"flex flex-wrap items-center gap-2 px-6 py-3",children:qs.map(V=>s.jsx(F,{variant:Ve===V.id?"default":"ghost",size:"sm",asChild:!0,className:me("gap-2 transition-all duration-200",Ve===V.id?"bg-wellbe-gold hover:bg-wellbe-gold/90 text-white font-medium shadow-md":"hover:bg-wellbe-gold/10 text-wellbe-dark-beige hover:text-wellbe-dark"),children:s.jsxs(cs,{to:`/admin/${V.id}`,onClick:()=>{V.id==="users"&&!de&&Ze(1,p,g,y)},children:[s.jsx(V.icon,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden xl:inline",children:V.label}),s.jsx("span",{className:"xl:hidden",children:V.shortLabel||V.label})]})},V.id))})}),s.jsxs("main",{className:"container mx-auto p-4 md:p-6 lg:p-8 max-w-7xl",children:[s.jsxs(Si,{value:Ve,className:"space-y-6 w-full",children:[Ve==="dashboard"&&s.jsx(it,{value:"dashboard",className:"space-y-6",children:s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsx(Kr,{children:s.jsx(CQ,{onNavigateToTab:V=>r(`/admin/${V}`)})})})}),Ve==="badges"&&s.jsx(it,{value:"badges",className:"space-y-6",children:s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsx(Kr,{children:s.jsx(PQ,{})})})}),Ve==="videos"&&s.jsx(it,{value:"videos",className:"space-y-6",children:s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsx(Kr,{children:s.jsx(AQ,{})})})}),Ve==="users"&&s.jsx(it,{value:"users",className:"space-y-6",children:s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(be,{children:"ÎιαÏείÏιÏη ΧÏηÏÏÏν"}),s.jsx(gt,{children:"Î Ïοβολή και εÏεξεÏγαÏία ÏλÏν ÏÏν ÏÏηÏÏÏν"}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 flex-1",children:[s.jsx(Hr,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(ke,{placeholder:"ÎναζήÏηÏη ÏÏηÏÏÏν...",value:p,onChange:V=>Mn(V.target.value),className:"max-w-sm"})]}),s.jsx(qQ,{onUserCreated:()=>Ze(m,p,g)})]}),s.jsx("div",{className:"flex flex-col gap-3 w-full",children:s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground mr-2 self-center",children:"Status:"}),[{value:"active",label:"Active"},{value:"trial",label:"Trial"},{value:"pending_cancellation",label:"Pending Cancellation"},{value:"canceled",label:"Canceled"},{value:"none",label:"No Subscription"},{value:"all",label:"All Users"}].map(V=>s.jsx(F,{variant:g===V.value?"default":"outline",size:"sm",onClick:()=>
755ua(V.value),className:"text-xs",children:V.label},V.value))]})})]}),s.jsxs(ce,{className:"overflow-x-auto",children:[s.jsx("div",{className:"min-w-[800px]",children:s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"Avatar"}),s.jsx(Ae,{children:"Name"}),s.jsx(Ae,{children:"Email"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Account Type"}),s.jsx(Ae,{children:"Stripe Sync"}),s.jsx(Ae,{children:"Creation Date"}),s.jsx(Ae,{children:"Lifetime Value (EUR)"}),s.jsx(Ae,{children:"Actions"})]})}),s.jsx(Vr,{children:l.map(V=>{var ue;return s.jsxs(Lt,{className:"cursor-pointer hover:bg-muted/50",onClick:()=>V.user_id&&r(`/admin/user/${V.user_id}`),children:[s.jsx(Ie,{children:s.jsx(Po,{userId:V.id,avatarUrl:V.avatar_url,firstName:V.first_name,lastName:V.last_name,email:V.email,className:"h-10 w-10"})}),s.jsx(Ie,{className:"font-medium",children:V.first_name&&V.last_name?`${V.first_name} ${V.last_name}`:V.first_name||V.last_name||"N/A"}),s.jsx(Ie,{className:"font-medium",children:V.email}),s.jsx(Ie,{children:s.jsx(ye,{variant:V.subscription_status==="active"?"default":V.subscription_status==="trial"?"secondary":V.subscription_status==="pending_cancellation"||V.subscription_status==="expired"||V.subscription_status==="canceled"?"destructive":"outline",children:V.subscription_status==="active"?"Active":V.subscription_status==="trial"?"Trial":V.subscription_status==="pending_cancellation"?"Pending Cancellation":V.subscription_status==="expired"?"Expired":V.subscription_status==="canceled"?"Canceled":"None"})}),s.jsx(Ie,{children:s.jsx(ye,{variant:V.account_type==="full_account"?"default":"secondary",children:V.account_type==="full_account"?"â Full Account":"â³ Pending Setup"})}),s.jsxs(Ie,{children:[s.jsx(ye,{variant:V.stripe_sync_status==="synced"?"default":V.stripe_sync_status==="error"?"destructive":"outline",children:V.stripe_sync_status==="synced"?"â Synced":V.stripe_sync_status==="error"?"â Error":"â³ Unsynced"}),V.last_sync_at&&s.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:new Date(V.last_sync_at).toLocaleDateString()})]}),s.jsx(Ie,{children:V.csv_data&&V.csv_data["Created on date"]?new Date(V.csv_data["Created on date"]).toLocaleDateString("en-US"):new Date(V.created_at).toLocaleDateString("en-US")}),s.jsxs(Ie,{children:["â¬",((ue=V.lifetime_value)==null?void 0:ue.toFixed(2))||"0.00"]}),s.jsx(Ie,{children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(F,{variant:"outline",size:"sm",onClick:ve=>{ve.stopPropagation(),S(V),_(!0)},children:"View Details"}),s.jsx(F,{variant:"outline",size:"sm",onClick:ve=>{ve.stopPropagation(),Wa(V.user_id,`${V.first_name||""} ${V.last_name||""}`.trim()||V.email)},className:"px-2",title:"Impersonate User",children:"ð"})]})})]},V.id)})})]})}),s.jsxs("div",{className:"flex items-center justify-between pt-4",children:[s.jsxs("div",{className:"text-sm text-muted-foreground",children:["Displaying ",d>0?Ge:0," - ",He," of ",d," in total"]}),Yr>1&&s.jsx(Od,{children:s.jsxs(Dd,{children:[s.jsx(Ds,{children:s.jsx(Fd,{onClick:()=>os(Math.max(1,m-1)),className:m===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:Math.min(5,Yr)},(V,ue)=>{let ve;return Yr<=5||m<=3?ve=ue+1:m>=Yr-2?ve=Yr-4+ue:ve=m-2+ue,s.jsx(Ds,{children:s.jsx(Ld,{onClick:()=>os(ve),isActive:m===ve,className:"cursor-pointer",children:ve})},ve)}),s.jsx(Ds,{children:s.jsx($d,{onClick:()=>os(Math.min(Yr,m+1)),className:m===Yr?"pointer-events-none opacity-50":"cursor-pointer"})})]})})]})]})]})}),Ve==="challenges"&&s.jsxs(it,{value:"challenges",className:"space-y-6",children:[s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(be,{children:"Challenge Management"}),s.jsx(gt,{children:"Create and manage challenges with daily videos"})]}),s.jsxs(gr,{open:se,onOpenChange:te,children:[s.jsx(xl,{asChild:!0,children:s.jsxs(F,{children:[s.jsx(Ic,{className:"h-4 w-4 mr-2"}),"New Challenge"]})}),s.jsxs(rr,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[s.jsx($r,{children:s.jsx(Ur,{children:"Create New Challenge"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"title",children:"Challenge Title"}),s.jsx(ke,{id:"title",value:D.title,onChange:V=>$({...D,title:V.target.value}),placeholder:"Enter challenge title"})]}),s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"description",children:"Description"}),s.jsx(So,{id:"description",value:D.description,onChange:V=>$({...D,description:V.target.value}),placeholder:"Enter challenge description"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"start_date",children:"Start Date"}),s.jsx(ke,{id:"start_date",type:"datetime-local",value:D.start_date,onChange:V=>$({...D,start_date:V.target.value})})]}),s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"end_date",children:"End Date"}),s.jsx(ke,{id:"end_date",type:"datetime-local",value:D.end_date,onChange:V=>$({...D,end_date:V.target.value})})]})]}),s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"banner_url",children:"Banner URL"}),s.jsx(ke,{id:"banner_url",value:D.banner_url,onChange:V=>$({...D,banner_url:V.target.value}),placeholder:"Enter banner image URL"})]}),s.jsxs("div",{children:[s.jsx(_e,{children:"Daily Videos (Select videos for each day)"}),s.jsxs("div",{className:"space-y-4 max-h-60 overflow-y-auto border rounded p-4",children:[fe().map(V=>s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(_e,{className:"w-16 font-medium",children:["Day ",V,":"]}),s.jsxs("div",{className:"flex-1 relative",children:[s.jsx(ke,{placeholder:"Search videos...",value:J[V]||"",onChange:ue=>K({...J,[V]:ue.target.value}),className:"mb-2"}),J[V]&&ae(V).length>0&&s.jsx("div",{className:"absolute z-10 w-full bg-background border rounded-md shadow-lg max-h-48 overflow-y-auto",children:ae(V).slice(0,5).map(ue=>s.jsxs("button",{type:"button",className:"w-full text-left p-2 hover:bg-muted flex items-center gap-2",onClick:()=>{ge(V,ue.id),K({...J,[V]:""})},children:[s.jsx("img",{src:ue.thumbnail_url,alt:ue.title,className:"w-12 h-8 object-cover rounded"}),s.jsx("span",{className:"text-sm",children:ue.title})]},ue.id))})]}),s.jsx(F,{type:"button",variant:"outline",size:"sm",onClick:()=>ge(V,""),children:s.jsx(Ic,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"space-y-1 ml-18",children:(W[V]||[]).map((ue,ve)=>{const Ke=C.find(dt=>dt.id===ue);return s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted rounded text-sm",children:[Ke&&s.jsxs(s.Fragment,{children:[s.jsx("img",{src:Ke.thumbnail_url,alt:Ke.title,className:"w-8 h-6 object-cover rounded"}),s.jsx("span",{className:"flex-1",children:Ke.title})]}),s.jsx(F,{type:"button",variant:"ghost",size:"sm",onClick:()=>Ue(V,ve),children:s.jsx(jn,{className:"h-3 w-3"})})]},ve)})})]},V)),fe().length===0&&s.jsx("div",{className:"text-center py-4 text-muted-foreground",children:"Please select start and end dates to configure daily videos"})]})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(F,{variant:"outline",onClick:()=>te(!1),children:"Cancel"}),s.jsx(F,{onClick:mn,children:"Create Challenge"})]})]})]})]})]})}),s.jsx(ce,{children:s.jsxs("div",{className:"space-y-4",children:[I.map(V=>s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold",children:V.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:V.description}),s.jsxs("div",{className:"flex items-center gap-4 mt-2",children:[s.jsx(ye,{variant:V.is_active?"default":"secondary",children:V.is_active?"Active":"Inactive"}),s.jsxs("span",{className:"text-sm",children:["Start: ",new Date(V.start_date).toLocaleDateString()]}),s.jsxs("span",{className:"text-sm",children:["End: ",new Date(V.end_date).toLocaleDateString()]})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(F,{variant:"outline",size:"sm",onClick:()=>xs(V),children:[s.jsx(F0,{className:"h-4 w-4 mr-1"}),"Duplicate"]}),s.jsxs(F,{variant:"outline",size:"sm",onClick:()=>Ts(V),children:[s.jsx(vE,{className:"h-4 w-4 mr-1"}),"Edit"]}),s.jsx(F,{variant:"destructive",size:"sm",onClick:()=>Rn(V.id),children:s.jsx(jn,{className:"h-4 w-4"})})]})]}),(L==null?void 0:L.id)===V.id&&s.jsxs("div",{className:"mt-4 border-t pt-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Challenge Videos:"}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:T.map(ue=>s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted rounded",children:[s.jsxs("span",{className:"text-sm font-medium",children:["Day ",ue.day_number,":"]}),s.jsx("span",{className:"text-sm",children:ue.video_title})]},ue.id))})]})]},V.id)),I.length===0&&s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No challenges created yet. Create your first challenge!"})]})})]}),s.jsx(gr,{open:B,onOpenChange:le,children:s.jsxs(rr,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[s.jsx($r,{children:s.jsxs(Ur,{children:["Edit Challenge: ",P==null?void 0:P.title]})}),s.jsx(cR,{...ne,children:s.jsxs("form",{onSubmit:ne.handleSubmit(In),className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(xn,{control:ne.control,name:"title",render:({field:V})=>s.jsxs(Zr,{children:[s.jsx(en,{children:"Challenge Title"}),s.jsx(tn,{children:s.jsx(ke,{placeholder:"Enter challenge title",...V})}),s.jsx(Yn,{})]})}),s.jsx(xn,{control:ne.control,name:"is_active",render:({field:V})=>s.jsxs(Zr,{children:[s.jsx(en,{children:"Status"}),s.jsxs(ql,{onValueChange:ue=>V.onChange(ue==="true"),value:V.value?"true":"false",children:[s.jsx(tn,{children:s.jsx(Bo,{children:s.jsx(Gl,{placeholder:"Select status"})})}),s.jsxs(zo,{children:[s.jsx(sr,{value:"true",children:"Active"}),s.jsx(sr,{value:"false",children:"Inactive"})]})]}),s.jsx(Yn,{})]})})]}),s.jsx(xn,{control:ne.control,name:"description",render:({field:V})=>s.jsxs(Zr,{children:[s.jsx(en,{children:"Description"}),s.jsx(tn,{children:s.jsx(So,{placeholder:"Enter challenge description",...V})}),s.jsx(Yn,{})]})}),s.jsx(xn,{control:ne.control,name:"banner_url",render:({field:V})=>s.jsxs(Zr,{children:[s.jsx(en,{children:"Banner URL (Optional)"}),s.jsx(tn,{children:s.jsx(ke,{placeholder:"https://example.com/banner.jpg",...V})}),s.jsx(Yn,{})]})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(xn,{control:ne.control,name:"start_date",render:({field:V})=>s.jsxs(Zr,{className:"flex flex-col",children:[s.jsx(en,{children:"Start Date"}),s.jsxs(kb,{children:[s.jsx(Sb,{asChild:!0,children:s.jsx(tn,{children:s.jsxs(F,{variant:"outline",className:me("pl-3 text-left font-normal",!V.value&&"text-muted-foreground"),children:[V.value?fr(V.value,"PPP"):s.jsx("span",{children:"Pick start date"}),s.jsx(Ra,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),s.jsx(yp,{className:"w-auto p-0 z-[100]",align:"start",children:s.jsx(_b,{mode:"single",selected:V.value,onSelect:V.onChange,disabled:ue=>ue<new Date("1900-01-01"),initialFocus:!0,className:"p-3 pointer-events-auto"})})]}),s.jsx(Yn,{})]})}),s.jsx(xn,{control:ne.control,name:"end_date",render:({field:V})=>s.jsxs(Zr,{className:"flex flex-col",children:[s.jsx(en,{children:"End Date"}),s.jsxs(kb,{children:[s.jsx(Sb,{asChild:!0,children:s.jsx(tn,{children:s.jsxs(F,{variant:"outline",className:me("pl-3 text-left font-normal",!V.value&&"text-muted-foreground"),children:[V.value?fr(V.value,"PPP"):s.jsx("span",{children:"Pick end date"}),s.jsx(Ra,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),s.jsx(yp,{className:"w-auto p-0 z-[100]",align:"start",children:s.jsx(_b,{mode:"single",selected:V.value,onSelect:V.onChange,disabled:ue=>ue<ne.getValues("start_date"),initialFocus:!0,className:"p-3 pointer-events-auto"})})]}),s.jsx(Yn,{})]})})]}),s.jsxs("div",{className:"space-y-4 p-4 border rounded-lg bg-muted/30",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ns,{className:"h-5 w-5 text-amber-500"}),s.jsx(_e,{className:"text-base font-semibold",children:"Progress Statistics"})]}),et.loading?s.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading statistics..."}):s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"p-3 bg-background rounded-lg border",children:[s.jsx("div",{className:"text-2xl font-bold text-primary",children:et.usersStarted}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Users started this challenge"})]}),s.jsxs("div",{className:"p-3 bg-background rounded-lg border",children:[s.jsx("div",{className:"text-2xl font-bold text-green-600",children:et.usersCompleted}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Users completed this challenge"})]})]}),s.jsx(xn,{control:ne.control,name:"reset_progress",render:({field:V})=>s.jsxs(Zr,{className:"flex flex-row items-start space-x-3 space-y-0 rounded-lg border border-destructive/50 bg-destructive/5 p-4",children:[s.jsx(tn,{children:s.jsx("input",{type:"checkbox",checked:V.value,onChange:V.onChange,className:"h-5 w-5 mt-0.5"})}),s.jsxs("div",{className:"space-y-1 leading-none",children:[s.jsx(en,{className:"text-destructive font-medium",children:"Reset all user progress"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"â ï¸ This will permanently delete all user progress, completions, and Hall of Fame entries for this challenge. Use this when repurposing an old challenge as a new one."})]})]})})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(_e,{className:"text-lg font-semibold",children:"Daily Videos"}),s.jsxs("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4 space-y-4",children:[ee().map(V=>s.jsxs("div",{className:"space-y-2 border-b pb-4 last:border-b-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(_e,{className:"w-16 font-medium",children:["Day ",V,":"]}),s.jsxs("div",{className:"flex-1 relative",children:[s.jsx(ke,{placeholder:"Search videos...",value:Z[V]||"",onChange:ue=>re({...Z,[V]:ue.target.value}),className:"mb-2"}),Z[V]&&Hs(V).length>0&&s.jsx("div",{className:"absolute z-10 w-full bg-background border rounded-md shadow-lg max-h-48 overflow-y-auto",children:Hs(V).slice(0,5).map(ue=>s.jsxs("button",{type:"button",className:"w-full text-left p-2 hover:bg-muted flex items-center gap-2",onClick:()=>{Jt(V,ue.id),re({...Z,[V]:""})},children:[s.jsx("img",{src:ue.thumbnail_url,alt:ue.title,className:"w-12 h-8 object-cover rounded"}),s.jsx("span",{className:"text-sm",children:ue.title})]},ue.id))})]}),s.jsx(F,{type:"button",variant:"outline",size:"sm",onClick:()=>Jt(V,""),children:s.jsx(Ic,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"space-y-1 ml-18",children:[(q[V]||[]).map((ue,ve)=>{const Ke=C.find(dt=>dt.id===ue);return s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted rounded text-sm",children:[Ke&&s.jsxs(s.Fragment,{children:[s.jsx("img",{src:Ke.thumbnail_url,alt:Ke.title,className:"w-8 h-6 object-cover rounded"}),s.jsx("span",{className:"flex-1",children:Ke.title})]}),s.jsx(F,{type:"button",variant:"ghost",size:"sm",onClick:()=>_s(V,ve),children:s.jsx(jn,{className:"h-3 w-3"})})]},ve)}),(!q[V]||q[V].length===0)&&s.jsx("p",{className:"text-sm text-muted-foreground italic ml-2",children:"No videos selected for this day"})]})]},V)),ee().length===0&&s.jsx("div",{className:"text-center py-4 text-muted-foreground",children:"Please select start and end dates to configure daily videos"})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[s.jsxs(F,{type:"button",variant:"outline",onClick:()=>le(!1),children:[s.jsx(qr,{className:"h-4 w-4 mr-2"}),"Cancel"]}),s.jsxs(F,{type:"submit",children:[s.jsx(U0,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]})})]})}),s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsx(Kr,{children:s.jsx(TQ,{})})})]}),Ve==="promo-codes"&&s.jsx(it,{value:"promo-codes",className:"space-y-6",children:s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsx(Kr,{children:s.jsx(DQ,{})})})}),Ve==="content"&&s.jsx(it,{value:"content",className:"space-y-6",childr
755en:s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsxs(Kr,{children:[s.jsx(OQ,{}),s.jsx(IQ,{}),s.jsx(RQ,{})]})})}),Ve==="comments"&&s.jsx(it,{value:"comments",className:"space-y-6",children:s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsx(Kr,{children:s.jsx(EQ,{})})})}),Ve==="migration"&&s.jsx(it,{value:"migration",className:"space-y-6",children:s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsx(Kr,{children:s.jsx(FQ,{})})})}),Ve==="failed-payments"&&s.jsx(it,{value:"failed-payments",className:"space-y-6",children:s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsx(Kr,{children:s.jsx(WQ,{})})})}),Ve==="emails"&&s.jsx(it,{value:"emails",className:"space-y-6",children:s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsxs(Kr,{children:[s.jsx(UQ,{}),s.jsx($Q,{})]})})}),Ve==="subscribers-import"&&s.jsx(it,{value:"subscribers-import",className:"space-y-6",children:s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsx(Kr,{children:s.jsx(BQ,{})})})}),Ve==="login-activity"&&s.jsx(it,{value:"login-activity",className:"space-y-6",children:s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsx(Kr,{children:s.jsx(zQ,{})})})}),Ve==="settings"&&s.jsxs(it,{value:"settings",className:"space-y-6",children:[s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"p-4",children:"Loading..."}),children:s.jsxs(Kr,{children:[s.jsx(LQ,{}),s.jsx(MQ,{})]})}),s.jsx(xQ,{}),s.jsx(SQ,{}),s.jsx(_Q,{})]})]}),s.jsx(gr,{open:E,onOpenChange:_,children:s.jsxs(rr,{className:"max-w-[95vw] sm:max-w-2xl md:max-w-3xl lg:max-w-4xl max-h-[80vh] overflow-y-auto",children:[s.jsxs($r,{children:[s.jsx(Ur,{children:"Member Details"}),s.jsx(go,{children:"Complete member information including all CSV data"})]}),N&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsx(be,{className:"text-lg",children:"Basic Information"})}),s.jsxs(ce,{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(_e,{className:"text-sm font-medium",children:"Email"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:N.email})]}),s.jsxs("div",{children:[s.jsx(_e,{className:"text-sm font-medium",children:"Name"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[N.first_name," ",N.last_name]})]}),s.jsxs("div",{children:[s.jsx(_e,{className:"text-sm font-medium",children:"Phone"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:N.phone_number||"N/A"})]}),s.jsxs("div",{children:[s.jsx(_e,{className:"text-sm font-medium",children:"Created"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:new Date(N.created_at).toLocaleDateString("en-US")})]}),s.jsxs("div",{children:[s.jsx(_e,{className:"text-sm font-medium",children:"City"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:N.city||"N/A"})]}),s.jsxs("div",{children:[s.jsx(_e,{className:"text-sm font-medium",children:"Country"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:N.country||"N/A"})]})]})]}),N.csv_data&&s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(be,{className:"text-lg",children:"Complete CSV Data"}),s.jsx(gt,{children:"All original data from the CSV import - design your member views using this data"})]}),s.jsx(ce,{children:s.jsx("div",{className:"grid gap-3",children:Object.entries(N.csv_data).map(([V,ue])=>s.jsxs("div",{className:"grid grid-cols-3 gap-4 py-2 border-b border-border/50",children:[s.jsx("div",{children:s.jsx(_e,{className:"text-sm font-medium",children:V})}),s.jsx("div",{className:"col-span-2",children:s.jsx("p",{className:"text-sm text-muted-foreground break-words",children:ue?String(ue):"N/A"})})]},V))})})]}),s.jsx(gQ,{userId:N.user_id,onDataUpdate:()=>{Ze(m,p,g)}}),s.jsx(gb,{userId:N.user_id,userEmail:N.email||"",membershipData:{subscription_status:N.subscription_status||"none",subscription_tier:null,subscription_end:null,
755subscribed:N.subscription_status==="active",is_trial:N.subscription_status==="trial",stripe_customer_id:null},userProfile:{user_id:N.user_id||"",email:N.email||"",created_at:N.created_at},onUpdate:()=>{Ze(m,p,g)}}),N.csv_headers&&N.csv_headers.length>0&&s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(be,{className:"text-lg",children:"Available CSV Fields"}),s.jsx(gt,{children:"All field names available from the original CSV"})]}),s.jsx(ce,{children:s.jsx("div",{className:"flex flex-wrap gap-2",children:N.csv_headers.map((V,ue)=>s.jsx(ye,{variant:"outline",className:"text-xs",children:V},ue))})})]})]})]})})]})]})},bR=Ow,GQ=Dw,YQ=Lw,wR=h.forwardRef(({className:e,...t},r)=>s.jsx(Qm,{className:me("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));wR.displayName=Qm.displayName;const KQ=Sd("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Aj=h.forwardRef(({side:e="right",className:t,children:r,...n},a)=>s.jsxs(YQ,{children:[s.jsx(wR,{}),s.jsxs(Xm,{ref:a,className:me(KQ({side:e}),t),...n,children:[r,s.jsxs(bg,{className:"absolute right-4 top-4 roun
755ded-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-secondary",children:[s.jsx(qr,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Aj.displayName=Xm.displayName;const Ij=({className:e,...t})=>s.jsx("div",{className:me("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ij.displayName="SheetHeader";const Rj=h.forwardRef(({className:e,...t},r)=>s.jsx(Jm,{ref:r,className:me("text-lg font-semibold text-foreground",e),...t}));Rj.displayName=Jm.displayName;const jR=h.forwardRef(({className:e,...t},r)=>s.jsx(Zm,{ref:r,className:me("text-sm text-muted-foreground",e),...t}));jR.displayName=Zm.displayName;const QQ=({video:e,highResData:t,bestOverride:r,onVideoClick:n,onImageLoad:a,buildSrcSet:i})=>{var c,d,u,m,f,p,v;const o=()=>{var g,b;return r||(t!=null&&t.best_thumbnail?t.best_thumbnail:(g=e.video_details)!=null&&g.custom_thumbnail?e.video_details.custom_thumbnail:(b=e.video_details)==null?void 0:b.thumbnail_url)},l=g=>{switch(g){case"workouts":return"Workout";case"dialogismoi":return"ÎιαλογιÏμÏÏ";case"breathworks":return"Breathwork";case"recipes":return"ΣÏ
νÏαγή";case"podcast":return"Podcast";default:return"ÎίνÏεο"}};return s.jsx("div",{className:"cursor-pointer group h-full",onClick:()=>n(e.video_id),children:s.jsxs("div",{className:"relative h-full overflow-hidden rounded-l-lg shadow-lg",children:[s.jsx("img",{src:o(),srcSet:i(e),sizes:"70vw",alt:(c=e.video_details)==null?void 0:c.title,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-102",loading:"eager",decoding:"async",fetchPriority:"high",onLoad:g=>a(e,g.currentTarget)}),s.jsx("div",{className:"absolute inset-0 overlay-beige-orange-light"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-trans
755parent to-transparent"}),s.jsx("div",{className:"absolute inset-0 bg-black/10 group-hover:bg-black/20 transition-all duration-300 flex items-center justify-center",children:s.jsx("div",{className:"bg-white/70 backdrop-blur-sm rounded-full p-6 group-hover:scale-110 group-hover:bg-white/80 transition-all duration-300 shadow-2xl",children:s.jsx(Os,{className:"w-12 h-12 text-black ml-1",fill:"currentColor"})})}),s.jsx("div",{className:"absolute top-8 left-8 z-10",children:s.jsx(ye,{variant:"secondary",className:"bg-primary/90 backdrop-blur-sm text-white border-white/20 px-4 py-2 text-sm font-medium",children:l(((d=e.video_details)==null?void 0:d.page_type)||"")})}),(((u=e.video_details)==null?void 0:u.published_at)||((m=e.video_details)==null?void 0:m.created_at))&&V0((f=e.video_details)==null?void 0:f.published_at,(p=e.video_details)==null?void 0:p.created_at)&&["workouts","dialogismoi","breathworks"].includes(e.video_details.page_type)&&s.jsx("div",{className:"absolute top-8 right-8 z-10",children:s.jsx(ye,{className:"bg-gradient-to-r from-orange-500 to-pink-600 text-white font-bold text-sm px-3 py-1.5",children:"NEW"})}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-8 md:p-12 z-10",children:s.jsxs("div",{className:"max-w-4xl",children:[s.jsx("h1",{className:"text-white font-bold text-3xl md:text-4xl lg:text-5xl leading-tight mb-4 drop-shadow-2xl",children:(v=e.video_details)!=null&&v.title?Ro(e.video_details.title):""}),s.jsxs("div",{className:"flex items-center gap-4 text-white/90",children:[s.jsx("span",{className:"text-lg font-medium",children:"ÎεκινήÏÏε ÏÏÏα"}),s.jsx("div",{className:"w-12 h-0.5 bg-white/60"})]})]})})]})})},XQ=({video:e,highResData:t,bestOverride:r,isTop:n=!1,isBottom:a=!1,onVideoClick:i})=>{var c,d,u,m,f,p;const o=()=>{var v,g;return r||(t!=null&&t.best_thumbnail?t.best_thumbnail:(v=e.video_details)!=null&&v.custom_thumbnail?e.video_details.custom_thumbnail:(g=e.video_details)==null?void 0:g.thumbnail_url)},l=()=>n?"rounded-tr-lg":a?"rounded-br-lg":"";return s.jsx("div",{className:"cursor-pointer group flex-1 min-h-0 opacity-70 hover:opacity-90 transition-all duration-300 hover:scale-[1.02]",onClick:()=>i(e.video_id),children:s.jsxs("div",{className:`relative h-full overflow-hidden ${l()} shadow-lg`,children:[s.jsx("img",{src:o(),alt:(c=e.video_details)==null?void 0:c.title,className:"w-full h-full object-cover transition-all duration-300 group-hover:brightness-110",loading:"lazy",decoding:"async"}),s.jsx("div",{className:"absolute inset-0 overlay-beige-orange-light"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/50 via-transparent to-transparent"}),(((d=e.video_details)==null?void 0:d.published_at)||((u=e.video_details)==null?void 0:u.created_at))&&V0((m=e.video_details)==null?void 0:m.published_at,(f=e.video_details)==null?void 0:f.created_at)&&["workouts","dialogismoi","breathworks"].includes(e.video_details.page_type)&&s.jsx("div",{className:"absolute top-3 right-3 z-10",children:s.jsx(ye,{className:"bg-gradient-to-r from-orange-500 to-pink-600 text-white font-bold text-xs px-2 py-1",children:"NEW"})}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-4 z-10",children:s.jsx("h3",{className:"text-white font-semibold text-sm lg:text-base leading-tight line-clamp-2 drop-shadow-lg",children:((p=e.video_details)==null?void 0:p.title)||""})})]})})},JQ=({onVideoClick:e})=>{const[t,r]=h.useState([]),[n,a]=h.useState(!0),[i,o]=h.useState(0),[l,c]=h.useState({});Wl(),h.useEffect(()=>{d()},[]);const d=async()=>{try{const{data:_,error:I}=await U.from("featured_catalog_videos").select("*").eq("is_active",!0).order("display_order");if(I)throw I;if(_&&_.length>0){const T=(await Promise.all(_.map(async k=>{const{data:C,error:A}=await U.from("videos").select("title, thumbnail_url, custom_thumbnail, duration_seconds, page_type, created_at").eq("vimeo_id",k.video_id).single();return{...k,video_details:C||void 0}}))).filter(k=>k.video_details);r(T),u(T)}}catch(_){console.error("Error loading featured videos:",_)}finally{a(!1)}},u=async _=>{if(_.length!==0)try{const{data:I,error:R}=await U.functions.invoke("fetch-vimeo-videos");if(!R&&(I!=null&&I.videos)){const T={};_.forEach(k=>{const C=I.videos.find(A=>A.id===k.video_id);C&&(T[k.video_id]={thumbnails:C.thumbnails||[],best_thumbnail:C.best_thumbnail||C.thumbnail,base_thumbnail:C.base_thumbnail||""})}),c(T)}}catch(I){console.error("Error fetching high-res video data:",I)}},[m,f]=h.useState({}),p=_=>{var R,T;if(m[_.video_id])return m[_.video_id];const I=l[_.video_id];return I!=null&&I.best_thumbnail?I.best_thumbnail:(R=_.video_details)!=null&&R.custom_thumbnail?_.video_details.custom_thumbnail:(T=_.video_details)==null?void 0:T.thumbnail_url},v=_=>{const I=l[_.video_id];if(!I)return"";const R=k=>k.split("?")[0],T=new Map;
755if((I.thumbnails||[]).forEach(k=>{k.width&&k.link&&(T.set(k.width,`${R(k.link)} ${k.width}w`),T.set(k.width+.1,`${k.link} ${k.width}w`))}),I.base_thumbnail){const k=R(I.base_thumbnail);[4096,3840,3200,2560].forEach(C=>{T.set(C,`${k}?mw=${C}&q=95 ${C}w`)})}return Array.from(T.entries()).sort((k,C)=>k[0]-C[0]).map(([,k])=>k).join(", ")},g=(_,I)=>{const R=l[_.video_id];if(!(R!=null&&R.base_thumbnail)||m[_.video_id])return;const T=[4096,3840,3200,2560],k=I+200;console.log(`[Debug] Starting probe for ${_.video_id}, current: ${I}px, threshold: ${k}px`);const C=(L,O)=>{try{const P=new URL(L);return Object.entries(O).forEach(([M,D])=>P.searchParams.set(M,String(D))),P.toString()}catch{const P=L.includes("?")?"&":"?",M=new URLSearchParams(Object.entries(O).map(([D,$])=>[D,String($)])).toString();return`${L}${P}${M}`}},A=(L=0)=>{if(L>=T.length)return;const O=T[L],P=C(R.base_thumbnail.split("?")[0],{mw:O,q:95}),M=new Image;M.onload=()=>{console.log(`[Debug] Probe result for ${_.video_id} at ${O}px: ${M.naturalWidth}px`),M.naturalWidth>=k?(console.log(`[Debug] â Adopting better thumbnail: ${M.naturalWidth}px from ${P}`),f(D=>({...D,[_.video_id]:P}))):A(L+1)},M.onerror=()=>A(L+1),M.src=P};A()},b=()=>{o(_=>_===t.length-1?0:_+1)},y=()=>{o(_=>_===0?t.length-1:_-1)},x=_=>{switch(_){case"workouts":return"Workout";case"dialogismoi":return"ÎιαλογιÏμÏÏ";case"breathworks":return"Breathwork";case"recipes":return"ΣÏ
νÏαγή";case"podcast":return"Podcast";default:return"ÎίνÏεο"}},w=()=>
755{if(t.length<=1)return[];const _=(i+1)%t.length,I=(i+2)%t.length;return[t[_],t[I]]},j=_=>{const I=t.findIndex(R=>R.video_id===_);I!==-1&&o(I)},N=(_,I)=>{var R;try{const T=I.closest(".relative"),k=(T==null?void 0:T.clientWidth)||0;console.log(`[Debug] Banner image loaded for ${_.video_id}:`,{naturalWidth:I.naturalWidth,naturalHeight:I.naturalHeight,displayWidth:I.width,displayHeight:I.height,currentSrc:I.currentSrc||I.src,devicePixelRatio:window.devicePixelRatio,containerWidth:k,srcSetWidths:((R=v(_).match(/(\d+)w/g))==null?void 0:R.map(C=>C.replace("w","")))||[]}),g(_,I.naturalWidth)}catch(T){console.error("Error in banner image onLoad:",T)}};if(n)return s.jsx("div",{className:"mb-8",children:s.jsx("div",{className:"h-64 bg-muted rounded-lg animate-pulse flex items-center justify-center",children:s.jsx("span",{className:"text-muted-foreground",children:"ΦÏÏÏÏÏη ÏÏοÏεινÏμενÏν βίνÏεο..."})})});if(t.length===0)return null;const S=t[i],E=w();return s.jsxs("div",{className:"relative w-full",children:[s.jsx("div",{className:"hidden lg:block",children:s.jsxs("div",{className:"relative",children:[t.length>1&&s.jsxs(s.Fragment,{children:[s.jsx(F,{variant:"ghost",size:"icon",className:"absolute left-8 top-1/2 transform -translate-y-1/2 z-20 bg-black/20 backdrop-blur-sm border border-white/20 text-white hover:bg-white/20 transition-all duration-300",onClick:y,children:s.jsx(ea,{className:"h-6 w-6"})}),s.jsx(F,{variant:"ghost",size:"icon",className:"absolute right-8 top-1/2 transform -translate-y-1/2 z-20 bg-black/20 backdrop-blur-sm border border-white/20 text-white hover:bg-white/20 transition-all duration-300",onClick:b,children:s.jsx(Da,{className:"h-6 w-6"})})]}),s.jsxs("div",{className:"flex h-[60vh] min-h-[400px]",children:[s.jsx("div",{className:"flex-[0_0_70%] h-full",children:s.jsx(QQ,{video:S,highResData:l[S.video_id],bestOverride:m[S.video_id],onVideoClick:e,onImageLoad:N,buildSrcSet:v})}),s.jsx("div",{className:"flex-[0_0_30%] h-full flex flex-col",children:E.map((_,I)=>s.jsx(XQ,{video:_,highResData:l[_.video_id],bestOverride:m[_.video_id],isTop:I===0,isBottom:I===1,onVideoClick:j},_.id))})]}),t.length>1&&s.jsx("div",{className:"absolute bottom-8 left-1/2 transform -translate-x-1/2 z-20",children:s.jsx("div",{className:"flex space-x-3",children:t.map((_,I)=>s.jsx("button",{className:`w-3 h-3 rounded-full transition-all duration-300 ${I===i?"bg-white scale-125":"bg-white/50 hover:bg-white/80"}`,onClick:()=>o(I)},I))})})]})}),s.jsx("div",{className:"lg:hidden",children:s.jsxs("div",{className:"relative",children:[t.length>1&&s.jsxs(s.Fragment,{children:[s.jsx(F,{variant:"ghost",size:"icon",className:"absolute left-4 top-1/2 transform -translate-y-1/2 z-20 bg-black/20 backdrop-blur-sm border border-white/20 text-white hover:bg-white/20 transition-all duration-300",onClick:y,children:s.jsx(ea,{className:"h-5 w-5"})}),s.jsx(F,{variant:"ghost",size:"icon",className:"absolute right-4 top-1/2 transform -translate-y-1/2 z-20 bg-black/20 backdrop-blur-sm border border-white/20 text-white hover:bg-white/20 transition-all duration-300",onClick:b,children:s.jsx(Da,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"overflow-hidden",children:s.jsx("div",{className:"flex transition-transform duration-500 ease-in-out",style:{transform:`translateX(-${i*100}%)`},children:t.map(_=>{var I,R,T;return s.jsx("div",{className:"w-full flex-shrink-0",children:s.jsx("div",{className:"cursor-pointer group",onClick:()=>e(_.video_id),children:s.jsxs("div",{className:"relative h-[60vh] min-h-[400px] overflow-hidden",children:[s.jsx("img",{src:p(_),srcSet:v(_),sizes:"100vw",alt:(I=_.video_details)==null?void 0:I.title,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-102",loading:"eager",decoding:"async",fetchPriority:"high",onLoad:k=>N(_,k.currentTarget)}),s.jsx("div",{className:"absolute inset-0 overlay-beige-orange-light"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-trans
755parent to-transparent"}),s.jsx("div",{className:"absolute inset-0 bg-black/10 group-hover:bg-black/20 transition-all duration-300 flex items-center justify-center",children:s.jsx("div",{className:"bg-white/70 backdrop-blur-sm rounded-full p-6 group-hover:scale-110 group-hover:bg-white/80 transition-all duration-300 shadow-2xl",children:s.jsx(Os,{className:"w-12 h-12 text-black ml-1",fill:"currentColor"})})}),s.jsx("div",{className:"absolute top-6 left-6 z-10",children:s.jsx(ye,{variant:"secondary",className:"bg-primary/90 backdrop-blur-sm text-white border-white/20 px-3 py-1.5 text-sm font-medium",children:x(((R=_.video_details)==null?void 0:R.page_type)||"")})}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-6 md:p-8 z-10",children:s.jsxs("div",{className:"max-w-4xl",children:[s.jsx("h1",{className:"text-white font-bold text-2xl md:text-4xl lg:text-5xl leading-tight mb-4 drop-shadow-2xl",children:(T=_.video_details)!=null&&T.title?Ro(_.video_details.title):""}),s.jsxs("div",{className:"flex items-center gap-4 text-white/90",children:[s.jsx("span",{className:"text-base md:text-lg font-medium",children:"ÎεκινήÏÏε ÏÏÏα"}),s.jsx("div",{className:"w-8 md:w-12 h-0.5 bg-white/60"})]})]})})]})})},_.id)})})}),t.length>1&&s.jsx("div",{className:"absolute bottom-6 left-1/2 transform -translate-x-1/2 z-20",children:s.jsx("div",{className:"flex space-x-2",children:t.map((_,I)=>s.jsx("button",{className:`w-2.5 h-2.5 rounded-full transition-all duration-300 ${I===i?"bg-white scale-125":"bg-white/50 hover:bg-white/80"}`,onClick:()=>o(I)},I))})})]})})]})},ZQ=({title:e,slug:t,videos:r,pageType:n="workouts",description:a})=>{const i=h.useRef(null),[o,l]=h.useState(!1),[c,d]=h.useState(!0),u=qe(),{isVideoWatched:m}=Hl(),{isMobileApp:f}=ar(),p=y=>{const x=n==="all"?`/catalog/${y.vimeo_id}`:`/${n}/${y.vimeo_id}`;u(x)},v=()=>{u(`/section/${t}`)},g=y=>{const x=i.current;if(!x)return;const w=x.clientWidth*.8,j=y==="left"?x.scrollLeft-w:x.scrollLeft+w;x.scrollTo({left:j,behavior:"smooth"})},b=()=>{const y=i.current;y&&(l(y.scrollLeft>0),d(y.scrollLeft<y.scrollWidth-y.clientWidth-10))};return ie.useEffect(()=>{const y=i.current;if(!y)return;b(),y.addEventListener("scroll",b);const x=()=>b();return window.addEventListener("resize",x),()=>{y.removeEventListener("scroll",b),window.removeEventListener("resize",x)}},[r]),r.length===0?null:s.jsxs("section",{className:"mb-12",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("h2",{className:"text-2xl font-bold cursor-pointer hover:text-primary transition-colors story-link",onClick:v,children:e}),s.jsx(F,{variant:"ghost",size:"sm",onClick:v,className:"text-muted-foreground hover:text-primary",children:"Î Ïοβολή ÏλÏν"})]}),a&&s.jsx("p",{className:"text-muted-foreground text-sm max-w-4xl mb-6",children:a}),s.jsxs("div",{className:"relative group",children:[o&&s.jsx(F,{variant:"secondary",size:"icon",className:`absolute left-2 top-1/2 -translate-y-1/2 z-10 756 transition-opacity bg-background/80 backdrop-blur-sm 757 border shadow-lg hover:bg-background/90 758 ${f?"opacity-90":"opacity-0 group-hover:opacity-100"}`,onClick:()=>g("left"),children:s.jsx(ea,{className:"h-4 w-4"})}),c&&s.jsx(F,{variant:"secondary",size:"icon",className:`absolute right-2 top-1/2 -translate-y-1/2 z-10 759 transition-opacity bg-background/80 backdrop-blur-sm 760 border shadow-lg hover:bg-background/90 761 ${f?"opacity-90":"opacity-0 group-hover:opacity-100"}`,onClick:()=>g("right"),children:s.jsx(Da,{className:"h-4 w-4"})}),s.jsx("div",{ref:i,className:"flex gap-4 overflow-x-auto scrollbar-hide scroll-smooth pb-2",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:r.map(y=>s.jsx("div",{className:`flex-none ${f?"w-[85%]":"w-full"} sm:w-80`,children:s.jsx(sh,{title:y.title,overlayTitle:Ro(y.title),instructor:y.instructor||"Well Be Team",duration:y.duration_seconds?`${Math.ceil(y.duration_seconds/60)} min`:"",thumbnail:y.thumbnail_url||"",difficultyLevel:y.difficulty_level,overlayColor:y.overlay_color||"overlay-beige-orange-medium",onClick:()=>p(y),isWatched:m(y.vimeo_id),createdAt:y.created_at,publishedAt:y.published_at,pageType:n})},y.vimeo_id))})]})]})},Cb=({filterOptions:e,selectedFilters:t,onFiltersChange:r,onClearFilters:n})=>{const[a,i]=h.useState(!1),o=e.reduce((m,f)=>(m[f.category]||(m[f.category]=[]),m[f.category].push(f),m),{}),l=(m,f)=>{const p={...t};f==="all"?delete p[m]:p[m]=[f],r(p)},c=m=>{const f=t[m];return f&&f.length>0?f[0]:"all"},u=Object.values(t).reduce((m,f)=>m+f.length,0);return s.jsxs(tj,{open:a,onOpenChange:i,children:[s.jsx("div",{className:"flex items-center gap-3",children:s.jsx(sj,{asChild:!0,children:s.jsxs(F,{variant:"outline",className:"gap-2",children:[s.jsx(F5,{className:"h-4 w-4"}),"ΦίλÏÏα",u>0&&s.jsx(ye,{variant:"secondary",className:"ml-1",children:u}),s.jsx($l,{className:`h-4 w-4 transition-transform ${a?"rotate-180":""}`})]})})}),s.jsx(rj,{className:"mt-4",children:s.jsxs("div",{className:"flex flex-wrap gap-4 p-4 bg-background/50 rounded-lg border",children:[Object.entries(o).map(([m,f])=>s.jsxs("div",{className:"flex flex-col gap-2 min-w-[140px]",children:[s.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:m}),s.jsxs(ql,{value:c(m),onValueChange:p=>l(m,p),children:[s.jsx(Bo,{className:"w-full",children:s.jsx(Gl,{placeholder:"Îλα"})}),s.jsxs(zo,{className:"bg-background border shadow-lg z-[100]",children:[s.jsx(sr,{value:"all",children:"Îλα"}),f.map(p=>s.jsx(sr,{value:p.id,children:p.label},p.id))]})]})]},m)),Object.keys(t).length>0&&s.jsx("div",{className:"flex items-end",children:s.jsx("button",{onClick:n,className:"px-4 py-2 text-sm text-muted-foreground hover:text-foreground underline",children:"ÎαθαÏιÏμÏÏ ÏίλÏÏÏν"})})]})})]})},NR=({pageType:e,searchTerm:t="",selectedFilters:r,onFiltersChange:n,onClearFilters:a,onFilterOptionsChange:i,isMobileApp:o=!1})=>
761{const[l,c]=h.useState([]),[d,u]=h.useState(!0),[m,f]=h.useState(null),[p,v]=h.useState({}),g=r!==void 0?r:p;h.useEffect(()=>{b()},[e]);const b=async()=>{try{u(!0),f(null);const S=await gm.getSectionsWithVideos(e);c(S)}catch(S){console.error("Error loading sections:",S),f("Failed to load sections")}finally{u(!1)}},y=h.useMemo(()=>{const S=[];l.forEach(R=>{S.push({id:R.slug,label:R.name,category:"ÎαÏηγοÏίεÏ"})});const E=new Set;l.forEach(R=>{R.videos.forEach(T=>{T.difficulty_level&&E.add(T.difficulty_level)})}),E.forEach(R=>{if(R.toLowerCase()==="all")return;let T=R;const k=R.toLowerCase();k.includes("beginner")||k.includes("εÏκολο")||k.includes("easy")?T="Beginners":k.includes("intermediate")||k.includes("μÎÏÏιο")||k.includes("medium")?T="Intermediate":(k.includes("advanced")||k.includes("δÏÏκολο")||k.includes("hard"))&&(T="Advanced"),S.push({id:R,label:T,category:"ÎÏίÏεδο ÎÏ
ÏκολίαÏ"})}),["Abs & Core","Arms & Shoulders","Glutes & Legs","Full Body"].forEach(R=>{S.push({id:R,label:R,category:"Muscle Group"})}),S.push({id:"5-15",label:"5-15 λεÏÏά",category:"ÎιάÏκεια"},{id:"16-30",label:"16-30 λεÏÏά",category:"ÎιάÏκεια"},{id:"31-60",label:"31-60 λεÏÏά",category:"ÎιάÏκεια"},{id:"60+",label:"Î Î¬Î½Ï Î±ÏÏ 60 λεÏÏά",category:"ÎιάÏκεια"});const I=new Set;return l.forEach(R=>{R.videos.forEach(T=>{var C;const k=((C=T.instructors)==null?void 0:C.name)||T.instructor;k&&I.add(k)})}),I.forEach(R=>{S.push({id:R,label:R,category:"ÎκÏαιδεÏ
ÏήÏ"})}),S},[l]);h.useEffect(()=>{i&&i(y)},[y,i]);const x=S=>S?S/60:0,w=h.useMemo(()=>l.map(S=>{var _,I,R,T,k;let E=S.videos;return t&&(E=E.filter(C=>C.title.toLowerCase().includes(t.toLowerCase())||C.instructor&&C.instructor.toLowerCase().includes(t.toLowerCase()))),((_=g["ÎÏίÏεδο ÎÏ
ÏκολίαÏ"])==null?void 0:_.length)>0&&(E=E.filter(C=>C.difficulty_level&&(g["ÎÏίÏεδο ÎÏ
ÏκολίαÏ"].includes(C.difficulty_level)||C.difficulty_level.toLowerCase()==="all-levels"))),((I=g.ÎιάÏκεια)==null?void 0:I.length)>0&&(E=E.filter(C=>{const A=x(C.duration_seconds);return g.ÎιάÏκεια.some(L=>{switch(L){case"5-15":return A>=5&&A<=15;case"16-30":return A>=16&&A<=30;case"31-60":return A>=31&&A<=60;case"60+":return A>60;default:return!1}})})),((R=g.ÎκÏαιδεÏ
ÏήÏ)==null?void 0:R.length)>0&&(E=E.filter(C=>{var L;const A=((L=C.instructors)==null?void 0:L.name)||C.instructor;return A&&g.ÎκÏαιδεÏ
ÏήÏ.includes(A)})),((T=g["Muscle Group"])==null?void 0:T.length)>0&&(E=E.filter(C=>C.muscle_group&&g["Muscle Group"].includes(C.muscle_group))),((k=g.ÎαÏηγοÏίεÏ)==null?void 0:k.length)>0&&(g.ÎαÏηγοÏίεÏ.includes(S.slug)||(E=[])),{...S,videos:E}}).filter(S=>S.videos.length>0),[l,g,t]),j=S=>{n?n(S):v(S)},N=()=>{a?a():v({})};return d?s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wt,{className:"h-10 w-24"}),s.jsx(wt,{className:"h-6 w-32"}),s.jsx(wt,{className:"h-6 w-40"})]}),Array.from({length:3}).map((S,E)=>s.jsxs("div",{className:"space-y-4",children:[s.jsx(wt,{className:"h-8 w-64"}),s.jsx("div",{className:"flex gap-4 overflow-hidden",children:Array.from({length:4}).map((_,I)=>s.jsxs("div",{className:"flex-none w-80 space-y-3",children:[s.jsx(wt,{className:"h-48 w-full rounded-lg"}),s.jsx(wt,{className:"h-4 w-3/4"}),s.jsx(wt,{className:"h-4 w-1/2"})]},I))})]},E))]}):m?s.jsxs(er,{children:[s.jsx(ns,{className:"h-4 w-4"}),s.jsx(tr,{children:m})]}):w.length===0?s.jsxs("div",{className:"space-y-6",children:[y.length>0&&s.jsx(Cb,{filterOptions:y,selectedFilters:g,onFiltersChange:j,onClearFilters:N}),s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-muted-foreground text-lg",children:t||Object.keys(g).length>0?"Îεν βÏÎθηκαν βίνÏεο ÏοÏ
να ÏαιÏιάζοÏ
ν με Ïα κÏιÏήÏια αναζήÏηÏηÏ.":"Îεν Ï
ÏάÏÏοÏ
ν διαθÎÏιμα βίνÏεο αÏ
Ïή Ïη ÏÏιγμή."})})]}
761):s.jsxs("div",{className:"space-y-8",children:[!o&&y.length>0&&s.jsx(Cb,{filterOptions:y,selectedFilters:g,onFiltersChange:j,onClearFilters:N}),w.map(S=>s.jsx(ZQ,{title:S.name,slug:S.slug,videos:S.videos,pageType:e,description:S.description},S.id))]})},$g=({pageType:e})=>{const t=qe(),{videos:r,loading:n,error:a}=ki(e),{isVideoWatched:i}=Hl();return n?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:6}).map((o,l)=>s.jsxs("div",{className:"space-y-3",children:[s.jsx(wt,{className:"h-48 w-full rounded-lg"}),s.jsx(wt,{className:"h-4 w-3/4"}),s.jsx(wt,{className:"h-4 w-1/2"})]},l))}):a?s.jsxs(er,{children:[s.jsx(ns,{className:"h-4 w-4"}),s.jsx(tr,{children:a})]}):r.length===0?s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-muted-foreground",children:"No videos found."})}):s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:r.map(o=>s.jsx(sh,{title:o.title,overlayTitle:Ro(o.title),instructor:o.instructor||"Well Be Team",duration:o.duration,thumbnail:o.thumbnail,difficultyLevel:o.difficultyLevel,overlayColor:o.overlayColor||"overlay-beige-orange-medium",onClick:()=>{const l=e?`/${e}/${o.vimeoId}`:`/video/${o.vimeoId}`;t(l)},isWatched:i(o.vimeoId),createdAt:o.createdAt,publishedAt:o.publishedAt,pageType:o.pageType},o.id))})},Mk=["ÎεÏ
ÏÎÏα","ΤÏίÏη","ΤεÏάÏÏη","Î ÎμÏÏη","ΠαÏαÏκεÏ
ή","ΣάββαÏο","ÎÏ
Ïιακή"],_R=({onVideoClick:e})=>{const[t,r]=h.useState([]),[n,a]=h.useState([]),[i,o]=h.useState(0),[l,c]=h.useState(0),[d,u]=h.useState("workouts"),[m,f]=h.useState(!0);h.useEffect(()=>{p()},[]);const p=async()=>{try{f(!0);const _=fr(new Date,"yyyy-MM-dd"),{data:I,error:R}=await U.from("weekly_proposals").select("*").eq("is_active",!0).eq("category_type","workouts").or(`start_date.is.null,start_date.lte.${_}`).or(`end_date.is.null,end_date.gte.${_}`).order("created_at",{ascending:!1}).limit(1);if(R)throw R;const{data:T,error:k}=await U.from("weekly_proposals").select("*").eq("is_active",!0).eq("category_type","dialogismoi").or(`start_date.is.null,start_date.lte.${_}`).or(`end_date.is.null,end_date.gte.${_}`).order("created_at",{ascending:!1}).limit(1);if(k)throw k;const C=[...I||[],...T||[]];if(!C||C.length===0){r([]),a([]);return}const A=await Promise.all(C.map(async L=>{const{data:O,error:P}=await U.from("weekly_proposal_videos").select("*").eq("weekly_proposal_id",L.id).order("day_of_week",{ascending:!0}).order("display_order",{ascending:!0});if(P)throw P;const M=await Promise.all((O||[]).map(async D=>{const{data:$}=await U.from("videos").select("title, thumbnail_url, duration_seconds, page_type, overlay_color").eq("vimeo_id",D.video_id).single();return{...D,video_details:$||void 0}}));return{...L,category_type:L.category_type,videos:M}}));r(A.filter(L=>L.category_type==="workouts")),a(A.filter(L=>L.category_type==="dialogismoi"))}catch(_){console.error("Error loading weekly proposals:",_),r([]),a([])}finally{f(!1)}},v=(_,I)=>{if(!_||!I)return"";const R=new Date(_),T=new Date(I),k=R.getDate(),C=R.getMonth()+1,A=R.getFullYear(),L=T.getDate(),O=T.getMonth()+1,P=T.getFullYear();return C===O&&A===P?`${k}-${L}/${C}`:A===P?`${k}/${C}-${L}/${O}`:`${k}/${C}/${A}-${L}/${O}/${P}`},g=_=>{const I=Math.floor(_/60),R=_%60;return`${I}:${R.toString().padStart(2,"0")}`},b=()=>{d==="workouts"?o(_=>_+1>=t.length?0:_+1):c(_=>_+1>=n.length?0:_+1)},y=()=>{d==="workouts"?o(_=>_-1<0?t.length-1:_-1):c(_=>_-1<0?n.length-1:_-1)},x=_=>{const I=d==="workouts"?t:n,R=d==="workouts"?i:l;return I[R]?I[R].videos.filter(T=>T.day_of_week===_):[]},w=()=>(d==="workouts"?t:n)[d==="workouts"?i:l],j=()=>d==="workouts"?t.length:n.length,N=()=>d==="workouts"?i:l;if(m)return s.jsx("div",{className:"mb-8",children:s.jsxs("div",{className:"animate-pulse",children:[s.jsx("div",{className:"h-6 bg-muted rounded mb-4 w-1/3"}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-4",children:Array.from({length:7}).map((_,I)=>s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"h-4 bg-muted rounded"}),s.jsx("div",{className:"aspect-video bg-muted rounded"})]},I))})]})});if(t.length===0&&n.length===0)return null;const S=w(),E=j();return s.jsx("div",{className:"mb-8",children:s.jsx(oe,{children:s.jsxs(ce,{className:"p-6",children:[s.jsx("div",{className:"flex flex-col space-y-4 mb-6",children:s.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[s.jsxs("h3",{className:"text-xl font-semibold text-center",children:["Î ÏÏγÏαμμα ÎÎ²Î´Î¿Î¼Î¬Î´Î±Ï ",S&&v(S.start_date,S.end_date)]}),s.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[s.jsx(F,{variant:d==="workouts"?"default":"outline",size:"sm",onClick:()=>u("workouts"),disabled:t.length===0,children:"Workouts"}),s.jsx(F,{variant:d==="dialogismoi"?"default":"outline",size:"sm",onClick:()=>u("dialogismoi"),disabled:n.length===0,children:"ÎιαλογιÏμοί"})]}),E>1&&s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(F,{variant:"outline",size:"sm",onClick:y,children:s.jsx(ea,{className:"w-4 h-4"})}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:[N()+1," / ",E]}),s.jsx(F,{variant:"outline",size:"sm",onClick:b,children:s.jsx(Da,{className:"w-4 h-4"})})]})]})}),s.jsx("div",{className:"hidden lg:grid lg:grid-cols-7 gap-4",children:Mk.map((_,I)=>{const R=I+1,T=x(R);return s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"text-sm font-medium text-center",children:_}),T.length>0?s.jsx("div",{className:"space-y-2",children:T.map(k=>{var C,A,L,O,P;return s.jsx("div",{className:"group cursor-pointer relative",onClick:()=>e(k.video_id),children:s.jsxs("div",{className:"aspect-video relative rounded-lg overflow-hidden bg-muted",children:[(C=k.video_details)!=null&&C.thumbnail_url?s.jsx("img",{src:k.video_details.thumbnail_url,alt:k.video_details.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-200"}):s.jsx("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:s.jsx(Os,{className:"w-6 h-6 text-muted-foreground"})}),s.jsx("div",{className:`absolute inset-0 ${((A=k.video_details)==null?void 0:A.overlay_color)||"overlay-beige-orange-medium"}`}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center px-2",children:s.jsx("h3",{className:"text-white font-bold text-center text-xs leading-tight line-clamp-3",children:((O=(L=k.video_details)==null?void 0:L.title)==null?void 0:O.toUpperCase())||"ÎÎÎΩΣΤΠÎÎÎΤÎÎ"})}),s.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/30 transition-colors duration-200 flex items-center justify-center",children:s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:s.jsx("div",{className:"bg-white/90 rounded-full p-2",children:s.jsx(Os,{className:"w-4 h-4 text-foreground"})})})}),((P=k.video_details)==null?void 0:P.duration_seconds)&&s.jsx("div",{className:"absolute bottom-1 right-1",children:s.jsx(ye,{variant:"secondary",className:"text-xs",children:g(k.video_details.duration_seconds)})})]})},k.id)})}):s.jsx("div",{className:"aspect-video rounded-lg border-2 border-dashed border-muted-foreground
761/20 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground",children:"ΧÏÏÎ¯Ï Î²Î¯Î½Ïεο"})})]},_)})}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:hidden gap-4",children:Mk.map((_,I)=>{const R=I+1,T=x(R);return s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"text-sm font-medium text-center",children:_}),T.length>0?s.jsx("div",{className:"space-y-2",children:T.map(k=>{var C,A,L,O,P;return s.jsx("div",{className:"group cursor-pointer relative",onClick:()=>e(k.video_id),children:s.jsxs("div",{className:"aspect-video relative rounded-lg overflow-hidden bg-muted",children:[(C=k.video_details)!=null&&C.thumbnail_url?s.jsx("img",{src:k.video_details.thumbnail_url,alt:k.video_details.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-200"}):s.jsx("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:s.jsx(Os,{className:"w-6 h-6 text-muted-foreground"})}),s.jsx("div",{className:`absolute inset-0 ${((A=k.video_details)==null?void 0:A.overlay_color)||"overlay-beige-orange-medium"}`}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center px-2",children:s.jsx("h3",{className:"text-white font-bold text-center text-xs leading-tight line-clamp-3",children:((O=(L=k.video_details)==null?void 0:L.title)==null?void 0:O.toUpperCase())||"ÎÎÎΩΣΤΠÎÎÎΤÎÎ"})}),s.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/30 transition-colors duration-200 flex items-center justify-center",children:s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:s.jsx("div",{className:"bg-white/90 rounded-full p-2",children:s.jsx(Os,{className:"w-4 h-4 text-foreground"})})})}),((P=k.video_details)==null?void 0:P.duration_seconds)&&s.jsx("div",{className:"absolute bottom-1 right-1",children:s.jsx(ye,{variant:"secondary",className:"text-xs",children:g(k.video_details.duration_seconds)})})]})},k.id)})}):s.jsx("div",{className:"aspect-video rounded-lg border-2 border-dashed border-muted-foreground/20 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground",children:"ΧÏÏÎ¯Ï Î²Î¯Î½Ïεο"})})]},_)})})]})})})},eX=[{id:"1",title:"Sweat 16 για Ïλο Ïο ÏÏμα, με βαÏάκια (ÏÏοÏÏÏημÎÎ
761½Î¿ εÏίÏεδο)",overlayTitle:"Sweat 16 για Ïλο Ïο ÏÏμα, με βαÏάκια (ÏÏοÏÏÏημÎνο εÏίÏεδο)",duration:"16 λεÏÏά",thumbnail:"https://alpha.uscreencdn.com/assets%2Ftmp%2Fwell-be-workout-card.1739539375.png",instructor:"Well Be Team",categories:["Sweat"]},{id:"2",title:"ÎÏκήÏÎµÎ¹Ï ÎºÎ¹Î½Î·ÏικÏÏηÏÎ±Ï Î³Î¹Î± Ïλο Ïο ÏÏμα (Ïλα Ïα εÏίÏεδα)",overlayTitle:"ÎÏκήÏÎµÎ¹Ï ÎºÎ¹Î½Î·ÏικÏÏηÏÎ±Ï Î³Î¹Î± Ïλο Ïο ÏÏμα (Ïλα Ïα εÏίÏεδα)",duration:"30 λεÏÏά",thumbnail:"https://alpha.uscreencdn.com/assets%2Ftmp%2Fmob-fea.1721995720.png",instructor:"Well Be Team",categories:["ÎινηÏικÏÏηÏα"]},{id:"3",title:"ÎÏήγοÏο Workout για ÏÎÏια, με βαÏάκια (Ïλα Ïα εÏίÏεδα)",overlayTitle:"ÎÏήγοÏο Workout για ÏÎÏια, με βαÏάκια (Ïλα Ïα εÏίÏεδα)",duration:"11 λεÏÏά",thumbnail:"https://alpha.uscreencdn.com/assets%2Ftmp%2F-2023-12-05-123444-.1701772500.png",instructor:"Well Be Team",categories:["Strength"]}],tX=()=>{const e=qe(),[t]=Do(),[r,n]=h.useState(!1),[a,i]=h.useState(""),[o,l]=h.useState("workouts"),[c,d]=h.useState(!1),[u,m]=h.useState({}),[f,p]=h.useState([]),{videos:v,loading:g,error:b}=ki();Hl();const y=Fw(v);Wl();const{isMobileApp:x,navigateWithPlatform:w}=ar();h.useEffect(()=>{const N=t.get("filter");N&&["workouts","dialogismoi","breathworks"].includes(N)&&l(N)},[t]),y.length>0;const j=N=>{const S=v.find(_=>_.vimeoId===N);let E=`/video/${N}`;if(S!=null&&S.pageType)switch(S.pageType){case"workouts":E=`/workouts/${N}`;break;case"recipes":E=`/recipes/${N}`;break;case"podcast":E=`/podcast/${N}`;break;case"breathworks":E=`/breathworks/${N}`;break;case"dialogismoi":E=`/dialogismoi/${N}`;break;case"undefined":E=`/undefined/${N}`;break;default:E=`/catalog/${N}`}w(E)};return g?s.jsxs("div",{className:"min-h-screen bg-background",children:[x?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:r,onMenuToggle:()=>n(!r)}),s.jsx("main",{className:x?"pt-14":"pt-[80px] sm:pt-[88px] md:pt-[96px]",children:s.jsx("div",{className:"flex justify-center items-center py-12",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})}),!x&&s.jsx(Be,{})]}):s.jsxs("div",{className:"min-h-screen bg-background",children:[x?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:r,onMenuToggle:()=>n(!r)}),s.jsxs("main",{className:x?"pb-32":"",children:[!x&&s.jsx(JQ,{onVideoClick:j}),s.jsxs("section",{className:"container mx-auto px-4 py-6",children:[s.jsx(Fo,{}),s.jsx(_R,{onVideoClick:j}),x?s.jsx("div",{className:"mb-6",children:s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(Hr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4"}),s.jsx(ke,{placeholder:"ÎναζήÏηÏη βίνÏεο...",value:a,onChange:N=>i(N.target.value),className:"pl-10 h-10"})]}),s.jsxs(F,{variant:"outline",className:"h-10 px-3 whitespace-nowrap gap-2",onClick:()=>d(!0),children:[s.jsx(Q5,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden sm:inline",children:"ΦίλÏÏα"}),Object.keys(u).length>0&&s.jsx(ye,{variant:"secondary",className:"ml-1",children:Object.values(u).reduce((N,S)=>N+S.length,0)})]})]})}):s.jsx("div",{className:"mb-6",children:s.jsxs("div",{className:"relative",children:[s.jsx(Hr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4"}),s.jsx(ke,{placeholder:"ÎναζήÏηÏη βίνÏεο...",value:a,onChange:N=>i(N.target.value),className:"pl-10"})]})}),s.jsx("div",{className:"mb-8",children:s.jsxs("div",{className:"flex flex-col sm:flex-row justify-center items-center gap-2 sm:gap-4 mb-4",children:[s.jsx(F,{variant:o==="workouts"?"default":"outline",onClick:()=>l("workouts"),className:"text-base px-6 py-3 w-full sm:w-auto",children:"Workouts"}),s.jsx(F,{variant:o==="dialogismoi"?"default":"outline",onClick:()=>l("dialogismoi"),className:"text-base px-6 py-3 w-full sm:w-auto",children:"ÎιαλογιÏμοί"}),s.jsx(F,{variant:o==="breathworks"?"default":"outline",onClick:()=>l("breathworks"),className:"text-base px-6 py-3 w-full sm:w-auto",children:"Breathworks"})]})}
761),o==="workouts"?s.jsx(NR,{pageType:o,searchTerm:a,selectedFilters:u,onFiltersChange:m,onClearFilters:()=>m({}),onFilterOptionsChange:p,isMobileApp:x}):s.jsx($g,{pageType:o})]}),x&&s.jsx(bR,{open:c,onOpenChange:d,children:s.jsxs(Aj,{side:"bottom",className:"h-[85vh] overflow-y-auto",children:[s.jsx(Ij,{children:s.jsx(Rj,{className:"text-xl",children:"ΦίλÏÏα"})}),s.jsxs("div",{className:"py-6 space-y-6",children:[Object.entries(f.reduce((N,S)=>(N[S.category]||(N[S.category]=[]),N[S.category].push(S),N),{})).map(([N,S])=>{var E;return s.jsxs("div",{className:"space-y-3",children:[s.jsx("label",{className:"text-sm font-semibold text-foreground",children:N}),s.jsxs(ql,{value:((E=u[N])==null?void 0:E.length)>0?u[N][0]:"all",onValueChange:_=>{const I={...u};_==="all"?delete I[N]:I[N]=[_],m(I)},children:[s.jsx(Bo,{className:"w-full h-12 text-base",children:s.jsx(Gl,{placeholder:"Îλα"})}),s.jsxs(zo,{className:"bg-background border shadow-lg",children:[s.jsx(sr,{value:"all",children:"Îλα"}),S.map(_=>s.jsx(sr,{value:_.id,children:_.label},_.id))]})]})]},N)}),Object.keys(u).length>0&&s.jsx(F,{variant:"outline",onClick:()=>m({}),className:"w-full h-12 text-base",children:"ÎαθαÏιÏμÏÏ ÏίλÏÏÏν"}),s.jsx(F,{onClick:()=>d(!1),className:"w-full h-12 text-base bg-primary",children:"ÎÏαÏμογή"})]})]})})]}),x&&s.jsx("div",{className:"fixed bottom-0 left-0 right-0 bg-background/95 backdrop-blur-md border-t border-border pb-safe z-40",children:s.jsxs("div",{className:"container mx-auto px-4 py-3 flex gap-3",children:[s.jsxs(F,{variant:"outline",onClick:()=>e(-1),className:"flex-1 flex items-center justify-center gap-2",children:[s.jsx(as,{className:"h-4 w-4"}),"ΠίÏÏ"]}),s.jsx(F,{variant:"default",onClick:()=>w("/mobile-categories"),className:"flex-1",children:"ÎÎΤÎÎÎΡÎÎΣ ΠΡÎÎ ÎÎÎΣÎΩÎ"})]})}),!x&&s.jsx(Be,{})]})},Mj=()=>{const[e,t]=h.useState(!1),[r,n]=h.useState(""),[a,i]=h.useState(""),[o,l]=h.useState(!1),[c,d]=h.useState(!1),[u,m]=h.useState(!1),{signIn:f,checkUserStatus:p,resetPassword:v}=jt(),{toast:g}=at();qe();const b=async w=>{w.preventDefault(),t(!0),l(!1),m(!1);const{error:j}=await f(r,a);if(j){let N=!1;if(/invalid login credentials/i.test(j.message||""))try{const{status:S}=await p(r.trim().toLowerCase());(S==="oauth_only"||S==="needs_password")&&(l(!0),N=!0)}catch{}N||g({title:"ΣÏάλμα ÏÏνδεÏηÏ",description:j.message,variant:"destructive"})}t(!1)},y=async()=>{d(!0);const{error:w}=await v(r.trim().toLowerCase());if(d(!1),w){g({title:"Îεν ÏÏάλθηκε Ïο email",description:"ÎοκιμάÏÏε ξανά Ïε λίγο ή εÏικοινÏνήÏÏε μαζί μαÏ.",variant:"destructive"});return}m(!0)},x=()=>{window.open("https://app.wellbe.gr/subscription-plans","_blank","noopener,noreferrer")};return s.jsx("div",{className:"min-h-screen bg-gradient-to-br from-background via-muted/30 to-background flex items-center justify-center p-4",children:s.jsxs("div",{className:"w-full max-w-md",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("img",{src:"/lovable-uploads/463c9522-3313-4588-bd87-40273096d456.png",alt:"Well Be",className:"h-16 mx-auto mb-4"}),s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"ÎαλÏÏ Î®ÏθαÏε"}),s.jsx("p",{className:"text-muted-foreground mt-2",children:"ΣÏ
νδεθείÏε για ÏÏÏÏβαÏη ÏÏο Well Be"})]}),s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsx(be,{className:"text-2xl font-bold text-center",children:"Î ÏÏÏβαÏη"})}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("form",{onSubmit:b,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"signin-email",children:"Email"}),s.jsx(ke,{id:"signin-email",type:"email",placeholder:"[email protected]",value:r,onChange:w=>n(w.target.value),required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{htmlFor:"signin-password",children:"ÎÏδικÏÏ ÏÏÏÏβαÏηÏ"}),s.jsx(ke,{id:"signin-password",type:"password",value:a,onChange:w=>i(w.target.value),required:!0})]}),s.jsxs(F,{type:"submit",className:"w-full",disabled:e,children:[e&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"ΣÏνδεÏη"]})]}),o&&s.jsx("div",{className:"rounded-lg border border-border bg-muted/50 p-4 space-y-3",children:u?s.jsxs("div",{className:"flex gap-3",children:[s.jsx(ms,{className:"h-5 w-5 text-primary shrink-0 mt-0.5"}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-sm font-medium",children:"Î£Î±Ï ÏÏείλαμε email"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["ÎνοίξÏε Ïο email ÏÏο ",s.jsx("span",{className:"font-medium",children:r})," και οÏίÏÏε Ïον κÏÎ´Î¹ÎºÏ ÏαÏ. ÎεÏά εÏιÏÏÏÎÏÏε ÎµÎ´Ï ÎºÎ±Î¹ ÏÏ
νδεθείÏε."]})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex gap-3",children:[s.jsx(Fa,{className:"h-5 w-5 text-primary shrink-0 mt-0.5"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"ΠλÎ
761¿Î³Î±ÏιαÏμÏÏ ÏÎ±Ï Î´Î·Î¼Î¹Î¿Ï
Ïγήθηκε με Google. ΣÏην εÏαÏμογή η ÏÏνδεÏη γίνεÏαι με email και κÏδικÏ."})]}),s.jsxs(F,{type:"button",variant:"secondary",className:"w-full",onClick:y,disabled:c,children:[c&&s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"ΣÏείλÏε μοÏ
ÏÏνδεÏμο για να οÏίÏÏ ÎºÏδικÏ"]})]})}),s.jsx("div",{className:"text-center pt-4 border-t",children:s.jsx("button",{onClick:x,className:"text-sm text-primary hover:underline font-medium",children:"Îεν είÏÏε ακÏμη μÎλοÏ; ÎοκιμάÏÏε 7 ημÎÏÎµÏ Î´ÏÏεάν!"})})]})]})]})})},ii=({children:e,requireSubscription:t=!0,allowTrialUsers:r=!0,showPaywallButton:n=!1,paywallTitle:a="Premium Content",paywallDescription:i="This content is available for premium subscribers only.",fullPageOverlay:o=!1})=>{const{user:l}=jt(),{subscribed:c,isTrialUser:d,loading:u,isAdminFreeAccess:m}=_i(),[f,p]=h.useState(!1),{isMobileApp:v}=ar(),g=!t||l&&(c||r&&d||m);return h.useEffect(()=>{!u&&!g&&!f&&p(!0)},[u,g,f]),u?s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):g?s.jsx(s.Fragment,{children:e}):v?s.jsx(Mj,{}):s.jsxs(s.Fragment,{children:[s.jsx(Cg,{isOpen:f,onClose:()=>p(!1),title:a,description:i}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"select-none",children:e}),o&&s.jsx("div",{className:"fixed inset-0 bg-black/60 z-40 pointer-events-none"})]})]})};function sX({onSelectType:e,onClose:t}){return s.jsx("div",{className:"absolute bottom-12 left-0 z-50",children:s.jsx(oe,{className:"shadow-lg border",children:s.jsx(ce,{className:"p-2",children:s.jsxs("div",{className:"flex flex-col gap-1 min-w-[120px]",children:[s.jsxs(F,{variant:"ghost",size:"sm",className:"justify-start",onClick:()=>{e("photo"),t()},children:[s.jsx($0,{className:"h-4 w-4 mr-2"}),"Photo"]}),s.jsxs(F,{variant:"ghost",size:"sm",className:"justify-start",onClick:()=>{e("video"),t()},children:[s.jsx(No,{className:"h-4 w-4 mr-2"}),"Video"]}),s.jsxs(F,{variant:"ghost",size:"sm",className:"justify-start",onClick:()=>{e("gif"),t()},children:[s.jsx(dE,{className:"h-4 w-4 mr-2"}),"GIF"]})]})})})})}function Oj({onPostCreated:e,videoId:t,parentPostId:r,allowPhotos:n=!1,isGiveawayMode:a=!1}){const{user:i}=jt(),{toast:o}=at(),[l,c]=h.useState(""),[d,u]=h.useState(!1),[m,f]=h.useState([]),[p,v]=h.useState(!1),[g,b]=h.useState(!1),[y,x]=h.useState(!1),[w,j]=h.useState([]),[N,S]=h.useState(!1),[E,_]=h.useState(!1),[I,R]=h.useState("member");h.useRef(null);const T=h.useRef(null),k=h.useRef(null);h.useEffect(()=>{(async()=>{if(!i)return;const{data:X}=await U.from("user_roles").select("role").eq("user_id",i.id).maybeSingle();X!=null&&X.role&&R(X.role)})()},[i]);const C=W=>{var X,q;W==="gif"?x(!0):W==="photo"?(X=T.current)==null||X.click():W==="video"&&((q=k.current)==null||q.click())},A=(W,X)=>{const H=Array.from(W.target.files||[]).filter(se=>{let te=!1;X==="photo"?te=se.type.startsWith("image/")&&se.type!=="image/gif":X==="video"?te=se.type.startsWith("video/"):te=se.type.startsWith("image/")||se.type.startsWith("video/");const B=se.size<=10*1024*1024;return te?B?!0:(o({variant:"destructive",title:"File too large",description:"Files must be under 10MB"}),!1):(o({variant:"destructive",title:"Invalid file type",description:`Please select ${X||"valid"} files only`}),!1)});f([...m,...H].slice(0,4)),W.target&&(W.target.value="")},L=W=>{j([...w,W].slice(0,4))},O=W=>{j(w.filter((X,q)=>q!==W))},P=W=>{f(m.filter((X,q)=>q!==W))},M=async()=>{if(!i||m.length===0)return[];v(!0);const W=[];try{for(const X of m){const q=X.name.split(".").pop(),H=`${i.id}/${Date.now()}-${Math.random().toString(36).substring(2)}.${q}`,{data:se,error:te}=await U.storage.from("community-media").upload(H,X);if(te)throw te;const{data:B}=U.storage.from("community-media").getPublicUrl(se.path);W.push(B.publicUrl)}}catch(X){throw console.error("Error uploading media:",X),X}finally{v(!1)}return W},D=(W,X)=>{if(W.length===0&&X.length===0)return null;if(X.length>0)return"gif";const q=W.some(se=>se.type.startsWith("image/"));return W.some(se=>se.type.startsWith("video/"))?"video":q?"image":"mixed"},$=async W=>{var X,q;if(W.preventDefault(),!(!l.trim()&&m.length===0&&w.length===0||!i)){u(!0);try{let H=[],se=null;m.length>0&&(H=await M()),w.length>0&&(H=[...H,...w]),se=D(m,w);const{error:te}=await U.from("posts").insert({content:l.trim(),user_id:i.id,video_id:t,parent_post_id:r,media_urls:H.length>0?H:null,media_type:se,is_giveaway:I==="admin"?a||N:!1,is_pinned:I==="admin"?E:!1});if(te)throw te;c(""),f([]),j([]),S(!1),_(!1),e();try{const B=[(X=i.user_metadata)==null?void 0:X.first_name,(q=i.user_metadata)==null?void 0:q.last_name].filter(
761Boolean).join(" ").trim();U.functions.invoke("notify-community-activity",{body:{type:r?"reply":"post",content:l.trim(),authorName:B,authorEmail:i.email,postId:r||void 0}}).catch(le=>console.warn("notify-community-activity failed:",le))}catch(B){console.warn("notify-community-activity dispatch error:",B)}o({title:"Success",description:r?"Reply posted successfully":"Post created successfully"})}catch(H){console.error("Error creating post:",H),o({variant:"destructive",title:"Error",description:"Failed to create post"})}finally{u(!1)}}};return s.jsx(oe,{children:s.jsxs(ce,{className:"p-4",children:[s.jsxs("form",{onSubmit:$,className:"space-y-4",children:[s.jsx(So,{placeholder:r?"Write a reply...":t?"Comment on this video...":"What's on your mind?",value:l,onChange:W=>c(W.target.value),className:"min-h-[100px] resize-none",maxLength:500}),m.length>0&&s.jsx("div",{className:"grid grid-cols-2 gap-2",children:m.map((W,X)=>s.jsxs("div",{className:"relative group",children:[s.jsxs("div",{className:"relative overflow-hidden rounded-lg border",children:[W.type.startsWith("image/")?s.jsx("img",{src:URL.createObjectURL(W),alt:`Preview ${X+1}`,className:"w-full h-24 object-cover"}):W.type.startsWith("video/")?s.jsxs("div",{className:"w-full h-24 bg-gray-100 flex items-center justify-center",children:[s.jsx(No,{className:"h-8 w-8 text-gray-400"}),s.jsx("span",{className:"ml-2 text-sm text-gray-600",children:W.name})]}):s.jsxs("div",{className:"w-full h-24 bg-gray-100 flex items-center justify-center",children:[s.jsx(dE,{className:"h-8 w-8 text-gray-400"}),s.jsx("span",{className:"ml-2 text-sm text-gray-600",children:W.name})]}),s.jsx(F,{type:"button",variant:"destructive",size:"sm",className:"absolute top-1 right-1 h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>P(X),children:s.jsx(qr,{className:"h-3 w-3"})})]}),s.jsx(ye,{variant:"secondary",className:"absolute bottom-1 left-1 text-xs",children:W.type.startsWith("video/")?"Video":W.type==="image/gif"?"GIF":"Image"})]},X))}),w.length>0&&s.jsx("div",{className:"grid grid-cols-2 gap-2",children:w.map((W,X)=>s.jsxs("div",{className:"relative group",children:[s.jsxs("div",{className:"relative overflow-hidden rounded-lg border",children:[s.jsx("img",{src:W,alt:`GIF ${X+1}`,className:"w-full h-24 object-cover"}),s.jsx(F,{type:"button",variant:"destructive",size:"sm",className:"absolute top-1 right-1 h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>O(X),children:s.jsx(qr,{className:"h-3 w-3"})})]}),s.jsx(ye,{variant:"secondary",className:"absolute bottom-1 left-1 text-xs",children:"GIF"})]},X))}),I==="admin"&&!r&&!t&&s.jsxs("div",{className:"grid grid-cols-2 gap-3 p-3 bg-muted/50 border border-border rounded-lg",children:[s.jsxs("div",{className:"flex items-center space-x-2 p-2 bg-background rounded border",children:[s.jsx(La,{className:"h-4 w-4 text-amber-600"}),s.jsx("div",{className:"flex-1",children:s.jsx("label",{htmlFor:"giveaway-toggle",className:"text-sm font-medium cursor-pointer",children:"Giveaway"})}),s.jsx(km,{id:"giveaway-toggle",checked:N,onCheckedChange:S})]}),s.jsxs("div",{className:"flex items-center space-x-2 p-2 bg-background rounded border",children:[s.jsx(py,{className:"h-4 w-4 text-blue-600"}),s.jsx("div",{className:"flex-1",children:s.jsx("label",{htmlFor:"pin-toggle",className:"text-sm font-medium cursor-pointer",children:"Pin Post"})}),s.jsx(km,{id:"pin-toggle",checked:E,onCheckedChange:_})]})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center space-x-2 relative",children:[n&&s.jsxs(s.Fragment,{children:[s.jsx("input",{ref:T,type:"file",multiple:!0,accept:"image/*",onChange:W=>A(W,"photo"),className:"hidden"}),s.jsx("input",{ref:k,type:"file",multiple:!0,accept:"video/*",onChange:W=>A(W,"video"),className:"hidden"}),s.jsxs("div",{className:"relative",children:[s.jsxs(F,{type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:()=>b(!g),disabled:m.length+w.length>=4,children:[s.jsx($0,{className:"h-4 w-4 mr-2"}),"Media (",m.length+w.length,"/4)"]}),g&&s.jsx(sX,{onSelectType:C,onClose:()=>b(!1)})]})]}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[l.length,"/500"]})]}),s.jsx(F,{type:"submit",disabled:!l.trim()&&m.length===0&&w.length===0||d||p,className:"min-w-[80px]",children:p?"Uploading...":d?"Posting...":r?"Reply":"Post"})]})]}),y&&s.jsx(zT,{onGifSelect:L,onClose:()=>x(!1)})]})})}function Eb({postId:e,initialLikeCount:t=0,className:r}){const{user:n}=jt(),{toast:a}=at(),[i,o]=h.useState(!1),[l,c]=h.useState(t),[d,u]=h.useState(!1);h.useEffect(()=>{n&&(m(),f())},[n,e]);const m=async()=>
761{if(n)try{const{data:v,error:g}=await U.from("post_likes").select("id").eq("user_id",n.id).eq("post_id",e).maybeSingle();if(g&&g.code!=="PGRST116")throw g;o(!!v)}catch(v){console.error("Error checking like status:",v)}},f=async()=>{try{const{count:v,error:g}=await U.from("post_likes").select("*",{count:"exact",head:!0}).eq("post_id",e);if(g)throw g;c(v||0)}catch(v){console.error("Error fetching like count:",v)}},p=async()=>{if(!n){a({variant:"destructive",title:"Login required",description:"Please log in to like posts"});return}u(!0);try{if(i){const{error:v}=await U.from("post_likes").delete().eq("user_id",n.id).eq("post_id",e);if(v)throw v;o(!1),c(g=>Math.max(0,g-1))}else{const{error:v}=await U.from("post_likes").insert({user_id:n.id,post_id:e});if(v)throw v;o(!0),c(g=>g+1)}}catch(v){console.error("Error toggling like:",v),a({variant:"destructive",title:"Error",description:"Failed to update like status"})}finally{u(!1)}};return s.jsxs(F,{variant:"ghost",size:"sm",className:`text-muted-foreground hover:text-destructive transition-colors ${r}`,onClick:p,disabled:d,children:[s.jsx(ws,{className:`h-4 w-4 mr-1 ${i?"fill-destructive text-destructive":""}`}),s.jsx("span",{className:"text-xs",children:l})]})}const rX=["[email protected]","[email protected]"],Pb=e=>e?rX.includes(e.toLowerCase()):!1;function Tb({size:e="md"}){const t=e==="sm"?"h-3.5 w-3.5":"h-4 w-4";return s.jsx(n4,{children:s.jsxs(n8,{children:[s.jsx(a8,{asChild:!0,children:s.jsx(T5,{className:`${t} text-white fill-blue-500`})}),s.jsx(a4,{children:s.jsx("p",{children:"ÎÏαληθεÏ
μÎÎ½Î¿Ï ÎογαÏιαÏμÏÏ WellB"})})]})})}const nX=[{label:"Smileys",emojis:["ð","ð","ð","ð","ð","ð
","ð¤£","ð","ð","ð","ð","ð","ð","ð¥°","ð","ð¤©","ð","ð","ð","ð","ð","ð","ð","ð¤ª","ð","ð¤","ð¤","ð¤«","ð¤","ð¤","ð","ð","ð¶","ð","ð","ð","ð¬","ð","ð","ð´","ð·","ð¤","ð¤","ð¤§","ð¥µ","ð¥¶","ð¥´","ðµ","ð¤¯","ð¤ ","ð¥³","ð","ð¤","ð§"]},{label:"Gestures & People",emojis:["ð","ð","ð","ð","ð","ð¤","ð","ðª","ð«¶","ð¤","ð¤","âï¸","ð¤","ð","ð¤","ð¤","ð","ð","ð","ð","âï¸","â","ð¤","ðï¸","ð","ð","ð¤","ð
","ð«µ","ð§ ","ð","ðï¸","ð","ð¶","ð§","ð¦","ð§","ð§","ð¨","ð©","ð§"]},{label:"Hearts & Symbols",emojis:["â¤ï¸","ð§¡","ð","ð","ð","ð","ð¤","ð¤","ð¤","ð","ð","ð","ð","ð","ð","â£ï¸","ð","ð","ð¯","â¨","â","ð","ð«","â¡","ð¥","ð¥","ð¢","ð¦","ð¨","ð","ð","ð","ð","ð¥","ð¥","ð¥","ð¯","â
","â","â","â"]},{label:"Animals & Nature",emojis:["ð¶","ð±","ð","ð¹","ð°","ð¦","ð»","ð¼","ð¨","ð¯","ð¦","ð®","ð·","ð¸","ðµ","ð","ð§","ð¦","ð¤","ð¦","ð¦
","ð¦","ðº","ð","ð´","ð¦","ð","ð","ð¦","ð","ð","ð¢","ð","ð¦","ð","ð¦","ð¦","ð ","ð","ð¬","ð³","ð¸","ðº","ð»","ð¹","ð·","ð¼","ð±","ð³","ð´","ðµ","ð","ð","ð","ð","ð","ð","â"]},{label:"Food & Drink",emojis:["ð","ð","ð","ð","ð","ð","ð","ð«","ð","ð","ð¥","ð","ð¥¥","ð¥","ð
","ð","ð¥","ð¥¦","ð¥","ð½","ð¥","ð ","ð¥","ð","ð¥","ð¥¨","ð§","ð¥","ð³","ð¥","ð§","ð¥","ð","ð","ð","ð","ð¥ª","ð®","ð¯","ð¥","ð£","ð±","ð","ð","ð°","ð","ð©","ðª","ð«","ð¿","â","ðµ","ðº","ð·","ð¸","ð¥","ð¥¤"]},{label:"Activities & Travel",emojis:["â½","ð","ð","â¾","ð¾","ð","ð","ð±","ð","ð¸","ð¥","ð¥","â³","ð£","ð½","ð¹","ð¼","â¸ï¸","ð¿","ð","ð","ð","ð´","ðµ","ð§","ðï¸","ð","ð","ð","ð","ð","ð","ð","ð","ðï¸","ðµ","âï¸","ð","ð¸","ð","âµ","ð¤","ð³ï¸","ðï¸","ðï¸","ð»","ð","ðï¸","ð","ð
","ð","ð¢","ð¡"]}];function Ok({onSelect:e}){return s.jsxs(kb,{children:[s.jsx(Sb,{asChild:!0,children:s.jsx(F,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground","aria-label":"Add emoji",children:s.jsx(J5,{className:"h-4 w-4"})})}),s.jsx(yp,{align:"start",className:"w-72 p-2 max-h-72 overflow-y-auto",onOpenAutoFocus:t=>t.preventDefault(),children:s.jsx("div",{className:"space-y-3",children:nX.map(t=>s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1 px-1",children:t.label}),s.jsx("div",{className:"grid grid-cols-8 gap-1",children:t.emojis.map(r=>s.jsx("button",{type:"button",onClick:()=>e(r),className:"text-xl leading-none p-1 rounded hover:bg-muted transition-colors","aria-label":`Insert ${r}`,children:r},r))})]},t.label))})})]})}function aX({postId:e,commentCount:t=0,isExpanded:r=!1}){const{user:n}=jt(),{toast:a}=at(),[i,o]=h.useState([]),[l,c]=h.useState(""),[d,u]=h.useState(!1),[m,f]=h.useState(t),[p,v]=h.useState(null),[g,b]=h.useState("");h.useEffect(()=>{r&&y()},[e,r]);const y=async()=>{try{const{data:N,error:S}=await U.from("posts").select("id, content, created_at, user_id").eq("parent_post_id",e).eq("is_hidden",!1).order("created_at",{ascending:!0});if(S)throw S;const E=(N||[]).map(A=>A.id);let _=[];
761if(E.length>0){const{data:A}=await U.from("posts").select("id, content, created_at, user_id, parent_post_id").in("parent_post_id",E).eq("is_hidden",!1).order("created_at",{ascending:!0});_=A||[]}const I=[...new Set([...(N||[]).map(A=>A.user_id),..._.map(A=>A.user_id)])],{fetchSafeProfiles:R}=await ut(async()=>{const{fetchSafeProfiles:A}=await import("./useSafeProfiles-3mMwzyBY.js");return{fetchSafeProfiles:A}},[]),T=await R(I),k=A=>{const L=T.get(A);return L?{first_name:L.first_name,last_name:L.last_name,nickname:L.nickname,email:null,avatar_url:L.avatar_url}:null},C=(N||[]).map(A=>({...A,profiles:k(A.user_id),replies:_.filter(L=>L.parent_post_id===A.id).map(L=>({...L,profiles:k(L.user_id),replies:[]}))}));o(C),f(C.length+_.length)}catch(N){console.error("Error fetching comments:",N)}},x=async N=>{var S,E;if(N.preventDefault(),!(!n||!l.trim())){u(!0);try{const{error:_}=await U.from("posts").insert({content:l.trim(),user_id:n.id,parent_post_id:e,is_hidden:!1});if(_)throw _;c(""),await y();try{const I=[(S=n.user_metadata)==null?void 0:S.first_name,(E=n.user_metadata)==null?void 0:E.last_name].filter(Boolean).join(" ").trim();U.functions.invoke("notify-community-activity",{body:{type:"comment",content:l.trim(),authorName:I,authorEmail:n.email,postId:e}}).catch(R=>console.warn("notify-community-activity failed:",R))}catch(I){console.warn("notify-community-activity dispatch error:",I)}a({title:"Success",description:"Comment posted successfully"})}catch(_){console.error("Error posting comment:",_),a({variant:"destructive",title:"Error",description:"Failed to post comment"})}finally{u(!1)}}},w=async N=>{var S,E;if(!(!n||!g.trim())){u(!0);try{const{error:_}=await U.from("posts").insert({content:g.trim(),user_id:n.id,parent_post_id:N,is_hidden:!1});if(_)throw _;b(""),v(null),await y();try{const I=[(S=n.user_metadata)==null?void 0:S.first_name,(E=n.user_metadata)==null?void 0:E.last_name].filter(Boolean).join(" ").trim();U.functions.invoke("notify-community-activity",{body:{type:"reply",content:g.trim(),authorName:I,authorEmail:n.email,postId:N}}).catch(R=>console.warn("notify-community-activity failed:",R))}catch(I){console.warn("notify-community-activity dispatch error:",I)}a({title:"Success",description:"Reply posted successfully"})}catch(_){console.error("Error posting reply:",_),a({variant:"destructive",title:"Error",description:"Failed to post reply"})}finally{u(!1)}}},j=N=>{var S,E;return((S=N.profiles)==null?void 0:S.nickname)||N.profiles&&(`${N.profiles.first_name||""} ${N.profiles.last_name||""}`.trim()||((E=N.profiles.email)==null?void 0:E.split("@")[0]))||"Anonymous"};return s.jsx("div",{className:"space-y-3",children:s.jsxs("div",{className:"space-y-3 pl-2 border-l-2 border-border",children:[n&&s.jsxs("form",{onSubmit:x,className:"space-y-2",children:[s.jsx(So,{value:l,onChange:N=>c(N.target.value),placeholder:"Write a comment...",className:"min-h-[80px] resize-none",disabled:d}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ok,{onSelect:N=>c(S=>S+N)}),s.jsxs(F,{type:"submit",size:"sm",disabled:d||!l.trim(),children:[s.jsx(j_,{className:"h-3 w-3 mr-1"}),"Post Comment"]})]})]}),s.jsx("div",{className:"space-y-3",children:i.length===0?s.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No comments yet. Be the first to comment!"}):i.map(N=>{var S,E,_,I,R;return s.jsx(oe,{className:"p-3 bg-muted/30",children:s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Po,{userId:N.user_id,avatarUrl:(S=N.profiles)==null?void 0:S.avatar_url,firstName:(E=N.profiles)==null?void 0:E.first_name,lastName:(_=N.profiles)==null?void 0:_.last_name,email:(I=N.profiles)==null?void 0:I.email,className:"h-6 w-6"}),s.jsxs("div",{className:"flex-1 space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:j(N)}),Pb((R=N.profiles)==null?void 0:R.email)&&s.jsx(Tb,{size:"sm"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:fb(new Date(N.created_at),{addSuffix:!0})})]}),s.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:N.content}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsx(Eb,{postId:N.id}),n&&s.jsxs(F,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs text-muted-foreground hover:text-foreground",onClick:()=>v(p===N.id?null:N.id),children:[s.jsx(Xp,{className:"h-3 w-3 mr-1"}),"Reply"]})]}),p===N.id&&s.jsxs("div",{className:"mt-2 space-y-2",children:[s.jsx(So,{value:g,onChange:T=>b(T.target.value),placeholder:`Reply to ${j(N)}
761...`,className:"min-h-[60px] resize-none text-sm",disabled:d,autoFocus:!0}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx(Ok,{onSelect:T=>b(k=>k+T)}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(F,{variant:"ghost",size:"sm",onClick:()=>{v(null),b("")},children:"Cancel"}),s.jsxs(F,{size:"sm",disabled:d||!g.trim(),onClick:()=>w(N.id),children:[s.jsx(j_,{className:"h-3 w-3 mr-1"}),"Reply"]})]})]})]}),N.replies&&N.replies.length>0&&s.jsx("div",{className:"mt-3 space-y-2 pl-4 border-l border-border/50",children:N.replies.map(T=>{var k,C,A,L,O;return s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Po,{userId:T.user_id,avatarUrl:(k=T.profiles)==null?void 0:k.avatar_url,firstName:(C=T.profiles)==null?void 0:C.first_name,lastName:(A=T.profiles)==null?void 0:A.last_name,email:(L=T.profiles)==null?void 0:L.email,className:"h-5 w-5"}),s.jsxs("div",{className:"flex-1 space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs font-medium",children:j(T)}),Pb((O=T.profiles)==null?void 0:O.email)&&s.jsx(Tb,{size:"sm"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:fb(new Date(T.created_at),{addSuffix:!0})})]}),s.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:T.content}),s.jsx("div",{className:"flex items-center gap-1 pt-1",children:s.jsx(Eb,{postId:T.id})})]})]},T.id)})})]})]})},N.id)})})]})})}var Ab=["Enter"," "],iX=["ArrowDown","PageUp","Home"],kR=["ArrowUp","PageDown","End"],oX=[...iX,...kR],lX={ltr:[...Ab,"ArrowRight"],rtl:[...Ab,"ArrowLeft"]},cX={ltr:["ArrowLeft"],rtl:["ArrowRight"]},lh="Menu",[Sm,dX,uX]=$m(lh),[Yl,SR]=gs(lh,[uX,Mo,Md]),Ug=Mo(),CR=Md(),[mX,Kl]=Yl(lh),[hX,ch]=Yl(lh),ER=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:i,modal:o=!0}=e,l=Ug(t),[c,d]=h.useState(null),u=h.useRef(!1),m=rs(i),f=Vl(a);return h.useEffect(()=>{const p=()=>{u.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>u.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),s.jsx(sg,{...l,children:s.jsx(mX,{scope:t,open:r,onOpenChange:m,content:c,onContentChange:d,children:s.jsx(hX,{scope:t,onClose:h.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:u,dir:f,modal:o,children:n})})})};ER.displayName=lh;var fX="MenuAnchor",Dj=h.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Ug(r);return s.jsx(Wm,{...a,...n,ref:t})});Dj.displayName=fX;var Lj="MenuPortal",[pX,PR]=Yl(Lj,{forceMount:void 0}),TR=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:a}=e,i=Kl(Lj,t);return s.jsx(pX,{scope:t,forceMount:r,children:s.jsx(Ns,{present:r||i.open,children:s.jsx(kd,{asChild:!0,container:a,children:n})})})};TR.displayName=Lj;var kn="MenuContent",[gX,Fj]=Yl(kn),AR=h.forwardRef((e,t)=>{const r=PR(kn,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=Kl(kn,e.__scopeMenu),o=ch(kn,e.__scopeMenu);return s.jsx(Sm.Provider,{scope:e.__scopeMenu,children:s.jsx(Ns,{present:n||i.open,children:s.jsx(Sm.Slot,{scope:e.__scopeMenu,children:o.modal?s.jsx(xX,{...a,ref:t}):s.jsx(vX,{...a,ref:t})})})})}),xX=h.forwardRef((e,t)=>{const r=Kl(kn,e.__scopeMenu),n=h.useRef(null),a=Ye(t,n);return h.useEffect(()=>{const i=n.current;if(i)return vg(i)},[]),s.jsx($j,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:pe(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),vX=h.forwardRef((e,t)=>{const r=Kl(kn,e.__scopeMenu);return s.jsx($j,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),yX=wo("MenuContent.ScrollLock"),$j=h.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:m,onInteractOutside:f,onDismiss:p,disableOutsideScroll:v,...g}=e,b=Kl(kn,r),y=ch(kn,r),x=Ug(r),w=CR(r),j=dX(r),[N,S]=h.useState(null),E=h.useRef(null),_=Ye(t,E,b.onContentChange),I=h.useRef(0),R=h.useRef(""),T=h.useRef(0),k=h.useRef(null),C=h.useRef("right"),A=h.useRef(0),L=v?Km:h.Fragment,O=v?{as:yX,allowPinchZoom:!0}:void 0,P=D=>{var B,le;const $=R.current+D,W=j().filter(J=>!J.disabled),X=document.activeElement,q=(B=W.find(J=>J.ref.current===X))==null?void 0:B.textValue,H=W.map(J=>J.textValue),se=AX(H,$,q),te=(le=W.find(J=>J.textValue===se))==null?void 0:le.ref.current;(function J(K){R.current=K,window.clearTimeout(I.current),K!==""&&(I.current=window.setTimeout(()=>J(""),1e3))})($),te&&setTimeout(()=>te.focus())};h.useEffect(()=>()=>window.clearTimeout(I.current),[]),gg();const M=h.useCallback(D=>{var W,X;return C.current===((W=k.current)==null?void 0:W.side)&&RX(D,(X=k.current)==null?void 0:X.area)},[]);return s.jsx(gX,{scope:r,searchRef:R,onItemEnter:h.useCallback(D=>{M(D)&&D.preventDefault()},[M]),onItemLeave:h.useCallback(D=>{var $;M(D)||(($=E.current)==null||$.focus(),S(null))},[M]),onTriggerLeave:h.useCallback(D=>{M(D)&&D.preventDefault()},[M]),pointerGraceTimerRef:T,onPointerGraceIntentChange:h.useCallback(D=>{k.current=D},[]),children:s.jsx(L,{...O,children:s.jsx(Ym,{asChild:!0,trapped:a,onMountAutoFocus:pe(i,D=>{var $;D.preventDefault(),($=E.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:s.jsx(Fl,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:m,onInteractOutside:f,onDismiss:p,children:s.jsx(Jw,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:N,onCurrentTabStopIdChange:S,onEntryFocus:pe(c,D=>{y.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(rg,{role:"menu","aria-orientation":"vertical","data-state":GR(b.open),"data-radix-menu-content":"",dir:y.dir,...x,...g,ref:_,style:{outline:"none",...g.style},onKeyDown:pe(g.onKeyDown,D=>{const W=D.target.closest("[data-radix-menu-content]")===D.currentTarget,X=D.ctrlKey||D.altKey||D.metaKey,q=D.key.length===1;W&&(D.key==="Tab"&&D.preventDefault(),!X&&q&&P(D.key));const H=E.current;if(D.target!==H||!oX.includes(D.key))return;D.preventDefault();
vendor: 11,548 bytes, line 761
761const te=j().filter(B=>!B.disabled).map(B=>B.ref.current);kR.includes(D.key)&&te.reverse(),PX(te)}),onBlur:pe(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(I.current),R.current="")}),onPointerMove:pe(e.onPointerMove,Cm(D=>{const $=D.target,W=A.current!==D.clientX;if(D.currentTarget.contains($)&&W){const X=D.clientX>A.current?"right":"left";C.current=X,A.current=D.clientX}}))})})})})})})});AR.displayName=kn;var bX="MenuGroup",Uj=h.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(Ce.div,{role:"group",...n,ref:t})});Uj.displayName=bX;var wX="MenuLabel",IR=h.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(Ce.div,{...n,ref:t})});IR.displayName=wX;var bp="MenuItem",Dk="menu.itemSelect",Bg=h.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...a}=e,i=h.useRef(null),o=ch(bp,e.__scopeMenu),l=Fj(bp,e.__scopeMenu),c=Ye(t,i),d=h.useRef(!1),u=()=>{const m=i.current;if(!r&&m){const f=new CustomEvent(Dk,{bubbles:!0,cancelable:!0});m.addEventListener(Dk,p=>n==null?void 0:n(p),{once:!0}),R0(m,f),f.defaultPrevented?d.current=!1:o.onClose()}};return s.jsx(RR,{...a,ref:c,disabled:r,onClick:pe(e.onClick,u),onPointerDown:m=>{var f;(f=e.onPointerDown)==null||f.call(e,m),d.current=!0},onPointerUp:pe(e.onPointerUp,m=>{var f;d.current||(f=m.currentTarget)==null||f.click()}),onKeyDown:pe(e.onKeyDown,m=>{const f=l.searchRef.current!=="";r||f&&m.key===" "||Ab.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});Bg.displayName=bp;var RR=h.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:a,...i}=e,o=Fj(bp,r),l=CR(r),c=h.useRef(null),d=Ye(t,c),[u,m]=h.useState(!1),[f,p]=h.useState("");return h.useEffect(()=>{const v=c.current;v&&p((v.textContent??"").trim())},[i.children]),s.jsx(Sm.ItemSlot,{scope:r,disabled:n,textValue:a??f,children:s.jsx(Zw,{asChild:!0,...l,focusable:!n,children:s.jsx(Ce.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:d,onPointerMove:pe(e.onPointerMove,Cm(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:pe(e.onPointerLeave,Cm(v=>o.onItemLeave(v))),onFocus:pe(e.onFocus,()=>m(!0)),onBlur:pe(e.onBlur,()=>m(!1))})})})}),jX="MenuCheckboxItem",MR=h.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...a}=e;return s.jsx($R,{scope:e.__scopeMenu,checked:r,children:s.jsx(Bg,{role:"menuitemcheckbox","aria-checked":wp(r)?"mixed":r,...a,ref:t,"data-state":zj(r),onSelect:pe(a.onSelect,()=>n==null?void 0:n(wp(r)?!0:!r),{checkForDefaultPrevented:!1})})})});MR.displayName=jX;var OR="MenuRadioGroup",[NX,_X]=Yl(OR,{value:void 0,onValueChange:()=>{}}),DR=h.forwardRef((e,t)=>{const{value:r,onValueChange:n,...a}=e,i=rs(n);return s.jsx(NX,{scope:e.__scopeMenu,value:r,onValueChange:i,children:s.jsx(Uj,{...a,ref:t})})});DR.displayName=OR;var LR="MenuRadioItem",FR=h.forwardRef((e,t)=>{const{value:r,...n}=e,a=_X(LR,e.__scopeMenu),i=r===a.value;return s.jsx($R,{scope:e.__scopeMenu,checked:i,children:s.jsx(Bg,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":zj(i),onSelect:pe(n.onSelect,()=>{var o;return(o=a.onValueChange)==null?void 0:o.call(a,r)},{checkForDefaultPrevented:!1})})})});FR.displayName=LR;var Bj="MenuItemIndicator",[$R,kX]=Yl(Bj,{checked:!1}),UR=h.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...a}=e,i=kX(Bj,r);return s.jsx(Ns,{present:n||wp(i.checked)||i.checked===!0,children:s.jsx(Ce.span,{...a,ref:t,"data-state":zj(i.checked)})})});UR.displayName=Bj;var SX="MenuSeparator",BR=h.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(Ce.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});BR.displayName=SX;var CX="MenuArrow",zR=h.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Ug(r);return s.jsx(ng,{...a,...n,ref:t})});zR.displayName=CX;var EX="MenuSub",[wte,WR]=Yl(EX),wu="MenuSubTrigger",VR=h.forwardRef((e,t)=>{const r=Kl(wu,e.__scopeMenu),n=ch(wu,e.__scopeMenu),a=WR(wu,e.__scopeMenu),i=Fj(wu,e.__scopeMenu),o=h.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,d={__scopeMenu:e.__scopeMenu},u=h.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return h.useEffect(()=>u,[u]),h.useEffect(()=>{const m=l.current;return()=>{window.clearTimeout(m),c(null)}},[l,c]),s.jsx(Dj,{asChild:!0,...d,children:s.jsx(RR,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":GR(r.open),...e,ref:Hp(t,a.onTriggerChange),onClick:m=>{var f;(f=e.onClick)==null||f.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:pe(e.onPointerMove,Cm(m=>{i.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:pe(e.onPointerLeave,Cm(m=>{var p,v;u();const f=(p=r.content)==null?void 0:p.getBoundingClientRect();if(f){const g=(v=r.content)==null?void 0:v.dataset.side,b=g==="right",y=b?-5:5,x=f[b?"left":"right"],w=f[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:m.clientX+y,y:m.clientY},{x,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x,y:f.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(m),m.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:pe(e.onKeyDown,m=>{var p;const f=i.searchRef.current!=="";e.disabled||f&&m.key===" "||lX[n.dir].includes(m.key)&&(r.onOpenChange(!0),(p=r.content)==null||p.focus(),m.preventDefault())})})})});VR.displayName=wu;var HR="MenuSubContent",qR=h.forwardRef((e,t)=>{const r=PR(kn,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=Kl(kn,e.__scopeMenu),o=ch(kn,e.__scopeMenu),l=WR(HR,e.__scopeMenu),c=h.useRef(null),d=Ye(t,c);return s.jsx(Sm.Provider,{scope:e.__scopeMenu,children:s.jsx(Ns,{present:n||i.open,children:s.jsx(Sm.Slot,{scope:e.__scopeMenu,children:s.jsx($j,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:d,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var m;o.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:pe(e.onFocusOutside,u=>{u.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:pe(e.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:pe(e.onKeyDown,u=>{var p;const m=u.currentTarget.contains(u.target),f=cX[o.dir].includes(u.key);m&&f&&(i.onOpenChange(!1),(p=l.trigger)==null||p.focus(),u.preventDefault())})})})})})});qR.displayName=HR;function GR(e){return e?"open":"closed"}function wp(e){return e==="indeterminate"}function zj(e){return wp(e)?"indeterminate":e?"checked":"unchecked"}function PX(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function TX(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function AX(e,t,r){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=TX(e,Math.max(i,0));a.length===1&&(o=o.filter(d=>d!==r));const c=o.find(d=>d.toLowerCase().startsWith(a.toLowerCase()));return c!==r?c:void 0}function IX(e,t){const{x:r,y:n}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i],c=t[o],d=l.x,u=l.y,m=c.x,f=c.y;u>n!=f>n&&r<(m-d)*(n-u)/(f-u)+d&&(a=!a)}return a}function RX(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return IX(r,t)}function Cm(e){return t=>t.pointerType==="mouse"?e(t):void 0}var MX=ER,OX=Dj,DX=TR,LX=AR,FX=Uj,$X=IR,UX=Bg,BX=MR,zX=DR,WX=FR,VX=UR,HX=BR,qX=zR,GX=VR,YX=qR,zg="DropdownMenu",[KX,jte]=gs(zg,[SR]),jr=SR(),[QX,YR]=KX(zg),KR=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=jr(t),d=h.useRef(null),[u,m]=xr({prop:a,defaultProp:i??!1,onChange:o,caller:zg});return s.jsx(QX,{scope:t,triggerId:Fr(),triggerRef:d,contentId:Fr(),open:u,onOpenChange:m,onOpenToggle:h.useCallback(()=>m(f=>!f),[m]),modal:l,children:s.jsx(MX,{...c,open:u,onOpenChange:m,dir:n,modal:l,children:r})})};KR.displayName=zg;var QR="DropdownMenuTrigger",XR=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,i=YR(QR,r),o=jr(r);return s.jsx(OX,{asChild:!0,...o,children:s.jsx(Ce.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:Hp(t,i.triggerRef),onPointerDown:pe(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:pe(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});XR.displayName=QR;var XX="DropdownMenuPortal",JR=e=>{const{__scopeDropdownMenu:t,...r}=e,n=jr(t);return s.jsx(DX,{...n,...r})};JR.displayName=XX;var ZR="DropdownMenuContent",e3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=YR(ZR,r),i=jr(r),o=h.useRef(!1);return s.jsx(LX,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...n,ref:t,onCloseAutoFocus:pe(e.onCloseAutoFocus,l=>{var c;o.current||(c=a.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:pe(e.onInteractOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,u=c.button===2||d;(!a.modal||u)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});e3.displayName=ZR;var JX="DropdownMenuGroup",ZX=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=jr(r);return s.jsx(FX,{...a,...n,ref:t})});ZX.displayName=JX;var eJ="DropdownMenuLabel",t3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=jr(r);return s.jsx($X,{...a,...n,ref:t})});t3.displayName=eJ;var tJ="DropdownMenuItem",s3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=jr(r);return s.jsx(UX,{...a,...n,ref:t})});s3.displayName=tJ;var sJ="DropdownMenuCheckboxItem",r3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=jr(r);return s.jsx(BX,{...a,...n,ref:t})});r3.displayName=sJ;var rJ="DropdownMenuRadioGroup",nJ=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=jr(r);return s.jsx(zX,{...a,...n,ref:t})});nJ.displayName=rJ;var aJ="DropdownMenuRadioItem",n3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=jr(r);return s.jsx(WX,{...a,...n,ref:t})});n3.displayName=aJ;var iJ="DropdownMenuItemIndicator",a3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=jr(r);return s.jsx(VX,{...a,...n,ref:t})});a3.displayName=iJ;var oJ="DropdownMenuSeparator",i3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=jr(r);return s.jsx(HX,{...a,...n,ref:t})});i3.displayName=oJ;var lJ="DropdownMenuArrow",cJ=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=jr(r);return s.jsx(qX,{...a,...n,ref:t})});cJ.displayName=lJ;var dJ="DropdownMenuSubTrigger",o3=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=jr(r);return s.jsx(GX,{...a,...n,ref:t})});o3.displayName=dJ;var uJ="DropdownMenuSubContent",l3=h.forwardRef((e,t)=>
761{const{__scopeDropdownMenu:r,...n}=e,a=jr(r);return s.jsx(YX,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});l3.displayName=uJ;var mJ=KR,hJ=XR,fJ=JR,c3=e3,d3=t3,u3=s3,m3=r3,h3=n3,f3=a3,p3=i3,g3=o3,x3=l3;const pJ=mJ,gJ=hJ,xJ=h.forwardRef(({className:e,inset:t,children:r,...n},a)=>s.jsxs(g3,{ref:a,className:me("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[r,s.jsx(Da,{className:"ml-auto h-4 w-4"})]}));xJ.displayName=g3.displayName;const vJ=h.forwardRef(({className:e,...t},r)=>s.jsx(x3,{ref:r,className:me("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));vJ.displayName=x3.displayName;const v3=h.forwardRef(({className:e,sideOffset:t=4,...r},n)=>s.jsx(fJ,{children:s.jsx(c3,{ref:n,sideOffset:t,className:me("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));v3.displayName=c3.displayName;const ju=h.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(u3,{ref:n,className:me("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));ju.displayName=u3.displayName;const yJ=h.forwardRef(({className:e,children:t,checked:r,...n},a)=>s.jsxs(m3,{ref:a,className:me("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(f3,{children:s.jsx(Ar,{className:"h-4 w-4"})})}),t]}));yJ.displayName=m3.displayName;const bJ=h.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(h3,{ref:n,className:me("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(f3,{children:s.jsx(lE,{className:"h-2 w-2 fill-current"})})}),t]}));bJ.displayName=h3.displayName;const wJ=h.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(d3,{ref:n,className:me("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));wJ.displayName=d3.displayName;const jJ=h.forwardRef(({className:e,...t},r)=>s.jsx(p3,{ref:r,className:me("-mx-1 my-1 h-px bg-muted",e),...t}));jJ.displayName=p3.displayName;function Wj({post:e,currentUserRole:t,onDelete:r,onHide:n,onPin:a,onUnpin:i}){var _,I,R,T,k,C,A,L,O,P;const[o,l]=h.useState(!1),[c,d]=h.useState(0),[u,m]=h.useState(0),[f,p]=h.useState(!1),[v,g]=h.useState(null),b=t==="admin",x=(((I=(_=e.user_roles)==null?void 0:_[0])==null?void 0:I.role)||"member")==="admin",w=((R=e.profiles)==null?void 0:R.nickname)||e.profiles&&(`${e.profiles.first_name||""} ${e.profiles.last_name||""}`.trim()||((T=e.profiles.email)==null?void 0:T.split("@")[0]))||"Anonymous",j=((k=e.media_urls)==null?void 0:k.filter(M=>{const D=e.media_type==="video"||M.includes(".mp4")||M.includes(".webm")||M.includes(".mov"),$=e.media_type==="gif"||M.includes(".gif");return!D&&!$}))||[];h.useEffect(()=>{S(),e.video_id&&N()},[e.id,e.video_id]);const N=async()=>
761{if(e.video_id)try{const{data:M,error:D}=await U.from("videos").select("title, vimeo_id").eq("vimeo_id",e.video_id).maybeSingle();!D&&M&&g(M)}catch(M){console.error("Error fetching video info:",M)}},S=async()=>{try{const{count:M,error:D}=await U.from("posts").select("*",{count:"exact",head:!0}).eq("parent_post_id",e.id).eq("is_hidden",!1);!D&&M!==null&&m(M)}catch(M){console.error("Error fetching comment count:",M)}},E=M=>{d(M),l(!0)};return s.jsxs(oe,{className:`${x?"border-primary/50 bg-primary/5":""}`,children:[s.jsx(xe,{className:"pb-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx(Po,{userId:e.user_id||"",avatarUrl:(C=e.profiles)==null?void 0:C.avatar_url,firstName:(A=e.profiles)==null?void 0:A.first_name,lastName:(L=e.profiles)==null?void 0:L.last_name,email:(O=e.profiles)==null?void 0:O.email,className:"h-8 w-8"}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"font-medium text-sm",children:w}),Pb((P=e.profiles)==null?void 0:P.email)&&s.jsx(Tb,{}),x&&s.jsx(ye,{variant:"default",className:"text-xs",children:"Admin"}),e.is_giveaway&&s.jsx(ye,{variant:"secondary",className:"text-[10px] px-1.5 py-0.5 bg-yellow-100 text-yellow-800 border-yellow-300",children:"ð ÎιαγÏνιÏμÏÏ"}),e.is_pinned&&s.jsx(py,{className:"h-3 w-3 text-primary"})]}),s.jsx("span",{className:"text-xs text-muted-foreground",children:fb(new Date(e.created_at),{addSuffix:!0})})]}),b&&s.jsxs(pJ,{children:[s.jsx(gJ,{asChild:!0,children:s.jsx(F,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(cE,{className:"h-4 w-4"})})}),s.jsxs(v3,{align:"end",className:"bg-background border shadow-lg",children:[e.is_pinned?s.jsxs(ju,{onClick:()=>i(e.id),className:"text-blue-600",children:[s.jsx(q5,{className:"h-4 w-4 mr-2"}),"Unpin Post"]}):s.jsxs(ju,{onClick:()=>a(e.id),className:"text-blue-600",children:[s.jsx(py,{className:"h-4 w-4 mr-2"}),"Pin Post"]}),s.jsxs(ju,{onClick:()=>n(e.id),className:"text-orange-600",children:[s.jsx(Gf,{className:"h-4 w-4 mr-2"}),"Hide Post"]}),s.jsxs(ju,{onClick:()=>r(e.id),className:"text-destructive",children:[s.jsx(jn,{className:"h-4 w-4 mr-2"}),"Delete Post"]})]})]})]})}),s.jsx(ce,{className:"pt-0",children:s.jsxs("div",{className:"space-y-3",children:[e.video_id&&s.jsxs("div",{className:"text-sm text-muted-foreground",children:["ð¬ ΣÏÏλιο ÏÏο"," ",v?s.jsx(cs,{to:`/video/${v.vimeo_id}`,className:"text-primary hover:underline font-medium",children:v.title}):s.jsx("span",{className:"animate-pulse",children:"video..."})]}),s.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:e.content}),e.image_url&&s.jsx("img",{src:e.image_url,alt:"Post image",className:"rounded-lg max-w-full h-auto"}),e.media_urls&&e.media_urls.length>0&&s.jsx("div",{className:`grid gap-2 ${e.media_urls.length===1?"grid-cols-1":e.media_urls.length===2?"grid-cols-2":e.media_urls.length===3?"grid-cols-3":"grid-cols-2"}`,children:e.media_urls.map((M,D)=>{const $=e.media_type==="video"||M.includes(".mp4")||M.includes(".webm")||M.includes(".mov"),W=e.media_type==="gif"||M.includes(".gif"),X=j.indexOf(M);return s.jsxs("div",{className:`relative ${W?"":"rounded-lg"} overflow-hidden ${e.media_urls.length===3&&D===0?"col-span-2":e.media_urls.length>3&&D>=2?"row-span-1":""}`,children:[$?s.jsxs("div",{className:"relative",children:[s.jsx("video",{src:M,className:"w-full h-auto max-h-96 object-cover",controls:!0,preload:"metadata"}),s.jsx(ye,{variant:"secondary",className:"absolute bottom-2 left-2 text-xs",children:"Video"})]}):s.jsx("div",{className:"relative",children:s.jsx("img",{src:M,alt:`Media ${D+1}`,className:`${W?"w-40 h-40 aspect-square rounded-none":"cursor-pointer hover:opacity-90 transition-opacity w-full h-auto max-h-96"} object-cover`,onClick:!W&&X!==-1?()=>E(X):void 0})}),e.media_urls.length>4&&D===3&&s.jsx("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center",children:s.jsxs("span",{className:"text-white text-lg font-semibold",children:["+",e.media_urls.length-4]})})]},D)}).slice(0,4)}),s.jsx(NT,{images:j,currentIndex:c,isOpen:o,onClose:()=>l(!1),onNavigate:d}),s.jsxs("div",{className:"space-y-3 pt-2 border-t border-border",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Eb,{postId:e.id}),s.jsxs(F,{variant:"ghost",size:"sm",onClick:()=>
vendor: 9,182 bytes, line 761
761p(!f),className:"text-muted-foreground hover:text-primary transition-colors",children:[s.jsx(Xp,{className:"h-4 w-4 mr-1"}),s.jsx("span",{className:"text-xs",children:u})]})]}),f&&s.jsx(aX,{postId:e.id,commentCount:u,isExpanded:!0})]})]})})]})}/*! @vimeo/player v2.30.1 | (c) 2025 Vimeo | MIT License | https://github.com/vimeo/player.js */function NJ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function Lk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lk(Object(r),!0).forEach(function(n){vf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cr(){cr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(k,C,A){k[C]=A.value},a=typeof Symbol=="function"?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(k,C,A){return Object.defineProperty(k,C,{value:A,enumerable:!0,configurable:!0,writable:!0}),k[C]}try{c({},"")}catch{c=function(C,A,L){return C[A]=L}}function d(k,C,A,L){var O=C&&C.prototype instanceof f?C:f,P=Object.create(O.prototype),M=new I(L||[]);return n(P,"_invoke",{value:N(k,A,M)}),P}function u(k,C,A){try{return{type:"normal",arg:k.call(C,A)}}catch(L){return{type:"throw",arg:L}}}e.wrap=d;var m={};function f(){}function p(){}function v(){}var g={};c(g,i,function(){return this});var b=Object.getPrototypeOf,y=b&&b(b(R([])));y&&y!==t&&r.call(y,i)&&(g=y);var x=v.prototype=f.prototype=Object.create(g);function w(k){["next","throw","return"].forEach(function(C){c(k,C,function(A){return this._invoke(C,A)})})}function j(k,C){function A(O,P,M,D){var $=u(k[O],k,P);if($.type!=="throw"){var W=$.arg,X=W.value;return X&&typeof X=="object"&&r.call(X,"__await")?C.resolve(X.__await).then(function(q){A("next",q,M,D)},function(q){A("throw",q,M,D)}):C.resolve(X).then(function(q){W.value=q,M(W)},function(q){return A("throw",q,M,D)})}D($.arg)}var L;n(this,"_invoke",{value:function(O,P){function M(){return new C(function(D,$){A(O,P,D,$)})}return L=L?L.then(M,M):M()}})}function N(k,C,A){var L="suspendedStart";return function(O,P){if(L==="executing")throw new Error("Generator is already running");if(L==="completed"){if(O==="throw")throw P;return T()}for(A.method=O,A.arg=P;;){var M=A.delegate;if(M){var D=S(M,A);if(D){if(D===m)continue;return D}}if(A.method==="next")A.sent=A._sent=A.arg;else if(A.method==="throw"){if(L==="suspendedStart")throw L="completed",A.arg;A.dispatchException(A.arg)}else A.method==="return"&&A.abrupt("return",A.arg);L="executing";var $=u(k,C,A);if($.type==="normal"){if(L=A.done?"completed":"suspendedYield",$.arg===m)continue;return{value:$.arg,done:A.done}}$.type==="throw"&&(L="completed",A.method="throw",A.arg=$.arg)}}}function S(k,C){var A=C.method,L=k.iterator[A];if(L===void 0)return C.delegate=null,A==="throw"&&k.iterator.return&&(C.method="return",C.arg=void 0,S(k,C),C.method==="throw")||A!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+A+"' method")),m;var O=u(L,k.iterator,C.arg);if(O.type==="throw")return C.method="throw",C.arg=O.arg,C.delegate=null,m;var P=O.arg;return P?P.done?(C[k.resultName]=P.value,C.next=k.nextLoc,C.method!=="return"&&(C.method="next",C.arg=void 0),C.delegate=null,m):P:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,m)}function E(k){var C={tryLoc:k[0]};1 in k&&(C.catchLoc=k[1]),2 in k&&(C.finallyLoc=k[2],C.afterLoc=k[3]),this.tryEntries.push(C)}function _(k){var C=k.completion||{};C.type="normal",delete C.arg,k.completion=C}function I(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(E,this),this.reset(!0)}function R(k){if(k){var C=k[i];if(C)return C.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var A=-1,L=function O(){for(;++A<k.length;)if(r.call(k,A))return O.value=k[A],O.done=!1,O;return O.value=void 0,O.done=!0,O};return L.next=L}}return{next:T}}function T(){return{value:void 0,done:!0}}return p.prototype=v,n(x,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:p,configurable:!0}),p.displayName=c(v,l,"GeneratorFunction"),e.isGeneratorFunction=function(k){var C=typeof k=="function"&&k.constructor;return!!C&&(C===p||(C.displayName||C.name)==="GeneratorFunction")},e.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,v):(k.__proto__=v,c(k,l,"GeneratorFunction")),k.prototype=Object.create(x),k},e.awrap=function(k){return{__await:k}},w(j.prototype),c(j.prototype,o,function(){return this}),e.AsyncIterator=j,e.async=function(k,C,A,L,O){O===void 0&&(O=Promise);var P=new j(d(k,C,A,L),O);return e.isGeneratorFunction(C)?P:P.next().then(function(M){return M.done?M.value:P.next()})},w(x),c(x,l,"Generator"),c(x,i,function(){return this}),c(x,"toString",function(){return"[object Generator]"}),e.keys=function(k){var C=Object(k),A=[];for(var L in C)A.push(L);return A.reverse(),function O(){for(;A.length;){var P=A.pop();if(P in C)return O.value=P,O.done=!1,O}return O.done=!0,O}},e.values=R,I.prototype={constructor:I,reset:function(k){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!k)for(var C in this)C.charAt(0)==="t"&&r.call(this,C)&&!isNaN(+C.slice(1))&&(this[C]=void 0)},stop:function(){this.done=!0;var k=this.tryEntries[0].completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var C=this;function A($,W){return P.type="throw",P.arg=k,C.next=$,W&&(C.method="next",C.arg=void 0),!!W}for(var L=this.tryEntries.length-1;L>=0;--L){var O=this.tryEntries[L],P=O.completion;if(O.tryLoc==="root")return A("end");if(O.tryLoc<=this.prev){var M=r.call(O,"catchLoc"),D=r.call(O,"finallyLoc");if(M&&D){if(this.prev<O.catchLoc)return A(O.catchLoc,!0);if(this.prev<O.finallyLoc)return A(O.finallyLoc)}else if(M){if(this.prev<O.catchLoc)return A(O.catchLoc,!0)}else{if(!D)throw new Error("try statement without catch or finally");if(this.prev<O.finallyLoc)return A(O.finallyLoc)}}}},abrupt:function(k,C){for(var A=this.tryEntries.length-1;A>=0;--A){var L=this.tryEntries[A];if(L.tryLoc<=this.prev&&r.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var O=L;break}}O&&(k==="break"||k==="continue")&&O.tryLoc<=C&&C<=O.finallyLoc&&(O=null);var P=O?O.completion:{};return P.type=k,P.arg=C,O?(this.method="next",this.next=O.finallyLoc,m):this.complete(P)},complete:function(k,C){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&C&&(this.next=C),m},finish:function(k){for(var C=this.tryEntries.length-1;C>=0;--C){var A=this.tryEntries[C];if(A.finallyLoc===k)return this.complete(A.completion,A.afterLoc),_(A),m}},catch:function(k){for(var C=this.tryEntries.length-1;C>=0;--C){var A=this.tryEntries[C];if(A.tryLoc===k){var L=A.completion;if(L.type==="throw"){var O=L.arg;_(A)}return O}}throw new Error("illegal catch attempt")},delegateYield:function(k,C,A){return this.delegate={iterator:R(k),resultName:C,nextLoc:A},this.method==="next"&&(this.arg=void 0),m}},e}function $k(e,t,r,n,a,i,o){try{var l=e[i](o),c=l.value}catch(d){r(d);return}l.done?t(c):Promise.resolve(c).then(n,a)}function el(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(c){$k(i,n,a,o,l,"next",c)}function l(c){$k(i,n,a,o,l,"throw",c)}o(void 0)})}}function y3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,j3(n.key),n)}}function b3(e,t,r){return t&&Uk(e.prototype,t),r&&Uk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vf(e,t,r){return t=j3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _J(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pm(e,t)}function Em(e){return Em=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Em(e)}function Pm(e,t){return Pm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n}
761,Pm(e,t)}function w3(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yf(e,t,r){return w3()?yf=Reflect.construct.bind():yf=function(a,i,o){var l=[null];l.push.apply(l,i);var c=Function.bind.apply(a,l),d=new c;return o&&Pm(d,o.prototype),d},yf.apply(null,arguments)}function kJ(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Ib(e){var t=typeof Map=="function"?new Map:void 0;return Ib=function(n){if(n===null||!kJ(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,a)}function a(){return yf(n,arguments,Em(this).constructor)}return a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Pm(a,n)},Ib(e)}function bf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SJ(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bf(e)}function CJ(e){var t=w3();return function(){var n=Em(e),a;if(t){var i=Em(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return SJ(this,a)}}function EJ(e,t){return PJ(e)||NJ(e,t)||TJ(e,t)||AJ()}function PJ(e){if(Array.isArray(e))return e}function TJ(e,t){if(e){if(typeof e=="string")return Bk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bk(e,t)}}function Bk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function AJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 762In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IJ(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function j3(e){var t=IJ(e,"string");return typeof t=="symbol"?t:String(t)}var RJ=typeof global<"u"&&{}.toString.call(global)==="[object global]",MJ=typeof Bun<"u",OJ=typeof Deno<"u",N3=RJ||MJ||OJ;function zk(e,t){return e.indexOf(t.toLowerCase())===0?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function DJ(e){return!!(e&&e.nodeType===1&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView)}function LJ(e){return!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e}function mi(e){return/^(https?:)?\/\/((((player|www)\.)?vimeo\.com)|((player\.)?[a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))(?=$|\/)/.test(e)}function _3(e){var t=/^https:\/\/player\.((vimeo\.com)|([a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))\/video\/\d+/;return t.test(e)}function FJ(e){for(var t=(e||"").match(/^(?:https?:)?(?:\/\/)?([^/?]+)/),r=(t&&t[1]||"").replace("player.",""),n=[".videoji.hk",".vimeo.work",".videoji.cn"],a=0,i=n;a<i.length;a++){var o=i[a];if(r.endsWith(o))return r}return"vimeo.com"}function k3(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.id,r=e.url,n=t||r;if(!n)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(LJ(n))return"https://vimeo.com/".concat(n);if(mi(n))return n.replace("http:","https:");throw t?new TypeError("â".concat(t,"â is not a valid video id.")):new TypeError("â".concat(n,"â is not a vimeo.com url."))}var Wk=function(t,r,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"addEventListener",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"removeEventListener",o=typeof r=="string"?[r]:r;return o.forEach(function(l){t[a](l,n)}),{cancel:function(){return o.forEach(function(c){return t[i](c,n)})}}};function Wg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;if(!e||!t||typeof t.querySelectorAll!="function")return null;for(var r=t.querySelectorAll("iframe"),n=0;n<r.length;n++)if(r[n]&&r[n].contentWindow===e)return r[n];return null}var $J=typeof Array.prototype.indexOf<"u",UJ=typeof window<"u"&&typeof window.postMessage<"u";if(!N3&&(!$J||!UJ))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var $c=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function BJ(e,t){return t={exports:{}},e(t,t.exports),t.exports}/*! 763 * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill 764 * https://github.com/polygonplanet/weakmap-polyfill 765 * Copyright (c) 2015-2021 polygonplanet <[email protected]> 766 * @license MIT 767 */(function(e){if(e.WeakMap)return;var t=Object.prototype.hasOwnProperty,r=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{value:1}).x===1}catch{}}(),n=function(i,o,l){r?Object.defineProperty(i,o,{configurable:!0,writable:!0,value:l}):i[o]=l};e.WeakMap=function(){function i(){if(this===void 0)throw new TypeError("Constructor WeakMap requires 'new'");if(n(this,"_id",l("_WeakMap")),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}n(i.prototype,"delete",function(d){if(o(this,"delete"),!a(d))return!1;var u=d[this._id];return u&&u[0]===d?(delete d[this._id],!0):!1}),n(i.prototype,"get",function(d){if(o(this,"get"),!!a(d)){var u=d[this._id];if(u&&u[0]===d)return u[1]}}),n(i.prototype,"has",function(d){if(o(this,"has"),!a(d))return!1;var u=d[this._id];return!!(u&&u[0]===d)}),n(i.prototype,"set",function(d,u){if(o(this,"set"),!a(d))throw new TypeError("Invalid value used as weak map key");var m=d[this._id];return m&&m[0]===d?(m[1]=u,this):(n(d,this._id,[d,u]),this)});function o(d,u){if(!a(d)||!t.call(d,"_id"))throw new TypeError(u+" method called on incompatible receiver "+typeof d)}function l(d){return d+"_"+c()+"."+c()}function c(){return Math.random().toString().substring(2)}return n(i,"_polyfill",!0),i}();function a(i){return Object(i)===i}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:$c);var fn=BJ(function(e){/*! Native Promise Only 768 v0.8.1 (c) Kyle Simpson 769 MIT License: http://getify.mit-license.org 770*/(function(r,n,a){n[r]=n[r]||a(),e.exports&&(e.exports=n[r])})("Promise",$c,function(){var r,n,a,i=Object.prototype.toString,o=typeof setImmediate<"u"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(w,j,N,S){return Object.defineProperty(w,j,{value:N,writable:!0,configurable:S!==!1})}}catch{r=function(j,N,S){return j[N]=S,j}}a=function(){var w,j,N;function S(E,_){this.fn=E,this.self=_,this.next=void 0}return{add:function(_,I){N=new S(_,I),j?j.next=N:w=N,j=N,N=void 0},drain:function(){var _=w;for(w=j=n=void 0;_;)_.fn.call(_.self),_=_.next}}}();function l(x,w){a.add(x,w),n||(n=o(a.drain))}function c(x){var w,j=typeof x;return x!=null&&(j=="object"||j=="function")&&(w=x.then),typeof w=="function"?w:!1}function d(){for(var x=0;x<this.chain.length;x++)u(this,this.state===1?this.chain[x].success:this.chain[x].failure,this.chain[x]);this.chain.length=0}function u(x,w,j){var N,S;try{w===!1?j.reject(x.msg):(w===!0?N=x.msg:N=w.call(void 0,x.msg),N===j.promise?j.reject(TypeError("Promise-chain cycle")):(S=c(N))?S.call(N,j.resolve,j.reject):j.resolve(N))}catch(E){j.reject(E)}}function m(x){var w,j=this;if(!j.triggered){j.triggered=!0,j.def&&(j=j.def);try{(w=c(x))?l(function(){var N=new v(j);try{w.call(x,function(){m.apply(N,arguments)},function(){f.apply(N,arguments)})}catch(S){f.call(N,S)}}):(j.msg=x,j.state=1,j.chain.length>0&&l(d,j))}catch(N){f.call(new v(j),N)}}}function f(x){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=x,w.state=2,
770w.chain.length>0&&l(d,w))}function p(x,w,j,N){for(var S=0;S<w.length;S++)(function(_){x.resolve(w[_]).then(function(R){j(_,R)},N)})(S)}function v(x){this.def=x,this.triggered=!1}function g(x){this.promise=x,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function b(x){if(typeof x!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var w=new g(this);this.then=function(N,S){var E={success:typeof N=="function"?N:!0,failure:typeof S=="function"?S:!1};return E.promise=new this.constructor(function(I,R){if(typeof I!="function"||typeof R!="function")throw TypeError("Not a function");E.resolve=I,E.reject=R}),w.chain.push(E),w.state!==0&&l(d,w),E.promise},this.catch=function(N){return this.then(void 0,N)};try{x.call(void 0,function(N){m.call(w,N)},function(N){f.call(w,N)})}catch(j){f.call(w,j)}}var y=r({},"constructor",b,!1);return b.prototype=y,r(y,"__NPO__",0,!1),r(b,"resolve",function(w){var j=this;return w&&typeof w=="object"&&w.__NPO__===1?w:new j(function(S,E){if(typeof S!="function"||typeof E!="function")throw TypeError("Not a function");S(w)})}),r(b,"reject",function(w){return new this(function(N,S){if(typeof N!="function"||typeof S!="function")throw TypeError("Not a function");S(w)})}),r(b,"all",function(w){var j=this;return i.call(w)!="[object Array]"?j.reject(TypeError("Not an array")):w.length===0?j.resolve([]):new j(function(S,E){if(typeof S!="function"||typeof E!="function")throw TypeError("Not a function");var _=w.length,I=Array(_),R=0;p(j,w,function(k,C){I[k]=C,++R===_&&S(I)},E)})}),r(b,"race",function(w){var j=this;return i.call(w)!="[object Array]"?j.reject(TypeError("Not an array")):new j(function(S,E){if(typeof S!="function"||typeof E!="function")throw TypeError("Not a function");p(j,w,function(I,R){S(R)},E)})}),b})}),hi=new WeakMap;function nu(e,t,r){var n=hi.get(e.element)||{};t in n||(n[t]=[]),n[t].push(r),hi.set(e.element,n)}function jp(e,t){var r=hi.get(e.element)||{};return r[t]||[]}function Np(e,t,r){var n=hi.get(e.element)||{};if(!n[t])return!0;if(!r)return n[t]=[],hi.set(e.element,n),!0;var a=n[t].indexOf(r);return a!==-1&&n[t].splice(a,1),hi.set(e.element,n),n[t]&&n[t].length===0}function zJ(e,t){var r=jp(e,t);if(r.length<1)return!1;var n=r.shift();return Np(e,t,n),n}function WJ(e,t){var r=hi.get(e);hi.set(t,r),hi.delete(e)}function dh(e){if(typeof e=="string")try{e=JSON.parse(e)}catch(t){return console.warn(t),{}}return e}function Go(e,t,r){if(!(!e.element.contentWindow||!e.element.contentWindow.postMessage)){var n={method:t};r!==void 0&&(n.value=r);var a=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));a>=8&&a<10&&(n=JSON.stringify(n)),e.element.contentWindow.postMessage(n,e.origin)}}function VJ(e,t){t=dh(t);var r=[],n;if(t.event){if(t.event==="error"){var a=jp(e,t.data.method);a.forEach(function(o){var l=new Error(t.data.message);l.name=t.data.name,o.reject(l),Np(e,t.data.method,o)})}r=jp(e,"event:".concat(t.event)),n=t.data}else if(t.method){var i=zJ(e,t.method);i&&(r.push(i),n=t.value)}r.forEach(function(o){try{if(typeof o=="function"){o.call(e,n);return}o.resolve(n)}catch{}})}var HJ=["airplay","audio_tracks","audiotrack","autopause","autoplay","background","byline","cc","chapter_id","chapters","chromecast","color","colors","controls","dnt","end_time","fullscreen","height","id","initial_quality","interactive_params","keyboard","loop","maxheight","max_quality","maxwidth","min_quality","muted","play_button_position","playsinline","portrait","preload","progress_bar","quality","quality_selector","responsive","skipping_forward","speed","start_time","texttrack","thumbnail_id","title","transcript","transparent","unmute_button","url","vimeo_logo","volume","watch_full_video","width"];function S3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return HJ.reduce(function(r,n){var a=e.getAttribute("data-vimeo-".concat(n));return(a||a==="")&&(r[n]=a===""?1:a),r},t)}function Vj(e,t){var r=e.html;if(!t)throw new TypeError("An element must be provided");if(t.getAttribute("data-vimeo-initialized")!==null)return t.querySelector("iframe");var n=document.createElement("div");return n.innerHTML=r,t.appendChild(n.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function C3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return new Promise(function(n,a){if(!mi(e))throw new TypeError("â".concat(e,"â is not a vimeo.com url."));var i=FJ(e),o="https://".concat(i,"/api/oembed.json?url=").concat(encodeURIComponent(e));for(var l in t)t.hasOwnProperty(l)&&(o+="&".concat(l,"=").concat(encodeURIComponent(t[l])));var c="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;c.open("GET",o,!0),c.onload=function(){if(c.status===404){a(new Error("â".concat(e,"â was not found.")));return}if(c.status===403){a(new Error("â".concat(e,"â is not embeddable.")));return}try{var d=JSON.parse(c.responseText);if(d.domain_status_code===403){Vj(d,r),a(new Error("â".concat(e,"â is not embeddable.")));return}n(d)}catch(u){a(u)}},c.onerror=function(){var d=c.status?" (".concat(c.status,")"):"";a(new Error("There was an error fetching the embed code from Vimeo".concat(d,".")))},c.send()})}
770function qJ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),r=function(a){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(a))};t.forEach(function(n){try{if(n.getAttribute("data-vimeo-defer")!==null)return;var a=S3(n),i=k3(a);C3(i,a,n).then(function(o){return Vj(o,n)}).catch(r)}catch(o){r(o)}})}function GJ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;if(!window.VimeoPlayerResizeEmbeds_){window.VimeoPlayerResizeEmbeds_=!0;var t=function(n){if(mi(n.origin)&&!(!n.data||n.data.event!=="spacechange")){var a=n.source?Wg(n.source,e):null;if(a){var i=a.parentElement;i.style.paddingBottom="".concat(n.data.data[0].bottom,"px")}}};window.addEventListener("message",t)}}function YJ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;if(!window.VimeoSeoMetadataAppended){window.VimeoSeoMetadataAppended=!0;var t=function(n){if(mi(n.origin)){var a=dh(n.data);if(!(!a||a.event!=="ready")){var i=n.source?Wg(n.source,e):null;if(i&&_3(i.src)){var o=new Hj(i);o.callMethod("appendVideoMetadata",window.location.href)}}}};window.addEventListener("message",t)}}function KJ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;if(!window.VimeoCheckedUrlTimeParam){window.VimeoCheckedUrlTimeParam
770=!0;var t=function(a){"console"in window&&console.error&&console.error("There was an error getting video Id: ".concat(a))},r=function(a){if(mi(a.origin)){var i=dh(a.data);if(!(!i||i.event!=="ready")){var o=a.source?Wg(a.source,e):null;if(o&&_3(o.src)){var l=new Hj(o);l.getVideoId().then(function(c){var d=new RegExp("[?&]vimeo_t_".concat(c,"=([^&#]*)")).exec(window.location.href);if(d&&d[1]){var u=decodeURI(d[1]);l.setCurrentTime(u)}}).catch(t)}}}};window.addEventListener("message",r)}}function QJ(){if(!window.VimeoDRMEmbedsUpdated){window.VimeoDRMEmbedsUpdated=!0;var e=function(r){if(mi(r.origin)){var n=dh(r.data);if(!(!n||n.event!=="drminitfailed")){var a=r.source?Wg(r.source):null;if(a){var i=a.getAttribute("allow")||"",o=i.includes("encrypted-media");if(!o){a.setAttribute("allow","".concat(i,"; encrypted-media"));var l=new URL(a.getAttribute("src"));l.searchParams.set("forcereload","drm"),a.setAttribute("src",l.toString());return}}}}};window.addEventListener("message",e)}}function XJ(){var e=function(){for(var n,a=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,o=a.length,l={};i<o;i++)if(n=a[i],n&&n[1]in document){for(i=0;i<n.length;i++)l[a[0][i]]=n[i];return l}return!1}(),t={fullscreenchange:e.fullscreenchange,fullscreenerror:e.fullscreenerror},r={request:function(a){return new Promise(function(i,o){var l=function d(){r.off("fullscreenchange",d),i()};r.on("fullscreenchange",l),a=a||document.documentElement;var c=a[e.requestFullscreen]();c instanceof Promise&&c.then(l).catch(o)})},exit:function(){return new Promise(function(a,i){if(!r.isFullscreen){a();return}var o=function c(){r.off("fullscreenchange",c),a()};r.on("fullscreenchange",o);var l=document[e.exitFullscreen]();l instanceof Promise&&l.then(o).catch(i)})},on:function(a,i){var o=t[a];o&&document.addEventListener(o,i)},off:function(a,i){var o=t[a];o&&document.removeEventListener(o,i)}};return Object.defineProperties(r,{isFullscreen:{get:function(){return!!document[e.fullscreenElement]}},element:{enumerable:!0,get:function(){return document[e.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!document[e.fullscreenEnabled]}}}),r}var JJ={role:"viewer",autoPlayMuted:!0,allowedDrift:.3,maxAllowedDrift:1,minCheckInterval:.1,maxRateAdjustment:.2,maxTimeToCatchUp:1},ZJ=function(e){_J(r,e);var t=CJ(r);function r(n,a){var i,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;return y3(this,r),i=t.call(this),vf(bf(i),"logger",void 0),vf(bf(i),"speedAdjustment",0),vf(bf(i),"adjustSpeed",function(){var c=el(cr().mark(function d(u,m){var f;return cr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(i.speedAdjustment!==m){v.next=2;break}return v.abrupt("return");case 2:return v.next=4,u.getPlaybackRate();case 4:return v.t0=v.sent,v.t1=i.speedAdjustment,v.t2=v.t0-v.t1,v.t3=m,f=v.t2+v.t3,i.log("New playbackRate: ".concat(f)),v.next=12,u.setPlaybackRate(f);case 12:i.speedAdjustment=m;case 13:case"end":return v.stop()}},d)}));return function(d,u){return c.apply(this,arguments)}}()),i.logger=l,i.init(a,n,Fk(Fk({},JJ),o)),i}return b3(r,[{key:"disconnect",value:function(){this.dispatchEvent(new Event("disconnect"))}},{key:"init",value:function(){var n=el(cr().mark(function i(o,l,c){var d=this,u,m,f;return cr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,this.waitForTOReadyState(o,"open");case 2:if(c.role!=="viewer"){v.next=10;break}return v.next=5,this.updatePlayer(o,l,c);case 5:u=Wk(o,"change",function(){return d.updatePlayer(o,l,c)}),m=this.maintainPlaybackPosition(o,l,c),this.addEventListener("disconnect",function(){m.cancel(),u.cancel()}),v.next=14;break;case 10:return v.next=12,this.updateTimingObject(o,l);case 12:f=Wk(l,["seeked","play","pause","ratechange"],function(){return d.updateTimingObject(o,l)},"on","off"),this.addEventListener("disconnect",function(){return f.cancel()});case 14:case"end":return v.stop()}},i,this)}));function a(i,o,l){return n.apply(this,arguments)}return a}()},{key:"updateTimingObject",value:function(){var n=el(cr().mark(function i(o,l){var c,d,u,m,f;return cr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,Promise.all([l.getCurrentTime(),l.getPaused(),l.getPlaybackRate()]);case 2:c=v.sent,d=EJ(c,3),u=d[0],m=d[1],f=d[2],o.update({position:u,velocity:m?0:f});case 8:case"end":return v.stop()}},i)}));function a(i,o){return n.apply(this,arguments)}return a}()},{key:"updatePlayer",value:function(){var n=el(cr().mark(function i(o,l,c){var d,u,m;return cr().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(d=o.query(),u=d.position,m=d.velocity,typeof u=="number"&&l.setCurrentTime(u),typeof m!="number"){p.next=25;break}if(m!==0){p.next=11;break}return p.next=6,l.getPaused();case 6:if(p.t0=p.sent,p.t0!==!1){p.next=9;break}l.pause();case 9:p.next=25;break;case 11:if(!(m>0)){p.next=25;break}return p.next=14,l.getPaused();case 14:if(p.t1=p.sent,p.t1!==!0){p.next=19;break}return p.next=18,l.play().catch(function(){var v=el(cr().mark(function g(b){return cr().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(!(b.name==="NotAllowedError"&&c.autoPlayMuted)){x.next=5;break}return x.next=3,l.setMuted(!0);case 3:return x.next=5,l.play().catch(function(w){return console.error("Couldn't play the video from TimingSrcConnector. Error:",w)});case 5:case"end":return x.stop()}},g)}));return function(g){return v.apply(this,arguments)}}());case 18:this.updatePlayer(o,l,c);case 19:return p.next=21,l.getPlaybackRate();
770case 21:if(p.t2=p.sent,p.t3=m,p.t2===p.t3){p.next=25;break}l.setPlaybackRate(m);case 25:case"end":return p.stop()}},i,this)}));function a(i,o,l){return n.apply(this,arguments)}return a}()},{key:"maintainPlaybackPosition",value:function(a,i,o){var l=this,c=o.allowedDrift,d=o.maxAllowedDrift,u=o.minCheckInterval,m=o.maxRateAdjustment,f=o.maxTimeToCatchUp,p=Math.min(f,Math.max(u,d))*1e3,v=function(){var b=el(cr().mark(function y(){var x,w,j,N,S;return cr().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(_.t0=a.query().velocity===0,_.t0){_.next=6;break}return _.next=4,i.getPaused();case 4:_.t1=_.sent,_.t0=_.t1===!0;case 6:if(!_.t0){_.next=8;break}return _.abrupt("return");case 8:return _.t2=a.query().position,_.next=11,i.getCurrentTime();case 11:if(_.t3=_.sent,x=_.t2-_.t3,w=Math.abs(x),l.log("Drift: ".concat(x)),!(w>d)){_.next=22;break}return _.next=18,l.adjustSpeed(i,0);case 18:i.setCurrentTime(a.query().position),l.log("Resync by currentTime"),_.next=29;break;case 22:if(!(w>c)){_.next=29;break}return j=w/f,N=m,S=j<N?(N-j)/2:N,_.next=28,l.adjustSpeed(i,S*Math.sign(x));case 28:l.log("Resync by playbackRate");case 29:case"end":return _.stop()}},y)}));return function(){return b.apply(this,arguments)}}(),g=setInterval(function(){return v()},p);return{cancel:function(){return clearInterval(g)}}}},{key:"log",value:function(a){var i;(i=this.logger)===null||i===void 0||i.call(this,"TimingSrcConnector: ".concat(a))}},{key:"waitForTOReadyState",value:function(a,i){return new Promise(function(o){var l=function c(){a.readyState===i?o():a.addEventListener("readystatechange",c,{once:!0})};l()})}}]),r}(Ib(EventTarget)),cc=new WeakMap,ov=new WeakMap,_r={},Hj=function(){function e(t){var r=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(y3(this,e),window.jQuery&&t instanceof jQuery&&(t.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),t=t[0]),typeof document<"u"&&typeof t=="string"&&(t=document.getElementById(t)),!DJ(t))throw new TypeError("You must pass either a valid element or a valid id.");if(t.nodeName!=="IFRAME"){var a=t.querySelector("iframe");a&&(t=a)}if(t.nodeName==="IFRAME"&&!mi(t.getAttribute("src")||""))throw new Error("The player element passed isnât a Vimeo embed.");if(cc.has(t))return cc.get(t);this._window=t.ownerDocument.defaultView,this.element=t,this.origin="*";var i=new fn(function(l,c){if(r._onMessage=function(m){if(!(!mi(m.origin)||r.element.contentWindow!==m.source)){r.origin==="*"&&(r.origin=m.origin);var f=dh(m.data),p=f&&f.event==="error",v=p&&f.data&&f.data.method==="ready";if(v){var g=new Error(f.data.message);g.name=f.data.name,c(g);return}var b=f&&f.event==="ready",y=f&&f.method==="ping";if(b||y){r.element.setAttribute("data-ready","true"),l();return}VJ(r,f)}},r._window.addEventListener("message",r._onMessage),r.element.nodeName!=="IFRAME"){var d=S3(t,n),u=k3(d);C3(u,d,t).then(function(m){var f=Vj(m,t);return r.element=f,r._originalElement=t,WJ(t,f),cc.set(r.element,r),m}).catch(c)}});if(ov.set(this,i),cc.set(this.element,this),this.element.nodeName==="IFRAME"&&Go(this,"ping"),_r.isEnabled){var o=function(){return _r.exit()};this.fullscreenchangeHandler=function(){_r.isFullscreen?nu(r,"event:exitFullscreen",o):Np(r,"event:exitFullscreen",o),r.ready().then(function(){Go(r,"fullscreenchange",_r.isFullscreen)})},_r.on("fullscreenchange",this.fullscreenchangeHandler)}return this}return b3(e,[{key:"callMethod",value:function(r){for(var n=this,a=arguments.length,i=new Array(a>1?a-1:0),o=1;o<a;o++)i[o-1]=arguments[o];if(r==null)throw new TypeError("You must pass a method name.");return new fn(function(l,c){return n.ready().then(function(){nu(n,r,{resolve:l,reject:c}),i.length===0?i={}:i.length===1&&(i=i[0]),Go(n,r,i)}).catch(c)})}},{key:"get",value:function(r){var n=this;return new fn(function(a,i){return r=zk(r,"get"),n.ready().then(function(){nu(n,r,{resolve:a,reject:i}),Go(n,r)}).catch(i)})}},{key:"set",value:function(r,n){var a=this;return new fn(function(i,o){if(r=zk(r,"set"),n==null)throw new TypeError("There must be a value to set.");return a.ready().then(function(){nu(a,r,{resolve:i,reject:o}
770),Go(a,r,n)}).catch(o)})}},{key:"on",value:function(r,n){if(!r)throw new TypeError("You must pass an event name.");if(!n)throw new TypeError("You must pass a callback function.");if(typeof n!="function")throw new TypeError("The callback must be a function.");var a=jp(this,"event:".concat(r));a.length===0&&this.callMethod("addEventListener",r).catch(function(){}),nu(this,"event:".concat(r),n)}},{key:"off",value:function(r,n){if(!r)throw new TypeError("You must pass an event name.");if(n&&typeof n!="function")throw new TypeError("The callback must be a function.");var a=Np(this,"event:".concat(r),n);a&&this.callMethod("removeEventListener",r).catch(function(i){})}},{key:"loadVideo",value:function(r){return this.callMethod("loadVideo",r)}},{key:"ready",value:function(){var r=ov.get(this)||new fn(function(n,a){a(new Error("Unknown player. Probably unloaded."))});return fn.resolve(r)}},{key:"addCuePoint",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.callMethod("addCuePoint",{time:r,data:n})}},{key:"removeCuePoint",value:function(r){return this.callMethod("removeCuePoint",r)}},{key:"enableTextTrack",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!r)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:r,kind:n,showing:a})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"selectAudioTrack",value:function(r,n){if(!r)throw new TypeError("You must pass a language.");return this.callMethod("selectAudioTrack",{language:r,kind:n})}},{key:"selectDefaultAudioTrack",value:function(){return this.callMethod("selectDefaultAudioTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return _r.isEnabled?_r.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return _r.isEnabled?_r.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return _r.isEnabled?fn.resolve(_r.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"remotePlaybackPrompt",value:function(){return this.callMethod("remotePlaybackPrompt")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var r=this;return new fn(function(n){if(ov.delete(r),cc.delete(r.element),r._originalElement&&(cc.delete(r._originalElement),r._originalElement.removeAttribute("data-vimeo-initialized")),r.element&&r.element.nodeName==="IFRAME"&&r.element.parentNode&&(r.element.parentNode.parentNode&&r._originalElement&&r._originalElement!==r.element.parentNode?r.element.parentNode.parentNode.removeChild(r.element.parentNode):r.element.parentNode.removeChild(r.element)),r.element&&r.element.nodeName==="DIV"&&r.element.parentNode){r.element.removeAttribute("data-vimeo-initialized");var a=r.element.querySelector("iframe");a&&a.parentNode&&(a.parentNode.parentNode&&r._originalElement&&r._originalElement!==a.parentNode?a.parentNode.parentNode.removeChild(a.parentNode):a.parentNode.removeChild(a))}r._window.removeEventListener("message",r._onMessage),_r.isEnabled&&_r.off("fullscreenchange",r.fullscreenchangeHandler),n()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(r){return this.set("autopause",r)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(r){return this.set("cameraProps",r)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"getColors",value:function(){return fn.all([this.get("colorOne"),this.get("colorTwo"),this.get("colorThree"),this.get("colorFour")])}},{key:"setColor",value:function(r){return this.set("color",r)}},{key:"setColors",value:function(r){if(!Array.isArray(r))return new fn(function(i,o){return o(new TypeError("Argument must be an array."))});var n=new fn(function(i){return i(null)}),a=[r[0]?this.set("colorOne",r[0]):n,r[1]?this.set("colorTwo",r[1]):n,r[2]?this.set("colorThree",r[2]):n,r[3]?this.set("colorFour",r[3]):n];return fn.all(a)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(r){return this.set("currentTime",r)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(r){return this.set("loop",r)}},{key:"setMuted",value:function(r){return this.set("muted",r)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(r){return this.set("playbackRate",r)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}
770},{key:"setQuality",value:function(r){return this.set("quality",r)}},{key:"getRemotePlaybackAvailability",value:function(){return this.get("remotePlaybackAvailability")}},{key:"getRemotePlaybackState",value:function(){return this.get("remotePlaybackState")}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getAudioTracks",value:function(){return this.get("audioTracks")}},{key:"getEnabledAudioTrack",value:function(){return this.get("enabledAudioTrack")}},{key:"getDefaultAudioTrack",value:function(){return this.get("defaultAudioTrack")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(r){return this.set("volume",r)}},{key:"setTimingSrc",value:function(){var t=el(cr().mark(function n(a,i){var o=this,l;return cr().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(a){d.next=2;break}throw new TypeError("A Timing Object must be provided.");case 2:return d.next=4,this.ready();case 4:return l=new ZJ(this,a,i),Go(this,"notifyTimingObjectConnect"),l.addEventListener("disconnect",function(){return Go(o,"notifyTimingObjectDisconnect")}),d.abrupt("return",l);case 8:case"end":return d.stop()}},n,this)}));function r(n,a){return t.apply(this,arguments)}return r}()}],[{key:"isVimeoUrl",value:function(r){return mi(r)}}]),e}();N3||(_r=XJ(),qJ(),GJ(),YJ(),KJ(),QJ());const eZ=5e3,tZ=7,sZ=(e,t)=>{const{user:r}=jt(),n=h.useRef(null),a=h.useRef(null),i=h.useRef(0),o=()=>{const m=(r==null?void 0:r.id)||"anonymous";return`video_progress_${e}_${m}`},l=(m,f)=>{if(!e)return;const p={position:m,duration:f,savedAt:Date.now()};try{localStorage.setItem(o(),JSON.stringify(p))}catch(v){console.error("Failed to save video progress:",v)}},c=()=>{if(!e)return null;try{const m=localStorage.getItem(o());if(!m)return null;const f=JSON.parse(m);return Date.now()-f.savedAt>tZ*24*60*60*1e3?(localStorage.removeItem(o()),null):f}catch(m){return console.error("Failed to load video progress:",m),null}},d=()=>{if(e)try{localStorage.removeItem(o())}catch(m){console.error("Failed to clear video progress:",m)}},u=m=>{const f=Math.floor(m/60),p=Math.floor(m%60);return`${f}:${p.toString().padStart(2,"0")}`};return h.useEffect(()=>{if(!e)return;const f=setTimeout(async()=>{const v=document.getElementById(t);if(console.log("ð¬ Looking for iframe:",t),!v){console.error("â Vimeo iframe not found:",t);return}console.log("â
Iframe found:",v);try{const g=new Hj(v);n.current=g,console.log("â
Vimeo Player initialized");const b=c();console.log("ð¼ Saved progress:",b),b&&b.position>10&&(console.log("â© Resuming from:",u(b.position)),await g.setCurrentTime(b.position),ad({title:"Resuming video",description:`Continuing from ${u(b.position)}`,duration:3e3})),g.on("timeupdate",async y=>{i.current=y.seconds}),g.on("pause",async()=>{const y=await g.getDuration();console.log("â¸ï¸ Saving on pause at:",u(i.current)),l(i.current,y)}),g.on("ended",()=>{d()}),a.current=setInterval(async()=>{try{const y=await g.getDuration();i.current/y<.95&&l(i.current,y)}catch(y){console.error("Error in save interval:",y)}},eZ)}catch(g){console.error("Failed to initialize Vimeo player:",g)}},500),p=async()=>{if(document.hidden&&n.current){console.log("ð Tab hidden, saving progress at:",u(i.current));try{const v=await n.current.getDuration();l(i.current,v)}catch(v){console.error("Failed to save on visibility change:",v)}}};return document.addEventListener("visibilitychange",p),()=>{clearTimeout(f),document.removeEventListener("visibilitychange",p),a.current&&clearInterval(a.current),n.current&&(n.current.getDuration().then(v=>{l(i.current,v)}).catch(console.error),n.current.destroy())}},[e,t]),{playerRef:n}};/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:E3,setPrototypeOf:Vk,isFrozen:rZ,getPrototypeOf:nZ,getOwnPropertyDescriptor:aZ}=Object;let{freeze:vr,seal:Pn,create:Rb}=Object,{apply:Mb,construct:Ob}=typeof Reflect<"u"&&Reflect;vr||(vr=function(t){return t});Pn||(Pn=function(t){return t});Mb||(Mb=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];return t.apply(r,a)});Ob||(Ob=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return new t(...n)});const Gh=yr(Array.prototype.forEach),iZ=yr(Array.prototype.lastIndexOf),Hk=yr(Array.prototype.pop),au=yr(Array.prototype.push),oZ=yr(Array.prototype.splice),wf=yr(String.prototype.toLowerCase),lv=yr(String.prototype.toString),cv=yr(String.prototype.match),iu=yr(String.prototype.replace),lZ=yr(String.prototype.indexOf),cZ=yr(String.prototype.trim),Bn=yr(Object.prototype.hasOwnProperty),lr=yr(RegExp.prototype.test),ou=dZ(TypeError);function yr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return Mb(e,t,n)}}function dZ(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ob(e,r)}}function ft(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wf;Vk&&Vk(e,null);let n=t.length;for(;n--;){let a=t[n];
vendor: 6,864 bytes, line 770
770if(typeof a=="string"){const i=r(a);i!==a&&(rZ(t)||(t[n]=i),a=i)}e[a]=!0}return e}function uZ(e){for(let t=0;t<e.length;t++)Bn(e,t)||(e[t]=null);return e}function Xa(e){const t=Rb(null);for(const[r,n]of E3(e))Bn(e,r)&&(Array.isArray(n)?t[r]=uZ(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=Xa(n):t[r]=n);return t}function lu(e,t){for(;e!==null;){const n=aZ(e,t);if(n){if(n.get)return yr(n.get);if(typeof n.value=="function")return yr(n.value)}e=nZ(e)}function r(){return null}return r}const qk=vr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dv=vr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),uv=vr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),mZ=vr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mv=vr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hZ=vr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Gk=vr(["#text"]),Yk=vr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),hv=vr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Kk=vr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","
770subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Yh=vr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fZ=Pn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),pZ=Pn(/<%[\w\W]*|[\w\W]*%>/gm),gZ=Pn(/\$\{[\w\W]*/gm),xZ=Pn(/^data-[\-\w.\u00B7-\uFFFF]+$/),vZ=Pn(/^aria-[\-\w]+$/),P3=Pn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yZ=Pn(/^(?:\w+script|data):/i),bZ=Pn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),T3=Pn(/^html$/i),wZ=Pn(/^[a-z][.\w]*(-[.\w]+)+$/i);var Qk=Object.freeze({__proto__:null,ARIA_ATTR:vZ,ATTR_WHITESPACE:bZ,CUSTOM_ELEMENT:wZ,DATA_ATTR:xZ,DOCTYPE_NAME:T3,ERB_EXPR:pZ,IS_ALLOWED_URI:P3,IS_SCRIPT_OR_DATA:yZ,MUSTACHE_EXPR:fZ,TMPLIT_EXPR:gZ});const cu={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},jZ=function(){return typeof window>"u"?null:window},NZ=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(n=r.getAttribute(a));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Xk=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function A3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jZ();const t=We=>A3(We);if(t.version="3.3.0",t.removed=[],!e||!e.document||e.document.nodeType!==cu.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,a=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:m,DOMParser:f,trustedTypes:p}=e,v=c.prototype,g=lu(v,"cloneNode"),b=lu(v,"remove"),y=lu(v,"nextSibling"),x=lu(v,"childNodes"),w=lu(v,"parentNode");if(typeof o=="function"){const We=r.createElement("template");We.content&&We.content.ownerDocument&&(r=We.content.ownerDocument)}let j,N="";const{implementation:S,createNodeIterator:E,createDocumentFragment:_,getElementsByTagName:I}=r,{importNode:R}=n;let T=Xk();t.isSupported=typeof E3=="function"&&typeof w=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:k,ERB_EXPR:C,TMPLIT_EXPR:A,DATA_ATTR:L,ARIA_ATTR:O,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:D}=Qk;let{IS_ALLOWED_URI:$}=Qk,W=null;const X=ft({},[...qk,...dv,...uv,...mv,...Gk]);let q=null;const H=ft({},[...Yk,...hv,...Kk,...Yh]);let se=Object.seal(Rb(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,B=null;const le=Object.seal(Rb(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let J=!0,K=!0,Z=!1,re=!0,de=!1,Pe=!0,Ee=!1,tt=!1,ze=!1,et=!1,st=!1,z=!1,Y=!0,ne=!1;const fe="user-content-";let ee=!0,ae=!1,ge={},Ue=null;const Ze=ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let bt=null;const Ft=ft({},["audio","video","img","source","image","track"]);let Nt=null;const Hs=ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Jt="http://www.w3.org/1998/Math/MathML",_s="http://www.w3.org/2000/svg",Ts="http://www.w3.org/1999/xhtml";let xs=Ts,In=!1,mn=null;const Wa=ft({},[Jt,_s,Ts],lv);let Rn=ft({},["mi","mo","mn","ms","mtext"]),Mn=ft({},["annotation-xml"]);const ua=ft({},["title","style","font","a","script"]);let os=null;const Yr=["application/xhtml+xml","text/html"],Ge="text/html";let He=null,Ve=null;const qs=r.createElement("form"),Gs=function(G){return G instanceof RegExp||G instanceof Function},V=function(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ve&&Ve===G)){if((!G||typeof G!="object")&&(G={}
vendor: 11,039 bytes, lines 770-771
770),G=Xa(G),os=Yr.indexOf(G.PARSER_MEDIA_TYPE)===-1?Ge:G.PARSER_MEDIA_TYPE,He=os==="application/xhtml+xml"?lv:wf,W=Bn(G,"ALLOWED_TAGS")?ft({},G.ALLOWED_TAGS,He):X,q=Bn(G,"ALLOWED_ATTR")?ft({},G.ALLOWED_ATTR,He):H,mn=Bn(G,"ALLOWED_NAMESPACES")?ft({},G.ALLOWED_NAMESPACES,lv):Wa,Nt=Bn(G,"ADD_URI_SAFE_ATTR")?ft(Xa(Hs),G.ADD_URI_SAFE_ATTR,He):Hs,bt=Bn(G,"ADD_DATA_URI_TAGS")?ft(Xa(Ft),G.ADD_DATA_URI_TAGS,He):Ft,Ue=Bn(G,"FORBID_CONTENTS")?ft({},G.FORBID_CONTENTS,He):Ze,te=Bn(G,"FORBID_TAGS")?ft({},G.FORBID_TAGS,He):Xa({}),B=Bn(G,"FORBID_ATTR")?ft({},G.FORBID_ATTR,He):Xa({}),ge=Bn(G,"USE_PROFILES")?G.USE_PROFILES:!1,J=G.ALLOW_ARIA_ATTR!==!1,K=G.ALLOW_DATA_ATTR!==!1,Z=G.ALLOW_UNKNOWN_PROTOCOLS||!1,re=G.ALLOW_SELF_CLOSE_IN_ATTR!==!1,de=G.SAFE_FOR_TEMPLATES||!1,Pe=G.SAFE_FOR_XML!==!1,Ee=G.WHOLE_DOCUMENT||!1,et=G.RETURN_DOM||!1,st=G.RETURN_DOM_FRAGMENT||!1,z=G.RETURN_TRUSTED_TYPE||!1,ze=G.FORCE_BODY||!1,Y=G.SANITIZE_DOM!==!1,ne=G.SANITIZE_NAMED_PROPS||!1,ee=G.KEEP_CONTENT!==!1,ae=G.IN_PLACE||!1,$=G.ALLOWED_URI_REGEXP||P3,xs=G.NAMESPACE||Ts,Rn=G.MATHML_TEXT_INTEGRATION_POINTS||Rn,Mn=G.HTML_INTEGRATION_POINTS||Mn,se=G.CUSTOM_ELEMENT_HANDLING||{},G.CUSTOM_ELEMENT_HANDLING&&Gs(G.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(se.tagNameCheck=G.CUSTOM_ELEMENT_HANDLING.tagNameCheck),G.CUSTOM_ELEMENT_HANDLING&&Gs(G.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(se.attributeNameCheck=G.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),G.CUSTOM_ELEMENT_HANDLING&&typeof G.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=G.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),de&&(K=!1),st&&(et=!0),ge&&(W=ft({},Gk),q=[],ge.html===!0&&(ft(W,qk),ft(q,Yk)),ge.svg===!0&&(ft(W,dv),ft(q,hv),ft(q,Yh)),ge.svgFilters===!0&&(ft(W,uv),ft(q,hv),ft(q,Yh)),ge.mathMl===!0&&(ft(W,mv),ft(q,Kk),ft(q,Yh))),G.ADD_TAGS&&(typeof G.ADD_TAGS=="function"?le.tagCheck=G.ADD_TAGS:(W===X&&(W=Xa(W)),ft(W,G.ADD_TAGS,He))),G.ADD_ATTR&&(typeof G.ADD_ATTR=="function"?le.attributeCheck=G.ADD_ATTR:(q===H&&(q=Xa(q)),ft(q,G.ADD_ATTR,He))),G.ADD_URI_SAFE_ATTR&&ft(Nt,G.ADD_URI_SAFE_ATTR,He),G.FORBID_CONTENTS&&(Ue===Ze&&(Ue=Xa(Ue)),ft(Ue,G.FORBID_CONTENTS,He)),ee&&(W["#text"]=!0),Ee&&ft(W,["html","head","body"]),W.table&&(ft(W,["tbody"]),delete te.tbody),G.TRUSTED_TYPES_POLICY){if(typeof G.TRUSTED_TYPES_POLICY.createHTML!="function")throw ou('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof G.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ou('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');j=G.TRUSTED_TYPES_POLICY,N=j.createHTML("")}else j===void 0&&(j=NZ(p,a)),j!==null&&typeof N=="string"&&(N=j.createHTML(""));vr&&vr(G),Ve=G}},ue=ft({},[...dv,...uv,...mZ]),ve=ft({},[...mv,...hZ]),Ke=function(G){let je=w(G);(!je||!je.tagName)&&(je={namespaceURI:xs,tagName:"template"});const Le=wf(G.tagName),Ht=wf(je.tagName);return mn[G.namespaceURI]?G.namespaceURI===_s?je.namespaceURI===Ts?Le==="svg":je.namespaceURI===Jt?Le==="svg"&&(Ht==="annotation-xml"||Rn[Ht]):!!ue[Le]:G.namespaceURI===Jt?je.namespaceURI===Ts?Le==="math":je.namespaceURI===_s?Le==="math"&&Mn[Ht]:!!ve[Le]:G.namespaceURI===Ts?je.namespaceURI===_s&&!Mn[Ht]||je.namespaceURI===Jt&&!Rn[Ht]?!1:!ve[Le]&&(ua[Le]||!ue[Le]):!!(os==="application/xhtml+xml"&&mn[G.namespaceURI]):!1},dt=function(G){au(t.removed,{element:G});try{w(G).removeChild(G)}catch{b(G)}},Et=function(G,je){try{au(t.removed,{attribute:je.getAttributeNode(G),from:je})}catch{au(t.removed,{attribute:null,from:je})}if(je.removeAttribute(G),G==="is")if(et||st)try{dt(je)}catch{}else try{je.setAttribute(G,"")}catch{}},Mt=function(G){let je=null,Le=null;if(ze)G="<remove></remove>"+G;else{const ys=cv(G,/^[\r\n\t ]+/);Le=ys&&ys[0]}os==="application/xhtml+xml"&&xs===Ts&&(G='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+G+"</body></html>");const Ht=j?j.createHTML(G):G;if(xs===Ts)try{je=new f().parseFromString(Ht,os)}catch{}if(!je||!je.documentElement){je=S.createDocument(xs,"template",null);try{je.documentElement.innerHTML=In?N:Ht}catch{}}const Ys=je.body||je.documentElement;return G&&Le&&Ys.insertBefore(r.createTextNode(Le),Ys.childNodes[0]||null),xs===Ts?I.call(je,Ee?"html":"body")[0]:Ee?je.documentElement:Ys},Ot=function(G){return E.call(G.ownerDocument||G,G,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},As=function(G){return G instanceof m&&(typeof G.nodeName!="string"||typeof G.textContent!="string"||typeof G.removeChild!="function"||!(G.attributes instanceof u)||typeof G.removeAttribute!="function"||typeof G.setAttribute!="function"||typeof G.namespaceURI!="string"||typeof G.insertBefore!="function"||typeof G.hasChildNodes!="function")},On=function(G){return typeof l=="function"&&G instanceof l};function ct(We,G,je){Gh(We,Le=>{Le.call(t,G,je,Ve)})}const ls=function(G){let je=null;if(ct(T.beforeSanitizeElements,G,null),As(G))return dt(G),!0;const Le=He(G.nodeName);if(ct(T.uponSanitizeElement,G,{tagName:Le,allowedTags:W}),Pe&&G.hasChildNodes()&&!On(G.firstElementChild)&&lr(/<[/\w!]/g,G.innerHTML)&&lr(/<[/\w!]/g,G.textContent)||G.nodeType===cu.progressingInstruction||Pe&&G.nodeType===cu.comment&&lr(/<[/\w]/g,G.data))return dt(G),!0;if(!(le.tagCheck instanceof Function&&le.tagCheck(Le))&&(!W[Le]||te[Le])){if(!te[Le]&&vs(Le)&&(se.tagNameCheck instanceof RegExp&&lr(se.tagNameCheck,Le)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Le)))return!1;if(ee&&!Ue[Le]){const Ht=w(G)||G.parentNode,Ys=x(G)||G.childNodes;if(Ys&&Ht){const ys=Ys.length;for(let Nr=ys-1;Nr>=0;--Nr){const Ha=g(Ys[Nr],!0);Ha.__removalCount=(G.__removalCount||0)+1,Ht.insertBefore(Ha,y(G))}}}return dt(G),!0}return G instanceof c&&!Ke(G)||(Le==="noscript"||Le==="noembed"||Le==="noframes")&&lr(/<\/no(script|embed|frames)/i,G.innerHTML)?(dt(G),!0):(de&&G.nodeType===cu.text&&(je=G.textContent,Gh([k,C,A],Ht=>{je=iu(je,Ht," ")}),G.textContent!==je&&(au(t.removed,{element:G.cloneNode()}),G.textContent=je)),ct(T.afterSanitizeElements,G,null),!1)},ir=function(G,je,Le){if(Y&&(je==="id"||je==="name")&&(Le in r||Le in qs))return!1;if(!(K&&!B[je]&&lr(L,je))){if(!(J&&lr(O,je))){if(!(le.attributeCheck instanceof Function&&le.attributeCheck(je,G))){if(!q[je]||B[je]){if(!(vs(G)&&(se.tagNameCheck instanceof RegExp&&lr(se.tagNameCheck,G)||se.tagNameCheck instanceof Function&&se.tagNameCheck(G))&&(se.attributeNameCheck instanceof RegExp&&lr(se.attributeNameCheck,je)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(je,G))||je==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&lr(se.tagNameCheck,Le)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Le))))return!1}else if(!Nt[je]){if(!lr($,iu(Le,M,""))){if(!((je==="src"||je==="xlink:href"||je==="href")&&G!=="script"&&lZ(Le,"data:")===0&&bt[G])){if(!(Z&&!lr(P,iu(Le,M,"")))){if(Le)return!1}}}}}}}return!0},vs=function(G){return G!=="annotation-xml"&&cv(G,D)},Va=function(G){ct(T.beforeSanitizeAttributes,G,null);const{attributes:je}=G;if(!je||As(G))return;const Le={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0};let Ht=je.length;for(;Ht--;){const Ys=je[Ht],{name:ys,namespaceURI:Nr,value:Ha}=Ys,Ql=He(ys),qg=Ha;let Us=ys==="value"?qg:cZ(qg);if(Le.attrName=Ql,Le.attrValue=Us,Le.keepAttr=!0,Le.forceKeepAttr=void 0,ct(T.uponSanitizeAttribute,G,Le),Us=Le.attrValue,ne&&(Ql==="id"||Ql==="name")&&(Et(ys,G),Us=fe+Us),Pe&&lr(/((--!?|])>)|<\/(style|title|textarea)/i,Us)){Et(ys,G);continue}if(Ql==="attributename"&&cv(Us,"href")){Et(ys,G);continue}if(Le.forceKeepAttr)continue;if(!Le.keepAttr){Et(ys,G);continue}if(!re&&lr(/\/>/i,Us)){Et(ys,G);continue}de&&Gh([k,C,A],tN=>{Us=iu(Us,tN," ")});const eN=He(G.nodeName);if(!ir(eN,Ql,Us)){Et(ys,G);continue}if(j&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Nr)switch(p.getAttributeType(eN,Ql)){case"TrustedHTML":{Us=j.createHTML(Us);break}case"TrustedScriptURL":{Us=j.createScriptURL(Us);break}}if(Us!==qg)try{Nr?G.setAttributeNS(Nr,ys,Us):G.setAttribute(ys,Us),As(G)?dt(G):Hk(t.removed)}catch{Et(ys,G)}}ct(T.afterSanitizeAttributes,G,null)},Dn=function We(G){let je=null;const Le=Ot(G);for(ct(T.beforeSanitizeShadowDOM,G,null);je=Le.nextNode();)ct(T.uponSanitizeShadowNode,je,null),ls(je),Va(je),je.content instanceof i&&We(je.content);ct(T.afterSanitizeShadowDOM,G,null)};return t.sanitize=function(We){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=null,Le=null,Ht=null,Ys=null;if(In=!We,In&&(We="<!-->"),typeof We!="string"&&!On(We))if(typeof We.toString=="function"){if(We=We.toString(),typeof We!="string")throw ou("dirty is not a string, aborting")}else throw ou("toString is not a function");if(!t.isSupported)return We;if(tt||V(G),t.removed=[],typeof We=="string"&&(ae=!1),ae){if(We.nodeName){const Ha=He(We.nodeName);if(!W[Ha]||te[Ha])throw ou("root node is forbidden and cannot be sanitized in-place")}}else if(We instanceof l)je=Mt("<!---->"),Le=je.ownerDocument.importNode(We,!0),Le.nodeType===cu.element&&Le.nodeName==="BODY"||Le.nodeName==="HTML"?je=Le:je.appendChild(Le);else{if(!et&&!de&&!Ee&&We.indexOf("<")===-1)return j&&z?j.createHTML(We):We;if(je=Mt(We),!je)return et?null:z?N:""}je&&ze&&dt(je.firstChild);const ys=Ot(ae?We:je);for(;Ht=ys.nextNode();)ls(Ht),Va(Ht),Ht.content instanceof i&&Dn(Ht.content);if(ae)return We;if(et){if(st)for(Ys=_.call(je.ownerDocument);je.firstChild;)Ys.appendChild(je.firstChild);else Ys=je;return(q.shadowroot||q.shadowrootmode)&&(Ys=R.call(n,Ys,!0)),Ys}let Nr=Ee?je.outerHTML:je.innerHTML;return Ee&&W["!doctype"]&&je.ownerDocument&&je.ownerDocument.doctype&&je.ownerDocument.doctype.name&&lr(T3,je.ownerDocument.doctype.name)&&(Nr="<!DOCTYPE "+je.ownerDocument.doctype.name+`> 771`+Nr),de&&Gh([k,C,A],Ha=>{Nr=iu(Nr,Ha," ")}),j&&z?j.createHTML(Nr):Nr},t.setConfig=function(){let We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};V(We),tt=!0},t.clearConfig=function(){Ve=null,tt=!1},t.isValidAttribute=function(We,G,je){Ve||V({});const Le=He(We),Ht=He(G);return ir(Le,Ht,je)},t.addHook=function(We,G){typeof G=="function"&&au(T[We],G)},t.removeHook=function(We,G){if(G!==void 0){const je=iZ(T[We],G);return je===-1?void 0:oZ(T[We],je,1)[0]}return Hk(T[We])},t.removeHooks=function(We){T[We]=[]},t.removeAllHooks=function(){T=Xk()},t}var I3=A3();const _Z=e=>{if(!e)return"";const t="player.vimeo.com";if(!e.includes(t))return console.warn("Invalid video embed: not from Vimeo"),"";const r=I3.sanitize(e,{ALLOWED_TAGS:["iframe"],ALLOWED_ATTR:["src","width","height","frameborder","allow","allowfullscreen","style","title","id"],ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1});return r.includes(t)?r:(console.warn("Sanitization removed Vimeo iframe"),"")},Nte=e=>e?I3.sanitize(e,{ALLOWED_TAGS:["p","br","strong","em","u","h1","h2","h3","h4","h5","h6","ul","ol","li","a","img","div","span","table","tr","td","th","thead","tbody","tfoot"],ALLOWED_ATTR:["href","src","alt","title","style","class"],ALLOW_DATA_ATTR:!1,FORBID_TAGS:["script","style","iframe","object","embed"],FORB
771ID_ATTR:["onerror","onload","onclick","onmouseover"]}):"",qj=({embedHtml:e,videoId:t,className:r="w-full h-full"})=>{var i,o;const n=`vimeo-player-${t||"unknown"}`;sZ(t,n);const a=(o=(i=e==null?void 0:e.replace(/width="[^"]*"/,'width="100%"'))==null?void 0:i.replace(/height="[^"]*"/,'height="100%"'))==null?void 0:o.replace("<iframe",`<iframe id="${n}" style="position:absolute;top:0;left:0;width:100%;height:100%"`);return s.jsx("div",{className:r,dangerouslySetInnerHTML:{__html:_Z(a)}})},kZ=({currentVideo:e,suggestedVideos:t,isFavorite:r,comments:n,userRole:a,onToggleFavorite:i,onCommentAdded:o})=>{const l=qe(),c=$s(),{user:d}=jt(),{isVideoWatched:u}=Hl(),[m,f]=h.useState(!1),{isMobileApp:p,navigateWithPlatform:v}=ar(),g=w=>{if(!w)return"bg-white/90 text-foreground border-white/20";const j=w.toLowerCase();return j==="all-levels"||j==="all"||j.includes("αÏÏάÏι")||j.includes("beginner")||j.includes("εÏκολο")||j.includes("easy")||j.includes("μεÏαίο")||j.includes("intermediate")||j.includes("μÎÏÏιο")||j.includes("medium")||j.includes("ÏÏοÏÏÏημÎÎ
771½Î¿")||j.includes("advanced")||j.includes("δÏÏκολο")||j.includes("hard")?"bg-white/90 text-foreground border-white/20":"bg-blue-500/90 text-white border-blue-400/20"},b=w=>{if(!w)return w;const j=w.toLowerCase();return j==="all-levels"||j==="all"?"All Levels":j.includes("beginner")||j.includes("εÏκολο")||j.includes("easy")?"Beginners":j.includes("intermediate")||j.includes("μÎÏÏιο")||j.includes("medium")?"Intermediate":j.includes("advanced")||j.includes("δÏÏκολο")||j.includes("hard")?"Advanced":w},y=()=>{const w=c.pathname;return w.includes("/workouts/")?s.jsx(Za,{className:"h-4 w-4"}):w.includes("/breathworks/")?s.jsx(e6,{className:"h-4 w-4"}):w.includes("/dialogismoi/")?s.jsx(Yp,{className:"h-4 w-4"}):s.jsx(Za,{className:"h-4 w-4"})},x=()=>{const w=c.pathname;return w.includes("/workouts/")?"Workout":w.includes("/breathworks/")?"Breathwork":w.includes("/dialogismoi/")?"Dialogismoi":"Workout"};return e?(console.log("ð¬ WorkoutVideoPlayer rendering for:",e==null?void 0:e.title),console.log("ð± Screen size debug - WorkoutVideoPlayer active"),s.jsxs("div",{className:"min-h-screen bg-background",children:[p?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:m,onMenuToggle:()=>f(!m)}),s.jsx("main",{className:`${p?"":"container mx-auto px-4 sm:px-6 lg:px-8 py-4 lg:py-6 pt-4 sm:pt-10 md:pt-4 xl:pt-4"}`,children:s.jsxs("div",{className:`grid grid-cols-1 ${p?"":"lg:grid-cols-4 xl:grid-cols-5"} gap-3 sm:gap-4 lg:gap-6`,children:[s.jsxs("div",{className:`${p?"":"lg:col-span-3 xl:col-span-4"} space-y-3 lg:space-y-4`,children:[!p&&s.jsx("div",{className:"lg:hidden mb-4",children:s.jsxs(F,{variant:"ghost",onClick:()=>l(-1),children:[s.jsx(as,{className:"w-4 h-4 mr-2"}),"ΠίÏÏ"]})}),s.jsx("div",{className:"overflow-hidden bg-transparent relative",children:s.jsx("div",{className:"aspect-video relative bg-transparent",children:e.isVimeoVideo&&e.embedHtml?s.jsx(qj,{embedHtml:e.embedHtml,videoId:e.vimeoId,className:"w-full h-full bg-transparent"}):s.jsx("div",{className:"w-full h-full flex items-center justify-center text-muted-foreground bg-muted rounded-lg",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-6xl mb-4",children:"ð¥"}),s.jsx("p",{children:"Το βίνÏεο δεν είναι διαθÎÏιμο"})]})})})}),s.jsxs("div",{className:`space-y-3 sm:space-y-4 ${p?"px-4":""}`,children:[p?s.jsxs(s.Fragment,{children:[s.jsx("h1",{className:"text-lg font-bold text-foreground break-words leading-tight",children:e.title}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx(F,{variant:r?"default":"outline",size:"sm",onClick:i,className:"shrink-0 h-8 w-8 p-0",children:s.jsx(ws,{className:`h-4 w-4 ${r?"fill-current":""}`})}),e.difficulty_level&&s.jsx(ye,{variant:"outline",className:`text-xs px-2 py-1 font-semibold shrink-0 ${g(e.difficulty_level)}`,children:b(e.difficulty_level)}),e.duration&&s.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground shrink-0",children:[s.jsx(Ms,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:e.duration})]}),(e.instructor_id||e.instructor)&&s.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(Nn,{className:"h-3.5 w-3.5 shrink-0"}),s.jsx(mf,{instructorId:e.instructor_id,legacyInstructor:e.instructor,showPhoto:!1,onClick:e.instructor_id?()=>l(`/instructor/${e.instructor_id}`):void 0,className:"text-xs"})]})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h1",{className:"text-lg sm:text-xl md:text-2xl lg:text-3xl font-bold text-foreground mb-2 sm:mb-3 break-words leading-tight",children:e.title}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3 text-xs sm:text-sm text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[y(),s.jsx("span",{children:x()})]}),e.duration&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Ms,{className:"h-4 w-4"}),s.jsx("span",{children:e.duration})]}),e.instructor_id||e.instructor?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Nn,{className:"h-4 w-4"}),s.jsx(mf,{instructorId:e.instructor_id,legacyInstructor:e.instructor,showPhoto:!0,onClick:e.instructor_id?()=>l(`/instructor/${e.instructor_id}`):void 0,className:"text-sm"})]}):s.jsx("div",{className:"text-xs text-red-500",children:"No instructor found"})]})]}),s.jsxs(F,{variant:r?"default":"outline",size:"sm",onClick:i,className:"shrink-0 mt-2 sm:mt-0 w-full sm:w-auto",children:[s.jsx(ws,{className:`h-4 w-4 mr-2 ${r?"fill-current":""}`}),s.jsx("span",{children:"ÎγαÏημÎνα"})]})]}),e.difficulty_level&&s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[s.jsx("span",{className:"text-xs sm:text-sm font-medium text-muted-foreground",children:"ÎÏίÏεδο:"}),s.jsx(ye,{variant:"outline",className:`text-xs px-2 py-1 font-semibold ${g(e.difficulty_level)}`,children:b(e.difficulty_level)})]})]}),e.description&&s.jsxs("div",{className:p?"py-3":"bg-muted/30 rounded-lg p-3 sm:p-4",children:[s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"ΠεÏιγÏαÏή"}),s.jsx("p",{className:"text-muted-foreground whitespace-pre-wrap leading-relaxed text-xs sm:text-sm lg:text-base",children:e.description})]})]}),s.jsxs("div",{className:"space-y-3 sm:space-y-4 lg:space-y-6",children:[s.jsx("h3",{className:`text-base sm:text-lg lg:text-xl font-bold text-foreground ${p?"px-4":""}`,children:"ΣÏÏλια"}),d&&s.jsx("div",{className:p?"bg-card py-3":"bg-card border border-border rounded-lg p-3 sm:p-4",children:s.jsx(Oj,{videoId:e.id,onPostCreated:o})}),s.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[n.map(w=>s.jsx(Wj,{post:w,currentUserRole:a,onDelete:()=>{},onHide:()=>{},onPin:()=>{},onUnpin:()=>{}},w.id)),n.length===0&&s.jsx("p",{className:"text-center text-muted-foreground py-4 sm:py-6 lg:py-8 text-xs sm:text-sm lg:text-base",children:"Îεν Ï
ÏάÏÏοÏ
ν ÏÏÏλια ακÏμη. ÎίνεÏε ο ÏÏÏÏÎ¿Ï ÏοÏ
θα ÏÏολιάÏει!"})]})]}),p&&s.jsx("div",{className:"fixed bottom-0 left-0 right-0 bg-background/95 backdrop-blur-md border-t border-border pb-safe z-40 mb-16",children:s.jsxs("div",{className:"container mx-auto px-4 py-3 flex gap-3",children:[s.jsxs(F,{variant:"ghost",onClick:()=>l(-1),className:"flex-1 flex items-center justify-center gap-2",children:[s.jsx(as,{className:"w-4 h-4"}),"ΠίÏÏ"]}),s.jsx(F,{variant:"default",onClick:()=>v("/mobile-categories"),className:"flex-1",children:"ÎÎΤÎÎÎΡÎÎΣ ΠΡÎÎ ÎÎÎΣÎΩÎ"})]})})]}),!p&&s.jsx("div",{className:"lg:col-span-1 xl:col-span-1 space-y-3 sm:space-y-4 lg:space-y-6",children:s.jsxs(oe,{className:"p-3 sm:p-4 lg:p-6 bg-card border-border",children:[s.jsx("h3",{className:"text-sm sm:text-base lg:text-lg font-bold text-foreground mb-3 sm:mb-4",children:"Î ÏοÏεινÏμενα"}),s.jsxs("div",{className:"space-y-4 lg:space-y-5",children:[t.map(w=>s.jsx("div",{className:"group cursor-pointer",onClick:()=>{const j=c.pathname.split("/")[1];l(`/${j}/${w.id}`)},children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"relative w-full aspect-video rounded overflow-hidden bg-muted",children:[w.thumbnail&&s.jsx("img",{src:w.thumbnail,alt:w.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-200"}),u(w.id)&&s.jsx("div",{className:"absolute top-2 right-2",children:s.jsx(ye,{variant:"secondary",className:"bg-black/70 text-white text-xs px-1 py-0.5",children:"â"})}),w.duration&&s.jsx("div",{className:"absolute bottom-2 right-2 bg-black/80 text-white text-xs px-2 py-1 rounded",children:w.duration})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("h4",{className:"font-medium text-sm text-foreground group-hover:text-primary transition-colors leading-tight",children:w.title}),s.jsx("div",{className:"text-xs text-muted-foreground",children:s.jsx(mf,{instructorId:w.instructor_id,legacyInstructor:w.instructor,showPhoto:!1,className:"text-xs"})})]})]})},w.id)),t.length===0&&s.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground text-center py-3 sm:py-4",children:"Îεν Ï
ÏάÏÏοÏ
ν ÏÏοÏεινÏμενα βίνÏεο"})]})]})})]})}),!p&&s.jsx(Be,{})]})):s.jsxs("div",{className:"min-h-screen bg-background",children:[p?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:m,onMenuToggle:()=>f(!m)}),s.jsx("div",{className:"container mx-auto px-4 py-8",children:s.jsx("p",{className:"text-center text-muted-foreground",children:"Το βίνÏεο δεν βÏÎθηκε."})}),!p&&s.jsx(Be,{})]})},Jk=[{id:"workout-1",title:"Morning Yoga Flow για ÎνÎÏγεια",overlayTitle:"Morning Yoga Flow για ÎνÎÏγεια",duration:"25:30",level:"ÎÏÏάÏιοÏ",category:"Yoga",thumbnail:"/src/assets/workout-1.jpg",instructor:"Maria Papadopoulos",description:"ÎεκινήÏÏε Ïη μÎÏα ÏÎ±Ï Î¼Îµ αÏ
Ïή Ïη δÏ
ναμική Ïοή yoga ÏοÏ
θα ÏÎ±Ï Î´ÏÏει ενÎÏγεια και θα ÏÎ±Ï ÏÏοεÏοιμάÏει για ÏÎ¹Ï ÏÏοκλήÏÎµÎ¹Ï ÏÎ·Ï Î·Î¼ÎÏαÏ.",tags:["yoga","morning","energy","beginner"],videoUrl:""},{id:"workout-2",title:"HIIT Cardio για ÎÏήγοÏη ÎαÏÏη",overlayTitle:"HIIT Cardio για ÎÏήγοÏη ÎαÏÏη",duration:"20:15",level:"ÎεÏαίοÏ",category:"HIIT",thumbnail:"/src/assets/workout-2.jpg",instructor:"Dimitris Kostas",de
771scription:"Îνα ενÏαÏÎ¹ÎºÏ HIIT workout ÏοÏ
θα ÏÎ±Ï Î²Î¿Î·Î¸Î®Ïει να κάÏεÏε θεÏÎ¼Î¯Î´ÎµÏ Î³ÏήγοÏα και αÏοÏελεÏμαÏικά.",tags:["hiit","cardio","fat-burning","intermediate"],videoUrl:""},{id:"workout-3",title:"Strength Training για ÎÏÏάÏιοÏ
Ï",overlayTitle:"Strength Training για ÎÏÏάÏιοÏ
Ï",duration:"30:45",level:"ÎÏÏάÏιοÏ",category:"Strength",thumbnail:"/src/assets/workout-3.jpg",instructor:"Anna Georgiou",description:"ÎάθεÏε ÏÎ¹Ï Î²Î±ÏικÎÏ ÏεÏνικÎÏ ÏÎ·Ï ÏÏοÏÏνηÏÎ·Ï Î´ÏÎ½Î±Î¼Î·Ï Î¼Îµ αÏ
ÏÏ Ïο ÏÎ¹Î»Î¹ÎºÏ ÏÏÎ¿Ï Î±ÏÏάÏιοÏ
Ï workout.",tags:["strength","beginner","technique","basics"],videoUrl:""},{id:"workout-4",title:"ΠιλάÏÎµÏ Î³Î¹Î± ÎÏ
ναÏÏ Core",overlayTitle:"ΠιλάÏÎµÏ Î³Î¹Î± ÎÏ
ναÏÏ Core",duration:"35:20",level:"ÎεÏαίοÏ",category:"Pilates",thumbnail:"/src/assets/workout-4.jpg",instructor:"Sofia Michailidou",description:"ÎνδÏ
ναμÏÏÏε Ïον κοÏÎ¼Ï ÏÎ±Ï Î¼Îµ αÏ
ÏÎÏ ÏÎ¹Ï ÏÏοÏεÏ
μÎÎ½ÎµÏ Î±ÏκήÏÎµÎ¹Ï Pilates ÏοÏ
θα βελÏιÏÏοÏ
ν Ïη ÏÏάÏη και Ïην ιÏοÏÏοÏία ÏαÏ.",tags:["pilates","core","intermediate","balance"],videoUrl:""},{id:"workout-5",title:"ΧαλαÏÏÏÎ¹ÎºÏ Stretch για Ïο ÎÏάδÏ
",overlayTitle:"ΧαλαÏÏÏÎ¹ÎºÏ Stretch για Ïο ÎÏάδÏ
",duration:"15:10",level:"ÎÏÏάÏιοÏ",category:"Stretching",thumbnail:"/src/assets/workout-5.jpg",instructor:"Elena Vasileiou",description:"ΧαλαÏÏÏÏε και εÏοιμαÏÏείÏε για Îναν ÏοιοÏÎ¹ÎºÏ ÏÏνο με αÏ
ÏÎÏ ÏÎ¹Ï Î±ÏαλÎÏ Î±ÏκήÏÎµÎ¹Ï stretching.",tags:["stretching","relaxation","evening","sleep"],videoUrl:""}],oi=()=>{var O;const{videoId:e}=la(),t=qe(),r=$s(),{videos:n,loading:a}=ki(),[i,o]=h.useState(null),[l,c]=h.useState([]),[d,u]=h.useState(!1),[m,f]=h.useState(!1),[p,v]=h.useState([]),[g,b]=h.useState("member"),{user:y}=jt(),{toast:x}=at(),{trackVideoActivity:w}=th(),{isMobileApp:j}=ar(),N=h.useMemo(()=>n.map(P=>({id:P.vimeoId,title:P.title,overlayTitle:P.title,instructor:P.instructor||"",instructor_id:P.instructor_id,difficulty_level:P.difficultyLevel,duration:P.duration,thumbnail:P.thumbnail,embedHtml:P.embedHtml||"",description:P.description||"",category:P.category,vimeoTags:P.vimeoTags||[],pageType:P.pageType})),[n]);h.useEffect(()=>{y!=null&&y.id&&e&&(_(),S(),R()),e&&E()},[y==null?void 0:y.id,e]);const S=async()=>{if(!y)return;const{data:P}=await U.from("user_roles").select("role").eq("user_id",y.id).maybeSingle();P!=null&&P.role&&b(P.role)},E=async()=>{if(e)try{const{data:P,error:M}=await U.from("posts").select("*").eq("video_id",e).eq("is_hidden",!1).order("created_at",{ascending:!1});if(M)throw M;const D=[...new Set((P||[]).map(se=>se.user_id))],{fetchSafeProfiles:$}=await ut(async()=>{const{fetchSafeProfiles:se}=await import("./useSafeProfiles-3mMwzyBY.js");return{fetchSafeProfiles:se}},[]),[W,X]=await Promise.all([$(D),U.from("user_roles").select("user_id, role").in("user_id",D)]),q=(X.data||[]).reduce((se,{user_id:te,role:B})=>(se[te]=B,se),{}),H=(P||[]).map(se=>{const te=W.get(se.user_id);return{...se,profiles:te?{first_name:te.first_name,last_name:null,email:null,avatar_url:te.avatar_url}:null,user_roles:q[se.user_id]?[{role:q[se.user_id]}]:[]}});v(H)}catch(P){console.error("Error fetching comments:",P)}};h.useEffect(()=>{if(!e)return;let P=Jk.find(D=>D.id===e),M=!1;if(!P&&N.length>0){const D=N.find($=>$.id===e);D&&(P={...D,level:"ÎεÏαίοÏ",category:"Fitness",tags:["fitness","vimeo"],videoUrl:""},M=!0)}if(P){o({...P,isVimeoVideo:M});const D=Jk.concat(N.map(q=>({...q,level:"ÎεÏαίοÏ",category:q.category||"Fitness",tags:q.vimeoTags||["fitness"],videoUrl:""})));let $=D.filter(q=>q.id!==e);const W=P.pageType;W&&($=$.filter(q=>q.pageType===W)),$.length<3&&($=D.filter(q=>q.id!==e));const X=$.sort(()=>.5-Math.random()).slice(0,3);c(X)}else o(null)},[e,N]);const _=async()=>{if(!(!y||!e))try{const{data:P,error:M}=await U.from("user_favorites").select("id").eq("user_id",y.id).eq("video_id",e).single();!M&&P&&u(!0)}catch(P){console.error("Error checking favorite status:",P)}},I=async()=>
771{if(!y){x({title:"Î£Ï Î½Î´ÎµÎ¸ÎµÎ¯Ïε",description:"Î ÏÎÏει να ÏÏ Î½Î´ÎµÎ¸ÎµÎ¯Ïε για να ÏÏοÏθÎÏεÏε αγαÏημÎνα",variant:"destructive"});return}if(i)try{if(d){const{error:P}=await U.from("user_favorites").delete().eq("user_id",y.id).eq("video_id",e);if(P)throw P;u(!1),x({title:"ÎÏαιÏÎθηκε",description:"Το βίνÏεο αÏαιÏÎθηκε αÏÏ Ïα αγαÏημÎνα"})}else{const{error:P}=await U.from("user_favorites").insert({user_id:y.id,video_id:e,video_title:i.title,video_thumbnail:i.thumbnail});if(P)throw P;u(!0),x({title:"Î ÏοÏÏÎθηκε",description:"Το βίνÏεο ÏÏοÏÏÎθηκε ÏÏα αγαÏημÎνα"})}}catch(P){console.error("Error toggling favorite:",P),x({title:"ΣÏάλμα",description:"Îεν ήÏαν Î´Ï Î½Î±Ïή η ενημÎÏÏÏη ÏÏν αγαÏημÎνÏν",variant:"destructive"})}},R=async()=>{if(e)try{const{data:P}=await U.from("videos").select("vimeo_id, page_type, title").eq("vimeo_id",e).maybeSingle();P?await w({vimeoId:e,pageType:P.page_type,title:P.title}):await w({vimeoId:e,pageType:"workouts",title:void 0})}catch(P){console.error("Error in trackVideoActivity:",P)}},T=()=>{if(!i)return;const P=window.open("","_blank");P&&(P.document.write(` 772 <html> 773 <head> 774 <title>${i.title}</title> 775 <style> 776 body { 777 font-family: Arial, sans-serif; 778 padding: 20px; 779 margin: 0; 780 line-height: 1.6; 781 } 782 .header { 783 text-align: center; 784 margin-bottom: 30px; 785 } 786 .header h1 { 787 margin: 0 0 5px 0; 788 font-size: 24px; 789 color: #2c5530; 790 } 791 .header p { 792 margin: 0; 793 font-size: 14px; 794 color: #666; 795 } 796 h2 { 797 color: #2c5530; 798 margin-top: 30px; 799 margin-bottom: 15px; 800 border-bottom: 2px solid #2c5530; 801 padding-bottom: 5px; 802 } 803 .recipe-content { 804 line-height: 1.6; 805 white-space: pre-wrap; 806 margin-bottom: 40px; 807 } 808 .footer { 809 border-top: 1px solid #ddd; 810 padding-top: 20px; 811 margin-top: 40px; 812 text-align: center; 813 color: #666; 814 font-size: 14px; 815 display: flex; 816 align-items: center; 817 justify-content: center; 818 gap: 10px; 819 } 820 .footer img { 821 height: 25px; 822 vertical-align: middle; 823 } 824 </style> 825 </head> 826 <body> 827 <div class="header"> 828 <h1>ð¥ Nadia's Recipes</h1> 829 <p>ÎνακαλÏÏÏε Ï Î³Î¹ÎµÎ¹Î½ÎÏ ÎºÎ±Î¹ Î³ÎµÏ ÏÏικÎÏ ÏÏ Î½ÏαγÎÏ Î³Î¹Î± κάθε γεÏμα! â¨</p> 830 </div> 831 <h2>${i.title}</h2> 832 <div class="recipe-content"> 833 ${i.description} 834 </div> 835 <div class="footer"> 836 <span>ÎÏήκα Ïη ÏÏ Î½Ïαγή ÏÏο Well Be by Nadia Boule</span> 837 <img src="/lovable-uploads/5fcdd3d0-e4dd-4855-918a-eabd673cfde7.png" alt="Well Be Logo" /> 838 <span>www.wellbe.gr</span> 839 </div> 840 </body> 841 </html> 842 `),P.document.close(),P.print())},k=(i==null?void 0:i.pageType)||((O=N.find(P=>P.id===e))==null?void 0:O.pageType),C=k==="recipes"||r.pathname.startsWith("/recipes/");k==="podcast"||r.pathname.startsWith("/podcast/");const A=k==="workouts"||k==="breathworks"||k==="dialogismoi"||r.pathname.startsWith("/workouts/")||r.pathname.startsWith("/breathworks/")||r.pathname.startsWith("/dialogismoi/");if(a)return s.jsxs("div",{className:"min-h-screen bg-background",children:[j?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:m,onMenuToggle:()=>f(!m)}),s.jsx("div",{className:"flex justify-center items-center h-96",children:s.jsx("div",{className:"animate-spin rounded-full h-32 w-32 border-b-2 border-primary"})}),!j&&s.jsx(Be,{})]});if(!i)return s.jsxs("div",{className:"min-h-screen bg-background",children:[j?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:m,onMenuToggle:()=>f(!m)}),s.jsx("div",{className:"container mx-auto px-4 py-8",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-foreground mb-4",children:"Το βίνÏεο δεν βÏÎθηκε"}),s.jsxs(F,{variant:"outline",onClick:()=>t("/catalog"),children:[s.jsx(as,{className:"w-4 h-4 mr-2"}),"ÎÏιÏÏÏοÏή ÏÏον ÎαÏάλογο"]})]})}),!j&&s.jsx(Be,{})]});const L=P=>{const M=P.pageType;t(M==="recipes"?`/recipes/${P.id}`:M==="podcast"?`/podcast/${P.id}`:`/video/${P.id}`)};return A?s.jsx(kZ,{currentVideo:i,suggestedVideos:l,isFavorite:d,comments:p,userRole:g,onToggleFavorite:I,onCommentAdded:E}):s.jsxs("div",{className:"min-h-screen bg-background",children:[j?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:m,onMenuToggle:()=>f(!m)}),s.jsxs("main",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-6 lg:py-8 pt-20 sm:pt-24 md:pt-32 xl:pt-32",children:[(console.log("ð¥ VideoPlayer rendering for:",i==null?void 0:i.title),console.log("ð± Screen size debug - VideoPlayer active"),null),s.jsx("div",{className:"block md:hidden mb-4",children:s.jsxs(F,{variant:"outline",onClick:()=>t(-1),className:"text-foreground hover:text-primary flex items-center gap-2 transition-colors backdrop-blur-md supp
842orts-[backdrop-filter]:bg-background/60 bg-background/80 border-border shadow-sm",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"ÎÏιÏÏÏοÏή"})]})}),s.jsx("div",{className:"hidden md:block fixed left-4 top-20 sm:top-24 md:top-28 lg:top-28 xl:top-32 z-50",children:s.jsxs(F,{variant:"outline",onClick:()=>t(-1),className:"group text-foreground hover:text-primary flex items-center gap-0 hover:gap-2 transition-all duration-300 backdrop-blur-md supports-[backdrop-filter]:bg-background/60 bg-background/80 border-border shadow-sm",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{className:"opacity-0 group-hover:opacity-100 w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all duration-300",children:"ÎÏιÏÏÏοÏή"})]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-6 lg:gap-8",children:[s.jsxs("div",{className:"lg:col-span-2 xl:col-span-3 space-y-4 lg:space-y-6",children:[s.jsx("div",{className:"overflow-hidden bg-transparent",children:s.jsx("div",{className:"aspect-video relative bg-transparent",children:i.isVimeoVideo&&i.embedHtml?s.jsx(qj,{embedHtml:i.embedHtml,videoId:i.vimeoId,className:"w-full h-full bg-transparent"}):s.jsx("div",{className:"w-full h-full flex items-center justify-center text-muted-foreground bg-muted rounded-lg",children:s.jsx("div",{className:"text-center",children:s.jsx("img",{src:i.thumbnail,alt:i.title,className:"w-full h-full object-cover rounded-lg"})})})})}),s.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h1",{className:"text-lg sm:text-xl md:text-2xl lg:text-3xl font-bold text-foreground mb-2 sm:mb-3 break-words leading-tight",children:i.title}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3 text-xs sm:text-sm text-muted-foreground",children:[i.duration&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Ms,{className:"h-4 w-4"}),s.jsx("span",{children:i.duration})]}),i.instructor&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Nn,{className:"h-4 w-4"}),s.jsx("span",{children:i.instructor})]})]})]}),s.jsxs(F,{variant:d?"default":"outline",size:"sm",onClick:I,className:"shrink-0 mt-2 sm:mt-0 w-full sm:w-auto",children:[s.jsx(ws,{className:`h-4 w-4 mr-2 ${d?"fill-current":""}`}),s.jsx("span",{children:"ÎγαÏημÎνα"})]})]}),i.description&&s.jsxs("div",{className:"bg-muted/30 rounded-lg p-3 sm:p-4",children:[s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"ΠεÏιγÏαÏή"}),s.jsx("p",{className:"text-muted-foreground whitespace-pre-wrap leading-relaxed text-xs sm:text-sm lg:text-base",children:i.description})]}),C&&s.jsx("div",{className:"flex gap-2",children:s.jsxs(F,{variant:"outline",size:"sm",onClick:T,className:"flex items-center gap-2",children:[s.jsx(xE,{className:"h-4 w-4"}),"ÎκÏÏÏÏÏη"]})})]}),s.jsxs("div",{className:"space-y-3 sm:space-y-4 lg:space-y-6",children:[s.jsx("h3",{className:"text-base sm:text-lg lg:text-xl font-bold text-foreground",children:"ΣÏÏλια"}),y&&s.jsx("div",{className:"bg-card border border-border rounded-lg p-3 sm:p-4",children:s.jsx(Oj,{videoId:e,onPostCreated:E})}),s.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[p.map(P=>s.jsx(Wj,{post:P,currentUserRole:g,onDelete:()=>{v(p.filter(M=>M.id!==P.id))},onHide:()=>{v(p.filter(M=>M.id!==P.id))},onPin:()=>{},onUnpin:()=>{}},P.id)),p.length===0&&s.jsx("p",{className:"text-center text-muted-foreground py-4 sm:py-6 lg:py-8 text-xs sm:text-sm lg:text-base",children:"Îεν Ï
ÏάÏÏοÏ
ν ÏÏÏλια ακÏμη. ÎίνεÏε ο ÏÏÏÏÎ¿Ï ÏοÏ
θα ÏÏολιάÏει!"})]})]})]}),s.jsx("div",{className:"lg:col-span-1 xl:col-span-1 space-y-3 sm:space-y-4 lg:space-y-6",children:l.length>0&&s.jsxs(oe,{className:"p-3 sm:p-4 lg:p-6 bg-card border-border",children:[s.jsx("h3",{className:"text-sm sm:text-base lg:text-lg font-bold text-foreground mb-3 sm:mb-4",children:"Î ÏοÏεινÏμενα"}),s.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[l.map(P=>s.jsx("div",{className:"group cursor-pointer",onClick:()=>L(P),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"relative w-full aspect-video rounded overflow-hidden bg-muted",children:[P.thumbnail&&s.jsx("img",{src:P.thumbnail,alt:P.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-200"}),P.duration&&s.jsx("div",{className:"absolute bottom-2 right-2 bg-black/80 text-white text-xs px-2 py-1 rounded",children:P.duration})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("h4",{className:"font-medium text-sm text-foreground group-hover:text-primary transition-colors leading-tight",children:P.title}),s.jsx("div",{className:"text-xs text-muted-foreground",children:s.jsx(mf,{instructorId:P.instructor_id,legacyInstructor:P.instructor,showPhoto:!1,className:"text-xs"})})]})]})},P.id)),l.length===0&&s.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground text-center py-3 sm:py-4",children:"Îεν Ï
ÏάÏÏοÏ
ν ÏÏοÏεινÏμενα βίνÏεο"})]})]})})]})]}),!j&&s.jsx(Be,{})]})},SZ=()=>{const{videoId:e}=la(),[t,r]=h.useState(!1);return e?s.jsx(oi,{}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"Workouts Online - Pilates, Yoga, Barre | Well Be",description:"ÎνακαλÏÏÏε
842workouts για κάθε εÏίÏεδο: Pilates, Yoga, Barre, Prenatal, Postnatal. ÎÏ Î¼Î½Î±ÏÏική ÏÏο ÏÏίÏι με Ïην ÎάνÏια ÎÏοÏλε.",keywords:"workouts online, pilates, yoga, barre, prenatal, postnatal, Î³Ï Î¼Î½Î±ÏÏική ÏÏίÏι",canonical:"https://wellbe.gr/workouts"}),s.jsx(Fe,{isMenuOpen:t,onMenuToggle:()=>r(!t)}),s.jsxs("main",{className:"pt-4 sm:pt-6 container mx-auto px-4 pb-8",children:[s.jsx(Fo,{}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Workouts"}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Discover our comprehensive workout videos designed to help you stay fit and healthy."})]}),s.jsx(ii,{requireSubscription:!0,showPaywallButton:!0,paywallTitle:"ÎίνεÏε ÎÎÎ»Î¿Ï ÏÏα Well Be Workouts",paywallDescription:"Îε μία ÏÏ Î½Î´Ïομή αÏοκÏήÏÏε ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏÏμενο ÏÎ¿Ï Well Be.",fullPageOverlay:!0,children:s.jsx(NR,{pageType:"workouts"})})]}),s.jsx(Be,{})]})},Db={STORE_DOMAIN:"bbynadiaboule.myshopify.com",API_VERSION:"2025-07",STOREFRONT_TOKEN:"d06b952b31deb0f9d9a0cfc39d751f00"},CZ=`https://${Db.STORE_DOMAIN}/api/${Db.API_VERSION}/graphql.json`;async function Gj(e,t={}){const r=await fetch(CZ,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":Db.STOREFRONT_TOKEN},body:JSON.stringify({query:e,variables:t})});if(r.status===402)throw new Error("Shopify API access requires an active billing plan. Please upgrade your store.");if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const n=await r.json();if(n.errors)throw new Error(`Shopify API error: ${n.errors.map(a=>a.message).join(", ")}`);return n}const Zk=e=>{let t;const r=new Set,n=(d,u)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const f=t;t=u??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(p=>p(t,f))}},a=()=>t,l={setState:n,getState:a,getInitialState:()=>c,subscribe:d=>(r.add(d),()=>r.delete(d))},c=t=e(n,a,l);return l},EZ=e=>e?Zk(e):Zk,PZ=e=>e;function TZ(e,t=PZ){const r=ie.useSyncExternalStore(e.subscribe,ie.useCallback(()=>t(e.getState()),[e,t]),ie.useCallback(()=>t(e.getInitialState()),[e,t]));return ie.useDebugValue(r),r}const AZ=e=>{const t=EZ(e),r=n=>TZ(t,n);return Object.assign(r,t),r},IZ=e=>AZ;function R3(e,t){let r;try{r=e()}catch{return}return{getItem:a=>{var i;const o=c=>c===null?null:JSON.parse(c,void 0),l=(i=r.getItem(a))!=null?i:null;return l instanceof Promise?l.then(o):o(l)},setItem:(a,i)=>r.setItem(a,JSON.stringify(i,void 0)),removeItem:a=>r.removeItem(a)}}const Lb=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return Lb(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Lb(n)(r)}}}},RZ=(e,t)=>(r,n,a)=>{let i={storage:R3(()=>localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...t},o=!1;const l=new Set,c=new Set;let d=i.storage;if(!d)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...g)},n,a);const u=()=>{const g=i.partialize({...n()});return d.setItem(i.name,{state:g,version:i.version})},m=a.setState;a.setState=(g,b)=>(m(g,b),u());const f=e((...g)=>(r(...g),u()),n,a);a.getInitialState=()=>f;let p;const v=()=>{var g,b;if(!d)return;o=!1,l.forEach(x=>{var w;return x((w=n())!=null?w:f)});const y=((b=i.onRehydrateStorage)==null?void 0:b.call(i,(g=n())!=null?g:f))||void 0;return Lb(d.getItem.bind(d))(i.name).then(x=>{if(x)if(typeof x.version=="number"&&x.version!==i.version){if(i.migrate){const w=i.migrate(x.state,x.version);return w instanceof Promise?w.then(j=>[!0,j]):[!0,w]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,x.state];return[!1,void 0]}).then(x=>{var w;const[j,N]=x;if(p=i.merge(N,(w=n())!=null?w:f),r(p,!0),j)return u()}).then(()=>{y==null||y(p,void 0),p=n(),o=!0,c.forEach(x=>x(p))}).catch(x=>{y==null||y(void 0,x)})};return a.persist={setOptions:g=>{i={...i,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d==null||d.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>o,onHydrate:g=>(l.add(g),()=>{l.delete(g)}),onFinishHydration:g=>(c.add(g),()=>{c.delete(g)})},i.skipHydration||v(),p||f},MZ=RZ,OZ=` 843 mutation cartCreate($input: CartInput!) { 844 cartCreate(input: $input) { 845 cart { 846 id 847 checkoutUrl 848 totalQuantity 849 cost { 850 totalAmount { 851 amount 852 currencyCode 853 } 854 } 855 } 856 userErrors { 857 field 858 message 859 } 860 } 861 } 862`,_p=IZ()(MZ((e,t)=>({items:[],cartId:null,checkoutUrl:null,isLoading:!1,addItem:r=>{const{items:n}=t(),a=n.find(i=>i.variantId===r.variantId);e(a?{items:n.map(i=>i.variantId===r.variantId?{...i,quantity:i.quantity+r.quantity}:i)}:{items:[...n,r]})},updateQuantity:(r,n)=>{if(n<=0){t().removeItem(r);return}e({items:t().items.map(a=>a.variantId===r?{...a,quantity:n}:a)})},removeItem:r=>{e({items:t().items.filter(n=>n.variantId!==r)})},clearCart:()=>{e({items:[],cartId:null,checkoutUrl:null})},setCartId:r=>e({cartId:r}),setCheckoutUrl:r=>e({checkoutUrl:r}
862),setLoading:r=>e({isLoading:r}),createCheckout:async()=>{const{items:r,setLoading:n,setCheckoutUrl:a}=t();if(r.length!==0){n(!0);try{const i=r.map(d=>({quantity:d.quantity,merchandiseId:d.variantId})),o=await Gj(OZ,{input:{lines:i}});if(o.data.cartCreate.userErrors.length>0)throw new Error(`Cart creation failed: ${o.data.cartCreate.userErrors.map(d=>d.message).join(", ")}`);const l=o.data.cartCreate.cart;if(!l.checkoutUrl)throw new Error("No checkout URL returned from Shopify");const c=new URL(l.checkoutUrl);c.searchParams.set("channel","online_store"),a(c.toString())}catch(i){throw console.error("Failed to create checkout:",i),i}finally{n(!1)}}}}),{name:"shopify-cart",storage:R3(()=>localStorage)})),M3=()=>{var m;const[e,t]=h.useState(!1),{items:r,isLoading:n,updateQuantity:a,removeItem:i,createCheckout:o,checkoutUrl:l}=_p(),c=r.reduce((f,p)=>f+p.quantity,0),d=r.reduce((f,p)=>f+parseFloat(p.price.amount)*p.quantity,0),u=async()=>{try{await o();const f=_p.getState().checkoutUrl;f&&(window.open(f,"_blank"),t(!1))}catch(f){console.error("Checkout failed:",f),Dt.error("Failed to create checkout",{description:f instanceof Error?f.message:"Please try again"})}};return s.jsxs(bR,{open:e,onOpenChange:t,children:[s.jsx(GQ,{asChild:!0,children:s.jsxs(F,{variant:"outline",size:"icon",className:"relative",children:[s.jsx(Sl,{className:"h-5 w-5"}),c>0&&s.jsx(ye,{className:"absolute -top-2 -right-2 h-5 w-5 rounded-full p-0 flex items-center justify-center text-xs",children:c})]})}),s.jsxs(Aj,{className:"w-full sm:max-w-lg flex flex-col h-full",children:[s.jsxs(Ij,{className:"flex-shrink-0",children:[s.jsx(Rj,{children:"Shopping Cart"}),s.jsx(jR,{children:c===0?"Your cart is empty":`${c} item${c!==1?"s":""} in your cart`})]}),s.jsx("div",{className:"flex flex-col flex-1 pt-6 min-h-0",children:r.length===0?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Sl,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),s.jsx("p",{className:"text-muted-foreground",children:"Your cart is empty"})]})}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex-1 overflow-y-auto pr-2 min-h-0",children:s.jsx("div",{className:"space-y-4",children:r.map(f=>{var p,v,g;return s.jsxs("div",{className:"flex gap-4 p-2",children:[s.jsx("div",{className:"w-16 h-16 bg-secondary/20 rounded-md overflow-hidden flex-shrink-0",children:((g=(v=(p=f.product.node.images)==null?void 0:p.edges)==null?void 0:v[0])==null?void 0:g.node)&&s.jsx("img",{src:f.product.node.images.edges[0].node.url,alt:f.product.node.title,className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h4",{className:"font-medium truncate",children:f.product.node.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:f.selectedOptions.map(b=>b.value).join(" ⢠")}),s.jsxs("p",{className:"font-semibold",children:[f.price.currencyCode," ",parseFloat(f.price.amount).toFixed(2)]})]}),s.jsxs("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[s.jsx(F,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>i(f.variantId),children:s.jsx(jn,{className:"h-3 w-3"})}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(F,{variant:"outline",size:"icon",className:"h-6 w-6",onClick:()=>a(f.variantId,f.quantity-1),children:s.jsx(pE,{className:"h-3 w-3"})}),s.jsx("span",{className:"w-8 text-center text-sm",children:f.quantity}),s.jsx(F,{variant:"outline",size:"icon",className:"h-6 w-6",onClick:()=>a(f.variantId,f.quantity+1),children:s.jsx(Ic,{className:"h-3 w-3"})})]})]})]},f.variantId)})})}),s.jsxs("div",{className:"flex-shrink-0 space-y-4 pt-4 border-t bg-background",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-lg font-semibold",children:"Total"}),s.jsxs("span",{className:"text-xl font-bold",children:[((m=r[0])==null?void 0:m.price.currencyCode)||"EUR"," ",d.toFixed(2)]})]}),s.jsx(F,{onClick:u,className:"w-full",size:"lg",disabled:r.length===0||n,children:n?s.jsxs(s.Fragment,{children:[s.jsx(mt,{className:"w-4 h-4 mr-2 animate-spin"}),"Creating Checkout..."]}):s.jsxs(s.Fragment,{children:[s.jsx(im,{className:"w-4 h-4 mr-2"}),"Checkout with Shopify"]})})]})]})})]})]})},DZ=` 863 query GetProducts($first: Int!) { 864 products(first: $first) { 865 edges { 866 node { 867 id 868 title 869 description 870 handle 871 priceRange { 872 minVariantPrice { 873 amount 874 currencyCode 875 } 876 } 877 images(first: 1) { 878 edges { 879 node { 880 url 881 altText 882 } 883 } 884 } 885 variants(first: 1) { 886 edges { 887 node { 888 id 889 title 890 price { 891 amount 892 currencyCode 893 } 894 availableForSale 895 selectedOptions { 896 name 897 value 898 } 899 } 900 } 901 } 902 } 903 } 904 } 905 } 906`,LZ=()=>{const[e,t]=h.useState([]),[r,n]=h.useState(!0),[a,i]=h.useState(null),[o,l]=h.useState(!1),c=qe(),d=_p(m=>m.addItem);h.useEffect(()=>{(async()=>{try{n(!0);const f=await Gj(DZ,{first:20});t(f.data.products.edges)}catch(f){console.error("Error fetching products:",f),i(f instanceof Error?f.message:"Failed to load products")}finally{n(!1)}})()},[]);const u=(m,f)=>{var g;f.stopPropagation();const p=(g=m.node.variants.edges[0])==null?void 0:g.node;if(!p)return;const v={product:m,variantId:p.id,variantTitle:p.title,price:p.price,quantity:1,selectedOptions:p.selectedOptions||[]};d(v),Dt.success("Added to cart",{description:m.node.title,position:"top-center"})};return r?s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(Fe,{isMenuOpen:o,onMenuToggle:()=>l(!o)}),s.jsx("main",{className:"flex-grow flex items-center justify-center",children:s.jsx(mt,{className:"h-8 w-8 animate-spin"})}),s.jsx(Be,{})]}):a?s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(Fe,{isMenuOpen:o,onMenuToggle:()=>l(!o)}),s.jsx("main",{className:"flex-grow flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-destructive mb-4",children:a}),s.jsx(F,{onClick:()=>window.location.reload(),children:"Try Again"})]})}),s.jsx(Be,{})]}):s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(Fe,{isMenuOpen:o,onMenuToggle:()=>l(!o)}),s.jsx("main",{className:"flex-grow",children:s.jsxs("div",{className:"container mx-auto px-4 py-8",children:[s.jsxs("div",{className:"flex justify-between items-center mb-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl font-bold mb-2",children:"Shop"}),s.jsx("p",{className:"text-muted-foreground",children:"Discover our wellness products"})]}),s.jsx(M3,{})]}),e.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(Sl,{className:"h-16 w-16 text-muted-foreground mx-auto mb-4"}),s.jsx("h2",{className:"text-2xl font-semibold mb-2",children:"No products found"}),s.jsx("p",{className:"text-muted-foreground",children:"Check back soon for new products"})]}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:e.map(m=>{var v;const f=(v=m.node.images.edges[0])==null?void 0:v.node,p=m.node.priceRange.minVariantPrice;return s.jsx("div",{className:"group cursor-pointer",onClick:()=>c(`/product/${m.node.handle}`),children:s.jsxs("div",{className:"bg-card rounded-lg overflow-hidden shadow-sm hover:shadow-md transition-shadow",children:[s.jsx("div",{className:"aspect-square bg-secondary/20 relative overflow-hidden",children:f&&s.jsx("img",{src:f.url,alt:f.altText||m.node.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"})}),s.jsxs("div",{className:"p-4",children:[s.jsx("h3",{className:"font-semibold mb-2 line-clamp-2",children:m.node.title}),m.node.description&&s.jsx("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2",children:m.node.description}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-lg font-bold",children:[p.currencyCode," ",parseFloat(p.amount).toFixed(2)]}),s.jsxs(F,{size:"sm",onClick:g=>u(m,g),children:[s.jsx(Sl,{className:"h-4 w-4 mr-2"}),"Add to Cart"]})]})]})]})},m.node.id)})})]})}),s.jsx(Be,{})]})},FZ=` 907 query GetProduct($handle: String!) { 908 product(handle: $handle) { 909 id 910 title 911 description 912 handle 913 priceRange { 914 minVariantPrice { 915 amount 916 currencyCode 917 } 918 } 919 images(first: 5) { 920 edges { 921 node { 922 url 923 altText 924 } 925 } 926 } 927 variants(first: 10) { 928 edges { 929 node { 930 id 931 title 932 price { 933 amount 934 currencyCode 935 } 936 availableForSale 937 selectedOptions { 938 name 939 value 940 } 941 } 942 } 943 } 944 options { 945 name 946 values 947 } 948 } 949 } 950`,$Z=()=>{var g;const{handle:e}=la(),t=qe(),[r,n]=h.useState(null),[a,i]=h.useState(null),[o,l]=h.useState(!0),[c,d]=h.useState(null),[u,m]=h.useState(!1),f=_p(b=>b.addItem);h.useEffect(()=>{(async()=>{var y;if(e)try{l(!0);const x=await Gj(FZ,{handle:e});x.data.product?(n(x.data.product),i((y=x.data.product.variants.edges[0])==null?void 0:y.node)):d("Product not found")}catch(x){console.error("Error fetching product:",x),d(x instanceof Error?x.message:"Failed to load product")}finally{l(!1)}})()},[e]);const p=()=>
950{if(!r||!a)return;const b={product:{node:r},variantId:a.id,variantTitle:a.title,price:a.price,quantity:1,selectedOptions:a.selectedOptions||[]};f(b),Dt.success("Added to cart",{description:r.title,position:"top-center"})};if(o)return s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(Fe,{isMenuOpen:u,onMenuToggle:()=>m(!u)}),s.jsx("main",{className:"flex-grow flex items-center justify-center",children:s.jsx(mt,{className:"h-8 w-8 animate-spin"})}),s.jsx(Be,{})]});if(c||!r)return s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(Fe,{isMenuOpen:u,onMenuToggle:()=>m(!u)}),s.jsx("main",{className:"flex-grow flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-destructive mb-4",children:c||"Product not found"}),s.jsx(F,{onClick:()=>t("/products"),children:"Back to Products"})]})}),s.jsx(Be,{})]});const v=(g=r.images.edges[0])==null?void 0:g.node;return s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(Fe,{isMenuOpen:u,onMenuToggle:()=>m(!u)}),s.jsx("main",{className:"flex-grow",children:s.jsxs("div",{className:"container mx-auto px-4 py-8",children:[s.jsxs("div",{className:"flex justify-between items-center mb-8",children:[s.jsxs(F,{variant:"ghost",onClick:()=>t("/products"),className:"mb-4",children:[s.jsx(as,{className:"h-4 w-4 mr-2"}),"Back to Products"]}),s.jsx(M3,{})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"aspect-square bg-secondary/20 rounded-lg overflow-hidden",children:v&&s.jsx("img",{src:v.url,alt:v.altText||r.title,className:"w-full h-full object-cover"})}),r.images.edges.length>1&&s.jsx("div",{className:"grid grid-cols-4 gap-2",children:r.images.edges.slice(1,5).map((b,y)=>s.jsx("div",{className:"aspect-square bg-secondary/20 rounded-lg overflow-hidden",children:s.jsx("img",{src:b.node.url,alt:b.node.altText||`${r.title} ${y+2}`,className:"w-full h-full object-cover"})},y))})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:r.title}),s.jsxs("p",{className:"text-3xl font-bold",children:[a==null?void 0:a.price.currencyCode," ",parseFloat((a==null?void 0:a.price.amount)||"0").toFixed(2)]})]}),r.description&&s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Description"}),s.jsx("p",{className:"text-muted-foreground",children:r.description})]}),r.variants.edges.length>1&&s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Options"}),s.jsx("div",{className:"space-y-2",children:r.variants.edges.map(b=>s.jsx(F,{variant:(a==null?void 0:a.id)===b.node.id?"default":"outline",onClick:()=>i(b.node),className:"mr-2",disabled:!b.node.availableForSale,children:b.node.title},b.node.id))})]}),s.jsxs(F,{size:"lg",className:"w-full",onClick:p,disabled:!(a!=null&&a.availableForSale),children:[s.jsx(Sl,{className:"h-5 w-5 mr-2"}),a!=null&&a.availableForSale?"Add to Cart":"Out of Stock"]})]})]})]})}),s.jsx(Be,{})]})},UZ=()=>{const{videoId:e}=la(),[t,r]=h.useState(!1);return e?s.jsx(oi,{}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"Breathworks - ÎναÏνεÏ
ÏÏικÎÏ ÎÏκήÏÎµÎ¹Ï | Well Be",description:"ÎναÏνεÏ
ÏÏικÎÏ ÏεÏνικÎÏ ÎºÎ±Î¹ breathwork για ÏÏÏεÏ, ÏαλάÏÏÏη και mindfulness. Guided breathing exercises με Ïη ÎάνÏια ÎÏοÏλε.",keywords:"breathworks, αναÏνεÏ
ÏÏικÎÏ Î±ÏκήÏειÏ, pranayama, mindfulness, stress relief",canonical:"https://wellbe.gr/breathworks"}),s.jsx(Fe,{isMenuOpen:t,onMenuToggle:()=>r(!t)}),s.jsxs("main",{className:"pt-4 sm:pt-6 container mx-auto px-4 pb-8",children:[s.jsx(Fo,{}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Breathworks"}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Find your center with our guided breathing exercises and mindfulness practices."})]}),s.jsx(ii,{requireSubscription:!0,showPaywallButton:!0,paywallTitle:"ÎίνεÏε ÎÎÎ»Î¿Ï ÏÏα Well Be Workouts",paywallDescription:"Îε μία ÏÏ
νδÏομή αÏοκÏήÏÏε ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏ
950Ïμενο ÏÎ¿Ï Well Be.",fullPageOverlay:!0,children:s.jsx($g,{pageType:"breathworks"})})]}),s.jsx(Be,{})]})},BZ=()=>{const{videoId:e}=la(),[t,r]=h.useState(!1);return e?s.jsx(oi,{}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"ÎιαλογιÏμοί - Guided Meditations | Well Be",description:"ÎιαλογιÏμοί και mindfulness practices για εÏÏÏεÏική ηÏεμία και ιÏοÏÏοÏία. Guided meditations ÏÏα ελληνικά με Ïη ÎάνÏια ÎÏοÏλε.",keywords:"διαλογιÏμÏÏ, meditation, mindfulness, relaxation, ηÏεμία",canonical:"https://wellbe.gr/dialogismoi"}),s.jsx(Fe,{isMenuOpen:t,onMenuToggle:()=>r(!t)}),s.jsxs("main",{className:"pt-4 sm:pt-6 container mx-auto px-4 pb-8",children:[s.jsx(Fo,{}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Dialogismoi"}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Engage in meaningful conversations and reflective practices for personal growth."})]}),s.jsx(ii,{requireSubscription:!0,showPaywallButton:!0,paywallTitle:"ÎίνεÏε ÎÎÎ»Î¿Ï ÏÏα Well Be Workouts",paywallDescription:"Îε μία ÏÏ Î½Î´Ïομή αÏοκÏήÏÏε ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏÏμενο ÏÎ¿Ï Well Be.",fullPageOverlay:!0,children:s.jsx($g,{pageType:"dialogismoi"})})]}),s.jsx(Be,{})]})},zZ=()=>{const[e,t]=h.useState(!1),[r,n]=h.useState({}),[a,i]=h.useState(null),[o,l]=h.useState(""),[c,d]=h.useState([]),[u,m]=h.useState(9),[f,p]=h.useState(!1),{user:v}=jt(),{subscribed:g,isTrialUser:b,isAdminFreeAccess:y}=_i(),{videos:x,loading:w}=ki("podcast"),{trackVideoActivity:j}=th(),{isMobileApp:N}=ar(),S=v&&(g||b||y),E=P=>{n(M=>({...M,[P]:!M[P]}))},_=P=>{const M=document.getElementById(P);M&&M.scrollIntoView({behavior:"smooth"})},I=(P,M)=>{const D=r[M],$=200;return P.length<=$||D?P:P.substring(0,$)+"..."},R=x.map(P=>{let M="";if(P.embedHtml){const W=P.embedHtml.match(/src="([^"]+)"/);M=W?W[1].replace(/&/g,"&"):""}M?M=M.includes("api=1")?M:M+"&api=1":M=`https://player.vimeo.com/video/${P.vimeoId}?badge=0&autopause=0&player_id=${P.vimeoId}&app_id=58479&api=1`;const D=P.releaseDate||P.publishedAt||P.createdAt,$=D?new Date(D).toLocaleDateString("el-GR"):new Date().toLocaleDateString("el-GR");return{id:P.vimeoId,title:P.title,description:P.description||"",embedUrl:M,thumbnail:P.thumbnail||"/api/placeholder/300/200",duration:P.duration||"0:00",publishDate:$,season:P.seasonNumber||1,episodeNumber:P.episodeNumber||1}}),[T,k]=h.useState(null);h.useEffect(()=>{(async()=>{try{const M=await vl.getPodcastSeasons();console.log("Loaded seasons data:",M),d(M)}catch(M){console.error("Error loading seasons:",M)}})(),R.length>0&&!T&&k([...R].sort((M,D)=>D.season-M.season||D.episodeNumber-M.episodeNumber)[0])},[x,R.length]),h.useEffect(()=>{R.length>0&&!T&&k([...R].sort((P,M)=>M.season-P.season||M.episodeNumber-P.episodeNumber)[0])},[R,T]),h.useEffect(()=>{const P=window.location.hash.replace("#","");P&&setTimeout(()=>{_(P)},300)},[]);const C=R.filter(P=>{const M=a?P.season===a:!0,D=o.trim()===""||P.title.toLowerCase().includes(o.toLowerCase())||P.description.toLowerCase().includes(o.toLowerCase());return M&&D}).sort((P,M)=>M.season-P.season||M.episodeNumber-P.episodeNumber),A=a===null?C.slice(0,u):C,L=a===null&&C.length>u,O=()=>{m(P=>P+9)};return h.useEffect(()=>{m(9)},[a,o]),h.useEffect(()=>{const P=document.createElement("script");P.type="text/javascript",P.charset="utf-8",P.src="https://www.buzzsprout.com/2067941.js?container_id=buzzsprout-large-player&player=large",P.onload=()=>{console.log("Buzzsprout player script loaded successfully")},P.onerror=()=>{console.error("Failed to load Buzzsprout player script");const D=document.getElementById("buzzsprout-large-player");D&&(D.innerHTML=` 951 <iframe 952 src="https://www.buzzsprout.com/2067941?iframe=true" 953 width="100%" 954 height="200" 955 frameborder="0" 956 scrolling="no" 957 style="border-radius: 12px;" 958 ></iframe> 959 `)},document.head.appendChild(P);const M=setTimeout(()=>{const D=document.getElementById("buzzsprout-large-player");D&&!D.innerHTML.trim()&&(console.warn("Buzzsprout player taking too long to load, showing fallback"),D.innerHTML=` 960 <iframe 961 src="https://www.buzzsprout.com/2067941?iframe=true" 962 width="100%" 963 height="200" 964 frameborder="0" 965 scrolling="no" 966 style="border-radius: 12px;" 967 ></iframe> 968 `)},5e3);return()=>
968{clearTimeout(M);const D=document.querySelector('script[src*="buzzsprout.com"]');D&&D.remove()}},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fs,{title:"Nadia Talks Wellness Podcast - Well Be",description:"ÎκοÏÏÏε Ïο Nadia Talks Wellness podcast. ΣÏ
ζηÏήÏÎµÎ¹Ï Î¼Îµ ειδικοÏÏ Î³Î¹Î± wellness, Ï
γεία, διαÏÏοÏή και mental health. ÎιαθÎÏιμο Ïε Spotify, Apple Podcasts, YouTube.",keywords:"nadia talks wellness, podcast, wellness, Ï
γεία, διαÏÏοÏή, mental health",canonical:"https://wellbe.gr/podcast"}),N?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsxs("main",{children:[s.jsx("div",{className:"container mx-auto px-4 sm:px-6 pt-4",children:s.jsx(Fo,{})}),!N&&s.jsx("section",{className:"py-8 sm:py-12 lg:py-16 bg-gradient-to-r from-primary/5 to-primary/10",children:s.jsx("div",{className:"container mx-auto px-4 sm:px-6",children:s.jsx("div",{className:"max-w-6xl mx-auto",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-6 lg:gap-8 items-center",children:[s.jsxs("div",{className:"text-center lg:text-left",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center lg:justify-start mb-4 sm:mb-6",children:[s.jsx(pa,{className:"w-12 h-12 sm:w-14 sm:h-14 lg:w-16 lg:h-16 text-primary mb-2 sm:mb-0 sm:mr-4 lg:mr-6"}),s.jsx("h1",{className:"text-2xl sm:text-3xl lg:text-4xl font-bold text-foreground",children:"Nadia Talks Wellness"})]}),s.jsx("p",{className:"text-lg sm:text-xl text-muted-foreground mb-6 sm:mb-8 max-w-2xl mx-auto lg:mx-0",children:"ΣÏ
ζηÏάμε με κοÏÏ
ÏαίοÏ
Ï ÎµÎ¹Î´Î¹ÎºÎ¿ÏÏ Î¸ÎμαÏα ÏÏμαÏÎ¹ÎºÎ®Ï ÎºÎ±Î¹ ÏÏ
ÏÎ¹ÎºÎ®Ï Ï
γείαÏ, ÎµÎ½Ï Î¼Î±Î¸Î±Î¯Î½Î¿Ï
με Ïα ÏελεÏ
Ïαία εÏιÏÏημονικά νÎα γÏÏÏ Î±ÏÏ Ïο wellness. ÎνακαλÏÏÏε tips, ÏÏ
μβοÏ
λÎÏ ÎºÎ±Î¹ ιÏÏοÏÎ¯ÎµÏ ÏοÏ
θα ÏÎ±Ï Î²Î¿Î·Î¸Î®ÏοÏ
ν να κινηθείÏε με γνÏÏη Ïε μια Ïιο ενÏÏ
νείδηÏη καθημεÏινÏÏηÏα."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:gap-4 justify-center lg:justify-start",children:[s.jsxs(F,{size:"lg",className:"w-full sm:w-auto",onClick:()=>_("audio-player"),children:[s.jsx(Os,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-2"}),s.jsx("span",{className:"text-sm sm:text-base",children:"ÎκοÏÏÏε Ïο Podcast (free)"})]}),s.jsxs(F,{variant:"outline",size:"lg",className:"w-full sm:w-auto",onClick:()=>_("current-episode"),children:[s.jsx(iE,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-2"}),s.jsx("span",{className:"text-sm sm:text-base",children:"ÎείÏε Ïο Podcast (members)"})]})]})]}),s.jsx("div",{className:"flex justify-center lg:justify-end order-first lg:order-last",children:s.jsx("div",{className:"relative",children:s.jsx("img",{src:"/lovable-uploads/7b1901ba-4767-4891-a503-88dec4bdb9e7.png",alt:"Nadia Talks Wellness Podcast Cover",className:"w-full max-w-xs sm:max-w-sm lg:max-w-xs xl:max-w-sm rounded-lg shadow-lg"})})})]})})})}),!N&&s.jsx("section",{id:"audio-player",className:"py-8 sm:py-10 lg:py-12 bg-muted/20",children:s.jsx("div",{className:"container mx-auto px-4 sm:px-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h2",{className:"text-xl sm:text-2xl font-bold mb-4 sm:mb-6 text-foreground",children:"ÎκοÏÏÏε Ïο Podcast"}),s.jsx("p",{className:"text-sm sm:text-base text-muted-foreground mb-6 sm:mb-8 max-w-2xl mx-auto",children:"ÎκοÏÏÏε Ïα εÏειÏÏδια Î¼Î±Ï Î±ÏεÏ
Î¸ÎµÎ¯Î±Ï Î±ÏÏ ÎµÎ´Ï ÏÏÏÎ¯Ï Î½Î± ÏÏειάζεÏαι να μεÏαβείÏε Ïε άλλη ÏλαÏÏÏÏμα."}),s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{id:"buzzsprout-large-player",className:"w-full max-w-2xl min-h-[200px]"})}),s.jsxs("div",{className:"mt-6 sm:mt-8 flex flex-col gap-3 sm:gap-4 justify-center items-center",children:[s.jsx("p",{className:"text-muted-foreground text-xs sm:text-sm text-center px-4",children:"ÎκοÏÏÏε Ïο Nadia Talks Wellness ÏÏην αγαÏημÎνη ÏÎ±Ï ÏλαÏÏÏÏμα:"}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:gap-4 justify-center items-center w-full max-w-md
968sm:max-w-none mx-auto",children:[s.jsxs("a",{href:"https://open.spotify.com/show/4yNzjR7r4sEVf5oZxootZq",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center sm:justify-start gap-3 px-4 py-3 sm:py-2 rounded-lg bg-card border hover:shadow-md transition-all duration-200 hover:scale-105 w-full sm:w-auto",children:[s.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/8/84/Spotify_icon.svg",alt:"Spotify",className:"h-6 w-6 sm:h-8 sm:w-8 flex-shrink-0"}),s.jsx("span",{className:"font-medium text-foreground text-sm sm:text-base",children:"Spotify"})]}),s.jsxs("a",{href:"https://podcasts.apple.com/us/podcast/nadia-boule-meets-the-expert-well-be-podcasts/id1650624920",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center sm:justify-start gap-3 px-4 py-3 sm:py-2 rounded-lg bg-card border hover:shadow-md transition-all duration-200 hover:scale-105 w-full sm:w-auto",children:[s.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/e/e7/Podcasts_%28iOS%29.svg",alt:"Apple Podcasts",className:"h-6 w-6 sm:h-8 sm:w-8 flex-shrink-0"}),s.jsx("span",{className:"font-medium text-foreground text-sm sm:text-base",children:"Apple Podcasts"})]}),s.jsxs("a",{href:"https://www.youtube.com/@WellBebyNadiaBoule",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center sm:justify-start gap-3 px-4 py-3 sm:py-2 rounded-lg bg-card border hover:shadow-md transition-all duration-200 hover:scale-105 w-full sm:w-auto",children:[s.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/0/09/YouTube_full-color_icon_%282017%29.svg",alt:"YouTube",className:"h-6 w-6 sm:h-8 sm:w-8 flex-shrink-0"}),s.jsx("span",{className:"font-medium text-foreground text-sm sm:text-base",children:"YouTube"})]})]})]})]})})}),s.jsx("section",{id:"current-episode",className:N?"pt-6 pb-8":"py-8 sm:py-12 lg:py-16",children:s.jsx("div",{className:"container mx-auto px-4 sm:px-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[N?s.jsxs("div",{className:"flex flex-col items-center mb-6 px-4",children:[s.jsx(pa,{className:"w-10 h-10 text-primary mb-3"}),s.jsx("h2",{className:"text-2xl font-bold text-center text-foreground",children:"Nadia Talks Wellness"})]}):s.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-center mb-6 sm:mb-8 text-foreground",children:"Nadia Talks Wellness"}),N?s.jsx(ii,{children:s.jsxs("div",{className:"mx-4 bg-card rounded-lg shadow-md border overflow-hidden",children:[s.jsx("div",{className:"aspect-video bg-black relative",children:T&&s.jsx("iframe",{src:T.embedUrl,width:"100%",height:"100%",frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full"})}),s.jsxs("div",{className:"p-4",children:[s.jsx("h3",{className:"text-lg font-bold text-foreground mb-2 line-clamp-2",children:(T==null?void 0:T.title)||"Loading..."}),s.jsx("div",{className:"text-sm text-muted-foreground mb-3",children:s.jsx("span",{children:(T==null?void 0:T.publishDate)||""})}),T&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed whitespace-pre-line",children:I(T.description,T.id)}),T.description.length>200&&s.jsx(F,{variant:"ghost",onClick:()=>E(T.id),className:"mt-2 p-0 h-auto text-primary hover:text-primary/80 text-sm",children:r[T.id]?"ÎμÏάνιÏη λιγÏÏεÏÏν":"ÎμÏάνιÏη ÏεÏιÏÏÏÏεÏÏν"})]})]})]})}):s.jsxs("div",{className:"bg-card rounded-xl p-4 sm:p-6 lg:p-8 shadow-lg",children:[s.jsxs("div",{className:"mb-4 sm:mb-6",children:[s.jsx("h3",{className:"text-lg sm:text-xl lg:text-2xl font-bold text-foreground mb-2 sm:mb-3 line-clamp-2",children:(T==null?void 0:T.title)||"Loading..."}),s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4 text-xs sm:text-sm text-muted-foreground mb-3 sm:mb-4",children:[s.jsx("span",{children:(T==null?void 0:T.duration)||""}),s.jsx("span",{className:"hidden sm:inline",children:"â¢"}),s.jsx("span",{children:(T==null?void 0:T.publishDate)||""})]})]}),s.jsx("div",{className:"flex justify-center mb-4 sm:mb-6",children:s.jsx("div",{className:"w-full max-w-2xl relative",children:T&&s.jsxs(s.Fragment,{children:[s.jsx("iframe",{"data-testid":"embed-iframe",style:{borderRadius:"12px"},src:T.embedUrl,width:"100%",height:"232",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",className:"w-full min-h-[232px] sm:min-h-[351px] sm:h-[351px]",onError:P=>console.error("Video failed to load:",T.embedUrl),onLoad:()=>{console.log("Video loaded successfully:",T.embedUrl),T.embedUrl.includes("autoplay=1")&&(console.log("ð¬ Tracking clicked episode activity:",T.title),j({vimeoId:T.id,pageType:"podcast",title:T.title}))}},T.id),!T.embedUrl.includes("autoplay=1")&&s.jsx("div",{className:"absolute inset-0 bg-transparent cursor-pointer z-10",onClick:()=>
968{if(!S){p(!0);return}console.log("ð¬ User clicked on main video to play:",T.title),j({vimeoId:T.id,pageType:"podcast",title:T.title});const P=document.querySelector(`[data-video-overlay="${T.id}"]`);P&&P.remove()},"data-video-overlay":T.id})]})})}),s.jsx("div",{children:T&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-sm sm:text-base text-muted-foreground leading-relaxed whitespace-pre-line",children:I(T.description,T.id)}),T.description.length>200&&s.jsx(F,{variant:"ghost",onClick:()=>E(T.id),className:"mt-2 p-0 h-auto text-primary hover:text-primary/80 text-sm",children:r[T.id]?"ÎμÏάνιÏη λιγÏÏεÏÏν":"ÎμÏάνιÏη ÏεÏιÏÏÏÏεÏÏν"})]})})]})]})})}),s.jsx("section",{className:N?"pb-24 bg-muted/30":"py-8 sm:py-12 lg:py-16 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4 sm:px-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-center mb-6 sm:mb-8 text-foreground",children:"Îλα Ïα ÎÏειÏÏδια"}),s.jsx("div",{className:"max-w-md mx-auto mb-6 sm:mb-8",children:s.jsxs("div",{className:"relative",children:[s.jsx(Hr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4"}),s.jsx(ke,{type:"text",placeholder:"ÎναζήÏηÏη εÏειÏοδίÏν...",value:o,onChange:P=>l(P.target.value),className:"pl-10 pr-4"})]})}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-2 sm:gap-4 mb-8 sm:mb-12",children:[s.jsx(F,{variant:a===null?"default":"outline",onClick:()=>{console.log("Setting selectedSeason to null"),i(null)},className:"text-sm",children:"Îλα"}),c.sort((P,M)=>M.seasonNumber-P.seasonNumber).map(P=>s.jsx(F,{variant:a===P.seasonNumber?"default":"outline",onClick:()=>{console.log("Setting selectedSeason to:",P.seasonNumber),console.log("Current selectedSeason:",a),i(P.seasonNumber)},className:"text-sm",children:P.title},P.seasonNumber))]}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6 lg:gap-8",children:A.map(P=>{const M=P.title.length,D=M>60?3:M>30?2:1,$=D===3?1:D===2?2:3;return s.jsxs("div",{className:`bg-card rounded-lg shadow-sm border cursor-pointer transition-all duration-200 hover:shadow-md hover:scale-[1.02] h-full flex flex-col ${(T==null?void 0:T.id)===P.id?"ring-2 ring-primary":""}`,onClick:()=>{if(!S){if(N){const X=document.getElementById("current-episode");X&&X.scrollIntoView({behavior:"smooth",block:"start"})}else p(!0);return}const W={...P,embedUrl:P.embedUrl.includes("?")?P.embedUrl+"&autoplay=1":P.embedUrl+"?autoplay=1"};k(W),setTimeout(()=>{const X=document.getElementById("current-episode");X&&X.scrollIntoView({behavior:"smooth",block:"start"})},100),j({vimeoId:P.id,pageType:"podcast",title:P.title})},children:[s.jsxs("div",{className:"aspect-video bg-muted rounded-t-lg mb-4 relative overflow-hidden",children:[s.jsx("img",{src:P.thumbnail,alt:P.title,className:"w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-black/20 flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity",children:s.jsx(Os,{className:"w-12 h-12 text-white"})}),s.jsx("div",{className:"absolute bottom-2 right-2 bg-black/80 text-white text-xs px-2 py-1 rounded",children:P.duration})]}),s.jsxs("div",{className:"p-4 flex flex-col flex-grow",children:[s.jsx("h3",{className:`text-lg font-semibold mb-2 text-foreground line-clamp-${D}`,style:{display:"-webkit-box",WebkitLineClamp:D,WebkitBoxOrient:"vertical",overflow:"hidden"},children:P.title}),s.jsx("p",{className:`text-sm text-muted-foreground mb-3 whitespace-pre-line ${r[P.id]?"":`line-clamp-${$}`}`,style:r[P.id]?{}:{display:"-webkit-box",WebkitLineClamp:$,WebkitBoxOrient:"vertical",overflow:"hidden"},children:r[P.id]?P.description:I(P.description,P.id)}),P.description.length>200&&s.jsx(F,{variant:"ghost",onClick:W=>{W.stopPropagation(),E(P.id)},className:"mb-2 p-0 h-auto text-xs text-primary hover:text-primary/80",children:r[P.id]?"ÎιγÏÏεÏα":"ΠεÏιÏÏÏÏεÏα"}),s.jsx("div",{className:"text-xs text-muted-foreground mt-auto",children:P.publishDate})]})]},P.id)})}),L&&s.jsx("div",{className:"flex justify-center mt-8 sm:mt-12",children:s.jsx(F,{onClick:O,variant:"outline",size:"lg",className:"px-8",children:"ΦÏÏÏÏÏη ÏεÏιÏÏÏÏεÏÏν εÏειÏοδίÏν"})})]})})})]}),N?f&&s.jsx(Mj,{}):s.jsx(Cg,{isOpen:f,onClose:()=>p(!1),title:"Premium Video Content",description:"Watch full podcast episodes with your premium subscription."}),!N&&s.jsx(Be,{})]})},_t=({children:e,requireSubscription:t=!0,allowTrialUsers:r=!0,paywallTitle:n="ÎίνεÏε ÎÎÎ»Î¿Ï ÏÏα Well Be Workouts",paywallDescription:a="Îε μία ÏÏ
νδÏομή αÏοκÏήÏÏε ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏ
968Ïμενο ÏοÏ
Well Be."})=>{const{user:i}=jt(),{subscribed:o,isTrialUser:l,loading:c,isAdminFreeAccess:d}=_i(),[u,m]=h.useState(!1),f=qe(),p=$s(),{isMobileApp:v}=ar();return h.useEffect(()=>{if(!c&&t&&!(i&&(o||r&&l||d))&&!v){const y=p.pathname+p.search;f(`/auth?returnUrl=${encodeURIComponent(y)}`,{replace:!0});return}},[i,o,l,d,c,t,r,f,p,v]),c?s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}):!t||i&&(o||r&&l||d)?s.jsx(s.Fragment,{children:e}):v?s.jsx(Mj,{}):s.jsxs("div",{className:"relative",children:[e,u&&s.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 pointer-events-auto"}),s.jsx(Cg,{isOpen:u,onClose:()=>m(!1),title:n,description:a})]})},WZ=()=>{const[e,t]=h.useState({}),[r,n]=h.useState(null),[a,i]=h.useState(""),[o,l]=h.useState([]),[c,d]=h.useState(9);jt(),_i();const{videos:u,loading:m}=ki("podcast"),{trackVideoActivity:f}=th(),p=S=>{t(E=>({...E,[S]:!E[S]}))},v=(S,E)=>{const _=e[E],I=200;return S.length<=I||_?S:S.substring(0,I)+"..."},g=u.map(S=>{let E="";if(S.embedHtml){const R=S.embedHtml.match(/src="([^"]+)"/);E=R?R[1].replace(/&/g,"&"):""}E?E=E.includes("api=1")?E:E+"&api=1":E=`https://player.vimeo.com/video/${S.vimeoId}?badge=0&autopause=0&player_id=${S.vimeoId}&app_id=58479&api=1`;const _=S.releaseDate||S.publishedAt||S.createdAt,I=_?new Date(_).toLocaleDateString("el-GR"):new Date().toLocaleDateString("el-GR");return{id:S.vimeoId,title:S.title,description:S.description||"",embedUrl:E,thumbnail:S.thumbnail||"/api/placeholder/300/200",duration:S.duration||"0:00",publishDate:I,season:S.seasonNumber||1,episodeNumber:S.episodeNumber||1}}),[b,y]=h.useState(null);h.useEffect(()=>{(async()=>{try{const E=await vl.getPodcastSeasons();console.log("Loaded seasons data:",E),l(E)}catch(E){console.error("Error loading seasons:",E)}})(),g.length>0&&!b&&y([...g].sort((E,_)=>_.season-E.season||_.episodeNumber-E.episodeNumber)[0])},[u,g.length]),h.useEffect(()=>{g.length>0&&!b&&y([...g].sort((S,E)=>E.season-S.season||E.episodeNumber-S.episodeNumber)[0])},[g,b]);const x=g.filter(S=>{const E=r?S.season===r:!0,_=a.trim()===""||S.title.toLowerCase().includes(a.toLowerCase())||S.description.toLowerCase().includes(a.toLowerCase());return E&&_}).sort((S,E)=>E.season-S.season||E.episodeNumber-S.episodeNumber),w=r===null?x.slice(0,c):x,j=r===null&&x.length>c,N=()=>{d(S=>S+9)};return h.useEffect(()=>{d(9)},[r,a]),s.jsx(_t,{requireSubscription:!0,paywallTitle:"ÎίνεÏε ÎÎÎ»Î¿Ï Î³Î¹Î± Î ÏÏÏβαÏη ÏÏο Podcast",paywallDescription:"Îε μία ÏÏ
νδÏομή αÏοκÏήÏÏε ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏÏμενο ÏοÏ
Well Be.",children:s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(fs,{}),s.jsxs("main",{children:[s.jsx("section",{id:"current-episode",className:"pt-6 pb-8",children:s.jsx("div",{className:"container mx-auto px-4 sm:px-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex flex-col items-center mb-6 px-4",children:[s.jsx(pa,{className:"w-10 h-10 text-primary mb-3"}),s.jsx("h2",{className:"text-2xl font-bold text-center text-foreground",children:"Nadia Talks Wellness"})]}),s.jsxs("div",{className:"mx-4 bg-card rounded-lg shadow-md border overflow-hidden",children:[s.jsx("div",{className:"aspect-video bg-black relative",children:b&&s.jsx("iframe",{src:b.embedUrl,width:"100%",height:"100%",frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full"})}),s.jsxs("div",{className:"p-4",children:[s.jsx("h3",{className:"text-lg font-bold text-foreground mb-2 line-clamp-2",children:(b==null?void 0:b.title)||"Loading..."}),s.jsx("div",{className:"text-sm text-muted-foreground mb-3",children:s.jsx("span",{children:(b==null?void 0:b.publishDate)||""})}),b&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed whitespace-pre-line",children:v(b.description,b.id)}),b.description.length>200&&s.jsx(F,{variant:"ghost",onClick:()=>p(b.id),className:"mt-2 p-0 h-auto text-primary hover:text-primary/80 text-sm",children:e[b.id]?"ÎμÏάνιÏη λιγÏÏεÏÏν":"ÎμÏάνιÏη ÏεÏιÏÏÏÏεÏÏν"})]})]})]})]})})}),s.jsx("section",{className:"pb-24 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4 sm:px-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-center mb-6 sm:mb-8 text-foreground",children:"Îλα Ïα ÎÏειÏÏδια"}),s.jsx("div",{className:"max-w-md mx-auto mb-6 sm:mb-8",children:s.jsxs("div",{className:"relative",children:[s.jsx(Hr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4"}),s.jsx(ke,{type:"text",placeholder:"ÎναζήÏηÏη εÏειÏοδίÏν...",value:a,onChange:S=>i(S.target.value),className:"pl-10 pr-4"})]})}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-2 sm:gap-4 mb-8 sm:mb-12",children:[s.jsx(F,{variant:r===null?"default":"outline",onClick:()=>{console.log("Setting selectedSeason to null"),n(null)},className:"text-sm",children:"Îλα"}),o.sort((S,E)=>E.seasonNumber-S.seasonNumber).map(S=>s.jsx(F,{variant:r===S.seasonNumber?"default":"outline",onClick:()=>{console.log("Setting selectedSeason to:",S.seasonNumber),console.log("Current selectedSeason:",r),n(S.seasonNumber)},className:"text-sm",children:S.title},S.seasonNumber))]}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6 lg:gap-8",children:w.map(S=>{const E=S.title.length,_=E>60?3:E>30?2:1,I=_===3?1:_===2?2:3;return s.jsxs("div",{className:`bg-card rounded-lg shadow-sm border cursor-pointer transition-all duration-200 hover:shadow-md hover:scale-[1.02] h-full flex flex-col ${(b==null?void 0:b.id)===S.id?"ring-2 ring-primary":""}`,onClick:()=>{const R={...S,embedUrl:S.embedUrl.includes("?")?S.embedUrl+"&autoplay=1":S.embedUrl+"?autoplay=1"};y(R),setTimeout(()=>{const T=document.getElementById("current-episode");T&&T.scrollIntoView({behavior:"smooth",block:"start"})},100),f({vimeoId:S.id,pageType:"podcast",title:S.title})},children:[s.jsxs("div",{className:"aspect-video bg-muted rounded-t-lg mb-4 relative overflow-hidden",children:[s.jsx("img",{src:S.thumbnail,alt:S.title,className:"w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-black/20 flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity",children:s.jsx(Os,{className:"w-12 h-12 text-white"})}),s.jsx("div",{className:"absolute bottom-2 right-2 bg-black/80 text-white text-xs px-2 py-1 rounded",children:S.duration})]}),s.jsxs("div",{className:"p-4 flex flex-col flex-grow",children:[s.jsx("h3",{className:`text-lg font-semibold mb-2 text-foreground line-clamp-${_}`,style:{display:"-webkit-box",WebkitLineClamp:_,WebkitBoxOrient:"vertical",overflow:"hidden"},children:S.title}),s.jsx("p",{className:`text-sm text-muted-foreground mb-3 whitespace-pre-line ${e[S.id]?"":`line-clamp-${I}`}`,style:e[S.id]?{}:{display:"-webkit-box",WebkitLineClamp:I,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e[S.id]?S.description:v(S.description,S.id)}),S.description.length>200&&s.jsx(F,{variant:"ghost",onClick:R=>
968{R.stopPropagation(),p(S.id)},className:"mb-2 p-0 h-auto text-xs text-primary hover:text-primary/80",children:e[S.id]?"ÎιγÏÏεÏα":"ΠεÏιÏÏÏÏεÏα"}),s.jsx("div",{className:"text-xs text-muted-foreground mt-auto",children:S.publishDate})]})]},S.id)})}),j&&s.jsx("div",{className:"flex justify-center mt-8 sm:mt-12",children:s.jsx(F,{onClick:N,variant:"outline",size:"lg",className:"px-8",children:"ΦÏÏÏÏÏη ÏεÏιÏÏÏÏεÏÏν εÏειÏοδίÏν"})})]})})})]})]})})},VZ=()=>{const[e,t]=h.useState({connection:"pending",auth:"pending",videos:"pending",categories:"pending"}),[r,n]=h.useState({}),a=async(l,c)=>{try{console.log(`𧪠DiagnosticComponent: Running test ${l}...`),await c(),console.log(`â
DiagnosticComponent: Test ${l} passed`),t(d=>({...d,[l]:"success"}))}catch(d){console.error(`â DiagnosticComponent: Test ${l} failed:`,d),console.error(`â DiagnosticComponent: Error details for ${l}:`,{message:d instanceof Error?d.message:"Unknown error",stack:d instanceof Error?d.stack:void 0,type:typeof d}),t(u=>({...u,[l]:"error"})),n(u=>({...u,[l]:d instanceof Error?d.message:"Unknown error"}))}},i=async()=>{t({connection:"pending",auth:"pending",videos:"pending",categories:"pending"}),n({}),await a("connection",async()=>{const{data:l,error:c}=await U.from("profiles").select("count").limit(1);if(c)throw c}),await a("auth",async()=>{const{data:{user:l},error:c}=await U.auth.getUser();if(c)throw c;if(!l)throw new Error("No authenticated user")}),await a("videos",async()=>{const{data:l,error:c}=await U.from("videos").select("*").limit(1);if(c)throw c}),await a("categories",async()=>{const{data:l,error:c}=await U.from("video_categories").select("*").limit(1);if(c)throw c})};h.useEffect(()=>{i()},[]);const o=l=>{switch(l){case"pending":return s.jsx(ye,{variant:"secondary",children:"Testing..."});case"success":return s.jsx(ye,{variant:"default",className:"bg-green-500",children:"â Pass"});case"error":return s.jsx(ye,{variant:"destructive",children:"â Fail"})}};return s.jsxs(oe,{className:"w-full max-w-2xl mx-auto",children:[s.jsx(xe,{children:s.jsx(be,{children:"Supabase Connection Diagnostics"})}),s.jsxs(ce,{className:"space-y-4",children:[Object.entries(e).map(([l,c])=>s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"capitalize",children:[l," Test:"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[o(c),r[l]&&s.jsx("span",{className:"text-sm text-red-500 max-w-md truncate",children:r[l]})]})]},l)),s.jsx("div",{className:"pt-4 border-t",children:s.jsx(F,{onClick:i,className:"w-full",children:"Rerun Tests"})}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"URL:"})," https://gcpjvgszviytdocnvyao.supabase.co"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Status:"})," Client initialized"]})]})]})]})},HZ=()=>{const[e,t]=h.useState(!1),{videos:r,categories:n,loading:a,error:i}=ZP(),{isVideoWatched:o}=Hl(),[l,c]=h.useState(""),[d,u]=h.useState("all"),[m,f]=h.useState(1),[p,v]=h.useState(8);qe();const{isMobileApp:g,navigateWithPlatform:b}=ar(),y=h.useRef(null),x=8,w=h.useMemo(()=>{let C=r;if(l.trim()&&(C=C.filter(A=>A.title.toLowerCase().includes(l.toLowerCase())||A.description&&A.description.toLowerCase().includes(l.toLowerCase()))),d!=="all"){const A=n.find(L=>L.slug===d);A&&(C=C.filter(L=>{var O;return((O=L.categoryIds)==null?void 0:O.includes(A.id))||!1}))}return C},[r,l,d,n]),j=()=>{c(""),u("all"),f(1)};h.useEffect(()=>{f(1),v(8)},[l,d]),h.useEffect(()=>{if(!g||!y.current)return;const C=new IntersectionObserver(A=>{A[0].isIntersecting&&p<w.length&&v(L=>Math.min(L+x,w.length))},{threshold:.1});return C.observe(y.current),()=>C.disconnect()},[g,p,w.length]);const N=C=>{b(`/recipes/${C}`)},S=Math.ceil(w.length/x),E=(m-1)*x,_=E+x,I=w.slice(E,_),R=g?w.slice(0,p):I,T=C=>{f(C),window.scrollTo({top:0,behavior:"smooth"})},k=C=>{const A=C.length;return A>80?"text-lg":A>60?"text-xl":A>40?"text-2xl":"text-3xl"};return i?s.jsx("div",{className:"container mx-auto px-4 py-8",children:s.jsx(VZ,{})}):a?s.jsxs("div",{className:"min-h-screen bg-background",children:[g?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsx("main",{className:g?"pt-6":"pt-[80px] sm:pt-[88px] md:pt-[96px]",children:s.jsx("div",{className:"container mx-auto px-6 py-12",children:s.jsx("div",{className:"flex justify-center items-center h-64",children:s.jsx("div",{className:"text-lg",children:"ΦÏÏÏÏÏη ÏÏ
νÏαγÏν..."})})})}),!g&&s.jsx(Be,{})]}):s.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"hsl(45 25% 92%)"},children:[g?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsx("main",{className:g?"pt-6":"",children:s.jsxs("div",{className:"container mx-auto px-4 sm:px-6 py-8 sm:py-12",children:[s.jsx(Fo,{}),s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-4 text-foreground",children:"ð¥ Nadia's Recipes"}),s.jsx("p",{className:"text-xl text-muted-foreground animate-fade-in",children:"ÎνακαλÏÏÏε Ï
γιεινÎÏ ÎºÎ±Î¹ γεÏ
ÏÏικÎÏ ÏÏ
νÏαγÎÏ Î³Î¹Î± κάθε γεÏμα! â¨"})]}),s.jsx("div",{className:"flex flex-col gap-4 mb-8",children:s.jsxs("div",{className:"relative flex-1",children:[s.jsx(Hr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4"}),s.jsx(ke,{placeholder:"ÎναζήÏηÏη ÏÏ
νÏαγÏν...",value:l,onCh
968ange:C=>c(C.target.value),className:"pl-10"})]})}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-2 sm:gap-4 mb-8",children:[s.jsx(F,{variant:d==="all"?"default":"outline",onClick:()=>u("all"),className:"text-sm",children:"Îλα"}),n.map(C=>s.jsx(F,{variant:d===C.slug?"default":"outline",onClick:()=>u(C.slug),className:"text-sm",children:C.name},C.id))]}),s.jsx("div",{className:`mb-6 flex flex-col sm:flex-row sm:justify-between sm:items-center gap-2 ${g?"hidden":""}`,children:s.jsxs("p",{className:"text-muted-foreground",children:[w.length," αÏοÏελÎÏμαÏα",S>1&&s.jsxs("span",{className:"ml-2",children:["(Σελίδα ",m," αÏÏ ",S,")"]})]})}),w.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground text-lg",children:r.length===0?"Îεν Ï ÏάÏÏÎ¿Ï Î½ διαθÎÏÎ¹Î¼ÎµÏ ÏÏ Î½ÏαγÎÏ Î±Ï Ïή Ïη ÏÏιγμή.":"Îεν βÏÎθηκαν ÏÏ Î½ÏαγÎÏ Î¼Îµ Ïα εÏιλεγμÎνα κÏιÏήÏια."}),r.length>0&&s.jsx(F,{variant:"outline",onClick:j,className:"mt-4",children:"ÎαθαÏιÏμÏÏ Î¦Î¯Î»ÏÏÏν"})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 md:gap-6",children:R.map(C=>s.jsx("div",{className:`bg-card rounded-lg shadow-lg border overflow-hidden cursor-pointer hover:shadow-xl transition-all duration-200 transform hover:-translate-y-1 w-full ${g?"max-w-[300px]":"max-w-sm"} mx-auto`,style:{borderColor:"hsl(var(--wellbe-dark-beige))"},onClick:()=>N(C.vimeoId),children:s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"w-full aspect-[9/16] relative overflow-hidden bg-black",children:[s.jsx("img",{src:C.thumbnail,alt:C.title,className:"w-full h-full object-cover object-center scale-110",loading:"lazy",decoding:"async"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-amber-900/30 via-amber-900/5 to-transparent pointer-events-none"}),o(C.vimeoId)&&s.jsx("div",{className:"absolute top-3 right-3",children:s.jsx(ye,{variant:"secondary",className:"bg-black/70 text-white text-xs px-2 py-1",children:"â Watched"})}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center transition-colors",children:s.jsx("div",{className:"bg-white/90 rounded-full p-2 sm:p-3 hover:bg-white transition-colors",children:s.jsx(Os,{className:"w-4 h-4 sm:w-6 sm:h-6 text-black ml-0.5",fill:"currentColor"})})})]}),s.jsx("div",{className:"p-3 sm:p-4 flex items-center justify-center min-h-[80px]",children:s.jsx("h2",{className:`${k(C.title)} font-semibold leading-tight text-center line-clamp-3`,style:{color:"hsl(var(--wellbe-dark-beige))"},children:C.title})})]})},C.vimeoId))}),g?p<w.length&&s.jsx("div",{ref:y,className:"text-center py-8",children:s.jsx("p",{className:"text-muted-foreground",children:"ΦÏÏÏÏÏη..."})}):S>1&&s.jsx("div",{className:"flex justify-center mt-12",children:s.jsx(Od,{children:s.jsxs(Dd,{children:[m>1&&s.jsx(Ds,{children:s.jsx(Fd,{onClick:()=>T(m-1),className:"cursor-pointer"})}),Array.from({length:S},(C,A)=>A+1).map(C=>C===1||C===S||C>=m-1&&C<=m+1?s.jsx(Ds,{children:s.jsx(Ld,{onClick:()=>T(C),isActive:m===C,className:"cursor-pointer",children:C})},C):C===m-2||C===m+2?s.jsx(Ds,{children:s.jsx("span",{className:"px-3 py-2",children:"..."})},C):null),m<S&&s.jsx(Ds,{children:s.jsx($d,{onClick:()=>T(m+1),className:"cursor-pointer"})})]})})})]})]})}),!g&&s.jsx(Be,{})]})},qZ=()=>{const{videoId:e}=la();qe();const{videos:t,loading:r}=ki(),[n,a]=h.useState(!1),[i,o]=h.useState(!1),{user:l}=jt(),{toast:c}=at(),{trackVideoActivity:d}=th(),{isMobileApp:u,navigateWithPlatform:m}=ar(),f=h.useMemo(()=>t.find(b=>b.vimeoId===e),[t,e]);h.useEffect(()=>{(async()=>{l!=null&&l.id&&e&&f&&(await d({vimeoId:e,pageType:"recipes",title:f.title}),p())})()},[e,l==null?void 0:l.id,f]);const p=async()=>{if(!(!l||!e))try{const{data:b}=await U.from("user_favorites").select("id").eq("user_id",l.id).eq("video_id",e).maybeSingle();b&&a(!0)}catch(b){console.error("Error checking favorite status:",b)}},v=async()=>{if(!l){c({title:"Î£Ï Î½Î´ÎµÎ¸ÎµÎ¯Ïε",description:"Î ÏÎÏει να ÏÏ Î½Î´ÎµÎ¸ÎµÎ¯Ïε για να ÏÏοÏθÎÏεÏε αγαÏημÎνα",variant:"destructive"});return}if(f)try{n?(await U.from("user_favorites").delete().eq("user_id",l.id).eq("video_id",e),a(!1),c({title:"ÎÏαιÏÎθηκε",description:"Î ÏÏ Î½Ïαγή αÏαιÏÎθηκε αÏÏ Ïα αγαÏημÎνα"})):(await U.from("user_favorites").insert({user_id:l.id,video_id:e,video_title:f.title,video_thumbnail:f.thumbnail}),a(!0),c({title:"Î ÏοÏÏÎθηκε",description:"Î ÏÏ Î½Ïαγή ÏÏοÏÏÎθηκε ÏÏα αγαÏημÎνα"}))}catch(b){console.error("Error toggling favorite:",b),c({title:"ΣÏάλμα",description:"Îεν ήÏαν Î´Ï Î½Î±Ïή η ενημÎÏÏÏη ÏÏν αγαÏημÎνÏν",variant:"destructive"})}},g=()=>{if(!f)return;const b=window.open("","_blank");b&&(b.document.write(` 969 <html> 970 <head> 971 <title>${f.title}</title> 972 <style> 973 body { 974 font-family: Arial, sans-serif; 975 padding: 20px; 976 margin: 0; 977 line-height: 1.6; 978 } 979 .header { 980 text-align: center; 981 margin-bottom: 30px; 982 } 983 .header h1 { 984 margin: 0 0 5px 0; 985 font-size: 24px; 986 color: #2c5530; 987 } 988 .header p { 989 margin: 0; 990 font-size: 14px; 991 color: #666; 992 } 993 h2 { 994 color: #2c5530; 995 margin-top: 30px; 996 margin-bottom: 15px; 997 border-bottom: 2px solid #2c5530; 998 padding-bottom: 5px; 999 } 1000 .recipe-content { 1001 line-height: 1.6; 1002 white-space: pre-wrap; 1003 margin-bottom: 40px; 1004 } 1005 .footer { 1006 border-top: 1px solid #ddd; 1007 padding-top: 20px; 1008 margin-top: 40px; 1009 text-align: center; 1010 color: #666; 1011 font-size: 14px; 1012 display: flex; 1013 align-items: center; 1014 justify-content: center; 1015 gap: 10px; 1016 } 1017 .footer img { 1018 height: 25px; 1019 vertical-align: middle; 1020 } 1021 </style> 1022 </head> 1023 <body> 1024 <div class="header"> 1025 <h1>ð¥ Nadia's Recipes</h1> 1026 <p>ÎνακαλÏÏÏε Ï Î³Î¹ÎµÎ¹Î½ÎÏ ÎºÎ±Î¹ Î³ÎµÏ ÏÏικÎÏ ÏÏ Î½ÏαγÎÏ Î³Î¹Î± κάθε γεÏμα! â¨</p> 1027 </div> 1028 <h2>${f.title}</h2> 1029 <div class="recipe-content"> 1030 ${f.description||""} 1031 </div> 1032 <div class="footer">
1033 <span>ÎÏήκα Ïη ÏÏ Î½Ïαγή ÏÏο Well Be by Nadia Boule</span> 1034 <img src="/lovable-uploads/5fcdd3d0-e4dd-4855-918a-eabd673cfde7.png" alt="Well Be Logo" /> 1035 <span>www.wellbe.gr</span> 1036 </div> 1037 </body> 1038 </html> 1039 `),b.document.close(),b.print())};return r?s.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"hsl(45 25% 92%)"},children:[u?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:i,onMenuToggle:()=>o(!i)}),s.jsx("div",{className:"flex justify-center items-center h-96",children:s.jsx("div",{className:"text-lg",children:"ΦÏÏÏÏÏη ÏÏ Î½ÏαγήÏ..."})})]}):f?s.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"hsl(45 25% 92%)"},children:[u?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:i,onMenuToggle:()=>o(!i)}),s.jsxs("main",{className:`container mx-auto px-4 ${u?"py-4":"py-8"}`,children:[s.jsxs(F,{variant:"ghost",onClick:()=>m("/recipes"),className:`mb-4 hover:bg-wellbe-dark-beige/10 ${u?"sticky top-14 z-10 bg-background/95 backdrop-blur -mx-4 px-4 rounded-none border-b":""}`,children:[s.jsx(as,{className:"w-4 h-4 mr-2"}),"ΠίÏÏ ÏÏÎ¹Ï Î£Ï Î½ÏαγÎÏ"]}),s.jsx("div",{className:u?"space-y-4":"max-w-4xl mx-auto",children:s.jsxs("div",{className:u?"flex flex-col space-y-4":"grid grid-cols-1 md:grid-cols-2 gap-6 lg:gap-6",children:[s.jsx("div",{className:"w-full",children:s.jsx("div",{className:`aspect-[9/16] ${u?"w-full max-w-md mx-auto":"w-full max-w-sm mx-auto"} bg-black rounded-lg overflow-hidden`,children:s.jsx(qj,{embedHtml:f.embedHtml,videoId:f.vimeoId,className:"w-full h-full"})})}),s.jsx("div",{className:"w-full",children:s.jsxs("div",{className:"border border-black rounded-lg bg-card p-6 shadow-lg",children:[s.jsx("h1",{className:`${u?"text-2xl":"text-3xl md:text-4xl"} font-bold mb-4`,style:{color:"hsl(var(--wellbe-dark-beige))"},children:f.title}),s.jsxs("div",{className:"flex gap-3 mb-6",children:[s.jsxs(F,{variant:"outline",size:"sm",onClick:v,className:n?"bg-red-50 border-red-300":"",children:[s.jsx(ws,{className:`w-4 h-4 mr-2 ${n?"fill-red-500 text-red-500":""}`}),n?"ÎγαÏημÎνο":"ÎγαÏημÎνα"]}),s.jsxs(F,{variant:"outline",size:"sm",onClick:g,children:[s.jsx(xE,{className:"w-4 h-4 mr-2"}),"ÎκÏÏÏÏÏη"]})]}),s.jsxs("div",{className:"prose prose-sm max-w-none",children:[s.jsx("h2",{className:"text-xl font-semibold mb-3",style:{color:"hsl(var(--wellbe-dark-beige))"},children:"Î£Ï Î½Ïαγή"}),s.jsx("div",{className:"whitespace-pre-wrap text-foreground leading-relaxed",style:{fontSize:"15px"},children:f.description||"Îεν Ï ÏάÏÏει διαθÎÏιμη ÏεÏιγÏαÏή."})]})]})})]})})]}),!u&&s.jsx(Be,{})]}):s.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"hsl(45 25% 92%)"},children:[u?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:i,onMenuToggle:()=>o(!i)}),s.jsxs("div",{className:"container mx-auto px-4 py-8",children:[s.jsx("p",{className:"text-center text-lg",children:"Î ÏÏ Î½Ïαγή δεν βÏÎθηκε"}),s.jsx("div",{className:"flex justify-center mt-4",children:s.jsx(F,{onClick:()=>m("/recipes"),variant:"outline",children:"ΠίÏÏ ÏÏÎ¹Ï Î£Ï Î½ÏαγÎÏ"})})]})]})},GZ=()=>{const[e,t]=h.useState(!1),{videos:r,loading:n}=ki("recipes"),a=Fw(r),[i,o]=h.useState([]),[l,c]=h.useState(""),[d,u]=h.useState("all"),[m,f]=h.useState([]),[p,v]=h.useState(1),[g,b]=h.useState([]),y=qe(),x=9;h.useEffect(()=>{const T=async()=>{try{const{data:k,error:C}=await U.from("video_categories").select("id, name, slug, color_hex").eq("parent_category_id","28e85f97-5c01-4d93-b220-83e903a17911").eq("is_active",!0).order("sort_order");if(C)throw C;f(k||[]);const A=a.map(L=>L.id);if(A.length>0){const{data:L,error:O}=await U.from("video_category_assignments").select(` 1040 video_id, 1041 category_id, 1042 video_categories!inner (name) 1043 `).in("video_id",A);if(O)throw O;const P=a.map(M=>{const D=(L==null?void 0:L.filter(X=>X.video_id===M.id))||[],$=D.map(X=>X.category_id),W=D.map(X=>X.video_categories.name);return{...M,categoryIds:$,categories:W}});b(P)}else b(a)}catch(k){console.error("Error loading categories:",k),b(a)}};a.length>0?T():b([])},[a]);const w=()=>{let T=g;if(l.trim()&&(T=T.filter(k=>k.title.toLowerCase().includes(l.toLowerCase())||k.description.toLowerCase().includes(l.toLowerCase()))),d!=="all"){const k=m.find(C=>C.slug===d);k&&(T=T.filter(C=>{var A;return((A=C.categoryIds)==null?void 0:A.includes(k.id))||!1}))}o(T),v(1)},j=()=>{c(""),u("all"),v(1)};h.useEffect(()=>{w()},[l,d,g]);const N=T=>{y(`/recipes/${T}`)},S=Math.ceil(i.length/x),E=(p-1)*x,_=E+x,I=i.slice(E,_),R=T=>{v(T),window.scrollTo({top:0,behavior:"smooth"})};return n?s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background via-muted/20 to-accent/10",children:[s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsx("main",{className:"pt-[80px] sm:pt-[88px] md:pt-[96px]",children:s.jsx("div",{className:"container mx-auto px-6 py-12",children:s.jsx("div",{className:"flex justify-center items-center h-64",children:s.jsx("div",{className:"text-lg text-muted-foreground",children:"Loading recipes..."})})})}),s.jsx(Be,{})]}):s.jsx(_t,{requireSubscription:!0,paywallTitle:"Premium Recipes",paywallDescription:"Access Nadia's exclusive healthy recipes with your premium subscription.",children:s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background via-muted/20 to-accent/10",children:[s.jsx(Fe,{isMenuOpen:e,onMenuToggle:()=>t(!e)}),s.jsx("div",{className:"fixed top-20 right-4 z-50 bg-primary text-primary-foreground px-3 py-1 rounded-full text-xs font-medium animate-fade-in",children:"Modern Demo"}),s.jsx("main",{className:"pt-[80px] sm:pt-[88px] md:pt-[96px]",children:s.jsxs("div",{className:"container mx-auto px-6 py-12",children:[s.jsxs("div",{className:"text-center mb-16",children:[s.jsx("h1",{className:"text-6xl font-bold mb-6 bg-gradient-to-r from-foreground to-muted-foreground bg-clip-text text-transparent animate-fade-in",children:"Nadia's Recipes"}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-2xl mx-auto animate-fade-in",children:"Discover healthy and delicious recipes for every meal"})]}),s.jsxs("div",{className:"max-w-4xl mx-auto mb-12",children:[s.jsxs("div",{className:"relative mb-8",children:[s.jsx("div",{className:"absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none",children:s.jsx(Hr,{className:"h-5 w-5 text-muted-foreground"})}
1043),s.jsx(ke,{placeholder:"Search recipes...",value:l,onChange:T=>c(T.target.value),className:"pl-12 h-14 text-lg rounded-full border-none bg-background/60 backdrop-blur-sm shadow-lg ring-1 ring-border/50 focus:ring-2 focus:ring-primary/50 transition-all duration-300"})]}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-3",children:[s.jsx("button",{onClick:()=>u("all"),className:`px-6 py-3 rounded-full text-sm font-medium transition-all duration-300 ${d==="all"?"bg-primary text-primary-foreground shadow-lg scale-105":"bg-background/60 backdrop-blur-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground shadow-sm"}`,children:"All Categories"}),m.map(T=>s.jsx("button",{onClick:()=>u(T.slug),className:`px-6 py-3 rounded-full text-sm font-medium transition-all duration-300 ${d===T.slug?"bg-primary text-primary-foreground shadow-lg scale-105":"bg-background/60 backdrop-blur-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground shadow-sm"}`,children:T.name},T.id))]})]}),s.jsx("div",{className:"flex justify-between items-center mb-8 max-w-6xl mx-auto",children:s.jsxs("p",{className:"text-muted-foreground",children:[i.length," recipes found",S>1&&s.jsxs("span",{className:"ml-2 text-sm",children:["(Page ",p," of ",S,")"]})]})}),i.length===0?s.jsxs("div",{className:"text-center py-16",children:[s.jsx("p",{className:"text-muted-foreground text-lg mb-6",children:g.length===0?"No recipes available at the moment.":"No recipes found with the selected criteria."}),g.length>0&&s.jsx(F,{variant:"outline",onClick:j,className:"rounded-full px-8",children:"Clear Filters"})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8 mb-16 max-w-7xl mx-auto",children:I.map(T=>s.jsx("div",{className:"group cursor-pointer animate-fade-in",onClick:()=>N(T.id),children:s.jsxs("div",{className:"bg-card/60 backdrop-blur-sm rounded-2xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-500 hover:scale-105 border border-border/50",children:[s.jsxs("div",{className:"relative aspect-[4/3] overflow-hidden",children:[s.jsx("img",{src:T.thumbnail,alt:T.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-trans
1043parent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all duration-300",children:s.jsx("div",{className:"bg-white/95 backdrop-blur-sm rounded-full p-4 shadow-xl transform scale-75 group-hover:scale-100 transition-transform duration-300",children:s.jsx(Os,{className:"w-6 h-6 text-foreground ml-1",fill:"currentColor"})})})]}),s.jsxs("div",{className:"p-6",children:[s.jsx("h3",{className:"font-semibold text-lg leading-tight text-foreground line-clamp-2 group-hover:text-primary transition-colors duration-300",children:T.title}),T.instructor&&s.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["by ",T.instructor]})]})]})},T.id))}),S>1&&s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"bg-background/60 backdrop-blur-sm rounded-full p-2 shadow-lg border border-border/50",children:s.jsx(Od,{children:s.jsxs(Dd,{children:[p>1&&s.jsx(Ds,{children:s.jsx(Fd,{onClick:()=>R(p-1),className:"cursor-pointer hover:bg-accent rounded-full"})}),Array.from({length:S},(T,k)=>k+1).map(T=>T===1||T===S||T>=p-1&&T<=p+1?s.jsx(Ds,{children:s.jsx(Ld,{onClick:()=>R(T),isActive:p===T,className:"cursor-pointer rounded-full",children:T})},T):T===p-2||T===p+2?s.jsx(Ds,{children:s.jsx("span",{className:"px-3 py-2 text-muted-foreground",children:"..."})},T):null),p<S&&s.jsx(Ds,{children:s.jsx($d,{onClick:()=>R(p+1),className:"cursor-pointer hover:bg-accent rounded-full"})})]})})})})]})]})}),s.jsx(Be,{})]})})},eS=["overlay-beige-gradient-1","overlay-beige-gradient-2","overlay-beige-gradient-3","overlay-beige-gradient-4","overlay-beige-gradient-5","overlay-beige-gold-1","overlay-beige-gold-2","overlay-beige-gold-3","overlay-beige-gold-4","overlay-beige-gold-5","overlay-beige-brown-1","overlay-beige-brown-2","overlay-beige-brown-3","overlay-beige-brown-4","overlay-beige-brown-5","overlay-beige-orange-1","overlay-beige-orange-2","overlay-beige-orange-3","overlay-beige-orange-4","overlay-beige-orange-5","overlay-beige-pink-1","overlay-beige-pink-2","overlay-beige-pink-4","overlay-beige-pink-5","overlay-beige-purple-1","overlay-beige-purple-2","overlay-beige-purple-3","overlay-beige-purple-4","overlay-beige-purple-5","overlay-beige-blue-1","overlay-beige-blue-2","overlay-beige-blue-3","overlay-beige-blue-4","overlay-beige-blue-5","overlay-beige-teal-1","overlay-beige-teal-2","overlay-beige-teal-3","overlay-beige-teal-4","overlay-beige-teal-5","overlay-beige-green-1","overlay-beige-green-2","overlay-beige-green-3","overlay-beige-green-4","overlay-beige-green-5","overlay-beige-gray-1","overlay-beige-gray-2","overlay-beige-gray-3","overlay-beige-gray-4","overlay-beige-gray-5"],YZ=()=>{const{slug:e}=la(),t=qe(),[r]=Do(),n=r.get("debugOverlays")==="1",[a,i]=h.useState(!1),{isMobileApp:o,navigateWithPlatform:l}=ar(),[c,d]=h.useState(""),[u,m]=h.useState({}),[f,p]=h.useState(null),[v,g]=h.useState([]),[b,y]=h.useState(!0),[x,w]=h.useState(null),{isVideoWatched:j}=Hl();h.useEffect(()=>{e&&N()},[e]);const N=async()=>{if(e)try{y(!0),w(null);const C=await gm.getSectionBySlug(e);if(!C){w("Το Ïμήμα δεν βÏÎθηκε");return}p(C);const A=await gm.getVideosBySection(C.id);g(A)}catch(C){console.error("Error loading section data:",C),w("ΣÏάλμα καÏά Ïη ÏÏÏÏÏÏη ÏοÏ
ÏμήμαÏοÏ")}finally{y(!1)}},S=h.useMemo(()=>{const C=[],A=new Set;v.forEach(P=>{P.difficulty_level&&A.add(P.difficulty_level)}),A.forEach(P=>{if(P.toLowerCase()==="all")return;let M=P;const D=P.toLowerCase();D.includes("beginner")||D.includes("εÏκολο")||D.includes("easy")?M="Beginners":D.includes("intermediate")||D.includes("μÎÏÏιο")||D.includes("medium")?M="Intermediate":(D.includes("advanced")||D.includes("δÏÏκολο")||D.includes("hard"))&&(M="Advanced"),C.push({id:P,label:M,category:"ÎÏίÏεδο ÎÏ
ÏκολίαÏ"})}),["Abs & Core","Arms & Shoulders","Glutes & Legs","Full Body"].forEach(P=>{C.push({id:P,label:P,category:"Muscle Group"})}),C.push({id:"5-15",label:"5-15 λεÏÏά",category:"ÎιάÏκεια"},{id:"16-30",label:"16-30 λεÏÏά",category:"ÎιάÏκεια"},{id:"31-60",label:"31-60 λεÏÏά",category:"ÎιάÏκεια"},{id:"60+",label:"Î Î¬Î½Ï Î±ÏÏ 60 λεÏÏά",category:"ÎιάÏκεια"});const O=new Set;return v.forEach(P=>{var D;const M=((D=P.instructors)==null?void 0:D.name)||P.instructor;M&&O.add(M)}),O.forEach(P=>{C.push({id:P,label:P,category:"ÎκÏαιδεÏ
ÏήÏ"})}),C},[v]),E=C=>C?C/60:0,_=h.useMemo(()=>{var A,L,O,P;let C=v;return c.trim()&&(C=C.filter(M=>M.title.toLowerCase().includes(c.toLowerCase())||M.instructor&&M.instructor.toLowerCase().includes(c.toLowerCase()))),((A=u["ÎÏίÏεδο ÎÏ
ÏκολίαÏ"])==null?void 0:A.length)>0&&(C=C.filter(M=>M.difficulty_level&&(u["ÎÏίÏεδο ÎÏ
ÏκολίαÏ"].includes(M.difficulty_level)||M.difficulty_level.toLowerCase()==="all-levels"))),((L=u.ÎιάÏκεια)==null?void 0:L.length)>0&&(C=C.filter(M=>{const D=E(M.duration_seconds);return u.ÎιάÏκεια.some($=>{switch($){case"5-15":return D>=5&&D<=15;case"16-30":return D>=16&&D<=30;case"31-60":return D>=31&&D<=60;case"60+":return D>60;default:return!1}})})),((O=u.ÎκÏαιδεÏ
ÏήÏ)==null?void 0:O.length)>0&&(C=C.filter(M=>{var $;const D=(($=M.instructors)==null?void 0:$.name)||M.instructor;return D&&u.ÎκÏαιδεÏ
ÏήÏ.includes(D)})),((P=u["Muscle Group"])==null?void 0:P.length)>0&&(C=C.filter(M=>M.muscle_group&&u["Muscle Group"].includes(M.muscle_group))),C},[v,c,u]),I=C=>{t(`/workouts/${C.vimeo_id}`)},R=C=>{m(C)},T=()=>{m({}),d("")},k=()=>{o?l("/mobile-categories"):t("/catalog")};return b?s.jsxs("div",{className:"min-h-screen bg-background",children:[o?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:a,onMenuToggle:()=>i(!a)}),s.jsx("main",{className:"pt-4 sm:pt-6 container mx-auto px-4 sm:px-6 lg:px-8 py-4 sm:py-8",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(wt,{className:"h-10 w-10"}),s.jsx(wt,{className:"h-8 w-64"})]}),s.jsx(wt,{className:"h-4 w-96"}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wt,{className:"h-10 w-24"}),s.jsx(wt,{className:"h-6 w-32"})]}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-3 sm:gap-4 md:gap-6",children:Array.from({length:8}).map((C,A)=>s.jsxs("div",{className:"space-y-3",children:[s.jsx(wt,{className:"aspect-video w-full rounded-lg"}),s.jsx(wt,{className:"h-4 w-3/4"}),s.jsx(wt,{className:"h-4 w-1/2"})]},A))})]})}),!o&&s.jsx(Be,{})]}):x||!f?s.jsxs("div",{className:"min-h-screen bg-background",children:[o?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:a,onMenuToggle:()=>i(!a)}),s.jsxs("main",{className:"pt-4 sm:pt-6 container mx-auto px-4 pb-8",children:[s.jsxs(er,{children:[s.jsx(ns,{className:"h-4 w-4"}),s.jsx(tr,{children:x||"Το Ïμήμα δεν βÏÎθηκε"})]}),s.jsxs(F,{variant:"outline",onClick:k,className:"mt-4",children:[s.jsx(as,{className:"h-4 w-4 mr-2"}),"ÎÏιÏÏÏοÏή ÏÏον ÎαÏάλογο"]})]}),!o&&s.jsx(Be,{})]}):s.jsx(_t,{requireSubscription:!0,paywallTitle:"ÎίνεÏε ÎÎÎ»Î¿Ï ÏÏα Well Be Workouts",paywallDescription:"Îε μία ÏÏ
νδÏομή αÏοκÏήÏÏε ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏ
1043Ïμενο ÏοÏ
Well Be.",children:s.jsxs("div",{className:"min-h-screen bg-background",children:[o?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:a,onMenuToggle:()=>i(!a)}),s.jsxs("main",{className:`pt-4 sm:pt-6 container mx-auto px-4 sm:px-6 lg:px-8 ${o?"pb-28":"pb-8"}`,children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-4 mb-4",children:[s.jsx(F,{variant:"ghost",size:"icon",onClick:k,className:"text-muted-foreground hover:text-foreground self-start sm:self-center",children:s.jsx(as,{className:"h-5 w-5"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:f.name}),f.description&&s.jsx("p",{className:"text-muted-foreground text-sm mt-2",children:f.description})]})]}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:[_.length," βίνÏεο",_.length!==v.length&&` αÏÏ ${v.length} ÏÏ
νολικά`]})]}),s.jsxs("div",{className:"mb-8 space-y-4",children:[s.jsxs("div",{className:"relative w-full sm:max-w-md",children:[s.jsx(Hr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4"}),s.jsx(ke,{placeholder:"ÎναζήÏηÏη βίνÏεο...",value:c,onChange:C=>d(C.target.value),className:"pl-10"})]}),S.length>0&&s.jsx(Cb,{filterOptions:S,selectedFilters:u,onFiltersChange:R,onClearFilters:T})]}),_.length>0?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3 sm:gap-4 md:gap-6",children:_.map((C,A)=>{var L;return s.jsx(sh,{title:C.title,overlayTitle:Ro(C.title),instructor:C.instructor||"Well Be Team",duration:C.duration_seconds?`${Math.ceil(C.duration_seconds/60)} min`:"",thumbnail:C.thumbnail_url||"",difficultyLevel:C.difficulty_level,onClick:()=>I(C),isWatched:j(C.vimeo_id),overlayColor:C.overlay_color||eS[A%eS.length],debugOverlays:n,createdAt:C.created_at,publishedAt:C.published_at,pageType:((L=f==null?void 0:f.page_types)==null?void 0:L[0])||C.page_type},C.vimeo_id)})}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground text-lg mb-4",children:c||Object.keys(u).length>0?"Îεν βÏÎθηκαν βίνÏεο ÏοÏ
να ÏαιÏιάζοÏ
ν με Ïα κÏιÏήÏια αναζήÏηÏηÏ.":"Îεν Ï
ÏάÏÏοÏ
ν βίνÏεο Ïε αÏ
ÏÏ Ïο Ïμήμα αÏ
Ïή Ïη ÏÏιγμή."}),(c||Object.keys(u).length>0)&&s.jsx(F,{variant:"outline",onClick:T,children:"ÎαθαÏιÏμÏÏ Î¦Î¯Î»ÏÏÏν"})]})]}),o&&s.jsx("div",{className:"fixed bottom-0 left-0 right-0 bg-background/95 backdrop-blur-md border-t border-border pb-safe z-50",children:s.jsxs("div",{className:"container mx-auto px-4 py-3 flex gap-3",children:[s.jsxs(F,{variant:"outline",onClick:()=>t(-1),className:"flex-1 flex items-center justify-center gap-2",children:[s.jsx(as,{className:"h-4 w-4"}),"ΠίÏÏ"]}),s.jsx(F,{variant:"default",onClick:()=>l("/mobile-categories"),className:"flex-1",children:"ÎÎΤÎÎÎΡÎÎΣ ΠΡÎÎ ÎÎÎΣÎΩÎ"})]})}),!o&&s.jsx(Be,{})]})})},KZ="Europe/Athens",fv=e=>{const t=new Intl.DateTimeFormat("en-CA",{timeZone:KZ,year:"numeric",month:"2-digit",day:"2-digit"}).format(e),[r,n,a]=t.split("-").map(Number);return new Date(r,n-1,a)};function QZ(){const{user:e,loading:t}=jt(),{toast:r}=at(),n=qe(),[a,i]=h.useState([]),[o,l]=h.useState(null),[c,d]=h.useState([]),[u,m]=h.useState([]),[f,p]=h.useState([]),[v,g]=h.useState([]),[b,y]=h.useState(!0),[x,w]=h.useState(""),[j,N]=h.useState(!1),[S,E]=h.useState(!1),[_,I]=h.useState(null),[R,T]=h.useState(!1),k=h.useRef(new Set),C=h.useRef(null);h.useEffect(()=>{A()},[]),h.useEffect(()=>{if(o){L(),se();const K=setInterval(O,1e3);return()=>clearInterval(K)}},[o]);const A=async()=>{try{const{data:K,error:Z}=await U.from("challenges").select("*").eq("is_active",!0).order("start_date",{ascending:!1});if(Z)throw Z;const re=new Date,de=(K||[]).filter(Pe=>yl(new Date(Pe.end_date),re));i(de),de.length>0&&l(de[0])}catch(K){console.error("Error fetching challenges:",K)}finally{y(!1)}},L=async()=>{if(!(!o||!e))try{const{data:K,error:Z}=await U.from("challenge_videos").select("*").eq("challenge_id",o.id
1043).order("day_number");if(Z)throw Z;if(K&&K.length>0){const et=K.filter(ee=>ee.video_id&&ee.video_id.trim().length>0),st=[...new Set(et.map(ee=>ee.video_id))],{data:z,error:Y}=st.length>0?await U.from("videos").select("id, vimeo_id").in("id",st):{data:[],error:null};if(Y)throw Y;const ne=new Map((z||[]).map(ee=>[ee.id,ee.vimeo_id])),fe=et.map(ee=>({...ee,vimeo_id:ne.get(ee.video_id)||""}));d(fe)}else d([]);const{data:re,error:de}=await U.from("user_challenge_progress").select("*").eq("challenge_id",o.id).eq("user_id",e.id);if(de)throw de;m(re||[]);const{data:Pe,error:Ee}=await U.from("user_challenge_video_progress").select("*").eq("challenge_id",o.id).eq("user_id",e.id);if(Ee)throw Ee;p(Pe||[]);const{data:tt,error:ze}=await U.from("challenge_completions").select(` 1044 rank_position, 1045 user_id 1046 `).eq("challenge_id",o.id).order("rank_position").limit(3);if(ze)throw ze;if(tt&&tt.length>0){const et=tt.map(Y=>Y.user_id),{data:st}=await U.from("profiles").select("user_id, nickname, first_name, last_name").in("user_id",et),z=tt.map(Y=>({...Y,profiles:(st==null?void 0:st.find(ne=>ne.user_id===Y.user_id))||{nickname:"",first_name:"",last_name:""}}));g(z)}else g([])}catch(K){console.error("Error fetching challenge data:",K)}},O=()=>{if(!o)return;const K=new Date,Z=new Date(o.start_date);if(Fc(K,Z)){const re=bA(Z,K),de=wA(Z,K)%24,Pe=jA(Z,K)%60,Ee=lj(Z,K)%60;w(`${re}d ${de}h ${Pe}m ${Ee}s`)}else w("Challenge Started!")},P=()=>{if(!o)return 0;const K=new Date,Z=new Date(o.start_date),de=Math.round((fv(K).getTime()-fv(Z).getTime())/864e5)+1;return de<1?0:de},M=K=>o?Js(fv(new Date(o.start_date)),K-1):new Date,D=K=>K<=P(),$=K=>{const Z=u.find(de=>de.day_number===K);if(Z!=null&&Z.is_completed)return"completed";const re=P();return K<re?"missed":K===re?"current":"upcoming"},W=(K,Z)=>{const re=f.find(Pe=>Pe.video_id===K&&Pe.day_number===Z);if(re!=null&&re.is_completed)return"completed";const de=P();return Z<de?"missed":Z===de?"current":"upcoming"},X=K=>{switch(K){case"completed":return s.jsx(ta,{className:"h-5 w-5 text-green-500"});case"missed":return s.jsx(Rs,{className:"h-5 w-5 text-red-500"});case"current":return s.jsx(qf,{className:"h-5 w-5 text-blue-500"});default:return s.jsx(Ms,{className:"h-5 w-5 text-gray-400"})}},q=K=>{switch(K){case 1:return"ð¥";case 2:return"ð¥";case 3:return"ð¥";default:return""}},H=K=>K.nickname||`${K.first_name||""} ${K.last_name||""}`.trim()||"Anonymous",se=async()=>{if(!(!o||!e))try{const{data:K}=await U.from("challenge_notifications").select("*").eq("user_id",e.id).eq("challenge_id",o.id).single();N(!!K)}catch{N(!1)}},te=async()=>{if(!(!o||!e)){E(!0);try{const{error:K}=await U.functions.invoke("send-challenge-notifications",{body:{action:"signup",user_id:e.id,challenge_id:o.id,email:e.email}});if(K)throw K;N(!0),r({title:"ÎιδοÏοίηÏη ενεÏγοÏοιήθηκε!",description:"Îα λάβεÏε email ÏÏαν ξεκινήÏει Ïο challenge."})}catch(K){console.error("Error signing up for notifications:",K),r({title:"ΣÏάλμα",description:K.message||"Îεν ήÏαν Î´Ï Î½Î±Ïή η εγγÏαÏή για ειδοÏοιήÏειÏ.",variant:"destructive"})}finally{E(!1)}}},B=async(K,Z)=>{if(!(!o||!e))try{const{data:re}=await U.from("user_challenge_video_progress").select("*").eq("challenge_id",o.id).eq("user_id",e.id).eq("video_id",K).eq("day_number",Z).maybeSingle();if(re){const{error:Ee}=await U.from("user_challenge_video_progress").update({is_completed:!0,completed_at:new Date().toISOString()}).eq("id",re.id);if(Ee)throw Ee}else{const{error:Ee}=await U.from("user_challenge_video_progress").insert({challenge_id:o.id,user_id:e.id,video_id:K,day_number:Z,is_completed:!0,completed_at:new Date().toISOString()});if(Ee)throw Ee}const{data:de}=await U.from("challenge_videos").select("video_id").eq("challenge_id",o.id).eq("day_number",Z),{data:Pe}=await U.from("user_challenge_video_progress").select("video_id").eq("challenge_id",o.id).eq("user_id",e.id).eq("day_number",Z).eq("is_completed",!0);if(de&&Pe&&de.length===Pe.length){const{data:Ee}=await U.from("user_challenge_progress").select("*").eq("challenge_id",o.id
1046).eq("user_id",e.id).eq("day_number",Z).maybeSingle();Ee?await U.from("user_challenge_progress").update({is_completed:!0,completed_at:new Date().toISOString()}).eq("id",Ee.id):await U.from("user_challenge_progress").insert({challenge_id:o.id,user_id:e.id,day_number:Z,is_completed:!0,completed_at:new Date().toISOString()})}L(),r({title:"Video Completed! â",description:"Video marked as completed."})}catch(re){console.error("Error marking video as completed:",re),r({title:"Error",description:"Failed to mark video as completed.",variant:"destructive"})}};if(h.useEffect(()=>()=>{},[]),t)return s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})});if(!e)return s.jsx(E4,{to:"/auth",replace:!0});if(b)return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-primary/5",children:[s.jsx(Fe,{isMenuOpen:R,onMenuToggle:()=>T(K=>!K)}),s.jsx("div",{className:"pt-20 flex items-center justify-center min-h-[80vh]",children:s.jsx("div",{className:"text-lg",children:"Loading challenges..."})}),s.jsx(Be,{})]});if(!o)return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-primary/5",children:[s.jsx(Fe,{isMenuOpen:R,onMenuToggle:()=>T(K=>!K)}),s.jsx("div",{className:"pt-20 sm:pt-24 md:pt-28 px-3 sm:px-4 md:px-6 py-4 sm:py-6 md:py-8",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs(F,{onClick:()=>n("/community"),variant:"ghost",className:"mb-6 sm:mb-8",children:[s.jsx(as,{className:"mr-2 h-4 w-4"}),"Back to Community Home"]}),s.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:s.jsxs("div",{className:"max-w-md mx-auto text-center p-4 sm:p-6 md:p-8",children:[s.jsx("div",{className:"text-4xl sm:text-5xl md:text-6xl mb-4 sm:mb-6",children:"ð"}),s.jsx("h2",{className:"text-xl sm:text-2xl font-bold mb-3 sm:mb-4",children:"No Active Challenges"}),s.jsx("p",{className:"text-muted-foreground text-sm sm:text-base",children:"There is no new challenge at the moment. Check back soon for upcoming challenges!"})]})})]})}),s.jsx(Be,{})]});const le=yl(new Date,new Date(o.start_date)),J=yl(new Date,new Date(o.end_date));return s.jsx(_t,{requireSubscription:!0,paywallTitle:"Premium Challenges",paywallDescription:"Participate in exclusive fitness challenges with your premium subscription.",children:s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-primary/5",children:[s.jsx(Fe,{isMenuOpen:R,onMenuToggle:()=>T(K=>!K)}),s.jsxs("div",{className:"pt-20 sm:pt-24 md:pt-28 px-3 sm:px-4 md:px-6 py-4 sm:py-6 md:py-8 max-w-6xl mx-auto",children:[s.jsx("div",{className:"mb-6",children:s.jsxs(F,{onClick:()=>n("/community"),variant:"ghost",className:"flex items-center gap-2 text-muted-foreground hover:text-foreground",children:[s.jsx(as,{className:"h-4 w-4"}),"Back to Community Home"]})}),s.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[s.jsx("div",{className:"max-w-4xl mx-auto",children:s.jsxs("div",{className:"relative h-48 sm:h-56 md:h-64 rounded-xl overflow-hidden bg-gradient-to-br from-slate-800 via-slate-700 to-slate-900 shadow-2xl",children:[o.banner_url&&s.jsx("img",{src:o.banner_url,alt:"Challenge Banner",className:"absolute inset-0 w-full h-full object-cover mix-blend-overlay"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-slate-900/40 via-slate-800/40 to-slate-900/40",children:s.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:s.jsxs("div",{className:"text-center text-white py-4 md:py-6 px-4",children:[s.jsxs("div",{className:"flex items-center justify-center mb-4 md:mb-6",children:[s.jsx("div",{className:"text-3xl sm:text-4xl md:text-5xl animate-bounce mr-2 md:mr-4",children:"ð"}),s.jsx("h1",{className:"text-2xl sm:text-3xl md:text-4xl font-bold bg-gradient-to-r from-yellow-500 to-yellow-600 bg-clip-text text-transparent",children:"CHALLENGE"}),s.jsx("div",{className:"text-3xl sm:text-4xl md:text-5xl animate-bounce ml-2 md:ml-4",children:"ð¯"})]}),s.jsx("h2",{className:"text-lg sm:text-xl md:text-2xl mb-4 md:mb-6 font-semibold text-white/95 px-4",children:o.title}),!le&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx("span",{className:"text-lg sm:text-xl md:text-2xl font-bold text-white",children:"STARTS IN:"}),s.jsx("span",{className:"text-lg sm:text-xl md:text-2xl font-mono font-bold bg-gradient-to-r from-yellow-500 to-yellow-600 bg-clip-text text-transparent",children:x})]}),s.jsx("div",{children:s.jsx(F,{onClick:te,disabled:j||S,variant:j?"secondary":"default",size:"sm",className:"bg-white/20 hover:bg-white/30 text-white border-white/30",children:S?"ÎγγÏαÏή...":j?s.jsxs(s.Fragment,{children:[s.jsx(I5,{className:"h-4 w-4 mr-2"}),"ÎιδοÏοιήÏÎµÎ¹Ï ÎµÎ½ÎµÏγοÏοιημÎνεÏ"]}):s.jsxs(s.Fragment,{children:[s.jsx(iE,{className:"h-4 w-4 mr-2"}),"ÎιδοÏοίηÏΠμε"]})})})]}),le&&!J&&s.jsxs("div",{className:"flex items-center justify-center gap-2 px-4 py-2 bg-white/10 rounded-lg border border-white/20 mx-auto w-fit",children:[s.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-full animate-pulse"}),s.jsx("span",{className:"text-green-500 font-semibold",children:"LIVE"})]}),J&&s.jsxs("div",{className:"bg-red-500/20 backdrop-blur-sm rounded-2xl p-4 md:p-6 border border-red-300/30 shadow-lg mx-4",children:[s.jsxs("div",{className:"text-xl sm:text-2xl md:text-3xl font-bold text-red-300 flex items-center justify-center gap-2 md:gap-3",children:[s.jsx("span",{className:"text-2xl sm:text-3xl md:text-4xl",children:"ð"}),s.jsx("span",{className:"text-base sm:text-lg md:text-xl",children:"Challenge Complete!"}),s.jsx("span",{className:"text-2xl sm:text-3xl md:text-4xl",children:"ð"})]}),s.jsx("div",{className:"text-sm sm:text-base md:text-lg mt-2 text-red-200",children:"Amazing effort everyone! ð"})]})]})})})]})}),v.length>0&&s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(ss,{className:"h-5 w-5"}),"Hall of Fame"]})}),s.jsx(ce,{children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:v.map(K=>s.jsxs("div",{className:"text-center p-4 rounded-lg bg-muted",children:[s.jsx("div",{className:"text-2xl mb-2",children:q(K.rank_position)}),s.jsx("div",{className:"font-medium",children:H(K.profiles)}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:[K.rank_position===1?"1st":K.rank_position===2?"2nd":"3rd"," Place"]})]}
1046,K.user_id))})})]}),le&&s.jsx("div",{className:"relative max-w-4xl mx-auto",children:s.jsxs("div",{className:"bg-gradient-to-br from-slate-50 via-stone-50 to-neutral-100 rounded-3xl p-4 sm:p-6 md:p-8 shadow-2xl border border-slate-200 relative overflow-hidden",children:[s.jsx("div",{className:"absolute left-2 sm:left-6 top-0 bottom-0 w-4 sm:w-8 bg-gradient-to-b from-slate-400 via-slate-500 to-slate-600 rounded-l-lg shadow-lg",children:Array.from({length:8},(K,Z)=>s.jsx("div",{className:"w-2 h-2 sm:w-3 sm:h-3 bg-white rounded-full mx-auto mb-3 sm:mb-4 mt-3 sm:mt-4 shadow-md",style:{marginTop:Z===0?"20px":"30px"}},Z))}),s.jsx("div",{className:"hidden sm:block absolute inset-0 ml-16 mr-8 mt-8 mb-8 opacity-15",children:Array.from({length:20},(K,Z)=>s.jsx("div",{className:"h-8 border-b border-slate-300",style:{marginBottom:"24px"}},Z))}),s.jsx("div",{className:"absolute left-8 sm:left-20 top-4 sm:top-8 bottom-4 sm:bottom-8 w-0.5 bg-rose-400 opacity-60 rounded-full"}),s.jsxs("div",{className:"relative ml-8 sm:ml-16 mr-2 sm:mr-4",children:[s.jsxs("div",{className:"mb-6 sm:mb-8",children:[s.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-800 mb-3 sm:mb-4 font-serif",children:"Challenge Journal"}),s.jsx("div",{className:"w-24 sm:w-32 h-1 bg-gradient-to-r from-slate-400 to-slate-600 rounded-full"})]}),s.jsx("div",{className:"space-y-6 sm:space-y-8",children:(()=>{const K=c.reduce((Z,re)=>(Z[re.day_number]||(Z[re.day_number]=[]),Z[re.day_number].push(re),Z),{});return Object.entries(K).sort(([Z],[re])=>parseInt(Z)-parseInt(re)).map(([Z,re])=>{const de=$(parseInt(Z)),Pe=M(parseInt(Z));return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:me("flex items-center gap-4 p-5 rounded-xl border-l-4 relative overflow-hidden transition-all duration-300",de==="completed"?"bg-gradient-to-r from-emerald-50 to-teal-50 border-emerald-500":de==="current"?"bg-gradient-to-r from-indigo-50 to-blue-50 border-indigo-500":de==="missed"?"bg-gradient-to-r from-rose-50 to-red-50 border-rose-500":"bg-gradient-to-r from-slate-50 to-gray-50 border-slate-400"),children:[s.jsx("div",{className:me("w-14 h-14 rounded-xl flex items-center justify-center text-lg font-bold shadow-md",de==="completed"?"bg-gradient-to-br from-slate-600 to-slate-800 text-white":de==="current"?"bg-gradient-to-br from-slate-700 to-slate-900 text-white":de==="missed"?"bg-gradient-to-br from-slate-500 to-slate-700 text-white":"bg-slate-400 text-white"),children:Z}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("h4",{className:"font-semibold text-lg text-slate-800",children:["Day ",Z," - ",fr(Pe,"MMM d, yyyy")]}),s.jsx("p",{className:"text-sm text-slate-600",children:fr(Pe,"EEEE")})]}),s.jsx("div",{className:"flex-shrink-0",children:X(de)})]}),s.jsx("div",{className:me("gap-3 sm:gap-6 ml-3 sm:ml-6",re.length===1?re[0].id.charCodeAt(0)%2===0?"flex justify-center sm:justify-end":"flex justify-center sm:justify-start":"grid grid-cols-1 md:grid-cols-2 justify-items-center"),children:re.map((Ee,tt)=>{const ze=D(parseInt(Z)),et=W(Ee.video_id,parseInt(Z)),st=Ee.id.split("").reduce((fe,ee)=>fe+ee.charCodeAt(0),0),z=st%16-8,Y=st*17%40-20,ne=st*23%40-20;return ze?s.jsxs(gr,{children:[s.jsx(xl,{asChild:!0,children:s.jsxs("div",{className:"relative group transition-all duration-300 cursor-pointer",style:{transform:`rotate(${z}deg) translate(${Y}px, ${ne}px)`,transformOrigin:"center"},onClick:()=>I(Ee),children:[s.jsxs("div",{className:"absolute top-6 -left-3 w-6 h-14 bg-gradient-to-b from-pink-300 to-pink-400 opacity-80 rounded-sm z-10 transform rotate-3 shadow-sm",children:[s.jsx("div",{className:"absolute inset-0 bg-pink-200/30 rounded-sm"}),s.jsx("div",{className:"absolute left-1 top-1 bottom-1 w-0.5 bg-pink-500/40 rounded"}),s.jsx("div",{className:"absolute right-1 top-1 bottom-1 w-0.5 bg-pink-500/40 rounded"})]}),s.jsxs("div",{className:"absolute top-12 -right-3 w-6 h-16 bg-gradient-to-b from-blue-300 to-blue-400 opacity-80 rounded-sm z-10 transform -rotate-5 shadow-sm",children:[s.jsx("div",{className:"absolute inset-0 bg-blue-200/30 rounded-sm"}),s.jsx("div",{className:"absolute inset-0.5 border border-blue-500/20 rounded-sm"})]}),s.jsxs("div",{className:"absolute -top-3 left-8 w-14 h-6 bg-gradient-to-r from-yellow-300 to-yellow-400 opacity-80 rounded-sm z-10 transform rotate-2 shadow-sm",children:[s.jsx("div",{className:"absolute inset-0 bg-yellow-200/30 rounded-sm"}),s.jsx("div",{className:"absolute inset-1 border-2 border-dotted border-yellow-500/30 rounded-sm"})]}),s.jsxs("div",{className:"absolute -bottom-3 right-6 w-16 h-6 bg-gradient-to-r from-green-300 to-green-400 opacity-80 rounded-sm z-10 transform -rotate-4 shadow-sm",children:[s.jsx("div",{className:"absolute inset-0 bg-green-200/30 rounded-sm"}),s.jsx("div",{className:"absolute top-1 bottom-1 left-2 right-2 bg-green-500/20 rounded"})]}),ze&&s.jsxs("div",{className:"absolute bottom-1 right-1 z-20",children:[et==="completed"&&s.jsx("div",{className:"w-16 h-16 text-green-600 font-bold text-6xl transform rotate-12 font-mono flex items-center justify-center",children:"â"}),et==="missed"&&s.jsx("div",{className:"w-16 h-16 text-red-600 font-bold text-6xl transform -rotate-12 font-mono flex items-center justify-center",children:"â"})]}),s.jsxs("div",{className:me("bg-white p-2 rounded-lg shadow-lg border border-gray-200 transition-all duration-300 relative overflow-hidden w-64 sm:w-80 md:w-96",ze?"group-hover:shadow-xl transform group-hover:scale-105":"opacity-50"),children:[s.jsx("div",{className:"aspect-video w-full overflow-hidden rounded",children:s.jsx("img",{src:Ee.video_thumbnail,alt:Ee.video_title,className:me("w-full h-full object-cover transition-all duration-300",!ze&&"grayscale brightness-75")})}),ze&&s.jsx("div",{className:"absolute inset-2 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300 bg-black/20 rounded",children:s.jsx(qf,{className:"h-12 w-12 text-white"})}),s.jsxs("div",{className:"mt-2 px-1",children:[s.jsx("h5",{className:me("font-medium text-sm leading-tight",ze?"text-slate-900":"text-slate-500"),children:Ee.video_title}),s.jsx("p",{className:me("text-xs mt-1",ze?"text-slate-600":"text-slate-400"),children:"~30 mins"})]})]})]})}),_&&s.jsx(rr,{className:"w-[85vw] h-[80vh] max-w-5xl p-4",children:s.jsxs("div",{className:"relative w-full h-full bg-black rounded-lg overflow-hidden",children:[s.jsx("button",{onClick:()=>I(null),className:"absolute top-4 right-4 z-50 bg-black/70 hover:bg-black/90 text-white rounded-full p-2 transition-colors",children:s.jsx(qr,{className:"h-4 w-4"})}),s.jsx("iframe",{ref:C,src:`https://player.vimeo.com/video/${_.vimeo_id}?autoplay=1&title=0&byline=0&portrait=0&controls=1&background=0`,className:"w-full h-full border-0 rounded-lg",allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,onLoad:()=>{const fe=setTimeout(()=>{const ee=`${_.video_id}-${P()}`;
1046k.current.has(ee)||(k.current.add(ee),B(_.video_id,P()))},3e4);return()=>clearTimeout(fe)}})]})})]},Ee.id):s.jsxs("div",{className:"relative group transition-all duration-300 cursor-not-allowed",style:{transform:`rotate(${z}deg) translate(${Y}px, ${ne}px)`,transformOrigin:"center"},onClick:()=>{r({title:"ÎίνÏεο ÎλειδÏμÎνο ð",description:`ÎÏ
ÏÏ Ïο βίνÏεο ξεκλειδÏνει Ïην ${fr(M(parseInt(Z)),"d MMMM")}`})},children:[s.jsxs("div",{className:"absolute top-6 -left-3 w-6 h-14 bg-gradient-to-b from-pink-300 to-pink-400 opacity-80 rounded-sm z-10 transform rotate-3 shadow-sm",children:[s.jsx("div",{className:"absolute inset-0 bg-pink-200/30 rounded-sm"}),s.jsx("div",{className:"absolute left-1 top-1 bottom-1 w-0.5 bg-pink-500/40 rounded"}),s.jsx("div",{className:"absolute right-1 top-1 bottom-1 w-0.5 bg-pink-500/40 rounded"})]}),s.jsxs("div",{className:"absolute top-12 -right-3 w-6 h-16 bg-gradient-to-b from-blue-300 to-blue-400 opacity-80 rounded-sm z-10 transform -rotate-5 shadow-sm",children:[s.jsx("div",{className:"absolute inset-0 bg-blue-200/30 rounded-sm"}),s.jsx("div",{className:"absolute inset-0.5 border border-blue-500/20 rounded-sm"})]}),s.jsxs("div",{className:"absolute -top-3 left-8 w-14 h-6 bg-gradient-to-r from-yellow-300 to-yellow-400 opacity-80 rounded-sm z-10 transform rotate-2 shadow-sm",children:[s.jsx("div",{className:"absolute inset-0 bg-yellow-200/30 rounded-sm"}),s.jsx("div",{className:"absolute inset-1 border-2 border-dotted border-yellow-500/30 rounded-sm"})]}),s.jsxs("div",{className:"absolute -bottom-3 right-6 w-16 h-6 bg-gradient-to-r from-green-300 to-green-400 opacity-80 rounded-sm z-10 transform -rotate-4 shadow-sm",children:[s.jsx("div",{className:"absolute inset-0 bg-green-200/30 rounded-sm"}),s.jsx("div",{className:"absolute top-1 bottom-1 left-2 right-2 bg-green-500/20 rounded"})]}),s.jsxs("div",{className:"bg-white p-2 rounded-lg shadow-lg border border-gray-200 transition-all duration-300 relative overflow-hidden w-64 sm:w-80 md:w-96 opacity-50",children:[s.jsx("div",{className:"absolute inset-2 bg-gray-300/40 z-10 rounded flex items-center justify-center backdrop-blur-[2px]",children:s.jsxs("div",{className:"bg-black/70 text-white px-4 py-3 rounded-lg text-sm font-medium flex flex-col items-center gap-2",children:[s.jsx(Qp,{className:"h-6 w-6"}),s.jsxs("span",{className:"text-center",children:["ÎμÎÏα ",Z]}),s.jsx("span",{className:"text-xs text-gray-300",children:fr(M(parseInt(Z)),"d MMM")})]})}),s.jsx("div",{className:"relative aspect-video bg-gray-100 rounded overflow-hidden",children:s.jsx("img",{src:Ee.video_thumbnail,alt:Ee.video_title,className:"w-full h-full object-cover grayscale"})}),s.jsxs("div",{className:"mt-2 space-y-1",children:[s.jsx("h5",{className:"font-medium text-sm leading-tight text-slate-500",children:Ee.video_title}),s.jsx("p",{className:"text-xs mt-1 text-slate-400",children:"~30 mins"})]})]})]},Ee.id)})})]},Z)})})()}),s.jsx("div",{className:"mt-12 pt-6 border-t-2 border-dashed border-gray-400 text-center",children:s.jsx("p",{className:"text-gray-600 font-serif italic",children:'"Progress is progress, no matter how small" â¨'})})]})]})}),a.length>1&&s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsx(be,{children:"Available Challenges"})}),s.jsx(ce,{children:s.jsx("div",{className:"grid gap-2",children:a.map(K=>s.jsx(F,{variant:(o==null?void 0:o.id)===K.id?"default":"outline",onClick:()=>l(K),className:"justify-start",children:K.title},K.id))})})]})]})]}),s.jsx(Be,{})]})})}function O3({isOpen:e,onClose:t,onSearch:r,currentQuery:n}){const[a,i]=h.useState(n),o=()=>{r(a),t()},l=d=>{d.key==="Enter"&&o(),d.key==="Escape"&&t()},c=()=>{i(""),r(""),t()};return e?s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4 animate-fade-in",children:s.jsxs(oe,{className:"w-full max-w-md animate-scale-in",children:[s.jsx(xe,{className:"pb-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-lg font-semibold bg-gradient-to-r from-primary to-pink-500 bg-clip-text text-transparent",children:"Search Community"}),s.jsx(F,{variant:"ghost",size:"sm",onClick:t,children:s.jsx(qr,{className:"h-4 w-4"})})]})}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Hr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(ke,{placeholder:"Search posts, users, content...",value:a,onChange:d=>i(d.target.value),onKeyPress:l,className:"pl-10",autoFocus:!0})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(F,{onClick:o,className:"flex-1",children:[s.jsx(Hr,{className:"h-4 w-4 mr-2"}),"Search"]}),s.jsx(F,{variant:"outline",onClick:c,children:"Clear"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Popular searches:"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:["fitness","recipes","workout","nutrition"].map(d=>s.jsx(F,{variant:"outline",size:"sm",onClick:()=>{i(d),r(d),t()},className:"text-xs hover:bg-primary/10",children:d},d))})]})]})]})}):null}function XZ({onSearch:e,onShowFavorites:t,onShowGiveaways:r,onShowChallenges:n,onShowHallOfFame:a,onScrollToTop:i,searchQuery:o,showFavorites:l,showGiveaways:c,showChallenges:d,showHallOfFame:u}){const{user:m}=jt(),f=qe();at();const[p,v]=h.useState(null),[g,b]=h.useState(!1),[y,x]=h.useState({posts:0,likes:0}),[w,j]=h.useState(null),[N,S]=h.useState(!0);h.useEffect(()=>{m&&(E(),_(),I())},[m]);const E=async()=>
1046{if(m)try{const{data:T,error:k}=await U.from("profiles").select("first_name, last_name, nickname, email, avatar_url, avatar_type").eq("user_id",m.id).maybeSingle();if(k&&k.code!=="PGRST116"){console.error("Error fetching profile:",k);return}console.log("Fetched profile:",T),v(T)}catch(T){console.error("Error fetching profile:",T)}},_=async()=>{if(m)try{const{count:T}=await U.from("posts").select("*",{count:"exact",head:!0}).eq("user_id",m.id).eq("is_hidden",!1),{count:k}=await U.from("post_likes").select("*",{count:"exact",head:!0}).eq("user_id",m.id);x({posts:T||0,likes:k||0})}catch(T){console.error("Error fetching stats:",T)}},I=async()=>{if(m)try{const{data:T,error:k}=await U.rpc("get_user_ranking",{_user_id:m.id});k?console.error("Error fetching user ranking:",k):T&&T.length>0&&j({rank_position:Number(T[0].rank_position),total_users:Number(T[0].total_users),percentile:Number(T[0].percentile),total_activity_score:Number(T[0].total_activity_score),badge_level:T[0].badge_level,current_badge:T[0].current_badge})}catch(T){console.error("Error in fetchUserRanking:",T)}finally{S(!1)}},R=()=>{var k,C;return p?p.nickname?p.nickname:`${p.first_name||""} ${p.last_name||""}`.trim()||((C=p.email)==null?void 0:C.split("@")[0])||"User":((k=m==null?void 0:m.email)==null?void 0:k.split("@")[0])||"User"};return m?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-80 min-h-screen p-4 border-r border-border/50 bg-gradient-to-b from-background via-background to-primary/5",children:s.jsxs("div",{className:"space-y-6 animate-fade-in pt-4",children:[s.jsx(oe,{className:"bg-gradient-to-br from-primary/10 via-background to-pink-500/10 border-primary/20 shadow-lg hover:shadow-xl transition-all duration-300 hover-scale",children:s.jsx(ce,{className:"p-6",children:s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Po,{userId:(m==null?void 0:m.id)||"",avatarUrl:p==null?void 0:p.avatar_url,firstName:p==null?void 0:p.first_name,lastName:p==null?void 0:p.last_name,email:p==null?void 0:p.email,className:"h-16 w-16 ring-2 ring-primary/20 ring-offset-2 ring-offset-background"}),s.jsx("div",{className:"absolute -top-1 -right-1 bg-green-500 w-4 h-4 rounded-full border-2 border-background"})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"font-bold text-lg truncate bg-gradient-to-r from-primary to-pink-500 bg-clip-text text-transparent",children:R()}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:(p==null?void 0:p.email)||(m==null?void 0:m.email)}),s.jsxs(ye,{variant:"secondary",className:"mt-2 bg-primary/10 text-primary",children:[s.jsx(jo,{className:"h-3 w-3 mr-1"}),"Active Member"]})]})]})})}),s.jsx(oe,{className:"bg-background/50 backdrop-blur-sm border-border/50 shadow-lg",children:s.jsx(ce,{className:"p-4",children:s.jsxs("nav",{className:"space-y-2",children:[s.jsx(F,{variant:"ghost",className:"w-full justify-start text-left p-4 h-auto hover:bg-primary/10 hover:text-primary transition-all duration-200 group",onClick:i,children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-blue-100 text-blue-600 group-hover:bg-blue-200 transition-colors",children:s.jsx(Kp,{className:"h-4 w-4"})}),s.jsx("span",{className:"font-medium",children:"Home"})]})}),s.jsx(F,{variant:"ghost",className:"w-full justify-start text-left p-4 h-auto hover:bg-primary/10 hover:text-primary transition-all duration-200 group",onClick:()=>b(!0),children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-purple-100 text-purple-600 group-hover:bg-purple-200 transition-colors",children:s.jsx(Hr,{className:"h-4 w-4"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("span",{className:"font-medium",children:"Search"}),o&&s.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:['"',o,'"']})]})]})}),s.jsx(F,{variant:"ghost",className:`w-full justify-start text-left p-4 h-auto transition-all duration-200 group ${l?"bg-pink-50 text-pink-600 border border-pink-200":"hover:bg-primary/10 hover:text-primary"}`,onClick:t,children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-2 rounded-lg transition-colors ${l?"bg-pink-200 text-pink-600":"bg-pink-100 text-pink-600 group-hover:bg-pink-200"}`,children:s.jsx(ws,{className:`h-4 w-4 ${l?"fill-current":""}`})}),s.jsx("span",{className:"font-medium",children:"Favorites"})]})}),s.jsx(F,{variant:"ghost",className:`w-full justify-start text-left p-4 h-auto transition-all duration-200 group ${c?"bg-yellow-50 text-yellow-600 border border-yellow-200":"hover:bg-primary/10 hover:text-primary"}`,onClick:r,children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-2 rounded-lg transition-colors ${c?"bg-yellow-200 text-yellow-600":"bg-yellow-100 text-yellow-600 group-hover:bg-yellow-200"}`,children:s.jsx(La,{className:"h-4 w-4"})}),s.jsx("span",{className:"font-medium",children:"ÎιαγÏνιÏμοί"})]}),c&&s.jsx("span",{className:"text-xs text-yellow-600 bg-yellow-200 px-2 py-1 rounded-full",children:"Active"})]})}),s.jsx(F,{variant:"ghost",className:"w-full justify-start text-left p-4 h-auto hover:bg-primary/10 hover:text-primary transition-all duration-200 group",onClick:()=>f("/challenges"),children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-orange-100 text-orange-600 group-hover:bg-orange-200 transition-colors",children:s.jsx(ss,{className:"h-4 w-4"})}),s.jsx("span",{className:"font-medium",children:"Challenges"})]})}),s.jsx(F,{variant:"ghost",className:`w-full justify-start text-left p-4 h-auto transition-all duration-200 group ${u?"bg-amber-50 text-amber-600 border border-amber-200":"hover:bg-primary/10 hover:text-primary"}`,onClick:a,children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-2 rounded-lg transition-colors ${u?"bg-amber-200 text-amber-600":"bg-amber-100 text-amber-600 group-hover:bg-amber-200"}`,children:s.jsx(ss,{className:"h-4 w-4"})}),s.jsx("span",{className:"font-medium",children:"Hall of Fame"})]})})]})})}),s.jsx(oe,{className:"bg-gradient-to-r from-green-50 to-blue-50 border-green-200/50 shadow-lg",children:s.jsxs(ce,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[s.jsx(Bm,{className:"h-4 w-4 text-green-600"}),s.jsx("h4",{className:"font-semibold text-green-800",children:"Your Community Activity"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"text-center p-3 bg-white/50 rounded-lg",children:[s.jsx("div",{className:"text-xl font-bold text-blue-600",children:y.posts}),s.jsx("div",{className:"text-xs text-blue-500",children:"Posts"})]}),s.jsxs("div",{className:"text-center p-3 bg-white/50 rounded-lg",children:[s.jsx("div",{className:"text-xl font-bold text-pink-600",children:y.likes}),s.jsx("div",{className:"text-xs text-pink-500",children:"Likes"})]})]})]})}),s.jsx("div",{className:"animate-fade-in",children:s.jsx(xA,{ranking:w,loading:N})}),s.jsxs(F,{variant:"outline",className:"w-full justify-start border-dashed border-primary/30 hover:border-primary hover:bg-primary/5 transition-all duration-200",onClick:()=>
1046f("/dashboard"),children:[s.jsx(B0,{className:"h-4 w-4 mr-3 text-primary"}),s.jsx("span",{className:"text-primary font-medium",children:"Profile Settings"})]})]})}),s.jsx(O3,{isOpen:g,onClose:()=>b(!1),onSearch:e,currentQuery:o})]}):null}const JZ=()=>{const[e,t]=h.useState(!0),[r,n]=h.useState([]),[a,i]=h.useState([]),[o,l]=h.useState({totalMembers:0,badgeHolders:0,challengeChampions:0,totalChallenges:0});console.log("ðª HallOfFameSection component rendered"),console.log("ð Current state:",{loading:e,badgeUsersCount:r.length,challengeGroupsCount:a.length});const c=async()=>{try{t(!0),console.log("ð Fetching Hall of Fame data with dynamic percentile-based badges...");const{data:p,error:v}=await U.rpc("get_dynamic_badge_leaderboard",{p_limit:100});if(console.log("ð¯ Dynamic badge data fetched:",p),console.log("â Badge error:",v),v)throw v;const g=(p||[]).map(N=>({user_id:N.user_id,badge_name:N.badge_name,badge_emoji:N.badge_emoji,user_points:N.user_points||0,percentile_rank:N.percentile_rank||0,display_name:N.display_name||"Anonymous",avatar_url:N.avatar_url,avatar_type:N.avatar_type}));console.log("â
Transformed badge users with percentiles:",g),n(g),console.log("ð
1046
Fetching challenge champions...");const{data:b,error:y}=await U.from("challenges").select("id, title, description").eq("is_active",!0);if(y)throw y;const x=[];for(const N of b||[]){const{count:S}=await U.from("challenge_videos").select("*",{count:"exact",head:!0}).eq("challenge_id",N.id),{data:E,error:_}=await U.from("user_challenge_video_progress").select("user_id, completed_at").eq("challenge_id",N.id).eq("is_completed",!0).order("completed_at");if(_)continue;const I=new Map;E==null||E.forEach(A=>{const L=A.user_id;I.has(L)||I.set(L,{user_id:L,completed_videos:0,last_completion:A.completed_at});const O=I.get(L);O.completed_videos++,new Date(A.completed_at)>new Date(O.last_completion)&&(O.last_completion=A.completed_at)});const R=Array.from(I.values()).sort((A,L)=>A.completed_videos!==L.completed_videos?L.completed_videos-A.completed_videos:new Date(A.last_completion).getTime()-new Date(L.last_completion).getTime()),T=R.slice(0,3).map(A=>A.user_id),{fetchSafeProfiles:k}=await ut(async()=>{const{fetchSafeProfiles:A}=await import("./useSafeProfiles-3mMwzyBY.js");return{fetchSafeProfiles:A}},[]),C=await k(T);R.slice(0,3).forEach((A,L)=>{const O=C.get(A.user_id);x.push({challenge_id:N.id,challenge_title:N.title,challenge_description:N.description,user_id:A.user_id,display_name:(O==null?void 0:O.nickname)||(O==null?void 0:O.first_name)||"Anonymous",avatar_url:(O==null?void 0:O.avatar_url)||null,completion_rank:L+1,completed_at:A.last_completion})})}
1046console.log("ð
Challenge champions calculated:",x);const w=new Map;x.forEach(N=>{var E;const S=N.challenge_id;w.has(S)||w.set(S,{challenge_id:S,challenge_title:N.challenge_title,challenge_description:N.challenge_description,champions:[]}),(E=w.get(S))==null||E.champions.push(N)}),i(Array.from(w.values()));const j=x.length;console.log("ð Final stats:",{totalMembers:g.length+j,badgeHolders:g.length,challengeChampions:j,totalChallenges:w.size}),l({totalMembers:g.length+j,badgeHolders:g.length,challengeChampions:j,totalChallenges:w.size})}catch(p){console.error("ð¥ Error fetching Hall of Fame data:",p)}finally{t(!1)}};h.useEffect(()=>{c()},[]);const d=p=>{switch(p){case 1:return"ð¥";case 2:return"ð¥";case 3:return"ð¥";default:return"ð
"}},u=p=>r.filter(v=>v.badge_emoji===p);if(e)return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx(wt,{className:"h-12 w-64 mx-auto mb-4"}),s.jsx(wt,{className:"h-6 w-96 mx-auto"})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:[1,2,3].map(p=>s.jsx(oe,{className:"animate-pulse",children:s.jsxs(ce,{className:"p-6",children:[s.jsx(wt,{className:"h-6 w-24 mb-2"}),s.jsx(wt,{className:"h-8 w-16"})]})},p))}),s.jsx(wt,{className:"h-96 w-full"})]});const m=["Excellence is not a skill, it's an attitude! ðª","Champions aren't made in comfort zones! ð¥","Every expert was once a beginner! â","Progress, not perfection! ð"],f=m[Math.floor(Math.random()*m.length)];return s.jsxs("div",{className:"space-y-6 animate-fade-in",children:[s.jsx("div",{className:"fixed inset-0 pointer-events-none",children:[...Array(8)].map((p,v)=>s.jsx("div",{className:"absolute animate-bounce",style:{left:`${Math.random()*100}%`,top:`${Math.random()*100}%`,animationDelay:`${Math.random()*3}s`,animationDuration:`${3+Math.random()*2}s`},children:s.jsx(jo,{className:"h-4 w-4 text-primary/20 sparkle-float"})},v))}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-primary mb-4 flex items-center justify-center gap-4",children:[s.jsx(ss,{className:"h-10 w-10 md:h-16 md:w-16 text-primary trophy-bounce"}),"Hall of Fame",s.jsx(ss,{className:"h-10 w-10 md:h-16 md:w-16 text-primary trophy-bounce",style:{animationDelay:"1s"}})]}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-2xl mx-auto mb-4",children:"Celebrating our community's most dedicated members and their incredible achievements"}),s.jsx("div",{className:"bg-gradient-to-r from-primary/10 to-secondary/10 rounded-lg p-4 max-w-lg mx-auto",children:s.jsxs("p",{className:"text-primary font-medium italic",children:['"',f,'"']})})]}),s.jsxs("div",{className:"mb-8",children:[s.jsxs("h2",{className:"text-3xl font-bold text-center mb-6 flex items-center justify-center gap-3",children:[s.jsx(Yf,{className:"h-8 w-8 text-primary animate-pulse-glow"}),"Challenge Champions",s.jsx(Yf,{className:"h-8 w-8 text-primary animate-pulse-glow"})]}),a.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx("div",{className:"text-6xl mb-4",children:"ð"}),s.jsx("p",{className:"text-xl text-muted-foreground",children:"No challenge champions yet"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Complete challenges to be featured here!"})]}):s.jsx("div",{className:"space-y-8",children:a.map(p=>s.jsxs(oe,{className:"relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 via-secondary/5 to-accent/5"}),s.jsx(xe,{className:"relative",children:s.jsx(be,{className:"text-xl text-center text-primary",children:p.challenge_title})}),s.jsx(ce,{className:"relative",children:s.jsx("div",{className:"flex justify-center items-end gap-4 mb-6",children:p.champions.slice(0,3).map((v,g)=>{const b=["h-24","h-32","h-20"],x=[1,0,2][g],w=p.champions[x];return w?s.jsxs("div",{className:"flex flex-col items-center podium-animation",style:{animationDelay:`${g*.3}s`},children:[s.jsxs("div",{className:"relative mb-3",children:[s.jsx(gu,{userId:w.user_id,avatarUrl:w.avatar_url,displayName:w.display_name,className:"h-12 w-12 border-3 border-primary glow-effect"}),s.jsx("div",{className:"absolute -top-2 -right-2 bg-primary rounded-full p-1 z-30",children:s.jsx("span",{className:"text-white text-xs",children:d(x+1)})})]}),s.jsx("div",{className:`bg-gradient-to-t from-primary to-secondary rounded-t-lg ${b[g]} w-20 flex items-end justify-center pb-3`,children:s.jsx("div",{className:"text-white font-bold text-lg",children:x+1})}),s.jsxs("div",{className:"text-center mt-2",children:[s.jsx("div",{className:"font-bold text-sm text-primary",children:w.display_name}),s.jsx("div",{className:"text-xs text-muted-foreground",children:fr(new Date(w.completed_at),"MMM dd")})]})]}
1046,w.user_id):null})})})]},p.challenge_id))})]}),s.jsxs("div",{className:"mb-8",children:[s.jsxs("h2",{className:"text-3xl font-bold text-center mb-6 flex items-center justify-center gap-3",children:[s.jsx(ss,{className:"h-8 w-8 text-primary animate-pulse-glow"}),"Badge Leaderboard",s.jsx(ss,{className:"h-8 w-8 text-primary animate-pulse-glow"})]}),s.jsxs("div",{className:"space-y-8",children:[u("ð").length>0&&s.jsxs(oe,{className:"relative overflow-hidden border-2 border-yellow-200",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-yellow-50 via-amber-50 to-orange-50"}),s.jsx(xe,{className:"relative",children:s.jsxs(be,{className:"flex items-center gap-3 text-2xl text-yellow-700",children:[s.jsx("div",{className:"bg-gradient-to-r from-yellow-400 to-amber-500 rounded-full p-2",children:s.jsx(ss,{className:"h-8 w-8 text-white animate-bounce-gentle"})}),"Legend"]})}),s.jsx(ce,{className:"relative",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:u("ð").map(p=>s.jsxs("div",{className:"flex items-center space-x-3 p-4 rounded-xl bg-gradient-to-r from-yellow-100/50 to-amber-100/50 border border-yellow-200 hover:scale-105 transition-transform duration-300",children:[s.jsxs("div",{className:"relative",children:[s.jsx(gu,{userId:p.user_id,avatarUrl:p.avatar_url,displayName:p.display_name,className:"h-12 w-12 border-2 border-yellow-400"}),s.jsx("div",{className:"absolute -top-1 -right-1 bg-yellow-500 rounded-full p-1 z-30",children:s.jsx(ss,{className:"h-3 w-3 text-white"})})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-bold text-yellow-800",children:p.display_name}),s.jsxs("div",{className:"text-sm text-yellow-600",children:[p.user_points," points · Top ",p.percentile_rank.toFixed(1),"%"]})]})]},p.user_id))})})]}),u("ð").length>0&&s.jsxs(oe,{className:"relative overflow-hidden border-2 border-slate-200",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-slate-50 via-gray-50 to-zinc-50"}),s.jsx(xe,{className:"relative",children:s.jsxs(be,{className:"flex items-center gap-3 text-2xl text-slate-700",children:[s.jsx("div",{className:"bg-gradient-to-r from-slate-400 to-gray-500 rounded-full p-2",children:s.jsx(ui,{className:"h-8 w-8 text-white animate-bounce-gentle"})}),"Champion"]})}),s.jsx(ce,{className:"relative",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:u("ð").map(p=>s.jsxs("div",{className:"flex items-center space-x-3 p-4 rounded-xl bg-gradient-to-r from-slate-100/50 to-gray-100/50 border border-slate-200 hover:scale-105 transition-transform duration-300",children:[s.jsxs("div",{className:"relative",children:[s.jsx(gu,{userId:p.user_id,avatarUrl:p.avatar_url,displayName:p.display_name,className:"h-12 w-12 border-2 border-slate-400"}),s.jsx("div",{className:"absolute -top-1 -right-1 bg-slate-500 rounded-full p-1 z-30",children:s.jsx(ui,{className:"h-3 w-3 text-white"})})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-bold text-slate-800",children:p.display_name}),s.jsxs("div",{className:"text-sm text-slate-600",children:[p.user_points," points · Top ",p.percentile_rank.toFixed(1),"%"]})]})]},p.user_id))})})]}),u("ð").length>0&&s.jsxs(oe,{className:"relative overflow-hidden border-2 border-orange-200",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-orange-50 via-red-50 to-pink-50"}),s.jsx(xe,{className:"relative",children:s.jsxs(be,{className:"flex items-center gap-3 text-2xl text-orange-700",children:[s.jsx("div",{className:"bg-gradient-to-r from-orange-400 to-red-500 rounded-full p-2",children:s.jsx(Ru,{className:"h-8 w-8 text-white animate-bounce-gentle"})}),"Rising Star"]})}),s.jsx(ce,{className:"relative",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:u("ð").map(p=>s.jsxs("div",{className:"flex items-center space-x-3 p-4 rounded-xl bg-gradient-to-r from-orange-100/50 to-red-100/50 border border-orange-200 hover:scale-105 transition-transform duration-300",children:[s.jsxs("div",{className:"relative",children:[s.jsx(gu,{userId:p.user_id,avatarUrl:p.avatar_url,displayName:p.display_name,className:"h-12 w-12 border-2 border-orange-400"}),s.jsx("div",{className:"absolute -top-1 -right-1 bg-orange-500 rounded-full p-1 z-30",children:s.jsx(Ru,{className:"h-3 w-3 text-white"})})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-bold text-orange-800",children:p.display_name}),s.jsxs("div",{className:"text-sm text-orange-600",children:[p.user_points," points · Top ",p.percentile_rank.toFixed(1),"%"]})]})]}
1046,p.user_id))})})]})]})]})]})};function ZZ(){const{user:e,loading:t}=jt(),{toast:r}=at();qe();const{isMobileApp:n}=ar(),[a,i]=h.useState([]),[o,l]=h.useState(!0),[c,d]=h.useState("member"),[u,m]=h.useState(!1),[f,p]=h.useState(""),[v,g]=h.useState(!1),[b,y]=h.useState(!1),[x,w]=h.useState(!1),[j,N]=h.useState(!1),[S,E]=h.useState([]),[_,I]=h.useState("latest"),R=h.useRef(null),[T,k]=h.useState(null),{isUserOnline:C}=pw();h.useEffect(()=>{e&&(O(),L(),A())},[e]);const A=async()=>{if(!e)return;const{data:J,error:K}=await U.from("profiles").select("*").eq("user_id",e.id).maybeSingle();!K&&J&&k(J)},L=async()=>{if(!e)return;const{data:J}=await U.from("user_roles").select("role").eq("user_id",e.id).maybeSingle();J!=null&&J.role&&d(J.role)},O=async()=>{try{const{data:J,error:K}=await U.from("posts").select("*").eq("is_hidden",!1).is("parent_post_id",null).order("is_pinned",{ascending:!1}).order("created_at",{ascending:!1});if(K)throw K;const Z=(J||[]).map(z=>z.id),re=[...new Set((J||[]).map(z=>z.user_id))],{fetchSafeProfiles:de}=await ut(async()=>{const{fetchSafeProfiles:z}=await import("./useSafeProfiles-3mMwzyBY.js");return{fetchSafeProfiles:z}},[]),[Pe,Ee,tt]=await Promise.all([U.from("user_roles").select("user_id, role").in("user_id",re),U.from("post_likes").select("post_id").in("post_id",Z),de(re)]),ze=(Pe.data||[]).reduce((z,{user_id:Y,role:ne})=>(z[Y]=ne,z),{}),et=(Ee.data||[]).reduce((z,Y)=>(z[Y.post_id]=(z[Y.post_id]||0)+1,z),{}),st=(J||[]).map(z=>{const Y=tt.get(z.user_id);return{...z,profiles:Y?{first_name:Y.first_name,last_name:Y.last_name,nickname:Y.nickname,email:null,avatar_url:Y.avatar_url,avatar_type:Y.avatar_type}:null,user_roles:ze[z.user_id]?[{role:ze[z.user_id]}]:[],like_count:et[z.id]||0}});E(st),i(st)}catch(J){console.error("Error fetching posts:",J),r({variant:"destructive",title:"Error",description:"Failed to load posts"})}finally{l(!1)}},P=J=>[...J].sort((K,Z)=>K.is_pinned!==Z.is_pinned?(Z.is_pinned?1:0)-(K.is_pinned?1:0):_==="popular"?(Z.like_count||0)-(K.like_count||0):new Date(Z.created_at).getTime()-new Date(K.created_at).getTime()),M=J=>{if(p(J),!J.trim()){i(P(S));return}const K=S.filter(Z=>{var re,de,Pe,Ee,tt,ze;return Z.content.toLowerCase().includes(J.toLowerCase())||((de=(re=Z.profiles)==null?void 0:re.first_name)==null?void 0:de.toLowerCase().includes(J.toLowerCase()))||((Ee=(Pe=Z.profiles)==null?void 0:Pe.last_name)==null?void 0:Ee.toLowerCase().includes(J.toLowerCase()))||((ze=(tt=Z.profiles)==null?void 0:tt.nickname)==null?void 0:ze.toLowerCase().includes(J.toLowerCase()))});i(P(K))},D=async()=>{if(e)if(g(!v),w(!1),v)i(P(S));else try{const{data:J,error:K}=await U.from("post_likes").select("post_id").eq("user_id",e.id);if(K)throw K;const Z=J.map(de=>de.post_id),re=S.filter(de=>Z.includes(de.id));i(P(re))}catch(J){console.error("Error fetching favorites:",J),r({variant:"destructive",title:"Error",description:"Failed to load favorites"})}},$=async()=>{if(e)if(y(!b),g(!1),w(!1),b)i(P(S));else{const J=S.filter(K=>K.is_giveaway);i(P(J))}},W=()=>
1046{console.log("ð handleShowHallOfFame called, current state:",x),w(!x),g(!1),y(!1),console.log("ð Hall of Fame will be set to:",!x)},X=J=>{I(J),i(P(a))},q=()=>{y(!1),g(!1),w(!1),p(""),i(P(S)),window.scrollTo({top:0,behavior:"smooth"})},H=()=>{O()},se=async J=>{try{const{error:K}=await U.from("posts").delete().eq("id",J);if(K)throw K;i(a.filter(Z=>Z.id!==J)),r({title:"Success",description:"Post deleted successfully"})}catch(K){console.error("Error deleting post:",K),r({variant:"destructive",title:"Error",description:"Failed to delete post"})}},te=async J=>{try{const{error:K}=await U.from("posts").update({is_hidden:!0}).eq("id",J);if(K)throw K;i(a.filter(Z=>Z.id!==J)),r({title:"Success",description:"Post hidden successfully"})}catch(K){console.error("Error hiding post:",K),r({variant:"destructive",title:"Error",description:"Failed to hide post"})}},B=async J=>{try{const{error:K}=await U.from("posts").update({is_pinned:!0}).eq("id",J);if(K)throw K;const Z=a.map(de=>de.id===J?{...de,is_pinned:!0}:de);i(P(Z));const re=S.map(de=>de.id===J?{...de,is_pinned:!0}:de);E(re),r({title:"Success",description:"Post pinned successfully"})}catch(K){console.error("Error pinning post:",K),r({variant:"destructive",title:"Error",description:"Failed to pin post"})}},le=async J=>{try{const{error:K}=await U.from("posts").update({is_pinned:!1}).eq("id",J);if(K)throw K;const Z=a.map(de=>de.id===J?{...de,is_pinned:!1}:de);i(P(Z));const re=S.map(de=>de.id===J?{...de,is_pinned:!1}:de);E(re),r({title:"Success",description:"Post unpinned successfully"})}catch(K){console.error("Error unpinning post:",K),r({variant:"destructive",title:"Error",description:"Failed to unpin post"})}};return t?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-primary/5",children:[n?s.jsx(fs,{}):s.jsx(Fe,{isMenuOpen:u,onMenuToggle:()=>m(!u)}),s.jsxs("div",{className:`${n?"pt-0":"pt-16 sm:pt-16"} flex min-h-screen`,children:[s.jsx("div",{className:"hidden lg:block",children:(console.log("handleShowFavorites:",D),console.log("handleShowGiveaways:",$),s.jsx(XZ,{onSearch:M,onShowFavorites:D,onShowGiveaways:$,onShowChallenges:()=>{},onShowHallOfFame:W,onScrollToTop:q,searchQuery:f,showFavorites:v,showGiveaways:b,showChallenges:!1,showHallOfFame:x}))}),s.jsxs("main",{className:`flex-1 px-3 sm:px-4 md:px-6 ${n?"pt-6":"py-2 sm:py-4"} max-w-4xl mx-auto w-full`,children:[n&&T&&s.jsx(oe,{className:"mb-6 overflow-hidden bg-gradient-to-br from-primary/5 via-background to-primary/10 border-primary/20",children:s.jsx(ce,{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Po,{userId:(e==null?void 0:e.id)||"",avatarUrl:T.avatar_url,firstName:T.first_name,lastName:T.last_name,email:T.email,className:"h-16 w-16 border-2 border-primary/20"}),(e==null?void 0:e.id)&&C(e.id)&&s.jsx("div",{className:"absolute bottom-0 right-0 w-4 h-4 bg-green-500 rounded-full border-2 border-background"})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground truncate",children:T.nickname||`${T.first_name||""} ${T.last_name||""}`.trim()||"Community Member"}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:T.email}),s.jsxs(ye,{variant:"secondary",className:"mt-2 bg-primary/10 text-primary border-primary/20",children:[s.jsx(jo,{className:"h-3 w-3 mr-1"}),"Active Member"]})]})]})})}),s.jsxs("div",{ref:R,className:"space-y-4 sm:space-y-6 animate-fade-in",children:[!n&&s.jsx("div",{className:`lg:hidden sticky ${n?"top-2":"top-16 sm:top-16"} z-10 bg-white/80 backdrop-blur-sm border border-border/50 rounded-lg p-2 shadow-sm ${n?"mt-2":"mt-2 sm:mt-4"}`,children:s.jsxs("div",{className:"flex gap-1 justify-center overflow-x-auto",children:[b?s.jsx(F,{variant:"ghost",size:"sm",onClick:()=>{y(!1),g(!1),i(P(S))},className:"flex-shrink-0 h-7 text-xs px-2 text-blue-600",children:"â Back to All Posts"}):s.jsxs(F,{variant:"ghost",size:"sm",onClick:q,className:"flex-shrink-0 h-7 text-xs px-2",children:[s.jsx(Kp,{className:"h-3 w-3 mr-1"}),s.jsx("span",{className:"hidden xs:inline",children:"Home"})]}),s.jsxs(F,{variant:"ghost",size:"sm",onClick:()=>N(!0),className:"flex-shrink-0 h-7 text-xs px-2",children:[s.jsx(Hr,{className:"h-3 w-3 mr-1"}),s.jsx("span",{className:"hidden xs:inline",children:"Search"})]}),s.jsxs(F,{variant:v?"default":"ghost",size:"sm",onClick:D,className:"flex-shrink-0 h-7 text-xs px-2",children:[s.jsx(ws,{className:"h-3 w-3 mr-1"}),s.jsx("span",{className:"hidden xs:inline",children:"Favorites"})]}),s.jsxs(F,{variant:b?"default":"ghost",size:"sm",onClick:$,className:"flex-shrink-0 h-7 text-xs px-2",children:[s.jsx(La,{className:"h-3 w-3 mr-1"}),s.jsx("span",{className:"hidden xs:inline",children:"Giveaways"})]}),s.jsxs(F,{variant:x?"default":"ghost",size:"sm",onClick:W,className:"flex-shrink-0 h-7 text-xs px-2",children:[s.jsx(ss,{className:"h-3 w-3 mr-1"}),s.jsx("span",{className:"hidden xs:inline",children:"Hall of Fame"})]})]})}),x?s.jsx(JZ,{}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center justify-between gap-4 pb-4 border-b border-border",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-muted-foreground hidden sm:inline",children:"Sort by:"}),s.jsxs(ql,{value:_,onValueChange:X,children:[s.jsx(Bo,{className:"w-[120px] h-8 text-sm",children:s.jsx(Gl,{})}),s.jsxs(zo,{children:[s.jsx(sr,{value:"latest",children:"Latest"}),s.jsx(sr,{value:"popular",children:"Popular"})]})]})]}),s.jsxs("span",{className:"text-xs sm:text-sm text-muted-foreground",children:[a.length," ",a.length===1?"post":"posts"]})]}),s.jsx(Oj,{onPostCreated:H,allowPhotos:!0}),o?s.jsx("div",{className:"flex justify-center items-center py-16 sm:py-24",children:s.jsx("div",{className:"animate-spin rounded-full h-10 w-10 sm:h-12 sm:w-12 border-b-2 border-primary"})}):a.length===0?s.jsxs("div",{className:"text-center py-12 sm:py-16 space-y-4",children:[s.jsx("div",{className:"text-4xl sm:text-6xl mb-4",children:v?"ð":b?"ð":"ð"}),s.jsx("p",{className:"text-lg sm:text-xl text-muted-foreground px-4",children:f?"No posts found for your search":v?"No favorite posts yet":b?"No giveaway posts yet. Check back later!":"No posts yet. Be the first to share something amazing!"}),!f&&!v&&!b&&s.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground px-4",children:"Start the conversation and inspire others! ð"})]}
1046):s.jsx("div",{className:"space-y-4 sm:space-y-6",children:a.map((J,K)=>s.jsx("div",{className:"animate-fade-in hover-scale transition-all duration-300",style:{animationDelay:`${K*.1}s`},children:s.jsx(Wj,{post:J,currentUserRole:c,onDelete:se,onHide:te,onPin:B,onUnpin:le})},J.id))})]})]})]})]}),!n&&s.jsx(Be,{}),s.jsx(O3,{isOpen:j,onClose:()=>N(!1),onSearch:M,currentQuery:f})]})}function eee(){const[e,t]=h.useState(!0),[r,n]=h.useState([]),[a,i]=h.useState([]),[o,l]=h.useState(!1),c=async()=>{try{t(!0);const{data:p,error:v}=await U.rpc("get_dynamic_badge_leaderboard",{p_limit:100});if(v)throw v;const g=(p||[]).map(w=>({user_id:w.user_id,badge_name:w.badge_name,badge_emoji:w.badge_emoji,user_points:w.user_points||0,percentile_rank:w.percentile_rank||0,display_name:w.display_name||"Anonymous",avatar_url:w.avatar_url,avatar_type:w.avatar_type}));n(g);const{data:b,error:y}=await U.from("challenges").select("id, title").eq("is_active",!0);if(y)throw y;const x=[];for(const w of b||[]){const{data:j,error:N}=await U.from("user_challenge_video_progress").select("user_id, completed_at").eq("challenge_id",w.id).eq("is_completed",!0);if(N)continue;const S=new Map;j==null||j.forEach(_=>{const I=_.user_id;S.has(I)||S.set(I,{user_id:I,videos_completed:0,latest_completion:_.completed_at});const R=S.get(I);R.videos_completed++,_.completed_at>R.latest_completion&&(R.latest_completion=_.completed_at)});const E=Array.from(S.values()).sort((_,I)=>_.videos_completed!==I.videos_completed?I.videos_completed-_.videos_completed:new Date(_.latest_completion).getTime()-new Date(I.latest_completion).getTime()).slice(0,3);if(E.length>0){const _=E.map(T=>T.user_id),{fetchSafeProfiles:I}=await ut(async()=>{const{fetchSafeProfiles:T}=await import("./useSafeProfiles-3mMwzyBY.js");return{fetchSafeProfiles:T}},[]),R=await I(_);x.push({challenge_id:w.id,challenge_title:w.title,champions:E.map((T,k)=>{const C=R.get(T.user_id);return{challenge_id:w.id,challenge_title:w.title,user_id:T.user_id,display_name:(C==null?void 0:C.nickname)||(C==null?void 0:C.first_name)||"Anonymous",avatar_url:(C==null?void 0:C.avatar_url)||null,videos_completed:T.videos_completed,latest_completion:T.latest_completion,rank:k+1}})})}}i(x)}catch(p){console.error("Error fetching Hall of Fame data:",p)}finally{t(!1)}};h.useEffect(()=>{c()},[]);const d=p=>{switch(p){case 1:return"ð¥";case 2:return"ð¥";case 3:return"ð¥";default:return"ð
"}},u=p=>r.filter(v=>v.badge_emoji===p);if(e)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fe,{isMenuOpen:o,onMenuToggle:()=>l(!o)}),s.jsxs("main",{className:"container mx-auto px-4 py-8",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx(wt,{className:"h-12 w-64 mx-auto mb-4"}),s.jsx(wt,{className:"h-6 w-96 mx-auto"})]}),s.jsx(wt,{className:"h-96 w-full"})]}),s.jsx(Be,{})]});const m=["Excellence is not a skill, it's an attitude! ðª","Champions aren't made in comfort zones! ð¥","Every expert was once a beginner! â","Progress, not perfection! ð"],f=m[Math.floor(Math.random()*m.length)];return s.jsxs("div",{className:"min-h-screen bg-background relative overflow-hidden",children:[s.jsx("div",{className:"fixed inset-0 pointer-events-none",children:[...Array(8)].map((p,v)=>s.jsx("div",{className:"absolute animate-bounce",style:{left:`${Math.random()*100}%`,top:`${Math.random()*100}%`,animationDelay:`${Math.random()*3}s`,animationDuration:`${3+Math.random()*2}s`},children:s.jsx(jo,{className:"h-4 w-4 text-primary/20 sparkle-float"})},v))}),s.jsx(Fe,{isMenuOpen:o,onMenuToggle:()=>l(!o)}),s.jsxs("main",{className:"container mx-auto px-4 py-8 relative z-10",children:[s.jsxs("div",{className:"text-center mb-8 animate-fade-in",children:[s.jsxs("div",{className:"relative",children:[s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-primary mb-4 flex items-center justify-center gap-4",children:[s.jsx(ss,{className:"h-10 w-10 md:h-16 md:w-16 text-primary trophy-bounce"}),"Hall of Fame",s.jsx(ss,{className:"h-10 w-10 md:h-16 md:w-16 text-primary trophy-bounce",style:{animationDelay:"1s"}})]}),s.jsxs("div",{className:"absolute -top-4 left-1/2 transform -translate-x-1/2",children:[s.jsx("div",{className:"confetti-fall",style:{animationDelay:"0.5s"},children:"ð"}),s.jsx("div",{className:"confetti-fall",style:{animationDelay:"1.5s"},children:"â"}),s.jsx("div",{className:"confetti-fall",style:{animationDelay:"2.5s"},children:"ð"})]})]}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-2xl mx-auto mb-4",children:"Celebrating our community's most dedicated members and their incredible achievements"}),s.jsx("div",{className:"bg-gradient-to-r from-primary/10 to-secondary/10 rounded-lg p-4 max-w-lg mx-auto",children:s.jsxs("p",{className:"text-primary font-medium italic",children:['"',f,'"']})})]}),s.jsxs("div",{className:"mb-12",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsxs("h2",{className:"text-3xl md:text-4xl font-bold text-primary mb-4 flex items-center justify-center gap-3",children:[s.jsx(Yf,{className:"h-8 w-8 md:h-10 md:w-10 text-primary animate-bounce-gentle"}),"Challenge Champions"]}),s.jsx("p",{className:"text-lg text-muted-foreground",children:"Top performers who mastered our challenges through dedication and speed"})]}),s.jsx("div",{className:"space-y-8",children:a.length>0?a.map(p=>s.jsxs(oe,{className:"overflow-hidden",children:[s.jsx(xe,{className:"bg-gradient-to-r from-primary/10 to-secondary/10",children:s.jsx(be,{className:"text-2xl text-center text-primary",children:p.challenge_title})}),s.jsx(ce,{className:"p-6",children:s.jsx("div",{className:"flex justify-center items-end gap-6",children:p.champions.map((v,g)=>{const b=["h-24","h-32","h-20"],x=[1,0,2][g],w=p.champions[x];return w?s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsxs("div",{className:"relative mb-4",children:[s.jsxs(to,{className:"h-16 w-16 border-4 border-primary",children:[s.jsx(so,{src:w.avatar_url||void 0}),s.jsx(ro,{className:"text-lg font-bold",children:w.display_name.split(" ").map(j=>j[0]).join("")})]}),s.jsx("div",{className:"absolute -top-2 -right-2 text-2xl",children:d(w.rank)})]}),s.jsx("div",{className:`bg-gradient-to-t from-primary to-secondary rounded-t-lg ${b[g]} w-20 flex items-end justify-center pb-3`,children:s.jsx("div",{className:"text-white font-bold text-xl",children:w.rank})}),s.jsxs("div",{className:"text-center mt-3",children:[s.jsx("div",{className:"font-bold text-primary text-sm",children:w.display_name}),s.jsxs("div",{className:"text-xs text-muted-foreground",children:[w.videos_completed," videos"]})]})]}
1046,w.user_id):null})})})]},p.challenge_id)):s.jsx(oe,{className:"py-12",children:s.jsxs(ce,{className:"text-center",children:[s.jsx(Yf,{className:"h-16 w-16 text-muted-foreground mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-muted-foreground mb-2",children:"No Challenge Champions Yet"}),s.jsx("p",{className:"text-muted-foreground",children:"Complete challenge videos to become a champion!"})]})})})]}),s.jsx("div",{className:"mb-8 text-center",children:s.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/10 px-6 py-3 rounded-full",children:[s.jsx(om,{className:"h-5 w-5 text-primary animate-pulse"}),s.jsx("span",{className:"text-primary font-semibold",children:"Community Milestones Unlocked!"}),s.jsx(ws,{className:"h-5 w-5 text-red-500 animate-pulse"})]})}),s.jsxs("div",{className:"mb-12",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsxs("h2",{className:"text-3xl md:text-4xl font-bold text-primary mb-4 flex items-center justify-center gap-3",children:[s.jsx(ss,{className:"h-8 w-8 md:h-10 md:w-10 text-primary animate-bounce-gentle"}),"Badge Leaderboard"]}),s.jsx("p",{className:"text-lg text-muted-foreground",children:"Elite members who earned their place through dedication and achievement"})]}),s.jsxs("div",{className:"space-y-8",children:[s.jsxs(oe,{className:"relative overflow-hidden border-2 border-yellow-500/20",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-yellow-500/5 via-amber-500/5 to-orange-500/5"}),s.jsx(xe,{className:"relative bg-gradient-to-r from-yellow-500/10 to-amber-500/10",children:s.jsxs(be,{className:"flex items-center gap-3 text-2xl",children:[s.jsx("div",{className:"bg-gradient-to-r from-yellow-500 to-amber-500 rounded-full p-2",children:s.jsx(ss,{className:"h-8 w-8 text-white animate-bounce-gentle"})}),s.jsx("span",{className:"bg-gradient-to-r from-yellow-600 to-amber-600 bg-clip-text text-transparent font-bold",children:"Legend ð"})]})}),s.jsx(ce,{className:"relative p-6",children:u("ð").length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:u("ð").map(p=>s.jsxs("div",{className:"flex items-center space-x-4 p-4 rounded-xl border-2 border-yellow-500/20 bg-gradient-to-r from-yellow-50/80 to-amber-50/80 hover:scale-105 transition-all duration-300 hover:shadow-lg hover:shadow-yellow-500/20",children:[s.jsxs("div",{className:"relative",children:[s.jsxs(to,{className:"h-14 w-14 border-2 border-yellow-500/50",children:[s.jsx(so,{src:p.avatar_url||void 0}),s.jsx(ro,{className:"bg-gradient-to-r from-yellow-100 to-amber-100 text-yellow-700 font-bold",children:p.display_name.split(" ").map(v=>v[0]).join("")})]}),s.jsx("div",{className:"absolute -top-2 -right-2 bg-gradient-to-r from-yellow-500 to-amber-500 rounded-full p-1",children:s.jsx(ss,{className:"h-3 w-3 text-white"})})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-bold text-lg text-yellow-700",children:p.display_name}),s.jsxs("div",{className:"text-sm text-yellow-600",children:[p.user_points," points · Top ",p.percentile_rank.toFixed(1),"%"]})]})]},p.user_id))}):s.jsxs("div",{className:"text-center py-8",children:[s.jsx(ss,{className:"h-16 w-16 text-yellow-400 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-yellow-600 mb-2",children:"No Legends Yet"}),s.jsx("p",{className:"text-yellow-500",children:"Be the first to reach legendary status!"})]})})]}),s.jsxs(oe,{className:"relative overflow-hidden border-2 border-purple-500/20",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-purple-500/5 via-blue-500/5 to-indigo-500/5"}),s.jsx(xe,{className:"relative bg-gradient-to-r from-purple-500/10 to-blue-500/10",children:s.jsxs(be,{className:"flex items-center gap-3 text-2xl",children:[s.jsx("div",{className:"bg-gradient-to-r from-purple-500 to-blue-500 rounded-full p-2",children:s.jsx(ui,{className:"h-8 w-8 text-white animate-bounce-gentle"})}),s.jsx("span",{className:"bg-gradient-to-r from-purple-600 to-blue-600 bg-clip-text text-transparent font-bold",children:"Champion ð"})]})}),s.jsx(ce,{className:"relative p-6",children:u("ð").length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:u("ð").map(p=>s.jsxs("div",{className:"flex items-center space-x-4 p-4 rounded-xl border-2 border-purple-500/20 bg-gradient-to-r from-purple-50/80 to-blue-50/80 hover:scale-105 transition-all duration-300 hover:shadow-lg hover:shadow-
1046purple-500/20",children:[s.jsxs("div",{className:"relative",children:[s.jsxs(to,{className:"h-14 w-14 border-2 border-purple-500/50",children:[s.jsx(so,{src:p.avatar_url||void 0}),s.jsx(ro,{className:"bg-gradient-to-r from-purple-100 to-blue-100 text-purple-700 font-bold",children:p.display_name.split(" ").map(v=>v[0]).join("")})]}),s.jsx("div",{className:"absolute -top-2 -right-2 bg-gradient-to-r from-purple-500 to-blue-500 rounded-full p-1",children:s.jsx(ui,{className:"h-3 w-3 text-white"})})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-bold text-lg text-purple-700",children:p.display_name}),s.jsxs("div",{className:"text-sm text-purple-600",children:[p.user_points," points · Top ",p.percentile_rank.toFixed(1),"%"]})]})]},p.user_id))}):s.jsxs("div",{className:"text-center py-8",children:[s.jsx(ui,{className:"h-16 w-16 text-purple-400 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-purple-600 mb-2",children:"No Champions Yet"}),s.jsx("p",{className:"text-purple-500",children:"Rise to champion status!"})]})})]}),s.jsxs(oe,{className:"relative overflow-hidden border-2 border-orange-500/20",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-orange-500/5 via-red-500/5 to-pink-500/5"}),s.jsx(xe,{className:"relative bg-gradient-to-r from-orange-500/10 to-red-500/10",children:s.jsxs(be,{className:"flex items-center gap-3 text-2xl",children:[s.jsx("div",{className:"bg-gradient-to-r from-orange-500 to-red-500 rounded-full p-2",children:s.jsx(Ru,{className:"h-8 w-8 text-white animate-bounce-gentle"})}),s.jsx("span",{className:"bg-gradient-to-r from-orange-600 to-red-600 bg-clip-text text-transparent font-bold",children:"Rising Star ð"})]})}),s.jsx(ce,{className:"relative p-6",children:u("ð").length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:u("ð").map(p=>s.jsxs("div",{className:"flex items-center space-x-4 p-4 rounded-xl border-2 border-orange-500/20 bg-gradient-to-r from-orange-50/80 to-red-50/80 hover:scale-105 transition-all duration-300 hover:shadow-lg hover:shadow-orange-500/20",children:[s.jsxs("div",{className:"relative",children:[s.jsxs(to,{className:"h-14 w-14 border-2 border-orange-500/50",children:[s.jsx(so,{src:p.avatar_url||void 0}),s.jsx(ro,{className:"bg-gradient-to-r from-orange-100 to-red-100 text-orange-700 font-bold",children:p.display_name.split(" ").map(v=>v[0]).join("")})]}),s.jsx("div",{className:"absolute -top-2 -right-2 bg-gradient-to-r from-orange-500 to-red-500 rounded-full p-1",children:s.jsx(Ru,{className:"h-3 w-3 text-white"})})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-bold text-lg text-orange-700",children:p.display_name}),s.jsxs("div",{className:"text-sm text-orange-600",children:[p.user_points," points · Top ",p.percentile_rank.toFixed(1),"%"]})]})]},p.user_id))}):s.jsxs("div",{className:"text-center py-8",children:[s.jsx(Ru,{className:"h-16 w-16 text-orange-400 mx-auto mb-4"}),s.jsx("h3",{className:"text-xl font-semibold text-orange-600 mb-2",children:"No Rising Stars Yet"}),s.jsx("p",{className:"text-orange-500",children:"Start your journey to stardom!"})]})})]})]})]})]}),s.jsx(Be,{})]})}const tee=()=>{const{instructorId:e}=la(),t=qe(),[r,n]=h.useState(null),[a,i]=h.useState([]),[o,l]=h.useState(!0),[c,d]=h.useState(!1),{toast:u}=at();h.useEffect(()=>{(async()=>{if(!e){l(!1);return}try{const{data:v,error:g}=await U.from("instructors").select("*").eq("id",e).single();if(g)throw g;n(v);const{data:b,error:y}=await U.from("videos").select("vimeo_id, title, description, thumbnail_url, duration_seconds, difficulty_level, page_type").eq("instructor_id",e).eq("is_visible",!0).order("created_at",{ascending:!1});if(y)throw y;i(b||[])}catch(v){console.error("Error fetching instructor data:",v),u({title:"ΣÏάλμα",description:"Îεν ήÏαν δÏ
ναÏή η ÏÏÏÏÏÏη ÏÏν ÏÏοιÏείÏν ÏοÏ
εκÏαιδεÏ
Ïή",variant:"destructive"})}finally{l(!1)}})()},[e,u]);const m=p=>{if(!p)return"";const v=Math.floor(p/60),g=p%60;return`${v}:${g.toString().padStart(2,"0")}`},f=p=>{const v=p.page_type||"workouts";t(`/${v}/${p.vimeo_id}`)};return o?s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fe,{isMenuOpen:c,onMenuToggle:()=>d(!c)}),s.jsx("div",{className:"flex justify-center items-center h-64 sm:h-96 pt-24 sm:pt-28 md:pt-32 lg:pt-36",children:s.jsx("div",{className:"animate-spin rounded-full h-32 w-32 border-b-2 border-primary"})}),s.jsx(Be,{})]}):r?s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fe,{isMenuOpen:c,onMenuToggle:()=>d(!c)}),s.jsxs("main",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-6 lg:py-8 pt-24 sm:pt-28 md:pt-32 lg:pt-36",children:[s.jsx("div",{className:"mb-4 lg:mb-6",children:s.jsxs(F,{variant:"ghost",onClick:()=>t(-1),className:"text-muted-foreground hover:text-foreground flex items-center gap-2 hover:gap-3 transition-all duration-200",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"ÎÏιÏÏÏοÏή"})]})}),s.jsx(oe,{className:"p-4 sm:p-6 lg:p-8 mb-6 lg:mb-8",children:s.jsxs("div",{className:"flex flex-col items-center text-center sm:flex-row sm:items-start sm:text-left gap-4 sm:gap-6",children:[s.jsxs(to,{className:"h-20 w-20 sm:h-24 sm:w-24 lg:h-32 lg:w-32 shrink-0",children:[s.jsx(so,{src:r.photo_url,alt:r.name}),s.jsx(ro,{className:"text-lg sm:text-xl lg:text-3xl",children:r.name?r.name.charAt(0).toUpperCase():s.jsx(Nn,{className:"h-6 w-6 sm:h-8 sm:w-8 lg:h-12 lg:w-12"})})]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h1",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-foreground mb-2 break-words",children:r.name}),r.bio&&s.jsx("p",{className:"text-sm sm:text-base text-muted-foreground leading-relaxed mb-3 sm:mb-4",children:r.bio}),s.jsxs("div",{className:"text-xs sm:text-sm text-muted-foreground",children:[a.length," βίνÏεο διαθÎÏιμα"]})]})]})}),s.jsxs("div",{children:[s.jsxs("h2",{className:"text-lg sm:text-xl lg:text-2xl font-bold text-foreground mb-4 sm:mb-6",children:["ÎίνÏεο αÏÏ ",r.name]}),a.length>0?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-6",children:a.map(p=>s.jsx(sh,{title:p.title,overlayTitle:Ro(p.title),instructor:r.name,duration:m(p.duration_seconds),thumbnail:p.thumbnail_url,difficultyLevel:p.difficulty_level,onClick:()=>f(p)},p.vimeo_id))}):s.jsx(oe,{className:"p-6 sm:p-8 text-center",children:s.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"Îεν Ï
ÏάÏÏοÏ
ν διαθÎÏιμα βίνÏεο αÏÏ Î±Ï
ÏÏν Ïον εκÏαιδεÏ
Ïή ÏÏÎ¿Ï Ïο ÏαÏÏν."})})]})]}),s.jsx(Be,{})]}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fe,{isMenuOpen:c,onMenuToggle:()=>d(!c)}),s.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-6 lg:py-8 pt-24 sm:pt-28 md:pt-32 lg:pt-36",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"mb-4",children:s.jsxs(F,{variant:"ghost",onClick:()=>t(-1),className:"text-muted-foreground hover:text-foreground flex items-center gap-2 mx-auto",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"ÎÏιÏÏÏοÏή"})]})}),s.jsx("h1",{className:"text-xl sm:text-2xl font-bold text-foreground mb-4",children:"ΠεκÏαιδεÏ
ÏÎ®Ï Î´ÎµÎ½ βÏÎθηκε"}),s.jsx("p",{className:"text-muted-foreground",children:"ΠεκÏαιδεÏ
ÏÎ®Ï ÏοÏ
αναζηÏάÏε δεν Ï
ÏάÏÏει ή δεν είναι διαθÎÏιμοÏ."})]})}),s.jsx(Be,{})]})},see=()=>{const{videoId:e}=la(),[t,r]=h.useState(!1);return e?s.jsx(oi,{}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Fe,{isMenuOpen:t,onMenuToggle:()=>r(!t)}),s.jsxs("main",{className:"container mx-auto px-4 py-8",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Other Content"}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Additional video content that doesn't fit into specific categories."})]}),s.jsx($g,{pageType:"undefined"})]}),s.jsx(Be,{})]})};var Yj="Progress",Kj=100,[ree,_te]=gs(Yj),[nee,aee]=ree(Yj),D3=h.forwardRef((e,t)=>
1046{const{__scopeProgress:r,value:n=null,max:a,getValueLabel:i=iee,...o}=e;(a||a===0)&&!tS(a)&&console.error(oee(`${a}`,"Progress"));const l=tS(a)?a:Kj;n!==null&&!sS(n,l)&&console.error(lee(`${n}`,"Progress"));const c=sS(n,l)?n:null,d=kp(c)?i(c,l):void 0;return s.jsx(nee,{scope:r,value:c,max:l,children:s.jsx(Ce.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":kp(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":$3(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});D3.displayName=Yj;var L3="ProgressIndicator",F3=h.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,a=aee(L3,r);return s.jsx(Ce.div,{"data-state":$3(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...n,ref:t})});F3.displayName=L3;function iee(e,t){return`${Math.round(e/t*100)}%`}function $3(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function kp(e){return typeof e=="number"}function tS(e){return kp(e)&&!isNaN(e)&&e>0}function sS(e,t){return kp(e)&&!isNaN(e)&&e<=t&&e>=0}function oee(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Kj}\`.`}function lee(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 1047 - a positive number 1048 - less than the value passed to \`max\` (or ${Kj} if no \`max\` prop is set) 1049 - \`null\` or \`undefined\` if the progress is indeterminate. 1050 1051Defaulting to \`null\`.`}var U3=D3,cee=F3;const Sp=h.forwardRef(({className:e,value:t,...r},n)=>s.jsx(U3,{ref:n,className:me("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:s.jsx(cee,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Sp.displayName=U3.displayName;function B3(){const{user:e,session:t}=jt(),{toast:r}=at(),[n,a]=h.useState([]),[i,o]=h.useState(!1),[l,c]=h.useState(!1),[d,u]=h.useState(!1),[m,f]=h.useState([]),[p,v]=h.useState(!0),[g,b]=h.useState({totalSynced:0,totalErrors:0,currentBatch:0,isRunning:!1,lastError:null}),[y,x]=h.useState(!0);h.useEffect(()=>{e&&t&&w()},[e,t]);const w=async()=>{try{const{data:k,error:C}=await U.from("admin_imports").select("*").order("created_at",{ascending:!1});if(C)throw C;f(k||[])}catch(k){console.error("Error fetching import sessions:",k),r({title:"Error",description:"Failed to fetch import sessions",variant:"destructive"})}finally{v(!1)}},j=k=>{var L;const C=(L=k.target.files)==null?void 0:L[0];if(!C)return;const A=new FileReader;A.onload=O=>{var W;const M=((W=O.target)==null?void 0:W.result).split(` 1052`),D=M[0].split(",").map(X=>X.trim()),$=M.slice(1).map(X=>{if(!X.trim())return null;const q=X.split(",").map(te=>te.trim().replace(/"/g,"")),H={};D.forEach((te,B)=>{H[te]=q[B]||""});const se={email:H["User email"]||H.email||"",first_name:"",last_name:"",phone_number:"",postal_address:"",postal_code:"",city:"",country:"",legacy_user_id:H["User ID"]||"",created_at:H["Created on date"]||H.Created||H["Created at"]||H["Registration Date"]||H["Date Created"]||H["Joined Date"]||H["User created"]||"",migration_date:H["Migration Date"]||H["Original Date"]||H["Import Date"]||"",original_data:H};if(H["User Name"]){const te=H["User Name"].split(" ");se.first_name=te[0]||"",se.last_name=te.slice(1).join(" ")||""}return se}).filter(Boolean);a($),r({title:"CSV Loaded",description:`${$.length} records loaded from CSV`})},A.readAsText(C)},N=async()=>{if(!n.length){r({title:"Error",description:"Please upload a CSV file first",variant:"destructive"});return}o(!0);try{console.log("Starting CSV import with:",{csvDataLength:n.length,userId:e==null?void 0:e.id,hasSession:!!t,accessToken:t!=null&&t.access_token?"present":"missing"});const{data:k}=await U.from("subscribers").select("email").eq("original_platform","csv_import"),C=new Set((k==null?void 0:k.map(D=>D.email))||[]),A=n.filter(D=>!C.has(D.email));if(console.log(`Found ${C.size} already imported, processing ${A.length} new records`),A.length===0){r({title:"All Records Already Imported",description:"All records in this CSV have already been imported"});return}const L=500;let O=0,P=0,M=0;for(let D=0;D<A.length;D+=L){const $=A.slice(D,D+L),W=Math.floor(D/L)+1,X=Math.ceil(A.length/L);console.log(`Processing chunk ${W}/${X} (${$.length}
1052 records)`),r({title:"Processing Chunk",description:`Processing chunk ${W} of ${X} (${$.length} records)`});const{data:q,error:H}=await U.functions.invoke("import-csv-members",{body:{csvData:$},headers:{Authorization:`Bearer ${t==null?void 0:t.access_token}`}});H?(console.error(`Error in chunk ${W}:`,H),M+=$.length):(console.log(`Chunk ${W} completed:`,q),P+=q.successCount||0,M+=q.errorCount||0),O+=$.length,D+L<A.length&&await new Promise(se=>setTimeout(se,1e3))}r({title:"Import Completed",description:`Processed ${O} records. Success: ${P}, Errors: ${M}`}),w()}catch(k){console.error("Error importing CSV:",k);const C=k instanceof Error?k.message:"Unknown error occurred";r({title:"Error",description:`Failed to start CSV import: ${C}`,variant:"destructive"})}finally{o(!1)}},S=async()=>{try{console.log("Testing function with GET request...");const{data:k,error:C}=await U.functions.invoke("import-csv-members",{method:"GET"});console.log("Test response:",{data:k,error:C}),r({title:"Function Test",description:k?`Function is working: ${k.status}`:`Error: ${C==null?void 0:C.message}`,variant:k?"default":"destructive"})}catch(k){console.error("Test error:",k),r({title:"Test Error",description:k instanceof Error?k.message:"Unknown error",variant:"destructive"})}},E=async()=>{c(!0);try{if(console.log("[STRIPE-IMPORT] Starting background import..."),!t||!t.access_token)throw new Error("No valid session found. Please refresh the page and try again.");const{data:k}=await U.from("user_roles").select("role").eq("user_id",t.user.id).eq("role","admin").single();if(!k)throw new Error("Admin role required. Please contact an administrator.");const{data:C,error:A}=await U.functions.invoke("bulk-sync-legacy-stripe-data-v2",{body:{batchSize:200,skipExisting:!0,testMode:!1},headers:{Authorization:`Bearer ${t.access_token}`}});if(A)throw A;r({title:"Background Import Started",description:"Stripe subscriber import is running in the background. Track progress in Import History."}),w()}catch(k){console.error("[STRIPE-IMPORT] Error:",k);const C=(k==null?void 0:k.name)==="FunctionsFetchError";r({title:"Error",description:C?"Request failed. The background import function should be used instead.":(k==null?void 0:k.message)||"Failed to start Stripe import",variant:"destructive"})}finally{c(!1)}},_=async()=>{u(!0),b({totalSynced:0,totalErrors:0,currentBatch:0,isRunning:!0,lastError:null});try{let k=!0,C,A=0;for(;k;){A++,b($=>({...$,currentBatch:A}));const L=new URLSearchParams({only_active:y.toString(),page_limit:"100"});C&&L.set("starting_after",C);const{data:O,error:P}=await U.functions.invoke(`sync-stripe-subscribers?${L.toString()}`,{headers:{Authorization:`Bearer ${t==null?void 0:t.access_token}`}});if(P){const $=P.message||"Unknown error occurred";throw b(W=>({...W,lastError:$,isRunning:!1})),P}b($=>({...$,totalSynced:$.totalSynced+(O.syncedCount||0),totalErrors:$.totalErrors+(O.errorCount||0)}));const M=g.totalSynced+(O.syncedCount||0),D=g.totalErrors+(O.errorCount||0);r({title:`Batch ${A} Completed`,description:`Processed ${O.totalInBatch} subscriptions. Running total: ${M} synced, ${D} errors`}),k=O.hasMore,C=O.nextCursor,k&&await new Promise($=>setTimeout($,2e3))}b(L=>({...L,isRunning:!1})),r({title:"Stripe Sync Completed",description:`Total synced: ${g.totalSynced}, Total errors: ${g.totalErrors}`})}catch(k){console.error("Error syncing Stripe subscribers:",k);const C=k instanceof Error?k.message:"Unknown error occurred";b(A=>({...A,lastError:C,isRunning:!1})),r({title:"Error",description:`Failed to sync Stripe subscribers: ${C}`,variant:"destructive"})}finally{u(!1)}},I=k=>{switch(k){case"completed":return s.jsx(ta,{className:"h-4 w-4 text-green-500"});case"processing":return s.jsx(Ms,{className:"h-4 w-4 text-blue-500"});case"failed":return s.jsx(ns,{className:"h-4 w-4 text-red-500"});default:return s.jsx(Ms,{className:"h-4 w-4 text-gray-500"})}},R=k=>{switch(k){case"completed":return"default";case"processing":return"secondary";case"failed":return"destructive";default:return"secondary"}},T=k=>k.total_records===0?0:k.processed_records/k.total_records*100;return p?s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}):!e||!t?s.jsx("div",{className:"flex items-center justify-center min-h-screen",children:s.jsxs(er,{children:[s.jsx(ns,{className:"h-4 w-4"}),s.jsx(tr,{children:"You must be logged in to access the Migration Dashboard."})]})}):s.jsxs("div",{className:"container mx-auto p-6 pt-28 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold",children:"Migration Dashboard"}),s.jsx("p",{className:"text-muted-foreground",children:"Import existing members and Stripe subscribers"}),s.jsxs(er,{className:"mt-4",children:[s.jsx(ns,{className:"h-4 w-4"}),s.jsxs(tr,{children:[s.jsx("strong",{children:"Authentication Status:"}),s.jsx("br",{}),"User ID: ",(e==null?void 0:e.id)||"Not logged in",s.jsx("br",{}),"Email: ",(e==null?void 0:e.email)||"No email",s.jsx("br",{}),"Session: ",t?"Active":"No session",s.jsx("br",{}),"Access Token: ",t!=null&&t.access_token?"Present":"Missing"]})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(F,{onClick:S,variant:"outline",size:"sm",children:"Test Function"}),s.jsxs(F,{onClick:w,variant:"outline",size:"sm",children:[s.jsx(Yt,{className:"h-4 w-4 mr-2"}),"Refresh"]})]})]}),s.jsxs(Si,{defaultValue:"import",className:"space-y-6",children:[s.jsxs(Ci,{children:[s.jsx(Pt,{value:"import",children:"Import Data"}),s.jsx(Pt,{value:"history",children:"Import History"})]}),s.jsx(it,{value:"import",className:"space-y-6",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(Kf,{className:"h-5 w-5"}),"CSV Members Import"]}),s.jsx(gt,{children:"Import existing members from CSV file"})]}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(_e,{htmlFor:"csv-upload",children:"Upload CSV File"}),s.jsx(ke,{id:"csv-upload",type:"file",accept:".csv",onChange:j,className:"mt-1"})]}),n.length>0&&s.jsxs(er,{children:[s.jsx(ta,{className:"h-4 w-4"}),s.jsxs(tr,{children:[n.length," records loaded. Ready to import."]})]}),s.jsx(F,{onClick:N,disabled:i||n.length===0,className:"w-full",children:i?s.jsxs(s.Fragment,{children:[s.jsx(Yt,{className:"h-4 w-4 mr-2 animate-spin"}),"Importing CSV..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Kf,{className:"h-4 w-4 mr-2"}),"Import CSV Members"]})})]})]}),s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(vi,{className:"h-5 w-5"}),"Stripe Subscribers Import"]}),s.jsx(gt,{children:"Import existing Stripe subscribers from Stripe"})]}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs(er,{children:[s.jsx(ns,{className:"h-4 w-4"}
1052),s.jsx(tr,{children:'Use "Start Background Import" for the initial full import. Use "Sync All" for incremental updates.'})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(_e,{htmlFor:"active-only",children:"Active/trialing subscribers only"}),s.jsx(km,{id:"active-only",checked:y,onCheckedChange:x,disabled:d})]}),g.isRunning&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("span",{children:["Batch ",g.currentBatch]}),s.jsxs("span",{children:["Synced: ",g.totalSynced," | Errors: ",g.totalErrors]})]}),s.jsx(Sp,{value:50,className:"h-2"})]}),g.lastError&&s.jsxs(er,{variant:"destructive",children:[s.jsx(ns,{className:"h-4 w-4"}),s.jsxs(tr,{children:["Last error: ",g.lastError]})]}),!g.isRunning&&(g.totalSynced>0||g.totalErrors>0)&&s.jsxs(er,{children:[s.jsx(ta,{className:"h-4 w-4"}),s.jsxs(tr,{children:["Last sync: ",g.totalSynced," synced, ",g.totalErrors," errors"]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(F,{onClick:E,disabled:l||d,className:"w-full",children:l?s.jsxs(s.Fragment,{children:[s.jsx(Yt,{className:"h-4 w-4 mr-2 animate-spin"}),"Starting Background Import..."]}):s.jsxs(s.Fragment,{children:[s.jsx(vi,{className:"h-4 w-4 mr-2"}),"Start Background Import"]})}),s.jsx(F,{onClick:_,disabled:l||d,variant:"outline",className:"w-full",children:d?s.jsxs(s.Fragment,{children:[s.jsx(Yt,{className:"h-4 w-4 mr-2 animate-spin"}),"Syncing Batch ",g.currentBatch,"..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Yt,{className:"h-4 w-4 mr-2"}),"Sync All Subscribers"]}
1052)}),s.jsxs(F,{onClick:()=>window.open("https://supabase.com/dashboard/project/gcpjvgszviytdocnvyao/functions/sync-stripe-subscribers/logs","_blank"),variant:"ghost",size:"sm",className:"w-full",children:[s.jsx(im,{className:"h-4 w-4 mr-2"}),"View Sync Logs"]})]})]})]})]})}),s.jsx(it,{value:"history",children:s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsx(be,{children:"Import History"}),s.jsx(gt,{children:"View all import sessions and their status"})]}),s.jsxs(ce,{children:[s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"Type"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Progress"}),s.jsx(Ae,{children:"Success"}),s.jsx(Ae,{children:"Errors"}),s.jsx(Ae,{children:"Created"})]})}),s.jsx(Vr,{children:m.map(k=>s.jsxs(Lt,{children:[s.jsx(Ie,{children:s.jsx(ye,{variant:"outline",children:k.import_type.toUpperCase()})}),s.jsx(Ie,{children:s.jsxs("div",{className:"flex items-center gap-2",children:[I(k.status),s.jsx(ye,{variant:R(k.status),children:k.status})]})}),s.jsx(Ie,{children:s.jsxs("div",{className:"space-y-1",children:[s.jsx(Sp,{value:T(k),className:"w-20"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[k.processed_records,"/",k.total_records]})]})}),s.jsx(Ie,{children:s.jsx("span",{className:"text-green-600 font-medium",children:k.success_count})}),s.jsx(Ie,{children:s.jsx("span",{className:"text-red-600 font-medium",children:k.error_count})}),s.jsx(Ie,{children:new Date(k.created_at).toLocaleDateString()})]},k.id))})]}),m.length===0&&s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No import sessions found"})]})]})})]})]})}const dee=Object.freeze(Object.defineProperty({__proto__:null,default:B3},Symbol.toStringTag,{value:"Module"})),rS=()=>{const e=window.location.hostname;return s.jsx("div",{className:"min-h-screen bg-background p-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("h1",{className:"text-3xl font-bold mb-6 text-primary",children:"Health Check"}),s.jsxs("div",{className:"grid gap-6",children:[s.jsxs("div",{className:"bg-card p-6 rounded-lg border border-primary",children:[s.jsx("h2",{className:"text-xl font-semibold mb-4 text-primary",children:"ðï¸ Build Info"}),s.jsxs("div",{className:"space-y-2 font-mono text-sm bg-muted p-4 rounded",children:[s.jsxs("div",{children:[s.jsx("strong",{children:"Build ID:"})," ",s.jsx("span",{className:"text-primary font-bold",children:Gee})]}),s.jsxs("div",{children:[s.jsx("strong",{children:"Build Time:"})," ",Yee]}),s.jsx("div",{className:"text-xs text-muted-foreground mt-2",children:"Compare this ID across preview vs published to verify deployment"})]})]}),s.jsxs("div",{className:"bg-card p-6 rounded-lg border",children:[s.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Environment Info"}),s.jsxs("div",{className:"space-y-2 font-mono text-sm",children:[s.jsxs("div",{children:[s.jsx("strong",{children:"Hostname:"})," ",e]}),s.jsxs("div",{children:[s.jsx("strong",{children:"Full URL:"})," ",window.location.href]}),s.jsxs("div",{children:[s.jsx("strong",{children:"User Agent:"})," ",navigator.userAgent]}),s.jsxs("div",{children:[s.jsx("strong",{children:"Page Load Time:"})," ",new Date().toISOString()]})]})]}),s.jsxs("div",{className:"bg-card p-6 rounded-lg border",children:[s.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Unified App on app.wellbe.gr"}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsx("div",{className:"text-green-600",children:"â
All routes on single domain"}),s.jsx("div",{className:"text-green-600",children:"â
No cross-domain authentication"}),s.jsx("div",{className:"text-green-600",children:"â
Simple React Router navigation"})]})]}),s.jsxs("div",{className:"bg-card p-6 rounded-lg border",children:[s.jsx("h2",{className:"text-xl font-semibold mb-4",children:"DNS Status"}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsx("div",{className:"text-green-600",children:"â
DNS resolution successful"}),s.jsx("div",{className:"text-green-600",children:"â
Application loaded"}),s.jsx("div",{className:"text-green-600",children:"â
React router functioning"})]})]}),s.jsxs("div",{className:"bg-card p-6 rounded-lg border",children:[s.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Qu
1052ick Navigation"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(cs,{to:"/",className:"block text-primary hover:underline",children:"â Go to Home"}),s.jsx(cs,{to:"/dashboard",className:"block text-primary hover:underline",children:"â Go to Dashboard"}),s.jsx(cs,{to:"/catalog",className:"block text-primary hover:underline",children:"â Go to Catalog"})]})]})]})]})})},uee=()=>{const e=$s(),t=window.location.hostname;return h.useEffect(()=>{console.error("ð¨ 404 Error Details:",{hostname:t,pathname:e.pathname,fullUrl:window.location.href,userAgent:navigator.userAgent,timestamp:new Date().toISOString()})},[e.pathname,t]),s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx("div",{className:"flex-1 flex items-center justify-center bg-background",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"text-6xl font-bold mb-4 text-primary",children:"404"}),s.jsx("p",{className:"text-xl text-muted-foreground mb-6",children:"Oops! This workout seems to be missing"}),s.jsxs("div",{className:"bg-card p-4 rounded-lg border mb-6 text-sm font-mono",children:[s.jsxs("div",{children:[s.jsx("strong",{children:"Hostname:"})," ",t]}),s.jsxs("div",{children:[s.jsx("strong",{children:"Path:"})," ",e.pathname]}),s.jsxs("div",{children:[s.jsx("strong",{children:"All Routes:"})," Unified on app.wellbe.gr"]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("a",{href:"/",className:"inline-flex items-center justify-center px-6 py-3 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors shadow-soft mr-3",children:"Return to Home"}),s.jsx("a",{href:"/__health",className:"inline-flex items-center justify-center px-6 py-3 bg-secondary text-secondary-foreground rounded-lg hover:bg-secondary/90 transition-colors border",children:"Health Check"})]})]})}),s.jsx(Be,{})]})},mee=()=>{const e=qe(),[t]=Do(),[r,n]=h.useState(!0),[a,i]=h.useState(null);return h.useEffect(()=>{(async()=>{try{n(!0),i(null);const{data:{session:l}}=await U.auth.getSession();if(l){console.log("Already authenticated, redirecting to dashboard"),e("/dashboard");return}const c=window.location.hash.substring(1),d=new URLSearchParams(window.location.search);let u=null,m=null,f=null;if(c){const g=new URLSearchParams(c);u=g.get("access_token"),m=g.get("refresh_token"),f=g.get("error_description")}if(!u&&d.toString()&&(u=d.get("access_token"),m=d.get("refresh_token"),f=d.get("error_description")),f){i(`Authentication failed: ${f}`),n(!1);return}if(!u){i("No authentication token found in URL"),n(!1);return}sessionStorage.setItem("isImpersonationSession","true");const{data:p,error:v}=await U.auth.setSession({access_token:u,refresh_token:m||""});if(v){console.error("Session error:",v),i(`Failed to establish session: ${v.message}`),n(!1);return}p.session?(sessionStorage.setItem("impersonatedUserEmail",p.session.user.email||""),console.log("Impersonation session established successfully"),e("/dashboard")):(i("Failed to create session from tokens"),n(!1))}catch(l){console.error("Authentication error:",l),i(`Authentication failed: ${l instanceof Error?l.message:"Unknown error"}`),n(!1)}})()},[t,e]),h.useEffect(()=>{const o=()=>{sessionStorage.removeItem("isImpersonationSession"),sessionStorage.removeItem("impersonatedUserEmail")};return window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)},[]),r?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-wellbe-light via-background to-wellbe-light/50",children:s.jsxs(oe,{className:"w-full max-w-md",children:[s.jsx(xe,{children:s.jsx(be,{className:"text-center",children:"Impersonating User..."})}),s.jsxs(ce,{className:"flex flex-col items-center space-y-4",children:[s.jsx(mt,{className:"h-8 w-8 animate-spin text-wellbe-gold"}),s.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"Please wait while we authenticate you as the selected user."})]})]})}):a?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-wellbe-light via-background to-wellbe-light/50",children:s.jsxs(oe,{className:"w-full max-w-md",children:[s.jsx(xe,{children:s.jsx(be,{className:"text-center text-destructive",children:"Impersonation Failed"})}),s.jsxs(ce,{className:"text-center space-y-4",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:a}),s.jsx("button",{onClick:()=>window.close(),className:"text-sm text-wellbe-gold hover:underline",children:"Close this window"})]})]})}):null},hee=({thumbnail:e,title:t,filterClass:r,filterName:n,isSelected:a,onSelect:i})=>s.jsxs(oe,{className:`overflow-hidden transition-all ${a?"ring-4 ring-primary":""}`,children:[s.jsxs("div",{className:"relative aspect-video overflow-hidden",children:[s.jsx("img",{src:e,alt:t,className:"w-full h-full object-cover"}),s.jsx("div",{className:`absolute inset-0 ${r}`}),a&&s.jsx("div",{className:"absolute top-2 right-2 bg-primary rounded-full p-1",children:s.jsx(Ar,{className:"w-4 h-4 text-primary-foreground"})})]}),s.jsxs("div",{className:"p-3",children:[s.jsx("p",{className:"text-xs font-semibold text-foreground mb-2 truncate",children:n}),s.jsx(F,{size:"sm",variant:a?"default":"outline",onClick:i,className:"w-full text-xs",children:a?"Selected":"Select Filter"})]})]}),pv=[{class:"filter-warm-solid-1",name:"Warm Beige Solid"},{class:"filter-warm-solid-2",name:"Golden Solid"},{class:"filter-warm-solid-3",name:"Bronze Solid"},{class:"filter-warm-solid-4",name:"Peru Solid"},{class:"filter-warm-solid-5",name:"Rose Solid"},{class:"filter-warm-solid-6",name:"Tan Solid"},{class:"filter-warm-solid-7",name:"Sandy Solid"},{class:"filter-warm-solid-8",name:"Rosy Brown Solid"},{class:"filter-warm-solid-9",name:"Burlywood Solid"},{class:"filter-warm-solid-10",name:"Khaki Solid"},{class:"filter-gradient-warm-1",name:"Beige to Gold Gradient"},{class:"filter-gradient-warm-2",name:"Bronze to Gold Gradient"},{class:"filter-gradient-warm-3",name:"Peru to Sandy Gradient"},{class:"filter-gradient-warm-4",name:"Saddle to Tan Gradient"},{class:"filter-gradient-warm-5",name:"Sienna to Burlywood Gradient"},{class:"filter-gradient-cool-1",name:"Blue to Purple Gradient"},{class:"filter-gradient-cool-2",name:"Teal to Cyan Gradient"},{class:"filter-gradient-cool-3",name:"Slate to Gray Gradient"},{class:"filter-gradient-cool-4",name:"Indigo to Violet Gradient"},{class:"filter-gradient-cool-5",name:"Pink to Orange Gradient"}
1052,{class:"filter-gradient-diagonal-1",name:"Diagonal Beige Gold"},{class:"filter-gradient-diagonal-2",name:"Diagonal Peru Cream"},{class:"filter-gradient-diagonal-3",name:"Diagonal Blue Purple"},{class:"filter-gradient-diagonal-4",name:"Diagonal Sandy Rose"},{class:"filter-gradient-diagonal-5",name:"Diagonal Teal Sky"},{class:"filter-gradient-radial-1",name:"Radial Beige Brown"},{class:"filter-gradient-radial-2",name:"Radial Gold Bronze"},{class:"filter-gradient-radial-3",name:"Radial Pink Rose"},{class:"filter-gradient-radial-4",name:"Radial Sky Blue"},{class:"filter-gradient-radial-5",name:"Radial Khaki Rose"},{class:"filter-gradient-lr-1",name:"Left-Right Beige Gold"},{class:"filter-gradient-lr-2",name:"Left-Right Brown Cream"},{class:"filter-gradient-lr-3",name:"Right-Left Peru Sandy"},{class:"filter-gradient-lr-4",name:"Left-Right Slate Light"},{class:"filter-gradient-lr-5",name:"Right-Left Pink Light"},{class:"filter-duotone-1",name:"Duotone Bronze Brown"},{class:"filter-duotone-2",name:"Duotone Pink Rose"},{class:"filter-duotone-3",name:"Duotone Blue Navy"},{class:"filter-duotone-4",name:"Duotone Green Olive"},{class:"filter-duotone-5",name:"Duotone Coral Red"},{class:"filter-duotone-6",name:"Duotone Goldenrod"},{class:"filter-duotone-7",name:"Duotone Purple Indigo"},{class:"filter-duotone-8",name:"Duotone Tan Brown"},{class:"filter-duotone-9",name:"Duotone Turquoise Teal"},{class:"filter-duotone-10",name:"Duotone Salmon Coral"},{class:"filter-vintage-1",name:"Vintage Sepia"},{class:"filter-vintage-2",name:"Vintage Warm"},{class:"filter-vintage-3",name:"Vintage Faded"},{class:"filter-vintage-4",name:"Vintage Cool"},{class:"filter-vintage-5",name:"Vintage Muted"}];function fee(){var u;const e=qe(),{videos:t,loading:r}=ki("workouts"),[n,a]=h.useState(null),[i,o]=h.useState(!1),l=Fw(t).filter(m=>m.categories.some(f=>f.toLowerCase().includes("pilates"))).slice(0,50),c=()=>{if(!n)return;const m=pv.find(p=>p.class===n);if(!m)return;const f=`.${m.class}`;navigator.clipboard.writeText(f),o(!0),ad({title:"CSS Copied!",description:`Filter class "${m.class}" copied to clipboard`}),setTimeout(()=>o(!1),2e3)},d=()=>{n&&(localStorage.setItem("selectedVideoFilter",n),ad({title:"Filter Applied!",description:"This filter will be used for all video thumbnails. Navigate to any page to see the effect."}))};return r?s.jsx("div",{className:"min-h-screen bg-background",children:s.jsx("div",{className:"container py-20 text-center",children:s.jsx("p",{className:"text-muted-foreground",children:"Loading pilates videos..."})})}):l.length===0?s.jsx("div",{className:"min-h-screen bg-background",children:s.jsxs("div",{className:"container py-20 text-center",children:[s.jsx("p",{className:"text-muted-foreground",children:"No pilates videos found. Please add some pilates videos first."}),s.jsxs(F,{onClick:()=>e("/"),className:"mt-4",children:[s.jsx(as,{className:"mr-2 h-4 w-4"}),"Go Home"]})]})}):s.jsx("div",{className:"min-h-screen bg-background",children:s.jsxs("div",{className:"container py-8",children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs(F,{variant:"outline",onClick:()=>e("/"),className:"mb-4",children:[s.jsx(as,{className:"mr-2 h-4 w-4"}),"Back"]}),s.jsx("h1",{className:"text-4xl font-bold mb-2",children:"Filter Preview - Pilates Videos"}),s.jsx("p",{className:"text-muted-foreground",children:"Browse 50 different filter variations and select your favorite"})]}),n&&s.jsx(oe,{className:"mb-8 p-6",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Selected Filter"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:(u=pv.find(m=>m.class===n))==null?void 0:u.name}),s.jsx("code",{className:"text-xs bg-muted px-3 py-2 rounded block mb-4",children:n})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(F,{onClick:c,variant:"outline",size:"sm",children:[i?s.jsx(Ar,{className:"mr-2 h-4 w-4"}):s.jsx(F0,{className:"mr-2 h-4 w-4"}),i?"Copied!":"Copy CSS"]}),s.jsx(F,{onClick:d,size:"sm",children:"Apply to All Videos"})]})]})}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 ga
1052p-4",children:l.slice(0,50).map((m,f)=>{const p=pv[f];return s.jsx(hee,{thumbnail:m.thumbnail,title:m.title,filterClass:p.class,filterName:p.name,isSelected:n===p.class,onSelect:()=>a(p.class)},`${m.id}-${p.class}`)})})]})})}const nS=[vw,yw,bw,ww,jw],pee={phat:"/category-images/phat-3.png",pilates:"/category-images/pilates-new.jpg","body sculpting":"/category-images/sculpting-new.jpg","barre workout":"/category-images/barre-new.jpg",barre:"/category-images/barre-new.jpg",breathworks:"/category-images/breathworks-3.png",διαλογιÏμοι:"/category-images/dialogismoi-4.png",stretching:"/category-images/stretching-new.jpg","stretching & εÏ
λÏ
γιÏια":"/category-images/stretching-new.jpg","office workouts":"/category-images/office.png",office:"/category-images/office.png","pelvic floor":"/category-images/pelvic-3.png",pelvic:"/category-images/pelvic-3.png","face workouts":"/category-images/face.png",face:"/category-images/face.png","sweat 16":"/category-images/sweat16-4.png",sweat16:"/category-images/sweat16-4.png","prenatal + postnatal":"/category-images/prenatal-new.jpeg",prenatal:"/category-images/prenatal-new.jpeg",postnatal:"/category-images/prenatal-new.jpeg","strong bones workouts":"/category-images/strong-bones.jpg","strong bones":"/category-images/strong-bones.jpg",yoga:"/category-images/yoga-new.jpg","nadia's videos":"/category-images/nadias-videos.png"},gee=(e,t)=>{const r=e.toLowerCase().trim(),n=pee[r];return n||nS[t%nS.length]},xee=e=>{const t=e.toLowerCase().trim();return t==="face"||t==="face workouts"?"35% center":"center"},vee=e=>e.toLowerCase().trim().includes("strong bones")?"bg-gradient-to-t from-amber-900/40 via-black/15 to-black/10":"bg-gradient-to-t from-amber-900/30 via-amber-900/5 to-transparent",yee=[{name:"ÎÎÎÎÎÎÎΣÎÎÎ",image:"/category-images/dialogismoi-4.png",description:"Guided meditation sessions",route:"/dialogismoi"},{name:"BREATHWORKS",image:"/category-images/breathworks-3.png",description:"Breathing exercises",route:"/catalog?filter=breathworks"}];function bee(){const{navigateWithPlatform:e}=ar(),[t,r]=h.useState([]),[n,a]=h.useState(!0);h.useEffect(()=>{(async()=>{try{const u=await gm.getSectionsByPageType("workouts");r(u)}catch(u){console.error("Error loading workout sections:",u)}finally{a(!1)}})()},[]);const i=d=>{e(d)},o=d=>{e(`/video/${d}`)},c=[...t.map((d,u)=>({name:W0(d.name),image:gee(d.name,u),description:d.description||"",route:`/section/${d.slug}`})),...yee];return n?s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(fs,{}),s.jsx("div",{className:"pt-14 pb-8 container mx-auto px-4",children:s.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})})})]}):s.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[s.jsx(fs,{}),s.jsxs("div",{className:"pt-6 pb-8 container mx-auto px-4 overflow-x-hidden",children:[s.jsx(Fo,{}),s.jsx(_R,{onVideoClick:o}),s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground mb-8 text-center",children:"ÎÎΤÎÎÎΡÎÎΣ ΠΡÎÎ ÎÎÎΣÎΣ"}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-7 gap-4 sm:gap-3 md:gap-2",children:c.map((d,u)=>s.jsxs("div",{onClick:()=>i(d.route),className:"group relative aspect-[3/4] sm:aspect-[2/3] overflow-hidden rounded-lg cursor-pointer",children:[s.jsx("div",{className:"absolute inset-0 bg-cover transition-transform duration-300 group-hover:scale-110",style:{backgroundImage:`url(${d.image})`,backgroundPosition:xee(d.name)}}),s.jsx("div",{className:`absolute inset-0 ${vee(d.name)}`}),s.jsx("div",{className:"absolute inset-0",children:s.jsx("h3",{className:"absolute bottom-6 left-1/2 -translate-x-1/2 w-[88%] text-white text-sm sm:text-base md:text-lg font-bold text-center whitespace-nowrap truncate transform transition-transform duration-300 group-hover:scale-105",children:d.name})})]},u))}),s.jsx("div",{className:"mt-12",children:s.jsx(vA,{showViewAllButton:!0,compact:!0,disablePaywall:!0})})]})]})}function wee(e,t){return h.useReducer((r,n)=>t[r][n]??r,e)}var Qj="ScrollArea",[z3,kte]=gs(Qj),[jee,An]=z3(Qj),W3=h.forwardRef((e,t)=>
vendor: 9,474 bytes, line 1052
1052{const{__scopeScrollArea:r,type:n="hover",dir:a,scrollHideDelay:i=600,...o}=e,[l,c]=h.useState(null),[d,u]=h.useState(null),[m,f]=h.useState(null),[p,v]=h.useState(null),[g,b]=h.useState(null),[y,x]=h.useState(0),[w,j]=h.useState(0),[N,S]=h.useState(!1),[E,_]=h.useState(!1),I=Ye(t,T=>c(T)),R=Vl(a);return s.jsx(jee,{scope:r,type:n,dir:R,scrollHideDelay:i,scrollArea:l,viewport:d,onViewportChange:u,content:m,onContentChange:f,scrollbarX:p,onScrollbarXChange:v,scrollbarXEnabled:N,onScrollbarXEnabledChange:S,scrollbarY:g,onScrollbarYChange:b,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:x,onCornerHeightChange:j,children:s.jsx(Ce.div,{dir:R,...o,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});W3.displayName=Qj;var V3="ScrollAreaViewport",H3=h.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:a,...i}=e,o=An(V3,r),l=h.useRef(null),c=Ye(t,l,o.onViewportChange);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),s.jsx(Ce.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:s.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});H3.displayName=V3;var za="ScrollAreaScrollbar",Xj=h.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=An(za,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=a,l=e.orientation==="horizontal";return h.useEffect(()=>(l?i(!0):o(!0),()=>{l?i(!1):o(!1)}),[l,i,o]),a.type==="hover"?s.jsx(Nee,{...n,ref:t,forceMount:r}):a.type==="scroll"?s.jsx(_ee,{...n,ref:t,forceMount:r}):a.type==="auto"?s.jsx(q3,{...n,ref:t,forceMount:r}):a.type==="always"?s.jsx(Jj,{...n,ref:t}):null});Xj.displayName=za;var Nee=h.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=An(za,e.__scopeScrollArea),[i,o]=h.useState(!1);return h.useEffect(()=>{const l=a.scrollArea;let c=0;if(l){const d=()=>{window.clearTimeout(c),o(!0)},u=()=>{c=window.setTimeout(()=>o(!1),a.scrollHideDelay)};return l.addEventListener("pointerenter",d),l.addEventListener("pointerleave",u),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",d),l.removeEventListener("pointerleave",u)}}},[a.scrollArea,a.scrollHideDelay]),s.jsx(Ns,{present:r||i,children:s.jsx(q3,{"data-state":i?"visible":"hidden",...n,ref:t})})}),_ee=h.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=An(za,e.__scopeScrollArea),i=e.orientation==="horizontal",o=Hg(()=>c("SCROLL_END"),100),[l,c]=wee("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 h.useEffect(()=>{if(l==="idle"){const d=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(d)}},[l,a.scrollHideDelay,c]),h.useEffect(()=>{const d=a.viewport,u=i?"scrollLeft":"scrollTop";if(d){let m=d[u];const f=()=>{const p=d[u];m!==p&&(c("SCROLL"),o()),m=p};return d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,i,c,o]),s.jsx(Ns,{present:r||l!=="hidden",children:s.jsx(Jj,{"data-state":l==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:pe(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:pe(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),q3=h.forwardRef((e,t)=>{const r=An(za,e.__scopeScrollArea),{forceMount:n,...a}=e,[i,o]=h.useState(!1),l=e.orientation==="horizontal",c=Hg(()=>{if(r.viewport){const d=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;o(l?d:u)}},10);return wd(r.viewport,c),wd(r.content,c),s.jsx(Ns,{present:n||i,children:s.jsx(Jj,{"data-state":i?"visible":"hidden",...a,ref:t})})}),Jj=h.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,a=An(za,e.__scopeScrollArea),i=h.useRef(null),o=h.useRef(0),[l,c]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=X3(l.viewport,l.content),u={...n,sizes:l,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:f=>o.current=f};function m(f,p){return Tee(f,o.current,l,p)}return r==="horizontal"?s.jsx(kee,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const f=a.viewport.scrollLeft,p=aS(f,l,a.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollLeft=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollLeft=m(f,a.dir))}}):r==="vertical"?s.jsx(See,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const f=a.viewport.scrollTop,p=aS(f,l);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollTop=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollTop=m(f))}}):null}),kee=h.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,i=An(za,e.__scopeScrollArea),[o,l]=h.useState(),c=h.useRef(null),d=Ye(t,c,i.onScrollbarXChange);return h.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),s.jsx(Y3,{"data-orientation":"horizontal",...a,ref:d,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Vg(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,m)=>{if(i.viewport){const f=i.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),Z3(f,m)&&u.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Ep(o.paddingLeft),paddingEnd:Ep(o.paddingRight)}})}})}),See=h.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,i=An(za,e.__scopeScrollArea),[o,l]=h.useState(),c=h.useRef(null),d=Ye(t,c,i.onScrollbarYChange);return h.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),s.jsx(Y3,{"data-orientation":"vertical",...a,ref:d,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Vg(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,m)=>{if(i.viewport){const f=i.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),Z3(f,m)&&u.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Ep(o.paddingTop),paddingEnd:Ep(o.paddingBottom)}})}})}),[Cee,G3]=z3(za),Y3=h.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:a,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:d,onWheelScroll:u,onResize:m,...f}=e,p=An(za,r),[v,g]=h.useState(null),b=Ye(t,I=>g(I)),y=h.useRef(null),x=h.useRef(""),w=p.viewport,j=n.content-n.viewport,N=rs(u),S=rs(c),E=Hg(m,10);function _(I){if(y.current){const R=I.clientX-y.current.left,T=I.clientY-y.current.top;d({x:R,y:T})}}return h.useEffect(()=>{const I=R=>{const T=R.target;(v==null?void 0:v.contains(T))&&N(R,j)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[w,v,j,N]),h.useEffect(S,[n,S]),wd(v,E),wd(p.content,E),s.jsx(Cee,{scope:r,scrollbar:v,hasThumb:a,onThumbChange:rs(i),onThumbPointerUp:rs(o),onThumbPositionChange:S,onThumbPointerDown:rs(l),children:s.jsx(Ce.div,{...f,ref:b,style:{position:"absolute",...f.style},onPointerDown:pe(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),y.current=v.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),_(I))}),onPointerMove:pe(e.onPointerMove,_),onPointerUp:pe(e.onPointerUp,I=>{const R=I.target;R.hasPointerCapture(I.pointerId)&&R.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),y.current=null})})})}),Cp="ScrollAreaThumb",K3=h.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=G3(Cp,e.__scopeScrollArea);return s.jsx(Ns,{present:r||a.hasThumb,children:s.jsx(Eee,{ref:t,...n})})}),Eee=h.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...a}=e,i=An(Cp,r),o=G3(Cp,r),{onThumbPositionChange:l}=o,c=Ye(t,m=>o.onThumbChange(m)),d=h.useRef(void 0),u=Hg(()=>{d.current&&(d.current(),d.current=void 0)},100);return h.useEffect(()=>{const m=i.viewport;if(m){const f=()=>{if(u(),!d.current){const p=Aee(m,l);d.current=p,l()}};return l(),m.addEventListener("scroll",f),()=>m.removeEventListener("scroll",f)}},[i.viewport,u,l]),s.jsx(Ce.div,{"data-state":o.hasThumb?"visible":"hidden",...a,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:pe(e.onPointerDownCapture,m=>{const p=m.target.getBoundingClientRect(),v=m.clientX-p.left,g=m.clientY-p.top;o.onThumbPointerDown({x:v,y:g})}),onPointerUp:pe(e.onPointerUp,o.onThumbPointerUp)})});K3.displayName=Cp;var Zj="ScrollAreaCorner",Q3=h.forwardRef((e,t)=>
1052{const r=An(Zj,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?s.jsx(Pee,{...e,ref:t}):null});Q3.displayName=Zj;var Pee=h.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,a=An(Zj,r),[i,o]=h.useState(0),[l,c]=h.useState(0),d=!!(i&&l);return wd(a.scrollbarX,()=>{var m;const u=((m=a.scrollbarX)==null?void 0:m.offsetHeight)||0;a.onCornerHeightChange(u),c(u)}),wd(a.scrollbarY,()=>{var m;const u=((m=a.scrollbarY)==null?void 0:m.offsetWidth)||0;a.onCornerWidthChange(u),o(u)}),d?s.jsx(Ce.div,{...n,ref:t,style:{width:i,height:l,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ep(e){return e?parseInt(e,10):0}function X3(e,t){const r=e/t;return isNaN(r)?0:r}function Vg(e){const t=X3(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Tee(e,t,r,n="ltr"){const a=Vg(r),i=a/2,o=t||i,l=a-o,c=r.scrollbar.paddingStart+o,d=r.scrollbar.size-r.scrollbar.paddingEnd-l,u=r.content-r.viewport,m=n==="ltr"?[0,u]:[u*-1,0];return J3([c,d],m)(e)}function aS(e,t,r="ltr"){const n=Vg(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,o=t.content-t.viewport,l=i-n,c=r==="ltr"?[0,o]:[o*-1,0],d=xb(e,c);return J3([0,o],[0,l])(d)}function J3(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Z3(e,t){return e>0&&e<t}var Aee=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function a(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,l=r.top!==i.top;(o||l)&&t(),r=i,n=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(n)};function Hg(e,t){const r=rs(e),n=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(n.current),[]),h.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function wd(e,t){const r=rs(t);is(()=>{let n=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}var eM=W3,Iee=H3,Ree=Q3;const hc=h.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(eM,{ref:n,className:me("relative overflow-hidden",e),...r,children:[s.jsx(Iee,{className:"h-full w-full rounded-[inherit]",children:t}),s.jsx(tM,{}),s.jsx(Ree,{})]}));hc.displayName=eM.displayName;const tM=h.forwardRef(({className:e,orientation:t="vertical",...r},n)=>s.jsx(Xj,{ref:n,orientation:t,className:me("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:s.jsx(K3,{className:"relative flex-1 rounded-full bg-border"})}));tM.displayName=Xj.displayName;function sM(){const{toast:e}=at(),[t,r]=h.useState(null),[n,a]=h.useState([]),[i,o]=h.useState(null),[l,c]=h.useState(!1),[d,u]=h.useState(!1),[m,f]=h.useState(null),[p,v]=h.useState(null),g=_=>{const R=_.replace(/^\uFEFF/,"").split(/\r?\n/).filter(C=>C.trim());if(R.length<2)return[];const T=R[0].split(";").map(C=>C.trim()),k=[];for(let C=1;C<R.length;C++){const A=R[C].split(";"),L={};T.forEach((O,P)=>{var M;L[O]=((M=A[P])==null?void 0:M.trim())||""}),k.push(L)}return k},b=async _=>{var k;const I=(k=_.target.files)==null?void 0:k[0];if(!I)return;if(!I.name.endsWith(".csv")){e({title:"Invalid file type",description:"Please upload a CSV file",variant:"destructive"});return}r(I),o(null),f(null);const R=await I.text(),T=g(R);a(T),e({title:"File loaded",description:`Parsed ${T.length} rows`})},y=async()=>{if(n.length===0){e({title:"No data",description:"Please upload a CSV file first",variant:"destructive"});return}c(!0);try{const _=[],I=[],R=n.map($=>$["User email"].toLowerCase().trim()),T=new Map;R.forEach($=>{T.set($,(T.get($)||0)+1)}),T.forEach(($,W)=>{$>1&&_.push(`Duplicate email in CSV: ${W} (appears ${$} times)`)});const{data:k,error:C}=await U.from("profiles").select("email").in("email",R);if(C)throw C;const A=new Set((k==null?void 0:k.map($=>{var W;return(W=$.email)==null?void 0:W.toLowerCase()}))||[]),L=R.filter($=>!A.has($)).length,O=R.filter($=>A.has($)).length,{data:P,error:M}=await U.from("subscribers").select(` 1053 email, 1054 subscription_tier, 1055 last_sync_at, 1056 profiles!inner(first_name, last_name) 1057 `).eq("subscribed",!0).not("email","in",`(${R.join(",")})`);if(M)throw M;const D=(P||[]).map($=>{var W,X;return{email:$.email,firstName:((W=$.profiles)==null?void 0:W.first_name)||null,lastName:((X=$.profiles)==null?void 0:X.last_name)||null,subscriptionTier:$.subscription_tier,lastSyncAt:$.last_sync_at}});
1057n.forEach(($,W)=>{const X=W+2,q=$["User email"];(!q||!q.includes("@"))&&_.push(`Row ${X}: Invalid email`),$["User Name"]||I.push(`Row ${X}: Missing name`);const H=parseFloat($.Lifetime);(isNaN(H)||H<0)&&I.push(`Row ${X}: Invalid lifetime value`)}),o({valid:_.length===0,errors:_,warnings:I,totalRows:n.length,usersToCreate:L,usersToUpdate:O,discrepantUsers:D})}catch(_){console.error("Validation error:",_),e({title:"Validation failed",description:_.message,variant:"destructive"})}finally{c(!1)}},x=async _=>{var I,R;try{const{data:T,error:k}=await U.from("admin_imports").select("*").eq("id",_).single();if(k)throw k;T&&(f({importId:T.id,status:T.status,totalRecords:T.total_records||0,processedRecords:T.processed_records||0,successCount:T.success_count||0,errorCount:T.error_count||0,createdCount:((I=T.continuation_metadata)==null?void 0:I.createdCount)||0,updatedCount:((R=T.continuation_metadata)==null?void 0:R.updatedCount)||0,errors:Array.isArray(T.errors)?T.errors:[]}),T.status!=="running"&&p&&(clearInterval(p),v(null),u(!1)))}catch(T){console.error("Error polling progress:",T)}},w=async()=>{if(!(i!=null&&i.valid)){e({title:"Cannot import",description:"Please fix validation errors first",variant:"destructive"});return}u(!0);try{const{data:_,error:I}=await U.functions.invoke("import-active-subscribers",{body:{csvData:n}});if(I)throw I;if(e({title:"Import started",description:`Processing ${n.length} subscribers`}),_!=null&&_.importId){localStorage.setItem("activeSubscribersImportId",_.importId);const R=setInterval(()=>{x(_.importId)},2e3);v(R)}}catch(_){console.error("Import error:",_),e({title:"Import failed",description:_.message,variant:"destructive"}),u(!1)}},j=async()=>{c(!0);try{const _=await fetch("/imports/new-customers-oct-2025.csv");if(!_.ok)throw new Error("Failed to load CSV file");const I=await _.text(),R=g(I);a(R),r(null),o(null),f(null),e({title:"Built-in CSV loaded",description:`Parsed ${R.length} rows from Oct 2025 customers`})}catch(_){e({title:"Failed to load CSV",description:_.message,variant:"destructive"})}finally{c(!1)}},N=async()=>{c(!0);try{const _=await fetch("/imports/new-customers-oct-2025.csv");if(!_.ok)throw new Error("Failed to load CSV file");const I=await _.text(),R=g(I);a(R),e({title:"CSV loaded",description:`Validating ${R.length} rows...`});const T=[],k=[],C=R.map(te=>te["User email"].toLowerCase().trim()),A=new Map;C.forEach(te=>{A.set(te,(A.get(te)||0)+1)}),A.forEach((te,B)=>{te>1&&T.push(`Duplicate email in CSV: ${B} (appears ${te} times)`)});const{data:L,error:O}=await U.from("profiles").select("email").in("email",C);if(O)throw O;const P=new Set((L==null?void 0:L.map(te=>{var B;return(B=te.email)==null?void 0:B.toLowerCase()}))||[]),M=C.filter(te=>!P.has(te)).length,D=C.filter(te=>P.has(te)).length,{data:$,error:W}=await U.from("subscribers").select(` 1058 email, 1059 subscription_tier, 1060 last_sync_at, 1061 profiles!inner(first_name, last_name) 1062 `).eq("subscribed",!0).not("email","in",`(${C.join(",")})`);if(W)throw W;const X=($||[]).map(te=>{var B,le;return{email:te.email,firstName:((B=te.profiles)==null?void 0:B.first_name)||null,lastName:((le=te.profiles)==null?void 0:le.last_name)||null,subscriptionTier:te.subscription_tier,lastSyncAt:te.last_sync_at}});R.forEach((te,B)=>{const le=B+2,J=te["User email"];(!J||!J.includes("@"))&&T.push(`Row ${le}: Invalid email`),te["User Name"]||k.push(`Row ${le}: Missing name`);const K=parseFloat(te.Lifetime);(isNaN(K)||K<0)&&k.push(`Row ${le}: Invalid lifetime value`)});const q={valid:T.length===0,errors:T,warnings:k,totalRows:R.length,usersToCreate:M,usersToUpdate:D,discrepantUsers:X};if(o(q),!q.valid){e({title:"Validation failed",description:`Found ${T.length} errors`,variant:"destructive"}),c(!1);return}u(!0);const{data:H,error:se}=await U.functions.invoke("import-active-subscribers",{body:{csvData:R}});if(se)throw se;if(e({title:"Import started",description:`Processing ${R.length} subscribers in background`}),H!=null&&H.importId){localStorage.setItem("activeSubscribersImportId",H.importId);const te=setInterval(()=>{x(H.importId)},2e3);v(te)}}catch(_){console.error("Built-in import error:",_),e({title:"Import failed",description:_.message,variant:"destructive"}),u(!1)}finally{c(!1)}},S=async()=>
1062{if(i!=null&&i.discrepantUsers){c(!0);try{const _=i.discrepantUsers.map(R=>R.email),{error:I}=await U.from("subscribers").update({subscribed:!1}).in("email",_);if(I)throw I;e({title:"Success",description:`Marked ${_.length} users as inactive`}),await y()}catch(_){console.error("Error marking users inactive:",_),e({title:"Error",description:_.message,variant:"destructive"})}finally{c(!1)}}},E=()=>{if(!(i!=null&&i.discrepantUsers))return;const _=["Email,First Name,Last Name,Subscription Tier,Last Sync",...i.discrepantUsers.map(k=>`${k.email},${k.firstName||""},${k.lastName||""},${k.subscriptionTier||""},${k.lastSyncAt||""}`)].join(` 1063`),I=new Blob([_],{type:"text/csv"}),R=URL.createObjectURL(I),T=document.createElement("a");T.href=R,T.download=`discrepant-users-${new Date().toISOString().split("T")[0]}.csv`,T.click()};return h.useEffect(()=>{const _=localStorage.getItem("activeSubscribersImportId");if(_){u(!0),x(_);const I=setInterval(()=>{x(_)},2e3);v(I)}},[]),h.useEffect(()=>{m&&(m.status==="completed"||m.status==="failed")&&localStorage.removeItem("activeSubscribersImportId")},[m]),h.useEffect(()=>()=>{p&&clearInterval(p)},[p]),s.jsxs("div",{className:"space-y-6 p-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-3xl font-bold mb-2",children:"Active Subscribers Import"}),s.jsx("p",{className:"text-muted-foreground",children:"Import active subscribers from CSV and sync with your database"})]}),s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(Kf,{className:"h-5 w-5"}),"Upload CSV File"]}),s.jsx(gt,{children:"Upload your active subscribers CSV file with columns: User ID, User Name, User email, Lifetime, Segment, Status, Subscription Plan, Created on date, Next invoice date, Subscription Created at, Canceled at"})]}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("input",{type:"file",accept:".csv",onChange:b,className:"hidden",id:"csv-upload"}),s.jsx("label",{htmlFor:"csv-upload",children:s.jsx(F,{asChild:!0,children:s.jsxs("span",{children:[s.jsx(D5,{className:"h-4 w-4 mr-2"}),"Select CSV File"]})})}),s.jsxs(F,{onClick:j,disabled:l,variant:"outline",children:[s.jsx(df,{className:"h-4 w-4 mr-2"}),"Load Built-in CSV"]}),t&&s.jsxs("span",{className:"text-sm text-muted-foreground",children:[t.name," (",n.length," rows)"]}),!t&&n.length>0&&s.jsxs("span",{className:"text-sm text-muted-foreground",children:["Built-in CSV (",n.length," rows)"]})]}),s.jsxs("div",{children:[s.jsx(F,{onClick:N,disabled:l||d,variant:"secondary",className:"w-full",children:l||d?s.jsxs(s.Fragment,{children:[s.jsx(Yt,{className:"h-4 w-4 mr-2 animate-spin"}),l?"Loading...":"Importing..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Ul,{className:"h-4 w-4 mr-2"}),"Run Built-in Import (One-Click)"]})}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Automatically loads, validates, and imports the Oct 2025 customer list"})]})]}),n.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(_m,{}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"Preview (first 5 rows)"}),s.jsx(hc,{className:"h-64 border rounded-md",children:s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"User Name"}),s.jsx(Ae,{children:"Email"}),s.jsx(Ae,{children:"Status"}),s.jsx(Ae,{children:"Plan"}),s.jsx(Ae,{children:"Lifetime (EUR)"})]})}),s.jsx(Vr,{children:n.slice(0,5).map((_,I)=>s.jsxs(Lt,{children:[s.jsx(Ie,{children:_["User Name"]}),s.jsx(Ie,{children:_["User email"]}),s.jsx(Ie,{children:s.jsx(ye,{variant:_.Status==="active"?"default":"secondary",children:_.Status})}),s.jsx(Ie,{className:"text-sm",children:_["Subscription Plan"]}),s.jsx(Ie,{children:_.Lifetime})]},I))})]})})]}),s.jsx(F,{onClick:y,disabled:l,className:"w-full",children:l?s.jsxs(s.Fragment,{children:[s.jsx(Yt,{className:"h-4 w-4 mr-2 animate-spin"}),"Validating..."]}):s.jsxs(s.Fragment,{children:[s.jsx(ta,{className:"h-4 w-4 mr-2"}),"Validate Data"]})})]})]})]}),i&&s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center gap-2",children:[i.val
1063id?s.jsx(ta,{className:"h-5 w-5 text-green-600"}):s.jsx(Rs,{className:"h-5 w-5 text-red-600"}),"Validation Results"]})}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[s.jsxs(oe,{children:[s.jsx(xe,{className:"pb-2",children:s.jsx(be,{className:"text-sm font-medium",children:"Total Rows"})}),s.jsx(ce,{children:s.jsx("div",{className:"text-2xl font-bold",children:i.totalRows})})]}),s.jsxs(oe,{children:[s.jsx(xe,{className:"pb-2",children:s.jsx(be,{className:"text-sm font-medium",children:"New Users"})}),s.jsx(ce,{children:s.jsx("div",{className:"text-2xl font-bold text-green-600",children:i.usersToCreate})})]}),s.jsxs(oe,{children:[s.jsx(xe,{className:"pb-2",children:s.jsx(be,{className:"text-sm font-medium",children:"Updates"})}),s.jsx(ce,{children:s.jsx("div",{className:"text-2xl font-bold text-blue-600",children:i.usersToUpdate})})]})]}),i.errors.length>0&&s.jsxs(er,{variant:"destructive",children:[s.jsx(Rs,{className:"h-4 w-4"}),s.jsxs(bu,{children:["Validation Errors (",i.errors.length,")"]}),s.jsx(tr,{children:s.jsx(hc,{className:"h-32 mt-2",children:s.jsx("ul",{className:"list-disc list-inside space-y-1",children:i.errors.map((_,I)=>s.jsx("li",{className:"text-sm",children:_},I))})})})]}),i.warnings.length>0&&s.jsxs(er,{children:[s.jsx(Rc,{className:"h-4 w-4"}),s.jsxs(bu,{children:["Warnings (",i.warnings.length,")"]}),s.jsx(tr,{children:s.jsx(hc,{className:"h-32 mt-2",children:s.jsx("ul",{className:"list-disc list-inside space-y-1",children:i.warnings.map((_,I)=>s.jsx("li",{className:"text-sm",children:_},I))})})})]}),i.discrepantUsers.length>0&&s.jsxs(er,{variant:"destructive",children:[s.jsx(ns,{className:"h-4 w-4"}),s.jsxs(bu,{children:["â ï¸ Users Active in Database but NOT in CSV (",i.discrepantUsers.length,")"]}),s.jsxs(tr,{className:"space-y-4 mt-2",children:[s.jsx("p",{className:"text-sm",children:"These users are marked as active in your database but are NOT present in the uploaded CSV file. They may need to be deactivated."}),s.jsx(hc,{className:"h-48 border rounded-md p-2",children:s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"Email"}),s.jsx(Ae,{children:"Name"}),s.jsx(Ae,{children:"Plan"}),s.jsx(Ae,{children:"Last Sync"})]})}),s.jsx(Vr,{children:i.discrepantUsers.map((_,I)=>s.jsxs(Lt,{children:[s.jsx(Ie,{className:"font-mono text-xs",children:_.email}),s.jsxs(Ie,{children:[_.firstName," ",_.lastName]}),s.jsx(Ie,{children:_.subscriptionTier||"N/A"}),s.jsx(Ie,{className:"text-xs",children:_.lastSyncAt?new Date(_.lastSyncAt).toLocaleDateString():"Never"})]},I))})]})}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(F,{variant:"destructive",size:"sm",onClick:S,disabled:l,children:"Mark All as Inactive"}),s.jsxs(F,{variant:"outline",size:"sm",onClick:E,children:[s.jsx(vi,{className:"h-4 w-4 mr-2"}),"Export List"]})]})]})]}),i.valid&&s.jsx(F,{onClick:w,disabled:d,className:"w-full",size:"lg",children:d?s.jsxs(s.Fragment,{children:[s.jsx(Yt,{className:"h-4 w-4 mr-2 animate-spin"}),"Importing..."]}):s.jsxs(s.Fragment,{children:[s.jsx(df,{className:"h-4 w-4 mr-2"}),"Start Import (",n.length," subscribers)"]})})]})]}),m&&s.jsxs(oe,{children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(df,{className:"h-5 w-5"}),"Import Progress",s.jsx(ye,{variant:m.status==="completed"?"default":m.status==="failed"?"destructive":"secondary",children:m.status})]})}),s.jsxs(ce,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Progress"}),s.jsxs("span",{children:[m.processedRecords," / ",m.totalRecords]})]}),s.jsx(Sp,{value:m.processedRecords/m.totalRecords*100,className:"h-3"})]}),s.jsxs("div",{className:"grid gap-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Created:"}),s.jsx("span",{className:"text-green-600 font-semibold",children:m.createdCount})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Updated:"}),s.jsx("span",{className:"text-blue-600 font-semibold",children:m.updatedCount})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Successful:"}),s.jsx("span",{className:"text-green-600",children:m.successCount})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Errors:"}),s.jsx("span",{className:"text-red-600",children:m.errorCount})]})]}),m.errors.length>0&&s.jsxs(er,{variant:"destructive",children:[s.jsx(Rs,{className:"h-4 w-4"}),s.jsxs(bu,{children:["Errors (",m.errors.length,")"]}),s.jsx(tr,{children:s.jsx(hc,{className:"h-32 mt-2",children:s.jsx("ul",{className:"list-disc list-inside space-y-1",children:m.errors.slice(0,10).map((_,I)=>s.jsx("li",{className:"text-sm",children:JSON.stringify(_)},I))})})})]})]})]})]})}const Mee=Object.freeze(Object.defineProperty({__proto__:null,default:sM},Symbol.toStringTag,{value:"Module"}));function Oee(){const[e,t]=h.useState(!1),[r,n]=h.useState(!1),[a,i]=h.useState(null),{toast:o}=at(),l=qe(),c=async()=>{var m;t(!0);
1063try{const f=await fetch("/imports/all-332-subscribers.csv");if(!f.ok)throw new Error("CSV file not found. Please ensure all-332-subscribers.csv exists in /public/imports/");const p=await f.text();console.log("[VALIDATION] Loaded CSV file, invoking edge function...");const{data:v,error:g}=await U.functions.invoke("validate-old-system-migration",{body:{csvText:p}});if(g)throw g;i(v),o({title:"Validation Complete",description:`Found ${v.summary.perfect_matches} perfect matches out of ${v.summary.total} users`})}catch(f){console.error("Validation error:",f),o({title:"Validation Failed",description:f.message||((m=f.context)==null?void 0:m.message)||"An unexpected error occurred",variant:"destructive"})}finally{t(!1)}},d=async()=>{n(!0);try{const{data:m,error:f}=await U.functions.invoke("fix-missing-profiles");if(f)throw f;o({title:"Fix Applied Successfully",description:"Missing profiles have been created. Run validation again to verify."}),await c()}catch(m){console.error("Fix error:",m),o({title:"Fix Failed",description:m.message||"An unexpected error occurred",variant:"destructive"})}finally{n(!1)}},u=()=>{if(!a)return;const m=[...a.results.perfect,...a.results.partial,...a.results.missing],p=[["Email","Old User ID","Old Status","Old Plan","Profile Exists","Subscriber Exists","Status Match","Issues","New User ID","New Status"].join(","),...m.map(y=>[y.email,y.old_user_id,y.old_status,y.old_plan,y.profile_exists,y.subscriber_exists,y.status_match,`"${y.issues.join("; ")}"`,y.new_user_id||"",y.new_status||""].join(","))].join(` 1064`),v=new Blob([p],{type:"text/csv"}),g=URL.createObjectURL(v),b=document.createElement("a");b.href=g,b.download=`migration-validation-${new Date().toISOString()}.csv`,b.click(),URL.revokeObjectURL(g)};return s.jsxs("div",{className:"container mx-auto p-6 max-w-7xl",children:[s.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[s.jsx(F,{variant:"ghost",size:"icon",onClick:()=>l("/admin"),children:s.jsx(as,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold",children:"Migration Validation"}),s.jsx("p",{className:"text-muted-foreground",children:"Validate all 332 old system users against new database"})]})]}),s.jsxs(oe,{className:"mb-6",children:[s.jsxs(xe,{children:[s.jsx(be,{children:"Run Validation"}),s.jsx(gt,{children:"This will check all 332 users from your old system to ensure they have been correctly migrated to the new database"})]}),s.jsxs(ce,{className:"space-y-4",children:[s.jsx(F,{onClick:c,disabled:e,size:"lg",children:e?s.jsxs(s.Fragment,{children:[s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"Validating..."]}):"Run Validation of 332 Old System Users"}),a&&s.jsxs("div",{className:"flex gap-2",children:[a.summary.partial_matches>0&&s.jsx(F,{variant:"default",onClick:d,disabled:r,children:r?s.jsxs(s.Fragment,{children:[s.jsx(mt,{className:"mr-2 h-4 w-4 animate-spin"}),"Fixing Issues..."]}):`Fix ${a.summary.partial_matches} Issues`}),s.jsxs(F,{variant:"outline",onClick:u,children:[s.jsx(vi,{className:"mr-2 h-4 w-4"}),"Export Full Report to CSV"]})]})]})]}),a&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-4 md:grid-cols-4 mb-6",children:[s.jsxs(oe,{children:[s.jsx(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:s.jsx(be,{className:"text-sm font-medium",children:"Total Users"})}),s.jsx(ce,{children:s.jsx("div",{className:"text-2xl font-bold",children:a.summary.total})})]}),s.jsxs(oe,{children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(be,{className:"text-sm font-medium",children:"Perfect Matches"}),s.jsx(ms,{className:"h-4 w-4 text-green-600"})]}),s.jsxs(ce,{children:[s.jsx("div",{className:"text-2xl font-bold text-green-600",children:a.summary.perfect_matches}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[a.summary.success_rate,"% success rate"]})]})]}),s.jsxs(oe,{children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(be,{className:"text-sm font-medium",children:"Issues Found"}),s.jsx(ns,{className:"h-4 w-4 text-yellow-600"})]}),s.jsx(ce,{children:s.jsx("div",{className:"text-2xl font-bold text-yellow-600",children:a.summary.partial_matches})})]}),s.jsxs(oe,{children:[s.jsxs(xe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(be,{className:"text-sm font-medium",children:"Missing Users"}),s.jsx(Rs,{className:"h-4 w-4 text-red-600"})]}),s.jsx(ce,{children:s.jsx("div",{className:"text-2xl font-bold text-red-600",children:a.summary.completely_missing})})]})]}),s.jsxs(Si,{defaultValue:"perfect",className:"w-full",children:[s.jsxs(Ci,{className:"grid w-full grid-cols-3",children:[s.jsxs(Pt,{value:"perfect",children:["Perfect Matches (",a.results.perfect.length,")"]}),s.jsxs(Pt,{value:"partial",children:["Issues (",a.results.partial.length,")"]}),s.jsxs(Pt,{value:"missing",children:["Missing (",a.results.missing.length,")"]})]}),s.jsx(it,{value:"perfect",children:s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(ms,{className:"h-5 w-5 text-green-600"}),"Successfully Transferred Users"]}),s.jsx(gt,{children:"These users have been perfectly migrated with all data intact"})]}),s.jsxs(ce,{children:[s.jsx("div",{className:"rounded-md border",children:s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"Email"}),s.jsx(Ae,{children:"Old Status"}),s.jsx(Ae,{children:"Old Plan"}),s.jsx(Ae,{children:"Profile"}),s.jsx(Ae,{children:"Subscriber"})]})}),s.jsx(Vr,{children:a.results.perfect.slice(0,50).map((m,f)=>s.jsxs(Lt,{children:[s.jsx(Ie,{className:"font-medium",children:m.email}),s.jsx(Ie,{children:s.jsx(ye,{variant:"outline",className:"bg-green-50 text-green-700 border-green-200",children:m.old_status})}),s.jsx(Ie,{children:m.old_plan}),s.jsx(Ie,{children:s.jsx(ms,{className:"h-4 w-4 text-green-600"})}),s.jsx(Ie,{children:s.jsx(ms,{className:"h-4 w-4 text-green-600"})})]},f))})]})}),a.results.perfect.length>50&&s.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["Showing first 50 of ",a.results.perfect.length," perfect matches. Export to CSV for full list."]})]})]})}),s.jsx(it,{value:"partial",children:s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(ns,{className:"h-5 w-5 text-yellow-600"}),"Users with Issues"]}),s.jsx(gt,{children:"These users exist but have data discrepancies"})]}),s.jsx(ce,{children:s.jsx("div",{className:"rounded-md border",children:s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"Email"}),s.jsx(Ae,{children:"Old Status"}),s.jsx(Ae,{children:"Profile"}),s.jsx(Ae,{children:"Subscriber"}),s.jsx(Ae,{children:"Issues"})]})}),s.jsx(Vr,{children:a.results.partial.map((m,f)=>s.jsxs(Lt,{children:[s.jsx(Ie,{className:"font-medium",children:m.email}),s.jsx(Ie,{children:s.jsx(ye,{variant:"outline",className:"bg-yellow-50 text-yellow-700 border-yellow-200",children:m.old_status})}),s.jsx(Ie,{children:m.profile_exists?s.jsx(ms,{className:"h-4 w-4 text-green-600"}):s.jsx(Rs,{className:"h-4 w-4 text-red-600"})}),s.jsx(Ie,{children:m.subscriber_exists?s.jsx(ms,{className:"h-4 w-4 text-green-600"}):s.jsx(Rs,{className:"h-4 w-4 text-red-600"})}),s.jsx(Ie,{children:s.jsx("div",{className:"text-sm text-muted-foreground space-y-1",children:m.issues.map((p,v)=>s.jsxs("div",{children:["⢠",p]},v))})})]},f))})]})})})]})}),s.jsx(it,{value:"missing",children:s.jsxs(oe,{children:[s.jsxs(xe,{children:[s.jsxs(be,{className:"flex items-center gap-2",children:[s.jsx(Rs,{className:"h-5 w-5 text-red-600"}),"Completely Missing Users"]}),s.jsx(gt,{children:"These users from the old system are not found in the new database"})]}),s.jsx(ce,{children:s.jsx("div",{className:"rounded-md border",children:s.jsxs(zr,{children:[s.jsx(Wr,{children:s.jsxs(Lt,{children:[s.jsx(Ae,{children:"Email"}),s.jsx(Ae,{children:"Old User ID"}),s.jsx(Ae,{children:"Old Status"}),s.jsx(Ae,{children:"Old Plan"})]})}),s.jsx(Vr,{children:a.results.missing.map((m,f)=>s.jsxs(Lt,{children:[s.jsx(Ie,{className:"font-medium",children:m.email}),s.jsx(Ie,{children:m.old_user_id}),s.jsx(Ie,{children:s.jsx(ye,{variant:"outline",className:"bg-red-50 text-red-700 border-red-200",children:m.old_status})}),s.jsx(Ie,{children:m.old_plan})]},f))})]})})})]})})]})]})]})}const Dee=()=>s.jsxs(C$,{children:[s.jsx(Oe,{path:"/",element:s.jsx(lV,{})}),s.jsx(Oe,{path:"/health",element:s.jsx(rS,{})}),s.jsx(Oe,{path:"/__health",element:s.jsx(rS,{})}),s.jsx(Oe,{path:"/about",element:s.jsx(cV,{})}),s.jsx(Oe,{path:"/contact",element:s.jsx($V,{})}),s.jsx(Oe,{path:"/faq",element:s.jsx(o7,{})}),s.jsx(Oe,{path:"/auth",element:s.jsx(l7,{})}),s.jsx(Oe,{path:"/subscription-plans",element:s.jsx(c7,{})}),s.jsx(Oe,{path:"/gift-cards",element:s.jsx(d7,{})}),s.jsx(Oe,{path:"/gift-card-success",element:s.jsx(u7,{})}),s.jsx(Oe,{path:"/journal-shop",element:s.jsx(K7,{})}),s.jsx(Oe,{path:"/journal-shop/success",element:s.jsx(Q7,{})}),s.jsx(Oe,{path:"/privacy-policy",element:s.jsx(m7,{})}),s.jsx(Oe,{path:"/terms-of-service",element:s.jsx(h7,{})}),s.jsx(Oe,{path:"/giveaway/henkel-christmas-2025",element:s.jsx(X7,{})}),s.jsx(Oe,{path:"/help-center",element:s.jsx(Xx,{})}),s.jsx(Oe,{path:"/help-center/:categorySlug",element:s.jsx(Xx,{})}),s.jsx(Oe,{path:"/help-center/:categorySlug/:guideSlug",element:s.jsx(Xx,{})}),s.jsx(Oe,{path:"/set-password",element:s.jsx($7,{})}),s.jsx(Oe,{path:"/auth/impersonate",element:s.jsx(mee,{})}),s.jsx(Oe,{path:"/filter-preview",element:s.jsx(fee,{})}),s.jsx(Oe,{path:"/mobile-categories",element:s.jsx(ii,{requireSubscription:!0,allowTrialUsers:!0,paywallTitle:"Premium Fitness Content",paywallDescription:"Access unlimited workouts, meditation, and wellness content.",children:s.jsx(bee,{})})}),s.jsx(Oe,{path:"/dashboard",element:s.jsx(ii,{requireSubscription:!0,allowTrialUsers:!0,paywallTitle:"Premium Dashboard",paywallDescription:"Access your personalized dashboard and track y
1064our wellness journey.",children:s.jsx(nG,{})})}),s.jsx(Oe,{path:"/profile",element:s.jsx(_t,{children:s.jsx(xk,{})})}),s.jsx(Oe,{path:"/admin",element:s.jsx(E4,{to:"/admin/dashboard",replace:!0})}),s.jsx(Oe,{path:"/admin/dashboard",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/users",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/badges",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/videos",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/challenges",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/promo-codes",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/migration",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/content",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/comments",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/settings",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/emails",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/login-activity",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(hn,{})})}),s.jsx(Oe,{path:"/admin/subscribers-import",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(sM,{})})}),s.jsx(Oe,{path:"/admin/user/:userId",element:s.jsx(_t,{requireSubscription:!1,children:s.jsx(xk,{})})}),s.jsx(Oe,{path:"/catalog",element:s.jsx(ii,{requireSubscription:!0,allowTrialUsers:!0,showPaywallButton:!1,fullPageOverlay:!0,paywallTitle:"Î ÏÏÏβαÏη Premium",paywallDescription:"ÎÏ
ÏÏ Ïο ÏεÏιεÏÏμενο είναι διαθÎÏιμο μÏνο για premium ÏÏ
νδÏομηÏÎÏ.",children:s.jsx(tX,{})})}),s.jsx(Oe,{path:"/products",element:s.jsx(LZ,{})}),s.jsx(Oe,{path:"/product/:handle",element:s.jsx($Z,{})}),s.jsx(Oe,{path:"/workouts",element:s.jsx(SZ,{})}),s.jsx(Oe,{path:"/workouts/:videoId",element:s.jsx(_t,{requireSubscription:!0,allowTrialUsers:!0,children:s.jsx(oi,{})})}),s.jsx(Oe,{path:"/breathworks",element:s.jsx(UZ,{})}),s.jsx(Oe,{path:"/breathworks/:videoId",element:s.jsx(_t,{requireSubscription:!0,allowTrialUsers:!0,children:s.jsx(oi,{})})}),s.jsx(Oe,{path:"/dialogismoi",element:s.jsx(BZ,{})}),s.jsx(Oe,{path:"/dialogismoi/:videoId",element:s.jsx(_t,{requireSubscription:!0,allowTrialUsers:!0,children:s.jsx(oi,{})})}),s.jsx(Oe,{path:"/podcast",element:s.jsx(zZ,{})}),s.jsx(Oe,{path:"/podcast-mobile",element:s.jsx(WZ,{})}),s.jsx(Oe,{path:"/podcast/:videoId",element:s.jsx(_t,{requireSubscription:!0,allowTrialUsers:!0,children:s.jsx(oi,{})})}),s.jsx(Oe,{path:"/recipes",element:s.jsx(ii,{requireSubscription:!0,allowTrialUsers:!0,paywallTitle:"ÎίνεÏε ÎÎÎ»Î¿Ï ÏÏα Well Be Workouts",paywallDescription:"Îε μία ÏÏ
νδÏομή αÏοκÏήÏÏε ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏÏμενο ÏοÏ
Well Be.",fullPageOverlay:!0,children:s.jsx(HZ,{})})}),s.jsx(Oe,{path:"/recipes/:videoId",element:s.jsx(_t,{requireSubscription:!0,allowTrialUsers:!0,children:s.jsx(qZ,{})})}),s.jsx(Oe,{path:"/recipes-demo",element:s.jsx(_t,{requireSubscription:!0,allowTrialUsers:!0,children:s.jsx(GZ,{})})}),s.jsx(Oe,{path:"/video/:videoId",element:s.jsx(_t,{requireSubscription:!0,allowTrialUsers:!0,children:s.jsx(oi,{})})}),s.jsx(Oe,{path:"/section/:slug",element:s.jsx(_t,{requireSubscription:!0,allowTrialUsers:!0,children:s.jsx(YZ,{})})}),s.jsx(Oe,{path:"/challenges",element:s.jsx(_t,{requireSubscription:!0,allowTrialUsers:!0,children:s.jsx(QZ,{})})}),s.jsx(Oe,{path:"/community",element:s.jsx(ii,{requireSubscription:!0,allowTrialUsers:!0,showPaywallButton:!0,fullPageOverlay:!0,paywallTitle:"ÎίνεÏε ÎÎÎ»Î¿Ï ÏÏα Well Be Workouts",paywallDescription:"Îε μία ÏÏ
νδÏομή αÏοκÏήÏÏε ÏÏÏÏβαÏη Ïε Ïλο Ïο ÏεÏιεÏÏμενο ÏοÏ
Well Be.",children:s.jsx(ZZ,{})})}),s.jsx(Oe,{path:"/hall-of-fame",element:s.jsx(_t,{requireSubscription:!0,allowTrialUsers:!0,children:s.jsx(eee,{})})}
1064),s.jsx(Oe,{path:"/instructor/:instructorId",element:s.jsx(_t,{requireSubscription:!0,allowTrialUsers:!0,children:s.jsx(tee,{})})}),s.jsx(Oe,{path:"/undefined-videos",element:s.jsx(_t,{children:s.jsx(see,{})})}),s.jsx(Oe,{path:"/migration-dashboard",element:s.jsx(_t,{children:s.jsx(B3,{})})}),s.jsx(Oe,{path:"/admin/migration-validation",element:s.jsx(_t,{children:s.jsx(Oee,{})})}),s.jsx(Oe,{path:"*",element:s.jsx(uee,{})})]}),Lee=()=>{const{isMobileApp:e}=ar();return s.jsxs(s.Fragment,{children:[s.jsx(C9,{}),!e&&s.jsx(z9,{}),s.jsx(Dee,{}),!e&&s.jsx(U9,{})]})};class Fee extends ie.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("ErrorBoundary caught an error:",t,r)}render(){if(this.state.hasError){const t=()=>this.setState({hasError:!1,error:void 0});if(this.props.fallback){const r=this.props.fallback;return s.jsx(r,{error:this.state.error,resetError:t})}return s.jsxs(oe,{className:"w-full max-w-2xl mx-auto mt-8",children:[s.jsx(xe,{children:s.jsxs(be,{className:"flex items-center gap-2 text-destructive",children:[s.jsx(Rc,{className:"w-5 h-5"}),"Something went wrong"]})}),s.jsxs(ce,{className:"space-y-4",children:[s.jsx("p",{className:"text-muted-foreground",children:"An error occurred and the component couldn't load properly."}),this.state.error&&s.jsxs("details",{className:"text-sm",children:[s.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:"View error details"}),s.jsx("pre",{className:"mt-2 p-2 bg-muted rounded text-xs overflow-auto",children:this.state.error.message})]}),s.jsxs(F,{onClick:t,className:"w-full",children:[s.jsx(Yt,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})]})}return this.props.children}}const $ee=({children:e})=>s.jsx(Uee,{children:e});class Uee extends ie.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return console.error("ð¨ ErrorTracker caught error:",t),{hasError:!0}}componentDidCatch(t,r){console.error("ð¨ ErrorTracker error details:",{error:t.message,stack:t.stack,componentStack:r.componentStack,timestamp:new Date().toISOString()})}render(){return this.state.hasError?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:s.jsxs("div",{className:"text-center p-8",children:[s.jsx("img",{src:"/lovable-uploads/463c9522-3313-4588-bd87-40273096d456.png",alt:"Well Be",className:"h-16 mx-auto mb-6"}),s.jsx("h1",{className:"text-2xl font-bold text-foreground mb-4",children:"ÎάÏι Ïήγε ÏÏÏαβά"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"ΠαÏοÏ
ÏιάÏÏηκε Îνα ÏÏάλμα. ΠαÏÎ±ÎºÎ±Î»Ï Î±Î½Î±Î½ÎµÏÏÏε Ïη Ïελίδα."}),s.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-primary text-primary-foreground rounded hover:bg-primary/90",children:"ÎνανÎÏÏη ΣελίδαÏ"})]})}):this.props.children}}const Yo=zl("PushNotifications",{}),Bee=()=>{const[e,t]=h.useState(!1);return h.useEffect(()=>{if(!Xr.isNativePlatform())return;const r=async()=>{(await Yo.requestPermissions()).receive==="granted"&&(await Yo.register(),t(!0))};return Yo.addListener("registration",n=>{console.log("Push registration success, token: "+n.value)}),Yo.addListener("registrationError",n=>{console.error("Push registration error: ",n)}),Yo.addListener("pushNotificationReceived",n=>{console.log("Push notification received: ",n)}),Yo.addListener("pushNotificationActionPerformed",n=>{console.log("Push notification action performed",n)}),r(),()=>{Yo.removeAllListeners()}},[]),{isRegistered:e}},rM="gdpr-cookie-consent",zee="1.0",Wee=()=>{try{return localStorage.getItem(rM)!==null}catch{return!1}},Vee=e=>{try{const t={status:e,timestamp:new Date().toISOString(),version:zee};localStorage.setItem(rM,JSON.stringify(t))}catch(t){console.error("Failed to save cookie consent:",t)}},Hee=()=>{const{isMobileApp:e}=ar(),[t,r]=h.useState(!1),[n,a]=h.useState(!1);h.useEffect(()=>{e||Wee()||(r(!0),setTimeout(()=>a(!0),100))},[e]);const i=o=>{Vee(o),a(!1),setTimeout(()=>r(!1),300)};return e||!t?null:s.jsx("div",{className:`fixed bottom-0 left-0 right-0 z-50 transition-all duration-300 ease-in-out ${n?"translate-y-0 opacity-100":"translate-y-full opacity-0"}`,children:s.jsx("div",{className:"bg-card border-t border-border shadow-lg",children:s.jsx("div",{className:"container mx-auto px-4 py-6 max-w-6xl",children:s.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-4",children:[s.jsx("div",{className:"flex-1",children:s.jsxs("p",{className:"text-sm text-foreground leading-relaxed",children:["ΧÏηÏιμοÏοιοÏμε cookies για να βελÏιÏÏοÏ
με Ïην εμÏειÏία ÏÎ±Ï ÏÏην ÏλαÏÏÏÏμα μαÏ. Îε Ïην αÏοδοÏή ÏοÏ
Ï, ÏÏ
μÏÏνείÏε με Ïη ÏÏήÏη cookies ÏÏμÏÏνα με Ïην"," ",s.jsx(cs,{to:"/privacy-policy",className:"underline hover:text-primary transition-colors",children:"ΠολιÏική ÎÏοÏÏήÏοÏ
"}),"."]})}),s.jsxs("div",{className:"flex items-center gap-3 w-full md:w-auto",children:[s.jsx(F,{variant:"outline",size:"sm",onClick:()=>i("declined"),className:"flex-1 md:flex-initial",children:"ÎÏÏÏÏιÏη"}),s.jsx(F,{size:"sm",onClick:()=>
1064i("accepted"),className:"flex-1 md:flex-initial",children:"ÎÏοδοÏή"})]})]})})})})},qee=new N8({defaultOptions:{queries:{retry:1,retryDelay:e=>Math.min(1e3*2**e,3e4),staleTime:5*60*1e3,refetchOnWindowFocus:!1},mutations:{retry:1}}});console.info("ðï¸ [Build] ID: 2026-09-29T12-10-17-tlp4");console.info("ðï¸ [Build] Time: 2026-09-29T12:10:17.948Z");const Gee="2026-09-29T12-10-17-tlp4",Yee="2026-09-29T12:10:17.948Z";window.addEventListener("unhandledrejection",e=>{console.error("ð¨ Unhandled Promise Rejection:",e.reason),console.error("ð¨ Promise that was rejected:",e.promise)});window.addEventListener("error",e=>{console.error("ð¨ Global Error:",e.error),console.error("ð¨ Error details:",{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno})});(()=>{try{const e=window.location.hostname,t=e==="localhost"||e==="127.0.0.1"||e==="::1",r=(()=>{try{return localStorage.getItem("nav-debug")==="1"}catch{return!1}})();if(!(t||r))return;const a=window.history.pushState.bind(window.history);window.history.pushState=function(...o){try{console.log("ð pushState:",o[2])}catch{}return a(...o)};const i=window.history.replaceState.bind(window.history);window.history.replaceState=function(...o){try{console.log("ð replaceState:",o[2])}catch{}return i(...o)},window.addEventListener("popstate",()=>{try{console.log("ð popstate:",document.location.href)}catch{}})}catch(e){console.warn("Navigation debugging init failed:",e)}})();const Kee=()=>s.jsx(Lee,{}),Qee=()=>(gw(),Bee(),s.jsx(Fee,{children:s.jsx($ee,{children:s.jsx(C8,{client:qee,children:s.jsxs(n4,{children:[s.jsx(Fs,{}),s.jsx(U6,{}),s.jsx(vL,{}),s.jsx(O$,{children:s.jsx(r9,{children:s.jsx(k9,{children:s.jsx(l9,{children:s.jsx(c9,{children:s.jsx(S9,{children:s.jsxs(W9,{children:[s.jsx(Kee,{}),s.jsx(Hee,{})]})})})})})})})]})})})})),Xee=()=>s.jsx(Qee,{});PC(document.getElementById("root")).render(s.jsx(Xee,{}));export{it as $,Kr as A,F as B,oe as C,jn as D,b_ as E,So as F,La as G,km as H,ke as I,U0 as J,gt as K,_e as L,fE as M,er as N,Bm as O,Ic as P,tr as Q,Yt as R,wt as S,zr as T,Ul as U,No as V,mt as W,qr as X,Si as Y,Ci as Z,Pt as _,xe as a,vi as a$,Fee as a0,ss as a1,si as a2,ri as a3,ya as a4,ba as a5,ja as a6,Na as a7,wa as a8,ka as a9,Ld as aA,$d as aB,Y5 as aC,Dt as aD,kb as aE,Sb as aF,me as aG,yp as aH,_b as aI,gm as aJ,ie as aK,Ll as aL,EC as aM,Kf as aN,jo as aO,go as aP,Uu as aQ,s6 as aR,aE as aS,df as aT,ns as aU,Sp as aV,Rc as aW,Os as aX,Rs as aY,ta as aZ,bu as a_,_a as aa,vl as ab,gr as ac,xl as ad,rr as ae,$r as af,Ur as ag,vE as ah,to as ai,so as aj,ro as ak,S9 as al,pJ as am,gJ as an,$l as ao,v3 as ap,ju as aq,id as ar,ui as as,yR as at,mf as au,B0 as av,Od as aw,Dd as ax,Ds as ay,Fd as az,be as b,ms as b0,Do as b1,Fa as b2,X5 as b3,Nte as b4,fH as b5,pP as b6,Lu as b7,Fu as b8,he as c,ce as d,ql as e,Bo as f,Gl as g,zo as h,sr as i,s as j,Ms as k,Ra as l,Hr as m,Wr as n,Lt as o,Ae as p,Vr as q,h as r,U as s,Ie as t,at as u,Nn as v,ye as w,fr as x,my as y,Gf as z};
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.