vendor: 6,287 bytes, lines 1-9
1var lO=Object.defineProperty;var Tb=e=>{throw TypeError(e)};var cO=(e,t,r)=>t in e?lO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var bs=(e,t,r)=>cO(e,typeof t!="symbol"?t+"":t,r),zm=(e,t,r)=>t.has(e)||Tb("Cannot "+r);var R=(e,t,r)=>(zm(e,t,"read from private field"),r?r.call(e):t.get(e)),me=(e,t,r)=>t.has(e)?Tb("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ne=(e,t,r,n)=>(zm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ee=(e,t,r)=>(zm(e,t,"access private method"),r);var fd=(e,t,r,n)=>({set _(s){ne(e,t,s,r)},get _(){return R(e,t,n)}});function uO(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bk={exports:{}},Df={},Hk={exports:{}},De={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Ku=Symbol.for("react.element"),dO=Symbol.for("react.portal"),hO=Symbol.for("react.fragment"),fO=Symbol.for("react.strict_mode"),mO=Symbol.for("react.profiler"),pO=Symbol.for("react.provider"),gO=Symbol.for("react.context"),xO=Symbol.for("react.forward_ref"),yO=Symbol.for("react.suspense"),vO=Symbol.for("react.memo"),bO=Symbol.for("react.lazy"),Rb=Symbol.iterator;function wO(e){return e===null||typeof e!="object"?null:(e=Rb&&e[Rb]||e["@@iterator"],typeof e=="function"?e:null)}var Wk={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qk=Object.assign,Kk={};function Fl(e,t,r){this.props=e,this.context=t,this.refs=Kk,this.updater=r||Wk}Fl.prototype.isReactComponent={};Fl.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")};Fl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Gk(){}Gk.prototype=Fl.prototype;function Ky(e,t,r){this.props=e,this.context=t,this.refs=Kk,this.updater=r||Wk}var Gy=Ky.prototype=new Gk;Gy.constructor=Ky;qk(Gy,Fl.prototype);Gy.isPureReactComponent=!0;var Ob=Array.isArray,Qk=Object.prototype.hasOwnProperty,Qy={current:null},Zk={key:!0,ref:!0,__self:!0,__source:!0};function Xk(e,t,r){var n,s={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)Qk.call(t,n)&&!Zk.hasOwnProperty(n)&&(s[n]=t[n]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)s[n]===void 0&&(s[n]=l[n]);return{$$typeof:Ku,type:e,key:i,ref:a,props:s,_owner:Qy.current}}function jO(e,t){return{$$typeof:Ku,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Zy(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ku}function kO(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Ib=/\/+/g;function Fm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?kO(""+e.key):t.toString(36)}function th(e,t,r,n,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ku:case dO:a=!0}}if(a)return a=e,s=s(a),e=n===""?"."+Fm(a,0):n,Ob(s)?(r="",e!=null&&(r=e.replace(Ib,"$&/")+"/"),th(s,t,r,"",function(u){return u})):s!=null&&(Zy(s)&&(s=jO(s,r+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(Ib,"$&/")+"/")+e)),t.push(s)),1;if(a=0,n=n===""?".":n+":",Ob(e))for(var l=0;l<e.length;l++){i=e[l];var c=n+Fm(i,l);a+=th(i,t,r,c,s)}else if(c=wO(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=n+Fm(i,l++),a+=th(i,t,r,c,s);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 a}function md(e,t,r){if(e==null)return e;var n=[],s=0;return th(e,n,"","",function(i){return t.call(r,i,s++)}),n}function SO(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 xr={current:null},rh={transition:null},AO={ReactCurrentDispatcher:xr,ReactCurrentBatchConfig:rh,ReactCurrentOwner:Qy};function Yk(){throw Error("act(...) is not supported in production builds of React.")}De.Children={map:md,forEach:function(e,t,r){md(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return md(e,function(){t++}),t},toArray:function(e){return md(e,function(t){return t})||[]},only:function(e){if(!Zy(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};De.Component=Fl;De.Fragment=hO;De.Profiler=mO;De.PureComponent=Ky;De.StrictMode=fO;De.Suspense=yO;
vendor: 9,044 bytes, lines 9-33
9De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AO;De.act=Yk;De.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=qk({},e.props),s=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=Qy.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Qk.call(t,c)&&!Zk.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:Ku,type:e.type,key:s,ref:i,props:n,_owner:a}};De.createContext=function(e){return e={$$typeof:gO,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:pO,_context:e},e.Consumer=e};De.createElement=Xk;De.createFactory=function(e){var t=Xk.bind(null,e);return t.type=e,t};De.createRef=function(){return{current:null}};De.forwardRef=function(e){return{$$typeof:xO,render:e}};De.isValidElement=Zy;De.lazy=function(e){return{$$typeof:bO,_payload:{_status:-1,_result:e},_init:SO}};De.memo=function(e,t){return{$$typeof:vO,type:e,compare:t===void 0?null:t}};De.startTransition=function(e){var t=rh.transition;rh.transition={};try{e()}finally{rh.transition=t}};De.unstable_act=Yk;De.useCallback=function(e,t){return xr.current.useCallback(e,t)};De.useContext=function(e){return xr.current.useContext(e)};De.useDebugValue=function(){};De.useDeferredValue=function(e){return xr.current.useDeferredValue(e)};De.useEffect=function(e,t){return xr.current.useEffect(e,t)};De.useId=function(){return xr.current.useId()};De.useImperativeHandle=function(e,t,r){return xr.current.useImperativeHandle(e,t,r)};De.useInsertionEffect=function(e,t){return xr.current.useInsertionEffect(e,t)};De.useLayoutEffect=function(e,t){return xr.current.useLayoutEffect(e,t)};De.useMemo=function(e,t){return xr.current.useMemo(e,t)};De.useReducer=function(e,t,r){return xr.current.useReducer(e,t,r)};De.useRef=function(e){return xr.current.useRef(e)};De.useState=function(e){return xr.current.useState(e)};De.useSyncExternalStore=function(e,t,r){return xr.current.useSyncExternalStore(e,t,r)};De.useTransition=function(){return xr.current.useTransition()};De.version="18.3.1";Hk.exports=De;var p=Hk.exports;const H=qu(p),Jk=uO({__proto__:null,default:H},[p]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var NO=p,CO=Symbol.for("react.element"),_O=Symbol.for("react.fragment"),EO=Object.prototype.hasOwnProperty,PO=NO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,TO={key:!0,ref:!0,__self:!0,__source:!0};function eS(e,t,r){var n,s={},i=null,a=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)EO.call(t,n)&&!TO.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:CO,type:e,key:i,ref:a,props:s,_owner:PO.current}}Df.Fragment=_O;Df.jsx=eS;Df.jsxs=eS;Bk.exports=Df;var o=Bk.exports,tS={exports:{}},Hr={},rS={exports:{}},nS={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(P,z){var B=P.length;P.push(z);e:for(;0<B;){var re=B-1>>>1,Q=P[re];if(0<s(Q,z))P[re]=z,P[B]=Q,B=re;else break e}}function r(P){return P.length===0?null:P[0]}function n(P){if(P.length===0)return null;var z=P[0],B=P.pop();if(B!==z){P[0]=B;e:for(var re=0,Q=P.length,fe=Q>>>1;re<fe;){var pe=2*(re+1)-1,Me=P[pe],Ze=pe+1,ee=P[Ze];if(0>s(Me,B))Ze<Q&&0>s(ee,Me)?(P[re]=ee,P[Ze]=B,re=Ze):(P[re]=Me,P[pe]=B,re=pe);else if(Ze<Q&&0>s(ee,B))P[re]=ee,P[Ze]=B,re=Ze;else break e}}return z}function s(P,z){var B=P.sortIndex-z.sortIndex;return B!==0?B:P.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,f=3,m=!1,v=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(P){for(var z=r(u);z!==null;){if(z.callback===null)n(u);else if(z.startTime<=P)n(u),z.sortIndex=z.expirationTime,t(c,z);else break;z=r(u)}}function j(P){if(g=!1,x(P),!v)if(r(c)!==null)v=!0,U(k);else{var z=r(u);z!==null&&M(j,z.startTime-P)}}function k(P,z){v=!1,g&&(g=!1,b(A),A=-1),m=!0;var B=f;try{for(x(z),h=r(c);h!==null&&(!(h.expirationTime>z)||P&&!F());){var re=h.callback;if(typeof re=="function"){h.callback=null,f=h.priorityLevel;var Q=re(h.expirationTime<=z);z=e.unstable_now(),typeof Q=="function"?h.callback=Q:h===r(c)&&n(c),x(z)}else n(c);h=r(c)}if(h!==null)var fe=!0;else{var pe=r(u);pe!==null&&M(j,pe.startTime-z),fe=!1}return fe}finally{h=null,f=B,m=!1}}var S=!1,N=null,A=-1,E=5,_=-1;function F(){return!(e.unstable_now()-_<E)}function C(){if(N!==null){var P=e.unstable_now();_=P;var z=!0;try{z=N(!0,P)}finally{z?L():(S=!1,N=null)}}else S=!1}var L;if(typeof y=="function")L=function(){y(C)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,O=I.port2;I.port1.onmessage=C,L=function(){O.postMessage(null)}}else L=function(){w(C,0)};function U(P){N=P,S||(S=!0,L())}function M(P,z){A=w(function(){P(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){v||m||(v=!0,U(k))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(P){switch(f){case 1:case 2:case 3:var z=3;break;default:z=f}var B=f;f=z;try{return P()}finally{f=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,z){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var B=f;f=P;try{return z()}finally{f=B}},e.unstable_scheduleCallback=function(P,z,B){var re=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?re+B:re):B=re,P){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=B+Q,P={id:d++,callback:z,priorityLevel:P,startTime:B,expirationTime:Q,sortIndex:-1},B>re?(P.sortIndex=B,t(u,P),r(c)===null&&P===r(u)&&(g?(b(A),A=-1):g=!0,M(j,B-re))):(P.sortIndex=Q,t(c,P),v||m||(v=!0,U(k))),P},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(P){var z=f;return function(){var B=f;f=z;try{return P.apply(this,arguments)}finally{f=B}}}})(nS);rS.exports=nS;var RO=rS.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var OO=p,Ur=RO;function W(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 sS=new Set,eu={};function ta(e,t){bl(e,t),bl(e+"Capture",t)}function bl(e,t){for(eu[e]=t,e=0;e<t.length;e++)sS.add(t[e])}var Ms=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yg=Object.prototype.hasOwnProperty,IO=/^[: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]*$/,Db={},Lb={};function DO(e){return yg.call(Lb,e)?!0:yg.call(Db,e)?!1:IO.test(e)?Lb[e]=!0:(Db[e]=!0,!1)}function LO(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 MO(e,t,r,n){if(t===null||typeof t>"u"||LO(e,t,r,n))return!0;
vendor: 5,200 bytes, lines 33-34
33if(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 yr(e,t,r,n,s,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var er={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){er[e]=new yr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];er[t]=new yr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){er[e]=new yr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){er[e]=new yr(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){er[e]=new yr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){er[e]=new yr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){er[e]=new yr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){er[e]=new yr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){er[e]=new yr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xy=/[\-:]([a-z])/g;function Yy(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(Xy,Yy);er[t]=new yr(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(Xy,Yy);er[t]=new yr(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(Xy,Yy);er[t]=new yr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){er[e]=new yr(e,1,!1,e.toLowerCase(),null,!1,!1)});er.xlinkHref=new yr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){er[e]=new yr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Jy(e,t,r,n){var s=er.hasOwnProperty(t)?er[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(MO(t,r,s,n)&&(r=null),n||s===null?DO(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Gs=OO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,pd=Symbol.for("react.element"),_a=Symbol.for("react.portal"),Ea=Symbol.for("react.fragment"),ev=Symbol.for("react.strict_mode"),vg=Symbol.for("react.profiler"),iS=Symbol.for("react.provider"),oS=Symbol.for("react.context"),tv=Symbol.for("react.forward_ref"),bg=Symbol.for("react.suspense"),wg=Symbol.for("react.suspense_list"),rv=Symbol.for("react.memo"),ai=Symbol.for("react.lazy"),aS=Symbol.for("react.offscreen"),Mb=Symbol.iterator;function sc(e){return e===null||typeof e!="object"?null:(e=Mb&&e[Mb]||e["@@iterator"],typeof e=="function"?e:null)}var pt=Object.assign,$m;function Sc(e){if($m===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);$m=t&&t[1]||""}return` 34`+$m+e}var Vm=!1;function Um(e,t){if(!e||Vm)return"";Vm=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}
vendor: 6,229 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),i=n.stack.split(` 36`),a=s.length-1,l=i.length-1;1<=a&&0<=l&&s[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==i[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==i[l]){var c=` 37`+s[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{Vm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Sc(e):""}function zO(e){switch(e.tag){case 5:return Sc(e.type);case 16:return Sc("Lazy");case 13:return Sc("Suspense");case 19:return Sc("SuspenseList");case 0:case 2:case 15:return e=Um(e.type,!1),e;case 11:return e=Um(e.type.render,!1),e;case 1:return e=Um(e.type,!0),e;default:return""}}function jg(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 Ea:return"Fragment";case _a:return"Portal";case vg:return"Profiler";case ev:return"StrictMode";case bg:return"Suspense";case wg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oS:return(e.displayName||"Context")+".Consumer";case iS:return(e._context.displayName||"Context")+".Provider";case tv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case rv:return t=e.displayName||null,t!==null?t:jg(e.type)||"Memo";case ai:t=e._payload,e=e._init;try{return jg(e(t))}catch{}}return null}function FO(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 jg(t);case 8:return t===ev?"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 Ui(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $O(e){var t=lS(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gd(e){e._valueTracker||(e._valueTracker=$O(e))}function cS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=lS(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Eh(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 kg(e,t){var r=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function zb(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ui(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 uS(e,t){t=t.checked,t!=null&&Jy(e,"checked",t,!1)}function Sg(e,t){uS(e,t);var r=Ui(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")?Ag(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ag(e,t.type,Ui(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Fb(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 Ag(e,t,r){(t!=="number"||Eh(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ac=Array.isArray;function Ka(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Ui(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Ng(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return pt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function $b(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(W(92));if(Ac(r)){if(1<r.length)throw Error(W(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ui(r)}}function dS(e,t){var r=Ui(t.value),n=Ui(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 Vb(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hS(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 Cg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}
vendor: 10,460 bytes, line 37
37var xd,fS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(xd=xd||document.createElement("div"),xd.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function tu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Oc={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},VO=["Webkit","ms","Moz","O"];Object.keys(Oc).forEach(function(e){VO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Oc[t]=Oc[e]})});function mS(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Oc.hasOwnProperty(e)&&Oc[e]?(""+t).trim():t+"px"}function pS(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=mS(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var UO=pt({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 _g(e,t){if(t){if(UO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function Eg(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 Pg=null;function nv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tg=null,Ga=null,Qa=null;function Ub(e){if(e=Zu(e)){if(typeof Tg!="function")throw Error(W(280));var t=e.stateNode;t&&(t=$f(t),Tg(e.stateNode,e.type,t))}}function gS(e){Ga?Qa?Qa.push(e):Qa=[e]:Ga=e}function xS(){if(Ga){var e=Ga,t=Qa;if(Qa=Ga=null,Ub(e),t)for(e=0;e<t.length;e++)Ub(t[e])}}function yS(e,t){return e(t)}function vS(){}var Bm=!1;function bS(e,t,r){if(Bm)return e(t,r);Bm=!0;try{return yS(e,t,r)}finally{Bm=!1,(Ga!==null||Qa!==null)&&(vS(),xS())}}function ru(e,t){var r=e.stateNode;if(r===null)return null;var n=$f(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(W(231,t,typeof r));return r}var Rg=!1;if(Ms)try{var ic={};Object.defineProperty(ic,"passive",{get:function(){Rg=!0}}),window.addEventListener("test",ic,ic),window.removeEventListener("test",ic,ic)}catch{Rg=!1}function BO(e,t,r,n,s,i,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var Ic=!1,Ph=null,Th=!1,Og=null,HO={onError:function(e){Ic=!0,Ph=e}};function WO(e,t,r,n,s,i,a,l,c){Ic=!1,Ph=null,BO.apply(HO,arguments)}function qO(e,t,r,n,s,i,a,l,c){if(WO.apply(this,arguments),Ic){if(Ic){var u=Ph;Ic=!1,Ph=null}else throw Error(W(198));Th||(Th=!0,Og=u)}}function ra(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 wS(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 Bb(e){if(ra(e)!==e)throw Error(W(188))}function KO(e){var t=e.alternate;if(!t){if(t=ra(e),t===null)throw Error(W(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return Bb(s),e;if(i===n)return Bb(s),t;i=i.sibling}throw Error(W(188))}if(r.return!==n.return)r=s,n=i;else{for(var a=!1,l=s.child;l;){if(l===r){a=!0,r=s,n=i;break}if(l===n){a=!0,n=s,r=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===r){a=!0,r=i,n=s;break}if(l===n){a=!0,n=i,r=s;break}l=l.sibling}if(!a)throw Error(W(189))}}if(r.alternate!==n)throw Error(W(190))}if(r.tag!==3)throw Error(W(188));return r.stateNode.current===r?e:t}function jS(e){return e=KO(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 SS=Ur.unstable_scheduleCallback,Hb=Ur.unstable_cancelCallback,GO=Ur.unstable_shouldYield,QO=Ur.unstable_requestPaint,St=Ur.unstable_now,ZO=Ur.unstable_getCurrentPriorityLevel,sv=Ur.unstable_ImmediatePriority,AS=Ur.unstable_UserBlockingPriority,Rh=Ur.unstable_NormalPriority,XO=Ur.unstable_LowPriority,NS=Ur.unstable_IdlePriority,Lf=null,ss=null;function YO(e){if(ss&&typeof ss.onCommitFiberRoot=="function")try{ss.onCommitFiberRoot(Lf,e,void 0,(e.current.flags&128)===128)}catch{}}var Dn=Math.clz32?Math.clz32:t4,JO=Math.log,e4=Math.LN2;function t4(e){return e>>>=0,e===0?32:31-(JO(e)/e4|0)|0}var yd=64,vd=4194304;function Nc(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 Oh(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var l=a&~s;l!==0?n=Nc(l):(i&=a,i!==0&&(n=Nc(i)))}else a=r&~s,a!==0?n=Nc(a):i!==0&&(n=Nc(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===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-Dn(t),s=1<<r,n|=e[r],t&=~s;return n}function r4(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 n4(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Dn(i),l=1<<a,c=s[a];c===-1?(!(l&r)||l&n)&&(s[a]=r4(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function Ig(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function CS(){var e=yd;return yd<<=1,!(yd&4194240)&&(yd=64),e}function Hm(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Gu(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Dn(t),e[t]=r}function s4(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-Dn(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function iv(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Dn(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var Qe=0;function _S(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ES,ov,PS,TS,RS,Dg=!1,bd=[],Pi=null,Ti=null,Ri=null,nu=new Map,su=new Map,di=[],i4="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 Wb(e,t){switch(e){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":Ti=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":nu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":su.delete(t.pointerId)}}function oc(e,t,r,n,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Zu(t),t!==null&&ov(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function o4(e,t,r,n,s){switch(t){case"focusin":return Pi=oc(Pi,e,t,r,n,s),!0;case"dragenter":return Ti=oc(Ti,e,t,r,n,s),!0;case"mouseover":return Ri=oc(Ri,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return nu.set(i,oc(nu.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,su.set(i,oc(su.get(i)||null,e,t,r,n,s)),!0}return!1}function OS(e){var t=xo(e.target);if(t!==null){var r=ra(t);if(r!==null){if(t=r.tag,t===13){if(t=wS(r),t!==null){e.blockedOn=t,RS(e.priority,function(){PS(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 nh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Lg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Pg=n,r.target.dispatchEvent(n),Pg=null}else return t=Zu(r),t!==null&&ov(t),e.blockedOn=r,!1;t.shift()}return!0}function qb(e,t,r){nh(e)&&r.delete(t)}function a4(){Dg=!1,Pi!==null&&nh(Pi)&&(Pi=null),Ti!==null&&nh(Ti)&&
vendor: 8,894 bytes, line 37
37(Ti=null),Ri!==null&&nh(Ri)&&(Ri=null),nu.forEach(qb),su.forEach(qb)}function ac(e,t){e.blockedOn===t&&(e.blockedOn=null,Dg||(Dg=!0,Ur.unstable_scheduleCallback(Ur.unstable_NormalPriority,a4)))}function iu(e){function t(s){return ac(s,e)}if(0<bd.length){ac(bd[0],e);for(var r=1;r<bd.length;r++){var n=bd[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Pi!==null&&ac(Pi,e),Ti!==null&&ac(Ti,e),Ri!==null&&ac(Ri,e),nu.forEach(t),su.forEach(t),r=0;r<di.length;r++)n=di[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<di.length&&(r=di[0],r.blockedOn===null);)OS(r),r.blockedOn===null&&di.shift()}var Za=Gs.ReactCurrentBatchConfig,Ih=!0;function l4(e,t,r,n){var s=Qe,i=Za.transition;Za.transition=null;try{Qe=1,av(e,t,r,n)}finally{Qe=s,Za.transition=i}}function c4(e,t,r,n){var s=Qe,i=Za.transition;Za.transition=null;try{Qe=4,av(e,t,r,n)}finally{Qe=s,Za.transition=i}}function av(e,t,r,n){if(Ih){var s=Lg(e,t,r,n);if(s===null)ep(e,t,n,Dh,r),Wb(e,n);else if(o4(s,e,t,r,n))n.stopPropagation();else if(Wb(e,n),t&4&&-1<i4.indexOf(e)){for(;s!==null;){var i=Zu(s);if(i!==null&&ES(i),i=Lg(e,t,r,n),i===null&&ep(e,t,n,Dh,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else ep(e,t,n,null,r)}}var Dh=null;function Lg(e,t,r,n){if(Dh=null,e=nv(n),e=xo(e),e!==null)if(t=ra(e),t===null)e=null;else if(r=t.tag,r===13){if(e=wS(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 Dh=e,null}function IS(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(ZO()){case sv:return 1;case AS:return 4;case Rh:case XO:return 16;case NS:return 536870912;default:return 16}default:return 16}}var Ni=null,lv=null,sh=null;function DS(){if(sh)return sh;var e,t=lv,r=t.length,n,s="value"in Ni?Ni.value:Ni.textContent,i=s.length;for(e=0;e<r&&t[e]===s[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===s[i-n];n++);return sh=s.slice(e,1<n?1-n:void 0)}function ih(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 wd(){return!0}function Kb(){return!1}function Wr(e){function t(r,n,s,i,a){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=a,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)?wd:Kb,this.isPropagationStopped=Kb,this}return pt(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=wd)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=wd)},persist:function(){},isPersistent:wd}),t}var $l={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cv=Wr($l),Qu=pt({},$l,{view:0,detail:0}),u4=Wr(Qu),Wm,qm,lc,Mf=pt({},Qu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uv,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!==lc&&(lc&&e.type==="mousemove"?(Wm=e.screenX-lc.screenX,qm=e.screenY-lc.screenY):qm=Wm=0,lc=e),Wm)},movementY:function(e){return"movementY"in e?e.movementY:qm}}),Gb=Wr(Mf),d4=pt({},Mf,{dataTransfer:0}),h4=Wr(d4),f4=pt({},Qu,{relatedTarget:0}),Km=Wr(f4),m4=pt({},$l,{animationName:0,elapsedTime:0,pseudoElement:0}),p4=Wr(m4),g4=pt({},$l,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),x4=Wr(g4),y4=pt({},$l,{data:0}),Qb=Wr(y4),v4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},b4={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"},w4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function j4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=w4[e])?!!t[e]:!1}function uv(){return j4}var k4=pt({},Qu,{key:function(e){if(e.key){var t=v4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ih(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?b4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uv,charCode:function(e){return e.type==="keypress"?ih(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ih(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),S4=Wr(k4),A4=pt({},Mf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zb=Wr(A4),N4=pt({},Qu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uv}),C4=Wr(N4),_4=pt({},$l,{propertyName:0,elapsedTime:0,pseudoElement:0}),E4=Wr(_4),P4=pt({},Mf,{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}),T4=Wr(P4),R4=[9,13,27,32],dv=Ms&&"CompositionEvent"in window,Dc=null;Ms&&"documentMode"in document&&(Dc=document.documentMode);var O4=Ms&&"TextEvent"in window&&!Dc,LS=Ms&&(!dv||Dc&&8<Dc&&11>=Dc),Xb=" ",Yb=!1;function MS(e,t){switch(e){case"keyup":return R4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Pa=!1;function I4(e,t){switch(e){case"compositionend":return zS(t);case"keypress":return t.which!==32?null:(Yb=!0,Xb);case"textInput":return e=t.data,e===Xb&&Yb?null:e;default:return null}}function D4(e,t){if(Pa)return e==="compositionend"||!dv&&MS(e,t)?(e=DS(),sh=lv=Ni=null,Pa=!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 LS&&t.locale!=="ko"?null:t.data;default:return null}}var L4={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 Jb(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!L4[e.type]:t==="textarea"}function FS(e,t,r,n){gS(n),t=Lh(t,"onChange"),0<t.length&&(r=new cv("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Lc=null,ou=null;function M4(e){ZS(e,0)}function zf(e){var t=Oa(e);if(cS(t))return e}function z4(e,t){if(e==="change")return t}var $S=!1;if(Ms){var Gm;if(Ms){var Qm="oninput"in document;if(!Qm){var ew=document.createElement("div");ew.setAttribute("oninput","return;"),Qm=typeof ew.oninput=="function"}Gm=Qm}else Gm=!1;$S=Gm&&(!document.documentMode||9<document.documentMode)}function tw(){Lc&&(Lc.detachEvent("onpropertychange",VS),ou=Lc=null)}function VS(e){if(e.propertyName==="value"&&zf(ou)){var t=[];FS(t,ou,e,nv(e)),bS(M4,t)}}
vendor: 5,253 bytes, line 37
37function F4(e,t,r){e==="focusin"?(tw(),Lc=t,ou=r,Lc.attachEvent("onpropertychange",VS)):e==="focusout"&&tw()}function $4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zf(ou)}function V4(e,t){if(e==="click")return zf(t)}function U4(e,t){if(e==="input"||e==="change")return zf(t)}function B4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zn=typeof Object.is=="function"?Object.is:B4;function au(e,t){if(zn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!yg.call(t,s)||!zn(e[s],t[s]))return!1}return!0}function rw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nw(e,t){var r=rw(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=rw(r)}}function US(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?US(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function BS(){for(var e=window,t=Eh();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Eh(e.document)}return t}function hv(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 H4(e){var t=BS(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&US(r.ownerDocument.documentElement,r)){if(n!==null&&hv(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=nw(r,i);var a=nw(r,n);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var W4=Ms&&"documentMode"in document&&11>=document.documentMode,Ta=null,Mg=null,Mc=null,zg=!1;function sw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;zg||Ta==null||Ta!==Eh(n)||(n=Ta,"selectionStart"in n&&hv(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Mc&&au(Mc,n)||(Mc=n,n=Lh(Mg,"onSelect"),0<n.length&&(t=new cv("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ta)))}function jd(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ra={animationend:jd("Animation","AnimationEnd"),animationiteration:jd("Animation","AnimationIteration"),animationstart:jd("Animation","AnimationStart"),transitionend:jd("Transition","TransitionEnd")},Zm={},HS={};Ms&&(HS=document.createElement("div").style,"AnimationEvent"in window||(delete Ra.animationend.animation,delete Ra.animationiteration.animation,delete Ra.animationstart.animation),"TransitionEvent"in window||delete Ra.transitionend.transition);function Ff(e){if(Zm[e])return Zm[e];if(!Ra[e])return e;var t=Ra[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in HS)return Zm[e]=t[r];return e}var WS=Ff("animationend"),qS=Ff("animationiteration"),KS=Ff("animationstart"),GS=Ff("transitionend"),QS=new Map,iw="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 Xi(e,t){QS.set(e,t),ta(t,[e])}for(var Xm=0;Xm<iw.length;Xm++){var Ym=iw[Xm],q4=Ym.toLowerCase(),K4=Ym[0].toUpperCase()+Ym.slice(1);Xi(q4,"on"+K4)}Xi(WS,"onAnimationEnd");Xi(qS,"onAnimationIteration");Xi(KS,"onAnimationStart");Xi("dblclick","onDoubleClick");Xi("focusin","onFocus");Xi("focusout","onBlur");Xi(GS,"onTransitionEnd");bl("onMouseEnter",["mouseout","mouseover"]);bl("onMouseLeave",["mouseout","mouseover"]);bl("onPointerEnter",["pointerout","pointerover"]);bl("onPointerLeave",["pointerout","pointerover"]);ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,442 bytes, line 37
37ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ta("onBeforeInput",["compositionend","keypress","textInput","paste"]);ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ta("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cc="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(" "),G4=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cc));function ow(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,qO(n,t,void 0,e),e.currentTarget=null}function ZS(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var a=n.length-1;0<=a;a--){var l=n[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&s.isPropagationStopped())break e;ow(s,l,u),i=c}else for(a=0;a<n.length;a++){if(l=n[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&s.isPropagationStopped())break e;ow(s,l,u),i=c}}}if(Th)throw e=Og,Th=!1,Og=null,e}function nt(e,t){var r=t[Bg];r===void 0&&(r=t[Bg]=new Set);var n=e+"__bubble";r.has(n)||(XS(t,e,2,!1),r.add(n))}function Jm(e,t,r){var n=0;t&&(n|=4),XS(r,e,n,t)}var kd="_reactListening"+Math.random().toString(36).slice(2);function lu(e){if(!e[kd]){e[kd]=!0,sS.forEach(function(r){r!=="selectionchange"&&(G4.has(r)||Jm(r,!1,e),Jm(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kd]||(t[kd]=!0,Jm("selectionchange",!1,t))}}function XS(e,t,r,n){switch(IS(t)){case 1:var s=l4;break;case 4:s=c4;break;default:s=av}r=s.bind(null,t,r,e),s=void 0,!Rg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function ep(e,t,r,n,s){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var l=n.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=n.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;l!==null;){if(a=xo(l),a===null)return;if(c=a.tag,c===5||c===6){n=i=a;continue e}l=l.parentNode}}n=n.return}bS(function(){var u=i,d=nv(r),h=[];e:{var f=QS.get(e);if(f!==void 0){var m=cv,v=e;switch(e){case"keypress":if(ih(r)===0)break e;case"keydown":case"keyup":m=S4;break;case"focusin":v="focus",m=Km;break;case"focusout":v="blur",m=Km;break;case"beforeblur":case"afterblur":m=Km;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":m=Gb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=h4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=C4;break;case WS:case qS:case KS:m=p4;break;case GS:m=E4;break;case"scroll":m=u4;break;case"wheel":m=T4;break;case"copy":case"cut":case"paste":m=x4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Zb}var g=(t&4)!==0,w=!g&&e==="scroll",b=g?f!==null?f+"Capture":null:f;g=[];for(var y=u,x;y!==null;){x=y;var j=x.stateNode;if(x.tag===5&&j!==null&&(x=j,b!==null&&(j=ru(y,b),j!=null&&g.push(cu(y,j,x)))),w)break;y=y.return}0<g.length&&(f=new m(f,v,null,r,d),h.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&r!==Pg&&(v=r.relatedTarget||r.fromElement)&&(xo(v)||v[zs]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(v=r.relatedTarget||r.toElement,m=u,v=v?xo(v):null,v!==null&&(w=ra(v),v!==w||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=u),m!==v)){if(g=Gb,j="onMouseLeave",b="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=Zb,j="onPointerLeave",b="onPointerEnter",y="pointer"),w=m==null?f:Oa(m),x=v==null?f:Oa(v),f=new g(j,y+"leave",m,r,d),f.target=w,f.relatedTarget=x,j=null,xo(d)===u&&(g=ne
vendor: 6,133 bytes, lines 37-38
37w g(b,y+"enter",v,r,d),g.target=x,g.relatedTarget=w,j=g),w=j,m&&v)t:{for(g=m,b=v,y=0,x=g;x;x=la(x))y++;for(x=0,j=b;j;j=la(j))x++;for(;0<y-x;)g=la(g),y--;for(;0<x-y;)b=la(b),x--;for(;y--;){if(g===b||b!==null&&g===b.alternate)break t;g=la(g),b=la(b)}g=null}else g=null;m!==null&&aw(h,f,m,g,!1),v!==null&&w!==null&&aw(h,w,v,g,!0)}}e:{if(f=u?Oa(u):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var k=z4;else if(Jb(f))if($S)k=U4;else{k=$4;var S=F4}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=V4);if(k&&(k=k(e,u))){FS(h,k,r,d);break e}S&&S(e,f,u),e==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&Ag(f,"number",f.value)}switch(S=u?Oa(u):window,e){case"focusin":(Jb(S)||S.contentEditable==="true")&&(Ta=S,Mg=u,Mc=null);break;case"focusout":Mc=Mg=Ta=null;break;case"mousedown":zg=!0;break;case"contextmenu":case"mouseup":case"dragend":zg=!1,sw(h,r,d);break;case"selectionchange":if(W4)break;case"keydown":case"keyup":sw(h,r,d)}var N;if(dv)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Pa?MS(e,r)&&(A="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(A="onCompositionStart");A&&(LS&&r.locale!=="ko"&&(Pa||A!=="onCompositionStart"?A==="onCompositionEnd"&&Pa&&(N=DS()):(Ni=d,lv="value"in Ni?Ni.value:Ni.textContent,Pa=!0)),S=Lh(u,A),0<S.length&&(A=new Qb(A,e,null,r,d),h.push({event:A,listeners:S}),N?A.data=N:(N=zS(r),N!==null&&(A.data=N)))),(N=O4?I4(e,r):D4(e,r))&&(u=Lh(u,"onBeforeInput"),0<u.length&&(d=new Qb("onBeforeInput","beforeinput",null,r,d),h.push({event:d,listeners:u}),d.data=N))}ZS(h,t)})}function cu(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Lh(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ru(e,r),i!=null&&n.unshift(cu(e,i,s)),i=ru(e,t),i!=null&&n.push(cu(e,i,s))),e=e.return}return n}function la(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function aw(e,t,r,n,s){for(var i=t._reactName,a=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,s?(c=ru(r,i),c!=null&&a.unshift(cu(r,c,l))):s||(c=ru(r,i),c!=null&&a.push(cu(r,c,l)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var Q4=/\r\n?/g,Z4=/\u0000|\uFFFD/g;function lw(e){return(typeof e=="string"?e:""+e).replace(Q4,` 38`).replace(Z4,"")}function Sd(e,t,r){if(t=lw(t),lw(e)!==t&&r)throw Error(W(425))}function Mh(){}var Fg=null,$g=null;function Vg(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 Ug=typeof setTimeout=="function"?setTimeout:void 0,X4=typeof clearTimeout=="function"?clearTimeout:void 0,cw=typeof Promise=="function"?Promise:void 0,Y4=typeof queueMicrotask=="function"?queueMicrotask:typeof cw<"u"?function(e){return cw.resolve(null).then(e).catch(J4)}:Ug;function J4(e){setTimeout(function(){throw e})}function tp(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),iu(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);iu(t)}function Oi(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 uw(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 Vl=Math.random().toString(36).slice(2),Jn="__reactFiber$"+Vl,uu="__reactProps$"+Vl,zs="__reactContainer$"+Vl,Bg="__reactEvents$"+Vl,e3="__reactListeners$"+Vl,t3="__reactHandles$"+Vl;function xo(e){var t=e[Jn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[zs]||r[Jn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=uw(e);e!==null;){if(r=e[Jn])return r;e=uw(e)}return t}e=r,r=e.parentNode}return null}function Zu(e){return e=e[Jn]||e[zs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Oa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function $f(e){return e[uu]||null}var Hg=[],Ia=-1;function Yi(e){return{current:e}}function it(e){0>Ia||(e.current=Hg[Ia],Hg[Ia]=null,Ia--)}function tt(e,t){Ia++,Hg[Ia]=e.current,e.current=t}var Bi={},lr=Yi(Bi),Nr=Yi(!1),zo=Bi;function wl(e,t){var r=e.type.contextTypes;if(!r)return Bi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Cr(e){return e=e.childContextTypes,e!=null}function zh(){it(Nr),it(lr)}function dw(e,t,r){if(lr.current!==Bi)throw Error(W(168));tt(lr,t),tt(Nr,r)}function YS(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(W(108,FO(e)||"Unknown",s));return pt({},r,n)}function Fh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bi,zo=lr.current,tt(lr,e),tt(Nr,Nr.current),!0}function hw(e,t,r){var n=e.stateNode;if(!n)throw Error(W(169));r?(e=YS(e,t,zo),n.__reactInternalMemoizedMergedChildContext=e,it(Nr),it(lr),tt(lr,e)):it(Nr),tt(Nr,r)}var Cs=null,Vf=!1,rp=!1;function JS(e){Cs===null?Cs=[e]:Cs.push(e)}function r3(e){Vf=!0,JS(e)}function Ji(){if(!rp&&Cs!==null){rp=!0;var e=0,t=Qe;try{var r=Cs;for(Qe=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Cs=null,Vf=!1}catch(s){throw Cs!==null&&(Cs=Cs.slice(e+1)),SS(sv,Ji),s}finally{Qe=t,rp=!1}}return null}var Da=[],La=0,$h=null,Vh=0,rn=[],nn=0,Fo=null,Ts=1,Rs="";function co(e,t){Da[La++]=Vh,Da[La++]=$h,$h=e,Vh=t}function eA(e,t,r){rn[nn++]=Ts,rn[nn++]=Rs,rn[nn++]=Fo,Fo=e;var n=Ts;e=Rs;var s=32-Dn(n)-1;n&=~(1<<s),r+=1;var i=32-Dn(t)+s;
vendor: 14,285 bytes, line 38
38if(30<i){var a=s-s%5;i=(n&(1<<a)-1).toString(32),n>>=a,s-=a,Ts=1<<32-Dn(t)+s|r<<s|n,Rs=i+e}else Ts=1<<i|r<<s|n,Rs=e}function fv(e){e.return!==null&&(co(e,1),eA(e,1,0))}function mv(e){for(;e===$h;)$h=Da[--La],Da[La]=null,Vh=Da[--La],Da[La]=null;for(;e===Fo;)Fo=rn[--nn],rn[nn]=null,Rs=rn[--nn],rn[nn]=null,Ts=rn[--nn],rn[nn]=null}var $r=null,Fr=null,ot=!1,Tn=null;function tA(e,t){var r=sn(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 fw(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,$r=e,Fr=Oi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,$r=e,Fr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Fo!==null?{id:Ts,overflow:Rs}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=sn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,$r=e,Fr=null,!0):!1;default:return!1}}function Wg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qg(e){if(ot){var t=Fr;if(t){var r=t;if(!fw(e,t)){if(Wg(e))throw Error(W(418));t=Oi(r.nextSibling);var n=$r;t&&fw(e,t)?tA(n,r):(e.flags=e.flags&-4097|2,ot=!1,$r=e)}}else{if(Wg(e))throw Error(W(418));e.flags=e.flags&-4097|2,ot=!1,$r=e}}}function mw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;$r=e}function Ad(e){if(e!==$r)return!1;if(!ot)return mw(e),ot=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Vg(e.type,e.memoizedProps)),t&&(t=Fr)){if(Wg(e))throw rA(),Error(W(418));for(;t;)tA(e,t),t=Oi(t.nextSibling)}if(mw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Fr=Oi(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Fr=null}}else Fr=$r?Oi(e.stateNode.nextSibling):null;return!0}function rA(){for(var e=Fr;e;)e=Oi(e.nextSibling)}function jl(){Fr=$r=null,ot=!1}function pv(e){Tn===null?Tn=[e]:Tn.push(e)}var n3=Gs.ReactCurrentBatchConfig;function cc(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(W(309));var n=r.stateNode}if(!n)throw Error(W(147,e));var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var l=s.refs;a===null?delete l[i]:l[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(W(284));if(!r._owner)throw Error(W(290,e))}return e}function Nd(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pw(e){var t=e._init;return t(e._payload)}function nA(e){function t(b,y){if(e){var x=b.deletions;x===null?(b.deletions=[y],b.flags|=16):x.push(y)}}function r(b,y){if(!e)return null;for(;y!==null;)t(b,y),y=y.sibling;return null}function n(b,y){for(b=new Map;y!==null;)y.key!==null?b.set(y.key,y):b.set(y.index,y),y=y.sibling;return b}function s(b,y){return b=Mi(b,y),b.index=0,b.sibling=null,b}function i(b,y,x){return b.index=x,e?(x=b.alternate,x!==null?(x=x.index,x<y?(b.flags|=2,y):x):(b.flags|=2,y)):(b.flags|=1048576,y)}function a(b){return e&&b.alternate===null&&(b.flags|=2),b}function l(b,y,x,j){return y===null||y.tag!==6?(y=cp(x,b.mode,j),y.return=b,y):(y=s(y,x),y.return=b,y)}function c(b,y,x,j){var k=x.type;return k===Ea?d(b,y,x.props.children,j,x.key):y!==null&&(y.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ai&&pw(k)===y.type)?(j=s(y,x.props),j.ref=cc(b,y,x),j.return=b,j):(j=hh(x.type,x.key,x.props,null,b.mode,j),j.ref=cc(b,y,x),j.return=b,j)}function u(b,y,x,j){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=up(x,b.mode,j),y.return=b,y):(y=s(y,x.children||[]),y.return=b,y)}function d(b,y,x,j,k){return y===null||y.tag!==7?(y=Do(x,b.mode,j,k),y.return=b,y):(y=s(y,x),y.return=b,y)}function h(b,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=cp(""+y,b.mode,x),y.return=b,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case pd:return x=hh(y.type,y.key,y.props,null,b.mode,x),x.ref=cc(b,null,y),x.return=b,x;case _a:return y=up(y,b.mode,x),y.return=b,y;case ai:var j=y._init;return h(b,j(y._payload),x)}if(Ac(y)||sc(y))return y=Do(y,b.mode,x,null),y.return=b,y;Nd(b,y)}return null}function f(b,y,x,j){var k=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return k!==null?null:l(b,y,""+x,j);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case pd:return x.key===k?c(b,y,x,j):null;case _a:return x.key===k?u(b,y,x,j):null;case ai:return k=x._init,f(b,y,k(x._payload),j)}if(Ac(x)||sc(x))return k!==null?null:d(b,y,x,j,null);Nd(b,x)}return null}function m(b,y,x,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return b=b.get(x)||null,l(y,b,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case pd:return b=b.get(j.key===null?x:j.key)||null,c(y,b,j,k);case _a:return b=b.get(j.key===null?x:j.key)||null,u(y,b,j,k);case ai:var S=j._init;return m(b,y,x,S(j._payload),k)}if(Ac(j)||sc(j))return b=b.get(x)||null,d(y,b,j,k,null);Nd(y,j)}return null}function v(b,y,x,j){for(var k=null,S=null,N=y,A=y=0,E=null;N!==null&&A<x.length;A++){N.index>A?(E=N,N=null):E=N.sibling;var _=f(b,N,x[A],j);if(_===null){N===null&&(N=E);break}e&&N&&_.alternate===null&&t(b,N),y=i(_,y,A),S===null?k=_:S.sibling=_,S=_,N=E}if(A===x.length)return r(b,N),ot&&co(b,A),k;if(N===null){for(;A<x.length;A++)N=h(b,x[A],j),N!==null&&(y=i(N,y,A),S===null?k=N:S.sibling=N,S=N);return ot&&co(b,A),k}for(N=n(b,N);A<x.length;A++)E=m(N,b,A,x[A],j),E!==null&&(e&&E.alternate!==null&&N.delete(E.key===null?A:E.key),y=i(E,y,A),S===null?k=E:S.sibling=E,S=E);return e&&N.forEach(function(F){return t(b,F)}),ot&&co(b,A),k}function g(b,y,x,j){var k=sc(x);if(typeof k!="function")throw Error(W(150));if(x=k.call(x),x==null)throw Error(W(151));for(var S=k=null,N=y,A=y=0,E=null,_=x.next();N!==null&&!_.done;A++,_=x.next()){N.index>A?(E=N,N=null):E=N.sibling;var F=f(b,N,_.value,j);if(F===null){N===null&&(N=E);break}e&&N&&F.alternate===null&&t(b,N),y=i(F,y,A),S===null?k=F:S.sibling=F,S=F,N=E}if(_.done)return r(b,N),ot&&co(b,A),k;if(N===null){for(;!_.done;A++,_=x.next())_=h(b,_.value,j),_!==null&&(y=i(_,y,A),S===null?k=_:S.sibling=_,S=_);return ot&&co(b,A),k}for(N=n(b,N);!_.done;A++,_=x.next())_=m(N,b,A,_.value,j),_!==null&&(e&&_.alternate!==null&&N.delete(_.key===null?A:_.key),y=i(_,y,A),S===null?k=_:S.sibling=_,S=_);return e&&N.forEach(function(C){return t(b,C)}),ot&&co(b,A),k}function w(b,y,x,j){if(typeof x=="object"&&x!==null&&x.type===Ea&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case pd:e:{for(var k=x.key,S=y;S!==null;){if(S.key===k){if(k=x.type,k===Ea){if(S.tag===7){r(b,S.sibling),y=s(S,x.props.children),y.return=b,b=y;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ai&&pw(k)===S.type){r(b,S.sibling),y=s(S,x.props),y.ref=cc(b,S,x),y.return=b,b=y;break e}r(b,S);break}else t(b,S);S=S.sibling}x.type===Ea?(y=Do(x.props.children,b.mode,j,x.key),y.return=b,b=y):(j=hh(x.type,x.key,x.props,null,b.mode,j),j.ref=cc(b,y,x),j.return=b,b=j)}return a(b);case _a:e:{for(S=x.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){r(b,y.sibling),y=s(y,x.children||[]),y.return=b,b=y;break e}else{r(b,y);break}else t(b,y);y=y.sibling}y=up(x,b.mode,j),y.return=b,b=y}return a(b);case ai:return S=x._init,w(b,y,S(x._payload),j)}if(Ac(x))return v(b,y,x,j);if(sc(x))return g(b,y,x,j);Nd(b,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(r(b,y.sibling),y=s(y,x),y.return=b,b=y):(r(b,y),y=cp(x,b.mode,j),y.return=b,b=y),a(b)):r(b,y)}return w}var kl=nA(!0),sA=nA(!1),Uh=Yi(null),Bh=null,Ma=null,gv=null;function xv(){gv=Ma=Bh=null}function yv(e){var t=Uh.current;it(Uh),e._currentValue=t}function Kg(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 Xa(e,t){Bh=e,gv=Ma=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Sr=!0),e.firstContext=null)}function un(e){var t=e._currentValue;if(gv!==e)if(e={context:e,memoizedValue:t,next:null},Ma===null){if(Bh===null)throw Error(W(308));Ma=e,Bh.dependencies={lanes:0,firstContext:e}}else Ma=Ma.next=e;return t}var yo=null;function vv(e){yo===null?yo=[e]:yo.push(e)}function iA(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,vv(t)):(r.next=s.next,s.next=r),t.interleaved=r,Fs(e,n)}function Fs(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 li=!1;function bv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oA(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 Os(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ii(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ve&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Fs(e,r)}return s=n.interleaved,s===null?(t.next=t,vv(n)):(t.next=s.next,s.next=t),n.interleaved=t,Fs(e,r)}function oh(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,iv(e,r)}}function gw(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,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 Hh(e,t,r,n){var s=e.updateQueue;li=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?i=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=s.baseState;a=0,d=u=c=null,l=i;do{var f=l.lane,m=l.eventTime;if((n&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,g=l;switch(f=t,m=r,g.tag){case 1:if(v=g.payload,typeof v=="function"){h=v.call(m,h,f);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,f=typeof v=="function"?v.call(m,h,f):v,f==null)break e;h=pt({},h,f);break e;case 2:li=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[l]:f.push(l))}else m={eventTime:m,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=h):d=d.next=m,a|=f;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;f=l,l=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Vo|=a,e.lanes=a,e.memoizedState=h}}function xw(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(W(191,s));s.call(n)}}}var Xu={},is=Yi(Xu),du=Yi(Xu),hu=Yi(Xu);function vo(e){if(e===Xu)throw Error(W(174));return e}function wv(e,t){switch(tt(hu,t),tt(du,e),tt(is,Xu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Cg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Cg(t,e)}it(is),tt(is,t)}function Sl(){it(is),it(du),it(hu)}function aA(e){vo(hu.current);var t=vo(is.current),r=Cg(t,e.type);t!==r&&(tt(du,e),tt(is,r))}function jv(e){du.current===e&&(it(is),it(du))}var dt=Yi(0);function Wh(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 np=[];function kv(){for(var e=0;e<np.length;e++)np[e]._workInProgressVersionPrimary=null;np.length=0}var ah=Gs.ReactCurrentDispatcher,sp=Gs.ReactCurrentBatchConfig,$o=0,ft=null,Lt=null,Bt=null,qh=!1,zc=!1,fu=0,s3=0;function rr(){throw Error(W(321))}function Sv(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!zn(e[r],t[r]))return!1;return!0}function Av(e,t,r,n,s,i){if($o=i,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ah.current=e===null||e.memoizedState===null?l3:c3,e=r(n,s),zc){i=0;do{if(zc=!1,fu=0,25<=i)throw Error(W(301));i+=1,Bt=Lt=null,t.updateQueue=null,ah.current=u3,e=r(n,s)}while(zc)}if(ah.current=Kh,t=Lt!==null&&Lt.next!==null,$o=0,Bt=Lt=ft=null,qh=!1,t)throw Error(W(300));return e}function Nv(){var e=fu!==0;return fu=0,e}function Gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?ft.memoizedState=Bt=e:Bt=Bt.next=e,Bt}function dn(){if(Lt===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=Lt.next;var t=Bt===null?ft.memoizedState:Bt.next;if(t!==null)Bt=t,Lt=e;else{if(e===null)throw Error(W(310));Lt=e,e={memoizedState:Lt.memoizedState,baseState:Lt.baseState,baseQueue:Lt.baseQueue,queue:Lt.queue,next:null},Bt===null?ft.memoizedState=Bt=e:Bt=Bt.next=e}return Bt}function mu(e,t){return typeof t=="function"?t(e):t}function ip(e){var t=dn(),r=t.queue;if(r===null)throw Error(W(311));r.lastRenderedReducer=e;
vendor: 5,688 bytes, line 38
38var n=Lt,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var l=a=null,c=null,u=i;do{var d=u.lane;if(($o&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,a=n):c=c.next=h,ft.lanes|=d,Vo|=d}u=u.next}while(u!==null&&u!==i);c===null?a=n:c.next=l,zn(n,t.memoizedState)||(Sr=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,ft.lanes|=i,Vo|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function op(e){var t=dn(),r=t.queue;if(r===null)throw Error(W(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var a=s=s.next;do i=e(i,a.action),a=a.next;while(a!==s);zn(i,t.memoizedState)||(Sr=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function lA(){}function cA(e,t){var r=ft,n=dn(),s=t(),i=!zn(n.memoizedState,s);if(i&&(n.memoizedState=s,Sr=!0),n=n.queue,Cv(hA.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Bt!==null&&Bt.memoizedState.tag&1){if(r.flags|=2048,pu(9,dA.bind(null,r,n,s,t),void 0,null),Wt===null)throw Error(W(349));$o&30||uA(r,t,s)}return s}function uA(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function dA(e,t,r,n){t.value=r,t.getSnapshot=n,fA(t)&&mA(e)}function hA(e,t,r){return r(function(){fA(t)&&mA(e)})}function fA(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!zn(e,r)}catch{return!0}}function mA(e){var t=Fs(e,1);t!==null&&Ln(t,e,1,-1)}function yw(e){var t=Gn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mu,lastRenderedState:e},t.queue=e,e=e.dispatch=a3.bind(null,ft,e),[t.memoizedState,e]}function pu(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.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 pA(){return dn().memoizedState}function lh(e,t,r,n){var s=Gn();ft.flags|=e,s.memoizedState=pu(1|t,r,void 0,n===void 0?null:n)}function Uf(e,t,r,n){var s=dn();n=n===void 0?null:n;var i=void 0;if(Lt!==null){var a=Lt.memoizedState;if(i=a.destroy,n!==null&&Sv(n,a.deps)){s.memoizedState=pu(t,r,i,n);return}}ft.flags|=e,s.memoizedState=pu(1|t,r,i,n)}function vw(e,t){return lh(8390656,8,e,t)}function Cv(e,t){return Uf(2048,8,e,t)}function gA(e,t){return Uf(4,2,e,t)}function xA(e,t){return Uf(4,4,e,t)}function yA(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 vA(e,t,r){return r=r!=null?r.concat([e]):null,Uf(4,4,yA.bind(null,t,e),r)}function _v(){}function bA(e,t){var r=dn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Sv(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function wA(e,t){var r=dn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Sv(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function jA(e,t,r){return $o&21?(zn(r,t)||(r=CS(),ft.lanes|=r,Vo|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Sr=!0),e.memoizedState=r)}function i3(e,t){var r=Qe;Qe=r!==0&&4>r?r:4,e(!0);var n=sp.transition;sp.transition={};try{e(!1),t()}finally{Qe=r,sp.transition=n}}function kA(){return dn().memoizedState}function o3(e,t,r){var n=Li(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},SA(e))AA(t,r);else if(r=iA(e,t,r,n),r!==null){var s=gr();Ln(r,e,n,s),NA(r,t,n)}}function a3(e,t,r){var n=Li(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(SA(e))AA(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,r);if(s.hasEagerState=!0,s.eagerState=l,zn(l,a)){var c=t.interleaved;c===null?(s.next=s,vv(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}r=iA(e,t,s,n),r!==null&&(s=gr(),Ln(r,e,n,s),NA(r,t,n))}}function SA(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function AA(e,t){zc=qh=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function NA(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,iv(e,r)}}var Kh={readContext:un,useCallback:rr,useContext:rr,useEffect:rr,useImperativeHandle:rr,useInsertionEffect:rr,useLayoutEffect:rr,useMemo:rr,useReducer:rr,useRef:rr,useState:rr,useDebugValue:rr,useDeferredValue:rr,useTransition:rr,useMutableSource:rr,useSyncExternalStore:rr,useId:rr,unstable_isNewReconciler:!1},l3={readContext:un,useCallback:function(e,t){return Gn().memoizedState=[e,t===void 0?null:t],e},useContext:un,useEffect:vw,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,lh(4194308,4,yA.bind(null,t,e),r)},useLayoutEffect:function(e,t){return lh(4194308,4,e,t)},useInsertionEffect:function(e,t){return lh(4,2,e,t)},useMemo:function(e,t){var r=Gn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Gn();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=o3.bind(null,ft,e),[n.memoizedState,e]}
vendor: 4,709 bytes, lines 38-40
38,useRef:function(e){var t=Gn();return e={current:e},t.memoizedState=e},useState:yw,useDebugValue:_v,useDeferredValue:function(e){return Gn().memoizedState=e},useTransition:function(){var e=yw(!1),t=e[0];return e=i3.bind(null,e[1]),Gn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ft,s=Gn();if(ot){if(r===void 0)throw Error(W(407));r=r()}else{if(r=t(),Wt===null)throw Error(W(349));$o&30||uA(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,vw(hA.bind(null,n,i,e),[e]),n.flags|=2048,pu(9,dA.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Gn(),t=Wt.identifierPrefix;if(ot){var r=Rs,n=Ts;r=(n&~(1<<32-Dn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=fu++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=s3++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},c3={readContext:un,useCallback:bA,useContext:un,useEffect:Cv,useImperativeHandle:vA,useInsertionEffect:gA,useLayoutEffect:xA,useMemo:wA,useReducer:ip,useRef:pA,useState:function(){return ip(mu)},useDebugValue:_v,useDeferredValue:function(e){var t=dn();return jA(t,Lt.memoizedState,e)},useTransition:function(){var e=ip(mu)[0],t=dn().memoizedState;return[e,t]},useMutableSource:lA,useSyncExternalStore:cA,useId:kA,unstable_isNewReconciler:!1},u3={readContext:un,useCallback:bA,useContext:un,useEffect:Cv,useImperativeHandle:vA,useInsertionEffect:gA,useLayoutEffect:xA,useMemo:wA,useReducer:op,useRef:pA,useState:function(){return op(mu)},useDebugValue:_v,useDeferredValue:function(e){var t=dn();return Lt===null?t.memoizedState=e:jA(t,Lt.memoizedState,e)},useTransition:function(){var e=op(mu)[0],t=dn().memoizedState;return[e,t]},useMutableSource:lA,useSyncExternalStore:cA,useId:kA,unstable_isNewReconciler:!1};function An(e,t){if(e&&e.defaultProps){t=pt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Gg(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:pt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Bf={isMounted:function(e){return(e=e._reactInternals)?ra(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=gr(),s=Li(e),i=Os(n,s);i.payload=t,r!=null&&(i.callback=r),t=Ii(e,i,s),t!==null&&(Ln(t,e,s,n),oh(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=gr(),s=Li(e),i=Os(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Ii(e,i,s),t!==null&&(Ln(t,e,s,n),oh(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=gr(),n=Li(e),s=Os(r,n);s.tag=2,t!=null&&(s.callback=t),t=Ii(e,s,n),t!==null&&(Ln(t,e,n,r),oh(t,e,n))}};function bw(e,t,r,n,s,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,a):t.prototype&&t.prototype.isPureReactComponent?!au(r,n)||!au(s,i):!0}function CA(e,t,r){var n=!1,s=Bi,i=t.contextType;return typeof i=="object"&&i!==null?i=un(i):(s=Cr(t)?zo:lr.current,n=t.contextTypes,i=(n=n!=null)?wl(e,s):Bi),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Bf,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function ww(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&&Bf.enqueueReplaceState(t,t.state,null)}function Qg(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},bv(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=un(i):(i=Cr(t)?zo:lr.current,s.context=wl(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Gg(e,t,i,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Bf.enqueueReplaceState(s,s.state,null),Hh(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Al(e,t){try{var r="",n=t;do r+=zO(n),n=n.return;while(n);var s=r}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function ap(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Zg(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var d3=typeof WeakMap=="function"?WeakMap:Map;function _A(e,t,r){r=Os(-1,r),r.tag=3,r.payload={element:null};var n=t.value;
vendor: 7,433 bytes, line 40
40return r.callback=function(){Qh||(Qh=!0,ox=n),Zg(e,t)},r}function EA(e,t,r){r=Os(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Zg(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Zg(e,t),typeof n!="function"&&(Di===null?Di=new Set([this]):Di.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function jw(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new d3;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=A3.bind(null,e,t,r),t.then(e,e))}function kw(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 Sw(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Os(-1,1),t.tag=2,Ii(r,t,1))),r.lanes|=1),e)}var h3=Gs.ReactCurrentOwner,Sr=!1;function hr(e,t,r,n){t.child=e===null?sA(t,null,r,n):kl(t,e.child,r,n)}function Aw(e,t,r,n,s){r=r.render;var i=t.ref;return Xa(t,s),n=Av(e,t,r,n,i,s),r=Nv(),e!==null&&!Sr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$s(e,t,s)):(ot&&r&&fv(t),t.flags|=1,hr(e,t,n,s),t.child)}function Nw(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!Lv(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,PA(e,t,i,n,s)):(e=hh(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:au,r(a,n)&&e.ref===t.ref)return $s(e,t,s)}return t.flags|=1,e=Mi(i,n),e.ref=t.ref,e.return=t,t.child=e}function PA(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(au(i,n)&&e.ref===t.ref)if(Sr=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(Sr=!0);else return t.lanes=e.lanes,$s(e,t,s)}return Xg(e,t,r,n,s)}function TA(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(Fa,Dr),Dr|=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,tt(Fa,Dr),Dr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,tt(Fa,Dr),Dr|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,tt(Fa,Dr),Dr|=n;return hr(e,t,s,r),t.child}function RA(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Xg(e,t,r,n,s){var i=Cr(r)?zo:lr.current;return i=wl(t,i),Xa(t,s),r=Av(e,t,r,n,i,s),n=Nv(),e!==null&&!Sr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$s(e,t,s)):(ot&&n&&fv(t),t.flags|=1,hr(e,t,r,s),t.child)}function Cw(e,t,r,n,s){if(Cr(r)){var i=!0;Fh(t)}else i=!1;if(Xa(t,s),t.stateNode===null)ch(e,t),CA(t,r,n),Qg(t,r,n,s),n=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var c=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=un(u):(u=Cr(r)?zo:lr.current,u=wl(t,u));var d=r.getDerivedStateFromProps,h=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==n||c!==u)&&ww(t,a,n,u),li=!1;var f=t.memoizedState;a.state=f,Hh(t,n,a,s),c=t.memoizedState,l!==n||f!==c||Nr.current||li?(typeof d=="function"&&(Gg(t,r,d,n),c=t.memoizedState),(l=li||bw(t,r,l,n,f,c,u))?(h||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),a.props=n,a.state=c,a.context=u,n=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,oA(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:An(t.type,l),a.props=u,h=t.pendingProps,f=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=un(c):(c=Cr(r)?zo:lr.current,c=wl(t,c));var m=r.getDerivedStateFromProps;(d=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==h||f!==c)&&ww(t,a,n,c),li=!1,f=t.memoizedState,a.state=f,Hh(t,n,a,s);var v=t.memoizedState;l!==h||f!==v||Nr.current||li?(typeof m=="function"&&(Gg(t,r,m,n),v=t.memoizedState),(u=li||bw(t,r,u,n,f,v,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,v,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,v,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=v),a.props=n,a.state=v,a.context=c,n=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return Yg(e,t,r,n,i,s)}function Yg(e,t,r,n,s,i){RA(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return s&&hw(t,r,!1),$s(e,t,i);n=t.stateNode,h3.current=t;var l=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=kl(t,e.child,null,i),t.child=kl(t,null,l,i)):hr(e,t,l,i),t.memoizedState=n.state,s&&hw(t,r,!0),t.child}function OA(e){var t=e.stateNode;t.pendingContext?dw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&dw(e,t.context,!1),wv(e,t.containerInfo)}function _w(e,t,r,n,s){return jl(),pv(s),t.flags|=256,hr(e,t,r,n),t.child}var Jg={dehydrated:null,treeContext:null,retryLane:0};function ex(e){return{baseLanes:e,cachePool:null,transitions:null}}function IA(e,t,r){var n=t.pendingProps,s=dt.current,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),tt(dt,s&1),e===null)return qg(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=n.children,e=n.fallback,i?(n=t.mode,i=t.child,a={mode:"hidden",children:a},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=qf(a,n,0,null),e=Do(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ex(r),t.memoizedState=Jg,e):Ev(t,a));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return f3(e,t,a,n,l,s,r);if(i){i=n.fallback,a=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:n.children};return!(a&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=Mi(s,c),n.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=Mi(l,i):(i=Do(i,a,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,a=e.child.memoizedState,a=a===null?ex(r):{base
vendor: 8,918 bytes, line 40
40Lanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~r,t.memoizedState=Jg,n}return i=e.child,e=i.sibling,n=Mi(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 Ev(e,t){return t=qf({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Cd(e,t,r,n){return n!==null&&pv(n),kl(t,e.child,null,r),e=Ev(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function f3(e,t,r,n,s,i,a){if(r)return t.flags&256?(t.flags&=-257,n=ap(Error(W(422))),Cd(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=qf({mode:"visible",children:n.children},s,0,null),i=Do(i,s,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&kl(t,e.child,null,a),t.child.memoizedState=ex(a),t.memoizedState=Jg,i);if(!(t.mode&1))return Cd(e,t,a,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var l=n.dgst;return n=l,i=Error(W(419)),n=ap(i,n,void 0),Cd(e,t,a,n)}if(l=(a&e.childLanes)!==0,Sr||l){if(n=Wt,n!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Fs(e,s),Ln(n,e,s,-1))}return Dv(),n=ap(Error(W(421))),Cd(e,t,a,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=N3.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Fr=Oi(s.nextSibling),$r=t,ot=!0,Tn=null,e!==null&&(rn[nn++]=Ts,rn[nn++]=Rs,rn[nn++]=Fo,Ts=e.id,Rs=e.overflow,Fo=t),t=Ev(t,n.children),t.flags|=4096,t)}function Ew(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Kg(e.return,t,r)}function lp(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function DA(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(hr(e,t,n.children,r),n=dt.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&&Ew(e,r,t);else if(e.tag===19)Ew(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(tt(dt,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Wh(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),lp(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Wh(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}lp(t,!0,r,null,i);break;case"together":lp(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ch(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $s(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Vo|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,r=Mi(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Mi(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function m3(e,t,r){switch(t.tag){case 3:OA(t),jl();break;case 5:aA(t);break;case 1:Cr(t.type)&&Fh(t);break;case 4:wv(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;tt(Uh,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(tt(dt,dt.current&1),t.flags|=128,null):r&t.child.childLanes?IA(e,t,r):(tt(dt,dt.current&1),e=$s(e,t,r),e!==null?e.sibling:null);tt(dt,dt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return DA(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),tt(dt,dt.current),n)break;return null;case 22:case 23:return t.lanes=0,TA(e,t,r)}return $s(e,t,r)}var LA,tx,MA,zA;LA=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}};tx=function(){};MA=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,vo(is.current);var i=null;switch(r){case"input":s=kg(e,s),n=kg(e,n),i=[];break;case"select":s=pt({},s,{value:void 0}),n=pt({},n,{value:void 0}),i=[];break;case"textarea":s=Ng(e,s),n=Ng(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Mh)}_g(r,n);var a;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(a in l)l.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(eu.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var c=n[u];if(l=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(i||(i=[]),i.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(eu.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&nt("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};zA=function(e,t,r,n){r!==n&&(t.flags|=4)};function uc(e,t){if(!ot)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 nr(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function p3(e,t,r){var n=t.pendingProps;switch(mv(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nr(t),null;case 1:return Cr(t.type)&&zh(),nr(t),null;case 3:return n=t.stateNode,Sl(),it(Nr),it(lr),kv(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ad(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Tn!==null&&(cx(Tn),Tn=null))),tx(e,t),nr(t),null;case 5:jv(t);var s=vo(hu.current);if(r=t.type,e!==null&&t.stateNode!=null)MA(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(W(166));return nr(t),null}if(e=vo(is.current),Ad(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Jn]=t,n[uu]=i,e=(t.mode&1)!==0,r){case"dialog":nt("cancel",n),nt("close",n);break;case"iframe":case"object":case"embed":nt("load",n);break;case"video":case"audio":for(s=0;s<Cc.length;s++)nt(Cc[s],n);break;case"source":nt("error",n);break;case"img":case"image":case"link":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"input":zb(n,i),nt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},nt("invalid",n);break;case"textarea":$b(n,i),nt("invalid",n)}_g(r,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var l=i[a];a==="children"?typeof l=="string"?n.textContent!==l&&(i.suppressHydrationWarning!==!0&&Sd(n.textContent,l,e),s=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Sd(n.textContent,l,e),s=["children",""+l]):eu.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&nt("scroll",n)}switch(r){case"input":gd(n),Fb(n,i,!0);break;case"textarea":gd(n),Vb(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Mh)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hS(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Jn]=t,e[uu]=n,LA(e,t,!1,!1),t.stateNode=e;e:{switch(a=Eg(r,n),r){case"dialog":nt("cancel",e),nt("close",e),s=n;break;case"iframe":case"object":case"embed":nt("load",e),s=n;break;case"video":case"audio":for(s=0;s<Cc.length;s++)nt(Cc[s],e);s=n;break;case"source":nt("error",e),s=n;break;case"img":case"image":case"link":nt("error",e),nt("load",e),s=n;break;case"details":nt("toggle",e),s=n;break;case"input":zb(e,n),s=kg(e,n),nt("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=pt({},n,{value:void 0}),nt("invalid",e);break;case"textarea":$b(e,n),s=Ng(e,n),nt("invalid",e);break;default:s=n}_g(r,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?pS(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&fS(e,c)):i==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&tu(e,c):typeof c=="number"&&tu(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(eu.hasOwnProperty(i)?c!=null&&i==="onScroll"&&nt("scroll",e):c!=null&&Jy(e,i,c,a))}switch(r){case"input":gd(e),Fb(e,n,!1);break;case"textarea":gd(e),Vb(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Ui(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Ka(e,!!n.multiple,i,!1):n.defaultValue!=null&&Ka(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Mh)}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 nr(t),null;case 6:if(e&&t.stateNode!=null)zA(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(W(166));if(r=vo(hu.current),vo(is.current),Ad(t)){if(n=t.stateNode,r=t.memoizedProps,n[Jn]=t,(i=n.nodeValue!==r)&&(e=$r,e!==null))switch(e.tag){case 3:Sd(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Sd(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Jn]=t,t.stateNode=n}return nr(t),null;case 13:if(it(dt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ot&&Fr!==null&&t.mode&1&&!(t.flags&128))rA(),jl(),t.flags|=98560,i=!1;else if(i=Ad(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(W(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(W(317));i[Jn]=t}else jl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;nr(t),i=!1}else Tn!==null&&(cx(Tn),Tn=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||dt.current&1?zt===0&&(zt=3):Dv())),t.updateQueue!==null&&(t.flags|=4),nr(t),null);case 4:return Sl(),tx(e,t),e===null&&lu(t.stateNode.containerInfo),nr(t),null;case 10:return yv(t.type._context),nr(t),null;case 17:return Cr(t.type)&&zh(),nr(t),null;case 19:if(it(dt),i=t.memoizedState,i===null)return nr(t),null;if(n=(t.flags&128)!==0,a=i.rendering,a===null)if(n)uc(i,!1);else{if(zt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Wh(e),a!==null){for(t.flags|=128,uc(i,!1),n=a.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,a=i.alternate,a===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=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return tt(dt,dt.current&1|2),t.child}e=e.sibling}i.tail!==null&&St()>Nl&&(t.flags|=128,n=!0,uc(i,!1),t.lanes=4194304)}else{if(!n)if(e=Wh(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),uc(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!ot)return nr(t),null}else 2*St()-i.renderingStartTime>Nl&&r!==1073741824&&(t.flags|=128,n=!0,uc(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=St(),t.sibling=null,r=dt.current,tt(dt,n?r&1|2:r&1),t):(nr(t),null);case 22:case 23:return Iv(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Dr&1073741824&&(nr(t),t.subtreeFlags&6&&(t.flags|=8192)):nr(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function g3(e,t){switch(mv(t),t.tag){case 1:return Cr(t.type)&&zh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 24,685 bytes, line 40
40case 3:return Sl(),it(Nr),it(lr),kv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return jv(t),null;case 13:if(it(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));jl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return it(dt),null;case 4:return Sl(),null;case 10:return yv(t.type._context),null;case 22:case 23:return Iv(),null;case 24:return null;default:return null}}var _d=!1,ir=!1,x3=typeof WeakSet=="function"?WeakSet:Set,oe=null;function za(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){jt(e,t,n)}else r.current=null}function rx(e,t,r){try{r()}catch(n){jt(e,t,n)}}var Pw=!1;function y3(e,t){if(Fg=Ih,e=BS(),hv(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var m;h!==r||s!==0&&h.nodeType!==3||(l=a+s),h!==i||n!==0&&h.nodeType!==3||(c=a+n),h.nodeType===3&&(a+=h.nodeValue.length),(m=h.firstChild)!==null;)f=h,h=m;for(;;){if(h===e)break t;if(f===r&&++u===s&&(l=a),f===i&&++d===n&&(c=a),(m=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=m}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for($g={focusedElem:e,selectionRange:r},Ih=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;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,w=v.memoizedState,b=t.stateNode,y=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:An(t.type,g),w);b.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(j){jt(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return v=Pw,Pw=!1,v}function Fc(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&rx(t,r,i)}s=s.next}while(s!==n)}}function Hf(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 nx(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 FA(e){var t=e.alternate;t!==null&&(e.alternate=null,FA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jn],delete t[uu],delete t[Bg],delete t[e3],delete t[t3])),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 $A(e){return e.tag===5||e.tag===3||e.tag===4}function Tw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$A(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 sx(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=Mh));else if(n!==4&&(e=e.child,e!==null))for(sx(e,t,r),e=e.sibling;e!==null;)sx(e,t,r),e=e.sibling}function ix(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(ix(e,t,r),e=e.sibling;e!==null;)ix(e,t,r),e=e.sibling}var Zt=null,En=!1;function ti(e,t,r){for(r=r.child;r!==null;)VA(e,t,r),r=r.sibling}function VA(e,t,r){if(ss&&typeof ss.onCommitFiberUnmount=="function")try{ss.onCommitFiberUnmount(Lf,r)}catch{}switch(r.tag){case 5:ir||za(r,t);case 6:var n=Zt,s=En;Zt=null,ti(e,t,r),Zt=n,En=s,Zt!==null&&(En?(e=Zt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Zt.removeChild(r.stateNode));break;case 18:Zt!==null&&(En?(e=Zt,r=r.stateNode,e.nodeType===8?tp(e.parentNode,r):e.nodeType===1&&tp(e,r),iu(e)):tp(Zt,r.stateNode));break;case 4:n=Zt,s=En,Zt=r.stateNode.containerInfo,En=!0,ti(e,t,r),Zt=n,En=s;break;case 0:case 11:case 14:case 15:if(!ir&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&rx(r,t,a),s=s.next}while(s!==n)}ti(e,t,r);break;case 1:if(!ir&&(za(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){jt(r,t,l)}ti(e,t,r);break;case 21:ti(e,t,r);break;case 22:r.mode&1?(ir=(n=ir)||r.memoizedState!==null,ti(e,t,r),ir=n):ti(e,t,r);break;default:ti(e,t,r)}}function Rw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new x3),t.forEach(function(n){var s=C3.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function vn(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:Zt=l.stateNode,En=!1;break e;case 3:Zt=l.stateNode.containerInfo,En=!0;break e;case 4:Zt=l.stateNode.containerInfo,En=!0;break e}l=l.return}if(Zt===null)throw Error(W(160));VA(i,a,s),Zt=null,En=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){jt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)UA(t,e),t=t.sibling}function UA(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vn(t,e),qn(e),n&4){try{Fc(3,e,e.return),Hf(3,e)}catch(g){jt(e,e.return,g)}try{Fc(5,e,e.return)}catch(g){jt(e,e.return,g)}}break;case 1:vn(t,e),qn(e),n&512&&r!==null&&za(r,r.return);break;case 5:if(vn(t,e),qn(e),n&512&&r!==null&&za(r,r.return),e.flags&32){var s=e.stateNode;try{tu(s,"")}catch(g){jt(e,e.return,g)}}if(n&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,a=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&&uS(s,i),Eg(l,a);var u=Eg(l,i);for(a=0;a<c.length;a+=2){var d=c[a],h=c[a+1];d==="style"?pS(s,h):d==="dangerouslySetInnerHTML"?fS(s,h):d==="children"?tu(s,h):Jy(s,d,h,u)}switch(l){case"input":Sg(s,i);break;case"textarea":dS(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?Ka(s,!!i.multiple,m,!1):f!==!!i.multiple&&(i.defaultValue!=null?Ka(s,!!i.multiple,i.defaultValue,!0):Ka(s,!!i.multiple,i.multiple?[]:"",!1))}s[uu]=i}catch(g){jt(e,e.return,g)}}break;case 6:if(vn(t,e),qn(e),n&4){if(e.stateNode===null)throw Error(W(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){jt(e,e.return,g)}}break;case 3:if(vn(t,e),qn(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{iu(t.containerInfo)}catch(g){jt(e,e.return,g)}break;case 4:vn(t,e),qn(e);break;case 13:vn(t,e),qn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Rv=St())),n&4&&Rw(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(ir=(u=ir)||d,vn(t,e),ir=u):vn(t,e),qn(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(oe=e,d=e.child;d!==null;){for(h=oe=d;oe!==null;){switch(f=oe,m=f.child,f.tag){case 0:case 11:case 14:case 15:Fc(4,f,f.return);break;case 1:za(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){jt(n,r,g)}}break;case 5:za(f,f.return);break;case 22:if(f.memoizedState!==null){Iw(h);continue}}m!==null?(m.return=f,oe=m):Iw(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=h.stateNode,c=h.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=mS("display",a))}catch(g){jt(e,e.return,g)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){jt(e,e.return,g)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:vn(t,e),qn(e),n&4&&Rw(e);break;case 21:break;default:vn(t,e),qn(e)}}function qn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if($A(r)){var n=r;break e}r=r.return}throw Error(W(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(tu(s,""),n.flags&=-33);var i=Tw(e);ix(e,i,s);break;case 3:case 4:var a=n.stateNode.containerInfo,l=Tw(e);sx(e,l,a);break;default:throw Error(W(161))}}catch(c){jt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function v3(e,t,r){oe=e,BA(e)}function BA(e,t,r){for(var n=(e.mode&1)!==0;oe!==null;){var s=oe,i=s.child;if(s.tag===22&&n){var a=s.memoizedState!==null||_d;if(!a){var l=s.alternate,c=l!==null&&l.memoizedState!==null||ir;l=_d;var u=ir;if(_d=a,(ir=c)&&!u)for(oe=s;oe!==null;)a=oe,c=a.child,a.tag===22&&a.memoizedState!==null?Dw(s):c!==null?(c.return=a,oe=c):Dw(s);for(;i!==null;)oe=i,BA(i),i=i.sibling;oe=s,_d=l,ir=u}Ow(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,oe=i):Ow(e)}}function Ow(e){for(;oe!==null;){var t=oe;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ir||Hf(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!ir)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:An(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&xw(t,i,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}xw(t,a,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&iu(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}ir||t.flags&512&&nx(t)}catch(f){jt(t,t.return,f)}}if(t===e){oe=null;break}if(r=t.sibling,r!==null){r.return=t.return,oe=r;break}oe=t.return}}function Iw(e){for(;oe!==null;){var t=oe;if(t===e){oe=null;break}var r=t.sibling;if(r!==null){r.return=t.return,oe=r;break}oe=t.return}}function Dw(e){for(;oe!==null;){var t=oe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Hf(4,t)}catch(c){jt(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(c){jt(t,s,c)}}var i=t.return;try{nx(t)}catch(c){jt(t,i,c)}break;case 5:var a=t.return;try{nx(t)}catch(c){jt(t,a,c)}}}catch(c){jt(t,t.return,c)}if(t===e){oe=null;break}var l=t.sibling;if(l!==null){l.return=t.return,oe=l;break}oe=t.return}}var b3=Math.ceil,Gh=Gs.ReactCurrentDispatcher,Pv=Gs.ReactCurrentOwner,ln=Gs.ReactCurrentBatchConfig,Ve=0,Wt=null,Tt=null,Jt=0,Dr=0,Fa=Yi(0),zt=0,gu=null,Vo=0,Wf=0,Tv=0,$c=null,kr=null,Rv=0,Nl=1/0,As=null,Qh=!1,ox=null,Di=null,Ed=!1,Ci=null,Zh=0,Vc=0,ax=null,uh=-1,dh=0;function gr(){return Ve&6?St():uh!==-1?uh:uh=St()}function Li(e){return e.mode&1?Ve&2&&Jt!==0?Jt&-Jt:n3.transition!==null?(dh===0&&(dh=CS()),dh):(e=Qe,e!==0||(e=window.event,e=e===void 0?16:IS(e.type)),e):1}function Ln(e,t,r,n){if(50<Vc)throw Vc=0,ax=null,Error(W(185));Gu(e,r,n),(!(Ve&2)||e!==Wt)&&(e===Wt&&(!(Ve&2)&&(Wf|=r),zt===4&&hi(e,Jt)),_r(e,n),r===1&&Ve===0&&!(t.mode&1)&&(Nl=St()+500,Vf&&Ji()))}function _r(e,t){var r=e.callbackNode;n4(e,t);var n=Oh(e,e===Wt?Jt:0);if(n===0)r!==null&&Hb(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Hb(r),t===1)e.tag===0?r3(Lw.bind(null,e)):JS(Lw.bind(null,e)),Y4(function(){!(Ve&6)&&Ji()}),r=null;else{switch(_S(n)){case 1:r=sv;break;case 4:r=AS;break;case 16:r=Rh;break;case 536870912:r=NS;break;default:r=Rh}r=XA(r,HA.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function HA(e,t){if(uh=-1,dh=0,Ve&6)throw Error(W(327));var r=e.callbackNode;if(Ya()&&e.callbackNode!==r)return null;var n=Oh(e,e===Wt?Jt:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Xh(e,n);else{t=n;var s=Ve;Ve|=2;var i=qA();(Wt!==e||Jt!==t)&&(As=null,Nl=St()+500,Io(e,t));do try{k3();break}catch(l){WA(e,l)}while(!0);xv(),Gh.current=i,Ve=s,Tt!==null?t=0:(Wt=null,Jt=0,t=zt)}if(t!==0){if(t===2&&(s=Ig(e),s!==0&&(n=s,t=lx(e,s))),t===1)throw r=gu,Io(e,0),hi(e,n),_r(e,St()),r;if(t===6)hi(e,n);else{if(s=e.current.alternate,!(n&30)&&!w3(s)&&(t=Xh(e,n),t===2&&(i=Ig(e),i!==0&&(n=i,t=lx(e,i))),t===1))throw r=gu,Io(e,0),hi(e,n),_r(e,St()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(W(345));case 2:uo(e,kr,As);break;case 3:if(hi(e,n),(n&130023424)===n&&(t=Rv+500-St(),10<t)){if(Oh(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){gr(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ug(uo.bind(null,e,kr,As),t);break}uo(e,kr,As);break;case 4:if(hi(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var a=31-Dn(n);i=1<<a,a=t[a],a>s&&(s=a),n&=~i}if(n=s,n=St()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*b3(n/1960))-n,10<n){e.timeoutHandle=Ug(uo.bind(null,e,kr,As),n);break}uo(e,kr,As);break;case 5:uo(e,kr,As);break;default:throw Error(W(329))}}}return _r(e,St()),e.callbackNode===r?HA.bind(null,e):null}function lx(e,t){var r=$c;return e.current.memoizedState.isDehydrated&&(Io(e,t).flags|=256),e=Xh(e,t),e!==2&&(t=kr,kr=r,t!==null&&cx(t)),e}function cx(e){kr===null?kr=e:kr.push.apply(kr,e)}function w3(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!zn(i(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function hi(e,t){for(t&=~Tv,t&=~Wf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Dn(t),n=1<<r;e[r]=-1,t&=~n}}function Lw(e){if(Ve&6)throw Error(W(327));Ya();var t=Oh(e,0);if(!(t&1))return _r(e,St()),null;var r=Xh(e,t);if(e.tag!==0&&r===2){var n=Ig(e);n!==0&&(t=n,r=lx(e,n))}if(r===1)throw r=gu,Io(e,0),hi(e,t),_r(e,St()),r;if(r===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,uo(e,kr,As),_r(e,St()),null}function Ov(e,t){var r=Ve;Ve|=1;try{return e(t)}finally{Ve=r,Ve===0&&(Nl=St()+500,Vf&&Ji())}}function Uo(e){Ci!==null&&Ci.tag===0&&!(Ve&6)&&Ya();var t=Ve;Ve|=1;var r=ln.transition,n=Qe;try{if(ln.transition=null,Qe=1,e)return e()}finally{Qe=n,ln.transition=r,Ve=t,!(Ve&6)&&Ji()}}function Iv(){Dr=Fa.current,it(Fa)}function Io(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,X4(r)),Tt!==null)for(r=Tt.return;r!==null;){var n=r;switch(mv(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&zh();break;case 3:Sl(),it(Nr),it(lr),kv();break;case 5:jv(n);break;case 4:Sl();break;case 13:it(dt);break;case 19:it(dt);break;case 10:yv(n.type._context);break;case 22:case 23:Iv()}r=r.return}if(Wt=e,Tt=e=Mi(e.current,null),Jt=Dr=t,zt=0,gu=null,Tv=Wf=Vo=0,kr=$c=null,yo!==null){for(t=0;t<yo.length;t++)if(r=yo[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=s,n.next=a}r.pending=n}yo=null}return e}function WA(e,t){do{var r=Tt;try{if(xv(),ah.current=Kh,qh){for(var n=ft.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}qh=!1}if($o=0,Bt=Lt=ft=null,zc=!1,fu=0,Pv.current=null,r===null||r.return===null){zt=1,gu=t,Tt=null;break}e:{var i=e,a=r.return,l=r,c=t;if(t=Jt,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=kw(a);if(m!==null){m.flags&=-257,Sw(m,a,l,i,t),m.mode&1&&jw(i,u,t),t=m,c=u;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)){jw(i,u,t),Dv();break e}c=Error(W(426))}}else if(ot&&l.mode&1){var w=kw(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Sw(w,a,l,i,t),pv(Al(c,l));break e}}i=c=Al(c,l),zt!==4&&(zt=2),$c===null?$c=[i]:$c.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var b=_A(i,c,t);gw(i,b);break e;case 1:l=c;var y=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Di===null||!Di.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var j=EA(i,l,t);gw(i,j);break e}}i=i.return}while(i!==null)}GA(r)}catch(k){t=k,Tt===r&&r!==null&&(Tt=r=r.return);continue}break}while(!0)}function qA(){var e=Gh.current;return Gh.current=Kh,e===null?Kh:e}function Dv(){(zt===0||zt===3||zt===2)&&(zt=4),Wt===null||!(Vo&268435455)&&!(Wf&268435455)||hi(Wt,Jt)}function Xh(e,t){var r=Ve;Ve|=2;var n=qA();(Wt!==e||Jt!==t)&&(As=null,Io(e,t));do try{j3();break}catch(s){WA(e,s)}while(!0);if(xv(),Ve=r,Gh.current=n,Tt!==null)throw Error(W(261));return Wt=null,Jt=0,zt}function j3(){for(;Tt!==null;)KA(Tt)}function k3(){for(;Tt!==null&&!GO();)KA(Tt)}function KA(e){var t=ZA(e.alternate,e,Dr);e.memoizedProps=e.pendingProps,t===null?GA(e):Tt=t,Pv.current=null}function GA(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=g3(r,t),r!==null){r.flags&=32767,Tt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{zt=6,Tt=null;return}}else if(r=p3(r,t,Dr),r!==null){Tt=r;return}if(t=t.sibling,t!==null){Tt=t;return}Tt=t=e}while(t!==null);zt===0&&(zt=5)}function uo(e,t,r){var n=Qe,s=ln.transition;try{ln.transition=null,Qe=1,S3(e,t,r,n)}finally{ln.transition=s,Qe=n}return null}function S3(e,t,r,n){do Ya();while(Ci!==null);if(Ve&6)throw Error(W(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(s4(e,i),e===Wt&&(Tt=Wt=null,Jt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ed||(Ed=!0,XA(Rh,function(){return Ya(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=ln.transition,ln.transition=null;var a=Qe;Qe=1;var l=Ve;Ve|=4,Pv.current=null,y3(e,r),UA(r,e),H4($g),Ih=!!Fg,$g=Fg=null,e.current=r,v3(r),QO(),Ve=l,Qe=a,ln.transition=i}else e.current=r;if(Ed&&(Ed=!1,Ci=e,Zh=s),i=e.pendingLanes,i===0&&(Di=null),YO(r.stateNode),_r(e,St()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Qh)throw Qh=!1,e=ox,ox=null,e;return Zh&1&&e.tag!==0&&Ya(),i=e.pendingLanes,i&1?e===ax?Vc++:(Vc=0,ax=e):Vc=0,Ji(),null}function Ya(){if(Ci!==null){var e=_S(Zh),t=ln.transition,r=Qe;try{if(ln.transition=null,Qe=16>e?16:e,Ci===null)var n=!1;else{if(e=Ci,Ci=null,Zh=0,Ve&6)throw Error(W(331));var s=Ve;for(Ve|=4,oe=e.current;oe!==null;){var i=oe,a=i.child;if(oe.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(oe=u;oe!==null;){var d=oe;switch(d.tag){case 0:case 11:case 15:Fc(8,d,i)}var h=d.child;if(h!==null)h.return=d,oe=h;else for(;oe!==null;){d=oe;var f=d.sibling,m=d.return;if(FA(d),d===u){oe=null;break}if(f!==null){f.return=m,oe=f;break}oe=m}}}var v=i.alternate;if(v!==null){var g=v.child;if(g!==null){v.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}oe=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,oe=a;else e:for(;oe!==null;){if(i=oe,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Fc(9,i,i.return)}var b=i.sibling;if(b!==null){b.return=i.return,oe=b;break e}oe=i.return}}var y=e.current;for(oe=y;oe!==null;){a=oe;var x=a.child;if(a.subtreeFlags&2064&&x!==null)x.return=a,oe=x;else e:for(a=y;oe!==null;){if(l=oe,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Hf(9,l)}}catch(k){jt(l,l.return,k)}if(l===a){oe=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,oe=j;break e}oe=l.return}}if(Ve=s,Ji(),ss&&typeof ss.onPostCommitFiberRoot=="function")try{ss.onPostCommitFiberRoot(Lf,e)}catch{}n=!0}return n}finally{Qe=r,ln.transition=t}}return!1}function Mw(e,t,r){t=Al(r,t),t=_A(e,t,1),e=Ii(e,t,1),t=gr(),e!==null&&(Gu(e,1,t),_r(e,t))}function jt(e,t,r){if(e.tag===3)Mw(e,e,r);else for(;t!==null;){if(t.tag===3){Mw(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Di===null||!Di.has(n))){e=Al(r,e),e=EA(t,e,1),t=Ii(t,e,1),e=gr(),t!==null&&(Gu(t,1,e),_r(t,e));break}}t=t.return}}function A3(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=gr(),e.pingedLanes|=e.suspendedLanes&r,Wt===e&&(Jt&r)===r&&(zt===4||zt===3&&(Jt&130023424)===Jt&&500>St()-Rv?Io(e,0):Tv|=r),_r(e,t)}function QA(e,t){t===0&&(e.mode&1?(t=vd,vd<<=1,!(vd&130023424)&&(vd=4194304)):t=1);var r=gr();e=Fs(e,t),e!==null&&(Gu(e,t,r),_r(e,r))}function N3(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),QA(e,r)}function C3(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(W(314))}n!==null&&n.delete(t),QA(e,r)}var ZA;ZA=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Nr.current)Sr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Sr=!1,m3(e,t,r);Sr=!!(e.flags&131072)}else Sr=!1,ot&&t.flags&1048576&&eA(t,Vh,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ch(e,t),e=t.pendingProps;var s=wl(t,lr.current);Xa(t,r),s=Av(null,t,n,e,s,r);var i=Nv();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Cr(n)?(i=!0,Fh(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,bv(t),s.updater=Bf,t.stateNode=s,s._reactInternals=t,Qg(t,n,e,r),t=Yg(null,t,n,!0,i,r)):(t.tag=0,ot&&i&&fv(t),hr(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ch(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=E3(n),e=An(n,e),s){case 0:t=Xg(null,t,n,e,r);break e;case 1:t=Cw(null,t,n,e,r);break e;case 11:t=Aw(null,t,n,e,r);break e;case 14:t=Nw(null,t,n,An(n.type,e),r);break e}throw Error(W(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:An(n,s),Xg(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:An(n,s),Cw(e,t,n,s,r);case 3:e:{if(OA(t),e===null)throw Error(W(387));n=t.pendingProps,i=t.memoizedState,s=i.element,oA(e,t),Hh(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Al(Error(W(423)),t),t=_w(e,t,n,r,s);break e}else if(n!==s){s=Al(Error(W(424)),t),t=_w(e,t,n,r,s);break e}else for(Fr=Oi(t.stateNode.containerInfo.firstChild),$r=t,ot=!0,Tn=null,r=sA(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(jl(),n===s){t=$s(e,t,r);break e}hr(e,t,n,r)}t=t.child}return t;case 5:return aA(t),e===null&&qg(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,Vg(n,s)?a=null:i!==null&&Vg(n,i)&&(t.flags|=32),RA(e,t),hr(e,t,a,r),t.child;case 6:return e===null&&qg(t),null;case 13:return IA(e,t,r);case 4:return wv(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=kl(t,null,n,r):hr(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:An(n,s),Aw(e,t,n,s,r);case 7:return hr(e,t,t.pendingProps,r),t.child;case 8:return hr(e,t,t.pendingProps.children,r),t.child;case 12:return hr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,a=s.value,tt(Uh,n._currentValue),n._currentValue=a,i!==null)if(zn(i.value,a)){if(i.children===s.children&&!Nr.current){t=$s(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);
vendor: 4,300 bytes, line 40
40i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=Os(-1,r&-r),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),Kg(i.return,r,t),l.lanes|=r;break}c=c.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(W(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Kg(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}hr(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Xa(t,r),s=un(s),n=n(s),t.flags|=1,hr(e,t,n,r),t.child;case 14:return n=t.type,s=An(n,t.pendingProps),s=An(n.type,s),Nw(e,t,n,s,r);case 15:return PA(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:An(n,s),ch(e,t),t.tag=1,Cr(n)?(e=!0,Fh(t)):e=!1,Xa(t,r),CA(t,n,s),Qg(t,n,s,r),Yg(null,t,n,!0,e,r);case 19:return DA(e,t,r);case 22:return TA(e,t,r)}throw Error(W(156,t.tag))};function XA(e,t){return SS(e,t)}function _3(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 sn(e,t,r,n){return new _3(e,t,r,n)}function Lv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function E3(e){if(typeof e=="function")return Lv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tv)return 11;if(e===rv)return 14}return 2}function Mi(e,t){var r=e.alternate;return r===null?(r=sn(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 hh(e,t,r,n,s,i){var a=2;if(n=e,typeof e=="function")Lv(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ea:return Do(r.children,s,i,t);case ev:a=8,s|=8;break;case vg:return e=sn(12,r,t,s|2),e.elementType=vg,e.lanes=i,e;case bg:return e=sn(13,r,t,s),e.elementType=bg,e.lanes=i,e;case wg:return e=sn(19,r,t,s),e.elementType=wg,e.lanes=i,e;case aS:return qf(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case iS:a=10;break e;case oS:a=9;break e;case tv:a=11;break e;case rv:a=14;break e;case ai:a=16,n=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=sn(a,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function Do(e,t,r,n){return e=sn(7,e,n,t),e.lanes=r,e}function qf(e,t,r,n){return e=sn(22,e,n,t),e.elementType=aS,e.lanes=r,e.stateNode={isHidden:!1},e}function cp(e,t,r){return e=sn(6,e,null,t),e.lanes=r,e}function up(e,t,r){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function P3(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hm(0),this.expirationTimes=Hm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hm(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Mv(e,t,r,n,s,i,a,l,c){return e=new P3(e,t,r,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=sn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},bv(i),e}function T3(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 4,591 bytes, line 40
40return{$$typeof:_a,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function YA(e){if(!e)return Bi;e=e._reactInternals;e:{if(ra(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Cr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var r=e.type;if(Cr(r))return YS(e,r,t)}return t}function JA(e,t,r,n,s,i,a,l,c){return e=Mv(r,n,!0,e,s,i,a,l,c),e.context=YA(null),r=e.current,n=gr(),s=Li(r),i=Os(n,s),i.callback=t??null,Ii(r,i,s),e.current.lanes=s,Gu(e,s,n),_r(e,n),e}function Kf(e,t,r,n){var s=t.current,i=gr(),a=Li(s);return r=YA(r),t.context===null?t.context=r:t.pendingContext=r,t=Os(i,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Ii(s,t,a),e!==null&&(Ln(e,s,a,i),oh(e,s,a)),a}function Yh(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 zw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function zv(e,t){zw(e,t),(e=e.alternate)&&zw(e,t)}function R3(){return null}var eN=typeof reportError=="function"?reportError:function(e){console.error(e)};function Fv(e){this._internalRoot=e}Gf.prototype.render=Fv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Kf(e,t,null,null)};Gf.prototype.unmount=Fv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Uo(function(){Kf(null,e,null,null)}),t[zs]=null}};function Gf(e){this._internalRoot=e}Gf.prototype.unstable_scheduleHydration=function(e){if(e){var t=TS();e={blockedOn:null,target:e,priority:t};for(var r=0;r<di.length&&t!==0&&t<di[r].priority;r++);di.splice(r,0,e),r===0&&OS(e)}};function $v(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Qf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Fw(){}function O3(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=Yh(a);i.call(u)}}var a=JA(t,n,e,0,null,!1,!1,"",Fw);return e._reactRootContainer=a,e[zs]=a.current,lu(e.nodeType===8?e.parentNode:e),Uo(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var l=n;n=function(){var u=Yh(c);l.call(u)}}var c=Mv(e,0,!1,null,null,!1,!1,"",Fw);return e._reactRootContainer=c,e[zs]=c.current,lu(e.nodeType===8?e.parentNode:e),Uo(function(){Kf(t,c,r,n)}),c}function Zf(e,t,r,n,s){var i=r._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var l=s;s=function(){var c=Yh(a);l.call(c)}}Kf(t,a,e,s)}else a=O3(r,t,e,s,n);return Yh(a)}ES=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Nc(t.pendingLanes);r!==0&&(iv(t,r|1),_r(t,St()),!(Ve&6)&&(Nl=St()+500,Ji()))}break;case 13:Uo(function(){var n=Fs(e,1);if(n!==null){var s=gr();Ln(n,e,1,s)}}),zv(e,1)}};ov=function(e){if(e.tag===13){var t=Fs(e,134217728);if(t!==null){var r=gr();Ln(t,e,134217728,r)}zv(e,134217728)}};PS=function(e){if(e.tag===13){var t=Li(e),r=Fs(e,t);if(r!==null){var n=gr();Ln(r,e,t,n)}zv(e,t)}};TS=function(){return Qe};RS=function(e,t){var r=Qe;try{return Qe=e,t()}finally{Qe=r}};Tg=function(e,t,r){switch(t){case"input":if(Sg(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=$f(n);if(!s)throw Error(W(90));cS(n),Sg(n,s)}}}break;case"textarea":dS(e,r);break;case"select":t=r.value,t!=null&&Ka(e,!!r.multiple,t,!1)}};yS=Ov;vS=Uo;var I3={usingClientEntryPoint:!1,Events:[Zu,Oa,$f,gS,xS,Ov]},dc={findFiberByHostInstance:xo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},D3={bundleType:dc.bundleType,version:dc.version,rendererPackageName:dc.rendererPackageName,rendererConfig:dc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Gs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=jS(e),e===null?null:e.stateNode},findFiberByHostInstance:dc.findFiberByHostInstance||R3,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pd.isDisabled&&Pd.supportsFiber)try{Lf=Pd.inject(D3),ss=Pd}catch{}}Hr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I3;Hr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$v(t))throw Error(W(200));return T3(e,t,null,r)};Hr.createRoot=function(e,t){if(!$v(e))throw Error(W(299));var r=!1,n="",s=eN;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Mv(e,1,!1,null,null,r,!1,n,s),e[zs]=t.current,lu(e.nodeType===8?e.parentNode:e),new Fv(t)};Hr.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(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=jS(t),e=e===null?null:e.stateNode,e};Hr.flushSync=function(e){return Uo(e)};Hr.hydrate=function(e,t,r){if(!Qf(t))throw Error(W(200));return Zf(null,e,t,!0,r)};Hr.hydrateRoot=function(e,t,r){if(!$v(e))throw Error(W(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",a=eN;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=JA(t,null,e,1,r??null,s,!1,i,a),e[zs]=t.current,lu(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Gf(t)};Hr.render=function(e,t,r){if(!Qf(t))throw Error(W(200));return Zf(null,e,t,!1,r)};Hr.unmountComponentAtNode=function(e){if(!Qf(e))throw Error(W(40));return e._reactRootContainer?(Uo(function(){Zf(null,null,e,!1,function(){e._reactRootContainer=null,e[zs]=null})}),!0):!1};Hr.unstable_batchedUpdates=Ov;Hr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Qf(r))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return Zf(e,t,r,!1,n)};Hr.version="18.3.1-next-f1338f8080-20240426";function tN(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tN)}catch(e){console.error(e)}}tN(),tS.exports=Hr;var na=tS.exports;const rN=qu(na);var nN,$w=na;nN=$w.createRoot,$w.hydrateRoot;var L3=typeof Element<"u",M3=typeof Map=="function",z3=typeof Set=="function",F3=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function fh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!fh(e[n],t[n]))return!1;return!0}var i;if(M3&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!fh(n.value[1],t.get(n.value[0])))return!1;return!0}if(z3&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(F3&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;if(L3&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((s[n]==="_owner"||s[n]==="__v"||s[n]==="__o")&&e.$$typeof)&&!fh(e[s[n]],t[s[n]]))return!1;return!0}return e!==e&&t!==t}var $3=function(t,r){try{return fh(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const V3=qu($3);var U3=function(e,t,r,n,s,i,a,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,s,i,a,l],d=0;c=new Error(t.replace(/%s/g,function(){return u[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},B3=U3;const Vw=qu(B3);var H3=function(t,r,n,s){var i=n?n.call(s,t,r):void 0;if(i!==void 0)return!!i;if(t===r)return!0;
40if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var a=Object.keys(t),l=Object.keys(r);if(a.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),u=0;u<a.length;u++){var d=a[u];if(!c(d))return!1;var h=t[d],f=r[d];if(i=n?n.call(s,h,f,d):void 0,i===!1||i===void 0&&h!==f)return!1}return!0};const W3=qu(H3);var sN=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(sN||{}),dp={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Uw=Object.values(sN),Vv={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},q3=Object.entries(Vv).reduce((e,[t,r])=>(e[r]=t,e),{}),In="data-rh",Ja={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},el=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},K3=e=>{let t=el(e,"title");const r=el(e,Ja.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=el(e,Ja.DEFAULT_TITLE);return t||n||void 0},G3=e=>el(e,Ja.ON_CHANGE_CLIENT_STATE)||(()=>{}),hp=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),Q3=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const s=Object.keys(n);for(let i=0;i<s.length;i+=1){const l=s[i].toLowerCase();if(e.indexOf(l)!==-1&&n[l])return r.concat(n)}}return r},[]),Z3=e=>console&&typeof console.warn=="function"&&console.warn(e),hc=(e,t,r)=>{const n={};return r.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&Z3(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,i)=>{const a={};i.filter(c=>{let u;const d=Object.keys(c);for(let f=0;f<d.length;f+=1){const m=d[f],v=m.toLowerCase();t.indexOf(v)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(v==="rel"&&c[v].toLowerCase()==="stylesheet")&&(u=v),t.indexOf(m)!==-1&&(m==="innerHTML"||m==="cssText"||m==="itemprop")&&(u=m)}if(!u||!c[u])return!1;const h=c[u].toLowerCase();return n[u]||(n[u]={}),a[u]||(a[u]={}),n[u][h]?!1:(a[u][h]=!0,!0)}).reverse().forEach(c=>s.push(c));const l=Object.keys(a);for(let c=0;c<l.length;c+=1){const u=l[c],d={...n[u],...a[u]};n[u]=d}return s},[]).reverse()},X3=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},Y3=e=>({baseTag:Q3(["href"],e),bodyAttributes:hp("bodyAttributes",e),defer:el(e,Ja.DEFER),encode:el(e,Ja.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:hp("htmlAttributes",e),linkTags:hc("link",["rel","href"],e),metaTags:hc("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:hc("noscript",["innerHTML"],e),onChangeClientState:G3(e),scriptTags:hc("script",["src","innerHTML"],e),styleTags:hc("style",["cssText"],e),title:K3(e),titleAttributes:hp("titleAttributes",e),prioritizeSeoTags:X3(e,Ja.PRIORITIZE_SEO_TAGS)}),iN=e=>Array.isArray(e)?e.join(""):e,J3=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},fp=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(J3(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},Bw=(e,t)=>({...e,[t]:void 0}),eI=["noscript","script","style"],ux=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),oN=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),tI=(e,t,r,n)=>{const s=oN(r),i=iN(t);return s?`<${e} ${In}="true" ${s}>${ux(i,n)}</${e}>`:`<${e} ${In}="true">${ux(i,n)}</${e}>`},rI=(e,t,r=!0)=>t.reduce((n,s)=>{const i=s,a=Object.keys(i).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,d)=>{const h=typeof i[d]>"u"?d:`${d}="${ux(i[d],r)}"`;return u?`${u} ${h}`:h},""),l=i.innerHTML||i.cssText||"",c=eI.indexOf(e)===-1;return`${n}<${e} ${In}="true" ${a}${c?"/>":`>${l}</${e}>`}`},""),aN=(e,t={})=>Object.keys(e).reduce((r,n)=>{const s=Vv[n];return r[s||n]=e[n],r},t),nI=(e,t,r)=>{const n={key:t,[In]:!0},s=aN(r,n);return[H.createElement("title",s,t)]},mh=(e,t)=>t.map((r,n)=>{const s={key:n,[In]:!0};return Object.keys(r).forEach(i=>
40{const l=Vv[i]||i;if(l==="innerHTML"||l==="cssText"){const c=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:c}}else s[l]=r[i]}),H.createElement(e,s)}),Yr=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>nI(e,t.title,t.titleAttributes),toString:()=>tI(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>aN(t),toString:()=>oN(t)};default:return{toComponent:()=>mh(e,t),toString:()=>rI(e,t,r)}}},sI=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const s=fp(e,dp.meta),i=fp(t,dp.link),a=fp(r,dp.script);return{priorityMethods:{toComponent:()=>[...mh("meta",s.priority),...mh("link",i.priority),...mh("script",a.priority)],toString:()=>`${Yr("meta",s.priority,n)} ${Yr("link",i.priority,n)} ${Yr("script",a.priority,n)}`},metaTags:s.default,linkTags:i.default,scriptTags:a.default}},iI=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:s,noscriptTags:i,styleTags:a,title:l="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:d,metaTags:h,scriptTags:f}=e,m={toComponent:()=>{},toString:()=>""};return u&&({priorityMethods:m,linkTags:d,metaTags:h,scriptTags:f}=sI(e)),{priority:m,base:Yr("base",t,n),bodyAttributes:Yr("bodyAttributes",r,n),htmlAttributes:Yr("htmlAttributes",s,n),link:Yr("link",d,n),meta:Yr("meta",h,n),noscript:Yr("noscript",i,n),script:Yr("script",f,n),style:Yr("style",a,n),title:Yr("title",{title:l,titleAttributes:c},n)}},dx=iI,Td=[],lN=!!(typeof window<"u"&&window.document&&window.document.createElement),hx=class{constructor(e,t){bs(this,"instances",[]);bs(this,"canUseDOM",lN);bs(this,"context");bs(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Td:this.instances,add:e=>{(this.canUseDOM?Td:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Td:this.instances).indexOf(e);(this.canUseDOM?Td:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=dx({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},oI={},cN=H.createContext(oI),So,uN=(So=class extends p.Component{constructor(r){super(r);bs(this,"helmetData");this.helmetData=new hx(this.props.context||{},So.canUseDOM)}render(){return H.createElement(cN.Provider,{value:this.helmetData.value},this.props.children)}},bs(So,"canUseDOM",lN),So),ca=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${In}]`),s=[].slice.call(n),i=[];let a;return t&&t.length&&t.forEach(l=>{const c=document.createElement(e);for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u))if(u==="innerHTML")c.innerHTML=l.innerHTML;else if(u==="cssText")c.styleSheet?c.styleSheet.cssText=l.cssText:c.appendChild(document.createTextNode(l.cssText));else{const d=u,h=typeof l[d]>"u"?"":l[d];c.setAttribute(u,h)}c.setAttribute(In,"true"),s.some((u,d)=>(a=d,c.isEqualNode(u)))?s.splice(a,1):i.push(c)}),s.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)}),i.forEach(l=>r.appendChild(l)),{oldTags:s,newTags:i}},fx=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(In),s=n?n.split(","):[],i=[...s],a=Object.keys(t);for(const l of a){const c=t[l]||"";r.getAttribute(l)!==c&&r.setAttribute(l,c),s.indexOf(l)===-1&&s.push(l);const u=i.indexOf(l);u!==-1&&i.splice(u,1)}for(let l=i.length-1;l>=0;l-=1)r.removeAttribute(i[l]);s.length===i.length?r.removeAttribute(In):r.getAttribute(In)!==a.join(",")&&r.setAttribute(In,a.join(","))},aI=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=iN(e)),fx("title",t)},Hw=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:s,linkTags:i,metaTags:a,noscriptTags:l,onChangeClientState:c,scriptTags:u,styleTags:d,title:h,titleAttributes:f}=e;fx("body",n),fx("html",s),aI(h,f);const m={baseTag:ca("base",r),linkTags:ca("link",i),metaTags:ca("meta",a),noscriptTags:ca("noscript",l),scriptTags:ca("script",u),styleTags:ca("style",d)},v={},g={};Object.keys(m).forEach(w=>{const{newTags:b,oldTags:y}=m[w];
40b.length&&(v[w]=b),y.length&&(g[w]=m[w].oldTags)}),t&&t(),c(e,v,g)},fc=null,lI=e=>{fc&&cancelAnimationFrame(fc),e.defer?fc=requestAnimationFrame(()=>{Hw(e,()=>{fc=null})}):(Hw(e),fc=null)},cI=lI,Ww=class extends p.Component{constructor(){super(...arguments);bs(this,"rendered",!1)}shouldComponentUpdate(t){return!W3(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const s=Y3(t.get().map(i=>{const a={...i.props};return delete a.context,a}));uN.canUseDOM?cI(s):dx&&(n=dx(s)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},xg,Yu=(xg=class extends p.Component{shouldComponentUpdate(e){return!V3(Bw(this.props,"helmetData"),Bw(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,t){return Vw(Uw.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Uw.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Vw(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return H.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:s,...i}=n.props,a=Object.keys(i).reduce((c,u)=>(c[q3[u]||u]=i[u],c),{});let{type:l}=n;
vendor: 4,471 bytes, line 40
40switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(n,s),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,a,s);break;default:t=this.mapObjectTypeChildren(n,t,a,s);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof hx)){const s=n;n=new hx(s.context,!0),delete r.helmetData}return n?H.createElement(Ww,{...r,context:n.value}):H.createElement(cN.Consumer,null,s=>H.createElement(Ww,{...r,context:s}))}},bs(xg,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),xg);const be=e=>typeof e=="string",mc=()=>{let e,t;const r=new Promise((n,s)=>{e=n,t=s});return r.resolve=e,r.reject=t,r},qw=e=>e==null?"":""+e,uI=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},dI=/###/g,Kw=e=>e&&e.indexOf("###")>-1?e.replace(dI,"."):e,Gw=e=>!e||be(e),Uc=(e,t,r)=>{const n=be(t)?t.split("."):t;let s=0;for(;s<n.length-1;){if(Gw(e))return{};const i=Kw(n[s]);!e[i]&&r&&(e[i]=new r),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++s}return Gw(e)?{}:{obj:e,k:Kw(n[s])}},Qw=(e,t,r)=>{const{obj:n,k:s}=Uc(e,t,Object);if(n!==void 0||t.length===1){n[s]=r;return}let i=t[t.length-1],a=t.slice(0,t.length-1),l=Uc(e,a,Object);for(;l.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),l=Uc(e,a,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${i}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${i}`]=r},hI=(e,t,r,n)=>{const{obj:s,k:i}=Uc(e,t,Object);s[i]=s[i]||[],s[i].push(r)},Jh=(e,t)=>{const{obj:r,k:n}=Uc(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},fI=(e,t,r)=>{const n=Jh(e,r);return n!==void 0?n:Jh(t,r)},dN=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?be(e[n])||e[n]instanceof String||be(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):dN(e[n],t[n],r):e[n]=t[n]);return e},ua=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var mI={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const pI=e=>be(e)?e.replace(/[&<>"'\/]/g,t=>mI[t]):e;class gI{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const xI=[" ",",","?","!",";"],yI=new gI(20),vI=(e,t,r)=>{t=t||"",r=r||"";const n=xI.filter(a=>t.indexOf(a)<0&&r.indexOf(a)<0);if(n.length===0)return!0;const s=yI.getRegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!s.test(e);if(!i){const a=e.indexOf(r);a>0&&!s.test(e.substring(0,a))&&(i=!0)}return i},mx=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(r);let s=e;for(let i=0;i<n.length;){if(!s||typeof s!="object")return;let a,l="";for(let c=i;c<n.length;++c)if(c!==i&&(l+=r),l+=n[c],a=s[l],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<n.length-1)continue;i+=c-i+1;break}s=a}return s},xu=e=>e==null?void 0:e.replace("_","-"),bI={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var r,n;(n=(r=console==null?void 0:console[e])==null?void 0:r.apply)==null||n.call(r,console,t)}};class ef{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||bI,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,s){return s&&!this.debug?null:(be(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new ef(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ef(this.logger,t)}}var ts=new ef;class Xf{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const s=this.observers[n].get(r)||0;this.observers[n].set(r,s+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEac
vendor: 3,037 bytes, line 40
40h(([s,i])=>{for(let a=0;a<i;a++)s(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let a=0;a<i;a++)s.apply(s,[t,...r])})}}class Zw extends Xf{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n,s={}){var u,d;const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,r],n&&(Array.isArray(n)?l.push(...n):be(n)&&i?l.push(...n.split(i)):l.push(n)));const c=Jh(this.data,l);return!c&&!r&&!n&&t.indexOf(".")>-1&&(t=l[0],r=l[1],n=l.slice(2).join(".")),c||!a||!be(n)?c:mx((d=(u=this.data)==null?void 0:u[t])==null?void 0:d[r],n,i)}addResource(t,r,n,s,i={silent:!1}){const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let l=[t,r];n&&(l=l.concat(a?n.split(a):n)),t.indexOf(".")>-1&&(l=t.split("."),s=r,r=l[1]),this.addNamespaces(r),Qw(this.data,l,s),i.silent||this.emit("added",t,r,n,s)}addResources(t,r,n,s={silent:!1}){for(const i in n)(be(n[i])||Array.isArray(n[i]))&&this.addResource(t,r,i,n[i],{silent:!0});s.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,s,i,a={silent:!1,skipCopy:!1}){let l=[t,r];t.indexOf(".")>-1&&(l=t.split("."),s=n,n=r,r=l[1]),this.addNamespaces(r);let c=Jh(this.data,l)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?dN(c,n,i):c={...c,...n},Qw(this.data,l,c),a.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(s=>r[s]&&Object.keys(r[s]).length>0)}toJSON(){return this.data}}var hN={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,s){return e.forEach(i=>{var a;t=((a=this.processors[i])==null?void 0:a.process(t,r,n,s))??t}),t}};const fN=Symbol("i18next/PATH_KEY");function wI(){const e=[],t=Object.create(null);let r;return t.get=(n,s)=>{var i;return(i=r==null?void 0:r.revoke)==null||i.call(r),s===fN?e:(e.push(s),r=Proxy.revocable(n,t),r.proxy)},Proxy.revocable(Object.create(null),t).proxy}function px(e,t){const{[fN]:r}=e(wI());return r.join((t==null?void 0:t.keySeparator)??".")}const Xw={},mp=e=>!be(e)&&typeof e!="boolean"&&typeof e!="number";class tf extends Xf{constructor(t,r={}){super(),uI(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
40i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ts.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const n={...r};if(t==null)return!1;const s=this.resolve(t,n);if((s==null?void 0:s.res)===void 0)return!1;const i=mp(s.res);return!(n.returnObjects===!1&&i)}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let i=r.ns||this.options.defaultNS||[];const a=n&&t.indexOf(n)>-1,l=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!vI(t,n,s);if(a&&!l){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:be(i)?[i]:i};const u=t.split(n);(n!==s||n===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),t=u.join(s)}return{key:t,namespaces:be(i)?[i]:i}}translate(t,r,n){let s=typeof r=="object"?{...r}:r;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),t==null)return"";typeof t=="function"&&(t=px(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]);const i=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:l,namespaces:c}=this.extractFromKey(t[t.length-1],s),u=c[c.length-1];let d=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const h=s.lng||this.language,f=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((h==null?void 0:h.toLowerCase())==="cimode")return f?i?{res:`${u}${d}${l}`,usedKey:l,exactUsedKey:l,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${d}${l}`:i?{res:l,usedKey:l,exactUsedKey:l,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:l;const m=this.resolve(t,s);let v=m==null?void 0:m.res;const g=(m==null?void 0:m.usedKey)||l,w=(m==null?void 0:m.exactUsedKey)||l,b=["[object Number]","[object Function]","[object RegExp]"],y=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,j=s.count!==void 0&&!be(s.count),k=tf.hasDefaultValue(s),S=j?this.pluralResolver.getSuffix(h,s.count,s):"",N=s.ordinal&&j?this.pluralResolver.getSuffix(h,s.count,{ordinal:!1}):"",A=j&&!s.ordinal&&s.count===0,E=A&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${S}`]||s[`defaultValue${N}`]||s.defaultValue;let _=v;x&&!v&&k&&(_=E);const F=mp(_),C=Object.prototype.toString.apply(_);if(x&&_&&F&&b.indexOf(C)<0&&!(be(y)&&Array.isArray(_))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,_,{...s,ns:c}):`key '${l} (${this.language})' returned an object instead of string.`;return i?(m.res=L,m.usedParams=this.getUsedParamsDetails(s),m):L}if(a){const L=Array.isArray(_),I=L?[]:{},O=L?w:g;for(const U in _)if(Object.prototype.hasOwnProperty.call(_,U)){const M=`${O}${a}${U}`;k&&!v?I[U]=this.translate(M,{...s,defaultValue:mp(E)?E[U]:void 0,joinArrays:!1,ns:c}):I[U]=this.translate(M,{...s,joinArrays:!1,ns:c}),I[U]===M&&(I[U]=_[U])}v=I}}else if(x&&be(y)&&Array.isArray(v))v=v.join(y),v&&(v=this.extendTranslation(v,t,s,n));else{let L=!1,I=!1;!this.isValidLookup(v)&&k&&(L=!0,v=E),this.isValidLookup(v)||(I=!0,v=l);const U=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&I?void 0:v,M=k&&E!==v&&this.options.updateMissing;if(I||L||M){if(this.logger.log(M?"updateKey":"missingKey",h,u,l,M?E:v),a){const re=this.resolve(l,{...s,keySeparator:!1});re&&re.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let P=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let re=0;re<z.length;re++)P.push(z[re]);else this.options.saveMissingTo==="all"?P=this.languageUtils.toResolveHierarchy(s.lng||this.language):P.push(s.lng||this.language);const B=(re,Q,fe)=>{var Me;const pe=k&&fe!==v?fe:U;this.options.missingKeyHandler?this.options.missingKeyHandler(re,u,Q,pe,M,s):(Me=this.backendConnector)!=null&&Me.saveMissing&&this.backendConnector.saveMissing(re,u,Q,pe,M,s),this.emit
vendor: 26,841 bytes, line 40
40("missingKey",re,u,Q,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?P.forEach(re=>{const Q=this.pluralResolver.getSuffixes(re,s);A&&s[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(fe=>{B([re],l+fe,s[`defaultValue${fe}`]||E)})}):B(P,l,E))}v=this.extendTranslation(v,t,s,m,n),I&&v===l&&this.options.appendNamespaceToMissingKey&&(v=`${u}${d}${l}`),(I||L)&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${l}`:l,L?v:void 0,s))}return i?(m.res=v,m.usedParams=this.getUsedParamsDetails(s),m):v}extendTranslation(t,r,n,s,i){var c,u;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const d=be(t)&&(((u=n==null?void 0:n.interpolation)==null?void 0:u.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(d){const m=t.match(this.interpolator.nestingRegexp);h=m&&m.length}let f=n.replace&&!be(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,n.lng||this.language||s.usedLng,n),d){const m=t.match(this.interpolator.nestingRegexp),v=m&&m.length;h<v&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,(...m)=>(i==null?void 0:i[0])===m[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${r[0]}`),null):this.translate(...m,r),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,l=be(a)?[a]:a;return t!=null&&(l!=null&&l.length)&&n.applyPostProcessor!==!1&&(t=hN.handle(l,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t,r={}){let n,s,i,a,l;return be(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(c,r),d=u.key;s=d;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const f=r.count!==void 0&&!be(r.count),m=f&&!r.ordinal&&r.count===0,v=r.context!==void 0&&(be(r.context)||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(w=>{var b,y;this.isValidLookup(n)||(l=w,!Xw[`${g[0]}-${w}`]&&((b=this.utils)!=null&&b.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(l))&&(Xw[`${g[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${g.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(x=>{var S;if(this.isValidLookup(n))return;a=x;const j=[d];if((S=this.i18nFormat)!=null&&S.addLookupKeys)this.i18nFormat.addLookupKeys(j,d,x,w,r);else{let N;f&&(N=this.pluralResolver.getSuffix(x,r.count,r));const A=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(r.ordinal&&N.indexOf(E)===0&&j.push(d+N.replace(E,this.options.pluralSeparator)),j.push(d+N),m&&j.push(d+A)),v){const _=`${d}${this.options.contextSeparator||"_"}${r.context}`;j.push(_),f&&(r.ordinal&&N.indexOf(E)===0&&j.push(_+N.replace(E,this.options.pluralSeparator)),j.push(_+N),m&&j.push(_+A))}}let k;for(;k=j.pop();)this.isValidLookup(n)||(i=k,n=this.getResource(x,w,k,r))}))})}),{res:n,usedKey:s,exactUsedKey:i,usedLng:a,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n,s={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,r,n,s):this.resourceStore.getResource(t,r,n,s)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!be(t.replace);let s=n?t.replace:t;if(n&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const i of r)delete s[i]}return s}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}class Yw{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ts.create("languageUtils")}getScriptPartFromCode(t){if(t=xu(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=xu(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(be(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(r=s)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const s=this.getScriptPartFromCode(n);if(this.isSupportedCode(s))return r=s;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),be(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),s=[],i=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return be(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):be(t)&&i(this.formatLanguageCode(t)),n.forEach(a=>{s.indexOf(a)<0&&i(this.formatLanguageCode(a))}),s}}const Jw={zero:0,one:1,two:2,few:3,many:4,other:5},e1={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class jI{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=ts.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const n=xu(t==="dev"?"en":t),s=r.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),e1;if(!t.match(/-|_/))return e1;const c=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(c,r)}return this.pluralRulesCache[i]=a,a}needsPlural(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,r,n={}){return this.getSuffixes(t,n).map(s=>`${r}${s}`)}getSuffixes(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((s,i)=>Jw[s]-Jw[i]).map(s=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(t,r,n={}){const s=this.getRule(t,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,n))}}const t1=(e,t,r,n=".",s=!0)=>{let i=fI(e,t,r);return!i&&s&&be(r)&&(i=mx(e,r,n),i===void 0&&(i=mx(t,r,n))),i},pp=e=>e.replace(/\$/g,"$$$$");class r1{constructor(t={}){var r;this.logger=ts.create("interpolator"),this.options=t,this.format=((r=t==null?void 0:t.interpolation)==null?void 0:r.format)||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:s,prefix:i,prefixEscaped:a,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:f,nestingPrefixEscaped:m,nestingSuffix:v,nestingSuffixEscaped:g,nestingOptionsSeparator:w,maxReplaces:b,alwaysFormat:y}=t.interpolation;this.escape=r!==void 0?r:pI,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?ua(i):a||"{{",this.suffix=l?ua(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=f?ua(f):m||ua("$t("),this.nestingSuffix=v?ua(v):g||ua(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=b||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>(r==null?void 0:r.source)===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,n,s){var m;let i,a,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=v=>{if(v.indexOf(this.formatSeparator)<0){const y=t1(r,c,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,n,{...s,...r,interpolationkey:v}):y}const g=v.split(this.formatSeparator),w=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(t1(r,c,w,this.options.keySeparator,this.options.ignoreJSONStructure),b,n,{...s,...r,interpolationkey:w})};this.resetRegExp();const d=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=((m=s==null?void 0:s.interpolation)==null?void 0:m.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>pp(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?pp(this.escape(v)):pp(v)}].forEach(v=>{for(l=0;i=v.regex.exec(t);){const g=i[1].trim();if(a=u(g),a===void 0)if(typeof d=="function"){const b=d(t,i,s);a=be(b)?b:""}else if(s&&Object.prototype.hasOwnProperty.call(s,g))a="";else if(h){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),a="";else!be(a)&&!this.useRawValueToEscape&&(a=qw(a));const w=v.safeValue(a);if(t=t.replace(i[0],w),h?(v.regex.lastIndex+=a.length,v.regex.lastIndex-=i[0].length):v.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,r,n={}){let s,i,a;const l=(c,u)=>{const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const h=c.split(new RegExp(`${d}[ ]*{`));let f=`{${h[1]}`;c=h[0],f=this.interpolate(f,a);const m=f.match(/'/g),v=f.match(/"/g);(((m==null?void 0:m.length)??0)%2===0&&!v||v.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a={...u,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${d}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;s=this.nestingRegexp.exec(t);){let c=[];a={...n},a=a.replace&&!be(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const u=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(u!==-1&&(c=s[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),s[1]=s[1].slice(0,u)),i=r(l.call(this,s[1].trim(),a),a),i&&s[0]===t&&!be(i))return i;be(i)||(i=qw(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),i=""),c.length&&(i=c.reduce((d,h)=>this.format(d,h,n.lng,{...n,interpolationkey:s[1].trim()}),i.trim())),t=t.replace(s[0],i),this.regexp.lastIndex=0}return t}}const kI=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);t==="currency"&&s.indexOf(":")<0?r.currency||(r.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?r.range||(r.range=s.trim()):s.split(";").forEach(a=>{if(a){const[l,...c]=a.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();r[d]||(r[d]=u),u==="false"&&(r[d]=!1),u==="true"&&(r[d]=!0),isNaN(u)||(r[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:r}},n1=e=>{const t={};return(r,n,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const a=n+JSON.stringify(i);let l=t[a];return l||(l=e(xu(n),s),t[a]=l),l(r)}},SI=e=>(t,r,n)=>e(xu(r),n)(t);class AI{constructor(t={}){this.logger=ts.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?n1:SI;this.formats={number:n((s,i)=>{const a=new Intl.NumberFormat(s,{...i});return l=>a.format(l)}),currency:n((s,i)=>{const a=new Intl.NumberFormat(s,{...i,style:"currency"});return l=>a.format(l)}),datetime:n((s,i)=>{const a=new Intl.DateTimeFormat(s,{...i});return l=>a.format(l)}),relativetime:n((s,i)=>{const a=new Intl.RelativeTimeFormat(s,{...i});return l=>a.format(l,i.range||"day")}),list:n((s,i)=>{const a=new Intl.ListFormat(s,{...i});return l=>a.format(l)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=n1(r)}format(t,r,n,s={}){const i=r.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(l=>l.indexOf(")")>-1)){const l=i.findIndex(c=>c.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,l)].join(this.formatSeparator)}return i.reduce((l,c)=>{var h;const{formatName:u,formatOptions:d}=kI(c);if(this.formats[u]){let f=l;try{const m=((h=s==null?void 0:s.formatParams)==null?void 0:h[s.interpolationkey])||{},v=m.locale||m.lng||s.locale||s.lng||n;f=this.formats[u](l,v,{...d,...s,...m})}catch(m){this.logger.warn(m)}return f}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const NI=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class CI extends Xf{constructor(t,r,n,s={}){var i,a;super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=ts.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(a=(i=this.backend)==null?void 0:i.init)==null||a.call(i,n,s.backend,s)}queueLoad(t,r,n,s){const i={},a={},l={},c={};return t.forEach(u=>{let d=!0;r.forEach(h=>{const f=`${u}|${h}`;!n.reload&&this.store.hasResourceBundle(u,h)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,d=!1,a[f]===void 0&&(a[f]=!0),i[f]===void 0&&(i[f]=!0),c[h]===void 0&&(c[h]=!0)))}),d||(l[u]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(t,r,n){const s=t.split("|"),i=s[0],a=s[1];r&&this.emit("failedLoading",i,a,r),!r&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const l={};this.queue.forEach(c=>{hI(c.loaded,[i],a),NI(c,t),r&&c.errors.push(r),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const d=c.loaded[u];d.length&&d.forEach(h=>{l[u][h]===void 0&&(l[u][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(t,r,n,s=0,i=this.retryTimeout,a){if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:s,wait:i,callback:a});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,s+1,i*2,a)},i);return}a(u,d)},c=this.backend[n].bind(this.backend);if(c.length===2){try{const u=c(t,r);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return c(t,r,l)}prepareLoading(t,r,n={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();be(t)&&(t=this.languageUtils.toResolveHierarchy(t)),be(r)&&(r=[r]);const i=this.queueLoad(t,r,n,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t,r=""){const n=t.split("|"),s=n[0],i=n[1];this.read(s,i,"read",void 0,void 0,(a,l)=>{a&&this.logger.warn(`${r}loading namespace ${i} for language ${s} failed`,a),!a&&l&&this.logger.log(`${r}loaded namespace ${i} for language ${s}`,l),this.loaded(t,a,l)})}saveMissing(t,r,n,s,i,a={},l=()=>{}){var c,u,d,h,f;if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((h=(d=this.services)==null?void 0:d.utils)!=null&&h.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((f=this.backend)!=null&&f.create){const m={...a,isUpdate:i},v=this.backend.create.bind(this.backend);if(v.length<6)try{let g;v.length===5?g=v(t,r,n,s,m):g=v(t,r,n,s),g&&typeof g.then=="function"?g.then(w=>l(null,w)).catch(l):l(null,g)}catch(g){l(g)}else v(t,r,n,s,l,m)}!t||!t[0]||this.store.addResource(t[0],r,n,s)}}}const s1=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),be(e[1])&&(t.defaultValue=e[1]),be(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),i1=e=>{var t,r;return be(e.ns)&&(e.ns=[e.ns]),be(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),be(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((r=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:r.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Rd=()=>{},_I=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class Bc extends Xf{constructor(t={},r){if(super(),this.options=i1(t),this.services={},this.logger=ts,this.modules={external:[]},_I(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(be(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const n=s1();this.options={...n,...this.options,...i1(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?ts.init(s(this.modules.logger),this.options):ts.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=AI;const d=new Yw(this.options);this.store=new Zw(this.options.resources,this.options);const h=this.services;h.logger=ts,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new jI(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(h.formatter=s(u),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new r1(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new CI(s(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(m,...v)=>{this.emit(m,...v)}),this.modules.languageDetector&&(h.languageDetector=s(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=s(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new tf(this.services,this.options),this.translator.on("*",(m,...v)=>{this.emit(m,...v)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Rd),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const l=mc(),c=()=>{const u=(d,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(h),r(d,h)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}loadResources(t,r=Rd){var i,a;let n=r;const s=be(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const l=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(h=>{h!=="cimode"&&l.indexOf(h)<0&&l.push(h)})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>c(d)),(a=(i=this.options.preload)==null?void 0:i.forEach)==null||a.call(i,u=>c(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(u)})}else n(null)}reloadResources(t,r,n){const s=mc();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=Rd),this.services.backendConnector.reload(t,r,i=>{s.resolve(),n(i)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&hN.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const n=mc();
vendor: 2,138 bytes, line 40
40this.emit("languageChanging",t);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},i=(l,c)=>{c?this.isLanguageChangingTo===t&&(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,n.resolve((...u)=>this.t(...u)),r&&r(l,(...u)=>this.t(...u))},a=l=>{var d,h;!t&&!l&&this.services.languageDetector&&(l=[]);const c=be(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(be(l)?[l]:l);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),(h=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||h.call(d,u)),this.loadResources(u,f=>{i(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),n}getFixedT(t,r,n){const s=(i,a,...l)=>{let c;typeof a!="object"?c=this.options.overloadTranslationOptionHandler([i,a].concat(l)):c={...a},c.lng=c.lng||s.lng,c.lngs=c.lngs||s.lngs,c.ns=c.ns||s.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||n||s.keyPrefix);const u=this.options.keySeparator||".";let d;return c.keyPrefix&&Array.isArray(i)?d=i.map(h=>(typeof h=="function"&&(h=px(h,{...this.options,...a})),`${c.keyPrefix}${u}${h}`)):(typeof i=="function"&&(i=px(i,{...this.options,...a})),d=c.keyPrefix?`${c.keyPrefix}${u}${i}`:i),this.t(d,c)};return be(t)?s.lng=t:s.lngs=t,s.ns=r,s.keyPrefix=n,s}t(...t){var r;return(r=this.translator)==null?void 0:r.translate(...t)}exists(...t){var r;return(r=this.translator)==null?void 0:r.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
vendor: 4,159 bytes, line 40
40if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(r.precheck){const l=r.precheck(this,a);if(l!==void 0)return l}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,t)&&(!s||a(i,t)))}loadNamespaces(t,r){const n=mc();return this.options.ns?(be(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),r&&r(s)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=mc();be(t)&&(t=[t]);const s=this.options.preload||[],i=t.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=s.concat(i),this.loadResources(a=>{n.resolve(),r&&r(a)}),n):(r&&r(),Promise.resolve())}dir(t){var s,i;if(t||(t=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const a=new Intl.Locale(t);if(a&&a.getTextInfo){const l=a.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((i=this.services)==null?void 0:i.languageUtils)||new Yw(s1());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){const n=new Bc(t,r);return n.createInstance=Bc.createInstance,n}cloneInstance(t={},r=Rd){const n=t.forkResourceStore;n&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},i=new Bc(s);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(l=>{i[l]=this[l]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const l=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},c[u]=Object.keys(c[u]).reduce((d,h)=>(d[h]={...c[u][h]},d),c[u]),c),{});i.store=new Zw(l,s),i.services.resourceStore=i.store}return t.interpolation&&(i.services.interpolator=new r1(s)),i.translator=new tf(i.services,s),i.translator.on("*",(l,...c)=>{i.emit(l,...c)}),i.init(s,r),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const cr=Bc.createInstance();cr.createInstance;cr.dir;cr.init;cr.loadResources;cr.reloadResources;cr.use;cr.changeLanguage;cr.getFixedT;cr.t;cr.exists;cr.setDefaultNamespace;cr.hasLoadedNamespace;cr.loadNamespaces;cr.loadLanguages;const EI=(e,t,r,n)=>{var i,a,l,c;const s=[r,{code:t,...n||{}}];if((a=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&a.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);Bo(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(c=(l=e==null?void 0:e.services)==null?void 0:l.logger)!=null&&c.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},o1={},mN=(e,t,r,n)=>{Bo(r)&&o1[r]||(Bo(r)&&(o1[r]=new Date),EI(e,t,r,n))},pN=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},gx=(e,t,r)=>{e.loadNamespaces(t,pN(e,r))},a1=(e,t,r,n)=>{if(Bo(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return gx(e,r,n);r.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,pN(e,n))},PI=(e,t,r={})=>
40!t.languages||!t.languages.length?(mN(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!s(n.isLanguageChangingTo,e))return!1}}),Bo=e=>typeof e=="string",TI=e=>typeof e=="object"&&e!==null,RI=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,OI={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"â¦","…":"â¦","/":"/","/":"/"},II=e=>OI[e],DI=e=>e.replace(RI,II);let xx={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:DI,transDefaultProps:void 0};const LI=(e={})=>{xx={...xx,...e}},MI=()=>xx;let gN;const zI=e=>{gN=e},FI=()=>gN,$I={type:"3rdParty",init(e){LI(e.options.react),zI(e)}},xN=p.createContext();class VI{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var yN={exports:{}},vN={};/** 41 * @license React 42 * use-sync-external-store-shim.production.js 43 * 44 * Copyright (c) Meta Platforms, Inc. and affiliates. 45 * 46 * This source code is licensed under the MIT license found in the 47 * LICENSE file in the root directory of this source tree. 48 */var Cl=p;function UI(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var BI=typeof Object.is=="function"?Object.is:UI,HI=Cl.useState,WI=Cl.useEffect,qI=Cl.useLayoutEffect,KI=Cl.useDebugValue;function GI(e,t){var r=t(),n=HI({inst:{value:r,getSnapshot:t}}),s=n[0].inst,i=n[1];return qI(function(){s.value=r,s.getSnapshot=t,gp(s)&&i({inst:s})},[e,r,t]),WI(function(){return gp(s)&&i({inst:s}),e(function(){gp(s)&&i({inst:s})})},[e]),KI(r),r}function gp(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!BI(e,r)}catch{return!0}}function QI(e,t){return t()}var ZI=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?QI:GI;vN.useSyncExternalStore=Cl.useSyncExternalStore!==void 0?Cl.useSyncExternalStore:ZI;yN.exports=vN;var XI=yN.exports;const YI=(e,t)=>Bo(t)?t:TI(t)&&Bo(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,JI={t:YI,ready:!1},e5=()=>()=>{},Rt=(e,t={})=>{var E,_,F;const{i18n:r}=t,{i18n:n,defaultNS:s}=p.useContext(xN)||{},i=r||n||FI();i&&!i.reportNamespaces&&(i.reportNamespaces=new VI),i||mN(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const a=p.useMemo(()=>{var C;return{...MI(),...(C=i==null?void 0:i.options)==null?void 0:C.react,...t}},[i,t]),{useSuspense:l,keyPrefix:c}=a,u=s||((E=i==null?void 0:i.options)==null?void 0:E.defaultNS),d=Bo(u)?[u]:u||["translation"],h=p.useMemo(()=>d,d);(F=(_=i==null?void 0:i.reportNamespaces)==null?void 0:_.addUsedNamespaces)==null||F.call(_,h);const f=p.useRef(0),m=p.useCallback(C=>{if(!i)return e5;const{bindI18n:L,bindI18nStore:I}=a,O=()=>{f.current+=1,C()};return L&&i.on(L,O),I&&i.store.on(I,O),()=>{L&&L.split(" ").forEach(U=>i.off(U,O)),I&&I.split(" ").forEach(U=>i.store.off(U,O))}},[i,a]),v=p.useRef(),g=p.useCallback(()=>{if(!i)return JI;const C=!!(i.isInitialized||i.initializedStoreOnce)&&h.every(P=>PI(P,i,a)),L=t.lng||i.language,I=f.current,O=v.current;if(O&&O.ready===C&&O.lng===L&&O.keyPrefix===c&&O.revision===I)return O;const M={t:i.getFixedT(L,a.nsMode==="fallback"?h:h[0],c),ready:C,lng:L,keyPrefix:c,revision:I};return v.current=M,M},[i,h,c,a,t.lng]),[w,b]=p.useState(0),{t:y,ready:x}=XI.useSyncExternalStore(m,g,g);p.useEffect(()=>{if(i&&!x&&!l){const C=()=>b(L=>L+1);t.lng?a1(i,t.lng,h,C):gx(i,h,C)}},[i,t.lng,h,x,l,w]);const j=i||{},k=p.useRef(null),S=p.useRef(),N=C=>{const L=Object.getOwnPropertyDescriptors(C);L.__original&&delete L.__original;const I=Object.create(Object.getPrototypeOf(C),L);if(!Object.prototype.hasOwnProperty.call(I,"__original"))try{Object.defineProperty(I,"__original",{value:C,writable:!1,enumerable:!1,
48configurable:!1})}catch{}return I},A=p.useMemo(()=>{const C=j,L=C==null?void 0:C.language;let I=C;C&&(k.current&&k.current.__original===C?S.current!==L?(I=N(C),k.current=I,S.current=L):I=k.current:(I=N(C),k.current=I,S.current=L));const O=[y,I,x];return O.t=y,O.i18n=I,O.ready=x,O},[y,j,x,j.resolvedLanguage,j.language,j.languages]);if(i&&l&&!x)throw new Promise(C=>{const L=()=>C();t.lng?a1(i,t.lng,h,L):gx(i,h,L)});return A};function t5({i18n:e,defaultNS:t,children:r}){const n=p.useMemo(()=>({i18n:e,defaultNS:t}),[e,t]);return p.createElement(xN.Provider,{value:n},r)}const r5=1,n5=1e6;let xp=0;function s5(){return xp=(xp+1)%Number.MAX_SAFE_INTEGER,xp.toString()}const yp=new Map,l1=e=>{if(yp.has(e))return;const t=setTimeout(()=>{yp.delete(e),Hc({type:"REMOVE_TOAST",toastId:e})},n5);yp.set(e,t)},i5=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,r5)};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?l1(r):e.toasts.forEach(n=>
48{l1(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},ph=[];let gh={toasts:[]};function Hc(e){gh=i5(gh,e),ph.forEach(t=>{t(gh)})}function Le({...e}){const t=s5(),r=s=>Hc({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>Hc({type:"DISMISS_TOAST",toastId:t});return Hc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function qr(){const[e,t]=p.useState(gh);return p.useEffect(()=>(ph.push(t),()=>{const r=ph.indexOf(t);r>-1&&ph.splice(r,1)}),[e]),{...e,toast:Le,dismiss:r=>Hc({type:"DISMISS_TOAST",toastId:r})}}function he(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function c1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bN(...e){return t=>{let r=!1;const n=e.map(s=>{const i=c1(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():c1(e[s],null)}}}}function _e(...e){return p.useCallback(bN(...e),e)}function o5(e,t){const r=p.createContext(t),n=i=>{const{children:a,...l}=i,c=p.useMemo(()=>l,Object.values(l));return o.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function s(i){const a=p.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,s]}function hs(e,t=[]){let r=[];function n(i,a){const l=p.createContext(a),c=r.length;r=[...r,a];const u=h=>{var b;const{scope:f,children:m,...v}=h,g=((b=f==null?void 0:f[e])==null?void 0:b[c])||l,w=p.useMemo(()=>v,Object.values(v));return o.jsx(g.Provider,{value:w,children:m})};u.displayName=i+"Provider";function d(h,f){var g;const m=((g=f==null?void 0:f[e])==null?void 0:g[c])||l,v=p.useContext(m);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=r.map(a=>p.createContext(a));return function(l){const c=(l==null?void 0:l[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[n,a5(s,...t)]}function a5(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=n.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function _l(e){const t=c5(e),r=p.forwardRef((n,s)=>{const{children:i,...a}=n,l=p.Children.toArray(i),c=l.find(d5);if(c){const u=c.props.children,d=l.map(h=>h===c?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:h);return o.jsx(t,{...a,ref:s,children:p.isValidElement(u)?p.cloneElement(u,void 0,d):null})}return o.jsx(t,{...a,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var l5=_l("Slot");function c5(e){const t=p.forwardRef((r,n)=>{const{children:s,...i}=r;if(p.isValidElement(s)){const a=f5(s),l=h5(i,s.props);return s.type!==p.Fragment&&(l.ref=n?bN(n,a):a),p.cloneElement(s,l)}return p.Children.count(s)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wN=Symbol("radix.slottable");function u5(e){const t=({children:r})=>o.jsx(o.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=wN,t}function d5(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wN}function h5(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...l)=>{const c=i(...l);return s(...l),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function f5(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Uv(e){const t=e+"CollectionProvider",[r,n]=hs(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:w,children:b}=g,y=H.useRef(null),x=H.useRef(new Map).current;return o.jsx(s,{scope:w,itemMap:x,collectionRef:y,children:b})};a.displayName=t;const l=e+"CollectionSlot",c=_l(l),u=H.forwardRef((g,w)=>{const{scope:b,children:y}=g,x=i(l,b),j=_e(w,x.collectionRef);return o.jsx(c,{ref:j,children:y})});u.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",f=_l(d),m=H.forwardRef((g,w)=>{const{scope:b,children:y,...x}=g,j=H.useRef(null),k=_e(w,j),S=i(d,b);return H.useEffect(()=>(S.itemMap.set(j,{ref:j,...x}
vendor: 9,174 bytes, line 48
48),()=>void S.itemMap.delete(j))),o.jsx(f,{[h]:"",ref:k,children:y})});m.displayName=d;function v(g){const w=i(e+"CollectionConsumer",g);return H.useCallback(()=>{const y=w.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((S,N)=>x.indexOf(S.ref.current)-x.indexOf(N.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},v,n]}var m5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ye=m5.reduce((e,t)=>{const r=_l(`Primitive.${t}`),n=p.forwardRef((s,i)=>{const{asChild:a,...l}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function jN(e,t){e&&na.flushSync(()=>e.dispatchEvent(t))}function Ht(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function p5(e,t=globalThis==null?void 0:globalThis.document){const r=Ht(e);p.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var g5="DismissableLayer",yx="dismissableLayer.update",x5="dismissableLayer.pointerDownOutside",y5="dismissableLayer.focusOutside",u1,kN=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ju=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...c}=e,u=p.useContext(kN),[d,h]=p.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=p.useState({}),v=_e(t,N=>h(N)),g=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(w),y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,j=y>=b,k=b5(N=>{const A=N.target,E=[...u.branches].some(_=>_.contains(A));!j||E||(s==null||s(N),a==null||a(N),N.defaultPrevented||l==null||l())},f),S=w5(N=>{const A=N.target;[...u.branches].some(_=>_.contains(A))||(i==null||i(N),a==null||a(N),N.defaultPrevented||l==null||l())},f);return p5(N=>{y===u.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},f),p.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(u1=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),d1(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=u1)}},[d,f,r,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),d1())},[d,u]),p.useEffect(()=>{const N=()=>m({});return document.addEventListener(yx,N),()=>document.removeEventListener(yx,N)},[]),o.jsx(ye.div,{...c,ref:v,style:{pointerEvents:x?j?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,S.onFocusCapture),onBlurCapture:he(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,k.onPointerDownCapture)})});Ju.displayName=g5;var v5="DismissableLayerBranch",SN=p.forwardRef((e,t)=>{const r=p.useContext(kN),n=p.useRef(null),s=_e(t,n);return p.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),o.jsx(ye.div,{...e,ref:s})});SN.displayName=v5;function b5(e,t=globalThis==null?void 0:globalThis.document){const r=Ht(e),n=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const i=l=>{if(l.target&&!n.current){let c=function(){AN(x5,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function w5(e,t=globalThis==null?void 0:globalThis.document){const r=Ht(e),n=p.useRef(!1);return p.useEffect(()=>{const s=i=>{i.target&&!n.current&&AN(y5,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function d1(){const e=new CustomEvent(yx);document.dispatchEvent(e)}function AN(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?jN(s,i):s.dispatchEvent(i)}var j5=Ju,k5=SN,qt=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},S5="Portal",Yf=p.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[s,i]=p.useState(!1);qt(()=>i(!0),[]);const a=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?rN.createPortal(o.jsx(ye.div,{...n,ref:t}),a):null});Yf.displayName=S5;function A5(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var Vn=e=>{const{present:t,children:r}=e,n=N5(t),s=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),i=_e(n.ref,C5(s));return typeof r=="function"||n.isPresent?p.cloneElement(s,{ref:i}):null};Vn.displayName="Presence";function N5(e){const[t,r]=p.useState(),n=p.useRef(null),s=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[l,c]=A5(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Od(n.current);i.current=l==="mounted"?u:"none"},[l]),qt(()=>{const u=n.current,d=s.current;if(d!==e){const f=i.current,m=Od(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),qt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=m=>{const g=Od(n.current).includes(m.animationName);if(m.target===t&&g&&(c("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=m=>{m.target===t&&(i.current=Od(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Od(e){return(e==null?void 0:e.animationName)||"none"}function C5(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var _5=Jk[" useInsertionEffect ".trim().toString()]||qt;function Ho({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,a]=E5({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:s;{const d=p.useRef(e!==void 0);p.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,n])}const u=p.useCallback(d=>{var h;if(l){const f=P5(d)?d(e):d;f!==e&&((h=a.current)==null||h.call(a,f))}else i(d)},[l,e,i,a]);return[c,u]}function E5({defaultProp:e,onChange:t}){const[r,n]=p.useState(e),s=p.useRef(r),i=p.useRef(t);return _5(()=>{i.current=t},[t]),p.useEffect(()=>{var a;s.current!==r&&((a=i.current)==null||a.call(i,r),s.current=r)},[r,s]),[r,n,i]}function P5(e){return typeof e=="function"}var NN=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"}),T5="VisuallyHidden",Jf=p.forwardRef((e,t)=>o.jsx(ye.span,{...e,ref:t,style:{...NN,...e.style}}));Jf.displayName=T5;var R5=Jf,Bv="ToastProvider",[Hv,O5,I5]=Uv("Toast"),[CN,SX]=hs("Toast",[I5]),[D5,em]=CN(Bv),_N=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:a}=e,[l,c]=p.useState(null),[u,d]=p.useState(0),h=p.useRef(!1),f=p.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Bv}\`. Expected non-empty \`string\`.`),o.jsx(Hv.Provider,{scope:t,children:o.jsx(D5,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:p.useCallback(()=>d(m=>m+1),[]),onToastRemove:p.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:a})})};_N.displayName=Bv;var EN="ToastViewport",L5=["F8"],vx="toast.viewportPause",bx="toast.viewportResume",PN=p.forwardRef((e,t)=>
48{const{__scopeToast:r,hotkey:n=L5,label:s="Notifications ({hotkey})",...i}=e,a=em(EN,r),l=O5(r),c=p.useRef(null),u=p.useRef(null),d=p.useRef(null),h=p.useRef(null),f=_e(t,h,a.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;p.useEffect(()=>{const w=b=>{var x;n.length!==0&&n.every(j=>b[j]||b.code===j)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),p.useEffect(()=>{const w=c.current,b=h.current;if(v&&w&&b){const y=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(vx);b.dispatchEvent(S),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(bx);b.dispatchEvent(S),a.isClosePausedRef.current=!1}},j=S=>{!w.contains(S.relatedTarget)&&x()},k=()=>{w.contains(document.activeElement)||x()};return w.addEventListener("focusin",y),w.addEventListener("focusout",j),w.addEventListener("pointermove",y),w.addEventListener("pointerleave",k),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{w.removeEventListener("focusin",y),w.removeEventListener("focusout",j),w.removeEventListener("pointermove",y),w.removeEventListener("pointerleave",k),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[v,a.isClosePausedRef]);const g=p.useCallback(({tabbingDirection:w})=>{const y=l().map(x=>{const j=x.ref.current,k=[j,...Q5(j)];return w==="forwards"?k:k.reverse()});return(w==="forwards"?y.reverse():y).flat()},[l]);return p.useEffect(()=>{const w=h.current;if(w){const b=y=>{var k,S,N;const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const A=document.activeElement,E=y.shiftKey;if(y.target===w&&E){(k=u.current)==null||k.focus();return}const C=g({tabbingDirection:E?"backwards":"forwards"}),L=C.findIndex(I=>I===A);vp(C.slice(L+1))?y.preventDefault():E?(S=u.current)==null||S.focus():(N=d.current)==null||N.focus()}};return w.addEventListener("keydown",b),()=>w.removeEventListener("keydown",b)}},[l,g]),o.jsxs(k5,{ref:c,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&o.jsx(wx,{ref:u,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});vp(w)}}),o.jsx(Hv.Slot,{scope:r,children:o.jsx(ye.ol,{tabIndex:-1,...i,ref:f})}),v&&o.jsx(wx,{ref:d,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});vp(w)}})]})});PN.displayName=EN;var TN="ToastFocusProxy",wx=p.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=em(TN,r);return o.jsx(Jf,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const l=a.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&n()}})});wx.displayName=TN;var ed="Toast",M5="toast.swipeStart",z5="toast.swipeMove",F5="toast.swipeCancel",$5="toast.swipeEnd",RN=p.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...a}=e,[l,c]=Ho({prop:n,defaultProp:s??!0,onChange:i,caller:ed});return o.jsx(Vn,{present:r||l,children:o.jsx(B5,{open:l,...a,ref:t,onClose:()=>c(!1),onPause:Ht(e.onPause),onResume:Ht(e.onResume),onSwipeStart:he(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:he(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:he(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:he(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});RN.displayName=ed;var[V5,U5]=CN(ed,{onClose(){}}),B5=p.forwardRef((e,t)=>
48{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:a,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:m,...v}=e,g=em(ed,r),[w,b]=p.useState(null),y=_e(t,I=>b(I)),x=p.useRef(null),j=p.useRef(null),k=s||g.duration,S=p.useRef(0),N=p.useRef(k),A=p.useRef(0),{onToastAdd:E,onToastRemove:_}=g,F=Ht(()=>{var O;(w==null?void 0:w.contains(document.activeElement))&&((O=g.viewport)==null||O.focus()),a()}),C=p.useCallback(I=>{!I||I===1/0||(window.clearTimeout(A.current),S.current=new Date().getTime(),A.current=window.setTimeout(F,I))},[F]);p.useEffect(()=>{const I=g.viewport;if(I){const O=()=>{C(N.current),u==null||u()},U=()=>{const M=new Date().getTime()-S.current;N.current=N.current-M,window.clearTimeout(A.current),c==null||c()};return I.addEventListener(vx,U),I.addEventListener(bx,O),()=>{I.removeEventListener(vx,U),I.removeEventListener(bx,O)}}},[g.viewport,k,c,u,C]),p.useEffect(()=>{i&&!g.isClosePausedRef.current&&C(k)},[i,k,g.isClosePausedRef,C]),p.useEffect(()=>(E(),()=>_()),[E,_]);const L=p.useMemo(()=>w?FN(w):null,[w]);return g.viewport?o.jsxs(o.Fragment,{children:[L&&o.jsx(H5,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),o.jsx(V5,{scope:r,onClose:F,children:na.createPortal(o.jsx(Hv.ItemSlot,{scope:r,children:o.jsx(j5,{asChild:!0,onEscapeKeyDown:he(l,()=>{g.isFocusedToastEscapeKeyDownRef.current||F(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:o.jsx(ye.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...v,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:he(e.onKeyDown,I=>{I.key==="Escape"&&(l==null||l(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:he(e.onPointerDown,I=>{I.button===0&&(x.current={x:I.clientX,y:I.clientY})}),onPointerMove:he(e.onPointerMove,I=>{if(!x.current)return;const O=I.clientX-x.current.x,U=I.clientY-x.current.y,M=!!j.current,P=["left","right"].includes(g.swipeDirection),z=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,B=P?z(0,O):0,re=P?0:z(0,U),Q=I.pointerType==="touch"?10:2,fe={x:B,y:re},pe={originalEvent:I,delta:fe};M?(j.current=fe,Id(z5,h,pe,{discrete:!1})):h1(fe,g.swipeDirection,Q)?(j.current=fe,Id(M5,d,pe,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(O)>Q||Math.abs(U)>Q)&&(x.current=null)}),onPointerUp:he(e.onPointerUp,I=>{const O=j.current,U=I.target;if(U.hasPointerCapture(I.pointerId)&&U.releasePointerCapture(I.pointerId),j.current=null,x.current=null,O){const M=I.currentTarget,P={originalEvent:I,delta:O};h1(O,g.swipeDirection,g.swipeThreshold)?Id($5,m,P,{discrete:!0}):Id(F5,f,P,{discrete:!0}),M.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),H5=e=>{const{__scopeToast:t,children:r,...n}=e,s=em(ed,t),[i,a]=p.useState(!1),[l,c]=p.useState(!1);return K5(()=>a(!0)),p.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:o.jsx(Yf,{asChild:!0,children:o.jsx(Jf,{...n,children:i&&o.jsxs(o.Fragment,{children:[s.label," ",r]})})})},W5="ToastTitle",ON=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(ye.div,{...n,ref:t})});ON.displayName=W5;var q5="ToastDescription",IN=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(ye.div,{...n,ref:t})});IN.displayName=q5;var DN="ToastAction",LN=p.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?o.jsx(zN,{altText:r,asChild:!0,children:o.jsx(Wv,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${DN}\`. Expected non-empty \`string\`.`),null)});LN.displayName=DN;var MN="ToastClose",Wv=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=U5(MN,r);return o.jsx(zN,{asChild:!0,children:o.jsx(ye.button,{type:"button",...n,ref:t,onClick:he(e.onClick,s.onClose)})})});Wv.displayName=MN;var zN=p.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return o.jsx(ye.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function FN(e){const t=[];
vendor: 10,474 bytes, lines 48-157
48return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),G5(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const a=n.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...FN(n))}}),t}function Id(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?jN(s,i):s.dispatchEvent(i)}var h1=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function K5(e=()=>{}){const t=Ht(e);qt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function G5(e){return e.nodeType===e.ELEMENT_NODE}function Q5(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function vp(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Z5=_N,$N=PN,VN=RN,UN=ON,BN=IN,HN=LN,WN=Wv;function qN(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=qN(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function KN(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=qN(e))&&(n&&(n+=" "),n+=t);return n}const f1=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,m1=KN,tm=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return m1(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,a=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],h=i==null?void 0:i[u];if(d===null)return null;const f=f1(d)||f1(h);return s[u][f]}),l=r&&Object.entries(r).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:h,className:f,...m}=d;return Object.entries(m).every(v=>{let[g,w]=v;return Array.isArray(w)?w.includes({...i,...l}[g]):{...i,...l}[g]===w})?[...u,h,f]:u},[]);return m1(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)};/** 49 * @license lucide-react v0.462.0 - ISC 50 * 51 * This source code is licensed under the ISC license. 52 * See the LICENSE file in the root directory of this source tree. 53 */const X5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),GN=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 54 * @license lucide-react v0.462.0 - ISC 55 * 56 * This source code is licensed under the ISC license. 57 * See the LICENSE file in the root directory of this source tree. 58 */var Y5={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"};/** 59 * @license lucide-react v0.462.0 - ISC 60 * 61 * This source code is licensed under the ISC license. 62 * See the LICENSE file in the root directory of this source tree. 63 */const J5=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:a,...l},c)=>p.createElement("svg",{ref:c,...Y5,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:GN("lucide",s),...l},[...a.map(([u,d])=>p.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** 64 * @license lucide-react v0.462.0 - ISC 65 * 66 * This source code is licensed under the ISC license. 67 * See the LICENSE file in the root directory of this source tree. 68 */const q=(e,t)=>{const r=p.forwardRef(({className:n,...s},i)=>p.createElement(J5,{ref:i,iconNode:t,className:GN(`lucide-${X5(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 69 * @license lucide-react v0.462.0 - ISC 70 * 71 * This source code is licensed under the ISC license. 72 * See the LICENSE file in the root directory of this source tree. 73 */const rm=q("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 74 * @license lucide-react v0.462.0 - ISC 75 * 76 * This source code is licensed under the ISC license. 77 * See the LICENSE file in the root directory of this source tree. 78 */const rf=q("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 79 * @license lucide-react v0.462.0 - ISC 80 * 81 * This source code is licensed under the ISC license. 82 * See the LICENSE file in the root directory of this source tree. 83 */const QN=q("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"}]]);/** 84 * @license lucide-react v0.462.0 - ISC 85 * 86 * This source code is licensed under the ISC license. 87 * See the LICENSE file in the root directory of this source tree. 88 */const eD=q("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** 89 * @license lucide-react v0.462.0 - ISC 90 * 91 * This source code is licensed under the ISC license. 92 * See the LICENSE file in the root directory of this source tree. 93 */const Wo=q("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 94 * @license lucide-react v0.462.0 - ISC 95 * 96 * This source code is licensed under the ISC license. 97 * See the LICENSE file in the root directory of this source tree. 98 */const tD=q("Cable",[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",key:"10bnsj"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9",key:"1eqmu1"}],["path",{d:"M21 21v-2h-4",key:"14zm7j"}],["path",{d:"M3 5h4V3",key:"z442eg"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3",key:"ebdjd7"}]]);/** 99 * @license lucide-react v0.462.0 - ISC 100 * 101 * This source code is licensed under the ISC license. 102 * See the LICENSE file in the root directory of this source tree. 103 */const rD=q("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/** 104 * @license lucide-react v0.462.0 - ISC 105 * 106 * This source code is licensed under the ISC license. 107 * See the LICENSE file in the root directory of this source tree. 108 */const nD=q("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"}]]);/** 109 * @license lucide-react v0.462.0 - ISC 110 * 111 * This source code is licensed under the ISC license. 112 * See the LICENSE file in the root directory of this source tree. 113 */const qv=q("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"}]]);/** 114 * @license lucide-react v0.462.0 - ISC 115 * 116 * This source code is licensed under the ISC license. 117 * See the LICENSE file in the root directory of this source tree. 118 */const Vs=q("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 119 * @license lucide-react v0.462.0 - ISC 120 * 121 * This source code is licensed under the ISC license. 122 * See the LICENSE file in the root directory of this source tree. 123 */const eo=q("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 124 * @license lucide-react v0.462.0 - ISC 125 * 126 * This source code is licensed under the ISC license. 127 * See the LICENSE file in the root directory of this source tree. 128 */const Wc=q("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 129 * @license lucide-react v0.462.0 - ISC 130 * 131 * This source code is licensed under the ISC license. 132 * See the LICENSE file in the root directory of this source tree. 133 */const ct=q("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 134 * @license lucide-react v0.462.0 - ISC 135 * 136 * This source code is licensed under the ISC license. 137 * See the LICENSE file in the root directory of this source tree. 138 */const Kv=q("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 139 * @license lucide-react v0.462.0 - ISC 140 * 141 * This source code is licensed under the ISC license. 142 * See the LICENSE file in the root directory of this source tree. 143 */const ZN=q("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/** 144 * @license lucide-react v0.462.0 - ISC 145 * 146 * This source code is licensed under the ISC license. 147 * See the LICENSE file in the root directory of this source tree. 148 */const sD=q("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 149 * @license lucide-react v0.462.0 - ISC 150 * 151 * This source code is licensed under the ISC license. 152 * See the LICENSE file in the root directory of this source tree. 153 */const iD=q("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"}]]);/** 154 * @license lucide-react v0.462.0 - ISC 155 * 156 * This source code is licensed under the ISC license. 157 * See the LICENSE file in the root directory of this source tree.
158 */const oD=q("CircuitBoard",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]]);/** 159 * @license lucide-react v0.462.0 - ISC 160 * 161 * This source code is licensed under the ISC license. 162 * See the LICENSE file in the root directory of this source tree. 163 */const El=q("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 164 * @license lucide-react v0.462.0 - ISC 165 * 166 * This source code is licensed under the ISC license. 167 * See the LICENSE file in the root directory of this source tree. 168 */const XN=q("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);/** 169 * @license lucide-react v0.462.0 - ISC 170 * 171 * This source code is licensed under the ISC license. 172 * See the LICENSE file in the root directory of this source tree. 173 */const Hi=q("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}
173],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** 174 * @license lucide-react v0.462.0 - ISC 175 * 176 * This source code is licensed under the ISC license. 177 * See the LICENSE file in the root directory of this source tree. 178 */const YN=q("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"}]]);/** 179 * @license lucide-react v0.462.0 - ISC 180 * 181 * This source code is licensed under the ISC license. 182 * See the LICENSE file in the root directory of this source tree. 183 */const aD=q("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"}]]);/** 184 * @license lucide-react v0.462.0 - ISC 185 * 186 * This source code is licensed under the ISC license. 187 * See the LICENSE file in the root directory of this source tree. 188 */const lD=q("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"}]]);/** 189 * @license lucide-react v0.462.0 - ISC 190 * 191 * This source code is licensed under the ISC license. 192 * See the LICENSE file in the root directory of this source tree. 193 */const cD=q("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 194 * @license lucide-react v0.462.0 - ISC 195 * 196 * This source code is licensed under the ISC license. 197 * See the LICENSE file in the root directory of this source tree. 198 */const uD=q("Fan",[["path",{d:"M10.827 16.379a6.082 6.082 0 0 1-8.618-7.002l5.412 1.45a6.082 6.082 0 0 1 7.002-8.618l-1.45 5.412a6.082 6.082 0 0 1 8.618 7.002l-5.412-1.45a6.082 6.082 0 0 1-7.002 8.618l1.45-5.412Z",key:"484a7f"}],["path",{d:"M12 12v.01",key:"u5ubse"}]]);/** 199 * @license lucide-react v0.462.0 - ISC 200 * 201 * This source code is licensed under the ISC license. 202 * See the LICENSE file in the root directory of this source tree. 203 */const yu=q("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"}]]);/** 204 * @license lucide-react v0.462.0 - ISC 205 * 206 * This source code is licensed under the ISC license. 207 * See the LICENSE file in the root directory of this source tree. 208 */const vu=q("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** 209 * @license lucide-react v0.462.0 - ISC 210 * 211 * This source code is licensed under the ISC license. 212 * See the LICENSE file in the root directory of this source tree. 213 */const dD=q("Gamepad2",[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]);/** 214 * @license lucide-react v0.462.0 - ISC 215 * 216 * This source code is licensed under the ISC license. 217 * See the LICENSE file in the root directory of this source tree. 218 */const JN=q("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** 219 * @license lucide-react v0.462.0 - ISC 220 * 221 * This source code is licensed under the ISC license. 222 * See the LICENSE file in the root directory of this source tree. 223 */const hD=q("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"}]]);/** 224 * @license lucide-react v0.462.0 - ISC 225 * 226 * This source code is licensed under the ISC license. 227 * See the LICENSE file in the root directory of this source tree. 228 */const jx=q("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 229 * @license lucide-react v0.462.0 - ISC 230 * 231 * This source code is licensed under the ISC license. 232 * See the LICENSE file in the root directory of this source tree. 233 */const kx=q("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** 234 * @license lucide-react v0.462.0 - ISC 235 * 236 * This source code is licensed under the ISC license. 237 * See the LICENSE file in the root directory of this source tree. 238 */const Gv=q("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}
238]]);/** 239 * @license lucide-react v0.462.0 - ISC 240 * 241 * This source code is licensed under the ISC license. 242 * See the LICENSE file in the root directory of this source tree. 243 */const eC=q("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"}]]);/** 244 * @license lucide-react v0.462.0 - ISC 245 * 246 * This source code is licensed under the ISC license. 247 * See the LICENSE file in the root directory of this source tree. 248 */const Is=q("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"}]]);/** 249 * @license lucide-react v0.462.0 - ISC 250 * 251 * This source code is licensed under the ISC license. 252 * See the LICENSE file in the root directory of this source tree. 253 */const fD=q("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"}]]);/** 254 * @license lucide-react v0.462.0 - ISC 255 * 256 * This source code is licensed under the ISC license. 257 * See the LICENSE file in the root directory of this source tree. 258 */const mD=q("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"}]]);/** 259 * @license lucide-react v0.462.0 - ISC 260 * 261 * This source code is licensed under the ISC license. 262 * See the LICENSE file in the root directory of this source tree. 263 */const pD=q("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"}]]);/** 264 * @license lucide-react v0.462.0 - ISC 265 * 266 * This source code is licensed under the ISC license. 267 * See the LICENSE file in the root directory of this source tree. 268 */const gD=q("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** 269 * @license lucide-react v0.462.0 - ISC 270 * 271 * This source code is licensed under the ISC license. 272 * See the LICENSE file in the root directory of this source tree. 273 */const xD=q("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 274 * @license lucide-react v0.462.0 - ISC 275 * 276 * This source code is licensed under the ISC license. 277 * See the LICENSE file in the root directory of this source tree. 278 */const yD=q("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/** 279 * @license lucide-react v0.462.0 - ISC 280 * 281 * This source code is licensed under the ISC license. 282 * See the LICENSE file in the root directory of this source tree. 283 */const tC=q("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** 284 * @license lucide-react v0.462.0 - ISC 285 * 286 * This source code is licensed under the ISC license. 287 * See the LICENSE file in the root directory of this source tree. 288 */const vD=q("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 289 * @license lucide-react v0.462.0 - ISC 290 * 291 * This source code is licensed under the ISC license. 292 * See the LICENSE file in the root directory of this source tree. 293 */const bD=q("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** 294 * @license lucide-react v0.462.0 - ISC 295 * 296 * This source code is licensed under the ISC license. 297 * See the LICENSE file in the root directory of this source tree. 298 */const st=q("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 299 * @license lucide-react v0.462.0 - ISC 300 * 301 * This source code is licensed under the ISC license. 302 * See the LICENSE file in the root directory of this source tree.
303 */const _i=q("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"}]]);/** 304 * @license lucide-react v0.462.0 - ISC 305 * 306 * This source code is licensed under the ISC license. 307 * See the LICENSE file in the root directory of this source tree. 308 */const wD=q("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 309 * @license lucide-react v0.462.0 - ISC 310 * 311 * This source code is licensed under the ISC license. 312 * See the LICENSE file in the root directory of this source tree. 313 */const Sx=q("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"}]]);/** 314 * @license lucide-react v0.462.0 - ISC 315 * 316 * This source code is licensed under the ISC license. 317 * See the LICENSE file in the root directory of this source tree. 318 */const jD=q("MailCheck",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);/** 319 * @license lucide-react v0.462.0 - ISC 320 * 321 * This source code is licensed under the ISC license. 322 * See the LICENSE file in the root directory of this source tree. 323 */const Qv=q("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"}]]);/** 324 * @license lucide-react v0.462.0 - ISC 325 * 326 * This source code is licensed under the ISC license. 327 * See the LICENSE file in the root directory of this source tree. 328 */const bu=q("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"}]]);/** 329 * @license lucide-react v0.462.0 - ISC 330 * 331 * This source code is licensed under the ISC license. 332 * See the LICENSE file in the root directory of this source tree. 333 */const Zv=q("MemoryStick",[["path",{d:"M6 19v-3",key:"1nvgqn"}],["path",{d:"M10 19v-3",key:"iu8nkm"}],["path",{d:"M14 19v-3",key:"kcehxu"}],["path",{d:"M18 19v-3",key:"1vh91z"}],["path",{d:"M8 11V9",key:"63erz4"}],["path",{d:"M16 11V9",key:"fru6f3"}],["path",{d:"M12 11V9",key:"ha00sb"}],["path",{d:"M2 15h20",key:"16ne18"}],["path",{d:"M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z",key:"lhddv3"}]]);/** 334 * @license lucide-react v0.462.0 - ISC 335 * 336 * This source code is licensed under the ISC license. 337 * See the LICENSE file in the root directory of this source tree. 338 */const Xv=q("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"}]]);/** 339 * @license lucide-react v0.462.0 - ISC 340 * 341 * This source code is licensed under the ISC license. 342 * See the LICENSE file in the root directory of this source tree. 343 */const kD=q("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 344 * @license lucide-react v0.462.0 - ISC 345 * 346 * This source code is licensed under the ISC license. 347 * See the LICENSE file in the root directory of this source tree. 348 */const Yv=q("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 349 * @license lucide-react v0.462.0 - ISC 350 * 351 * This source code is licensed under the ISC license. 352 * See the LICENSE file in the root directory of this source tree. 353 */const SD=q("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** 354 * @license lucide-react v0.462.0 - ISC 355 * 356 * This source code is licensed under the ISC license. 357 * See the LICENSE file in the root directory of this source tree. 358 */const tl=q("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"}]]);/** 359 * @license lucide-react v0.462.0 - ISC 360 * 361 * This source code is licensed under the ISC license. 362 * See the LICENSE file in the root directory of this source tree. 363 */const AD=q("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/** 364 * @license lucide-react v0.462.0 - ISC 365 * 366 * This source code is licensed under the ISC license. 367 * See the LICENSE file in the root directory of this source tree. 368 */const ND=q("Percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]);/** 369 * @license lucide-react v0.462.0 - ISC 370 * 371 * This source code is licensed under the ISC license. 372 * See the LICENSE file in the root directory of this source tree. 373 */const nm=q("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"}]]);/** 374 * @license lucide-react v0.462.0 - ISC 375 * 376 * This source code is licensed under the ISC license. 377 * See the LICENSE file in the root directory of this source tree. 378 */const Yt=q("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 379 * @license lucide-react v0.462.0 - ISC 380 * 381 * This source code is licensed under the ISC license. 382 * See the LICENSE file in the root directory of this source tree. 383 */const CD=q("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"}]]);/** 384 * @license lucide-react v0.462.0 - ISC 385 * 386 * This source code is licensed under the ISC license. 387 * See the LICENSE file in the root directory of this source tree. 388 */const _D=q("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"}]]);/** 389 * @license lucide-react v0.462.0 - ISC 390 * 391 * This source code is licensed under the ISC license. 392 * See the LICENSE file in the root directory of this source tree. 393 */const qo=q("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 394 * @license lucide-react v0.462.0 - ISC 395 * 396 * This source code is licensed under the ISC license. 397 * See the LICENSE file in the root directory of this source tree. 398 */const Ko=q("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"}]]);/** 399 * @license lucide-react v0.462.0 - ISC 400 * 401 * This source code is licensed under the ISC license. 402 * See the LICENSE file in the root directory of this source tree. 403 */const ED=q("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/** 404 * @license lucide-react v0.462.0 - ISC 405 * 406 * This source code is licensed under the ISC license. 407 * See the LICENSE file in the root directory of this source tree. 408 */const Ul=q("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
408y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 409 * @license lucide-react v0.462.0 - ISC 410 * 411 * This source code is licensed under the ISC license. 412 * See the LICENSE file in the root directory of this source tree. 413 */const Mn=q("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 414 * @license lucide-react v0.462.0 - ISC 415 * 416 * This source code is licensed under the ISC license. 417 * See the LICENSE file in the root directory of this source tree. 418 */const us=q("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"}]]);/** 419 * @license lucide-react v0.462.0 - ISC 420 * 421 * This source code is licensed under the ISC license. 422 * See the LICENSE file in the root directory of this source tree. 423 */const PD=q("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"}]]);/** 424 * @license lucide-react v0.462.0 - ISC 425 * 426 * This source code is licensed under the ISC license. 427 * See the LICENSE file in the root directory of this source tree. 428 */const Ax=q("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/** 429 * @license lucide-react v0.462.0 - ISC 430 * 431 * This source code is licensed under the ISC license. 432 * See the LICENSE file in the root directory of this source tree. 433 */const TD=q("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 434 * @license lucide-react v0.462.0 - ISC 435 * 436 * This source code is licensed under the ISC license. 437 * See the LICENSE file in the root directory of this source tree. 438 */const RD=q("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"}]]);/** 439 * @license lucide-react v0.462.0 - ISC 440 * 441 * This source code is licensed under the ISC license. 442 * See the LICENSE file in the root directory of this source tree. 443 */const Dd=q("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"}]]);/** 444 * @license lucide-react v0.462.0 - ISC 445 * 446 * This source code is licensed under the ISC license. 447 * See the LICENSE file in the root directory of this source tree. 448 */const Jv=q("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"}]]);/** 449 * @license lucide-react v0.462.0 - ISC 450 * 451 * This source code is licensed under the ISC license. 452 * See the LICENSE file in the root directory of this source tree. 453 */const or=q("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 5,320 bytes, lines 453-513
453],["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"}]]);/** 454 * @license lucide-react v0.462.0 - ISC 455 * 456 * This source code is licensed under the ISC license. 457 * See the LICENSE file in the root directory of this source tree. 458 */const OD=q("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"}]]);/** 459 * @license lucide-react v0.462.0 - ISC 460 * 461 * This source code is licensed under the ISC license. 462 * See the LICENSE file in the root directory of this source tree. 463 */const on=q("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"}]]);/** 464 * @license lucide-react v0.462.0 - ISC 465 * 466 * This source code is licensed under the ISC license. 467 * See the LICENSE file in the root directory of this source tree. 468 */const ka=q("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"}]]);/** 469 * @license lucide-react v0.462.0 - ISC 470 * 471 * This source code is licensed under the ISC license. 472 * See the LICENSE file in the root directory of this source tree. 473 */const sm=q("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"}]]);/** 474 * @license lucide-react v0.462.0 - ISC 475 * 476 * This source code is licensed under the ISC license. 477 * See the LICENSE file in the root directory of this source tree. 478 */const wu=q("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"}]]);/** 479 * @license lucide-react v0.462.0 - ISC 480 * 481 * This source code is licensed under the ISC license. 482 * See the LICENSE file in the root directory of this source tree. 483 */const ID=q("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"}]]);/** 484 * @license lucide-react v0.462.0 - ISC 485 * 486 * This source code is licensed under the ISC license. 487 * See the LICENSE file in the root directory of this source tree. 488 */const td=q("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** 489 * @license lucide-react v0.462.0 - ISC 490 * 491 * This source code is licensed under the ISC license. 492 * See the LICENSE file in the root directory of this source tree. 493 */const kt=q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 494 * @license lucide-react v0.462.0 - ISC 495 * 496 * This source code is licensed under the ISC license. 497 * See the LICENSE file in the root directory of this source tree. 498 */const DD=q("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.55 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"}]]);/** 499 * @license lucide-react v0.462.0 - ISC 500 * 501 * This source code is licensed under the ISC license. 502 * See the LICENSE file in the root directory of this source tree. 503 */const rC=q("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"}]]);/** 504 * @license lucide-react v0.462.0 - ISC 505 * 506 * This source code is licensed under the ISC license. 507 * See the LICENSE file in the root directory of this source tree. 508 */const nC=q("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/** 509 * @license lucide-react v0.462.0 - ISC 510 * 511 * This source code is licensed under the ISC license. 512 * See the LICENSE file in the root directory of this source tree. 513 */const LD=q("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),e0="-",MD=e=>{const t=FD(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const l=a.split(e0);return l[0]===""&&l.length!==1&&l.shift(),sC(l,t)||zD(a)},getConflictingClassGroupIds:(a,l)=>{const c=r[a]||[];return l&&n[a]?[...c,...n[a]]:c}}},sC=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?sC(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(e0);return(a=t.validators.find(({validator:l})=>l(i)))==null?void 0:a.classGroupId}
vendor: 5,327 bytes, line 513
513,p1=/^\[(.+)\]$/,zD=e=>{if(p1.test(e)){const t=p1.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},FD=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return VD(Object.entries(e.classGroups),r).forEach(([i,a])=>{Nx(a,n,i,t)}),n},Nx=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:g1(t,s);i.classGroupId=r;return}if(typeof s=="function"){if($D(s)){Nx(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,a])=>{Nx(a,g1(t,i),r,n)})})},g1=(e,t)=>{let r=e;return t.split(e0).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},$D=e=>e.isThemeGetter,VD=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,l])=>[t+a,l])):i);return[r,s]}):e,UD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,a)=>{r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let a=r.get(i);if(a!==void 0)return a;if((a=n.get(i))!==void 0)return s(i,a),a},set(i,a){r.has(i)?r.set(i,a):s(i,a)}}},iC="!",BD=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,a=l=>{const c=[];let u=0,d=0,h;for(let w=0;w<l.length;w++){let b=l[w];if(u===0){if(b===s&&(n||l.slice(w,w+i)===t)){c.push(l.slice(d,w)),d=w+i;continue}if(b==="/"){h=w;continue}}b==="["?u++:b==="]"&&u--}const f=c.length===0?l:l.substring(d),m=f.startsWith(iC),v=m?f.substring(1):f,g=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:g}};return r?l=>r({className:l,parseClassName:a}):a},HD=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},WD=e=>({cache:UD(e.cacheSize),parseClassName:BD(e),...MD(e)}),qD=/\s+/,KD=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],a=e.trim().split(qD);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:m}=r(u);let v=!!m,g=n(v?f.substring(0,m):f);if(!g){if(!v){l=u+(l.length>0?" "+l:l);continue}if(g=n(f),!g){l=u+(l.length>0?" "+l:l);continue}v=!1}const w=HD(d).join(":"),b=h?w+iC:w,y=b+g;if(i.includes(y))continue;i.push(y);const x=s(g,v);for(let j=0;j<x.length;++j){const k=x[j];i.push(b+k)}l=u+(l.length>0?" "+l:l)}return l};function GD(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=oC(t))&&(n&&(n+=" "),n+=r);return n}const oC=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=oC(e[n]))&&(r&&(r+=" "),r+=t);return r};function QD(e,...t){let r,n,s,i=a;function a(c){const u=t.reduce((d,h)=>h(d),e());return r=WD(u),n=r.cache.get,s=r.cache.set,i=l,l(c)}function l(c){const u=n(c);if(u)return u;const d=KD(c,r);return s(c,d),d}return function(){return i(GD.apply(null,arguments))}}const rt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},aC=/^\[(?:([a-z-]+):)?(.+)\]$/i,ZD=/^\d+\/\d+$/,XD=new Set(["px","full","screen"]),YD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JD=/\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$/,eL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,tL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ws=e=>rl(e)||XD.has(e)||ZD.test(e),ri=e=>Bl(e,"length",uL),rl=e=>!!e&&!Number.isNaN(Number(e)),bp=e=>Bl(e,"number",rl),pc=e=>!!e&&Number.isInteger(Number(e)),nL=e=>e.endsWith("%")&&rl(e.slice(0,-1)),Ce=e=>aC.test(e),ni=e=>YD.test(e),sL=new Set(["length","size","percentage"]),iL=e=>Bl(e,sL,lC),oL=e=>Bl(e,"position",lC),aL=new Set(["image","url"]),lL=e=>Bl(e,aL,hL),cL=e=>Bl(e,"",dL),gc=()=>!0,Bl=(e,t,r)=>{const n=aC.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},uL=e=>JD.test(e)&&!eL.test(e),lC=()=>!1,dL=e=>tL.test(e),hL=e=>rL.test(e),fL=()=>{const e=rt("colors"),t=rt("spacing"),r=rt("blur"),n=rt("brightness"),s=rt("borderColor"),i=rt("borderRadius"),a=rt("borderSpacing"),l=rt("borderWidth"),c=rt("contrast"),u=rt("grayscale"),d=rt("hueRotate"),h=rt("invert"),f=rt("gap"),m=rt("gradientColorStops"),v=rt("gradientColorStopPositions"),g=rt("inset"),w=rt("margin"),b=rt("opacity"),y=rt("padding"),x=rt("saturate"),j=rt("scale"),k=rt("sepia"),S=rt("skew"),N=rt("space"),A=rt("translate"),E=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",Ce,t],C=()=>[Ce,t],L=()=>["",ws,ri],I=()=>["auto",rl,Ce],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],M=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",Ce],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],re=()=>[rl,Ce];return{cacheSize:500,separator:":",theme:{colors:[gc],spacing:[ws,ri],blur:["none","",ni,Ce],brightness:re(),borderColor:[e],borderRadius:["n
513one","","full",ni,Ce],borderSpacing:C(),borderWidth:L(),contrast:re(),grayscale:z(),hueRotate:re(),invert:z(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[nL,ri],inset:F(),margin:F(),opacity:re(),padding:C(),saturate:re(),scale:re(),sepia:z(),skew:re(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[ni]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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:[...O(),Ce]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],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",pc,Ce]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ce]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",pc,Ce]}],"grid-cols":[{"grid-cols":[gc]}],"col-start-end":[{col:["auto",{span:["full",pc,Ce]},Ce]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[gc]}],"row-start-end":[{row:["auto",{span:[pc,Ce]},Ce]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ce]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ce,t]}],"min-w":[{"min-w":[Ce,t,"min","max","fit"]}],"max-w":[{"max-w":[Ce,t,"none","full","min","max","fit","prose",{screen:[ni]},ni]}],h:[{h:[Ce,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ce,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ni,ri]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",bp]}],"font-family":[{font:[gc]}],"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",Ce]}],"line-clamp":[{"line-clamp":["none",rl,bp]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ws,Ce]}],"list-image":[{"list-image":["none",Ce]}],"list-style-type":[{list:["none","disc","decimal",Ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ws,ri]}],"underline-offset":[{"underline-offset":["auto",ws,Ce]}],"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:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce]}],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",Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),oL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",iL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},lL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}
vendor: 5,182 bytes, line 513
513],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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":[b]}],"border-style":[{border:[...U(),"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":[b]}],"divide-style":[{divide:U()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[ws,Ce]}],"outline-w":[{outline:[ws,ri]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[ws,ri]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ni,cL]}],"shadow-color":[{shadow:[gc]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...M(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":M()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ni,Ce]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[x]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ce]}],duration:[{duration:re()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:re()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[pc,Ce]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"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",Ce]}],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",Ce]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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"]}
vendor: 4,647 bytes, line 513
513],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",Ce]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ws,ri,bp]}],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"]}}},mL=QD(fL);function Ie(...e){return mL(KN(e))}const pL=Z5,cC=p.forwardRef(({className:e,...t},r)=>o.jsx($N,{ref:r,className:Ie("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}));cC.displayName=$N.displayName;const gL=tm("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"}}),uC=p.forwardRef(({className:e,variant:t,...r},n)=>o.jsx(VN,{ref:n,className:Ie(gL({variant:t}),e),...r}));uC.displayName=VN.displayName;const xL=p.forwardRef(({className:e,...t},r)=>o.jsx(HN,{ref:r,className:Ie("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));xL.displayName=HN.displayName;const dC=p.forwardRef(({className:e,...t},r)=>o.jsx(WN,{ref:r,className:Ie("absolute right-2 top-2 rounded-md p-1 text-foreground
513/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:o.jsx(kt,{className:"h-4 w-4"})}));dC.displayName=WN.displayName;const hC=p.forwardRef(({className:e,...t},r)=>o.jsx(UN,{ref:r,className:Ie("text-sm font-semibold",e),...t}));hC.displayName=UN.displayName;const fC=p.forwardRef(({className:e,...t},r)=>o.jsx(BN,{ref:r,className:Ie("text-sm opacity-90",e),...t}));fC.displayName=BN.displayName;function yL(){const{toasts:e}=qr();return o.jsxs(pL,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return o.jsxs(uC,{...i,children:[o.jsxs("div",{className:"grid gap-1",children:[r&&o.jsx(hC,{children:r}),n&&o.jsx(fC,{children:n})]}),s,o.jsx(dC,{})]},t)}),o.jsx(cC,{})]})}var x1=["light","dark"],vL="(prefers-color-scheme: dark)",bL=p.createContext(void 0),wL={setTheme:e=>{},themes:[]},jL=()=>{var e;return(e=p.useContext(bL))!=null?e:wL};p.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:a,attrs:l,nonce:c})=>{let u=i==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?x1.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,w=!0)=>{let b=a?a[v]:v,y=g?v+"|| ''":`'${b}'`,x="";return s&&w&&!g&&x1.includes(v)&&(x+=`d.style.colorScheme = '${v}';`),r==="class"?g||b?x+=`c.add(${y})`:x+="null":b&&(x+=`d[s](n,${y})`),x},m=e?`!function(){${d}${f(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${vL}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${h}}catch(t){}}();`;return p.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})});var kL=e=>{switch(e){case"success":return NL;case"info":return _L;case"warning":return CL;case"error":return EL;default:return null}},SL=Array(12).fill(0),AL=({visible:e,className:t})=>H.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},H.createElement("div",{className:"sonner-spinner"},SL.map((r,n)=>H.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),NL=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),CL=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},H.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"})),_L=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),EL=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),PL=H.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"},H.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),H.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),TL=()=>{let[e,t]=H.useState(document.hidden);return H.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Cx=1,RL=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 513
513{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Cx++,i=this.toasts.find(l=>l.id===s),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:r}),{...l,...e,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...n,dismissible:a,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
513this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,i,a=n.then(async c=>{if(i=["resolve",c],H.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(IL(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:r,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"success",message:u,description:d})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>a.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Cx++;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}},jr=new RL,OL=(e,t)=>{let r=(t==null?void 0:t.id)||Cx++;return jr.addToast({title:e,...t,id:r}),r},IL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DL=OL,LL=()=>jr.toasts,ML=()=>jr.getActiveToasts(),fi=Object.assign(DL,{success:jr.success,info:jr.info,warning:jr.warning,error:jr.error,custom:jr.custom,message:jr.message,promise:jr.promise,dismiss:jr.dismiss,loading:jr.loading},{getHistory:LL,getToasts:ML});function zL(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))}zL(`: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;
513left: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}
513: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%);
513--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%)} 514`);function Ld(e){return e.label!==void 0}var FL=3,$L="32px",VL="16px",y1=4e3,UL=356,BL=14,HL=20,WL=200;function bn(...e){return e.filter(Boolean).join(" ")}function qL(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var KL=e=>{var t,r,n,s,i,a,l,c,u,d,h;let{invert:f,toast:m,unstyled:v,interacting:g,setHeights:w,visibleToasts:b,heights:y,index:x,toasts:j,expanded:k,removeToast:S,defaultRichColors:N,closeButton:A,style:E,cancelButtonStyle:_,actionButtonStyle:F,className:C="",descriptionClassName:L="",duration:I,position:O,gap:U,loadingIcon:M,expandByDefault:P,classNames:z,icons:B,closeButtonAriaLabel:re="Close toast",pauseWhenPageIsHidden:
514Q}=e,[fe,pe]=H.useState(null),[Me,Ze]=H.useState(null),[ee,Pe]=H.useState(!1),[He,Ae]=H.useState(!1),[Ne,Te]=H.useState(!1),[Nt,Kt]=H.useState(!1),[Er,gt]=H.useState(!1),[Kr,Ys]=H.useState(0),[Gr,T]=H.useState(0),$=H.useRef(m.duration||I||y1),V=H.useRef(null),te=H.useRef(null),J=x===0,G=x+1<=b,ie=m.type,Re=m.dismissible!==!1,We=m.className||"",tr=m.descriptionClassName||"",gn=H.useMemo(()=>y.findIndex(we=>we.toastId===m.id)||0,[y,m.id]),Qr=H.useMemo(()=>{var we;return(we=m.closeButton)!=null?we:A},[m.closeButton,A]),sa=H.useMemo(()=>m.duration||I||y1,[m.duration,I]),xs=H.useRef(0),Pr=H.useRef(0),ia=H.useRef(0),xn=H.useRef(null),[oa,Js]=O.split("-"),tc=H.useMemo(()=>y.reduce((we,qe,Xe)=>Xe>=gn?we:we+qe.height,0),[y,gn]),aa=TL(),rc=m.invert||f,nc=ie==="loading";Pr.current=H.useMemo(()=>gn*U+tc,[gn,tc]),H.useEffect(()=>{$.current=sa},[sa]),H.useEffect(()=>{Pe(!0)},[]),H.useEffect(()=>{let we=te.current;if(we){let qe=we.getBoundingClientRect().height;return T(qe),w(Xe=>[{toastId:m.id,height:qe,position:m.position},...Xe]),()=>w(Xe=>Xe.filter(Tr=>Tr.toastId!==m.id))}},[w,m.id]),H.useLayoutEffect(()=>{if(!ee)return;let we=te.current,qe=we.style.height;we.style.height="auto";let Xe=we.getBoundingClientRect().height;we.style.height=qe,T(Xe),w(Tr=>Tr.find(Rr=>Rr.toastId===m.id)?Tr.map(Rr=>Rr.toastId===m.id?{...Rr,height:Xe}:Rr):[{toastId:m.id,height:Xe,position:m.position},...Tr])},[ee,m.title,m.description,w,m.id]);let Hn=H.useCallback(()=>{Ae(!0),Ys(Pr.current),w(we=>we.filter(qe=>qe.toastId!==m.id)),setTimeout(()=>{S(m)},WL)},[m,S,w,Pr]);H.useEffect(()=>{if(m.promise&&ie==="loading"||m.duration===1/0||m.type==="loading")return;let we;return k||g||Q&&aa?(()=>{if(ia.current<xs.current){let qe=new Date().getTime()-xs.current;$.current=$.current-qe}ia.current=new Date().getTime()})():$.current!==1/0&&(xs.current=new Date().getTime(),we=setTimeout(()=>{var qe;(qe=m.onAutoClose)==null||qe.call(m,m),Hn()},$.current)),()=>clearTimeout(we)},[k,g,m,ie,Q,aa,Hn]),H.useEffect(()=>{m.delete&&Hn()},[Hn,m.delete]);function Mm(){var we,qe,Xe;return B!=null&&B.loading?H.createElement("div",{className:bn(z==null?void 0:z.loader,(we=m==null?void 0:m.classNames)==null?void 0:we.loader,"sonner-loader"),"data-visible":ie==="loading"},B.loading):M?H.createElement("div",{className:bn(z==null?void 0:z.loader,(qe=m==null?void 0:m.classNames)==null?void 0:qe.loader,"sonner-loader"),"data-visible":ie==="loading"},M):H.createElement(AL,{className:bn(z==null?void 0:z.loader,(Xe=m==null?void 0:m.classNames)==null?void 0:Xe.loader),visible:ie==="loading"})}return H.createElement("li",{tabIndex:0,ref:te,className:bn(C,We,z==null?void 0:z.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,z==null?void 0:z.default,z==null?void 0:z[ie],(r=m==null?void 0:m.classNames)==null?void 0:r[ie]),"data-sonner-toast":"","data-rich-colors":(n=m.richColors)!=null?n:N,"data-styled":!(m.jsx||m.unstyled||v),"data-mounted":ee,"data-promise":!!m.promise,"data-swiped":Er,"data-removed":He,"data-visible":G,"data-y-position":oa,"data-x-position":Js,"data-index":x,"data-front":J,"data-swiping":Ne,"data-dismissible":Re,"data-type":ie,"data-invert":rc,"data-swipe-out":Nt,"data-swipe-direction":Me,"data-expanded":!!(k||P&&ee),style:{"--index":x,"--toasts-before":x,"--z-index":j.length-x,"--offset":`${He?Kr:Pr.current}px`,"--initial-height":P?"auto":`${Gr}px`,...E,...m.style},onDragEnd:()=>{Te(!1),pe(null),xn.current=null},onPointerDown:we=>{nc||!Re||(V.current=new Date,Ys(Pr.current),we.target.setPointerCapture(we.pointerId),we.target.tagName!=="BUTTON"&&(Te(!0),xn.current={x:we.clientX,y:we.clientY}))},onPointerUp:()=>{var we,qe,Xe,Tr;if(Nt||!Re)return;xn.current=null;let Rr=Number(((we=te.current)==null?void 0:we.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Wn=Number(((qe=te.current)==null?void 0:qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ys=new Date().getTime()-((Xe=V.current)==null?void 0:Xe.getTime()),Or=fe==="x"?Rr:Wn,yn=Math.abs(Or)/ys;if(Math.abs(Or)>=HL||yn>.11){Ys(Pr.current),(Tr=m.onDismiss)==null||Tr.call(m,m),Ze(fe==="x"?Rr>0?"right":"left":Wn>0?"down":"up"),Hn(),Kt(!0),gt(!1);return}Te(!1),pe(null)},onPointerMove:we=>{var qe,Xe,Tr,Rr;if(!xn.current||!Re||((qe=window.getSelection())==null?void 0:qe.toString().length)>0)return;let Wn=we.clientY-xn.current.y,ys=we.clientX-xn.current.x,Or=(Xe=e.swipeDirections)!=null?Xe:qL(O);!fe&&(Math.abs(ys)>1||Math.abs(Wn)>1)&&pe(Math.abs(ys)>Math.abs(Wn)?"x":"y");let yn={x:0,y:0};fe==="y"?(Or.includes("top")||Or.includes("bottom"))&&(Or.includes("top")&&Wn<0||Or.includes("bottom")&&Wn>0)&&(yn.y=Wn):fe==="x"&&(Or.includes("left")||Or.includes("right"))&&(Or.includes("left")&&ys<0||Or.includes("right")&&ys>0)&&(yn.x=ys),(Math.abs(yn.x)>0||Math.abs(yn.y)>0)&>(!0),(Tr=te.current)==null||Tr.style.setProperty("--swipe-amount-x",`${yn.x}px`),(Rr=te.current)==null||Rr.style.setProperty("--swipe-amount-y",`${yn.y}px`)}},Qr&&!m.jsx?H.createElement("button",{"aria-label":re,"data-disabled":nc,"data-close-button":!0,onClick:nc||!Re?()=>{}:()=>{var we;Hn(),(we=m.onDismiss)==null||we.call(m,m)},className:bn(z==null?void 0:z.closeButton,(s=m==null?void 0:m.classNames)==null?void 0:s.closeButton)},(i=B==null?void 0:B.close)!=null?i:PL):null,m.jsx||p.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:H.createElement(H.Fragment,null,ie||m.icon||m.promise?H.createElement("div",{"data-icon":"",className:bn(z==null?void 0:z.icon,(a=m==null?void 0:m.classNames)==null?void 0:a.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||Mm():null,m.type!=="loading"?m.
514icon||(B==null?void 0:B[ie])||kL(ie):null):null,H.createElement("div",{"data-content":"",className:bn(z==null?void 0:z.content,(l=m==null?void 0:m.classNames)==null?void 0:l.content)},H.createElement("div",{"data-title":"",className:bn(z==null?void 0:z.title,(c=m==null?void 0:m.classNames)==null?void 0:c.title)},typeof m.title=="function"?m.title():m.title),m.description?H.createElement("div",{"data-description":"",className:bn(L,tr,z==null?void 0:z.description,(u=m==null?void 0:m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),p.isValidElement(m.cancel)?m.cancel:m.cancel&&Ld(m.cancel)?H.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||_,onClick:we=>{var qe,Xe;Ld(m.cancel)&&Re&&((Xe=(qe=m.cancel).onClick)==null||Xe.call(qe,we),Hn())},className:bn(z==null?void 0:z.cancelButton,(d=m==null?void 0:m.classNames)==null?void 0:d.cancelButton)},m.cancel.label):null,p.isValidElement(m.action)?m.action:m.action&&Ld(m.action)?H.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||F,onClick:we=>{var qe,Xe;Ld(m.action)&&((Xe=(qe=m.action).onClick)==null||Xe.call(qe,we),!we.defaultPrevented&&Hn())},className:bn(z==null?void 0:z.actionButton,(h=m==null?void 0:m.classNames)==null?void 0:h.actionButton)},m.action.label):null))};function v1(){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,s)=>{let i=s===1,a=i?"--mobile-offset":"--offset",l=i?VL:$L;function c(u){["top","right","bottom","left"].forEach(d=>{r[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${a}-${u}`]=l:r[`${a}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):c(l)}),r}var QL=p.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:a,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:f,style:m,visibleToasts:v=FL,toastOptions:g,dir:w=v1(),gap:b=BL,loadingIcon:y,icons:x,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:k}=e,[S,N]=H.useState([]),A=H.useMemo(()=>Array.from(new Set([n].concat(S.filter(Q=>Q.position).map(Q=>Q.position)))),[S,n]),[E,_]=H.useState([]),[F,C]=H.useState(!1),[L,I]=H.useState(!1),[O,U]=H.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=H.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=H.useRef(null),B=H.useRef(!1),re=H.useCallback(Q=>{N(fe=>{var pe;return(pe=fe.find(Me=>Me.id===Q.id))!=null&&pe.delete||jr.dismiss(Q.id),fe.filter(({id:Me})=>Me!==Q.id)})},[]);return H.useEffect(()=>jr.subscribe(Q=>{if(Q.dismiss){N(fe=>fe.map(pe=>pe.id===Q.id?{...pe,delete:!0}:pe));return}setTimeout(()=>{rN.flushSync(()=>{N(fe=>{let pe=fe.findIndex(Me=>Me.id===Q.id);return pe!==-1?[...fe.slice(0,pe),{...fe[pe],...Q},...fe.slice(pe+1)]:[Q,...fe]})})})}),[]),H.useEffect(()=>{if(d!=="system"){U(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:fe})=>{U(fe?"dark":"light")})}catch{Q.addListener(({matches:pe})=>{try{U(pe?"dark":"light")}catch(Me){console.error(Me)}})}},[d]),H.useEffect(()=>{S.length<=1&&C(!1)},[S]),H.useEffect(()=>{let Q=fe=>{var pe,Me;s.every(Ze=>fe[Ze]||fe.code===Ze)&&(C(!0),(pe=M.current)==null||pe.focus()),fe.code==="Escape"&&(document.activeElement===M.current||(Me=M.current)!=null&&Me.contains(document.activeElement))&&C(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[s]),H.useEffect(()=>{if(M.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,B.current=!1)}},[M.current]),H.createElement("section",{ref:t,"aria-label":`${j} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((Q,fe)=>{var pe;let[Me,Ze]=Q.split("-");return S.length?H.createElement("ol",{key:Q,dir:w==="auto"?v1():w,tabIndex:-1,ref:M,className:l,"data-sonner-toaster":!0,"data-theme":O,"data-y-position":Me,"data-lifted":F&&S.length>1&&!i,"data-x-position":Ze,style:{"--front-toast-height":`${((pe=E[0])==null?void 0:pe.height)||0}px`,"--width":`${UL}px`,"--gap":`${b}px`,...m,...GL(c,u)},onBlur:ee=>{B.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(B.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||B.current||(B.current=!0,z.current=ee.relatedTarget)},onMouseEnter:()=>C(!0),onMouseMove:()=>C(!0),onMouseLeave:()=>{L||C(!1)},onDragEnd:()=>C(!1),onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},S.filter(ee=>!ee.position&&fe===0||ee.position===Q).map((ee,Pe)=>{var He,Ae;return H.createElement(KL,{key:ee.id,icons:x,index:Pe,toast:ee,defaultRichColors:h,duration:(He=g==null?void 0:g.duration)!=null?He:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:v,closeButton:(Ae=g==null?void 0:g.closeButton)!=null?Ae:a,interacting:L,position:Q,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:re,toasts:S.filter(Ne=>Ne.position==ee.position),heights:E.filter(Ne=>Ne.position==ee.position),setHeights:_,expandByDefault:i,gap:b,loadingIcon:y,expanded:F,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const ZL=({...e})=>{const{theme:t="system"}=jL();return o.jsx(QL,{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 XL=Jk[" useId ".trim().toString()]||(()=>{}),YL=0;function nl(e){const[t,r]=p.useState(XL());return qt(()=>{r(n=>n??String(YL++))},[e]),t?`radix-${t}`:""}const JL=["top","right","bottom","left"],Wi=Math.min,Lr=Math.max,nf=Math.round,Md=Math.floor,os=e=>({x:e,y:e}
vendor: 9,267 bytes, line 514
514),eM={left:"right",right:"left",bottom:"top",top:"bottom"},tM={start:"end",end:"start"};function _x(e,t,r){return Lr(e,Wi(t,r))}function Us(e,t){return typeof e=="function"?e(t):e}function Bs(e){return e.split("-")[0]}function Hl(e){return e.split("-")[1]}function t0(e){return e==="x"?"y":"x"}function r0(e){return e==="y"?"height":"width"}const rM=new Set(["top","bottom"]);function rs(e){return rM.has(Bs(e))?"y":"x"}function n0(e){return t0(rs(e))}function nM(e,t,r){r===void 0&&(r=!1);const n=Hl(e),s=n0(e),i=r0(s);let a=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=sf(a)),[a,sf(a)]}function sM(e){const t=sf(e);return[Ex(e),t,Ex(t)]}function Ex(e){return e.replace(/start|end/g,t=>tM[t])}const b1=["left","right"],w1=["right","left"],iM=["top","bottom"],oM=["bottom","top"];function aM(e,t,r){switch(e){case"top":case"bottom":return r?t?w1:b1:t?b1:w1;case"left":case"right":return t?iM:oM;default:return[]}}function lM(e,t,r,n){const s=Hl(e);let i=aM(Bs(e),r==="start",n);return s&&(i=i.map(a=>a+"-"+s),t&&(i=i.concat(i.map(Ex)))),i}function sf(e){return e.replace(/left|right|bottom|top/g,t=>eM[t])}function cM(e){return{top:0,right:0,bottom:0,left:0,...e}}function mC(e){return typeof e!="number"?cM(e):{top:e,right:e,bottom:e,left:e}}function of(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function j1(e,t,r){let{reference:n,floating:s}=e;const i=rs(t),a=n0(t),l=r0(a),c=Bs(t),u=i==="y",d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,f=n[l]/2-s[l]/2;let m;switch(c){case"top":m={x:d,y:n.y-s.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:h};break;case"left":m={x:n.x-s.width,y:h};break;default:m={x:n.x,y:n.y}}switch(Hl(t)){case"start":m[a]-=f*(r&&u?-1:1);break;case"end":m[a]+=f*(r&&u?-1:1);break}return m}const uM=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=j1(u,n,c),f=n,m={},v=0;for(let g=0;g<l.length;g++){const{name:w,fn:b}=l[g],{x:y,y:x,data:j,reset:k}=await b({x:d,y:h,initialPlacement:n,placement:f,strategy:s,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});d=y??d,h=x??h,m={...m,[w]:{...m[w],...j}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(u=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:d,y:h}=j1(u,f,c)),g=-1)}return{x:d,y:h,placement:f,strategy:s,middlewareData:m}};async function ju(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:m=0}=Us(t,e),v=mC(m),w=l[f?h==="floating"?"reference":"floating":h],b=of(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),y=h==="floating"?{x:n,y:s,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),j=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},k=of(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:x,strategy:c}):y);return{top:(b.top-k.top+v.top)/j.y,bottom:(k.bottom-b.bottom+v.bottom)/j.y,left:(b.left-k.left+v.left)/j.x,right:(k.right-b.right+v.right)/j.x}}const dM=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:a,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Us(e,t)||{};if(u==null)return{};const h=mC(d),f={x:r,y:n},m=n0(s),v=r0(m),g=await a.getDimensions(u),w=m==="y",b=w?"top":"left",y=w?"bottom":"right",x=w?"clientHeight":"clientWidth",j=i.reference[v]+i.reference[m]-f[m]-i.floating[v],k=f[m]-i.reference[m],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let N=S?S[x]:0;(!N||!await(a.isElement==null?void 0:a.isElement(S)))&&(N=l.floating[x]||i.floating[v]);const A=j/2-k/2,E=N/2-g[v]/2-1,_=Wi(h[b],E),F=Wi(h[y],E),C=_,L=N-g[v]-F,I=N/2-g[v]/2+A,O=_x(C,I,L),U=!c.arrow&&Hl(s)!=null&&I!==O&&i.reference[v]/2-(I<C?_:F)-g[v]/2<0,M=U?I<C?I-C:I-L:0;return{[m]:f[m]+M,data:{[m]:O,centerOffset:I-O-M,...U&&{alignmentOffset:M}},reset:U}}}),hM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:a,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...w}=Us(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const b=Bs(s),y=rs(l),x=Bs(l)===l,j=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=f||(x||!g?[sf(l)]:sM(l)),S=v!=="none";!f&&S&&k.push(...lM(l,g,v,j));const N=[l,...k],A=await ju(t,w),E=[];let _=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&E.push(A[b]),h){const I=nM(s,a,j);E.push(A[I[0]],A[I[1]])}if(_=[..._,{placement:s,overflows:E}],!E.every(I=>I<=0)){var F,C;const I=(((F=i.flip)==null?void 0:F.index)||0)+1,O=N[I];if(O&&(!(h==="alignment"?y!==rs(O):!1)||_.every(P=>P.overflows[0]>0&&rs(P.placement)===y)))return{data:{index:I,overflows:_},reset:{placement:O}};let U=(C=_.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:C.placement;if(!U)switch(m){case"bestFit":{var L;const M=(L=_.filter(P=>{if(S){const z=rs(P.placement);return z===y||z==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(z=>z>0).reduce((z,B)=>z+B,0)]).sort((P,z)=>P[1]-z[1])[0])==null?void 0:L[0];M&&(U=M);break}case"initialPlacement":U=l;break}if(s!==U)return{reset:{placement:U}}}return{}}}};function k1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function S1(e){return JL.some(t=>e[t]>=0)}const fM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Us(e,t);switch(n){case"referenceHidden":{const i=await ju(t,{...s,elementContext:"reference"}),a=k1(i,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:S1(a)}}}case"escaped":{const i=await ju(t,{...s,altBoundary:!0}),a=k1(i,r.floating);return{data:{escapedOffsets:a,escaped:S1(a)}}}default:return{}}}}},pC=new Set(["left","top"]);async function mM(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),a=Bs(r),l=Hl(r),c=rs(r)==="y",u=pC.has(a)?-1:1,d=i&&c?-1:1,h=Us(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof v=="number"&&(m=l==="end"?v*-1:v),c?{x:m*d,y:f*u}:{x:f*u,y:m*d}}const pM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:a,middlewareData:l}=t,c=await mM(t,e);return a===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:a}}}}},gM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:b,y}=w;return{x:b,y}}},...c}=Us(e,t),u={x:r,y:n},d=await ju(t,c),h=rs(Bs(s)),f=t0(h);let m=u[f],v=u[h];if(i){const w=f==="y"?"top":"left",b=f==="y"?"bottom":"right",y=m+d[w],x=m-d[b];m=_x(y,m,x)}if(a){const w=h==="y"?"top":"left",b=h==="y"?"bottom":"right",y=v+d[w],x=v-d[b];v=_x(y,v,x)}const g=l.fn({...t,[f]:m,[h]:v});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[f]:i,[h]:a}}}}}},xM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Us(e,t),d={x:r,y:n},h=rs(s),f=t0(h);let m=d[f],v=d[h];const g=Us(l,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const x=f==="y"?"height":"width",j=i.reference[f]-i.floating[x]+w.mainAxis,k=i.reference[f]+i.reference[x]-w.mainAxis;m<j?m=j:m>k&&(m=k)}if(u){var b,y;const x=f==="y"?"width":"height",j=pC.has(Bs(s)),k=i.reference[h]-i.floating[x]+(j&&((b=a.offset)==null?void 0:b[h])||0)+(j?0:w.crossAxis),S=i.reference[h]+i.reference[x]+(j?0:((y=a.offset)==null?void 0:y[h])||0)-(j?w.crossAxis:0);v<k?v=k:v>S&&(v=S)}return{[f]:m,[h]:v}}}},yM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:a,elements:l}=t,{apply:c=()=>{},...u}=Us(e,t),d=await ju(t,u),h=Bs(s),f=Hl(s),m=rs(s)==="y",{width:v,height:g}=i.floating;let w,b;h==="top"||h==="bottom"?(w=h,b=f===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(b=h,w=f==="end"?"top":"bottom");const y=g-d.top-d.bottom,x=v-d.left-d.right,j=Wi(g-d[w],y),k=Wi(v-d[b],x),S=!t.middlewareData.shift;let N=j,A=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=y),S&&!f){const _=Lr(
vendor: 5,196 bytes, line 514
514d.left,0),F=Lr(d.right,0),C=Lr(d.top,0),L=Lr(d.bottom,0);m?A=v-2*(_!==0||F!==0?_+F:Lr(d.left,d.right)):N=g-2*(C!==0||L!==0?C+L:Lr(d.top,d.bottom))}await c({...t,availableWidth:A,availableHeight:N});const E=await a.getDimensions(l.floating);return v!==E.width||g!==E.height?{reset:{rects:!0}}:{}}}};function im(){return typeof window<"u"}function Wl(e){return gC(e)?(e.nodeName||"").toLowerCase():"#document"}function Vr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fs(e){var t;return(t=(gC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gC(e){return im()?e instanceof Node||e instanceof Vr(e).Node:!1}function Fn(e){return im()?e instanceof Element||e instanceof Vr(e).Element:!1}function ds(e){return im()?e instanceof HTMLElement||e instanceof Vr(e).HTMLElement:!1}function A1(e){return!im()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vr(e).ShadowRoot}const vM=new Set(["inline","contents"]);function rd(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=$n(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!vM.has(s)}const bM=new Set(["table","td","th"]);function wM(e){return bM.has(Wl(e))}const jM=[":popover-open",":modal"];function om(e){return jM.some(t=>{try{return e.matches(t)}catch{return!1}})}const kM=["transform","translate","scale","rotate","perspective"],SM=["transform","translate","scale","rotate","perspective","filter"],AM=["paint","layout","strict","content"];function s0(e){const t=i0(),r=Fn(e)?$n(e):e;return kM.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)||SM.some(n=>(r.willChange||"").includes(n))||AM.some(n=>(r.contain||"").includes(n))}function NM(e){let t=qi(e);for(;ds(t)&&!Pl(t);){if(s0(t))return t;if(om(t))return null;t=qi(t)}return null}function i0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const CM=new Set(["html","body","#document"]);function Pl(e){return CM.has(Wl(e))}function $n(e){return Vr(e).getComputedStyle(e)}function am(e){return Fn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qi(e){if(Wl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||A1(e)&&e.host||fs(e);return A1(t)?t.host:t}function xC(e){const t=qi(e);return Pl(t)?e.ownerDocument?e.ownerDocument.body:e.body:ds(t)&&rd(t)?t:xC(t)}function ku(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=xC(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),a=Vr(s);if(i){const l=Px(a);return t.concat(a,a.visualViewport||[],rd(s)?s:[],l&&r?ku(l):[])}return t.concat(s,ku(s,[],r))}function Px(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yC(e){const t=$n(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=ds(e),i=s?e.offsetWidth:r,a=s?e.offsetHeight:n,l=nf(r)!==i||nf(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function o0(e){return Fn(e)?e:e.contextElement}function sl(e){const t=o0(e);if(!ds(t))return os(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=yC(t);let a=(i?nf(r.width):r.width)/n,l=(i?nf(r.height):r.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const _M=os(0);function vC(e){const t=Vr(e);return!i0()||!t.visualViewport?_M:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function EM(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Vr(e)?!1:t}function Go(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=o0(e);let a=os(1);t&&(n?Fn(n)&&(a=sl(n)):a=sl(e));const l=EM(i,r,n)?vC(i):os(0);let c=(s.left+l.x)/a.x,u=(s.top+l.y)/a.y,d=s.width/a.x,h=s.height/a.y;if(i){const f=Vr(i),m=n&&Fn(n)?Vr(n):n;let v=f,g=Px(v);for(;g&&n&&m!==v;){const w=sl(g),b=g.getBoundingClientRect(),y=$n(g),x=b.left+(g.clientLeft+parseFloat(y.paddingLeft))*w.x,j=b.top+(g.clientTop+parseFloat(y.paddingTop))*w.y;c*=w.x,u*=w.y,d*=w.x,h*=w.y,c+=x,u+=j,v=Vr(g),g=Px(v)}}return of({width:d,height:h,x:c,y:u})}function a0(e,t){const r=am(e).scrollLeft;return t?t.left+r:Go(fs(e)).left+r}function bC(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:a0(e,n)),i=n.top+t.scrollTop;return{x:s,y:i}}function PM(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",a=fs(n),l=t?om(t.floating):!1;if(n===a||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=os(1);const d=os(0),h=ds(n);if((h||!h&&!i)&&((Wl(n)!=="body"||rd(a))&&(c=am(n)),ds(n))){const m=Go(n);u=sl(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}const f=a&&!h&&!i?bC(a,c,!0):os(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+f.x,y:r.y*u.y-c.scrollTop*u.y+d.y+f.y}}function TM(e){return Array.from(e.getClientRects())}function RM(e){const t=fs(e),r=am(e),n=e.ownerDocument.body,s=Lr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Lr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+a0(e);const l=-r.scrollTop;return $n(n).direction==="rtl"&&(a+=Lr(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:a,y:l}}
vendor: 4,850 bytes, line 514
514function OM(e,t){const r=Vr(e),n=fs(e),s=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,c=0;if(s){i=s.width,a=s.height;const u=i0();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:i,height:a,x:l,y:c}}const IM=new Set(["absolute","fixed"]);function DM(e,t){const r=Go(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=ds(e)?sl(e):os(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,c=s*i.x,u=n*i.y;return{width:a,height:l,x:c,y:u}}function N1(e,t,r){let n;if(t==="viewport")n=OM(e,r);else if(t==="document")n=RM(fs(e));else if(Fn(t))n=DM(t,r);else{const s=vC(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return of(n)}function wC(e,t){const r=qi(e);return r===t||!Fn(r)||Pl(r)?!1:$n(r).position==="fixed"||wC(r,t)}function LM(e,t){const r=t.get(e);if(r)return r;let n=ku(e,[],!1).filter(l=>Fn(l)&&Wl(l)!=="body"),s=null;const i=$n(e).position==="fixed";let a=i?qi(e):e;for(;Fn(a)&&!Pl(a);){const l=$n(a),c=s0(a);!c&&l.position==="fixed"&&(s=null),(i?!c&&!s:!c&&l.position==="static"&&!!s&&IM.has(s.position)||rd(a)&&!c&&wC(e,a))?n=n.filter(d=>d!==a):s=l,a=qi(a)}return t.set(e,n),n}function MM(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const a=[...r==="clippingAncestors"?om(t)?[]:LM(t,this._c):[].concat(r),n],l=a[0],c=a.reduce((u,d)=>{const h=N1(t,d,s);return u.top=Lr(h.top,u.top),u.right=Wi(h.right,u.right),u.bottom=Wi(h.bottom,u.bottom),u.left=Lr(h.left,u.left),u},N1(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function zM(e){const{width:t,height:r}=yC(e);return{width:t,height:r}}function FM(e,t,r){const n=ds(t),s=fs(t),i=r==="fixed",a=Go(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=os(0);function u(){c.x=a0(s)}if(n||!n&&!i)if((Wl(t)!=="body"||rd(s))&&(l=am(t)),n){const m=Go(t,!0,i,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else s&&u();i&&!n&&s&&u();const d=s&&!n&&!i?bC(s,l):os(0),h=a.left+l.scrollLeft-c.x-d.x,f=a.top+l.scrollTop-c.y-d.y;return{x:h,y:f,width:a.width,height:a.height}}function wp(e){return $n(e).position==="static"}function C1(e,t){if(!ds(e)||$n(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return fs(e)===r&&(r=r.ownerDocument.body),r}function jC(e,t){const r=Vr(e);if(om(e))return r;if(!ds(e)){let s=qi(e);for(;s&&!Pl(s);){if(Fn(s)&&!wp(s))return s;s=qi(s)}return r}let n=C1(e,t);for(;n&&wM(n)&&wp(n);)n=C1(n,t);return n&&Pl(n)&&wp(n)&&!s0(n)?r:n||NM(e)||r}const $M=async function(e){const t=this.getOffsetParent||jC,r=this.getDimensions,n=await r(e.floating);return{reference:FM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function VM(e){return $n(e).direction==="rtl"}const UM={convertOffsetParentRelativeRectToViewportRelativeRect:PM,getDocumentElement:fs,getClippingRect:MM,getOffsetParent:jC,getElementRects:$M,getClientRects:TM,getDimensions:zM,getScale:sl,isElement:Fn,isRTL:VM};function kC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function BM(e,t){let r=null,n;const s=fs(e);function i(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:d,top:h,width:f,height:m}=u;if(l||t(),!f||!m)return;const v=Md(h),g=Md(s.clientWidth-(d+f)),w=Md(s.clientHeight-(h+m)),b=Md(d),x={rootMargin:-v+"px "+-g+"px "+-w+"px "+-b+"px",threshold:Lr(0,Wi(1,c))||1};let j=!0;function k(S){const N=S[0].intersectionRatio;if(N!==c){if(!j)return a();N?a(!1,N):n=setTimeout(()=>{a(!1,1e-7)},1e3)}N===1&&!kC(u,e.getBoundingClientRect())&&a(),j=!1}try{r=new IntersectionObserver(k,{...x,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,x)}r.observe(e)}return a(!0),i}function HM(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=o0(e),d=s||i?[...u?ku(u):[],...ku(t)]:[];d.forEach(b=>{s&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const h=u&&l?BM(u,r):null;let f=-1,m=null;a&&(m=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),r()}),u&&!c&&m.observe(u),m.observe(t));let v,g=c?Go(e):null;c&&w();function w(){const b=Go(e);g&&!kC(g,b)&&r(),g=b,v=requestAnimationFrame(w)}return r(),()=>{var b;d.forEach(y=>{s&&y.removeEventListener("scroll",r),i&&y.removeEventListener("resize",r)}),h==null||h(),(b=m)==null||b.disconnect(),m=null,c&&cancelAnimationFrame(v)}}const WM=pM,qM=gM,KM=hM,GM=yM,QM=fM,_1=dM,ZM=xM,XM=(e,t,r)=>{const n=new Map,s={platform:UM,...r},i={...s.platform,_c:n};return uM(e,t,{...s,platform:i})};var YM=typeof document<"u",JM=function(){},xh=YM?p.useLayoutEffect:JM;function af(e,t){if(e===t)return!0;
vendor: 4,143 bytes, line 514
514if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!af(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!af(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function SC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function E1(e,t){const r=SC(e);return Math.round(t*r)/r}function jp(e){const t=p.useRef(e);return xh(()=>{t.current=e}),t}function ez(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=p.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=p.useState(n);af(f,n)||m(n);const[v,g]=p.useState(null),[w,b]=p.useState(null),y=p.useCallback(P=>{P!==S.current&&(S.current=P,g(P))},[]),x=p.useCallback(P=>{P!==N.current&&(N.current=P,b(P))},[]),j=i||v,k=a||w,S=p.useRef(null),N=p.useRef(null),A=p.useRef(d),E=c!=null,_=jp(c),F=jp(s),C=jp(u),L=p.useCallback(()=>{if(!S.current||!N.current)return;const P={placement:t,strategy:r,middleware:f};F.current&&(P.platform=F.current),XM(S.current,N.current,P).then(z=>{const B={...z,isPositioned:C.current!==!1};I.current&&!af(A.current,B)&&(A.current=B,na.flushSync(()=>{h(B)}))})},[f,t,r,F,C]);xh(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,h(P=>({...P,isPositioned:!1})))},[u]);const I=p.useRef(!1);xh(()=>(I.current=!0,()=>{I.current=!1}),[]),xh(()=>{if(j&&(S.current=j),k&&(N.current=k),j&&k){if(_.current)return _.current(j,k,L);L()}},[j,k,L,_,E]);const O=p.useMemo(()=>({reference:S,floating:N,setReference:y,setFloating:x}),[y,x]),U=p.useMemo(()=>({reference:j,floating:k}),[j,k]),M=p.useMemo(()=>{const P={position:r,left:0,top:0};if(!U.floating)return P;const z=E1(U.floating,d.x),B=E1(U.floating,d.y);return l?{...P,transform:"translate("+z+"px, "+B+"px)",...SC(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:z,top:B}},[r,l,U.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:L,refs:O,elements:U,floatingStyles:M}),[d,L,O,U,M])}const tz=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?_1({element:n.current,padding:s}).fn(r):{}:n?_1({element:n,padding:s}).fn(r):{}}}},rz=(e,t)=>({...WM(e),options:[e,t]}),nz=(e,t)=>({...qM(e),options:[e,t]}),sz=(e,t)=>({...ZM(e),options:[e,t]}),iz=(e,t)=>({...KM(e),options:[e,t]}),oz=(e,t)=>({...GM(e),options:[e,t]}),az=(e,t)=>({...QM(e),options:[e,t]}),lz=(e,t)=>({...tz(e),options:[e,t]});var cz="Arrow",AC=p.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return o.jsx(ye.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});AC.displayName=cz;var uz=AC;function lm(e){const[t,r]=p.useState(void 0);return qt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let a,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;r({width:a,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var l0="Popper",[NC,cm]=hs(l0),[dz,CC]=NC(l0),_C=e=>{const{__scopePopper:t,children:r}=e,[n,s]=p.useState(null);return o.jsx(dz,{scope:t,anchor:n,onAnchorChange:s,children:r})};_C.displayName=l0;var EC="PopperAnchor",PC=p.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=CC(EC,r),a=p.useRef(null),l=_e(t,a);return p.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:o.jsx(ye.div,{...s,ref:l})});PC.displayName=EC;var c0="PopperContent",[hz,fz]=NC(c0),TC=p.forwardRef((e,t)=>
vendor: 4,461 bytes, line 514
514{var ee,Pe,He,Ae,Ne,Te;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:v,...g}=e,w=CC(c0,r),[b,y]=p.useState(null),x=_e(t,Nt=>y(Nt)),[j,k]=p.useState(null),S=lm(j),N=(S==null?void 0:S.width)??0,A=(S==null?void 0:S.height)??0,E=n+(i!=="center"?"-"+i:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},F=Array.isArray(u)?u:[u],C=F.length>0,L={padding:_,boundary:F.filter(pz),altBoundary:C},{refs:I,floatingStyles:O,placement:U,isPositioned:M,middlewareData:P}=ez({strategy:"fixed",placement:E,whileElementsMounted:(...Nt)=>HM(...Nt,{animationFrame:m==="always"}),elements:{reference:w.anchor},middleware:[rz({mainAxis:s+A,alignmentAxis:a}),c&&nz({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?sz():void 0,...L}),c&&iz({...L}),oz({...L,apply:({elements:Nt,rects:Kt,availableWidth:Er,availableHeight:gt})=>{const{width:Kr,height:Ys}=Kt.reference,Gr=Nt.floating.style;Gr.setProperty("--radix-popper-available-width",`${Er}px`),Gr.setProperty("--radix-popper-available-height",`${gt}px`),Gr.setProperty("--radix-popper-anchor-width",`${Kr}px`),Gr.setProperty("--radix-popper-anchor-height",`${Ys}px`)}}),j&&lz({element:j,padding:l}),gz({arrowWidth:N,arrowHeight:A}),f&&az({strategy:"referenceHidden",...L})]}),[z,B]=IC(U),re=Ht(v);qt(()=>{M&&(re==null||re())},[M,re]);const Q=(ee=P.arrow)==null?void 0:ee.x,fe=(Pe=P.arrow)==null?void 0:Pe.y,pe=((He=P.arrow)==null?void 0:He.centerOffset)!==0,[Me,Ze]=p.useState();return qt(()=>{b&&Ze(window.getComputedStyle(b).zIndex)},[b]),o.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:M?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Me,"--radix-popper-transform-origin":[(Ae=P.transformOrigin)==null?void 0:Ae.x,(Ne=P.transformOrigin)==null?void 0:Ne.y].join(" "),...((Te=P.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(hz,{scope:r,placedSide:z,onArrowChange:k,arrowX:Q,arrowY:fe,shouldHideArrow:pe,children:o.jsx(ye.div,{"data-side":z,"data-align":B,...g,ref:x,style:{...g.style,animation:M?void 0:"none"}})})})});TC.displayName=c0;var RC="PopperArrow",mz={top:"bottom",right:"left",bottom:"top",left:"right"},OC=p.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=fz(RC,n),a=mz[i.placedSide];return o.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]: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:o.jsx(uz,{...s,ref:r,style:{...s.style,display:"block"}})})});OC.displayName=RC;function pz(e){return e!==null}var gz=e=>({name:"transformOrigin",options:e,fn(t){var w,b,y;const{placement:r,rects:n,middlewareData:s}=t,a=((w=s.arrow)==null?void 0:w.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=IC(r),h={start:"0%",center:"50%",end:"100%"}[d],f=(((b=s.arrow)==null?void 0:b.x)??0)+l/2,m=(((y=s.arrow)==null?void 0:y.y)??0)+c/2;let v="",g="";return u==="bottom"?(v=a?h:`${f}px`,g=`${-c}px`):u==="top"?(v=a?h:`${f}px`,g=`${n.floating.height+c}px`):u==="right"?(v=`${-c}px`,g=a?h:`${m}px`):u==="left"&&(v=`${n.floating.width+c}px`,g=a?h:`${m}px`),{data:{x:v,y:g}}}});function IC(e){const[t,r="center"]=e.split("-");return[t,r]}var xz=_C,DC=PC,LC=TC,MC=OC,[um,AX]=hs("Tooltip",[cm]),u0=cm(),zC="TooltipProvider",yz=700,P1="tooltip.open",[vz,FC]=um(zC),$C=e=>{const{__scopeTooltip:t,delayDuration:r=yz,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,a=p.useRef(!0),l=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),o.jsx(vz,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:p.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:i})};$C.displayName=zC;var VC="Tooltip",[NX,dm]=um(VC),Tx="TooltipTrigger",bz=p.forwardRef((e,t)=>
vendor: 5,599 bytes, line 514
514{const{__scopeTooltip:r,...n}=e,s=dm(Tx,r),i=FC(Tx,r),a=u0(r),l=p.useRef(null),c=_e(t,l,s.onTriggerChange),u=p.useRef(!1),d=p.useRef(!1),h=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),o.jsx(DC,{asChild:!0,...a,children:o.jsx(ye.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:he(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:he(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:he(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:he(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:he(e.onBlur,s.onClose),onClick:he(e.onClick,s.onClose)})})});bz.displayName=Tx;var wz="TooltipPortal",[CX,jz]=um(wz,{forceMount:void 0}),Tl="TooltipContent",UC=p.forwardRef((e,t)=>{const r=jz(Tl,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,a=dm(Tl,e.__scopeTooltip);return o.jsx(Vn,{present:n||a.open,children:a.disableHoverableContent?o.jsx(BC,{side:s,...i,ref:t}):o.jsx(kz,{side:s,...i,ref:t})})}),kz=p.forwardRef((e,t)=>{const r=dm(Tl,e.__scopeTooltip),n=FC(Tl,e.__scopeTooltip),s=p.useRef(null),i=_e(t,s),[a,l]=p.useState(null),{trigger:c,onClose:u}=r,d=s.current,{onPointerInTransitChange:h}=n,f=p.useCallback(()=>{l(null),h(!1)},[h]),m=p.useCallback((v,g)=>{const w=v.currentTarget,b={x:v.clientX,y:v.clientY},y=_z(b,w.getBoundingClientRect()),x=Ez(b,y),j=Pz(g.getBoundingClientRect()),k=Rz([...x,...j]);l(k),h(!0)},[h]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(c&&d){const v=w=>m(w,d),g=w=>m(w,c);return c.addEventListener("pointerleave",v),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",g)}}},[c,d,m,f]),p.useEffect(()=>{if(a){const v=g=>{const w=g.target,b={x:g.clientX,y:g.clientY},y=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),x=!Tz(b,a);y?f():x&&(f(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,d,a,u,f]),o.jsx(BC,{...e,ref:i})}),[Sz,Az]=um(VC,{isInside:!1}),Nz=u5("TooltipContent"),BC=p.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=e,c=dm(Tl,r),u=u0(r),{onClose:d}=c;return p.useEffect(()=>(document.addEventListener(P1,d),()=>document.removeEventListener(P1,d)),[d]),p.useEffect(()=>{if(c.trigger){const h=f=>{const m=f.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),o.jsx(Ju,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:o.jsxs(LC,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(Nz,{children:n}),o.jsx(Sz,{scope:r,isInside:!0,children:o.jsx(R5,{id:c.contentId,role:"tooltip",children:s||n})})]})})});UC.displayName=Tl;var HC="TooltipArrow",Cz=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=u0(r);return Az(HC,r).isInside?null:o.jsx(MC,{...s,...n,ref:t})});Cz.displayName=HC;function _z(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Ez(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 Pz(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function Tz(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const l=t[i],c=t[a],u=l.x,d=l.y,h=c.x,f=c.y;d>n!=f>n&&r<(h-u)*(n-d)/(f-d)+u&&(s=!s)}return s}function Rz(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),Oz(t)}function Oz(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],a=r[r.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Iz=$C,WC=UC;const Dz=Iz,Lz=p.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(WC,{ref:n,sideOffset:t,className:Ie("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
514de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));Lz.displayName=WC.displayName;var ql=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(){}},Qo=typeof window>"u"||"Deno"in globalThis;function fr(){}function Mz(e,t){return typeof e=="function"?e(t):e}function Rx(e){return typeof e=="number"&&e>=0&&e!==1/0}function qC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zi(e,t){return typeof e=="function"?e(t):e}function tn(e,t){return typeof e=="function"?e(t):e}function T1(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:a,stale:l}=e;if(a){if(n){if(t.queryHash!==d0(a,t.options))return!1}else if(!Su(t.queryKey,a))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||i&&!i(t))}function R1(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Zo(t.options.mutationKey)!==Zo(i))return!1}else if(!Su(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function d0(e,t){return((t==null?void 0:t.queryKeyHashFn)||Zo)(e)}function Zo(e){return JSON.stringify(e,(t,r)=>Ox(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Su(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Su(e[r],t[r])):!1}function KC(e,t){if(e===t)return e;const r=O1(e)&&O1(t);if(r||Ox(e)&&Ox(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),a=i.length,l=r?[]:{},c=new Set(n);let u=0;for(let d=0;d<a;d++){const h=r?d:i[d];(!r&&c.has(h)||r)&&e[h]===void 0&&t[h]===void 0?(l[h]=void 0,u++):(l[h]=KC(e[h],t[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return s===a&&u===s?e:l}return t}function lf(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 O1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ox(e){if(!I1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!I1(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function I1(e){return Object.prototype.toString.call(e)==="[object Object]"}function zz(e){return new Promise(t=>{setTimeout(t,e)})}function Ix(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?KC(e,t):t}function Fz(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function $z(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var h0=Symbol();function GC(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===h0?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function QC(e,t){return typeof e=="function"?e(...t):!!e}var Ao,gi,ll,Ok,Vz=(Ok=class extends ql{constructor(){super();me(this,Ao);me(this,gi);me(this,ll);ne(this,ll,t=>{if(!Qo&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){R(this,gi)||this.setEventListener(R(this,ll))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,gi))==null||t.call(this),ne(this,gi,void 0))}setEventListener(t){var r;ne(this,ll,t),(r=R(this,gi))==null||r.call(this),ne(this,gi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){R(this,Ao)!==t&&(ne(this,Ao,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof R(this,Ao)=="boolean"?R(this,Ao):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ao=new WeakMap,gi=new WeakMap,ll=new WeakMap,Ok),f0=new Vz,cl,xi,ul,Ik,Uz=(Ik=class extends ql{constructor(){super();me(this,cl,!0);me(this,xi);me(this,ul);ne(this,ul,t=>{if(!Qo&&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
vendor: 4,353 bytes, line 514
514)}}})}onSubscribe(){R(this,xi)||this.setEventListener(R(this,ul))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,xi))==null||t.call(this),ne(this,xi,void 0))}setEventListener(t){var r;ne(this,ul,t),(r=R(this,xi))==null||r.call(this),ne(this,xi,t(this.setOnline.bind(this)))}setOnline(t){R(this,cl)!==t&&(ne(this,cl,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return R(this,cl)}},cl=new WeakMap,xi=new WeakMap,ul=new WeakMap,Ik),cf=new Uz;function Dx(){let e,t;const r=new Promise((s,i)=>{e=s,t=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function Bz(e){return Math.min(1e3*2**e,3e4)}function ZC(e){return(e??"online")==="online"?cf.isOnline():!0}var XC=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function kp(e){return e instanceof XC}function YC(e){let t=!1,r=0,n=!1,s;const i=Dx(),a=g=>{var w;n||(f(new XC(g)),(w=e.abort)==null||w.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>f0.isFocused()&&(e.networkMode==="always"||cf.isOnline())&&e.canRun(),d=()=>ZC(e.networkMode)&&e.canRun(),h=g=>{var w;n||(n=!0,(w=e.onSuccess)==null||w.call(e,g),s==null||s(),i.resolve(g))},f=g=>{var w;n||(n=!0,(w=e.onError)==null||w.call(e,g),s==null||s(),i.reject(g))},m=()=>new Promise(g=>{var w;s=b=>{(n||u())&&g(b)},(w=e.onPause)==null||w.call(e)}).then(()=>{var g;s=void 0,n||(g=e.onContinue)==null||g.call(e)}),v=()=>{if(n)return;let g;const w=r===0?e.initialPromise:void 0;try{g=w??e.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(h).catch(b=>{var S;if(n)return;const y=e.retry??(Qo?0:3),x=e.retryDelay??Bz,j=typeof x=="function"?x(r,b):x,k=y===!0||typeof y=="number"&&r<y||typeof y=="function"&&y(r,b);if(t||!k){f(b);return}r++,(S=e.onFail)==null||S.call(e,r,b),zz(j).then(()=>u()?void 0:m()).then(()=>{t?f(b):v()})})};return{promise:i,cancel:a,continue:()=>(s==null||s(),i),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?v():m().then(v),i)}}var Hz=e=>setTimeout(e,0);function Wz(){let e=[],t=0,r=l=>{l()},n=l=>{l()},s=Hz;const i=l=>{t?e.push(l):s(()=>{r(l)})},a=()=>{const l=e;e=[],l.length&&s(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||a()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{s=l}}}var Mt=Wz(),No,Dk,JC=(Dk=class{constructor(){me(this,No)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rx(this.gcTime)&&ne(this,No,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qo?1/0:5*60*1e3))}clearGcTimeout(){R(this,No)&&(clearTimeout(R(this,No)),ne(this,No,void 0))}},No=new WeakMap,Dk),dl,Co,Jr,_o,sr,Uu,Eo,Cn,Ss,Lk,qz=(Lk=class extends JC{constructor(t){super();me(this,Cn);me(this,dl);me(this,Co);me(this,Jr);me(this,_o);me(this,sr);me(this,Uu);me(this,Eo);ne(this,Eo,!1),ne(this,Uu,t.defaultOptions),this.setOptions(t.options),this.observers=[],ne(this,_o,t.client),ne(this,Jr,R(this,_o).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ne(this,dl,Kz(this.options)),this.state=t.state??R(this,dl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,sr))==null?void 0:t.promise}setOptions(t){this.options={...R(this,Uu),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Jr).remove(this)}setData(t,r){const n=Ix(this.state.data,t,this.options);return Ee(this,Cn,Ss).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Ee(this,Cn,Ss).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=R(this,sr))==null?void 0:n.promise;return(s=R(this,sr))==null||s.cancel(t),r?r.then(fr).catch(fr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,dl))}isActive(){return this.observers.some(t=>tn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===h0||this.state.dataUpdateCount+this.state.errorUpdate
514Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zi(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:!qC(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=R(this,sr))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=R(this,sr))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Jr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(R(this,sr)&&(R(this,Eo)?R(this,sr).cancel({revert:!0}):R(this,sr).cancelRetry()),this.scheduleGc()),R(this,Jr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ee(this,Cn,Ss).call(this,{type:"invalidate"})}fetch(t,r){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(R(this,sr))return R(this,sr).continueRetry(),R(this,sr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(m=>m.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ne(this,Eo,!0),n.signal)})},i=()=>{const f=GC(this.options,r),v=(()=>{const g={client:R(this,_o),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return ne(this,Eo,!1),this.options.persister?this.options.persister(f,v,this):f(v)},l=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:R(this,_o),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(l,this),ne(this,Co,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Ee(this,Cn,Ss).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta});const c=f=>{var m,v,g,w;kp(f)&&f.silent||Ee(this,Cn,Ss).call(this,{type:"error",error:f}),kp(f)||((v=(m=R(this,Jr).config).onError)==null||v.call(m,f,this),(w=(g=R(this,Jr).config).onSettled)==null||w.call(g,this.state.data,f,this)),this.scheduleGc()};return ne(this,sr,YC({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var m,v,g,w;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(b){c(b);return}(v=(m=R(this,Jr).config).onSuccess)==null||v.call(m,f,this),(w=(g=R(this,Jr).config).onSettled)==null||w.call(g,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,m)=>{Ee(this,Cn,Ss).call(this,{type:"failed",failureCount:f,error:m})},onPause:()=>{Ee(this,Cn,Ss).call(this,{type:"pause"})},onContinue:()=>{Ee(this,Cn,Ss).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),R(this,sr).start()}},dl=new WeakMap,Co=new WeakMap,Jr=new WeakMap,_o=new WeakMap,sr=new WeakMap,Uu=new WeakMap,Eo=new WeakMap,Cn=new WeakSet,Ss=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,...e_(n.data,this.options),fetchMeta:t.meta??null};case"success":return ne(this,Co,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return kp(s)&&s.revert&&R(this,Co)?{...R(this,Co),fetchStatus:"idle"}
vendor: 5,105 bytes, line 514
514:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Mt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),R(this,Jr).notify({query:this,type:"updated",action:t})})},Lk);function e_(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ZC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Kz(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 Zn,Mk,Gz=(Mk=class extends ql{constructor(t={}){super();me(this,Zn);this.config=t,ne(this,Zn,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??d0(s,r);let a=this.get(i);return a||(a=new qz({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){R(this,Zn).has(t.queryHash)||(R(this,Zn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=R(this,Zn).get(t.queryHash);r&&(t.destroy(),r===t&&R(this,Zn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Mt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,Zn).get(t)}getAll(){return[...R(this,Zn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>T1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>T1(t,n)):r}notify(t){Mt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Mt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Mt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Zn=new WeakMap,Mk),Xn,ur,Po,Yn,si,zk,Qz=(zk=class extends JC{constructor(t){super();me(this,Yn);me(this,Xn);me(this,ur);me(this,Po);this.mutationId=t.mutationId,ne(this,ur,t.mutationCache),ne(this,Xn,[]),this.state=t.state||t_(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,Xn).includes(t)||(R(this,Xn).push(t),this.clearGcTimeout(),R(this,ur).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ne(this,Xn,R(this,Xn).filter(r=>r!==t)),this.scheduleGc(),R(this,ur).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,Xn).length||(this.state.status==="pending"?this.scheduleGc():R(this,ur).remove(this))}continue(){var t;return((t=R(this,Po))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,l,c,u,d,h,f,m,v,g,w,b,y,x,j,k,S,N,A;const r=()=>{Ee(this,Yn,si).call(this,{type:"continue"})};ne(this,Po,YC({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(E,_)=>{Ee(this,Yn,si).call(this,{type:"failed",failureCount:E,error:_})},onPause:()=>{Ee(this,Yn,si).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,ur).canRun(this)}));const n=this.state.status==="pending",s=!R(this,Po).canStart();try{if(n)r();else{Ee(this,Yn,si).call(this,{type:"pending",variables:t,isPaused:s}),await((a=(i=R(this,ur).config).onMutate)==null?void 0:a.call(i,t,this));const _=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));_!==this.state.context&&Ee(this,Yn,si).call(this,{type:"pending",context:_,variables:t,isPaused:s})}const E=await R(this,Po).start();return await((d=(u=R(this,ur).config).onSuccess)==null?void 0:d.call(u,E,t,this.state.context,this)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,E,t,this.state.context)),await((v=(m=R(this,ur).config).onSettled)==null?void 0:v.call(m,E,null,this.state.variables,this.state.context,this)),await((w=(g=this.options).onSettled)==null?void 0:w.call(g,E,null,t,this.state.context)),Ee(this,Yn,si).call(this,{type:"success",data:E}),E}catch(E){try{throw await((y=(b=R(this,ur).config).onError)==null?void 0:y.call(b,E,t,this.state.context,this)),await((j=(x=this.options).onError)==null?void 0:j.call(x,E,t,this.state.context)),await((S=(k=R(this,ur).config).onSettled)==null?void 0:S.call(k,void 0,E,this.state.variables,this.state.context,this)),await((A=(N=this.options).onSettled)==null?void 0:A.call(N,void 0,E,t,this.state.context)),E}finally{Ee(this,Yn,si).call(this,{type:"error",error:E})}}finally{R(this,ur).runNext(this)}}},Xn=new WeakMap,ur=new WeakMap,Po=new WeakMap,Yn=new WeakSet,si=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};
514case"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),Mt.batch(()=>{R(this,Xn).forEach(n=>{n.onMutationUpdate(t)}),R(this,ur).notify({mutation:this,type:"updated",action:t})})},zk);function t_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Es,_n,Bu,Fk,Zz=(Fk=class extends ql{constructor(t={}){super();me(this,Es);me(this,_n);me(this,Bu);this.config=t,ne(this,Es,new Set),ne(this,_n,new Map),ne(this,Bu,0)}build(t,r,n){const s=new Qz({mutationCache:this,mutationId:++fd(this,Bu)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){R(this,Es).add(t);const r=zd(t);if(typeof r=="string"){const n=R(this,_n).get(r);n?n.push(t):R(this,_n).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Es).delete(t)){const r=zd(t);if(typeof r=="string"){const n=R(this,_n).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&R(this,_n).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=zd(t);if(typeof r=="string"){const n=R(this,_n).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=zd(t);if(typeof r=="string"){const s=(n=R(this,_n).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Mt.batch(()=>{R(this,Es).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Es).clear(),R(this,_n).clear()})}getAll(){return Array.from(R(this,Es))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>R1(r,n))}findAll(t={}){return this.getAll().filter(r=>R1(t,r))}notify(t){Mt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 8,767 bytes, line 514
514r.state.isPaused);return Mt.batch(()=>Promise.all(t.map(r=>r.continue().catch(fr))))}},Es=new WeakMap,_n=new WeakMap,Bu=new WeakMap,Fk);function zd(e){var t;return(t=e.options.scope)==null?void 0:t.id}function D1(e){return{onFetch:(t,r)=>{var d,h,f,m,v;const n=t.options,s=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],a=((v=t.state.data)==null?void 0:v.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let g=!1;const w=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},b=GC(t.options,t.fetchOptions),y=async(x,j,k)=>{if(g)return Promise.reject();if(j==null&&x.pages.length)return Promise.resolve(x);const N=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:j,direction:k?"backward":"forward",meta:t.options.meta};return w(F),F})(),A=await b(N),{maxPages:E}=t.options,_=k?$z:Fz;return{pages:_(x.pages,A,E),pageParams:_(x.pageParams,j,E)}};if(s&&i.length){const x=s==="backward",j=x?Xz:L1,k={pages:i,pageParams:a},S=j(n,k);l=await y(k,S,x)}else{const x=e??i.length;do{const j=c===0?a[0]??n.initialPageParam:L1(n,l);if(c>0&&j==null)break;l=await y(l,j),c++}while(c<x)}return l};t.options.persister?t.fetchFn=()=>{var g,w;return(w=(g=t.options).persister)==null?void 0:w.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function L1(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 Xz(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 yt,yi,vi,hl,fl,bi,ml,pl,$k,Yz=($k=class{constructor(e={}){me(this,yt);me(this,yi);me(this,vi);me(this,hl);me(this,fl);me(this,bi);me(this,ml);me(this,pl);ne(this,yt,e.queryCache||new Gz),ne(this,yi,e.mutationCache||new Zz),ne(this,vi,e.defaultOptions||{}),ne(this,hl,new Map),ne(this,fl,new Map),ne(this,bi,0)}mount(){fd(this,bi)._++,R(this,bi)===1&&(ne(this,ml,f0.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,yt).onFocus())})),ne(this,pl,cf.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,yt).onOnline())})))}unmount(){var e,t;fd(this,bi)._--,R(this,bi)===0&&((e=R(this,ml))==null||e.call(this),ne(this,ml,void 0),(t=R(this,pl))==null||t.call(this),ne(this,pl,void 0))}isFetching(e){return R(this,yt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,yi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=R(this,yt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=R(this,yt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return R(this,yt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=R(this,yt).get(n.queryHash),i=s==null?void 0:s.state.data,a=Mz(t,i);if(a!==void 0)return R(this,yt).build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return Mt.batch(()=>R(this,yt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=R(this,yt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=R(this,yt);Mt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=R(this,yt);return Mt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Mt.batch(()=>R(this,yt).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(fr).catch(fr)}invalidateQueries(e,t={}){return Mt.batch(()=>(R(this,yt).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=Mt.batch(()=>R(this,yt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(fr)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(fr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=R(this,yt).build(this,t);return r.isStaleByTime(zi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(fr).catch(fr)}fetchInfiniteQuery(e){return e.behavior=D1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(fr).catch(fr)}ensureInfiniteQueryData(e){return e.behavior=D1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return cf.isOnline()?R(this,yi).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,yt)}getMutationCache(){return R(this,yi)}getDefaultOptions(){return R(this,vi)}setDefaultOptions(e){ne(this,vi,e)}setQueryDefaults(e,t){R(this,hl).set(Zo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,hl).values()],r={};return t.forEach(n=>{Su(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){R(this,fl).set(Zo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,fl).values()],r={};return t.forEach(n=>{Su(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,vi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=d0(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===h0&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,vi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,yt).clear(),R(this,yi).clear()}},yt=new WeakMap,yi=new WeakMap,vi=new WeakMap,hl=new WeakMap,fl=new WeakMap,bi=new WeakMap,ml=new WeakMap,pl=new WeakMap,$k),vr,ze,Hu,dr,To,gl,wi,ji,Wu,xl,yl,Ro,Oo,ki,vl,Ke,_c,Lx,Mx,zx,Fx,$x,Vx,Ux,r_,Vk,Jz=(Vk=class extends ql{constructor(t,r){super();me(this,Ke);me(this,vr);me(this,ze);me(this,Hu);me(this,dr);me(this,To);me(this,gl);me(this,wi);me(this,ji);me(this,Wu);me(this,xl);me(this,yl);me(this,Ro);me(this,Oo);me(this,ki);me(this,vl,new Set);this.options=r,ne(this,vr,t),ne(this,ji,null),ne(this,wi,Dx()),this.options.experimental_prefetchInRender||R(this,wi).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&&(R(this,ze).addObserver(this),M1(R(this,ze),this.options)?Ee(this,Ke,_c).call(this):this.updateResult(),Ee(this,Ke,Fx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Bx(R(this,ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Bx(R(this,ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ee(this,Ke,$x).call(this),Ee(this,Ke,Vx).call(this),R(this,ze).removeObserver(this)}setOptions(t){const r=this.options,n=R(this,ze);if(this.options=R(this,vr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof tn(this.options.enabled,R(this,ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ee(this,Ke,Ux).call(this),R(this,ze).setOptions(this.options),r._defaulted&&!lf(this.options,r)&&R(this,vr).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,ze),observer:this});const s=this.hasListeners();s&&z1(R(this,ze),n,this.options,r)&&Ee(this,Ke,_c).call(this),this.updateResult(),s&&(R(this,ze)!==n||tn(this.options.enabled,R(this,ze))!==tn(r.enabled,R(this,ze))||zi(this.options.staleTime,R(this,ze))!==zi(r.staleTime,R(this,ze)))&&Ee(this,Ke,Lx).call(this);const i=Ee(this,Ke,Mx).call(this);s&&(R(this,ze)!==n||tn(this.options.enabled,R(this,ze))!==tn(r.enabled,R(this,ze))||i!==R(this,ki))&&Ee(this,Ke,zx).call(this,i)}getOptimisticResult(t){const r=R(this,vr).getQueryCache().build(R(this,vr),t),n=this.createResult(r,t);return t6(this,n)&&(ne(this,dr,n),ne(this,gl,this.options),ne(this,To,R(this,ze).state)),n}getCurrentResult(){return R(this,dr)}
514trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),Reflect.get(n,s))})}trackProp(t){R(this,vl).add(t)}getCurrentQuery(){return R(this,ze)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=R(this,vr).defaultQueryOptions(t),n=R(this,vr).getQueryCache().build(R(this,vr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ee(this,Ke,_c).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,dr)))}createResult(t,r){var E;const n=R(this,ze),s=this.options,i=R(this,dr),a=R(this,To),l=R(this,gl),u=t!==n?t.state:R(this,Hu),{state:d}=t;let h={...d},f=!1,m;if(r._optimisticResults){const _=this.hasListeners(),F=!_&&M1(t,r),C=_&&z1(t,n,r,s);(F||C)&&(h={...h,...e_(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:v,errorUpdatedAt:g,status:w}=h;m=h.data;let b=!1;if(r.placeholderData!==void 0&&m===void 0&&w==="pending"){let _;i!=null&&i.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(_=i.data,b=!0):_=typeof r.placeholderData=="function"?r.placeholderData((E=R(this,yl))==null?void 0:E.state.data,R(this,yl)):r.placeholderData,_!==void 0&&(w="success",m=Ix(i==null?void 0:i.data,_,r),f=!0)}if(r.select&&m!==void 0&&!b)if(i&&m===(a==null?void 0:a.data)&&r.select===R(this,Wu))m=R(this,xl);else try{ne(this,Wu,r.select),m=r.select(m),m=Ix(i==null?void 0:i.data,m,r),ne(this,xl,m),ne(this,ji,null)}catch(_){ne(this,ji,_)}R(this,ji)&&(v=R(this,ji),m=R(this,xl),g=Date.now(),w="error");const y=h.fetchStatus==="fetching",x=w==="pending",j=w==="error",k=x&&y,S=m!==void 0,A={status:w,fetchStatus:h.fetchStatus,isPending:x,isSuccess:w==="success",isError:j,isInitialLoading:k,isLoading:k,data:m,dataUpdatedAt:h.dataUpdatedAt,error:v,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:j&&!S,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:j&&S,isStale:m0(t,r),refetch:this.refetch,promise:R(this,wi),isEnabled:tn(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const _=L=>{A.status==="error"?L.reject(A.error):A.data!==void 0&&L.resolve(A.data)},F=()=>{const L=ne(this,wi,A.promise=Dx());_(L)},C=R(this,wi);switch(C.status){case"pending":t.queryHash===n.queryHash&&_(C);break;case"fulfilled":(A.status==="error"||A.data!==C.value)&&F();break;case"rejected":(A.status!=="error"||A.error!==C.reason)&&F();break}}return A}updateResult(){const t=R(this,dr),r=this.createResult(R(this,ze),this.options);if(ne(this,To,R(this,ze).state),ne(this,gl,this.options),R(this,To).data!==void 0&&ne(this,yl,R(this,ze)),lf(r,t))return;ne(this,dr,r);const n=()=>
vendor: 4,713 bytes, line 514
514{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!R(this,vl).size)return!0;const a=new Set(i??R(this,vl));return this.options.throwOnError&&a.add("error"),Object.keys(R(this,dr)).some(l=>{const c=l;return R(this,dr)[c]!==t[c]&&a.has(c)})};Ee(this,Ke,r_).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ee(this,Ke,Fx).call(this)}},vr=new WeakMap,ze=new WeakMap,Hu=new WeakMap,dr=new WeakMap,To=new WeakMap,gl=new WeakMap,wi=new WeakMap,ji=new WeakMap,Wu=new WeakMap,xl=new WeakMap,yl=new WeakMap,Ro=new WeakMap,Oo=new WeakMap,ki=new WeakMap,vl=new WeakMap,Ke=new WeakSet,_c=function(t){Ee(this,Ke,Ux).call(this);let r=R(this,ze).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(fr)),r},Lx=function(){Ee(this,Ke,$x).call(this);const t=zi(this.options.staleTime,R(this,ze));if(Qo||R(this,dr).isStale||!Rx(t))return;const n=qC(R(this,dr).dataUpdatedAt,t)+1;ne(this,Ro,setTimeout(()=>{R(this,dr).isStale||this.updateResult()},n))},Mx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,ze)):this.options.refetchInterval)??!1},zx=function(t){Ee(this,Ke,Vx).call(this),ne(this,ki,t),!(Qo||tn(this.options.enabled,R(this,ze))===!1||!Rx(R(this,ki))||R(this,ki)===0)&&ne(this,Oo,setInterval(()=>{(this.options.refetchIntervalInBackground||f0.isFocused())&&Ee(this,Ke,_c).call(this)},R(this,ki)))},Fx=function(){Ee(this,Ke,Lx).call(this),Ee(this,Ke,zx).call(this,Ee(this,Ke,Mx).call(this))},$x=function(){R(this,Ro)&&(clearTimeout(R(this,Ro)),ne(this,Ro,void 0))},Vx=function(){R(this,Oo)&&(clearInterval(R(this,Oo)),ne(this,Oo,void 0))},Ux=function(){const t=R(this,vr).getQueryCache().build(R(this,vr),this.options);if(t===R(this,ze))return;const r=R(this,ze);ne(this,ze,t),ne(this,Hu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},r_=function(t){Mt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(R(this,dr))}),R(this,vr).getQueryCache().notify({query:R(this,ze),type:"observerResultsUpdated"})})},Vk);function e6(e,t){return tn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function M1(e,t){return e6(e,t)||e.state.data!==void 0&&Bx(e,t,t.refetchOnMount)}function Bx(e,t,r){if(tn(t.enabled,e)!==!1&&zi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&m0(e,t)}return!1}function z1(e,t,r,n){return(e!==t||tn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&m0(e,r)}function m0(e,t){return tn(t.enabled,e)!==!1&&e.isStaleByTime(zi(t.staleTime,e))}function t6(e,t){return!lf(e.getCurrentResult(),t)}var Si,Ai,br,Ps,Ls,yh,Hx,Uk,r6=(Uk=class extends ql{constructor(r,n){super();me(this,Ls);me(this,Si);me(this,Ai);me(this,br);me(this,Ps);ne(this,Si,r),this.setOptions(n),this.bindMethods(),Ee(this,Ls,yh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var s;const n=this.options;this.options=R(this,Si).defaultMutationOptions(r),lf(this.options,n)||R(this,Si).getMutationCache().notify({type:"observerOptionsUpdated",mutation:R(this,br),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Zo(n.mutationKey)!==Zo(this.options.mutationKey)?this.reset():((s=R(this,br))==null?void 0:s.state.status)==="pending"&&R(this,br).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=R(this,br))==null||r.removeObserver(this)}onMutationUpdate(r){Ee(this,Ls,yh).call(this),Ee(this,Ls,Hx).call(this,r)}getCurrentResult(){return R(this,Ai)}reset(){var r;(r=R(this,br))==null||r.removeObserver(this),ne(this,br,void 0),Ee(this,Ls,yh).call(this),Ee(this,Ls,Hx).call(this)}mutate(r,n){var s;return ne(this,Ps,n),(s=R(this,br))==null||s.removeObserver(this),ne(this,br,R(this,Si).getMutationCache().build(R(this,Si),this.options)),R(this,br).addObserver(this),R(this,br).execute(r)}},Si=new WeakMap,Ai=new WeakMap,br=new WeakMap,Ps=new WeakMap,Ls=new WeakSet,yh=function(){var n;const r=((n=R(this,br))==null?void 0:n.state)??t_();ne(this,Ai,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Hx=function(r){Mt.batch(()=>{var n,s,i,a,l,c,u,d;if(R(this,Ps)&&this.hasListeners()){const h=R(this,Ai).variables,f=R(this,Ai).context;(r==null?void 0:r.type)==="success"?((s=(n=R(this,Ps)).onSuccess)==null||s.call(n,r.data,h,f),(a=(i=R(this,Ps)).onSettled)==null||a.call(i,r.data,null,h,f)):(r==null?void 0:r.type)==="error"&&((c=(l=R(this,Ps)).onError)==null||c.call(l,r.error,h,f),(d=(u=R(this,Ps)).onSettled)==null||d.call(u,void 0,r.error,h,f))}
514this.listeners.forEach(h=>{h(R(this,Ai))})})},Uk),n_=p.createContext(void 0),Ot=e=>{const t=p.useContext(n_);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},n6=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),o.jsx(n_.Provider,{value:e,children:t})),s_=p.createContext(!1),s6=()=>p.useContext(s_);s_.Provider;function i6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var o6=p.createContext(i6()),a6=()=>p.useContext(o6),l6=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},c6=e=>{p.useEffect(()=>{e.clearReset()},[e])},u6=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||QC(r,[e.error,n])),d6=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))}},h6=(e,t)=>e.isLoading&&e.isFetching&&!t,f6=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,F1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function m6(e,t,r){var h,f,m,v,g;const n=s6(),s=a6(),i=Ot(),a=i.defaultQueryOptions(e);(f=(h=i.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||f.call(h,a),a._optimisticResults=n?"isRestoring":"optimistic",d6(a),l6(a,s),c6(s);const l=!i.getQueryCache().get(a.queryHash),[c]=p.useState(()=>new t(i,a)),u=c.getOptimisticResult(a),d=!n&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(w=>{const b=d?c.subscribe(Mt.batchCalls(w)):fr;return c.updateResult(),b},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setOptions(a)},[a,c]),f6(a,u))throw F1(a,c,s);if(u6({result:u,errorResetBoundary:s,throwOnError:a.throwOnError,query:i.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw u.error;if((v=(m=i.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||v.call(m,a,u),a.experimental_prefetchInRender&&!Qo&&h6(u,n)){const w=l?F1(a,c,s):(g=i.getQueryCache().get(a.queryHash))==null?void 0:g.promise;w==null||w.catch(fr).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?u:c.trackResult(u)}function Vt(e,t){return m6(e,Jz)}function Ft(e,t){const r=Ot(),[n]=p.useState(()=>new r6(r,e));p.useEffect(()=>{n.setOptions(e)},[n,e]);const s=p.useSyncExternalStore(p.useCallback(a=>n.subscribe(Mt.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=p.useCallback((a,l)=>{n.mutate(a,l).catch(fr)},[n]);if(s.error&&QC(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}/** 515 * react-router v7.12.0 516 * 517 * Copyright (c) Remix Software Inc. 518 * 519 * This source code is licensed under the MIT license found in the 520 * LICENSE.md file in the root directory of this source tree. 521 * 522 * @license MIT 523 */var $1="popstate";function p6(e={}){function t(n,s){let{pathname:i,search:a,hash:l}=n.location;return Wx("",{pathname:i,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:Au(s)}return x6(t,r,null,e)}function mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function g6(){return Math.random().toString(36).substring(2,10)}function V1(e,t){return{usr:e.state,key:e.key,idx:t}}function Wx(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Kl(t):t,state:r,key:t&&t.key||n||g6()}}function Au({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Kl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function x6(e,t,r,n={}){let{window:s=document.defaultView,v5Compat:i=!1}=n,a=s.history,l="POP",c=null,u=d();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function d(){return(a.state||{idx:null}).idx}function h(){l="POP";let w=d(),b=w==null?null:w-u;u=w,c&&c({action:l,location:g.location,delta:b})}function f(w,b){l="PUSH";let y=Wx(g.location,w,b);u=d()+1;let x=V1(y,u),j=g.createHref(y);try{a.pushState(x,"",j)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(j)}i&&c&&c({action:l,location:g.location,delta:1})}function m(w,b){l="REPLACE";let y=Wx(g.location,w,b);u=d();let x=V1(y,u),j=g.createHref(y);a.replaceState(x,"",j),i&&c&&c({action:l,location:g.location,delta:0})}function v(w){return y6(w)}let g={get action(){return l},get location(){return e(s,a)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener($1,h),c=w,()=>{s.removeEventListener($1,h),c=null}},createHref(w){return t(s,w)},createURL:v,encodeLocation(w){let b=v(w);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:m,go(w){return a.go(w)}};return g}function y6(e,t=!1){let r="http://localhost";
523typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),mt(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Au(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function i_(e,t,r="/"){return v6(e,t,r,!1)}function v6(e,t,r,n){let s=typeof t=="string"?Kl(t):t,i=Hs(s.pathname||"/",r);if(i==null)return null;let a=o_(e);b6(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=T6(i);l=E6(a[c],u,n)}return l}function o_(e,t=[],r=[],n="",s=!1){let i=(a,l,c=s,u)=>{let d={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:l,route:a};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&c)return;mt(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let h=Ds([n,d.relativePath]),f=r.concat(d);a.children&&a.children.length>0&&(mt(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),o_(a.children,t,f,h,c)),!(a.path==null&&!a.index)&&t.push({path:h,score:C6(h,a.index),routesMeta:f})};return e.forEach((a,l)=>{var c;if(a.path===""||!((c=a.path)!=null&&c.includes("?")))i(a,l);else for(let u of a_(a.path))i(a,l,!0,u)}),t}function a_(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let a=a_(n.join("/")),l=[];return l.push(...a.map(c=>c===""?i:[i,c].join("/"))),s&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function b6(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:_6(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var w6=/^:[\w-]+$/,j6=3,k6=2,S6=1,A6=10,N6=-2,U1=e=>e==="*";function C6(e,t){let r=e.split("/"),n=r.length;return r.some(U1)&&(n+=N6),t&&(n+=k6),r.filter(s=>!U1(s)).reduce((s,i)=>s+(w6.test(i)?j6:i===""?S6:A6),n)}function _6(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function E6(e,t,r=!1){let{routesMeta:n}=e,s={},i="/",a=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=uf({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h&&u&&r&&!n[n.length-1].route.index&&(h=uf({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
523Object.assign(s,h.params),a.push({params:s,pathname:Ds([i,h.pathname]),pathnameBase:D6(Ds([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=Ds([i,h.pathnameBase]))}return a}function uf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=P6(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],a=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:n.reduce((u,{paramName:d,isOptional:h},f)=>{if(d==="*"){let v=l[f]||"";a=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const m=l[f];return h&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function P6(e,t=!1,r=!0){hn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function T6(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Hs(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)||"/"}var l_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,R6=e=>l_.test(e);function O6(e,t="/"){let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Kl(e):e,i;if(r)if(R6(r))i=r;else{if(r.includes("//")){let a=r;r=r.replace(/\/\/+/g,"/"),hn(!1,`Pathnames cannot have embedded double slashes - normalizing ${a} -> ${r}`)}r.startsWith("/")?i=B1(r.substring(1),"/"):i=B1(r,t)}else i=t;return{pathname:i,search:L6(n),hash:M6(s)}}function B1(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Sp(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 I6(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function c_(e){let t=I6(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function u_(e,t,r,n=!1){let s;typeof e=="string"?s=Kl(e):(s={...e},mt(!s.pathname||!s.pathname.includes("?"),Sp("?","pathname","search",s)),mt(!s.pathname||!s.pathname.includes("#"),Sp("#","pathname","hash",s)),mt(!s.search||!s.search.includes("#"),Sp("#","search","hash",s)));let i=e===""||s.pathname==="",a=i?"/":s.pathname,l;if(a==null)l=r;else{let h=t.length-1;if(!n&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}l=h>=0?t[h]:"/"}let c=O6(s,l),u=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}var Ds=e=>e.join("/").replace(/\/\/+/g,"/"),D6=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),L6=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,M6=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,z6=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function F6(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function $6(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var d_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function h_(e,t){let r=e;if(typeof r!="string"||!l_.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,s=!1;if(d_)try{let i=new URL(window.location.href),a=r.startsWith("//")?new URL(i.protocol+r):new URL(r),l=Hs(a.pathname,t);a.origin===i.origin&&l!=null?r=l+a.search+a.hash:s=!0}catch{hn(!1,`<Link to="${r}">
523 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:s,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var f_=["POST","PUT","PATCH","DELETE"];new Set(f_);var V6=["GET",...f_];new Set(V6);var Gl=p.createContext(null);Gl.displayName="DataRouter";var hm=p.createContext(null);hm.displayName="DataRouterState";var U6=p.createContext(!1),m_=p.createContext({isTransitioning:!1});m_.displayName="ViewTransition";var B6=p.createContext(new Map);B6.displayName="Fetchers";var H6=p.createContext(null);H6.displayName="Await";var fn=p.createContext(null);fn.displayName="Navigation";var nd=p.createContext(null);nd.displayName="Location";var ms=p.createContext({outlet:null,matches:[],isDataRoute:!1});ms.displayName="Route";var p0=p.createContext(null);p0.displayName="RouteError";var p_="REACT_ROUTER_ERROR",W6="REDIRECT",q6="ROUTE_ERROR_RESPONSE";function K6(e){if(e.startsWith(`${p_}:${W6}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function G6(e){if(e.startsWith(`${p_}:${q6}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new z6(t.status,t.statusText,t.data)}catch{}}function Q6(e,{relative:t}={}){mt(sd(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=p.useContext(fn),{hash:s,pathname:i,search:a}=id(e,{relative:t}),l=i;return r!=="/"&&(l=i==="/"?r:Ds([r,i])),n.createHref({pathname:l,search:a,hash:s})}function sd(){return p.useContext(nd)!=null}function ps(){return mt(sd(),"useLocation() may be used only in the context of a <Router> component."),p.useContext(nd).location}var g_="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function x_(e){p.useContext(fn).static||p.useLayoutEffect(e)}function Un(){let{isDataRoute:e}=p.useContext(ms);return e?lF():Z6()}function Z6(){mt(sd(),"useNavigate() may be used only in the context of a <Router> component.");let e=p.useContext(Gl),{basename:t,navigator:r}=p.useContext(fn),{matches:n}=p.useContext(ms),{pathname:s}=ps(),i=JSON.stringify(c_(n)),a=p.useRef(!1);return x_(()=>{a.current=!0}),p.useCallback((c,u={})=>{if(hn(a.current,g_),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=u_(c,JSON.parse(i),s,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ds([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,i,s,e])}p.createContext(null);function y_(){let{matches:e}=p.useContext(ms),t=e[e.length-1];return t?t.params:{}}function id(e,{relative:t}={}){let{matches:r}=p.useContext(ms),{pathname:n}=ps(),s=JSON.stringify(c_(r));return p.useMemo(()=>u_(e,JSON.parse(s),n,t==="path"),[e,s,n,t])}function X6(e,t){return v_(e,t)}function v_(e,t,r,n,s){var y;mt(sd(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=p.useContext(fn),{matches:a}=p.useContext(ms),l=a[a.length-1],c=l?l.params:{},u=l?l.pathname:"/",d=l?l.pathnameBase:"/",h=l&&l.route;{let x=h&&h.path||"";w_(u,!h||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 524 525Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let f=ps(),m;if(t){let x=typeof t=="string"?Kl(t):t;mt(d==="/"||((y=x.pathname)==null?void 0:y.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${x.pathname}" was given in the \`location\` prop.`),m=x}else m=f;let v=m.pathname||"/",g=v;
525if(d!=="/"){let x=d.replace(/^\//,"").split("/");g="/"+v.replace(/^\//,"").split("/").slice(x.length).join("/")}let w=i_(e,{pathname:g});hn(h||w!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),hn(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let b=rF(w&&w.map(x=>Object.assign({},x,{params:Object.assign({},c,x.params),pathname:Ds([d,i.encodeLocation?i.encodeLocation(x.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?d:Ds([d,i.encodeLocation?i.encodeLocation(x.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathnameBase])})),a,r,n,s);return t&&b?p.createElement(nd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},b):b}function Y6(){let e=aF(),t=F6(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=p.createElement(p.Fragment,null,p.createElement("p",null,"ð¿ Hey developer ð"),p.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",p.createElement("code",{style:i},"ErrorBoundary")," or"," ",p.createElement("code",{style:i},"errorElement")," prop on your route.")),p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:s},r):null,a)}var J6=p.createElement(Y6,null),b_=class extends p.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=G6(e.digest);r&&(e=r)}let t=e!==void 0?p.createElement(ms.Provider,{value:this.props.routeContext},p.createElement(p0.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?p.createElement(eF,{error:e},t):t}};b_.contextType=U6;var Ap=new WeakMap;function eF({children:e,error:t}){let{basename:r}=p.useContext(fn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=K6(t.digest);if(n){let s=Ap.get(t);if(s)throw s;let i=h_(n.location,r);if(d_&&!Ap.get(t))if(i.isExternal||n.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw Ap.set(t,a),a}return p.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function tF({routeContext:e,match:t,children:r}){let n=p.useContext(Gl);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),p.createElement(ms.Provider,{value:e},r)}function rF(e,t=[],r=null,n=null,s=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r==null?void 0:r.errors;if(a!=null){let d=i.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);mt(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,c=-1;if(r)for(let d=0;d<i.length;d++){let h=i[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=d),h.route.id){let{loaderData:f,errors:m}
525=r,v=h.route.loader&&!f.hasOwnProperty(h.route.id)&&(!m||m[h.route.id]===void 0);if(h.route.lazy||v){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}let u=r&&n?(d,h)=>{var f,m;n(d,{location:r.location,params:((m=(f=r.matches)==null?void 0:f[0])==null?void 0:m.params)??{},unstable_pattern:$6(r.matches),errorInfo:h})}:void 0;return i.reduceRight((d,h,f)=>{let m,v=!1,g=null,w=null;r&&(m=a&&h.route.id?a[h.route.id]:void 0,g=h.route.errorElement||J6,l&&(c<0&&f===0?(w_("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,w=null):c===f&&(v=!0,w=h.route.hydrateFallbackElement||null)));let b=t.concat(i.slice(0,f+1)),y=()=>{let x;return m?x=g:v?x=w:h.route.Component?x=p.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=d,p.createElement(tF,{match:h,routeContext:{outlet:d,matches:b,isDataRoute:r!=null},children:x})};return r&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?p.createElement(b_,{location:r.location,revalidation:r.revalidation,component:g,error:m,children:y(),routeC
525ontext:{outlet:null,matches:b,isDataRoute:!0},onError:u}):y()},null)}function g0(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nF(e){let t=p.useContext(Gl);return mt(t,g0(e)),t}function sF(e){let t=p.useContext(hm);return mt(t,g0(e)),t}function iF(e){let t=p.useContext(ms);return mt(t,g0(e)),t}function x0(e){let t=iF(e),r=t.matches[t.matches.length-1];return mt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function oF(){return x0("useRouteId")}function aF(){var n;let e=p.useContext(p0),t=sF("useRouteError"),r=x0("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function lF(){let{router:e}=nF("useNavigate"),t=x0("useNavigate"),r=p.useRef(!1);return x_(()=>{r.current=!0}),p.useCallback(async(s,i={})=>{hn(r.current,g_),r.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...i}))},[e,t])}var H1={};function w_(e,t,r){!t&&!H1[e]&&(H1[e]=!0,hn(!1,r))}p.memo(cF);function cF({routes:e,future:t,state:r,onError:n}){return v_(e,void 0,r,n,t)}function Ge(e){mt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function uF({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:s,static:i=!1,unstable_useTransitions:a}){mt(!sd(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=p.useMemo(()=>({basename:l,navigator:s,static:i,unstable_useTransitions:a,future:{}}),[l,s,i,a]);typeof r=="string"&&(r=Kl(r));let{pathname:u="/",search:d="",hash:h="",state:f=null,key:m="default"}=r,v=p.useMemo(()=>{let g=Hs(u,l);return g==null?null:{location:{pathname:g,search:d,hash:h,state:f,key:m},navigationType:n}},[l,u,d,h,f,m,n]);return hn(v!=null,`<Router basename="${l}"> is not able to match the URL "${u}${d}${h}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:p.createElement(fn.Provider,{value:c},p.createElement(nd.Provider,{children:t,value:v}))}function dF({children:e,location:t}){return X6(qx(e),t)}function qx(e,t=[]){let r=[];return p.Children.forEach(e,(n,s)=>{if(!p.isValidElement(n))return;let i=[...t,s];if(n.type===p.Fragment){r.push.apply(r,qx(n.props.children,i));return}mt(n.type===Ge,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),mt(!n.props.index||!n.props.children,"An index route cannot have child routes.");let a={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,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=qx(n.props.children,i)),r.push(a)}),r}var vh="get",bh="application/x-www-form-urlencoded";function fm(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function hF(e){return fm(e)&&e.tagName.toLowerCase()==="button"}function fF(e){return fm(e)&&e.tagName.toLowerCase()==="form"}function mF(e){return fm(e)&&e.tagName.toLowerCase()==="input"}function pF(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function gF(e,t){return e.button===0&&(!t||t==="_self")&&!pF(e)}function Kx(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function xF(e,t){let r=Kx(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(i=>{r.append(s,i)})}),r}var Fd=null;function yF(){if(Fd===null)try{new FormData(document.createElement("form"),0),Fd=!1}catch{Fd=!0}return Fd}var vF=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Np(e){return e!=null&&!vF.has(e)?(hn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bh}"`),null):e}function bF(e,t){let r,n,s,i,a;if(fF(e)){let l=e.getAttribute("action");n=l?Hs(l,t):null,r=e.getAttribute("method")||vh,s=Np(e.getAttribute("enctype"))||bh,i=new FormData(e)}else if(hF(e)||mF(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(n=c?Hs(c,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||vh,s=Np(e.getAttribute("formenctype"))||Np(l.getAttribute("enctype"))||bh,i=new FormData(l,e),!yF()){let{name:u,type:d,value:h}=e;if(d==="image"){let f=u?`${u}.`:"";i.append(`${f}x`,"0"),i.append(`${f}y`,"0")}
525else u&&i.append(u,h)}}else{if(fm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=vh,n=null,s=bh,a=e}return i&&s==="text/plain"&&(a=i,i=void 0),{action:n,method:r.toLowerCase(),encType:s,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function y0(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wF(e,t,r,n){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:t&&Hs(s.pathname,t)==="/"?s.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${n}`,s}async function jF(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function kF(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function SF(e,t,r){let n=await Promise.all(e.map(async s=>{let i=t.routes[s.route.id];if(i){let a=await jF(i,r);return a.links?a.links():[]}return[]}));return _F(n.flat(1).filter(kF).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function W1(e,t,r,n,s,i){let a=(c,u)=>r[u]?c.route.id!==r[u].route.id:!0,l=(c,u)=>{var d;return r[u].pathname!==c.pathname||((d=r[u].route.path)==null?void 0:d.endsWith("*"))&&r[u].params["*"]!==c.params["*"]};return i==="assets"?t.filter((c,u)=>a(c,u)||l(c,u)):i==="data"?t.filter((c,u)=>{var h;let d=n.routes[c.route.id];if(!d||!d.hasLoader)return!1;if(a(c,u)||l(c,u))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function AF(e,t,{includeHydrateFallback:r}={}){return NF(e.map(n=>{let s=t.routes[n.route.id];if(!s)return[];let i=[s.module];return s.clientActionModule&&(i=i.concat(s.clientActionModule)),s.clientLoaderModule&&(i=i.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(i=i.concat(s.hydrateFallbackModule)),s.imports&&(i=i.concat(s.imports)),i}).flat(1))}function NF(e){return[...new Set(e)]}function CF(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function _F(e,t){let r=new Set;return new Set(t),e.reduce((n,s)=>{let i=JSON.stringify(CF(s));return r.has(i)||(r.add(i),n.push({key:i,link:s})),n},[])}function j_(){let e=p.useContext(Gl);return y0(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function EF(){let e=p.useContext(hm);return y0(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var v0=p.createContext(void 0);v0.displayName="FrameworkContext";function k_(){let e=p.useContext(v0);return y0(e,"You must render this element inside a <HydratedRouter> element"),e}function PF(e,t){let r=p.useContext(v0),[n,s]=p.useState(!1),[i,a]=p.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:h}=t,f=p.useRef(null);p.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let g=b=>{b.forEach(y=>{a(y.isIntersecting)})},w=new IntersectionObserver(g,{threshold:.5});return f.current&&w.observe(f.current),()=>{w.disconnect()}}},[e]),p.useEffect(()=>{if(n){let g=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(g)}}},[n]);let m=()=>{s(!0)},v=()=>{s(!1),a(!1)};return r?e!=="intent"?[i,f,{}]:[i,f,{onFocus:xc(l,m),onBlur:xc(c,v),onMouseEnter:xc(u,m),onMouseLeave:xc(d,v),onTouchStart:xc(h,m)}]:[!1,f,{}]}function xc(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function TF({page:e,...t}){let{router:r}=j_(),n=p.useMemo(()=>i_(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?p.createElement(OF,{page:e,matches:n,...t}):null}function RF(e){let{manifest:t,routeModules:r}=k_(),[n,s]=p.useState([]);return p.useEffect(()=>{let i=!1;return SF(e,t,r).then(a=>{i||s(a)}),()=>{i=!0}},[e,t,r]),n}function OF({page:e,matches:t,...r}){let n=ps(),{future:s,manifest:i,routeModules:a}=k_(),{basename:l}=j_(),{loaderData:c,matches:u}=EF(),d=p.useMemo(()=>W1(e,t,u,i,n,"data"),[e,t,u,i,n]),h=p.useMemo(()=>W1(e,t,u,i,n,"assets"),[e,t,u,i,n]),f=p.useMemo(()=>
525{if(e===n.pathname+n.search+n.hash)return[];let g=new Set,w=!1;if(t.forEach(y=>{var j;let x=i.routes[y.route.id];!x||!x.hasLoader||(!d.some(k=>k.route.id===y.route.id)&&y.route.id in c&&((j=a[y.route.id])!=null&&j.shouldRevalidate)||x.hasClientLoader?w=!0:g.add(y.route.id))}),g.size===0)return[];let b=wF(e,l,s.unstable_trailingSlashAwareDataRequests,"data");return w&&g.size>0&&b.searchParams.set("_routes",t.filter(y=>g.has(y.route.id)).map(y=>y.route.id).join(",")),[b.pathname+b.search]},[l,s.unstable_trailingSlashAwareDataRequests,c,n,i,d,t,e,a]),m=p.useMemo(()=>AF(h,i),[h,i]),v=RF(h);return p.createElement(p.Fragment,null,f.map(g=>p.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...r})),m.map(g=>p.createElement("link",{key:g,rel:"modulepreload",href:g,...r})),v.map(({key:g,link:w})=>p.createElement("link",{key:g,nonce:r.nonce,...w})))}function IF(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var DF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{DF&&(window.__reactRouterVersion="7.12.0")}catch{}function LF({basename:e,children:t,unstable_useTransitions:r,window:n}){let s=p.useRef();s.current==null&&(s.current=p6({window:n,v5Compat:!0}));let i=s.current,[a,l]=p.useState({action:i.action,location:i.location}),c=p.useCallback(u=>{r===!1?l(u):p.startTransition(()=>l(u))},[r]);return p.useLayoutEffect(()=>i.listen(c),[i,c]),p.createElement(uF,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:i,unstable_useTransitions:r})}var S_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Z=p.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:s,reloadDocument:i,replace:a,state:l,target:c,to:u,preventScrollReset:d,viewTransition:h,unstable_defaultShouldRevalidate:f,...m},v){let{basename:g,unstable_useTransitions:w}=p.useContext(fn),b=typeof u=="string"&&S_.test(u),y=h_(u,g);u=y.to;let x=Q6(u,{relative:s}),[j,k,S]=PF(n,m),N=$F(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:s,viewTransition:h,unstable_defaultShouldRevalidate:f,unstable_useTransitions:w});function A(_){t&&t(_),_.defaultPrevented||N(_)}let E=p.createElement("a",{...m,...S,href:y.absoluteURL||x,onClick:y.isExternal||i?t:A,ref:IF(v,k),target:c,"data-discover":!b&&r==="render"?"true":void 0});return j&&!b?p.createElement(p.Fragment,null,E,p.createElement(TF,{page:x})):E});Z.displayName="Link";var MF=p.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:s=!1,style:i,to:a,viewTransition:l,children:c,...u},d){let h=id(a,{relative:u.relative}),f=ps(),m=p.useContext(hm),{navigator:v,basename:g}=p.useContext(fn),w=m!=null&&WF(h)&&l===!0,b=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,y=f.pathname,x=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(y=y.toLowerCase(),x=x?x.toLowerCase():null,b=b.toLowerCase()),x&&g&&(x=Hs(x,g)||x);const j=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let k=y===b||!s&&y.startsWith(b)&&y.charAt(j)==="/",S=x!=null&&(x===b||!s&&x.startsWith(b)&&x.charAt(b.length)==="/"),N={isActive:k,isPending:S,isTransitioning:w},A=k?t:void 0,E;typeof n=="function"?E=n(N):E=[n,k?"active":null,S?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let _=typeof i=="function"?i(N):i;return p.createElement(Z,{...u,"aria-current":A,className:E,ref:d,style:_,to:a,viewTransition:l},typeof c=="function"?c(N):c)});MF.displayName="NavLink";var zF=p.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:s,state:i,method:a=vh,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:h,unstable_defaultShouldRevalidate:f,...m},v)=>{let{unstable_useTransitions:g}=p.useContext(fn),w=BF(),b=HF(l,{relative:u}),y=a.toLowerCase()==="get"?"get":"post",x=typeof l=="string"&&S_.test(l),j=k=>{if(c&&c(k),k.defaultPrevented)return;k.preventDefault();let S=k.nativeEvent.submitter,N=(S==null?void 0:S.getAttribute("formmethod"))||a,A=()=>w(S||k.currentTarget,{fetcherKey:t,method:N,navigate:r,replace:s,state:i,relative:u,preventScrollReset:d,viewTransition:h,unstable_defaultShouldRevalidate:f});g&&r!==!1?p.startTransition(()=>A()):A()};return p.createElement("form",{ref:v,method:y,action:b,onSubmit:n?c:j,...m,"data-discover":!x&&e==="render"?"true":void 0})});zF.displayName="Form";function FF(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function A_(e){let t=p.useContext(Gl);return mt(t,FF(e)),t}function $F(e,{target:t,replace:r,state:n,preventScrollReset:s,relative:i,viewTransition:a,unstable_defaultShouldRevalidate:l,unstable_useTransitions:c}={}){let u=Un(),d=ps(),h=id(e,{relative:i});return p.useCallback(f=>{if(gF(f,t)){f.preventDefault();let m=r!==void 0?r:Au(d)===Au(h),v=()=>u(e,{replace:m,state:n,preventScrollReset:s,relative:i,viewTransition:a,unstable_defaultShouldRevalidate:l});c?p.startTransition(()=>v()):v()}},[d,u,h,r,n,t,e,s,i,a,l,c])}function mm(e){hn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=p.useRef(Kx(e)),r=p.useRef(!1),n=ps(),s=p.useMemo(()=>xF(n.search,r.current?null:t.current),[n.search]),i=Un(),a=p.useCallback((l,c)=>{const u=Kx(typeof l=="function"?l(new URLSearchParams(s)):l);r.current=!0,i("?"+u,c)},[i,s]);return[s,a]}var VF=0,UF=()=>`__${String(++VF)}__`;function BF(){let{router:e}=A_("useSubmit"),{basename:t}=p.useContext(fn),r=oF(),n=e.fetch,s=e.navigate;return p.useCallback(async(i,a={})=>{let{action:l,method:c,encType:u,formData:d,body:h}=bF(i,t);if(a.navigate===!1){let f=a.fetcherKey||UF();await n(f,r,a.action||l,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:d,body:h,formMethod:a.method||c,formEncType:a.encType||u,flushSync:a.flushSync})}else await s(a.action||l,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:d,body:h,formMethod:a.method||c,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,s,t,r])}function HF(e,{relative:t}={}){let{basename:r}=p.useContext(fn),n=p.useContext(ms);mt(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),i={...id(e||".",{relative:t})},a=ps();if(e==null){i.search=a.search;let l=new URLSearchParams(i.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(h=>
525h).forEach(h=>l.append("index",h));let d=l.toString();i.search=d?`?${d}`:""}}return(!e||e===".")&&s.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Ds([r,i.pathname])),Au(i)}function WF(e,{relative:t}={}){let r=p.useContext(m_);mt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=A_("useViewTransitionState"),s=id(e,{relative:t});if(!r.isTransitioning)return!1;let i=Hs(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=Hs(r.nextLocation.pathname,n)||r.nextLocation.pathname;return uf(s.pathname,a)!=null||uf(s.pathname,i)!=null}const b0=p.createContext({});function w0(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const j0=typeof window<"u",N_=j0?p.useLayoutEffect:p.useEffect,pm=p.createContext(null);function k0(e,t){e.indexOf(t)===-1&&e.push(t)}function S0(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Ws=(e,t,r)=>r>t?t:r<e?e:r;let df=()=>{};const qs={},C_=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function __(e){return typeof e=="object"&&e!==null}const E_=e=>/^0[^.\s]+$/u.test(e);function A0(e){let t;return()=>(t===void 0&&(t=e()),t)}const cn=e=>e,qF=(e,t)=>r=>t(e(r)),od=(...e)=>e.reduce(qF),Nu=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class N0{constructor(){this.subscriptions=[]}add(t){return k0(this.subscriptions,t),()=>S0(this.subscriptions,t)}notify(t,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,r,n);else for(let i=0;i<s;i++){const a=this.subscriptions[i];a&&a(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const as=e=>e*1e3,an=e=>e/1e3;function P_(e,t){return t?e*(1e3/t):0}const T_=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,KF=1e-7,GF=12;function QF(e,t,r,n,s){let i,a,l=0;do a=t+(r-t)/2,i=T_(a,n,s)-e,i>0?r=a:t=a;while(Math.abs(i)>KF&&++l<GF);return a}function ad(e,t,r,n){if(e===t&&r===n)return cn;const s=i=>QF(i,0,1,e,r);return i=>i===0||i===1?i:T_(s(i),t,n)}const R_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,O_=e=>t=>1-e(1-t),I_=ad(.33,1.53,.69,.99),C0=O_(I_),D_=R_(C0),L_=e=>(e*=2)<1?.5*C0(e):.5*(2-Math.pow(2,-10*(e-1))),_0=e=>1-Math.sin(Math.acos(e)),M_=O_(_0),z_=R_(_0),ZF=ad(.42,0,1,1),XF=ad(0,0,.58,1),F_=ad(.42,0,.58,1),YF=e=>Array.isArray(e)&&typeof e[0]!="number",$_=e=>Array.isArray(e)&&typeof e[0]=="number",q1={linear:cn,easeIn:ZF,easeInOut:F_,easeOut:XF,circIn:_0,circInOut:z_,circOut:M_,backIn:C0,backInOut:D_,backOut:I_,anticipate:L_},JF=e=>typeof e=="string",K1=e=>{if($_(e)){df(e.length===4);const[t,r,n,s]=e;return ad(t,r,n,s)}else if(JF(e))return df(q1[e]!==void 0),q1[e];return e},$d=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],G1={value:null,addProjectionMetrics:null};function e$(e,t){let r=new Set,n=new Set,s=!1,i=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(h){a.has(h)&&(d.schedule(h),e()),c++,h(l)}const d={schedule:(h,f=!1,m=!1)=>{const g=m&&s?r:n;return f&&a.add(h),g.has(h)||g.add(h),h},cancel:h=>{n.delete(h),a.delete(h)},process:h=>{if(l=h,s){i=!0;return}s=!0,[r,n]=[n,r],r.forEach(u),t&&G1.value&&G1.value.frameloop[t].push(c),c=0,r.clear(),s=!1,i&&(i=!1,d.process(h))}};return d}const t$=40;function V_(e,t){let r=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,a=$d.reduce((x,j)=>(x[j]=e$(i,t?j:void 0),x),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:f,render:m,postRender:v}=a,g=()=>{const x=qs.useManualTiming?s.timestamp:performance.now();r=!1,qs.useManualTiming||(s.delta=n?1e3/60:Math.max(Math.min(x-s.timestamp,t$),1)),s.timestamp=x,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),d.process(s),h.process(s),f.process(s),m.process(s),v.process(s),s.isProcessing=!1,r&&t&&(n=!1,e(g))},w=()=>{r=!0,n=!0,s.isProcessing||e(g)};return{schedule:$d.reduce((x,j)=>{const k=a[j];return x[j]=(S,N=!1,A=!1)=>(r||w(),k.schedule(S,N,A)),x},{}),cancel:x=>{for(let j=0;j<$d.length;j++)a[$d[j]].cancel(x)},state:s,steps:a}}const{schedule:at,cancel:Ki,state:Xt,steps:Cp}=V_(typeof requestAnimationFrame<"u"?requestAnimationFrame:cn,!0);let wh;function r$(){wh=void 0}const Ar={now:()=>(wh===void 0&&Ar.set(Xt.isProcessing||qs.useManualTiming?Xt.timestamp:performance.now()),wh),set
vendor: 19,704 bytes, line 525
525:e=>{wh=e,queueMicrotask(r$)}},U_=e=>t=>typeof t=="string"&&t.startsWith(e),B_=U_("--"),n$=U_("var(--"),E0=e=>n$(e)?s$.test(e.split("/*")[0].trim()):!1,s$=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ql={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cu={...Ql,transform:e=>Ws(0,1,e)},Vd={...Ql,default:1},qc=e=>Math.round(e*1e5)/1e5,P0=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function i$(e){return e==null}const o$=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,T0=(e,t)=>r=>!!(typeof r=="string"&&o$.test(r)&&r.startsWith(e)||t&&!i$(r)&&Object.prototype.hasOwnProperty.call(r,t)),H_=(e,t,r)=>n=>{if(typeof n!="string")return n;const[s,i,a,l]=n.match(P0);return{[e]:parseFloat(s),[t]:parseFloat(i),[r]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},a$=e=>Ws(0,255,e),_p={...Ql,transform:e=>Math.round(a$(e))},bo={test:T0("rgb","red"),parse:H_("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+_p.transform(e)+", "+_p.transform(t)+", "+_p.transform(r)+", "+qc(Cu.transform(n))+")"};function l$(e){let t="",r="",n="",s="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),t+=t,r+=r,n+=n,s+=s),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const Gx={test:T0("#"),parse:l$,transform:bo.transform},ld=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ii=ld("deg"),ls=ld("%"),ve=ld("px"),c$=ld("vh"),u$=ld("vw"),Q1={...ls,parse:e=>ls.parse(e)/100,transform:e=>ls.transform(e*100)},$a={test:T0("hsl","hue"),parse:H_("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+ls.transform(qc(t))+", "+ls.transform(qc(r))+", "+qc(Cu.transform(n))+")"},Et={test:e=>bo.test(e)||Gx.test(e)||$a.test(e),parse:e=>bo.test(e)?bo.parse(e):$a.test(e)?$a.parse(e):Gx.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?bo.transform(e):$a.transform(e),getAnimatableNone:e=>{const t=Et.parse(e);return t.alpha=0,Et.transform(t)}},d$=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function h$(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(P0))==null?void 0:t.length)||0)+(((r=e.match(d$))==null?void 0:r.length)||0)>0}const W_="number",q_="color",f$="var",m$="var(",Z1="${}",p$=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function _u(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},s=[];let i=0;const l=t.replace(p$,c=>(Et.test(c)?(n.color.push(i),s.push(q_),r.push(Et.parse(c))):c.startsWith(m$)?(n.var.push(i),s.push(f$),r.push(c)):(n.number.push(i),s.push(W_),r.push(parseFloat(c))),++i,Z1)).split(Z1);return{values:r,split:l,indexes:n,types:s}}function K_(e){return _u(e).values}function G_(e){const{split:t,types:r}=_u(e),n=t.length;return s=>{let i="";for(let a=0;a<n;a++)if(i+=t[a],s[a]!==void 0){const l=r[a];l===W_?i+=qc(s[a]):l===q_?i+=Et.transform(s[a]):i+=s[a]}return i}}const g$=e=>typeof e=="number"?0:Et.test(e)?Et.getAnimatableNone(e):e;function x$(e){const t=K_(e);return G_(e)(t.map(g$))}const Gi={test:h$,parse:K_,createTransformer:G_,getAnimatableNone:x$};function Ep(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function y$({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let s=0,i=0,a=0;if(!t)s=i=a=r;else{const l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;s=Ep(c,l,e+1/3),i=Ep(c,l,e),a=Ep(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}function hf(e,t){return r=>r>0?t:e}const ht=(e,t,r)=>e+(t-e)*r,Pp=(e,t,r)=>{const n=e*e,s=r*(t*t-n)+n;return s<0?0:Math.sqrt(s)},v$=[Gx,bo,$a],b$=e=>v$.find(t=>t.test(e));function X1(e){const t=b$(e);if(!t)return!1;let r=t.parse(e);return t===$a&&(r=y$(r)),r}const Y1=(e,t)=>{const r=X1(e),n=X1(t);if(!r||!n)return hf(e,t);const s={...r};return i=>(s.red=Pp(r.red,n.red,i),s.green=Pp(r.green,n.green,i),s.blue=Pp(r.blue,n.blue,i),s.alpha=ht(r.alpha,n.alpha,i),bo.transform(s))},Qx=new Set(["none","hidden"]);function w$(e,t){return Qx.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function j$(e,t){return r=>ht(e,t,r)}function R0(e){return typeof e=="number"?j$:typeof e=="string"?E0(e)?hf:Et.test(e)?Y1:A$:Array.isArray(e)?Q_:typeof e=="object"?Et.test(e)?Y1:k$:hf}function Q_(e,t){const r=[...e],n=r.length,s=e.map((i,a)=>R0(i)(i,t[a]));return i=>{for(let a=0;a<n;a++)r[a]=s[a](i);return r}}function k$(e,t){const r={...e,...t},n={};for(const s in r)e[s]!==void 0&&t[s]!==void 0&&(n[s]=R0(e[s])(e[s],t[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}}function S$(e,t){const r=[],n={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][n[i]],l=e.values[a]??0;r[s]=l,n[i]++}return r}const A$=(e,t)=>{const r=Gi.createTransformer(t),n=_u(e),s=_u(t);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?Qx.has(e)&&!s.values.length||Qx.has(t)&&!n.values.length?w$(e,t):od(Q_(S$(n,s),s.values),r):hf(e,t)};function Z_(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?ht(e,t,r):R0(e)(e,t)}const N$=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>at.update(t,r),stop:()=>Ki(t),now:()=>Xt.isProcessing?Xt.timestamp:Ar.now()}},X_=(e,t,r=10)=>{let n="";const s=Math.max(Math.round(t/r),2);for(let i=0;i<s;i++)n+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},ff=2e4;function O0(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<ff;)t+=r,n=e.next(t);return t>=ff?1/0:t}function C$(e,t=100,r){const n=r({...e,keyframes:[0,t]}),s=Math.min(O0(n),ff);return{type:"keyframes",ease:i=>n.next(s*i).value/t,duration:an(s)}}const _$=5;function Y_(e,t,r){const n=Math.max(t-_$,0);return P_(r-e(n),t-n)}const bt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Tp=.001;function E$({duration:e=bt.duration,bounce:t=bt.bounce,velocity:r=bt.velocity,mass:n=bt.mass}){let s,i,a=1-t;a=Ws(bt.minDamping,bt.maxDamping,a),e=Ws(bt.minDuration,bt.maxDuration,an(e)),a<1?(s=u=>{const d=u*a,h=d*e,f=d-r,m=Zx(u,a),v=Math.exp(-h);return Tp-f/m*v},i=u=>{const h=u*a*e,f=h*r+r,m=Math.pow(a,2)*Math.pow(u,2)*e,v=Math.exp(-h),g=Zx(Math.pow(u,2),a);return(-s(u)+Tp>0?-1:1)*((f-m)*v)/g}):(s=u=>{const d=Math.exp(-u*e),h=(u-r)*e+1;return-Tp+d*h},i=u=>{const d=Math.exp(-u*e),h=(r-u)*(e*e);return d*h});const l=5/e,c=T$(s,i,l);if(e=as(e),isNaN(c))return{stiffness:bt.stiffness,damping:bt.damping,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:a*2*Math.sqrt(n*u),duration:e}}}const P$=12;function T$(e,t,r){let n=r;for(let s=1;s<P$;s++)n=n-e(n)/t(n);return n}function Zx(e,t){return e*Math.sqrt(1-t*t)}const R$=["duration","bounce"],O$=["stiffness","damping","mass"];function J1(e,t){return t.some(r=>e[r]!==void 0)}function I$(e){let t={velocity:bt.velocity,stiffness:bt.stiffness,damping:bt.damping,mass:bt.mass,isResolvedFromDuration:!1,...e};if(!J1(e,O$)&&J1(e,R$))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),s=n*n,i=2*Ws(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:bt.mass,stiffness:s,damping:i}}else{const r=E$(e);t={...t,...r,mass:bt.mass},t.isResolvedFromDuration=!0}return t}function mf(e=bt.visualDuration,t=bt.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:s}=r;const i=r.keyframes[0],a=r.keyframes[r.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:m}=I$({...r,velocity:-an(r.velocity||0)}),v=f||0,g=u/(2*Math.sqrt(c*d)),w=a-i,b=an(Math.sqrt(c/d)),y=Math.abs(w)<5;n||(n=y?bt.restSpeed.granular:bt.restSpeed.default),s||(s=y?bt.restDelta.granular:bt.restDelta.default);let x;if(g<1){const k=Zx(b,g);x=S=>{const N=Math.exp(-g*b*S);return a-N*((v+g*b*w)/k*Math.sin(k*S)+w*Math.cos(k*S))}}else if(g===1)x=k=>a-Math.exp(-b*k)*(w+(v+b*w)*k);else{const k=b*Math.sqrt(g*g-1);x=S=>{const N=Math.exp(-g*b*S),A=Math.min(k*S,300);return a-N*((v+g*b*w)*Math.sinh(A)+k*w*Math.cosh(A))/k}}const j={calculatedDuration:m&&h||null,next:k=>{const S=x(k);if(m)l.done=k>=h;else{let N=k===0?v:0;g<1&&(N=k===0?as(v):Y_(x,k,S));const A=Math.abs(N)<=n,E=Math.abs(a-S)<=s;l.done=A&&E}return l.value=l.done?a:S,l},toString:()=>{const k=Math.min(O0(j),ff),S=X_(N=>j.next(k*N).value,k,30);return k+"ms "+S},toTransition:()=>{}};return j}mf.applyToOptions=e=>{const t=C$(e,100,mf);return e.ease=t.ease,e.duration=as(t.duration),e.type="keyframes",e};function Xx({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},m=A=>l!==void 0&&A<l||c!==void 0&&A>c,v=A=>l===void 0?c:c===void 0||Math.abs(l-A)<Math.abs(c-A)?l:c;let g=r*t;const w=h+g,b=a===void 0?w:a(w);b!==w&&(g=b-h);const y=A=>-g*Math.exp(-A/n),x=A=>b+y(A),j=A=>{const E=y(A),_=x(A);f.done=Math.abs(E)<=u,f.value=f.done?b:_};let k,S;const N=A=>{m(f.value)&&(k=A,S=mf({keyframes:[f.value,v(f.value)],velocity:Y_(x,A,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return N(0),{calculatedDuration:null,next:A=>{let E=!1;return!S&&k===void 0&&(E=!0,j(A),N(A)),k!==void 0&&A>=k?S.next(A-k):(!E&&j(A),f)}}}function D$(e,t,r){const n=[],s=r||qs.mix||Z_,i=e.length-1;for(let a=0;a<i;a++){let l=s(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||cn:t;l=od(c,l)}n.push(l)}return n}function L$(e,t,{clamp:r=!0,ease:n,mixer:s}={}){const i=e.length;if(df(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=D$(t,n,s),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=Nu(e[h],e[h+1],d);return l[h](f)};return r?d=>u(Ws(e[0],e[i-1],d)):u}function M$(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const s=Nu(0,t,n);e.push(ht(r,1,s))}}function z$(e){const t=[0];return M$(t,e.length-1),t}function F$(e,t){return e.map(r=>r*t)}function $$(e,t){return e.map(()=>t||F_).splice(0,e.length-1)}function Kc({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const s=YF(n)?n.map(K1):K1(n),i={done:!1,value:t[0]},a=F$(r&&r.length===t.length?r:z$(t),e),l=L$(a,t,{ease:Array.isArray(s)?s:$$(t,s)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const V$=e=>e!==null;function I0(e,{repeat:t,repeatType:r="loop"},n,s=1){const i=e.filter(V$),l=s<0||t&&r!=="loop"&&t%2===1?0:i.length-1;return!l||n===void 0?i[l]:n}const U$={decay:Xx,inertia:Xx,tween:Kc,keyframes:Kc,spring:mf};function J_(e){typeof e.type=="string"&&(e.type=U$[e.type])}class D0{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const B$=e=>e/100;class L0 extends D0{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,s;const{motionValue:r}=this.options;r&&r.updatedAt!==Ar.now()&&this.tick(Ar.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(n=this.options).onStop)==null||s.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;J_(t);const{type:r=Kc,repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:a=0}=t;let{keyframes:l}=t;const c=r||Kc;c!==Kc&&typeof l[0]!="number"&&(this.mixKeyframes=od(B$,Z_(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=O0(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=u}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:s,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:m,type:v,onUpdate:g,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?b<0:b>s;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let x=this.currentTime,j=n;if(h){const A=Math.min(this.currentTime,s)/l;let E=Math.floor(A),_=A%1;!_&&A>=1&&(_=1),_===1&&E--,E=Math.min(E,h+1),!!(E%2)&&(f==="reverse"?(_=1-_,m&&(_-=m/l)):f==="mirror"&&(j=a)),x=Ws(0,1,_)*l}const k=y?{done:!1,value:d[0]}:j.next(x);i&&(k.value=i(k.value));let{done:S}=k;!y&&c!==null&&(S=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return N&&v!==Xx&&(k.value=I0(d,this.options,w,this.speed)),g&&g(k.value),N&&this.finish(),k}then(t,r){return this.finished.then(t,r)}get duration(){return an(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+an(t)}get time(){return an(this.currentTime)}set time(t){var r;t=as(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(r=this.driver)==null||r.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ar.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=an(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=N$,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(i=(s=this.options).onPlay)==null||i.call(s);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ar.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}}function H$(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const wo=e=>e*180/Math.PI,Yx=e=>{const t=wo(Math.atan2(e[1],e[0]));return Jx(t)},W$={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yx,rotateZ:Yx,skewX:e=>wo(Math.atan(e[1])),skewY:e=>wo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Jx=e=>(e=e%360,e<0&&(e+=360),e),ej=Yx,tj=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),rj=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),q$={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tj,scaleY:rj,scale:e=>(tj(e)+rj(e))/2,rotateX:e=>Jx(wo(Math.atan2(e[6],e[5]))),rotateY:e=>Jx(wo(Math.atan2(-e[2],e[0]))),rotateZ:ej,rotate:ej,skewX:e=>wo(Math.atan(e[4])),skewY:e=>wo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ey(e){return e.includes("scale")?1:0}function ty(e,t){if(!e||e==="none")return ey(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(r)n=q$,s=r;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=W$,s=l}if(!s)return ey(t);const i=n[t],a=s[1].split(",").map(G$);return typeof i=="function"?i(a):a[i]}const K$=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return ty(r,t)};function G$(e){return parseFloat(e.trim())}const Zl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xl=new Set(Zl),nj=e=>e===Ql||e===ve,Q$=new Set(["x","y","z"]),Z$=Zl.filter(e=>!Q$.has(e));function X$(e){const t=[];return Z$.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const Lo={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ty(t,"x"),y:(e,{transform:t})=>ty(t,"y")};Lo.translateX=Lo.x;Lo.translateY=Lo.y;const Mo=new Set;let ry=!1,ny=!1,sy=!1;function eE(){if(ny){const e=Array.from(Mo).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const s=X$(n);s.length&&(r.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const s=r.get(n);s&&s.forEach(([i,a])=>{var l;(l=n.getValue(i))==null||l.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}ny=!1,ry=!1,Mo.forEach(e=>e.complete(sy)),Mo.clear()}function tE(){Mo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ny=!0)})}function Y$(){sy=!0,tE(),eE(),sy=!1}class M0{constructor(t,r,n,s,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=s,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Mo.add(this),ry||(ry=!0,at.read(tE),at.resolveKeyframes(eE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&r){const l=n.readValue(r,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&i===void 0&&s.set(t[0])}H$(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Mo.delete(this)}cancel(){this.state==="scheduled"&&(Mo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const J$=e=>e.startsWith("--");function e8(e,t,r){J$(t)?e.style.setProperty(t,r):e.style[t]=r}const t8=A0(()=>window.ScrollTimeline!==void 0),r8={};function n8(e,t){const r=A0(e);return()=>r8[t]??r()}const rE=n8(()=>{try{document.createElement("div").animate({opacity:0}
525,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ec=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,sj={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ec([0,.65,.55,1]),circOut:Ec([.55,0,1,.45]),backIn:Ec([.31,.01,.66,-.59]),backOut:Ec([.33,1.53,.69,.99])};function nE(e,t){if(e)return typeof e=="function"?rE()?X_(e,t):"ease-out":$_(e)?Ec(e):Array.isArray(e)?e.map(r=>nE(r,t)||sj.easeOut):sj[e]}function s8(e,t,r,{delay:n=0,duration:s=300,repeat:i=0,repeatType:a="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:r};c&&(d.offset=c);const h=nE(l,s);Array.isArray(h)&&(d.easing=h);const f={delay:n,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function sE(e){return typeof e=="function"&&"applyToOptions"in e}function i8({type:e,...t}){return sE(e)&&rE()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class o8 extends D0{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:n,keyframes:s,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,df(typeof t.type!="string");const u=i8(t);this.animation=s8(r,n,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=I0(s,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(d):e8(r,n,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,r;this.isPseudoElement||(r=(t=this.animation).commitStyles)==null||r.call(t)}get duration(){var r,n;const t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return an(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+an(t)}get time(){return an(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=as(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&t8()?(this.animation.timeline=t,cn):r(this)}}const iE={anticipate:L_,backInOut:D_,circInOut:z_};function a8(e){return e in iE}function l8(e){typeof e.ease=="string"&&a8(e.ease)&&(e.ease=iE[e.ease])}const ij=10;class c8 extends o8{constructor(t){l8(t),J_(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:s,element:i,...a}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const l=new L0({...a,autoplay:!1}),c=as(this.finishedTime??this.time);r.setWithVelocity(l.sample(c-ij).value,l.sample(c).value,ij),l.stop()}}const oj=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Gi.test(e)||e==="0")&&!e.startsWith("url("));function u8(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function d8(e,t,r,n){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=oj(s,t),l=oj(i,t);return!a||!l?!1:u8(e)||(r==="spring"||sE(r))&&n}function iy(e){e.duration=0,e.type="keyframes"}const h8=new Set(["opacity","clipPath","filter","transform"]),f8=A0(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function m8(e){var d;const{motionValue:t,name:r,repeatDelay:n,repeatType:s,damping:i,type:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return f8()&&r&&h8.has(r)&&(r!=="transform"||!u)&&!c&&!n&&s!=="mirror"&&i!==0&&a!=="inertia"}const p8=40;class g8 extends D0{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a="loop",keyframes:l,name:c,motionValue:u,element:d,...h}){var v;super(),this.stop=()=>{var g,w;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=Ar.now();
525const f={autoplay:t,delay:r,type:n,repeat:s,repeatDelay:i,repeatType:a,name:c,motionValue:u,element:d,...h},m=(d==null?void 0:d.KeyframeResolver)||M0;this.keyframeResolver=new m(l,(g,w,b)=>this.onKeyframesResolved(g,w,f,!b),c,u,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,r,n,s){this.keyframeResolver=void 0;const{name:i,type:a,velocity:l,delay:c,isHandoff:u,onUpdate:d}=n;this.resolvedAt=Ar.now(),d8(t,i,a,l)||((qs.instantAnimations||!c)&&(d==null||d(I0(t,n,r))),t[0]=t[t.length-1],iy(n),n.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>p8?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},m=!u&&m8(f)?new c8({...f,element:f.motionValue.owner.current}):new L0(f);m.finished.then(()=>this.notifyFinished()).catch(cn),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Y$()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const x8=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function y8(e){const t=x8.exec(e);if(!t)return[,];const[,r,n,s]=t;return[`--${r??n}`,s]}function oE(e,t,r=1){const[n,s]=y8(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const a=i.trim();return C_(a)?parseFloat(a):a}return E0(s)?oE(s,t,r+1):s}function z0(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const aE=new Set(["width","height","top","left","right","bottom",...Zl]),v8={test:e=>e==="auto",parse:e=>e},lE=e=>t=>t.test(e),cE=[Ql,ve,ls,ii,u$,c$,v8],aj=e=>cE.find(lE(e));function b8(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||E_(e):!0}const w8=new Set(["brightness","contrast","saturate","opacity"]);function j8(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(P0)||[];if(!n)return e;const s=r.replace(n,"");let i=w8.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+s+")"}const k8=/\b([a-z-]*)\(.*?\)/gu,oy={...Gi,getAnimatableNone:e=>{const t=e.match(k8);return t?t.map(j8).join(" "):e}},lj={...Ql,transform:Math.round},S8={rotate:ii,rotateX:ii,rotateY:ii,rotateZ:ii,scale:Vd,scaleX:Vd,scaleY:Vd,scaleZ:Vd,skew:ii,skewX:ii,skewY:ii,distance:ve,translateX:ve,translateY:ve,translateZ:ve,x:ve,y:ve,z:ve,perspective:ve,transformPerspective:ve,opacity:Cu,originX:Q1,originY:Q1,originZ:ve},F0={borderWidth:ve,borderTopWidth:ve,borderRightWidth:ve,borderBottomWidth:ve,borderLeftWidth:ve,borderRadius:ve,radius:ve,borderTopLeftRadius:ve,borderTopRightRadius:ve,borderBottomRightRadius:ve,borderBottomLeftRadius:ve,width:ve,maxWidth:ve,height:ve,maxHeight:ve,top:ve,right:ve,bottom:ve,left:ve,padding:ve,paddingTop:ve,paddingRight:ve,paddingBottom:ve,paddingLeft:ve,margin:ve,marginTop:ve,marginRight:ve,marginBottom:ve,marginLeft:ve,backgroundPositionX:ve,backgroundPositionY:ve,...S8,zIndex:lj,fillOpacity:Cu,strokeOpacity:Cu,numOctaves:lj},A8={...F0,color:Et,backgroundColor:Et,outlineColor:Et,fill:Et,stroke:Et,borderColor:Et,borderTopColor:Et,borderRightColor:Et,borderBottomColor:Et,borderLeftColor:Et,filter:oy,WebkitFilter:oy},uE=e=>A8[e];function dE(e,t){let r=uE(e);return r!==oy&&(r=Gi),r.getAnimatableNone?r.getAnimatableNone(t):void 0}
vendor: 12,894 bytes, lines 525-533
525const N8=new Set(["auto","none","0"]);function C8(e,t,r){let n=0,s;for(;n<e.length&&!s;){const i=e[n];typeof i=="string"&&!N8.has(i)&&_u(i).values.length&&(s=e[n]),n++}if(s&&r)for(const i of t)e[i]=dE(r,s)}class _8 extends M0{constructor(t,r,n,s,i){super(t,r,n,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),E0(u))){const d=oE(u,r.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!aE.has(n)||t.length!==2)return;const[s,i]=t,a=aj(s),l=aj(i);if(a!==l)if(nj(a)&&nj(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else Lo[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let s=0;s<t.length;s++)(t[s]===null||b8(t[s]))&&n.push(s);n.length&&C8(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Lo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const s=r[r.length-1];s!==void 0&&t.getValue(n,s).jump(s,!1)}measureEndState(){var l;const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const s=t.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=n.length-1,a=n[i];n[i]=Lo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function E8(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const hE=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function fE(e){return __(e)&&"offsetHeight"in e}const cj=30,P8=e=>!isNaN(parseFloat(e));class T8{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var i;const s=Ar.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Ar.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=P8(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new N0);const n=this.events[t].add(r);return t==="change"?()=>{n(),at.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ar.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>cj)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,cj);return P_(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Rl(e,t){return new T8(e,t)}const{schedule:$0,cancel:EX}=V_(queueMicrotask,!1),kn={x:!1,y:!1};function mE(){return kn.x||kn.y}function R8(e){return e==="x"||e==="y"?kn[e]?null:(kn[e]=!0,()=>{kn[e]=!1}):kn.x||kn.y?null:(kn.x=kn.y=!0,()=>{kn.x=kn.y=!1})}function pE(e,t){const r=E8(e),n=new AbortController,s={passive:!0,...t,signal:n.signal};return[r,s,()=>n.abort()]}function uj(e){return!(e.pointerType==="touch"||mE())}function O8(e,t,r={}){const[n,s,i]=pE(e,r),a=l=>{if(!uj(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=h=>{uj(h)&&(u(h),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,s)};return n.forEach(l=>{l.addEventListener("pointerenter",a,s)}),i}const gE=(e,t)=>t?e===t?!0:gE(e,t.parentElement):!1,V0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,I8=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function D8(e){return I8.has(e.tagName)||e.tabIndex!==-1}const jh=new WeakSet;function dj(e){return t=>{t.key==="Enter"&&e(t)}}function Rp(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const L8=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=dj(()=>{if(jh.has(r))return;Rp(r,"down");const s=dj(()=>{Rp(r,"up")}),i=()=>Rp(r,"cancel");r.addEventListener("keyup",s,t),r.addEventListener("blur",i,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function hj(e){return V0(e)&&!mE()}function M8(e,t,r={}){const[n,s,i]=pE(e,r),a=l=>{const c=l.currentTarget;if(!hj(l))return;jh.add(c);const u=t(c,l),d=(m,v)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),jh.has(c)&&jh.delete(c),hj(m)&&typeof u=="function"&&u(m,{success:v})},h=m=>{d(m,c===window||c===document||r.useGlobalTarget||gE(c,m.target))},f=m=>{d(m,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return n.forEach(l=>{(r.useGlobalTarget?window:l).addEventListener("pointerdown",a,s),fE(l)&&(l.addEventListener("focus",u=>L8(u,s)),!D8(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}function xE(e){return __(e)&&"ownerSVGElement"in e}function z8(e){return xE(e)&&e.tagName==="svg"}const ar=e=>!!(e&&e.getVelocity),F8=[...cE,Et,Gi],$8=e=>F8.find(lE(e)),U0=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function fj(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function V8(...e){return t=>{let r=!1;const n=e.map(s=>{const i=fj(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():fj(e[s],null)}}}}function U8(...e){return p.useCallback(V8(...e),e)}class B8 extends p.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=r.offsetParent,s=fE(n)&&n.offsetWidth||0,i=this.props.sizeRef.current;i.height=r.offsetHeight||0,i.width=r.offsetWidth||0,i.top=r.offsetTop,i.left=r.offsetLeft,i.right=s-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function H8({children:e,isPresent:t,anchorX:r,root:n}){const s=p.useId(),i=p.useRef(null),a=p.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=p.useContext(U0),c=U8(i,e==null?void 0:e.ref);return p.useInsertionEffect(()=>{const{width:u,height:d,top:h,left:f,right:m}=a.current;if(t||!i.current||!u||!d)return;const v=r==="left"?`left: ${f}`:`right: ${m}`;i.current.dataset.motionPopId=s;const g=document.createElement("style");l&&(g.nonce=l);const w=n??document.head;return w.appendChild(g),g.sheet&&g.sheet.insertRule(` 526 [data-motion-pop-id="${s}"] { 527 position: absolute !important; 528 width: ${u}px !important; 529 height: ${d}px !important; 530 ${v}px !important; 531 top: ${h}px !important; 532 } 533 `),()=>{w.contains(g)&&w.removeChild(g)}},[t]),o.jsx(B8,{isPresent:t,childRef:i,sizeRef:a,children:p.cloneElement(e,{ref:c})})}const W8=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:a,anchorX:l,root:c})=>{const u=w0(q8),d=p.useId();let h=!0,f=p.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:r,custom:s,onExitComplete:m=>{u.set(m,!0);for(const v of u.values())if(!v)return;n&&n()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[r,u,n]);return i&&h&&(f={...f}),p.useMemo(()=>{u.forEach((m,v)=>u.set(v,!1))},[r]),p.useEffect(()=>{!r&&!u.size&&n&&n()},[r]),a==="popLayout"&&(e=o.jsx(H8,{isPresent:r,anchorX:l,root:c,children:e})),o.jsx(pm.Provider,{value:f,children:e})};function q8(){return new Map}function yE(e=!0){const t=p.useContext(pm);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:s}=t,i=p.useId();p.useEffect(()=>{if(e)return s(i)},[e]);const a=p.useCallback(()=>e&&n&&n(i),[i,n,e]);return!r&&n?[!1,a]:[!0]}const Ud=e=>e.key||"";function mj(e){const t=[];return p.Children.forEach(e,r=>{p.isValidElement(r)&&t.push(r)}),t}const Eu=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:s=!0,mode:i="sync",propagate:a=!1,anchorX:l="left",root:c})=>{const[u,d]=yE(a),h=p.useMemo(()=>mj(e),[e]),f=a&&!u?[]:h.map(Ud),m=p.useRef(!0),v=p.useRef(h),g=w0(()=>new Map),[w,b]=p.useState(h),[y,x]=p.useState(h);N_(()=>{m.current=!1,v.current=h;for(let S=0;S<y.length;S++){const N=Ud(y[S]);f.includes(N)?g.delete(N):g.get(N)!==!0&&g.set(N,!1)}},[y,f.length,f.join("-")]);const j=[];if(h!==w){let S=[...h];for(let N=0;N<y.length;N++){const A=y[N],E=Ud(A);f.includes(E)||(S.splice(N,0,A),j.push(A))}return i==="wait"&&j.length&&(S=j),x(mj(S)),b(h),null}const{forceRender:k}=p.useContext(b0);return o.jsx(o.Fragment,{children:y.map(S=>{const N=Ud(S),A=a&&!u?!1:h===y||f.includes(N),E=()=>{if(g.has(N))g.set(N,!0);else return;let _=!0;g.forEach(F=>{F||(_=!1)}),_&&(k==null||k(),x(v.current),a&&(d==null||d()),n&&n())};return o.jsx(W8,{isPresent:A,initial:!m.current||r?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:A?void 0:E,anchorX:l,children:S},N)})})},vE=p.createContext({strict:!1}),pj={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ol={};for(const e in pj)Ol[e]={isEnabled:t=>pj[e].some(r=>!!t[r])};function K8(e){for(const t in e)Ol[t]={...Ol[t],...e[t]}}const G8=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function pf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||G8.has(e)}let bE=e=>!pf(e);function Q8(e){typeof e=="function"&&(bE=t=>t.startsWith("on")?!pf(t):e(t))}try{Q8(require("@emotion/is-prop-valid").default)}catch{}function Z8(e,t,r){const n={};for(const s in e)s==="values"&&typeof e.values=="object"||(bE(s)||r===!0&&pf(s)||!t&&!pf(s)||e.draggable&&s.startsWith("onDrag"))&&(n[s]=e[s]);return n}const gm=p.createContext({});function xm(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Pu(e){return typeof e=="string"||Array.isArray(e)}const B0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],H0=["initial",...B0];function ym(e){return xm(e.animate)||H0.some(t=>Pu(e[t]))}function wE(e){return!!(ym(e)||e.variants)}function X8(e,t){if(ym(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Pu(r)?r:void 0,animate:Pu(n)?n:void 0}}return e.inherit!==!1?t:{}}function Y8(e){const{initial:t,animate:r}=X8(e,p.useContext(gm));return p.useMemo(()=>({initial:t,animate:r}),[gj(t),gj(r)])}function gj(e){return Array.isArray(e)?e.join(" "):e}function xj(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const yc={correct:(e,t)=>
vendor: 6,429 bytes, line 533
533{if(!t.target)return e;if(typeof e=="string")if(ve.test(e))e=parseFloat(e);else return e;const r=xj(e,t.target.x),n=xj(e,t.target.y);return`${r}% ${n}%`}},J8={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,s=Gi.parse(e);if(s.length>5)return n;const i=Gi.createTransformer(e),a=typeof s[0]!="number"?1:0,l=r.x.scale*t.x,c=r.y.scale*t.y;s[0+a]/=l,s[1+a]/=c;const u=ht(l,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=u),typeof s[3+a]=="number"&&(s[3+a]/=u),i(s)}},ay={borderRadius:{...yc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:yc,borderTopRightRadius:yc,borderBottomLeftRadius:yc,borderBottomRightRadius:yc,boxShadow:J8};function jE(e,{layout:t,layoutId:r}){return Xl.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!ay[e]||e==="opacity")}const eV={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tV=Zl.length;function rV(e,t,r){let n="",s=!0;for(let i=0;i<tV;i++){const a=Zl[i],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||r){const u=hE(l,F0[a]);if(!c){s=!1;const d=eV[a]||a;n+=`${d}(${u}) `}r&&(t[a]=u)}}return n=n.trim(),r?n=r(t,s?"":n):s&&(n="none"),n}function W0(e,t,r){const{style:n,vars:s,transformOrigin:i}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(Xl.has(c)){a=!0;continue}else if(B_(c)){s[c]=u;continue}else{const d=hE(u,F0[c]);c.startsWith("origin")?(l=!0,i[c]=d):n[c]=d}}if(t.transform||(a||r?n.transform=rV(t,e.transform,r):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;n.transformOrigin=`${c} ${u} ${d}`}}const q0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function kE(e,t,r){for(const n in t)!ar(t[n])&&!jE(n,r)&&(e[n]=t[n])}function nV({transformTemplate:e},t){return p.useMemo(()=>{const r=q0();return W0(r,t,e),Object.assign({},r.vars,r.style)},[t])}function sV(e,t){const r=e.style||{},n={};return kE(n,r,e),Object.assign(n,nV(e,t)),n}function iV(e,t){const r={},n=sV(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const oV={offset:"stroke-dashoffset",array:"stroke-dasharray"},aV={offset:"strokeDashoffset",array:"strokeDasharray"};function lV(e,t,r=1,n=0,s=!0){e.pathLength=1;const i=s?oV:aV;e[i.offset]=ve.transform(-n);const a=ve.transform(t),l=ve.transform(r);e[i.array]=`${a} ${l}`}function SE(e,{attrX:t,attrY:r,attrScale:n,pathLength:s,pathSpacing:i=1,pathOffset:a=0,...l},c,u,d){if(W0(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),r!==void 0&&(h.y=r),n!==void 0&&(h.scale=n),s!==void 0&&lV(h,s,i,a,!1)}const AE=()=>({...q0(),attrs:{}}),NE=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cV(e,t,r,n){const s=p.useMemo(()=>{const i=AE();return SE(i,t,NE(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};kE(i,e.style,e),s.style={...i,...s.style}}return s}const uV=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function K0(e){return typeof e!="string"||e.includes("-")?!1:!!(uV.indexOf(e)>-1||/[A-Z]/u.test(e))}function dV(e,t,r,{latestValues:n},s,i=!1){const l=(K0(e)?cV:iV)(t,n,s,e),c=Z8(t,typeof e=="string",i),u=e!==p.Fragment?{...c,...l,ref:r}:{},{children:d}=t,h=p.useMemo(()=>ar(d)?d.get():d,[d]);return p.createElement(e,{...u,children:h})}function yj(e){const t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function G0(e,t,r,n){if(typeof t=="function"){const[s,i]=yj(n);t=t(r!==void 0?r:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=yj(n);t=t(r!==void 0?r:e.custom,s,i)}return t}function kh(e){return ar(e)?e.get():e}function hV({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,s){return{latestValues:fV(r,n,s,e),renderState:t()}}function fV(e,t,r,n){const s={},i=n(e,{});for(const f in i)s[f]=kh(i[f]);let{initial:a,animate:l}=e;const c=ym(e),u=wE(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=r?r.initial===!1:!1;d=d||a===!1;const h=d?l:a;if(h&&typeof h!="boolean"&&!xm(h)){const f=Array.isArray(h)?h:[h];for(let m=0;m<f.length;m++){const v=G0(e,f[m]);if(v){const{transitionEnd:g,transition:w,...b}=v;for(const y in b){let x=b[y];if(Array.isArray(x)){const j=d?x.length-1:0;x=x[j]}x!==null&&(s[y]=x)}for(const y in g)s[y]=g[y]}}}return s}const CE=e=>(t,r)=>{const n=p.useContext(gm),s=p.useContext(pm),i=()=>hV(e,t,n,s);return r?i():w0(i)};function Q0(e,t,r){var i;const{style:n}=e,s={};for(const a in n)(ar(n[a])||t.style&&ar(t.style[a])||jE(a,e)||((i=r==null?void 0:r.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(s[a]=n[a]);return s}const mV=CE({scrapeMotionValuesFromProps:Q0,createRenderState:q0});function _E(e,t,r){const n=Q0(e,t,r);for(const s in e)if(ar(e[s])||ar(t[s])){const i=Zl.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[i]=e[s]}return n}const pV=CE({scrapeMotionValuesFromProps:_E,createRenderState:AE}),gV=Symbol.for("motionComponentSymbol");function Va(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function xV(e,t,r){return p.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):Va(r)&&(r.current=n))},[t])}const Z0=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yV="framerAppearId",EE="data-"+Z0(yV),PE=p.createContext({});function vV(e,t,r,n,s){var g,w;const{visualElement:i}=p.useContext(gm),a=p.useContext(vE),l=p.useContext(pm),c=p.useContext(U0).reducedMotion,u=p.useRef(null);n=n||a.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:i,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}
vendor: 19,427 bytes, line 533
533));const d=u.current,h=p.useContext(PE);d&&!d.projection&&s&&(d.type==="html"||d.type==="svg")&&bV(u.current,r,s,h);const f=p.useRef(!1);p.useInsertionEffect(()=>{d&&f.current&&d.update(r,l)});const m=r[EE],v=p.useRef(!!m&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,m))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,m)));return N_(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),v.current&&d.animationState&&d.animationState.animateChanges())}),p.useEffect(()=>{d&&(!v.current&&d.animationState&&d.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,m)}),v.current=!1),d.enteringChildren=void 0)}),d}function bV(e,t,r,n){const{layoutId:s,layout:i,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:TE(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!a||l&&Va(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:c,layoutRoot:u})}function TE(e){if(e)return e.options.allowProjection!==!1?e.projection:TE(e.parent)}function Op(e,{forwardMotionProps:t=!1}={},r,n){r&&K8(r);const s=K0(e)?pV:mV;function i(l,c){let u;const d={...p.useContext(U0),...l,layoutId:wV(l)},{isStatic:h}=d,f=Y8(l),m=s(l,h);if(!h&&j0){jV();const v=kV(d);u=v.MeasureLayout,f.visualElement=vV(e,m,d,n,v.ProjectionNode)}return o.jsxs(gm.Provider,{value:f,children:[u&&f.visualElement?o.jsx(u,{visualElement:f.visualElement,...d}):null,dV(e,l,xV(m,f.visualElement,c),m,h,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=p.forwardRef(i);return a[gV]=e,a}function wV({layoutId:e}){const t=p.useContext(b0).id;return t&&e!==void 0?t+"-"+e:e}function jV(e,t){p.useContext(vE).strict}function kV(e){const{drag:t,layout:r}=Ol;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(e)||r!=null&&r.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function SV(e,t){if(typeof Proxy>"u")return Op;const r=new Map,n=(i,a)=>Op(i,a,e,t),s=(i,a)=>n(i,a);return new Proxy(s,{get:(i,a)=>a==="create"?n:(r.has(a)||r.set(a,Op(a,void 0,e,t)),r.get(a))})}function RE({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function AV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function NV(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function Ip(e){return e===void 0||e===1}function ly({scale:e,scaleX:t,scaleY:r}){return!Ip(e)||!Ip(t)||!Ip(r)}function ho(e){return ly(e)||OE(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function OE(e){return vj(e.x)||vj(e.y)}function vj(e){return e&&e!=="0%"}function gf(e,t,r){const n=e-r,s=t*n;return r+s}function bj(e,t,r,n,s){return s!==void 0&&(e=gf(e,s,n)),gf(e,r,n)+t}function cy(e,t=0,r=1,n,s){e.min=bj(e.min,t,r,n,s),e.max=bj(e.max,t,r,n,s)}function IE(e,{x:t,y:r}){cy(e.x,t.translate,t.scale,t.originPoint),cy(e.y,r.translate,r.scale,r.originPoint)}const wj=.999999999999,jj=1.0000000000001;function CV(e,t,r,n=!1){const s=r.length;if(!s)return;t.x=t.y=1;let i,a;for(let l=0;l<s;l++){i=r[l],a=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ba(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,IE(e,a)),n&&ho(i.latestValues)&&Ba(e,i.latestValues))}t.x<jj&&t.x>wj&&(t.x=1),t.y<jj&&t.y>wj&&(t.y=1)}function Ua(e,t){e.min=e.min+t,e.max=e.max+t}function kj(e,t,r,n,s=.5){const i=ht(e.min,e.max,s);cy(e,t,r,i,n)}function Ba(e,t){kj(e.x,t.x,t.scaleX,t.scale,t.originX),kj(e.y,t.y,t.scaleY,t.scale,t.originY)}function DE(e,t){return RE(NV(e.getBoundingClientRect(),t))}function _V(e,t,r){const n=DE(e,r),{scroll:s}=t;return s&&(Ua(n.x,s.offset.x),Ua(n.y,s.offset.y)),n}const Sj=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ha=()=>({x:Sj(),y:Sj()}),Aj=()=>({min:0,max:0}),Dt=()=>({x:Aj(),y:Aj()}),uy={current:null},LE={current:!1};function EV(){if(LE.current=!0,!!j0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>uy.current=e.matches;e.addEventListener("change",t),t()}else uy.current=!1}const PV=new WeakMap;function TV(e,t,r){for(const n in t){const s=t[n],i=r[n];if(ar(s))e.addValue(n,s);else if(ar(i))e.addValue(n,Rl(s,{owner:e}));else if(i!==s)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(n);e.addValue(n,Rl(a!==void 0?a:s,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const Nj=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class RV{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=M0,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Ar.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,at.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=r.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=ym(r),this.isVariantNode=wE(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(r,{},this);for(const f in h){const m=h[f];c[f]!==void 0&&ar(m)&&m.set(c[f])}}mount(t){var r;this.current=t,PV.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),LE.current||EV(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:uy.current,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Ki(this.notifyUpdate),Ki(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const n=this.features[r];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Xl.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=r.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&at.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ol){const r=Ol[t];if(!r)continue;const{isEnabled:n,Feature:s}=r;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Dt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<Nj.length;n++){const s=Nj[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,a=t[i];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=TV(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Rl(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(C_(n)||E_(n))?n=parseFloat(n):!$8(n)&&Gi.test(r)&&(n=dE(t,r)),this.setBaseTarget(t,ar(n)?n.get():n)),ar(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var i;const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const a=G0(this.props,r,(i=this.presenceContext)==null?void 0:i.custom);a&&(n=a[t])}if(r&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ar(s)?s:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new N0),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){$0.render(this.render)}}class ME extends RV{constructor(){super(...arguments),this.KeyframeResolver=_8}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ar(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function zE(e,{style:t,vars:r},n,s){const i=e.style;let a;for(a in t)i[a]=t[a];s==null||s.applyProjectionStyles(i,n);for(a in r)i.setProperty(a,r[a])}function OV(e){return window.getComputedStyle(e)}class IV extends ME{constructor(){super(...arguments),this.type="html",this.renderInstance=zE}readValueFromInstance(t,r){var n;if(Xl.has(r))return(n=this.projection)!=null&&n.isProjecting?ey(r):K$(t,r);{const s=OV(t),i=(B_(r)?s.getPropertyValue(r):s[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:r}){return DE(t,r)}build(t,r,n){W0(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return Q0(t,r,n)}}const FE=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function DV(e,t,r,n){zE(e,t,void 0,n);for(const s in t.attrs)e.setAttribute(FE.has(s)?s:Z0(s),t.attrs[s])}class LV extends ME{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Dt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Xl.has(r)){const n=uE(r);return n&&n.default||0}return r=FE.has(r)?r:Z0(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return _E(t,r,n)}build(t,r,n){SE(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,s){DV(t,r,n,s)}mount(t){this.isSVGTag=NE(t.tagName),super.mount(t)}}const MV=(e,t)=>K0(e)?new LV(t):new IV(t,{allowProjection:e!==p.Fragment});function il(e,t,r){const n=e.getProps();return G0(n,t,r!==void 0?r:n.custom,e)}const dy=e=>Array.isArray(e);function zV(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Rl(r))}function FV(e){return dy(e)?e[e.length-1]||0:e}function $V(e,t){const r=il(e,t);let{transitionEnd:n={},transition:s={},...i}=r||{};i={...i,...n};for(const a in i){const l=FV(i[a]);zV(e,a,l)}}function VV(e){return!!(ar(e)&&e.add)}function hy(e,t){const r=e.getValue("willChange");if(VV(r))return r.add(t);if(!r&&qs.WillChange){const n=new qs.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function $E(e){return e.props[EE]}const UV=e=>e!==null;function BV(e,{repeat:t,repeatType:r="loop"},n){const s=e.filter(UV),i=t&&r!=="loop"&&t%2===1?0:s.length-1;return!i||n===void 0?s[i]:n}const HV={type:"spring",stiffness:500,damping:25,restSpeed:10},WV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qV={type:"keyframes",duration:.8},KV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},GV=(e,{keyframes:t})=>t.length>2?qV:Xl.has(e)?e.startsWith("scale")?WV(t[1]):HV:KV;function QV({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const X0=(e,t,r,n={},s,i)=>a=>{const l=z0(n,e)||{},c=l.delay||n.delay||0;let{elapsed:u=0}=n;u=u-as(c);const d={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:s};QV(l)||Object.assign(d,GV(e,d)),d.duration&&(d.duration=as(d.duration)),d.repeatDelay&&(d.repeatDelay=as(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(iy(d),d.delay===0&&(h=!0)),(qs.instantAnimations||qs.skipAnimations)&&(h=!0,iy(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!i&&t.get()!==void 0){const f=BV(d.keyframes,l);if(f!==void 0){at.update(()=>{d.onUpdate(f),d.onComplete()});return}}return l.isSync?new L0(d):new g8(d)};function ZV({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function VE(e,t,{delay:r=0,transitionOverride:n,type:s}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;n&&(i=n);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const d in l){const h=e.getValue(d,e.latestValues[d]??null),f=l[d];if(f===void 0||u&&ZV(u,d))continue;const m={delay:r,...z0(i||{},d)},v=h.get();if(v!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===v&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const b=$E(e);if(b){const y=window.MotionHandoffAnimation(b,d,at);y!==null&&(m.startTime=y,g=!0)}}hy(e,d),h.start(X0(d,h,f,e.shouldReduceMotion&&aE.has(d)?{type:!1}:m,e,g));const w=h.animation;w&&c.push(w)}return a&&Promise.all(c).then(()=>{at.update(()=>{a&&$V(e,a)})}),c}function UE(e,t,r,n=0,s=1){const i=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),a=e.size,l=(a-1)*n;return typeof r=="function"?r(i,a):s===1?i*n:l-i*n}function fy(e,t,r={}){var c;const n=il(e,t,r.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(s=r.transitionOverride);const i=n?()=>Promise.all(VE(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=s;return XV(e,t,u,d,h,f,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,d]=l==="beforeChildren"?[i,a]:[a,i];return u().then(()=>d())}else return Promise.all([i(),a(r.delay)])}function XV(e,t,r=0,n=0,s=0,i=1,a){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(fy(c,t,{...a,delay:r+(typeof n=="function"?0:n)+UE(e.variantChildren,c,n,s,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function YV(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const s=t.map(i=>fy(e,i,r));n=Promise.all(s)}else if(typeof t=="string")n=fy(e,t,r);else{const s=typeof t=="function"?il(e,t,r.custom):t;n=Promise.all(VE(e,s,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}function BE(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const JV=H0.length;function HE(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?HE(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<JV;r++){const n=H0[r],s=e.props[n];(Pu(s)||s===!1)&&(t[n]=s)}return t}const eU=[...B0].reverse(),tU=B0.length;function rU(e){return t=>Promise.all(t.map(({animation:r,options:n})=>YV(e,r,n)))}function nU(e){let t=rU(e),r=Cj(),n=!0;const s=c=>(u,d)=>{var f;const h=il(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:m,transitionEnd:v,...g}=h;u={...u,...g,...v}}return u};function i(c){t=c(e)}function a(c){const{props:u}=e,d=HE(e.parent)||{},h=[],f=new Set;let m={},v=1/0;for(let w=0;w<tU;w++){const b=eU[w],y=r[b],x=u[b]!==void 0?u[b]:d[b],j=Pu(x),k=b===c?y.isActive:null;k===!1&&(v=w);let S=x===d[b]&&x!==u[b]&&j;if(S&&n&&e.manuallyAnimateOnMount&&(S=!1),y.protectedKeys={...m},!y.isActive&&k===null||!x&&!y.prevProp||xm(x)||typeof x=="boolean")continue;const N=sU(y.prevProp,x);let A=N||b===c&&y.isActive&&!S&&j||w>v&&j,E=!1;const _=Array.isArray(x)?x:[x];let F=_.reduce(s(b),{});k===!1&&(F={});const{prevResolvedValues:C={}}=y,L={...C,...F},I=M=>{A=!0,f.has(M)&&(E=!0,f.delete(M)),y.needsAnimating[M]=!0;const P=e.getValue(M);P&&(P.liveStyle=!1)};for(const M in L){const P=F[M],z=C[M];if(m.hasOwnProperty(M))continue;let B=!1;dy(P)&&dy(z)?B=!BE(P,z):B=P!==z,B?P!=null?I(M):f.add(M):P!==void 0&&f.has(M)?I(M):y.protectedKeys[M]=!0}y.prevProp=x,y.prevResolvedValues=F,y.isActive&&(m={...m,...F}),n&&e.blockInitialAnimation&&(A=!1);const O=S&&N;A&&(!O||E)&&h.push(..._.map(M=>{const P={type:b};
vendor: 15,634 bytes, line 533
533if(typeof M=="string"&&n&&!O&&e.manuallyAnimateOnMount&&e.parent){const{parent:z}=e,B=il(z,M);if(z.enteringChildren&&B){const{delayChildren:re}=B.transition||{};P.delay=UE(z.enteringChildren,e,re)}}return{animation:M,options:P}}))}if(f.size){const w={};if(typeof u.initial!="boolean"){const b=il(e,Array.isArray(u.initial)?u.initial[0]:u.initial);b&&b.transition&&(w.transition=b.transition)}f.forEach(b=>{const y=e.getBaseTarget(b),x=e.getValue(b);x&&(x.liveStyle=!0),w[b]=y??null}),h.push({animation:w})}let g=!!h.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),n=!1,g?t(h):Promise.resolve()}function l(c,u){var h;if(r[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(c,u)}),r[c].isActive=u;const d=a(c);for(const f in r)r[f].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:i,getState:()=>r,reset:()=>{r=Cj()}}}function sU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!BE(t,e):!1}function io(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cj(){return{animate:io(!0),whileInView:io(),whileHover:io(),whileTap:io(),whileDrag:io(),whileFocus:io(),exit:io()}}class to{constructor(t){this.isMounted=!1,this.node=t}update(){}}class iU extends to{constructor(t){super(t),t.animationState||(t.animationState=nU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();xm(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let oU=0;class aU extends to{constructor(){super(...arguments),this.id=oU++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const s=this.node.animationState.setActive("exit",!t);r&&!t&&s.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const lU={animation:{Feature:iU},exit:{Feature:aU}};function Tu(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function cd(e){return{point:{x:e.pageX,y:e.pageY}}}const cU=e=>t=>V0(t)&&e(t,cd(t));function Gc(e,t,r,n){return Tu(e,t,cU(r),n)}const WE=1e-4,uU=1-WE,dU=1+WE,qE=.01,hU=0-qE,fU=0+qE;function pr(e){return e.max-e.min}function mU(e,t,r){return Math.abs(e-t)<=r}function _j(e,t,r,n=.5){e.origin=n,e.originPoint=ht(t.min,t.max,e.origin),e.scale=pr(r)/pr(t),e.translate=ht(r.min,r.max,e.origin)-e.originPoint,(e.scale>=uU&&e.scale<=dU||isNaN(e.scale))&&(e.scale=1),(e.translate>=hU&&e.translate<=fU||isNaN(e.translate))&&(e.translate=0)}function Qc(e,t,r,n){_j(e.x,t.x,r.x,n?n.originX:void 0),_j(e.y,t.y,r.y,n?n.originY:void 0)}function Ej(e,t,r){e.min=r.min+t.min,e.max=e.min+pr(t)}function pU(e,t,r){Ej(e.x,t.x,r.x),Ej(e.y,t.y,r.y)}function Pj(e,t,r){e.min=t.min-r.min,e.max=e.min+pr(t)}function xf(e,t,r){Pj(e.x,t.x,r.x),Pj(e.y,t.y,r.y)}function Xr(e){return[e("x"),e("y")]}const KE=({current:e})=>e?e.ownerDocument.defaultView:null,Tj=(e,t)=>Math.abs(e-t);function gU(e,t){const r=Tj(e.x,t.x),n=Tj(e.y,t.y);return Math.sqrt(r**2+n**2)}class GE{constructor(t,r,{transformPagePoint:n,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Lp(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,v=gU(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!v)return;const{point:g}=f,{timestamp:w}=Xt;this.history.push({...g,timestamp:w});const{onStart:b,onMove:y}=this.handlers;m||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Dp(m,this.transformPagePoint),at.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();const{onEnd:v,onSessionEnd:g,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Lp(f.type==="pointercancel"?this.lastMoveEventInfo:Dp(m,this.transformPagePoint),this.history);this.startEvent&&v&&v(f,b),g&&g(f,b)},!V0(t))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=s||window;const l=cd(t),c=Dp(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Xt;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=r;h&&h(t,Lp(c,this.history)),this.removeListeners=od(Gc(this.contextWindow,"pointermove",this.handlePointerMove),Gc(this.contextWindow,"pointerup",this.handlePointerUp),Gc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ki(this.updatePoint)}}function Dp(e,t){return t?{point:t(e.point)}:e}function Rj(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Lp({point:e},t){return{point:e,delta:Rj(e,QE(t)),offset:Rj(e,xU(t)),velocity:yU(t,.1)}}function xU(e){return e[0]}function QE(e){return e[e.length-1]}function yU(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const s=QE(e);for(;r>=0&&(n=e[r],!(s.timestamp-n.timestamp>as(t)));)r--;if(!n)return{x:0,y:0};const i=an(s.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const a={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function vU(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?ht(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?ht(r,e,n.max):Math.min(e,r)),e}function Oj(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function bU(e,{top:t,left:r,bottom:n,right:s}){return{x:Oj(e.x,r,s),y:Oj(e.y,t,n)}}function Ij(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function wU(e,t){return{x:Ij(e.x,t.x),y:Ij(e.y,t.y)}}function jU(e,t){let r=.5;const n=pr(e),s=pr(t);return s>n?r=Nu(t.min,t.max-n,e.min):n>s&&(r=Nu(e.min,e.max-s,t.min)),Ws(0,1,r)}function kU(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const my=.35;function SU(e=my){return e===!1?e=0:e===!0&&(e=my),{x:Dj(e,"left","right"),y:Dj(e,"top","bottom")}}function Dj(e,t,r){return{min:Lj(e,t),max:Lj(e,r)}}function Lj(e,t){return typeof e=="number"?e:e[t]||0}const AU=new WeakMap;class NU{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Dt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(cd(h).point)},a=(h,f)=>{const{drag:m,dragPropagation:v,onDragStart:g}=this.getProps();if(m&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=R8(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xr(b=>{let y=this.getAxisMotionValue(b).get()||0;if(ls.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const j=x.layout.layoutBox[b];j&&(y=pr(j)*(parseFloat(y)/100))}}this.originPoint[b]=y}),g&&at.postRender(()=>g(h,f)),hy(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:v,onDirectionLock:g,onDrag:w}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=f;if(v&&this.currentDirection===null){this.currentDirection=CU(b),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),w&&w(h,f)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Xr(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)==null?void 0:f.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new GE(t,{onSessionStart:i,onStart:a,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:n,contextWindow:KE(this.visualElement)})}stop(t,r){const n=t||this.latestPointerEvent,s=r||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!n)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:l}=this.getProps();l&&at.postRender(()=>l(n,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:s}=this.getProps();if(!n||!Bd(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=vU(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&Va(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=bU(n.layoutBox,t):this.constraints=!1,this.elastic=SU(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Xr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=kU(n.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Va(t))return!1;const n=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=_V(n,s.root,this.visualElement.getTransformPagePoint());let a=wU(s.layout.layoutBox,i);if(r){const l=r(AV(a));this.hasMutatedConstraints=!!l,l&&(a=RE(l))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Xr(d=>{if(!Bd(d,r,this.currentDirection))return;let h=c&&c[d]||{};a&&(h={min:0,max:0});const f=s?200:1e6,m=s?40:1e7,v={type:"inertia",velocity:n?t[d]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,v)});return Promise.all(u).then(l)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return hy(this.visualElement,t),n.start(X0(t,n,0,r,this.visualElement,!1))}stopAnimation(){Xr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xr(t=>{var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),s=n[r];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Xr(r=>{const{drag:n}=this.getProps();if(!Bd(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:a,max:l}=s.layout.layoutBox[r];i.set(t[r]-ht(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!Va(r)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Xr(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();s[a]=jU({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Xr(a=>{if(!Bd(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(ht(c,u,s[a]))})}addListeners(){if(!this.visualElement.current)return;AU.set(this.visualElement,this);const t=this.visualElement.current,r=Gc(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();Va(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),at.read(n);const a=Tu(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Xr(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),r(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:a=my,dragMomentum:l=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:a,dragMomentum:l}}}function Bd(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function CU(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class _U extends to{constructor(t){super(t),this.removeGroupControls=cn,this.removeListeners=cn,this.controls=new NU(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Mj=e=>(t,r)=>{e&&at.postRender(()=>e(t,r))};class EU extends to{constructor(){super(...arguments),this.removePointerDownListener=cn}onPointerDown(t){this.session=new GE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:KE(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Mj(t),onStart:Mj(r),onMove:n,onEnd:(i,a)=>{delete this.session,s&&at.postRender(()=>s(i,a))}}}mount(){this.removePointerDownListener=Gc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Sh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Mp=!1;class PU extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),Mp&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Sh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,{projection:a}=n;
vendor: 21,050 bytes, line 533
533return a&&(a.isPresent=i,Mp=!0,s||t.layoutDependency!==r||r===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||at.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=t;Mp=!0,s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ZE(e){const[t,r]=yE(),n=p.useContext(b0);return o.jsx(PU,{...e,layoutGroup:n,switchLayoutGroup:p.useContext(PE),isPresent:t,safeToRemove:r})}function TU(e,t,r){const n=ar(e)?e:Rl(e);return n.start(X0("",n,t,r)),n.animation}const RU=(e,t)=>e.depth-t.depth;class OU{constructor(){this.children=[],this.isDirty=!1}add(t){k0(this.children,t),this.isDirty=!0}remove(t){S0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(RU),this.isDirty=!1,this.children.forEach(t)}}function IU(e,t){const r=Ar.now(),n=({timestamp:s})=>{const i=s-r;i>=t&&(Ki(n),e(i-t))};return at.setup(n,!0),()=>Ki(n)}const XE=["TopLeft","TopRight","BottomLeft","BottomRight"],DU=XE.length,zj=e=>typeof e=="string"?parseFloat(e):e,Fj=e=>typeof e=="number"||ve.test(e);function LU(e,t,r,n,s,i){s?(e.opacity=ht(0,r.opacity??1,MU(n)),e.opacityExit=ht(t.opacity??1,0,zU(n))):i&&(e.opacity=ht(t.opacity??1,r.opacity??1,n));for(let a=0;a<DU;a++){const l=`border${XE[a]}Radius`;let c=$j(t,l),u=$j(r,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Fj(c)===Fj(u)?(e[l]=Math.max(ht(zj(c),zj(u),n),0),(ls.test(u)||ls.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||r.rotate)&&(e.rotate=ht(t.rotate||0,r.rotate||0,n))}function $j(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const MU=YE(0,.5,M_),zU=YE(.5,.95,cn);function YE(e,t,r){return n=>n<e?0:n>t?1:r(Nu(e,t,n))}function Vj(e,t){e.min=t.min,e.max=t.max}function wn(e,t){Vj(e.x,t.x),Vj(e.y,t.y)}function Uj(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Bj(e,t,r,n,s){return e-=t,e=gf(e,1/r,n),s!==void 0&&(e=gf(e,1/s,n)),e}function FU(e,t=0,r=1,n=.5,s,i=e,a=e){if(ls.test(t)&&(t=parseFloat(t),t=ht(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=ht(i.min,i.max,n);e===i&&(l-=t),e.min=Bj(e.min,t,r,l,s),e.max=Bj(e.max,t,r,l,s)}function Hj(e,t,[r,n,s],i,a){FU(e,t[r],t[n],t[s],t.scale,i,a)}const $U=["x","scaleX","originX"],VU=["y","scaleY","originY"];function Wj(e,t,r,n){Hj(e.x,t,$U,r?r.x:void 0,n?n.x:void 0),Hj(e.y,t,VU,r?r.y:void 0,n?n.y:void 0)}function qj(e){return e.translate===0&&e.scale===1}function JE(e){return qj(e.x)&&qj(e.y)}function Kj(e,t){return e.min===t.min&&e.max===t.max}function UU(e,t){return Kj(e.x,t.x)&&Kj(e.y,t.y)}function Gj(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function eP(e,t){return Gj(e.x,t.x)&&Gj(e.y,t.y)}function Qj(e){return pr(e.x)/pr(e.y)}function Zj(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class BU{constructor(){this.members=[]}add(t){k0(this.members,t),t.scheduleRender()}remove(t){if(S0(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(s=>t===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function HU(e,t,r){let n="";const s=e.x.translate/t.x,i=e.y.translate/t.y,a=(r==null?void 0:r.z)||0;if((s||i||a)&&(n=`translate3d(${s}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:m,skewY:v}=r;u&&(n=`perspective(${u}px) ${n}`),d&&(n+=`rotate(${d}deg) `),h&&(n+=`rotateX(${h}deg) `),f&&(n+=`rotateY(${f}deg) `),m&&(n+=`skewX(${m}deg) `),v&&(n+=`skewY(${v}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(n+=`scale(${l}, ${c})`),n||"none"}const zp=["","X","Y","Z"],WU=1e3;let qU=0;function Fp(e,t,r,n){const{latestValues:s}=t;s[e]&&(r[e]=s[e],t.setStaticValue(e,0),n&&(n[e]=0))}function tP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=$E(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",at,!(s||i))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&tP(n)}function rP({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(a={},l=t==null?void 0:t()){this.id=qU++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(QU),this.nodes.forEach(JU),this.nodes.forEach(eB),this.nodes.forEach(ZU)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new OU)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new N0),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=xE(a)&&!z8(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const f=()=>this.root.updateBlockedByResize=!1;at.read(()=>{h=window.innerWidth}),e(a,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,d&&d(),d=IU(f,250),Sh.hasAnimatedSinceResize&&(Sh.hasAnimatedSinceResize=!1,this.nodes.forEach(Jj)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||iB,{onLayoutAnimationStart:g,onLayoutAnimationComplete:w}=u.getProps(),b=!this.targetLayout||!eP(this.targetLayout,m),y=!h&&f;if(this.options.layoutRoot||this.resumeFrom||y||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...z0(v,"layout"),onPlay:g,onComplete:w};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(d,y)}else h||Jj(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ki(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(tB),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&tP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Xj);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Yj);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(YU),this.nodes.forEach(KU),this.nodes.forEach(GU)):this.nodes.forEach(Yj),this.clearAllSnapshots();const l=Ar.now();Xt.delta=Ws(0,1e3/60,l-Xt.timestamp),Xt.timestamp=l,Xt.isProcessing=!0,Cp.update.process(Xt),Cp.preRender.process(Xt),Cp.render.process(Xt),Xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(XU),this.sharedNodes.forEach(rB)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,at.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){at.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pr(this.snapshot.measuredBox.x)&&!pr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Dt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!JE(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&this.instance&&(l||ho(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),oB(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return Dt();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(aB))){const{scroll:d}=this.root;d&&(Ua(l.x,d.offset.x),Ua(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=Dt();if(wn(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&wn(l,a),Ua(l.x,h.offset.x),Ua(l.y,h.offset.y))}return l}applyTransform(a,l=!1){const c=Dt();wn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Ba(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),ho(d.latestValues)&&Ba(c,d.latestValues)}return ho(this.latestValues)&&Ba(c,this.latestValues),c}removeTransform(a){const l=Dt();wn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!ho(u.latestValues))continue;ly(u.latestValues)&&u.updateSnapshot();const d=Dt(),h=u.measurePageBox();wn(d,h),Wj(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return ho(this.latestValues)&&Wj(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=Xt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Dt(),this.targetWithTransforms=Dt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pU(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):wn(this.target,this.layout.layoutBox),IE(this.target,this.targetDelta)):wn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ly(this.parent.latestValues)||OE(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,l,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Dt(),this.relativeTargetOrigin=Dt(),xf(this.relativeTargetOrigin,l,c),wn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Xt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;wn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;CV(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Dt());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Uj(this.prevProjectionDelta.x,this.projectionDelta.x),Uj(this.prevProjectionDelta.y,this.projectionDelta.y)),Qc(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Zj(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zj(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ha(),this.projectionDelta=Ha(),this.projectionDeltaWithTransform=Ha()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=Ha();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=Dt(),m=c?c.source:void 0,v=this.layout?this.layout.source:void 0,g=m!==v,w=this.getStack(),b=!w||w.members.length<=1,y=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(sB));this.animationProgress=0;let x;this.mixTargetDelta=j=>{const k=j/1e3;e2(h.x,a.x,k),e2(h.y,a.y,k),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xf(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nB(this.relativeTarget,this.relativeTargetOrigin,f,k),x&&UU(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Dt()),wn(x,this.relativeTarget)),g&&(this.animationValues=d,LU(d,u,this.latestValues,k,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ki(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=at.update(()=>{Sh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Rl(0)),this.currentAnimation=TU(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),a.onUpdate&&a.onUpdate(d)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(WU),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&nP(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Dt();const h=pr(this.layout.layoutBox.x);
vendor: 9,490 bytes, line 533
533c.x.min=a.target.x.min,c.x.max=c.x.min+h;const f=pr(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}wn(l,c),Ba(l,d),Qc(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new BU),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&Fp("z",a,u,this.animationValues);for(let d=0;d<zp.length;d++)Fp(`rotate${zp[d]}`,a,u,this.animationValues),Fp(`skew${zp[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}applyProjectionStyles(a,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=kh(l==null?void 0:l.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=kh(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!ho(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=HU(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),a.transform=h;const{x:f,y:m}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,u.animationValues?a.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const v in ay){if(d[v]===void 0)continue;const{correct:g,applyTo:w,isCSSVariable:b}=ay[v],y=h==="none"?d[v]:g(d[v],u);if(w){const x=w.length;for(let j=0;j<x;j++)a[w[j]]=y}else b?this.options.visualElement.renderState.vars[v]=y:a[v]=y}this.options.layoutId&&(a.pointerEvents=u===this?kh(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(Xj),this.root.sharedNodes.clear()}}}function KU(e){e.updateLayout()}function GU(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?Xr(h=>{const f=a?t.measuredBox[h]:t.layoutBox[h],m=pr(f);f.min=n[h].min,f.max=f.min+m}):nP(i,t.layoutBox,n)&&Xr(h=>{const f=a?t.measuredBox[h]:t.layoutBox[h],m=pr(n[h]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const l=Ha();Qc(l,n,t.layoutBox);const c=Ha();a?Qc(c,e.applyTransform(s,!0),t.measuredBox):Qc(c,n,t.layoutBox);const u=!JE(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:m}=h;if(f&&m){const v=Dt();xf(v,t.layoutBox,f.layoutBox);const g=Dt();xf(g,n,m.layoutBox),eP(v,g)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=v,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function QU(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ZU(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function XU(e){e.clearSnapshot()}function Xj(e){e.clearMeasurements()}function Yj(e){e.isLayoutDirty=!1}function YU(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Jj(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function JU(e){e.resolveTargetDelta()}function eB(e){e.calcProjection()}function tB(e){e.resetSkewAndRotation()}function rB(e){e.removeLeadSnapshot()}function e2(e,t,r){e.translate=ht(t.translate,0,r),e.scale=ht(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function t2(e,t,r,n){e.min=ht(t.min,r.min,n),e.max=ht(t.max,r.max,n)}function nB(e,t,r,n){t2(e.x,t.x,r.x,n),t2(e.y,t.y,r.y,n)}function sB(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const iB={duration:.45,ease:[.4,0,.1,1]},r2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),n2=r2("applewebkit/")&&!r2("chrome/")?Math.round:cn;function s2(e){e.min=n2(e.min),e.max=n2(e.max)}function oB(e){s2(e.x),s2(e.y)}function nP(e,t,r){return e==="position"||e==="preserve-aspect"&&!mU(Qj(t),Qj(r),.2)}function aB(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const lB=rP({attachResizeListener:(e,t)=>Tu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$p={current:void 0},sP=rP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$p.current){const e=new lB({});e.mount(window),e.setOptions({layoutScroll:!0}),$p.current=e}return $p.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),cB={pan:{Feature:EU},drag:{Feature:_U,ProjectionNode:sP,MeasureLayout:ZE}};function i2(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const s="onHover"+r,i=n[s];i&&at.postRender(()=>i(t,cd(t)))}class uB extends to{mount(){const{current:t}=this.node;t&&(this.unmount=O8(t,(r,n)=>(i2(this.node,n,"Start"),s=>i2(this.node,s,"End"))))}unmount(){}}class dB extends to{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=od(Tu(this.node.current,"focus",()=>this.onFocus()),Tu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function o2(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const s="onTap"+(r==="End"?"":r),i=n[s];i&&at.postRender(()=>i(t,cd(t)))}class hB extends to{mount(){const{current:t}=this.node;t&&(this.unmount=M8(t,(r,n)=>(o2(this.node,n,"Start"),(s,{success:i})=>o2(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const py=new WeakMap,Vp=new WeakMap,fB=e=>{const t=py.get(e.target);t&&t(e)},mB=e=>{e.forEach(fB)};function pB({root:e,...t}){const r=e||document;Vp.has(r)||Vp.set(r,{});const n=Vp.get(r),s=JSON.stringify(t);return n[s]||(n[s]=new IntersectionObserver(mB,{root:e,...t})),n[s]}function gB(e,t,r){const n=pB(t);return py.set(e,r),n.observe(e),()=>{py.delete(e),n.unobserve(e)}}const xB={some:0,all:1};class yB extends to{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:s="some",once:i}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:xB[s]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(c)};return gB(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(vB(t,r))&&this.startObserver()}unmount(){}}function vB({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const bB={inView:{Feature:yB},tap:{Feature:hB},focus:{Feature:dB},hover:{Feature:uB}}
533,wB={layout:{ProjectionNode:sP,MeasureLayout:ZE}},jB={...lU,...bB,...cB,...wB},X=SV(jB,MV);var es=function(){return es=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},es.apply(this,arguments)};function Yl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function kB(e,t,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function l(d){try{u(n.next(d))}catch(h){a(h)}}function c(d){try{u(n.throw(d))}catch(h){a(h)}}function u(d){d.done?i(d.value):s(d.value).then(l,c)}u((n=n.apply(e,t||[])).next())})}function SB(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,i;n<s;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))}const AB=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Y0 extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class NB extends Y0{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class a2 extends Y0{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class l2 extends Y0{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var gy;(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"})(gy||(gy={}));class CB{constructor(t,{headers:r={},customFetch:n,region:s=gy.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=AB(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return kB(this,arguments,void 0,function*(r,n={}){var s;let i,a;try{const{headers:l,method:c,body:u,signal:d,timeout:h}=n;let f={},{region:m}=n;m||(m=this.region);const v=new URL(`${this.url}/${r}`);m&&m!=="any"&&(f["x-region"]=m,v.searchParams.set("forceFunctionRegion",m));let g;u&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",g=u):typeof u=="string"?(f["Content-Type"]="text/plain",g=u):typeof FormData<"u"&&u instanceof FormData?g=u:(f["Content-Type"]="application/json",g=JSON.stringify(u)):g=u;let w=d;h&&(a=new AbortController,i=setTimeout(()=>a.abort(),h),d?(w=a.signal,d.addEventListener("abort",()=>a.abort())):w=a.signal);const b=yield this.fetch(v.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),l),body:g,signal:w}).catch(k=>{throw new NB(k)}),y=b.headers.get("x-relay-error");if(y&&y==="true")throw new a2(b);if(!b.ok)throw new l2(b);let x=((s=b.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),j;return x==="application/json"?j=yield b.json():x==="application/octet-stream"||x==="application/pdf"?j=yield b.blob():x==="text/event-stream"?j=b:x==="multipart/form-data"?j=yield b.formData():j=yield b.text(),{data:j,error:null,response:b}}catch(l){return{data:null,error:l,response:l instanceof l2||l instanceof a2?l.context:void 0}}finally{i&&clearTimeout(i)}})}}var _B=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
533de=e.code}},EB=class{constructor(e){var t,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let a=null,l=null,c=null,u=i.status,d=i.statusText;if(i.ok){var h,f;if(r.method!=="HEAD"){var m;const b=await i.text();b===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((m=r.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?l=b:l=JSON.parse(b))}const g=(h=r.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),w=(f=i.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");g&&w&&w.length>1&&(c=parseInt(w[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(l)&&(l.length>1?(a={code:"PGRST116",details:`Results contain ${l.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l=null,c=null,u=406,d="Not Acceptable"):l.length===1?l=l[0]:l=null)}else{var v;const g=await i.text();try{a=JSON.parse(g),Array.isArray(a)&&i.status===404&&(l=[],a=null,u=200,d="OK")}catch{i.status===404&&g===""?(u=204,d="No Content"):a={message:g}}if(a&&r.isMaybeSingle&&(!(a==null||(v=a.details)===null||v===void 0)&&v.includes("0 rows"))&&(a=null,u=200,d="OK"),a&&r.shouldThrowOnError)throw new _B(a)}return{error:a,data:l,count:c,status:u,statusText:d}});return this.shouldThrowOnError||(s=s.catch(i=>{var a;let l="";const c=i==null?void 0:i.cause;if(c){var u,d,h,f;const v=(u=c==null?void 0:c.message)!==null&&u!==void 0?u:"",g=(d=c==null?void 0:c.code)!==null&&d!==void 0?d:"";l=`${(h=i==null?void 0:i.name)!==null&&h!==void 0?h:"FetchError"}: ${i==null?void 0:i.message}`,l+=` 534 535Caused by: ${(f=c==null?void 0:c.name)!==null&&f!==void 0?f:"Error"}: ${v}`,g&&(l+=` (${g})`),c!=null&&c.stack&&(l+=` 536${c.stack}`)}else{var m;l=(m=i==null?void 0:i.stack)!==null&&m!==void 0?m:""}return{error:{message:`${(a=i==null?void 0:i.name)!==null&&a!==void 0?a:"FetchError"}: ${i==null?void 0:i.message}`,details:l,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},PB=class extends EB{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",a=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
536explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var a;const l=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${c}"; options=${l};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const c2=new RegExp("[,()]");var Sa=class extends PB{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&c2.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&c2.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},TB=class{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let i=!1;const a=(e??"*").split("").map(l=>/\s/.test(l)&&!i?"":(l==='"'&&(i=!i),l)).join("");return this.url.searchParams.set("select",a),n&&this.headers.append("Prefer",`count=${n}`),new Sa({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST";if(t&&this.headers.append("Prefer",`count=${t}`),r||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const i=e.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(i.length>
5360){const a=[...new Set(i)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new Sa({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const a="POST";if(this.headers.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&this.url.searchParams.set("on_conflict",t),n&&this.headers.append("Prefer",`count=${n}`),s||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);this.url.searchParams.set("columns",c.join(","))}}return new Sa({method:a,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}update(e,{count:t}={}){var r;const n="PATCH";return t&&this.headers.append("Prefer",`count=${t}`),new Sa({method:n,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:e}={}){var t;const r="DELETE";return e&&this.headers.append("Prefer",`count=${e}`),new Sa({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},RB=class iP{constructor(t,{headers:r={},schema:n,fetch:s}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.fetch=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new TB(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new iP(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,r={},{head:n=!1,get:s=!1,count:i}={}){var a;let l;const c=new URL(`${this.url}/rpc/${t}`);let u;n||s?(l=n?"HEAD":"GET",Object.entries(r).filter(([h,f])=>f!==void 0).map(([h,f])=>[h,Array.isArray(f)?`{${f.join(",")}}`:`${f}`]).forEach(([h,f])=>{c.searchParams.append(h,f)})):(l="POST",u=r);const d=new Headers(this.headers);return i&&d.set("Prefer",`count=${i}`),new Sa({method:l,url:c,headers:d,schema:this.schemaName,body:u,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}};class OB{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const r=process.versions;if(r&&r.node){const n=r.node,s=parseInt(n.replace(/^v/,"").split(".")[0]);return s>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 537import ws from "ws" 538new 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+=` 539 540Suggested 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 IB="2.89.0",DB=`realtime-js/${IB}`,oP="1.0.0",LB="2.0.0",u2=oP,xy=1e4,MB=1e3,zB=100;var ci;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(ci||(ci={}));var It;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(It||(It={}));var Pn;(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"})(Pn||(Pn={}));var yy;(function(e){e.websocket="websocket"})(yy||(yy={}));var po;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(po||(po={}));class FB{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},a=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,a)}_encodeUserBroadcastPush(t,r,n){var s,i;const a=t.topic,l=(s=t.ref)!==null&&s!==void 0?s:"",c=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+a.length+u.length+h.length,m=new ArrayBuffer(this.HEADER_LENGTH+f);let v=new DataView(m),g=0;v.setUint8(g++,this.KINDS.userBroadcastPush),v.setUint8(g++,c.length),v.setUint8(g++,l.length),v.setUint8(g++,a.length),v.setUint8(g++,u.length),v.setUint8(g++,h.length),v.setUint8(g++,r),Array.from(c,b=>v.setUint8(g++,b.charCodeAt(0))),Array.from(l,b=>v.setUint8(g++,b.charCodeAt(0))),Array.from(a,b=>v.setUint8(g++,b.charCodeAt(0))),Array.from(u,b=>v.setUint8(g++,b.charCodeAt(0))),Array.from(h,b=>v.setUint8(g++,b.charCodeAt(0)));var w=new Uint8Array(m.byteLength+n.byteLength);return w.set(new Uint8Array(m),0),w.set(new Uint8Array(n),m.byteLength),w.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,i,a,l,c]=n;return r({join_ref:s,ref:i,topic:a,event:l,payload:c})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),i=r.getUint8(2),a=r.getUint8(3),l=r.getUint8(4);let c=this.HEADER_LENGTH+4;const u=n.decode(t.slice(c,c+s));c=c+s;const d=n.decode(t.slice(c,c+i));c=c+i;const h=n.decode(t.slice(c,c+a));c=c+a;const f=t.slice(c,t.byteLength),m=l===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,v={type:this.BROADCAST_EVENT,event:d,payload:m};return a>0&&(v.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:v}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}class aP{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 et;(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"})(et||(et={}));const d2=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((i,a)=>(i[a]=$B(a,e,t,s),i),{}):{}},$B=(e,t,r,n)=>{const s=t.find(l=>
540l.name===e),i=s==null?void 0:s.type,a=r[e];return i&&!n.includes(i)?lP(i,a):vy(a)},lP=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return HB(t,r)}switch(e){case et.bool:return VB(t);case et.float4:case et.float8:case et.int2:case et.int4:case et.int8:case et.numeric:case et.oid:return UB(t);case et.json:case et.jsonb:return BB(t);case et.timestamp:return WB(t);case et.abstime:case et.date:case et.daterange:case et.int4range:case et.int8range:case et.money:case et.reltime:case et.text:case et.time:case et.timestamptz:case et.timetz:case et.tsrange:case et.tstzrange:return vy(t);default:return vy(t)}},vy=e=>e,VB=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},UB=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},BB=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},HB=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let i;const a=e.slice(1,r);try{i=JSON.parse("["+a+"]")}catch{i=a?a.split(","):[]}return i.map(l=>lP(t,l))}return e},WB=e=>typeof e=="string"?e.replace(" ","T"):e,cP=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class Up{constructor(t,r,n={},s=xy){this.channel=t,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var h2;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(h2||(h2={}));class Zc{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:i,onLeave:a,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Zc.syncState(this.state,s,i,a),this.pendingDiffs.forEach(c=>{this.state=Zc.syncDiff(this.state,c,i,a)}),this.pendingDiffs=[],l()}),this.channel._on(n.diff,{},s=>{const{onJoin:i,onLeave:a,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Zc.syncDiff(this.state,s,i,a),l())}),this.onJoin((s,i,a)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:a})}),this.onLeave((s,i,a)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:a})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,s){const i=this.cloneDeep(t),a=this.transformState(r),l={},c={};return this.map(i,(u,d)=>{a[u]||(c[u]=d)}),this.map(a,(u,d)=>{const h=i[u];if(h){const f=d.map(w=>w.presence_ref),m=h.map(w=>w.presence_ref),v=d.filter(w=>m.indexOf(w.presence_ref)<0),g=h.filter(w=>f.indexOf(w.presence_ref)<0);v.length>0&&(l[u]=v),g.length>0&&(c[u]=g)}else l[u]=d}),this.syncDiff(i,{joins:l,leaves:c},n,s)}static syncDiff(t,r,n,s){const{joins:i,leaves:a}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(i,(l,c)=>{var u;
540const d=(u=t[l])!==null&&u!==void 0?u:[];if(t[l]=this.cloneDeep(c),d.length>0){const h=t[l].map(m=>m.presence_ref),f=d.filter(m=>h.indexOf(m.presence_ref)<0);t[l].unshift(...f)}n(l,d,c)}),this.map(a,(l,c)=>{let u=t[l];if(!u)return;const d=c.map(h=>h.presence_ref);u=u.filter(h=>d.indexOf(h.presence_ref)<0),t[l]=u,s(l,u,c),u.length===0&&delete t[l]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return"metas"in s?r[n]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):r[n]=s,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var f2;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(f2||(f2={}));var Xc;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Xc||(Xc={}));var Ns;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Ns||(Ns={}));class Wa{constructor(t,r={config:{}},n){var s,i;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=It.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 Up(this,Pn.join,this.params,this.timeout),this.rejoinTimer=new aP(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=It.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=It.closed,this.socket._remove(this)}),this._onError(a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=It.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=It.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=It.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Pn.reply,{},(a,l)=>{this._trigger(this._replyEventName(l),a)}),this.presence=new Zc(this),this.broadcastEndpointURL=cP(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==It.closed){const{config:{broadcast:a,presence:l,private:c}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(m=>m.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[Xc.PRESENCE]&&this.bindings[Xc.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},f={broadcast:a,presence:Object.assign(Object.assign({},l),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(m=>t==null?void 0:t(Ns.CHANNEL_ERROR,m)),this._onClose(()=>t==null?void 0:t(Ns.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:m})=>{var v;if(this.socket._isManualToken()||this.socket.setAuth(),m===void 0){t==null||t(Ns.SUBSCRIBED);return}else{const g=this.bindings.postgres_changes,w=(v=g==null?void 0:g.length)!==null&&v!==void 0?v:0,b=[];for(let y=0;y<w;y++){const x=g[y],{filter:{event:j,schema:k,table:S,filter:N}}=x,A=m&&m[y];if(A&&A.event===j&&Wa.isFilterValueEqual(A.schema,k)&&Wa.isFilterValueEqual(A.table,S)&&Wa.isFilterValueEqual(A.filter,N))b.push(Object.assign(Object.assign({},x),{id:A.id}));else{this.unsubscribe(),this.state=It.errored,t==null||t(Ns.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=b,t&&t(Ns.SUBSCRIBED);return}}).receive("error",m=>{this.state=It.errored,t==null||t(Ns.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(m).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Ns.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===It.joined&&t===Xc.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,a,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;
540try{const u=await l.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,r={}){var n,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:a}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:a,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var a,l,c;const u=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(a=this.params)===null||a===void 0?void 0:a.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=It.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Pn.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new Up(this,Pn.leave,{},t),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=It.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),a=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),a}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Up(this,t,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>zB){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var s,i;const a=t.toLocaleLowerCase(),{close:l,error:c,leave:u,join:d}=Pn;if(n&&[l,c,u,d].indexOf(a)>=0&&n!==this._joinRef())return;let f=this._onMessage(a,r,n);if(r&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(a)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(m=>{var v,g,w;return((v=m.filter)===null||v===void 0?void 0:v.event)==="*"||((w=(g=m.filter)===null||g===void 0?void 0:g.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===a}).map(m=>m.callback(f,n)):(i=this.bindings[a])===null||i===void 0||i.filter(m=>{var v,g,w,b,y,x;if(["broadcast","presence","postgres_changes"].includes(a))if("id"in m){const j=m.id,k=(v=m.filter)===null||v===void 0?void 0:v.event;return j&&((g=r.ids)===null||g===void 0?void 0:g.includes(j))&&(k==="*"||(k==null?void 0:k.toLocaleLowerCase())===((w=r.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const j=(y=(b=m==null?void 0:m.filter)===null||b===void 0?void 0:b.event)===null||y===void 0?void 0:y.toLocaleLowerCase();return j==="*"||j===((x=r==null?void 0:r.event)===null||x===void 0?void 0:x.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===a}).map(m=>{if(typeof f=="object"&&"ids"in f){const v=f.data,{schema:g,table:w,commit_timestamp:b,type:y,errors:x}=v;f=Object.assign(Object.assign({},{schema:g,table:w,commit_timestamp:b,eventType:y,new:{},old:{},errors:x}),this._getPayloadRecords(v))}m.callback(f,n)})}_isClosed(){return this.state===It.closed}_isJoined(){return this.state===It.joined}_isJoining(){return this.state===It.joining}_isLeaving(){return this.state===It.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const s=t.toLocaleLowerCase(),i={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===n&&Wa.isEqual(s.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Pn.close,{},t)}_onError(t){this._on(Pn.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=It.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=d2(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=d2(t.columns,t.old_record)),r}}const Bp=()=>{},Hd={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100}
540,qB=[1e3,2e3,5e3,1e4],KB=1e4,GB=` 541 addEventListener("message", (e) => { 542 if (e.data.event === "start") { 543 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 544 } 545 });`;class QB{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=xy,this.transport=null,this.heartbeatIntervalMs=Hd.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Bp,this.ref=0,this.reconnectTimer=null,this.vsn=u2,this.logger=Bp,this.conn=null,this.sendBuffer=[],this.serializer=new FB,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>s?(...i)=>s(...i):(...i)=>fetch(...i),!(!((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}/${yy.websocket}`,this.httpEndpoint=cP(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=OB.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r} 546 547To use Realtime in Node.js, you need to provide a WebSocket implementation: 548 549Option 1: Use Node.js 22+ which has native WebSocket support 550Option 2: Install and provide the "ws" package: 551 552 npm install ws 553 554 import ws from "ws" 555 const client = new RealtimeClient(url, { 556 ...options, 557 transport: ws 558 })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case ci.connecting:return po.Connecting;case ci.open:return po.Open;case ci.closing:return po.Closing;default:return po.Closed}}isConnected(){return this.connectionState()===po.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new Wa(`realtime:${t}`,r,this);return this.channels.push(i),i}}push(t){const{topic:r,event:n,payload:s,ref:i}=t,a=()=>{this.encode(t,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${r} ${n} (${i})`,s),this.isConnected()?a():this.sendBuffer.push(a)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(MB,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
558heduleTimeout()},Hd.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:s,payload:i,ref:a}=r,l=a?`(${a})`:"",c=i.status||"";this.log("receive",`${c} ${n} ${s} ${l}`.trim(),i),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(s,i,a)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===ci.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===ci.open||this.conn.readyState===ci.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
558heduleTimeout(),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(Pn.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${t}${n}${s}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([GB],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const i={access_token:r,version:DB};r&&s.updateJoinPayload(i),s.joinedOnce&&s._isJoined()&&s._push(Pn.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new aP(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Hd.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,s,i,a,l,c,u,d,h,f,m;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:xy,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:Hd.HEARTBEAT_INTERVAL,this.worker=(i=t==null?void 0:t.worker)!==null&&i!==void 0?i:!1,this.accessToken=(a=t==null?void 0:t.accessToken)!==null&&a!==void 0?a:null,this.heartbeatCallback=(l=t==null?void 0:t.heartbeatCallback)!==null&&l!==void 0?l:Bp,this.vsn=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:u2,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:v=>qB[v-1]||KB,this.vsn){case oP:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(v,g)=>g(JSON.stringify(v)),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:(v,g)=>g(JSON.parse(v));break;case LB:this.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:this.serializer.encode.bind(this.serializer),this.decode=(m=t==null?void 0:t.decode)!==null&&m!==void 0?m:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var Ru=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function ZB(e,t,r){const n=new URL(t,e);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function XB(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function YB(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:a}){const l=ZB(e.baseUrl,n,s),c=await XB(e.auth),u=await t(l,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...c,...a},body:i?JSON.stringify(i):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),f=h&&d?JSON.parse(d):d;if(!u.ok){const m=h?f:void 0,v=m==null?void 0:m.error;throw new Ru((v==null?void 0:v.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:v==null?void 0:v.type,icebergCode:v==null?void 0:v.code,details:m})}return{status:u.status,headers:u.headers,data:f}}}}function Wd(e){return e.join("�")}var JB=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Wd(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Wd(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Wd(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Wd(e.namespace)}`}),!0}catch(t){if(t instanceof Ru&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Ru&&r.status===409)return;throw r}}};function da(e){return e.join("�")}var e7=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${da(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${da(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${da(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${da(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${da(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${da(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Ru&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Ru&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},t7=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=YB({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new JB(this.client,t),this.tableOps=new e7(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
558async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},vm=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function ut(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var r7=class extends vm{constructor(e,t,r){super(e),this.name="StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},by=class extends vm{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const J0=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),n7=()=>Response,wy=e=>{if(Array.isArray(e))return e.map(r=>wy(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=wy(n)}),t},s7=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},i7=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Ou(e){"@babel/helpers - typeof";return Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(e)}function o7(e,t){if(Ou(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ou(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a7(e){var t=o7(e,"string");return Ou(t)=="symbol"?t:t+""}function l7(e,t,r){return(t=a7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?m2(Object(r),!0).forEach(function(n){l7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Hp=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},c7=async(e,t,r)=>{e instanceof await n7()&&!(r!=null&&r.noResolveJson)?e.json().then(n=>{const s=e.status||500,i=(n==null?void 0:n.statusCode)||s+"";t(new r7(Hp(n),s,i))}).catch(n=>{t(new by(Hp(n),n))}):t(new by(Hp(e),e))},u7=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?s:(s7(n)?(s.headers=xe({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,t!=null&&t.duplex&&(s.duplex=t.duplex),xe(xe({},s),r))};async function ud(e,t,r,n,s,i){return new Promise((a,l)=>{e(r,u7(t,n,s,i)).then(c=>{if(!c.ok)throw c;return n!=null&&n.noResolveJson?c:c.json()}).then(c=>a(c)).catch(c=>c7(c,l,n))})}async function Iu(e,t,r,n){return ud(e,"GET",t,r,n)}async function Nn(e,t,r,n,s){return ud(e,"POST",t,n,s,r)}async function jy(e,t,r,n,s){return ud(e,"PUT",t,n,s,r)}async function d7(e,t,r,n){return ud(e,"HEAD",t,xe(xe({},r),{},{noResolveJson:!0}),n)}async function eb(e,t,r,n,s){return ud(e,"DELETE",t,n,s,r)}var h7=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(ut(t))return{data:null,error:t};throw t}}};let uP;uP=Symbol.toStringTag;var f7=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[uP]="BlobDownloadBuilder",this.promise=null}asStream(){return new h7(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(ut(t))return{data:null,error:t};throw t}}};const m7={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},p2={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var p7=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=r,this.fetch=J0(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,r,n){var s=this;try{let i;const a=xe(xe({},p2),n);let l=xe(xe({},s.headers),e==="POST"&&{"x-upsert":String(a.upsert)});const c=a.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",a.cacheControl),c&&i.append("metadata",s.encodeMetadata(c)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",a.cacheControl),c&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(c))):(i=r,l["cache-control"]=`max-age=${a.cacheControl}`,l["content-type"]=a.contentType,c&&(l["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!a.duplex&&(a.duplex="half")),n!=null&&n.headers&&(l=xe(xe({},l),n.headers));const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?jy:Nn)(s.fetch,`${s.url}/object/${d}`,i,xe({headers:l},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{data:{path:u,id:h.Id,fullPath:h.Key},error:null}}catch(i){if(s.shouldThrowOnError)throw i;if(ut(i))return{data:null,error:i};throw i}}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const i=s._removeEmptyFolders(e),a=s._getFinalPath(i),l=new URL(s.url+`/object/upload/sign/${a}`);l.searchParams.set("token",t);try{let c;const u=xe({upsert:p2.upsert},n),d=xe(xe({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.append("cacheControl",u.cacheControl)):(c=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{data:{path:i,fullPath:(await jy(s.fetch,l.toString(),c,{headers:d})).Key},error:null}}catch(c){if(s.shouldThrowOnError)throw c;if(ut(c))return{data:null,error:c};throw c}}async createSignedUploadUrl(e,t){var r=this;try{let n=r._getFinalPath(e);const s=xe({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Nn(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),a=new URL(r.url+i.url),l=a.searchParams.get("token");if(!l)throw new vm("No token returned by API");return{data:{signedUrl:a.toString(),path:e,token:l},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ut(n))return{data:null,error:n};throw n}}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;try{return{data:await Nn(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
558stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ut(s))return{data:null,error:s};throw s}}async copy(e,t,r){var n=this;try{return{data:{path:(await Nn(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key},error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ut(s))return{data:null,error:s};throw s}}async createSignedUrl(e,t,r){var n=this;try{let s=n._getFinalPath(e),i=await Nn(n.fetch,`${n.url}/object/sign/${s}`,xe({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return i={signedUrl:encodeURI(`${n.url}${i.signedURL}${a}`)},{data:i,error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ut(s))return{data:null,error:s};throw s}}async createSignedUrls(e,t,r){var n=this;try{const s=await Nn(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(a=>xe(xe({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${i}`):null})),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ut(s))return{data:null,error:s};throw s}}download(e,t){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",n=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),s=n?`?${n}`:"",i=this._getFinalPath(e),a=()=>Iu(this.fetch,`${this.url}/${r}/${i}${s}`,{headers:this.headers,noResolveJson:!0});return new f7(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);try{return{data:wy(await Iu(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(ut(n))return{data:null,error:n};throw n}}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await d7(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(ut(n)&&n instanceof by){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",a=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});a!==""&&n.push(a);let l=n.join("&");return l!==""&&(l=`?${l}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}${l}`)}}}async remove(e){var t=this;try{return{data:await eb(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}}async list(e,t,r){var n=this;try{const s=xe(xe(xe({},m7),t),{},{prefix:e||""});return{data:await Nn(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ut(s))return{data:null,error:s};throw s}}async listV2(e,t){var r=this;try{const n=xe({},e);return{data:await Nn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ut(n))return{data:null,error:n};throw n}}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const dP="2.89.0",hP={"X-Client-Info":`storage-js/${dP}`};var g7=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1;const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href.replace(/\/$/,""),this.headers=xe(xe({},hP),t),this.fetch=J0(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const r=t.listBucketOptionsToQueryString(e);return{data:await Iu(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await Iu(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}}async createBucket(e,t={public:!1}){var r=this;try{return{data:await Nn(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ut(n))return{data:null,error:n};throw n}}async updateBucket(e,t){var r=this;try{return{data:await jy(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ut(n))return{data:null,error:n};throw n}}async emptyBucket(e){var t=this;try{return{data:await Nn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await eb(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},x7=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=xe(xe({},hP),t),this.fetch=J0(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Nn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}}async listBuckets(e){var t=this;
558try{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return{data:await Iu(t.fetch,s,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await eb(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}}from(e){var t=this;if(!i7(e))throw new vm("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new t7({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const a=s[i];return typeof a!="function"?a:async(...l)=>{try{return{data:await a.apply(s,l),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}}}})}};const tb={"X-Client-Info":`storage-js/${dP}`,"Content-Type":"application/json"};var fP=class extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function Mr(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}var Wp=class extends fP{constructor(e,t,r){super(e),this.name="StorageVectorsApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},y7=class extends fP{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const rb=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),v7=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},g2=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),b7=async(e,t,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const n=e.status||500,s=e;if(typeof s.json=="function")s.json().then(i=>{const a=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||n+"";t(new Wp(g2(i),n,a))}).catch(()=>{const i=n+"";t(new Wp(s.statusText||`HTTP ${n} error`,n,i))});else{const i=n+"";t(new Wp(s.statusText||`HTTP ${n} error`,n,i))}}else t(new y7(g2(e),e))},w7=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(v7(n)?(s.headers=xe({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,xe(xe({},s),r)):s};async function j7(e,t,r,n,s,i){return new Promise((a,l)=>{e(r,w7(t,n,s,i)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;const u=c.headers.get("content-type");return!u||!u.includes("application/json")?{}:c.json()}).then(c=>a(c)).catch(c=>b7(c,l,n))})}async function zr(e,t,r,n,s){return j7(e,"POST",t,n,s,r)}var k7=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=xe(xe({},tb),t),this.fetch=rb(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await zr(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async getIndex(e,t){var r=this;try{return{data:await zr(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Mr(n))return{data:null,error:n};throw n}}async listIndexes(e){var t=this;try{return{data:await zr(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async deleteIndex(e,t){var r=this;try{return{data:await zr(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Mr(n))return{data:null,error:n};throw n}}},S7=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=xe(xe({},tb),t),this.fetch=rb(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(e){var t=this;try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await zr(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async getVectors(e){var t=this;try{return{data:await zr(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async listVectors(e){var t=this;try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
558if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:await zr(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async queryVectors(e){var t=this;try{return{data:await zr(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async deleteVectors(e){var t=this;try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await zr(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}},A7=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=xe(xe({},tb),t),this.fetch=rb(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await zr(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await zr(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async listBuckets(e={}){var t=this;try{return{data:await zr(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await zr(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Mr(r))return{data:null,error:r};throw r}}},N7=class extends A7{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new C7(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},C7=class extends k7{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,xe(xe({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,xe(xe({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new _7(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},_7=class extends S7{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,xe(xe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,xe(xe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,xe(xe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,xe(xe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,xe(xe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},E7=class extends g7{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new p7(this.url,this.headers,e,this.fetch)}get vectors(){return new N7(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new x7(this.url+"/iceberg",this.headers,this.fetch)}};const mP="2.89.0",Aa=30*1e3,ky=3,qp=ky*Aa,P7="http://localhost:9999",T7="supabase.auth.token",R7={"X-Client-Info":`gotrue-js/${mP}`},Sy="X-Supabase-Api-Version",pP={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},O7=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,I7=10*60*1e3;
558class Du extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function de(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class D7 extends Du{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function L7(e){return de(e)&&e.name==="AuthApiError"}class go extends Du{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Qs extends Du{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class Ir extends Qs{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function M7(e){return de(e)&&e.name==="AuthSessionMissingError"}class ha extends Qs{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class qd extends Qs{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Kd extends Qs{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 z7(e){return de(e)&&e.name==="AuthImplicitGrantRedirectError"}class x2 extends Qs{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 F7 extends Qs{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Ay extends Qs{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Kp(e){return de(e)&&e.name==="AuthRetryableFetchError"}class y2 extends Qs{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Ny extends Qs{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const yf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),v2=` 559\r=`.split(""),$7=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<v2.length;t+=1)e[v2[t].charCodeAt(0)]=-2;for(let t=0;t<yf.length;t+=1)e[yf[t].charCodeAt(0)]=t;return e})();function b2(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(yf[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(yf[n]),t.queuedBits-=6}}function gP(e,t,r){const n=$7[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 w2(e){const t=[],r=a=>{t.push(String.fromCodePoint(a))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=a=>{B7(a,n,r)};for(let a=0;a<e.length;a+=1)gP(e.charCodeAt(a),s,i);return t.join("")}function V7(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 U7(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}V7(n,t)}}function B7(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 ol(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;
559s+=1)gP(e.charCodeAt(s),r,n);return new Uint8Array(t)}function H7(e){const t=[];return U7(e,r=>t.push(r)),new Uint8Array(t)}function jo(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>b2(s,r,n)),b2(null,r,n),t.join("")}function W7(e){return Math.round(Date.now()/1e3)+e}function q7(){return Symbol("auth-callback")}const Qt=()=>typeof window<"u"&&typeof document<"u",oo={tested:!1,writable:!1},xP=()=>{if(!Qt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(oo.tested)return oo.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),oo.tested=!0,oo.writable=!0}catch{oo.tested=!0,oo.writable=!1}return oo.writable};function K7(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const yP=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),G7=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Na=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},ao=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Gt=async(e,t)=>{await e.removeItem(t)};class bm{constructor(){this.promise=new bm.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}bm.promiseConstructor=Promise;function Gp(e){const t=e.split(".");if(t.length!==3)throw new Ny("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!O7.test(t[n]))throw new Ny("JWT not in base64url format");return{header:JSON.parse(w2(t[0])),payload:JSON.parse(w2(t[1])),signature:ol(t[2]),raw:{header:t[0],payload:t[1]}}}async function Q7(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Z7(e,t){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const a=await e(i);if(!t(i,null,a)){n(a);return}}catch(a){if(!t(i,a)){s(a);return}}})()})}function X7(e){return("0"+e.toString(16)).substr(-2)}function Y7(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,X7).join("")}async function J7(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function e9(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await J7(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function fa(e,t,r=!1){const n=Y7();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await Na(e,`${t}-code-verifier`,s);const i=await e9(n);return[i,n===i?"plain":"s256"]}const t9=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function r9(e){const t=e.headers.get(Sy);if(!t||!t.match(t9))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function n9(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 s9(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 i9=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ma(e){if(!i9.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Qp(){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 o9(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
559if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function j2(e){return JSON.parse(JSON.stringify(e))}const fo=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),a9=[502,503,504];async function k2(e){var t;if(!G7(e))throw new Ay(fo(e),0);if(a9.includes(e.status))throw new Ay(fo(e),e.status);let r;try{r=await e.json()}catch(i){throw new go(fo(i),i)}let n;const s=r9(e);if(s&&s.getTime()>=pP["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 y2(fo(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Ir}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,a)=>i&&typeof a=="string",!0))throw new y2(fo(r),e.status,r.weak_password.reasons);throw new D7(fo(r),e.status||500,n)}const l9=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function ge(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Sy]||(i[Sy]=pP["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const a=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(a.redirect_to=n.redirectTo);const l=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",c=await c9(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 c9(e,t,r,n,s,i){const a=l9(t,n,s,i);let l;try{l=await e(r,Object.assign({},a))}catch(c){throw console.error(c),new Ay(fo(c),0)}if(l.ok||await k2(l),n!=null&&n.noResolveJson)return l;try{return await l.json()}catch(c){await k2(c)}}function jn(e){var t;let r=null;h9(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=W7(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function S2(e){const t=jn(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 mi(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function u9(e){return{data:e,error:null}}function d9(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=e,a=Yl(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},c=Object.assign({},a);return{data:{properties:l,user:c},error:null}}function A2(e){return e}function h9(e){return e.access_token&&e.refresh_token&&e.expires_in}const Zp=["global","local","others"];class f9{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=yP(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}
vendor: 4,780 bytes, line 559
559async signOut(t,r=Zp[0]){if(Zp.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Zp.join(", ")}`);try{return await ge(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(de(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await ge(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:mi})}catch(n){if(de(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Yl(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await ge(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:d9,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(de(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await ge(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:mi})}catch(r){if(de(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,i,a,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ge(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=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:A2});if(d.error)throw d.error;const h=await d.json(),f=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,m=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(v=>{const g=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(v.split(";")[1].split("=")[1]);u[`${w}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(de(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){ma(t);try{return await ge(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:mi})}catch(r){if(de(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){ma(t);try{return await ge(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:mi})}catch(n){if(de(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){ma(t);try{return await ge(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:mi})}catch(n){if(de(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){ma(t.userId);try{const{data:r,error:n}=await ge(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(de(r))return{data:null,error:r};throw r}}async _deleteFactor(t){ma(t.userId),ma(t.id);try{return{data:await ge(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(de(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,i,a,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ge(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:A2});if(d.error)throw d.error;const h=await d.json(),f=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,m=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(v=>{const g=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(v.split(";")[1].split("=")[1]);u[`${w}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(de(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await ge(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(de(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await ge(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(de(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await ge(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(de(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await ge(this.fetch,"DELET
559E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(de(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await ge(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(de(r))return{data:null,error:r};throw r}}}function N2(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const pa={debug:!!(globalThis&&xP()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class vP extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class m9 extends vP{}async function p9(e,t,r){pa.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),pa.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){pa.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await r()}finally{pa.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw pa.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new m9(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(pa.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()}}))}function g9(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function bP(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function x9(e){return parseInt(e,16)}function y9(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function v9(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:a,notBefore:l,requestId:c,resources:u,scheme:d,uri:h,version:f}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 560`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const m=bP(e.address),v=d?`${d}://${n}`:n,g=e.statement?`${e.statement} 561`:"",w=`${v} wants you to sign in with your Ethereum account: 562${m} 563 564${g}`;let b=`URI: ${h} 565Version: ${f} 566Chain ID: ${r}${a?` 567Nonce: ${a}`:""} 568Issued At: ${i.toISOString()}`;if(s&&(b+=` 569Expiration Time: ${s.toISOString()}`),l&&(b+=` 570Not Before: ${l.toISOString()}`),c&&(b+=` 571Request ID: ${c}`),u){let y=` 572Resources:`;for(const x of u){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);y+=` 573- ${x}`}b+=y}return`${w} 574${b}`}
574class _t extends Error{constructor({message:t,code:r,cause:n,name:s}){var i;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}}class vf extends _t{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function b9({error:e,options:t}){var r,n,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new _t({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new _t({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new _t({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new _t({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new _t({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new _t({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new _t({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new _t({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(wP(a)){if(i.rp.id!==a)return new _t({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new _t({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new _t({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new _t({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new _t({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function w9({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new _t({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new _t({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(wP(n)){if(r.rpId!==n)return new _t({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new _t({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new _t({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new _t({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class j9{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const k9=new j9;function S9(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=Yl(e,["challenge","user","excludeCredentials"]),i=ol(t).buffer,a=Object.assign(Object.assign({},r),{id:ol(r.id).buffer}),l=Object.assign(Object.assign({}
574,s),{challenge:i,user:a});if(n&&n.length>0){l.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const u=n[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:ol(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function A9(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Yl(e,["challenge","allowCredentials"]),s=ol(t).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let a=0;a<r.length;a++){const l=r[a];i.allowCredentials[a]=Object.assign(Object.assign({},l),{id:ol(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return i}function N9(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:jo(new Uint8Array(e.response.attestationObject)),clientDataJSON:jo(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function C9(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:jo(new Uint8Array(s.authenticatorData)),clientDataJSON:jo(new Uint8Array(s.clientDataJSON)),signature:jo(new Uint8Array(s.signature)),userHandle:s.userHandle?jo(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function wP(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function C2(){var e,t;return!!(Qt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function _9(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new vf("Browser returned unexpected credential type",t)}:{data:null,error:new vf("Empty credential response",t)}}catch(t){return{data:null,error:b9({error:t,options:e})}}}async function E9(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new vf("Browser returned unexpected credential type",t)}:{data:null,error:new vf("Empty credential response",t)}}catch(t){return{data:null,error:w9({error:t,options:e})}}}const P9={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},T9={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function bf(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const i in s){const a=s[i];if(a!==void 0)if(Array.isArray(a))n[i]=a;else if(r(a))n[i]=a;else if(t(a)){const l=n[i];t(l)?n[i]=bf(l,a):n[i]=bf(a)}else n[i]=a}return n}function R9(e,t){return bf(P9,e,t||{})}function O9(e,t){return bf(T9,e,t||{})}class I9{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},i){try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!a)return{data:null,error:l};const c=s??k9.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${n}`),u.displayName||(u.displayName=u.name)}
574switch(a.webauthn.type){case"create":{const u=R9(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:h}=await _9({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const u=O9(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:h}=await E9(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(a){return de(a)?{data:null,error:a}:{data:null,error:new go("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new Du("rpId is required for WebAuthn authentication")};try{if(!C2())return{data:null,error:new go("Browser does not support WebAuthn",null)};const{data:a,error:l}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!a)return{data:null,error:l};const{webauthn:c}=a;return this._verify({factorId:t,challengeId:a.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(a){return de(a)?{data:null,error:a}:{data:null,error:new go("Unexpected error in authenticate",a)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new Du("rpId is required for WebAuthn registration")};try{if(!C2())return{data:null,error:new go("Browser does not support WebAuthn",null)};const{data:a,error:l}=await this._enroll({friendlyName:t});if(!a)return await this.client.mfa.listFactors().then(d=>{var h;return(h=d.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return c?this._verify({factorId:a.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(a){return de(a)?{data:null,error:a}:{data:null,error:new go("Unexpected error in register",a)}}}}g9();const D9={url:P7,storageKey:T7,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:R7,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function _2(e,t,r){return await r()}const ga={};class Lu{get jwks(){var t,r;return(r=(t=ga[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){ga[this.storageKey]=Object.assign(Object.assign({},ga[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=ga[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ga[this.storageKey]=Object.assign(Object.assign({},ga[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},D9),t);if(this.storageKey=i.storageKey,this.instanceID=(r=Lu.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Lu.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Qt()){const a=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new f9({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=yP(i.fetch),this.lock=i.lock||_2,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,i.lock?this.lock=i.lock:this.persistSession&&Qt()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=p9:this.lock=_2,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new I9(this)}
574,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:xP()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=N2(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=N2(this.memoryStorage)),Qt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a),await this._notifyAllSubscribers(a.data.event,a.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${mP}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Qt()&&(r=K7(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Qt()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),z7(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:a,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",a,"redirect type",l),await this._saveSession(a),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return de(r)?this._returnResult({error:r}):this._returnResult({error:new go("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await ge(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:jn}),{data:a,error:l}=i;if(l||!a)return this._returnResult({data:{user:null,session:null},error:l});const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(de(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,s;try{let i;if("email"in t){const{email:d,password:h,options:f}=t;let m=null,v=null;this.flowType==="pkce"&&([m,v]=await fa(this.storage,this.storageKey)),i=await ge(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:h,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:m,code_challenge_method:v},xform:jn})}else if("phone"in t){const{phone:d,password:h,options:f}=t;i=await ge(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:jn})}else throw new qd("You must provide either an email or phone number and a password");const{data:a,error:l}=i;if(l||!a)return await Gt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(await Gt(this.storage,`${this.storageKey}-code-verifier`),de(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:a,options:l}=t;r=await ge(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:S2})}else if("phone"in t){const{phone:i,password:a,options:l}=t;r=await ge(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:S2})}else throw new qd("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new ha;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(de(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,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:(s=t.options)===null||s===void 0?void 0:s.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;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,i,a,l,c,u,d,h,f;let m,v;if("message"in t)m=t.message,v=t.signature;else{const{chain:g,wallet:w,statement:b,options:y}=t;let x;if(Qt())if(typeof w=="object")x=w;else{const E=window;if("ethereum"in E&&typeof E.ethereum=="object"&&"request"in E.ethereum&&typeof E.ethereum.request=="function")x=E.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=w}const j=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href),k=await x.request({method:"eth_requestAccounts"}).then(E=>E).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=bP(k[0]);let N=(n=y==null?void 0:y.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!N){const E=await x.request({method:"eth_chainId"});N=x9(E)}const A={domain:j.host,address:S,statement:b,uri:j.href,version:"1",chainId:N,nonce:(s=y==null?void 0:y.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(a=(i=y==null?void 0:y.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(l=y==null?void 0:y.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=y==null?void 0:y.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=y==null?void 0:y.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=y==null?void 0:y.signInWithEthereum)===null||d===void 0?void 0:d.resources};m=v9(A),v=await x.request({method:"personal_sign",params:[y9(m),S]})}try{const{data:g,error:w}=await ge(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:m,signature:v}
574,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:jn});if(w)throw w;if(!g||!g.session||!g.user){const b=new ha;return this._returnResult({data:{user:null,session:null},error:b})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:w})}catch(g){if(de(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var r,n,s,i,a,l,c,u,d,h,f,m;let v,g;if("message"in t)v=t.message,g=t.signature;else{const{chain:w,wallet:b,statement:y,options:x}=t;let j;if(Qt())if(typeof b=="object")j=b;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 b!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=b}const k=new URL((r=x==null?void 0:x.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()},x==null?void 0:x.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),y?{statement:y}:null));let N;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")N=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)N=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in N&&"signature"in N&&(typeof N.signedMessage=="string"||N.signedMessage instanceof Uint8Array)&&N.signature instanceof Uint8Array)v=typeof N.signedMessage=="string"?N.signedMessage:new TextDecoder().decode(N.signedMessage),g=N.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${k.host} wants you to sign in with your Solana account:`,j.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(n=x==null?void 0:x.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=x==null?void 0:x.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((a=x==null?void 0:x.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((l=x==null?void 0:x.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((c=x==null?void 0:x.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((u=x==null?void 0:x.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((h=(d=x==null?void 0:x.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...x.signInWithSolana.resources.map(N=>`- ${N}`)]:[]].join(` 575`);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:w,error:b}=await ge(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:jo(g)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(m=t.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:jn});if(b)throw b;if(!w||!w.session||!w.user){const y=new ha;return this._returnResult({data:{user:null,session:null},error:y})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:b})}catch(w){if(de(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const r=await ao(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new F7;const{data:i,error:a}=await ge(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:jn});if(await Gt(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!i||!i.session||!i.user){const l=new ha;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:a})}catch(i){if(await Gt(this.storage,`${this.storageKey}-code-verifier`),de(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:i,nonce:a}=t,l=await ge(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:jn}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new ha;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(r){if(de(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,i,a;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await fa(this.storage,this.storageKey));const{error:h}=await ge(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await ge(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(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:(a=c==null?void 0:c.channel)!==null&&a!==void 0?a:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new qd("You must provide either an email or phone number.")}catch(l){if(await Gt(this.storage,`${this.storageKey}-code-verifier`),de(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var r,n;try{let s,i;"options"in t&&(s=(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:a,error:l}=await ge(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:jn});if(l)throw l;if(!a)throw new Error("An error occurred on token verification.");const c=a.session,u=a.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(s){if(de(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,i,a;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await fa(this.storage,this.storageKey));const u=await ge(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:u9});return!((i=u.data)===null||i===void 0)&&i.url&&Qt()&&!(!((a=t.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(l){if(await Gt(this.storage,`${this.storageKey}-code-verifier`),de(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Ir;const{error:s}=await ge(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(de(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:i}=t,{error:a}=await ge(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}else if("phone"in t){const{phone:n,type:s,options:i}=t,{data:a,error:l}=await ge(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:l})}throw new qd("You must provide either an email or phone number and a type")}catch(r){if(de(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await ao(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
575id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<qp:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const a=await ao(this.userStorage,this.storageKey+"-user");a!=null&&a.user?t.user=a.user:t.user=Qp()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};t.user=o9(t.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(-1,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await ge(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:mi}):await this._useSession(async r=>{var n,s,i;const{data:a,error:l}=r;if(l)throw l;return!(!((n=a.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Ir}:await ge(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:mi})})}catch(r){if(de(r))return M7(r)&&(await this._removeSession(),await Gt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new Ir;const a=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await fa(this.storage,this.storageKey));const{data:u,error:d}=await ge(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:a.access_token,xform:mi});if(d)throw d;return a.user=u.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(n){if(await Gt(this.storage,`${this.storageKey}-code-verifier`),de(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Ir;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:a}=Gp(t.access_token);if(a.exp&&(n=a.exp,s=n<=r),s){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};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 this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(de(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:a,error:l}=r;if(l)throw l;t=(n=a.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Ir;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(de(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!Qt())throw new Kd("No browser detected.");
575if(t.error||t.error_description||t.error_code)throw new Kd(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 x2("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Kd("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 x2("No code detected.");const{data:y,error:x}=await this._exchangeCodeForSession(t.code);if(x)throw x;const j=new URL(window.location.href);return j.searchParams.delete("code"),window.history.replaceState(window.history.state,"",j.toString()),{data:{session:y.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:i,refresh_token:a,expires_in:l,expires_at:c,token_type:u}=t;if(!i||!l||!a||!u)throw new Kd("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(l);let f=d+h;c&&(f=parseInt(c));const m=f-d;m*1e3<=Aa&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${h}s`);const v=f-h;d-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,f,d):d-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,d);const{data:g,error:w}=await this._getUser(i);if(w)throw w;const b={provider_token:n,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:f,refresh_token:a,token_type:u,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:b,redirectType:t.type},error:null})}catch(n){if(de(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await ao(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({error:i});const a=(n=s.session)===null||n===void 0?void 0:n.access_token;if(a){const{error:l}=await this.admin.signOut(a,t);if(l&&!(L7(l)&&(l.status===404||l.status===401||l.status===403)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await Gt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=q7(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:a}=r;if(a)throw a;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((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await fa(this.storage,this.storageKey,!0));try{return await ge(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await Gt(this.storage,`${this.storageKey}-code-verifier`),de(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(de(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var a,l,c,u,d;const{data:h,error:f}=i;if(f)throw f;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await ge(this.fetch,"GET",m,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return Qt()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(de(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:a,provider:l,token:c,access_token:u,nonce:d}=t,h=await ge(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:l,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:jn}),{data:f,error:m}=h;return m?this._returnResult({data:{user:null,session:null},error:m}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new ha}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:m}))}catch(s){if(await Gt(this.storage,`${this.storageKey}-code-verifier`),de(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:a}=r;if(a)throw a;
575return await ge(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(de(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await Z7(async s=>(s>0&&await Q7(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await ge(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:jn})),(s,i)=>{const a=200*Math.pow(2,s);return i&&Kp(i)&&Date.now()+a-n<Aa})}catch(n){if(this._debug(r,"error",n),de(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),Qt()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await ao(this.storage,this.storageKey);if(s&&this.userStorage){let a=await ao(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:s.user},await Na(this.userStorage,this.storageKey+"-user",a)),s.user=(t=a==null?void 0:a.user)!==null&&t!==void 0?t:Qp()}else if(s&&!s.user&&!s.user){const a=await ao(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(s.user=a.user,await Gt(this.storage,this.storageKey+"-user"),await Na(this.storage,this.storageKey,s)):s.user=Qp()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<qp;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${qp}
575s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:a}=await this._callRefreshToken(s.refresh_token);a&&(console.error(a),Kp(a)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:l}=await this._getUser(s.access_token);!l&&(a!=null&&a.user)?(s.user=a.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(n,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Ir;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new bm;const{data:i,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!i.session)throw new Ir;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const l={data:i.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(i){if(this._debug(s,"error",i),de(i)){const a={data:null,error:i};return Kp(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(a),a}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],a=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,r)}catch(c){i.push(c)}});if(await Promise.all(a),i.length>0){for(let l=0;l<i.length;l+=1)console.error(i[l]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Gt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Na(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=j2(s);await Na(this.storage,this.storageKey,i)}else{const s=j2(r);await Na(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Gt(this.storage,this.storageKey),await Gt(this.storage,this.storageKey+"-code-verifier"),await Gt(this.storage,this.storageKey+"-user"),this.userStorage&&await Gt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Qt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Aa);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/Aa);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Aa}ms, refresh threshold is ${ky} ticks`),s<=ky&&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 vP)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Qt()||!(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()=>
575{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,a]=await fa(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(l.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await ge(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(de(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await ge(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 u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(de(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?N9(t.webauthn.credential_response):C9(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await ge(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(r){if(de(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=await ge(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(a.error)return a;const{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:S9(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:A9(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(de(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var t,r;const{data:{session:n},error:s}
575=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=Gp(n.access_token);let a=null;i.aal&&(a=i.aal);let l=a;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const u=i.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:u},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await ge(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Ir})})}catch(r){if(de(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Ir});const a=await ge(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return a.data&&a.data.redirect_url&&Qt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(de(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Ir});const a=await ge(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return a.data&&a.data.redirect_url&&Qt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(de(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await ge(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Ir})})}catch(t){if(de(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await ge(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Ir})})}catch(r){if(de(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(l=>l.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(l=>l.kid===t),n&&this.jwks_cached_at+I7>s)return n;const{data:i,error:a}=await ge(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(l=>l.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:m,error:v}
575=await this.getSession();if(v||!m.session)return this._returnResult({data:null,error:v});n=m.session.access_token}const{header:s,payload:i,signature:a,raw:{header:l,payload:c}}=Gp(n);r!=null&&r.allowExpired||n9(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:m}=await this.getUser(n);if(m)throw m;return{data:{claims:i,header:s,signature:a},error:null}}const d=s9(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,a,H7(`${l}.${c}`)))throw new Ny("Invalid JWT signature");return{data:{claims:i,header:s,signature:a},error:null}}catch(n){if(de(n))return this._returnResult({data:null,error:n});throw n}}}Lu.nextInstanceID={};const L9=Lu,M9="2.89.0";let Pc="";typeof Deno<"u"?Pc="deno":typeof document<"u"?Pc="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Pc="react-native":Pc="node";const z9={"X-Client-Info":`supabase-js-${Pc}/${M9}`},F9={headers:z9},$9={schema:"public"},V9={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},U9={};function Mu(e){"@babel/helpers - typeof";return Mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mu(e)}function B9(e,t){if(Mu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Mu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function H9(e){var t=B9(e,"string");return Mu(t)=="symbol"?t:t+""}function W9(e,t,r){return(t=H9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function vt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E2(Object(r),!0).forEach(function(n){W9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const q9=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),K9=()=>Headers,G9=(e,t,r)=>{const n=q9(r),s=K9();return async(i,a)=>{var l;const c=(l=await t())!==null&&l!==void 0?l:e;let u=new s(a==null?void 0:a.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),n(i,vt(vt({},a),{},{headers:u}))}};function Q9(e){return e.endsWith("/")?e:e+"/"}function Z9(e,t){var r,n;const{db:s,auth:i,realtime:a,global:l}=e,{db:c,auth:u,realtime:d,global:h}=t,f={db:vt(vt({},c),s),auth:vt(vt({},u),i),realtime:vt(vt({},d),a),storage:{},global:vt(vt(vt({},h),l),{},{headers:vt(vt({},(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{}),(n=l==null?void 0:l.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function X9(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(Q9(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Y9=class extends L9{constructor(e){super(e)}},J9=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=X9(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const a=`sb-${i.hostname.split(".")[0]}-auth-token`,l={db:$9,realtime:U9,auth:vt(vt({},V9),{},{storageKey:a}),global:F9},c=Z9(r??{},l);if(this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=G9(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(vt({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&this.accessToken().then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new RB(new URL("rest/v1",i).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new E7(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new CB(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
575channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:a,lock:l,debug:c,throwOnError:u},d,h){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Y9({url:this.authUrl.href,headers:vt(vt({},f),d),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:a,lock:l,debug:c,throwOnError:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(m=>m.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new QB(this.realtimeUrl.href,vt(vt({},e),{},{params:vt(vt({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const eH=(e,t,r)=>new J9(e,t,r);function tH(){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}tH()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const rH="https://rceocbujeejkmgsbftkt.supabase.co",nH="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJjZW9jYnVqZWVqa21nc2JmdGt0Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjcxOTk0NzEsImV4cCI6MjA4Mjc3NTQ3MX0.jqgauAzNU785Is4w96k7zrIO0rxefjI-qbvxAX6sOJ0",Y=eH(rH,nH,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}});function Zs(){const[e,t]=p.useState(null),[r,n]=p.useState(null),[s,i]=p.useState(!0);return p.useEffect(()=>{const{data:{subscription:u}}=Y.auth.onAuthStateChange((d,h)=>{n(h),t((h==null?void 0:h.user)??null),i(!1)});return Y.auth.getSession().then(({data:{session:d}})=>{n(d),t((d==null?void 0:d.user)??null),i(!1)}),()=>u.unsubscribe()},[]),{user:e,session:r,loading:s,signUp:async(u,d,h,f)=>{const m=`${window.location.origin}/`,{error:v}=await Y.auth.signUp({email:u,password:d,options:{emailRedirectTo:m,data:{full_name:h||"",newsletter_consent:f||!1,newsletter_consent_date:f?new Date().toISOString():null}}});return{error:v}},signIn:async(u,d)=>{const{error:h}=await Y.auth.signInWithPassword({email:u,password:d});return{error:h}},signOut:async()=>{const{error:u}=await Y.auth.signOut();return{error:u}}}}const nb="overclock_guest_cart";function vc(){try{const e=localStorage.getItem(nb);return e?JSON.parse(e):[]}catch{return[]}}function Xp(e){localStorage.setItem(nb,JSON.stringify(e))}function P2(){localStorage.removeItem(nb)}function Xs(){const{user:e}=Zs(),t=Ot(),{data:r=[],isLoading:n}=Vt({queryKey:["cart",e==null?void 0:e.id],queryFn:async()=>{if(!e)return[];const{data:w,error:b}=await Y.from("cart_items").select(` 576 id, 577 product_id, 578 quantity, 579 configuration, 580 created_at, 581 products ( 582 id, 583 name, 584 price, 585 sale_price, 586 image 587 ) 588 `).eq("user_id",e.id).order("created_at",{ascending:!1});if(b)throw b;return w.map(y=>{const x=y.products;return{...y,product:x?{id:x.id,name:x.name,image:x.image,price:x.sale_price??x.price}:void 0}})},enabled:!!e}),{data:s=[],isLoading:i}=Vt({queryKey:["guest-cart"],queryFn:()=>vc(),enabled:!e,staleTime:0}),a=e?r:s,l=e?n:i,c=p.useCallback(()=>{e?t.invalidateQueries({queryKey:["cart",e.id]}
588):t.invalidateQueries({queryKey:["guest-cart"]})},[e,t]),u=Ft({mutationFn:async({productId:w,quantity:b=1,configuration:y={},product:x})=>{if(e){const{data:S}=await Y.from("cart_items").select("id, quantity").eq("user_id",e.id).eq("product_id",w).maybeSingle();if(S){const{data:E,error:_}=await Y.from("cart_items").update({quantity:S.quantity+b}).eq("id",S.id).select().single();if(_)throw _;return E}const{data:N,error:A}=await Y.from("cart_items").insert([{user_id:e.id,product_id:w,quantity:b,configuration:y}]).select().single();if(A)throw A;return N}const j=vc(),k=j.findIndex(S=>S.product_id===w);return k>=0?j[k].quantity+=b:j.push({id:`guest-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,product_id:w,quantity:b,configuration:y,created_at:new Date().toISOString(),product:x}),Xp(j),j},onSuccess:()=>{c(),Le({title:"Added to cart"})},onError:()=>{Le({title:"Failed to add to cart",variant:"destructive"})}}),d=Ft({mutationFn:async({itemId:w,quantity:b})=>{if(e){if(b<=0){const{error:k}=await Y.from("cart_items").delete().eq("id",w);if(k)throw k;return null}const{data:x,error:j}=await Y.from("cart_items").update({quantity:b}).eq("id",w).select().single();if(j)throw j;return x}let y=vc();if(b<=0)y=y.filter(x=>x.id!==w);else{const x=y.find(j=>j.id===w);x&&(x.quantity=b)}return Xp(y),y},onSuccess:c}),h=Ft({mutationFn:async w=>{if(e){const{error:y}=await Y.from("cart_items").delete().eq("id",w);if(y)throw y;return}const b=vc().filter(y=>y.id!==w);Xp(b)},onSuccess:()=>{c(),Le({title:"Removed from cart"})}}),f=Ft({mutationFn:async()=>{if(e){const{error:w}=await Y.from("cart_items").delete().eq("user_id",e.id);if(w)throw w;return}P2()},onSuccess:c}),m=p.useCallback(async()=>{if(!e)return;const w=vc();if(w.length!==0){for(const b of w){const{data:y}=await Y.from("cart_items").select("id, quantity").eq("user_id",e.id).eq("product_id",b.product_id).maybeSingle();y?await Y.from("cart_items").update({quantity:y.quantity+b.quantity}).eq("id",y.id):await Y.from("cart_items").insert([{user_id:e.id,product_id:b.product_id,quantity:b.quantity,configuration:b.configuration}])}P2(),t.invalidateQueries({queryKey:["cart",e.id]}),t.invalidateQueries({queryKey:["guest-cart"]})}},[e,t]),v=p.useMemo(()=>a.reduce((w,b)=>{var x,j;const y=((x=b.configuration)==null?void 0:x.total_price)||((j=b.product)==null?void 0:j.price)||0;return w+y*b.quantity},0),[a]),g=p.useMemo(()=>a.reduce((w,b)=>w+b.quantity,0),[a]);return{cartItems:a,isLoading:l,addToCart:u,updateQuantity:d,removeFromCart:h,clearCart:f,cartTotal:v,cartCount:g,mergeGuestCart:m}}var Yp="focusScope.autoFocusOnMount",Jp="focusScope.autoFocusOnUnmount",T2={bubbles:!1,cancelable:!0},sH="FocusScope",sb=p.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=e,[l,c]=p.useState(null),u=Ht(s),d=Ht(i),h=p.useRef(null),f=_e(t,g=>c(g)),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let g=function(x){if(m.paused||!l)return;const j=x.target;l.contains(j)?h.current=j:oi(h.current,{select:!0})},w=function(x){if(m.paused||!l)return;const j=x.relatedTarget;j!==null&&(l.contains(j)||oi(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const k of x)k.removedNodes.length>0&&oi(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const y=new MutationObserver(b);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),y.disconnect()}}},[n,l,m.paused]),p.useEffect(()=>{if(l){O2.add(m);const g=document.activeElement;if(!l.contains(g)){const b=new CustomEvent(Yp,T2);l.addEventListener(Yp,u),l.dispatchEvent(b),b.defaultPrevented||(iH(uH(jP(l)),{select:!0}),document.activeElement===g&&oi(l))}return()=>{l.removeEventListener(Yp,u),setTimeout(()=>{const b=new CustomEvent(Jp,T2);l.addEventListener(Jp,d),l.dispatchEvent(b),b.defaultPrevented||oi(g??document.body,{select:!0}),l.removeEventListener(Jp,d),O2.remove(m)},0)}}},[l,u,d,m]);const v=p.useCallback(g=>{if(!r&&!n||m.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(w&&b){const y=g.currentTarget,[x,j]=oH(y);x&&j?!g.shiftKey&&b===j?(g.preventDefault(),r&&oi(x,{select:!0})):g.shiftKey&&b===x&&(g.preventDefault(),r&&oi(j,{select:!0})):b===y&&g.preventDefault()}},[r,n,m.paused]);return o.jsx(ye.div,{tabIndex:-1,...a,ref:f,onKeyDown:v})});sb.displayName=sH;function iH(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(oi(n,{select:t}),document.activeElement!==r)return}function oH(e){const t=jP(e),r=R2(t,e),n=R2(t.reverse(),e);return[r,n]}function jP(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function R2(e,t){for(const r of e)if(!aH(r,{upTo:t}))return r}function aH(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 lH(e){return e instanceof HTMLInputElement&&"select"in e}function oi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&lH(e)&&t&&e.select()}}var O2=cH();function cH(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=I2(e,t),e.unshift(t)},remove(t){var r;e=I2(e,t),(r=e[0])==null||r.resume()}}}function I2(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function uH(e){return e.filter(t=>t.tagName!=="A")}var eg=0;function kP(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??D2()),document.body.insertAdjacentElement("beforeend",e[1]??D2()),eg++,()=>{eg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),eg--}},[])}function D2(){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: 4,248 bytes, line 588
588style.position="fixed",e.style.pointerEvents="none",e}var Ah="right-scroll-bar-position",Nh="width-before-scroll-bar",dH="with-scroll-bars-hidden",hH="--removed-body-scroll-bar-size";function tg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fH(e,t){var r=p.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var mH=typeof window<"u"?p.useLayoutEffect:p.useEffect,L2=new WeakMap;function pH(e,t){var r=fH(null,function(n){return e.forEach(function(s){return tg(s,n)})});return mH(function(){var n=L2.get(r);if(n){var s=new Set(n),i=new Set(e),a=r.current;s.forEach(function(l){i.has(l)||tg(l,null)}),i.forEach(function(l){s.has(l)||tg(l,a)})}L2.set(r,e)},[e]),r}function gH(e){return e}function xH(e,t){t===void 0&&(t=gH);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(l){return i(l)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var l=r;r=[],l.forEach(i),a=r}var c=function(){var d=a;a=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),r}}}};return s}function yH(e){e===void 0&&(e={});var t=xH(null);return t.options=es({async:!0,ssr:!1},e),t}var SP=function(e){var t=e.sideCar,r=Yl(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 p.createElement(n,es({},r))};SP.isSideCarExport=!0;function vH(e,t){return e.useMedium(t),SP}var AP=yH(),rg=function(){},wm=p.forwardRef(function(e,t){var r=p.useRef(null),n=p.useState({onScrollCapture:rg,onWheelCapture:rg,onTouchMoveCapture:rg}),s=n[0],i=n[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,m=e.noRelative,v=e.noIsolation,g=e.inert,w=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,x=e.gapMode,j=Yl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,S=pH([r,t]),N=es(es({},j),s);return p.createElement(p.Fragment,null,d&&p.createElement(k,{sideCar:AP,removeScrollBar:u,shards:h,noRelative:m,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!w,lockRef:r,gapMode:x}),a?p.cloneElement(p.Children.only(l),es(es({},N),{ref:S})):p.createElement(y,es({},N,{className:c,ref:S}),l))});wm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};wm.classNames={fullWidth:Nh,zeroRight:Ah};var bH=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wH(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bH();return t&&e.setAttribute("nonce",t),e}function jH(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kH(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var SH=function(){var e=0,t=null;return{add:function(r){e==0&&(t=wH())&&(jH(t,r),kH(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},AH=function(){var e=SH();return function(t,r){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},NP=function(){var e=AH(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},NH={left:0,top:0,right:0,gap:0},ng=function(e){return parseInt(e||"",10)||0},CH=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[ng(r),ng(n),ng(s)]},_H=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return NH;var t=CH(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])}}
vendor: 4,393 bytes, lines 588-628
588,EH=NP(),al="data-scroll-locked",PH=function(e,t,r,n){var s=e.left,i=e.top,a=e.right,l=e.gap;return r===void 0&&(r="margin"),` 589 .`.concat(dH,` { 590 overflow: hidden `).concat(n,`; 591 padding-right: `).concat(l,"px ").concat(n,`; 592 } 593 body[`).concat(al,`] { 594 overflow: hidden `).concat(n,`; 595 overscroll-behavior: contain; 596 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 597 padding-left: `.concat(s,`px; 598 padding-top: `).concat(i,`px; 599 padding-right: `).concat(a,`px; 600 margin-left:0; 601 margin-top:0; 602 margin-right: `).concat(l,"px ").concat(n,`; 603 `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),` 604 } 605 606 .`).concat(Ah,` { 607 right: `).concat(l,"px ").concat(n,`; 608 } 609 610 .`).concat(Nh,` { 611 margin-right: `).concat(l,"px ").concat(n,`; 612 } 613 614 .`).concat(Ah," .").concat(Ah,` { 615 right: 0 `).concat(n,`; 616 } 617 618 .`).concat(Nh," .").concat(Nh,` { 619 margin-right: 0 `).concat(n,`; 620 } 621 622 body[`).concat(al,`] { 623 `).concat(hH,": ").concat(l,`px; 624 } 625`)},M2=function(){var e=parseInt(document.body.getAttribute(al)||"0",10);return isFinite(e)?e:0},TH=function(){p.useEffect(function(){return document.body.setAttribute(al,(M2()+1).toString()),function(){var e=M2()-1;e<=0?document.body.removeAttribute(al):document.body.setAttribute(al,e.toString())}},[])},RH=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;TH();var i=p.useMemo(function(){return _H(s)},[s]);return p.createElement(EH,{styles:PH(i,!t,s,r?"":"!important")})},Cy=!1;if(typeof window<"u")try{var Gd=Object.defineProperty({},"passive",{get:function(){return Cy=!0,!0}});window.addEventListener("test",Gd,Gd),window.removeEventListener("test",Gd,Gd)}catch{Cy=!1}var xa=Cy?{passive:!1}:!1,OH=function(e){return e.tagName==="TEXTAREA"},CP=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!OH(e)&&r[t]==="visible")},IH=function(e){return CP(e,"overflowY")},DH=function(e){return CP(e,"overflowX")},z2=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=_P(e,n);if(s){var i=EP(e,n),a=i[1],l=i[2];if(a>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},LH=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},MH=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},_P=function(e,t){return e==="v"?IH(t):DH(t)},EP=function(e,t){return e==="v"?LH(t):MH(t)},zH=function(e,t){return e==="h"&&t==="rtl"?-1:1},FH=function(e,t,r,n,s){var i=zH(e,window.getComputedStyle(t).direction),a=i*n,l=r.target,c=t.contains(l),u=!1,d=a>0,h=0,f=0;do{if(!l)break;var m=EP(e,l),v=m[0],g=m[1],w=m[2],b=g-w-i*v;(v||b)&&_P(e,l)&&(h+=b,f+=v);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},Qd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},F2=function(e){return[e.deltaX,e.deltaY]},$2=function(e){return e&&"current"in e?e.current:e},$H=function(e,t){return e[0]===t[0]&&e[1]===t[1]},VH=function(e){return` 626 .block-interactivity-`.concat(e,` {pointer-events: none;} 627 .allow-interactivity-`).concat(e,` {pointer-events: all;} 628`)},UH=0,ya=[];function BH(e){var t=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),s=p.useState(UH++)[0],i=p.useState(NP)[0],a=p.useRef(e);p.useEffect(function(){a.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=SB([e.lockRef.current],(e.shards||[]).map($2),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=p.useCallback(function(g,w){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!a.current.allowPinchZoom;var b=Qd(g),y=r.current,x="deltaX"in g?g.deltaX:y[0]-b[0],j="deltaY"in g?g.deltaY:y[1]-b[1],k,S=g.target,N=Math.abs(x)>Math.abs(j)?"h":"v";if("touches"in g&&N==="h"&&S.type==="range")return!1;var A=z2(N,S);if(!A)return!0;
vendor: 4,112 bytes, line 628
628if(A?k=N:(k=N==="v"?"h":"v",A=z2(N,S)),!A)return!1;if(!n.current&&"changedTouches"in g&&(x||j)&&(n.current=k),!k)return!0;var E=n.current||k;return FH(E,w,g,E==="h"?x:j,!0)},[]),c=p.useCallback(function(g){var w=g;if(!(!ya.length||ya[ya.length-1]!==i)){var b="deltaY"in w?F2(w):Qd(w),y=t.current.filter(function(k){return k.name===w.type&&(k.target===w.target||w.target===k.shadowParent)&&$H(k.delta,b)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var x=(a.current.shards||[]).map($2).filter(Boolean).filter(function(k){return k.contains(w.target)}),j=x.length>0?l(w,x[0]):!a.current.noIsolation;j&&w.cancelable&&w.preventDefault()}}},[]),u=p.useCallback(function(g,w,b,y){var x={name:g,delta:w,target:b,should:y,shadowParent:HH(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(j){return j!==x})},1)},[]),d=p.useCallback(function(g){r.current=Qd(g),n.current=void 0},[]),h=p.useCallback(function(g){u(g.type,F2(g),g.target,l(g,e.lockRef.current))},[]),f=p.useCallback(function(g){u(g.type,Qd(g),g.target,l(g,e.lockRef.current))},[]);p.useEffect(function(){return ya.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,xa),document.addEventListener("touchmove",c,xa),document.addEventListener("touchstart",d,xa),function(){ya=ya.filter(function(g){return g!==i}),document.removeEventListener("wheel",c,xa),document.removeEventListener("touchmove",c,xa),document.removeEventListener("touchstart",d,xa)}},[]);var m=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(i,{styles:VH(s)}):null,m?p.createElement(RH,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function HH(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const WH=vH(AP,BH);var ib=p.forwardRef(function(e,t){return p.createElement(wm,es({},e,{ref:t,sideCar:WH}))});ib.classNames=wm.classNames;var qH=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},va=new WeakMap,Zd=new WeakMap,Xd={},sg=0,PP=function(e){return e&&(e.host||PP(e.parentNode))},KH=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})},GH=function(e,t,r,n){var s=KH(t,Array.isArray(e)?e:[e]);Xd[r]||(Xd[r]=new WeakMap);var i=Xd[r],a=[],l=new Set,c=new Set(s),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(l.has(f))d(f);else try{var m=f.getAttribute(n),v=m!==null&&m!=="false",g=(va.get(f)||0)+1,w=(i.get(f)||0)+1;va.set(f,g),i.set(f,w),a.push(f),g===1&&v&&Zd.set(f,!0),w===1&&f.setAttribute(r,"true"),v||f.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return d(t),l.clear(),sg++,function(){a.forEach(function(h){var f=va.get(h)-1,m=i.get(h)-1;va.set(h,f),i.set(h,m),f||(Zd.has(h)||h.removeAttribute(n),Zd.delete(h)),m||h.removeAttribute(r)}),sg--,sg||(va=new WeakMap,va=new WeakMap,Zd=new WeakMap,Xd={})}},TP=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=qH(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),GH(n,s,r,"aria-hidden")):function(){return null}},jm="Dialog",[RP,TX]=hs(jm),[QH,Bn]=RP(jm),OP=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=p.useRef(null),c=p.useRef(null),[u,d]=Ho({prop:n,defaultProp:s??!1,onChange:i,caller:jm});return o.jsx(QH,{scope:t,triggerRef:l,contentRef:c,contentId:nl(),titleId:nl(),descriptionId:nl(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(h=>!h),[d]),modal:a,children:r})};OP.displayName=jm;var IP="DialogTrigger",DP=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Bn(IP,r),i=_e(t,s.triggerRef);return o.jsx(ye.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":lb(s.open
vendor: 4,673 bytes, lines 628-632
628),...n,ref:i,onClick:he(e.onClick,s.onOpenToggle)})});DP.displayName=IP;var ob="DialogPortal",[ZH,LP]=RP(ob,{forceMount:void 0}),MP=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,i=Bn(ob,t);return o.jsx(ZH,{scope:t,forceMount:r,children:p.Children.map(n,a=>o.jsx(Vn,{present:r||i.open,children:o.jsx(Yf,{asChild:!0,container:s,children:a})}))})};MP.displayName=ob;var wf="DialogOverlay",zP=p.forwardRef((e,t)=>{const r=LP(wf,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Bn(wf,e.__scopeDialog);return i.modal?o.jsx(Vn,{present:n||i.open,children:o.jsx(YH,{...s,ref:t})}):null});zP.displayName=wf;var XH=_l("DialogOverlay.RemoveScroll"),YH=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Bn(wf,r);return o.jsx(ib,{as:XH,allowPinchZoom:!0,shards:[s.contentRef],children:o.jsx(ye.div,{"data-state":lb(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Xo="DialogContent",FP=p.forwardRef((e,t)=>{const r=LP(Xo,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Bn(Xo,e.__scopeDialog);return o.jsx(Vn,{present:n||i.open,children:i.modal?o.jsx(JH,{...s,ref:t}):o.jsx(eW,{...s,ref:t})})});FP.displayName=Xo;var JH=p.forwardRef((e,t)=>{const r=Bn(Xo,e.__scopeDialog),n=p.useRef(null),s=_e(t,r.contentRef,n);return p.useEffect(()=>{const i=n.current;if(i)return TP(i)},[]),o.jsx($P,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:he(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&i.preventDefault()}),onFocusOutside:he(e.onFocusOutside,i=>i.preventDefault())})}),eW=p.forwardRef((e,t)=>{const r=Bn(Xo,e.__scopeDialog),n=p.useRef(!1),s=p.useRef(!1);return o.jsx($P,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),$P=p.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=e,l=Bn(Xo,r),c=p.useRef(null),u=_e(t,c);return kP(),o.jsxs(o.Fragment,{children:[o.jsx(sb,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:o.jsx(Ju,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":lb(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),o.jsxs(o.Fragment,{children:[o.jsx(tW,{titleId:l.titleId}),o.jsx(nW,{contentRef:c,descriptionId:l.descriptionId})]})]})}),ab="DialogTitle",VP=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Bn(ab,r);return o.jsx(ye.h2,{id:s.titleId,...n,ref:t})});VP.displayName=ab;var UP="DialogDescription",BP=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Bn(UP,r);return o.jsx(ye.p,{id:s.descriptionId,...n,ref:t})});BP.displayName=UP;var HP="DialogClose",WP=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Bn(HP,r);return o.jsx(ye.button,{type:"button",...n,ref:t,onClick:he(e.onClick,()=>s.onOpenChange(!1))})});WP.displayName=HP;function lb(e){return e?"open":"closed"}var qP="DialogTitleWarning",[RX,KP]=o5(qP,{contentName:Xo,titleName:ab,docsSlug:"dialog"}),tW=({titleId:e})=>{const t=KP(qP),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 629 630If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 631 632For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},rW="DialogDescriptionWarning",nW=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${KP(rW).contentName}}.`;return p.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},GP=OP,QP=DP,ZP=MP,km=zP,Sm=FP,Am=VP,Nm=BP,XP=WP;const sW=GP,iW=QP,oW=ZP,YP=p.forwardRef(({className:e,...t},r)=>o.jsx(km,{className:Ie("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}));
632YP.displayName=km.displayName;const aW=tm("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"}}),JP=p.forwardRef(({side:e="right",className:t,children:r,...n},s)=>o.jsxs(oW,{children:[o.jsx(YP,{}),o.jsxs(Sm,{ref:s,className:Ie(aW({side:e}),t),...n,children:[r,o.jsxs(XP,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[o.jsx(kt,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));JP.displayName=Sm.displayName;const eT=({className:e,...t})=>o.jsx("div",{className:Ie("flex flex-col space-y-2 text-center sm:text-left",e),...t});eT.displayName="SheetHeader";const tT=p.forwardRef(({className:e,...t},r)=>o.jsx(Am,{ref:r,className:Ie("text-lg font-semibold text-foreground",e),...t}));tT.displayName=Am.displayName;const lW=p.forwardRef(({className:e,...t},r)=>o.jsx(Nm,{ref:r,className:Ie("text-sm text-muted-foreground",e),...t}));lW.displayName=Nm.displayName;const cW=tm("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"},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"}}),ue=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const a=n?l5:"button";return o.jsx(a,{className:Ie(cW({variant:t,size:r,className:e})),ref:i,...s})});ue.displayName="Button";var uW=p.createContext(void 0);function cb(e){const t=p.useContext(uW);return e||t||"ltr"}function zu(e,[t,r]){return Math.min(r,Math.max(t,e))}function dW(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var ub="ScrollArea",[rT,OX]=hs(ub),[hW,mn]=rT(ub),nT=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:i=600,...a}=e,[l,c]=p.useState(null),[u,d]=p.useState(null),[h,f]=p.useState(null),[m,v]=p.useState(null),[g,w]=p.useState(null),[b,y]=p.useState(0),[x,j]=p.useState(0),[k,S]=p.useState(!1),[N,A]=p.useState(!1),E=_e(t,F=>c(F)),_=cb(s);return o.jsx(hW,{scope:r,type:n,dir:_,scrollHideDelay:i,scrollArea:l,viewport:u,onViewportChange:d,content:h,onContentChange:f,scrollbarX:m,onScrollbarXChange:v,scrollbarXEnabled:k,onScrollbarXEnabledChange:S,scrollbarY:g,onScrollbarYChange:w,scrollbarYEnabled:N,onScrollbarYEnabledChange:A,onCornerWidthChange:y,onCornerHeightChange:j,children:o.jsx(ye.div,{dir:_,...a,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});nT.displayName=ub;var sT="ScrollAreaViewport",iT=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...i}=e,a=mn(sT,r),l=p.useRef(null),c=_e(t,l,a.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),o.jsx(ye.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:o.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});iT.displayName=sT;var gs="ScrollAreaScrollbar",db=p.forwardRef((e,t)=>
vendor: 4,377 bytes, line 632
632{const{forceMount:r,...n}=e,s=mn(gs,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=s,l=e.orientation==="horizontal";return p.useEffect(()=>(l?i(!0):a(!0),()=>{l?i(!1):a(!1)}),[l,i,a]),s.type==="hover"?o.jsx(fW,{...n,ref:t,forceMount:r}):s.type==="scroll"?o.jsx(mW,{...n,ref:t,forceMount:r}):s.type==="auto"?o.jsx(oT,{...n,ref:t,forceMount:r}):s.type==="always"?o.jsx(hb,{...n,ref:t}):null});db.displayName=gs;var fW=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=mn(gs,e.__scopeScrollArea),[i,a]=p.useState(!1);return p.useEffect(()=>{const l=s.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),a(!0)},d=()=>{c=window.setTimeout(()=>a(!1),s.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),o.jsx(Vn,{present:r||i,children:o.jsx(oT,{"data-state":i?"visible":"hidden",...n,ref:t})})}),mW=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=mn(gs,e.__scopeScrollArea),i=e.orientation==="horizontal",a=_m(()=>c("SCROLL_END"),100),[l,c]=dW("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 p.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,s.scrollHideDelay,c]),p.useEffect(()=>{const u=s.viewport,d=i?"scrollLeft":"scrollTop";if(u){let h=u[d];const f=()=>{const m=u[d];h!==m&&(c("SCROLL"),a()),h=m};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[s.viewport,i,c,a]),o.jsx(Vn,{present:r||l!=="hidden",children:o.jsx(hb,{"data-state":l==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:he(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:he(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),oT=p.forwardRef((e,t)=>{const r=mn(gs,e.__scopeScrollArea),{forceMount:n,...s}=e,[i,a]=p.useState(!1),l=e.orientation==="horizontal",c=_m(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;a(l?u:d)}},10);return Il(r.viewport,c),Il(r.content,c),o.jsx(Vn,{present:n||i,children:o.jsx(hb,{"data-state":i?"visible":"hidden",...s,ref:t})})}),hb=p.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,s=mn(gs,e.__scopeScrollArea),i=p.useRef(null),a=p.useRef(0),[l,c]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=dT(l.viewport,l.content),d={...n,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:f=>a.current=f};function h(f,m){return bW(f,a.current,l,m)}return r==="horizontal"?o.jsx(pW,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const f=s.viewport.scrollLeft,m=V2(f,l,s.dir);i.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollLeft=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollLeft=h(f,s.dir))}}):r==="vertical"?o.jsx(gW,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const f=s.viewport.scrollTop,m=V2(f,l);i.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollTop=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollTop=h(f))}}):null}),pW=p.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=mn(gs,e.__scopeScrollArea),[a,l]=p.useState(),c=p.useRef(null),u=_e(t,c,i.onScrollbarXChange);return p.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),o.jsx(lT,{"data-orientation":"horizontal",...s,ref:u,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":Cm(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(i.viewport){const f=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(f),fT(f,h)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:kf(a.paddingLeft),paddingEnd:kf(
vendor: 7,050 bytes, line 632
632a.paddingRight)}})}})}),gW=p.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=mn(gs,e.__scopeScrollArea),[a,l]=p.useState(),c=p.useRef(null),u=_e(t,c,i.onScrollbarYChange);return p.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),o.jsx(lT,{"data-orientation":"vertical",...s,ref:u,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":Cm(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(i.viewport){const f=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(f),fT(f,h)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:kf(a.paddingTop),paddingEnd:kf(a.paddingBottom)}})}})}),[xW,aT]=rT(gs),lT=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:h,...f}=e,m=mn(gs,r),[v,g]=p.useState(null),w=_e(t,E=>g(E)),b=p.useRef(null),y=p.useRef(""),x=m.viewport,j=n.content-n.viewport,k=Ht(d),S=Ht(c),N=_m(h,10);function A(E){if(b.current){const _=E.clientX-b.current.left,F=E.clientY-b.current.top;u({x:_,y:F})}}return p.useEffect(()=>{const E=_=>{const F=_.target;(v==null?void 0:v.contains(F))&&k(_,j)};return document.addEventListener("wheel",E,{passive:!1}),()=>document.removeEventListener("wheel",E,{passive:!1})},[x,v,j,k]),p.useEffect(S,[n,S]),Il(v,N),Il(m.content,N),o.jsx(xW,{scope:r,scrollbar:v,hasThumb:s,onThumbChange:Ht(i),onThumbPointerUp:Ht(a),onThumbPositionChange:S,onThumbPointerDown:Ht(l),children:o.jsx(ye.div,{...f,ref:w,style:{position:"absolute",...f.style},onPointerDown:he(e.onPointerDown,E=>{E.button===0&&(E.target.setPointerCapture(E.pointerId),b.current=v.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),A(E))}),onPointerMove:he(e.onPointerMove,A),onPointerUp:he(e.onPointerUp,E=>{const _=E.target;_.hasPointerCapture(E.pointerId)&&_.releasePointerCapture(E.pointerId),document.body.style.webkitUserSelect=y.current,m.viewport&&(m.viewport.style.scrollBehavior=""),b.current=null})})})}),jf="ScrollAreaThumb",cT=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=aT(jf,e.__scopeScrollArea);return o.jsx(Vn,{present:r||s.hasThumb,children:o.jsx(yW,{ref:t,...n})})}),yW=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,i=mn(jf,r),a=aT(jf,r),{onThumbPositionChange:l}=a,c=_e(t,h=>a.onThumbChange(h)),u=p.useRef(void 0),d=_m(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const h=i.viewport;if(h){const f=()=>{if(d(),!u.current){const m=wW(h,l);u.current=m,l()}};return l(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[i.viewport,d,l]),o.jsx(ye.div,{"data-state":a.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:he(e.onPointerDownCapture,h=>{const m=h.target.getBoundingClientRect(),v=h.clientX-m.left,g=h.clientY-m.top;a.onThumbPointerDown({x:v,y:g})}),onPointerUp:he(e.onPointerUp,a.onThumbPointerUp)})});cT.displayName=jf;var fb="ScrollAreaCorner",uT=p.forwardRef((e,t)=>{const r=mn(fb,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?o.jsx(vW,{...e,ref:t}):null});uT.displayName=fb;var vW=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=mn(fb,r),[i,a]=p.useState(0),[l,c]=p.useState(0),u=!!(i&&l);return Il(s.scrollbarX,()=>{var h;const d=((h=s.scrollbarX)==null?void 0:h.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),Il(s.scrollbarY,()=>{var h;const d=((h=s.scrollbarY)==null?void 0:h.offsetWidth)||0;s.onCornerWidthChange(d),a(d)}),u?o.jsx(ye.div,{...n,ref:t,style:{width:i,height:l,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function kf(e){return e?parseInt(e,10):0}function dT(e,t){const r=e/t;return isNaN(r)?0:r}function Cm(e){const t=dT(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function bW(e,t,r,n="ltr"){const s=Cm(r),i=s/2,a=t||i,l=s-a,c=r.scrollbar.paddingStart+a,u=r.scrollbar.size-r.scrollbar.paddingEnd-l,d=r.content-r.viewport,h=n==="ltr"?[0,d]:[d*-1,0];return hT([c,u],h)(e)}function V2(e,t,r="ltr"){const n=Cm(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,a=t.content-t.viewport,l=i-n,c=r==="ltr"?[0,a]:[a*-1,0],u=zu(e,c);return hT([0,a],[0,l])(u)}function hT(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 fT(e,t){return e>0&&e<t}var wW=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,l=r.top!==i.top;(a||l)&&t(),r=i,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function _m(e,t){const r=Ht(e),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Il(e,t){const r=Ht(t);qt(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var mT=nT,jW=iT,kW=uT;const pT=p.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(mT,{ref:n,className:Ie("relative overflow-hidden",e),...r,children:[o.jsx(jW,{className:"h-full w-full rounded-[inherit]",children:t}),o.jsx(gT,{}),o.jsx(kW,{})]}));pT.displayName=mT.displayName;const gT=p.forwardRef(({className:e,orientation:t="vertical",...r},n)=>o.jsx(db,{ref:n,orientation:t,className:Ie("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:o.jsx(cT,{className:"relative flex-1 rounded-full bg-border"})}));gT.displayName=db.displayName;function SW({children:e}){const t=Un(),{cartItems:r,isLoading:n,updateQuantity:s,removeFromCart:i,cartTotal:a,cartCount:l,clearCart:c}=Xs();return o.jsxs(sW,{children:[o.jsx(iW,{asChild:!0,children:e}),o.jsxs(JP,{className:"w-full sm:max-w-md flex flex-col",children:[o.jsx(eT,{className:"border-b border-border pb-4",children:o.jsxs(tT,{className:"flex items-center gap-2",children:[o.jsx(us,{size:20}),"Cart (",l,")"]})}),n?o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsx("div",{className:"animate-pulse",children:"Loading..."})}):r.length===0?o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 text-center p-4",children:[o.jsx(us,{className:"h-12 w-12 text-muted-foreground
632/50"}),o.jsx("p",{className:"text-muted-foreground",children:"Your cart is empty"}),o.jsx(Z,{to:"/products",children:o.jsx(ue,{children:"Browse Products"})})]}):o.jsxs(o.Fragment,{children:[o.jsx(pT,{className:"flex-1 -mx-6 px-6",children:o.jsx("div",{className:"space-y-4 py-4",children:r.map(u=>{var d,h,f,m,v;return o.jsxs("div",{className:"flex gap-3 p-3 bg-card border border-border rounded-lg",children:[o.jsx(Z,{to:`/product/${u.product_id}`,className:"w-16 h-16 bg-black rounded shrink-0 overflow-hidden",children:o.jsx("img",{src:((d=u.product)==null?void 0:d.image)||"/placeholder.svg",alt:(h=u.product)==null?void 0:h.name,className:"w-full h-full object-contain p-1"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx(Z,{to:`/product/${u.product_id}`,className:"text-sm font-medium hover:text-primary transition-colors line-clamp-2",children:(f=u.product)==null?void 0:f.name}),u.configuration&&Object.keys(u.configuration).length>0&&o.jsx("div",{className:"mt-1 space-y-0.5",children:Object.entries(u.configuration).filter(([g])=>!g.endsWith("_price")&&g!=="total_price").map(([g,w])=>o.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[o.jsxs("span",{className:"font-medium",children:[g,":"]})," ",String(w)]},g))}),o.jsxs("p",{className:"text-sm font-bold mt-1",children:["â¬",(((m=u.configuration)==null?void 0:m.total_price)||((v=u.product)==null?void 0:v.price)||0).toLocaleString("de-DE")]}),o.jsxs("div",{className:"flex items-center justify-between mt-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{type:"button",onClick:()=>s.mutate({itemId:u.id,quantity:u.quantity-1}),className:"w-6 h-6 flex items-center justify-center border border-border rounded hover:bg-muted transition-colors",children:o.jsx(Yv,{size:12})}),o.jsx("span",{className:"w-6 text-center text-sm font-medium",children:u.quantity}),o.jsx("button",{type:"button",onClick:()=>s.mutate({itemId:u.id,quantity:u.quantity+1}),className:"w-6 h-6 flex items-center justify-center border border-border rounded hover:bg-muted transition-colors",children:o.jsx(Yt,{size:12})})]}),o.jsx("button",{type:"button",onClick:()=>i.mutate(u.id),className:"text-muted-foreground hover:text-destructive transition-colors",children:o.jsx(or,{size:16})})]})]})]},u.id)})})}),o.jsxs("div",{className:"border-t border-border pt-4 space-y-4",children:[o.jsx("button",{type:"button",onClick:()=>c.mutate(),className:"text-xs text-muted-foreground hover:text-destructive transition-colors",children:"Clear Cart"}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:"Subtotal"}),o.jsxs("span",{children:["â¬",a.toLocaleString("de-DE")]})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:"Shipping"}),o.jsx("span",{className:"text-green-500",children:"Free"})]}),o.jsxs("div",{className:"border-t border-border pt-2 flex justify-between font-bold",children:[o.jsx("span",{children:"Total"}),o.jsxs("span",{children:["â¬",a.toLocaleString("de-DE")]})]})]}),o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx(ue,{className:"w-full",size:"lg",onClick:()=>t("/checkout"),children:"Checkout"}),o.jsx(ue,{variant:"outline",className:"w-full",onClick:()=>t("/cart"),children:"View Full Cart"})]})]})]})]})]})}const AW=GP,NW=QP,CW=ZP,xT=p.forwardRef(({className:e,...t},r)=>o.jsx(km,{ref:r,className:Ie("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}));xT.displayName=km.displayName;const yT=p.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(CW,{children:[o.jsx(xT,{}),o.jsxs(Sm,{ref:n,className:Ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
632nded-lg",e),...r,children:[t,o.jsxs(XP,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[o.jsx(kt,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));yT.displayName=Sm.displayName;const vT=({className:e,...t})=>o.jsx("div",{className:Ie("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});vT.displayName="DialogHeader";const bT=p.forwardRef(({className:e,...t},r)=>o.jsx(Am,{ref:r,className:Ie("text-lg font-semibold leading-none tracking-tight",e),...t}));bT.displayName=Am.displayName;const _W=p.forwardRef(({className:e,...t},r)=>o.jsx(Nm,{ref:r,className:Ie("text-sm text-muted-foreground",e),...t}));_W.displayName=Nm.displayName;const ig=[{code:"en",label:"English",native:"English",flag:"ð¬ð§",region:"United Kingdom"},{code:"it",label:"Italian",native:"Italiano",flag:"ð®ð¹",region:"Italia"}];function _y(){const{i18n:e,t}=Rt(),[r,n]=p.useState(!1),s=i=>{e.changeLanguage(i),n(!1)};return ig.find(i=>i.code===e.language)??ig[0],o.jsxs(AW,{open:r,onOpenChange:n,children:[o.jsx(NW,{asChild:!0,children:o.jsx("button",{className:"p-2 hover:text-primary transition-colors","aria-label":"Select language",children:o.jsx(jx,{size:18})})}),o.jsxs(yT,{className:"sm:max-w-[520px] overflow-hidden border-border/60 bg-background p-0",children:[o.jsxs("div",{className:"relative overflow-hidden border-b border-border/60 bg-gradient-to-br from-primary/15 via-background to-background px-6 pt-6 pb-5",children:[o.jsx("div",{className:"absolute -top-16 -right-16 h-40 w-40 rounded-full bg-primary/20 blur-3xl"}),o.jsx("div",{className:"absolute -bottom-12 -left-12 h-32 w-32 rounded-full bg-primary/10 blur-3xl"}),o.jsxs(vT,{className:"relative z-10 space-y-2",children:[o.jsxs("div",{className:"inline-flex w-fit items-center gap-1.5 rounded-full border border-primary/30 bg-primary/10 px-2.5 py-0.5 text-[10px] uppercase tracking-[0.2em] text-primary",children:[o.jsx(RD,{size:10}),t("language.region")||"Region & Language"]}),o.jsxs(bT,{className:"flex items-center gap-2.5 text-2xl font-bold tracking-tight text-foreground",children:[o.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-primary/15 ring-1 ring-primary/30",children:o.jsx(jx,{size:18,className:"text-primary"})}),t("language.selectLanguage")||"Choose your language"]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:t("language.subtitle")||"Pick how you want to browse the store."})]})]}),o.jsx("div",{className:"grid grid-cols-2 gap-3 p-5",children:ig.map(i=>{const a=e.language===i.code;return o.jsxs("button",{onClick:()=>s(i.code),className:`group relative flex flex-col items-center justify-center gap-2 overflow-hidden rounded-xl border p-5 text-center transition-all ${a?"border-primary bg-primary/5 shadow-[0_0_0_1px_hsl(var(--primary)/0.4),0_8px_30px_-12px_hsl(var(--primary)/0.5)]":"border-border/60 hover:border-primary/50 hover:bg-secondary/40"}`,children:[a&&o.jsx("span",{className:"absolute top-2 right-2 flex h-6 w-6 items-center justify-center rounded-full bg-primary text-primary-foreground",children:o.jsx(Vs,{size:12,strokeWidth:3})}),o.jsx("span",{className:`flex h-14 w-14 items-center justify-center rounded-full text-3xl shadow-inner transition-transform group-hover:scale-110 ${a?"bg-primary/15 ring-2 ring-primary/40":"bg-secondary"}`,children:i.flag}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("span",{className:"font-semibold text-foreground",children:i.native}),o.jsx("span",{className:"rounded-md bg-secondary px-1.5 py-0.5 text-[9px] font-mono uppercase tracking-wider text-muted-foreground",children:i.code})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:i.region})]},i.code)})}),o.jsx("div",{className:"border-t border-border/60 bg-secondary/30 px-5 py-3",children:o.jsx("p",{className:"text-[10px] text-muted-foreground",children:t("language.hint")||"Your preference is saved on this device."})})]})]})}const Fi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA3oAAAEiCAYAAACvEaDLAAAOaElEQVR4nO3d7ZEctxUFULRLCTAFKwSnYKagEKQQHINDIEOwQ7BDkEMgQzBDaNeyyNK4uD07Hw8PD+hz/qrUuws9AZh7d3YaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfLfNuBL7vn9qrf25wLfCH7601t5v2/afldZk3/eXOfsU/NjP27b9/MbXNeNx3lzvZs2jmfFcI2f8523bPhdYg3LMeCj7eL5R+3j5PWXU3fARf4p+YG/
6327vv/qf+KS3rXW/rXv+18W+7n+1uGZf7/2D814uKvr3ax5D2Y816gZ/+hF3uvMeDj7eL4R+/gse0r63fBR0zV60prylmn2tHlLkALnM+O5tHkFmfFQ9vF82rwDM7V5bbZGT1ozhZWaPW3e/KTA+cx4Lm1eMWY8nH08nzbv2DRtXput0ZPWhPrceS2nbva0eUuQAucz47m0eQWZ8VD28XzavAOztXltpkZPWhPuY2ut54uw2Zs9bd78pMD5zHgubV4xZjycfTyfNu/YVG1em6nRk9aE+poe7Pv+9cVYa63ni7Hpmj1t3hKkwPnMeC5tXkFmPJR9PJ8278CMbV6bpdGT1oT7mh5s2/b1RZhm7wfavPlJgfOZ8VzavGLMeDj7eD5t3rHp2rw2S6MnrQn1Q3qg2fuDNm8JUuB8ZjyXNq8gMx7KPp5Pm3dg1javzdDoSWvC/ZAeaPb+jzZvflLgfGY8lzavGDMezj6eT5t3bMo2r83Q6ElrQl1ND87e7GnzliAFzmfGc2nzCjLjoezj+bR5B2Zu81r1Rk9aE+5qeqDZ0+YtQAqcz4zn0uYVY8bD2cfzafOOTdvmteqNnrQm1M3pwRmbPW3eEqTA+cx4Lm1eQWY8lH08nzbvwOxtXqvc6Elrwt2cHpy02dPmzU8KnM+M59LmFWPGw9nH82nzjk3d5rXKjZ60JtRD6cFZmj1t3hKkwPnMeC5tXkFmPJR9PJ8278AKbV6r2uhJa8I9lB6cqNnT5s1PCpzPjOfS5hVjxsPZx/Np845N3+a1qo1ep/Tg38HP6+Fdh/bs6fRg5WZvsTZvhhnv4cu2bb+89Vz7SigznmvkjGvzDthTQo1s8+wrB7R5odLbvJJe0oM93odJfvYPHX72X4O+t3f7vv/e4fu79N/sZm/Emp95xkexr4Qz48VY81z2lHBv3lXMeC4zHi7kPn6vco2e9CBUaHqwWrO3WJsndb/CvhLKjBdkzXPZU0J5/2lBZjzUsDav1Hv0/C5wuNDfBV7wPXurvDfPe2iusK+EM+PFWPNc9pRw3n9ajBkPl/7evO9KNXrSg1Dd0oMVmj1Nx3nYV0KZ8YKseS57SihtXkFmPNTQ9+aVafSkB+G6pQeLNHuajhOwr4Qz48VY81z2lHDavGLMeLhhbV6r1OhJD0KlpAezNnuajvOwr4Qy4wVZ81z2lFDavILMeKjhf2mzRKMnPQiXkh5M3OxpOk7AvhLOjBdjzXPZU8Jp84ox4+GGtnmtSqMnPQiVnh7M1OxpOs7DvhLKjBdkzXPZU0Jp8woy46FKfG7eT6O/AelBuPxP3d+2L/u+v+/8Yu97s/fsi71Vmo4Xn/Z97/DY8n7btu3jtW+y05r/s7X2j+zPeixCm1eMNc/lrhJOm1eMczPc8DavVWj0pAehhqYH1Zu9xZqOsxqaAn+bv94zXo02ryBrnstdJZQ2ryDnZqgSbV4b/R49CVm4sX/Zp/579lZq885qaAqcNOPVaPOKsea53FXCafOKcW6GK9HmtdGNnoQsVJn0oGKzp81bQpkUOGnGK9DmFWTNc7mrhNLmFeTcDFXmPt5GNnoSsnB10oOazZ42b35lUuATJZTavGKseS53lXDavGKcm+HK3MfbyEZPQhaqVHrwXZVmT5u3hJIp8OIJpTavIGuey10llDavIOdmqHL38SGNnoQsXKn04LtCzZ42b34lU+DFE0ptXjHWPJe7SjhtXjHOzXDl7uNDGj0JWaiSbd6lkc2eNm8J5VPgBRNKbV5B1jyXu0oobV5Bzs1QJe/j6Y2ehCxcyTbv0uBmT5s3v/Ip8IIJpTavGGuey10lnDavGOdmuJq/XZf9BSVkocq3eZeymz1t3hKmSoEXSSi1eQVZ81zuKqG0eQU5N0OVvY+nNnoSsnDl27xLA5o9bd78pkqBF0kotXnFWPNc7irhtHnFODfDlb2PpzZ6ErJQU7V5lxKbvXfBz9Tm5Zo2BZ44odTmFWTNc7mrhNLmFeTcDFX6Pp7W6EnIwk3V5l1KbPaiafNyTZsCT5xQavOKsea53FXCafOKcW6GK30fT2v0JGShpm3zLk2W3mjzci2RApvxm0jdr7DmudxVQmnzCnJuhip/H09p9CRk4aZt8y5Nlt5o83ItkQKb8TdJ3a+w5rncVcJp84pxboar/5fvM76IhCzUEm3epQnSG21eruVSYDN+SOp+hTXP5a4SSptXkHMz1BT38e6NnoQs3BJt3qUJ0httXq7lUmAz/iqp+xXWPJe7SjhtXjHOzXBT3Me7N3oSslDLtXmXiqY3mo6CZl3zxBn/bdu2j1EPM+P5rHkud5VQ2ryCnJtvCj03q+ja6EnIwi3X5l0qmt5oOoqZec0TZ/zDt3V6mhnPZ81zuauE0+YV49y8Sdi5eRov6cEer/yvyL18jx1+7ujErayX9Gbf9987rGH4mp91xkdaYc0TZ/zpQ8uM57PmudxVQt10VzHjuZybd1nqxV63Rk9CFm7pNu9SoWZPm1fMKms+S0JpxvNZ81zuKuG0ecU4N++m2buFhCzUadq8S4ObPW1eQautefWE0ozns+a53FVCafMKcm4+bIkXe10aPQlZuNO0eZcGN3vavGJWXPPKCaUZz2fNc
6327mrhNPmFePcfIpm74iELNQp27xLA5o9bV5BK695xYTSjOez5rncVUJp8wpyboaY+sVeeKMnIQt3yjbv0oBmT5tXzOprXi2hNOP5rHkud5Vw2rxinJthpm72wj9Hr9PndLz8R/wS/Mwe/hr8zKU/N+9eSZ+lMupz82aZ8Wgv6/3bW888y+ctmfEljZxxa37AXSXUyM/NM+MHnJuhpr2P/xT5sE7pQSv2AdqZTt/mXXpJb/Z9f9/5f+gRbV478YzfcgE+TQpsxpc0asabNX+d9Q43qs1rZvx1zs1w097HQxu9TunBWWnzDnRMb0Y1HWc1MgUul0peMuPLGDnjZ2XGc5nxfKNm3Lk5obD36HVMa85Km3eg4+9lj2o6zsp7Og6Y8WWMbDrOyoznMuP5/B2BV4w6N6sLa/SkNaG0eTcITm+kwLm0eTcw41PTdOQz47nMeD5t3huyz83qQho9aU04bd4NgtMbKXAubd4NzPjUNB35zHguM55Pm/eGzHNzBiGNnrQmlDbvTgHpjRQ4lzbvTmZ8OpqOfGY8lxnPp827Q8a5OYOnGz1pTTht3p0C0hspcC5t3p3M+HQ0HfnMeC4znk+bd4fe5+Ysnm70pDWhtHlPeDC9kQLn0uY9wYxPQdORz4znMuP5tHkP6nVuzuKpRk9aE06b94QH0xspcC5t3hPM+BQ0HfnMeC4znk+b96Ae5+ZMnmr0pDWhtHlB7khvpMC5tHlBzHhZmo58ZjyXGc+nzQsQeW7O5OFGT1oTTpsX5I70RgqcS5sXxIyXpenIZ8ZzmfF82rwAUefmbB5u9KQ1obR5HbyR3kiBc2nzOjDjpWg68pnxXGY8nzYv2LPn5mweavSkNeG0eR28kd5IgXNp8zow46VoOvKZ8VxmPJ82L9gz5+aMHmr0pDWhtHmdvZLeSIFzafM6M+PDaTrymfFcZjyfNq+jR87NGd3d6ElrwmnzOnslvZEC59LmdWbGh9N05DPjucx4Pm1eR/eem9P+nPf+C9KaUNq8RN/Smw/btv1y7aua8VDavERmfAhNRz5tXi4znk+bl+TWcxMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgqNba/wBQrlMBEO+nDwAAAABJRU5ErkJggg==",EW="/assets/logo-icon-Dn6mJdhJ.png",PW="/assets/custom-gaming-Bx5d3lx6.webp",TW="/assets/notebook-DyhVpBdj.webp",RW="/assets/studio-pro-LpDtudqG.webp",OW="/assets/mechanical-kb-DbZuMtnn.webp",IW="data:image/webp;base64,UklGRgIFAABXRUJQVlA4WAoAAAAIAAAAkwAAMQAAVlA4IF4EAAAwGQCdASqUADIAPlEkj0YjoaEhJbJJcHAKCWcAS4D7Afqr5lfUA8kDrAPQA8sH9cvgt/bL9gPaFuVvQyeRvZ/zM9wD5+fUvyQ/G73l3CH9t/JjgCeT/zb/EfkN/Rtc1/Mf7L+XfMDUAPyx/mfSU/0P1H/ar2s/Nv/M9wn+V/0T/Zfm1xn36zEOVr36qvkjLRcREQNgcSrfqHxSEzlH0yc9uWDLTlS+8q+7neg5qoaxqZCPdSGf/jCwJzcNkYeDcQwYfeDhTNVENo2yr3d3g5u7pgAA/v1KS19Iukr4sbf8YOpeFv1PMXGXnPg8kMQgJ6s4x2hZ8ltLb2kAqOoL1tV05LNwA9bRSE8Y21u0Cr3KfTQAGH/ha3zRrUx/G3I0hLzblnfqm//+0/y58xDdrI/w82b/BX8XWT/6t364KGY9fouYUa+wmIlLZ7ozK7Fl8Z+F9PdbXBmS0eTlruL+GrxXrBwEju0pfjvmIuhRJvNglX03vjRQ9OAzLax08N9ybNXWttq081xVcfw27gtVjB26iZp4YQTFXx4r3+cy4TjRF2PMOPvsykrZEVX/+jomgARmwPz8leqjsGf2W1Yst4lWg/QK7n6LietP9GlDzroY8GiR63L+ivbu9ZvZASaQ/jvW/IvkFmU1QCgMtWaqS8md7KVNOzBzAx4P918MYYmafu37TGZ7KNys1AO3/8gmq92BQcCRn17O+L2etHLRwFTn7vOF4cL6X11+0//a68N4xh+RYbRXNN/FAoBUXpfCe7XJ7DFCHJtIv1LUEM9hVmqfsKMow/53vXMYAifzvYpDkBayEH3qYNHukbF+2lyRatA+eTCwTW67aHHZsrfjXThIB4U/3Zpll3HKk8DxJVL+hugATZvDK1ybRAn8BnxaEzfF8TC2jXWZyH5Zn/vNjtxUd9mCSsN/I2H2+RQuqobf2c5uAlmBp2jgVrsfWIBDk9oTU4/REpJa7TEuq+ibwjHmVCvBbnmY3kEpk5iy5HB8FI4B3E7Z+muksKCWfJ+ABLM4GGnvHxdpt1/r//6X/eJFfFlzBf6DrhZWlfH8+lefDM51sHgocbbxVHLDfxa0uB8i9hQxpubDwiGrkdGchBaATJFfm96BubSvM+3TgAjt9MwWiqP8wztcWDr3C8PaWPJA//kgHiRgAFdr+cln8N8Z20/LIT2ho//KDH4FBEpl9JZD8si/iAcICeFeQsH9S6U7M4NBWAFU7Z2IwP9lRvUc4+jNr46S7MdbRF0//p4QTiNj0jva0mzAhQV+sfnYgKHhVBwGaufnTDrTch04MdO2f3N8hUGaWwyFo+0k7S1GN+Mn/xi+nFiScCR+bY8OtmgewITnKB+cYOr//yp6NUZiGnLX4be0lnUdGXwAABEABrAqIyAR5eONt+JS685G6nVbb2Uxaet9M68B9aEWbg78L/v0aujgBvrv/FJAAzGFCAefUTIKEYPcVakc9YDkMSKvgpzMAHf4AAEAAAAAAEVYSUZ+AAAARXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAKgAgAEAAAAAQAAAJSgAwAEAAAAAQAAADIAAAAA",DW="data:image/webp;base64,UklGRp4DAABXRUJQVlA4WAoAAAAIAAAAiwAAMQAAVlA4IPoCAADQEgCdASqMADIAPlEokUYjoqGhJHZoyHAKCWcAUwOgz4ADwAPg5/Xb0gLss+q+BvfY8Fex+TXem/k35qu6b/sWSj/Jf8r7B5BH8Y/t/Az883+q+4D40/6ry1/RHsEfyT+j/6rrq/th7N36wC9FufUD8YDtmGoHyjkKBy83Vam6ZhIYGkBPjBLi5spLdpUt+r4ZYMyt1EpIegtZenThoSAA/vytEC080L/815+QdazL1c47v0PCrFFD2Do6Jef3A9VvnbZ2eAwd5+BC0ma1Ezvy9BfmJhnHCKdP45dsWotvegOHtIUhzI/xcHzpaSTF36EX2P+aAsZ/g8yn86/7Vd/yRMf/FBVjZIseGGv/909c1erpMBYiAAjarZpBjFzIcC0q+p6NqP/2EwpnWr/5i+cf/60fURJpsICcgvEvfJXRwMZo9cwbf5oqPxgg6h2oHh7wLiiRHF/pYbr6Z0HZIPeAsCNYKBaIfYphhcvtw7PHFMEZK09dPupHLxJcjUIXoDuAE8Xz3KexTwoZWjFdPCOF3vgLdxvCoS86iDZ/5Bo9//tz5uABv6y4C607lLm0w1qdXPcn38VNMyPz3fIN1O7/75jNCuMSQpJ+mPjsKt0BnH26PbMRIUQXr+NVz//ixW5TgwAByupO3LkcBl6I5+UTxgioFFrv9J04sET41nR4nFkJva6fhBNN4VPT9L4tEmetCC3AHheMfx4gkKvcnfi6YsRdzA/9ydlyQTT3+7QRjN2S1faStyFCcRwvwAuesuMHP7SqHr9USXj7qaJzNku9CQx
632/Lav///X49KtsF33Ri24vOi/PDkzouEqjX6vKi87FJ1M33JlegENjEc81EsbJUDmzWLdrJyBZ1NZeKc9LMN4I0rzObXp+ezWag+ANvRQye53gqbsfrao5Cd9SCjFCEov+8bWr8uZOxdmw0mZ4XWSAWiSdkaxaiTxnCdB3/4G9yGdBjUCIP9GjzD/6o4G2DHdskNw7j7N0reu0rEI+sqibYJAAAAAAAABFWElGfgAAAEV4aWYAAE1NACoAAAAIAAUBEgADAAAAAQABAAABGgAFAAAAAQAAAEoBGwAFAAAAAQAAAFIBKAADAAAAAQACAACHaQAEAAAAAQAAAFoAAAAAAAAASAAAAAEAAABIAAAAAQACoAIABAAAAAEAAACMoAMABAAAAAEAAAAyAAAAAA==",LW="data:image/webp;base64,UklGRpgEAABXRUJQVlA4WAoAAAAIAAAAiwAAMQAAVlA4IPQDAACQFQCdASqMADIAPlEokUYjoqGhJHM4yHAKCWcAUwbwI3H6gNtf5gOgpvAG8e/4Svj/uXgX33/DJ9t+X8d/674A66u8EcO/k3+L+1rzs9QLu75RnGDRtf8r7QPh2/0/8H5xPmb/d/2b4Av5V/Q/9b+c3xFevH0MP2KWG59QQ5FLVb+h8s4mbUMVDsueJYBDHsLm+IbU7xWE7j4ab58TR6bsMOBFQx8XdoSTcIZAtsJYmS5Nav8AAP797gBO+lP8snr0Or4ZvqhrVE8e9Zv7vomGk8nvEwRCyNE0wPsXb6Hn/DEtHed4Yihdc7bcuFhlqKNXmGR9S8NBovjom/BmvmcDoWlYRIwTVjXll6zJyKjEqwwkJh7OuvI95s2N0F2Ph6DPLY7GVSQWHdwXXDHyBRn9yXORfOY7PrAAFTb/cfcqQqY0gZPfeJuez7RZHkHHu+2Z2HEecOsQwIKQcX9VDnKBMfOOXwb6vMdxjQz/IS+QQOHBU4x6J1SOOGftpH+NDs1le3z0MBSpOTERyJIkiavbijONO7ldumi8Lv5COX8LySXjRHpneXEnQCpQvM//H5WlhHy5wA7iVDS+Fs3VNpIAIAndBwpCYwxDiXJpYUyEWs4UQ38q14aRnNtUvua4fVABflwIdu//VBvrEchkrxib4ecqrqEJi8HSVwCUHsbQ/9N+UoH72PoowxUMzlhTexAhQeqmhrCePbaMT5AzzJKL9aMzat/NQdIci+n9/GzvN8jJHR+la0yjE0H8GKQTQ0gonKOFp95n7tpeUjxg4fGX7bfOD5s/fPtP7hZshQT12qXPpQ3CiVqt3THJ09wz4ww/II09Jt24Y2hTTXhh579Kq/Yi3MGQ0ey6EmEfab6kfA2JiGjHAAIrP7jZSk4SirU+Act2Af/FlqKgc6ZpyoSGJPlf+VqfDO97QZ9iS57z8IGyy8gXTSOt6QPD1up0iQFGuJC4t8saI2sJDkPJZiqMwLZwMg5OutLIB0DesMGiLN9imSJRJyljTU0F+AJ8zS7YvuthmseCkdmhNT/fPJuIw19Qshs0ZVNZl8ikHvc+Ekm8MPMIIP//ikgKZ3sKBqf/8N26c/ZfNn/A8IR6fWslE5+H60GByjVt74WPRmOvulmUAEwRPEGIjbYRZL03OC7iqkeDjNXnAsqSUl9KCd+2B/eTWhEErRLY6iyiMZEAB1vzEsjLveQ6C7NTOtOGdP9wC5IxsMs6z0vH1mW0Cu/fw5ztMvrQldRSxuiVleoKIObGIJRAVd2R/f6JEtwLDbZodHyEiVLYXs6LhG6zfSjqshumlE3NJ0SDWuif7leIwN8zwh/czi
632MLPjrCHzAAAAAAAAAARVhJRn4AAABFeGlmAABNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAAEgAAAABAAAASAAAAAEAAqACAAQAAAABAAAAjKADAAQAAAABAAAAMgAAAAA=",MW="data:image/webp;base64,UklGRsQDAABXRUJQVlA4WAoAAAAIAAAAiwAAMQAAVlA4ICADAADwEwCdASqMADIAPlEmj0YjoiEhJXK4iHAKCWMnAAyVfmduHaCagfar2gPEA6QHmA/UT9gOwB5M3ozewB6AH6Z+lD+sfwbfuX6QdsS+YPVVjkjeszTvBGOf8l+R2jAcwNFj/tPtA+PrQc86/5H3Cv5H/OP9t+ZnGjfrAMtz6gh8plRwKbA+6ufyql0DUMuDYcltrldRipTVobnfChXc9fb5k8xSIE6ISAAA/v1KSBbd5lPEfYj6q3x9Gi6zWOfO1ncLPoNae0v9hdU5s/2bx4xuI6Q1nXcQL9ezIGd6wC9pl9gRmmmhT4lnByXjFg9AX8kzEuJS9gTUs7V8EN4Wj0nf7NpCZhPt3Hlnfc//2bur7ueBy/vymXSJIVPodLjvUUayY6vfv++tjvussv2/dh/+hXRX36UhYbcArND7zzYSrPTdZjOe5uwAFh/yK+JPrWC2xJz+xYRgae9Pz68HqJ8VZ//HNS3V1dY9EduWe+til9P8aj/ETa50bwTJux1v8bdFlKM+49ihu0F7Q+4/MZ/TZ/qZD4RjhZmeaCrBX3+/a8hp2P/OJCTYu2dAgllfSrK6L5fQF66W+L5GvLZRBvwO0JuIaqRXp5StN6cKf4LCNv/8iUz9DZBtsUsUWcapx9lyzL11P1zIR6iS341/nInpeIIHjiDgPvwQ+d1JOr8CawGehPM3oHem4L0nJ/NuIkP96Kuauf3WXL4RRSo952BR538qGlPkQQ8ftw/NSNzWFIPkqi0N/5Q4vfCKzOkX7mtccVJ+ypJk19m/yhTAT4fXjbuDkofkXoWmnopnqy7yTBUKKN7uJlihwnTlJ01O2fz0L+PZaWSvkN9bsa9t7unhsHhUinJ/3oh4GqqaEv6vdNfEvmZDxVYcZUMRjTlT6Vf5wpzDW/0iWI5M9B4cGEVRfQ1oHNG4iB2gbyGwTpZSmxooXW67AolSTVhzjPy07F3VLy501BBT33Ms34KiYs1btB+3+2PP2WFeOZKCNDycouErjOyN4goIgJ+3tS29HnzKcONjEwb51z0BUdqpDIpMHDs/Iq94/5udgAAAAAAAAEVYSUZ+AAAARXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAKgAgAEAAAAAQAAAIygAwAEAAAAAQAAADIAAAAA";function zW(){const{t:e}=Rt(),[t,r]=p.useState(!1),[n,s]=p.useState(null),[i,a]=p.useState(null),l=ps(),{cartCount:c}=Xs(),u=[{label:e("nav.pcGaming"),href:"/collection/desktop",megaMenu:{models:[{label:e("nav.allModels"),href:"/products?category=desktop"},{label:"Alpine SE",href:"/products?category=desktop&series=alpine"},{label:"Aerocore",href:"/products?category=desktop&series=aerocore"},{label:"Spacestation X",href:"/products?category=desktop&series=spacestation"},{label:e("nav.configurators"),href:"/configurator",highlight:!0}],useCases:[{label:e("useCases.forWork"),href:"/products?use=work"},{label:e("useCases.forEsports"),href:"/products?use=esports"},{label:e("useCases.forStreaming"),href:"/products?use=streaming"},{label:e("useCases.for2kGaming"),href:"/products?use=gaming-2k"},{label:e("useCases.for4kGaming"),href:"/products?use=gaming-4k"},{label:e("useCases.specialEditions"),href:"/products?use=special"}],featured:{title:"Custom Gaming PCs",href:"/product/studio-pro-x",image:PW}}},{label:e("nav.notebook"),href:"/products?category=notebook",megaMenu:{models:[{label:e("nav.allNotebooks"),href:"/products?category=notebook"},{label:"CyberBook Series",href:"/products?category=notebook&series=cyberbook"},{label:"ProBook Ultra",href:"/products?category=notebook&series=probook"},{label:"StealthBook",href:"/products?category=notebook&series=stealth"},{label:e("nav.configurators"),href:"/configurator?type=notebook",highlight:!0}],useCases:[{label:e("useCases.portableGaming"),href:"/products?category=notebook&use=gaming"},{label:e("useCases.productivity"),href:"/products?category=notebook&use=productivity"},{label:e("useCases.creativesDesign"),href:"/products?category=notebook&use=creative"},{label:e("useCases.students"),href:"/products?category=notebook&use=student"},{label:e("useCases.business"),href:"/products?category=notebook&use=business"}],featured:{title:"Cyberbook Ultra X7",href:"/product/cyberbook-x6",image:TW}}},{label:e("nav.workstations"),href:"/collection/workstation",megaMenu:{models:[{label:e("nav.allWorkstations"),href:"/products?category=workstation"},{label:"ProStation",href:"/products?category=workstation&series=prostation"},{label:"RenderMax",href:"/products?category=workstation&series=rendermax"},{label:"DevStation",href:"/products?category=workstation&series=devstation"},{label:e("nav.configurators"),href:"/configurator?type=workstation",highlight:!0}],useCases:[{label:e("useCases.3dRendering"),href:"/products?category=workstation&use=3d"},{label:e("useCases.videoEditing"),href:"/products?category=workstation&use=video"},{label:e("useCases.cadEngineering"),href:"/products?category=workstation&use=cad"},{label:e("useCases.dataScienceAi"),href:"/products?category=workstation&use=ai"},{label:e("useCases.softwareDev"),href:"/products?category=workstation&use=dev"}],featured:{title:"Studio Pro",href:"/product/prostation-x1",image:RW}}},{label:e("nav.accessories"),href:"/products?category=accessories",megaMenu:{models:[{label:e("nav.allAccessories"),href:"/products?category=accessories"},{label:e("accessories.monitors"),href:"/products?category=accessories&type=monitors"},{label:e("accessories.peripherals"),href:"/products?category=accessories&type=peripherals"},{label:e("accessories.components"),href:"/products?category=accessories&type=components"},{label:e("accessories.cables"),href:"/products?category=accessories&type=cables"}],useCases:[{label:e("accessories.gaming"),href:"/products?category=accessories&use=gaming"},{label:e("accessories.streaming"),href:"/products?category=accessories&use=streaming"},{label:e("accessories.office"),href:"/products?category=accessories&use=office"},{label:e("accessories.upgrades"),href:"/products?category=accessories&use=upgrades"}],featured:{title:"Mechanical Keyboards",href:"/products?category=accessories&type=peripherals",image:OW}}},{label:e("nav.services"),href:"/services",megaMenu:{models:[{label:e("services.allServices"),href:"/services"},{label:e("services.customBuilds"),href:"/services/custom-builds"},{label:e("services.repairs"),href:"/services/repairs"},{label:e("services.upgrades"),href:"/services/upgrades"},{label:e("services.consulting"),href:"/services/consulting"}],useCases:[{label:e("services.warranty"),href:"/services/warranty"},{label:e("services.support"),href:"/services/support"},{label:e("services.financing"),href:"/services/financing"},{label:e("services.businessSolutions"),href:"/services/business"}]}},{label:e("nav.company"),href:"/about",megaMenu:{models:[{label:e("company.contact"),href:"/contact"},{label:e("company.aboutUs"),href:"/about"},{label:"Investors",href:"/investors"}],useCases:[{label:"eSport",href:"/esport"},{label:"Affiliate Program",href:"/affiliates"},{label:"News",href:"/blog"},{label:"FAQ",href:"/faq"}],companyLayout:!0}}],d=m=>{m.megaMenu?a(m.label):r(!1)},h=()=>{a(null)},f=()=>{r(!1),a(null)};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"bg-rgb-gradient animate-rgb text-black py-1.5 text-center relative z-0",children:[o.jsx("p",{className:"text-[11px] font-medium",children:e("common.freeShipping")}),o.jsx("button",{className:"absolute right-4 top-1/2 -translate-y-1/2 hover:opacity-70 transition-opacity text-black",children:o.jsx(kt,{size:12})})]}),o.jsxs("header",{className:"bg-background sticky top-0 z-50 border-b border-border/50",children:[o.jsx("div",{className:"container mx-auto px-4",children:o.jsxs("div",{className:"flex items-center justify-between h-[4.2rem]",children:[o.jsxs("div",{className:"flex items-center gap-2 lg:gap-14",children:[o.jsx("button",{className:"lg:hidden p-2 -ml-2",onClick:()=>{t?f():r(!0)},children:t?o.jsx(kt,{size:22}):o.jsx(Xv,{size:22})}),o.jsx(Z,{to:"/search",className:"p-2 lg:hidden hover:text-primary transition-colors",children:o.jsx(qo,{size:20})}),o.jsx(Z,{to:"/",className:"flex-shrink-0 hidden lg:block",children:o.jsx("img",{src:Fi,alt:"OVERCLOCK",className:"h-14 w-auto"})}),o.jsx("nav",{className:"hidden lg:flex items-center gap-6",children:u.map(m=>o.jsxs("div",{className:"relative group",onMouseEnter:()=>m.megaMenu&&s(m.label),onMouseLeave:()=>s(null),children:[o.jsxs(Z,{to:m.href,className:`flex items-center gap-1 py-4 text-[13px] font-medium transition-colors hover:text-primary ${l.pathname===m.href?"text-primary":"text-foreground"}`,children:[m.label,m.megaMenu&&o.jsx(eo,{size:12,className:`transition-transform duration-200 ${n===m.label?"rotate-180":""}`})]}),m.megaMenu&&o.jsx("div",{className:"absolute left-0 right-0 h-4 bottom-0 translate-y-full"})]},m.label))})]}),o.jsx(Z,{to:"/",className:"flex-shrink-0 lg:hidden absolute left-1/2 -translate-x-1/2",children:o.jsx("img",{src:EW,alt:"OVERCLOCK",className:"h-[22px] w-auto"})}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("div",{className:"hidden lg:block",children:o.jsx(_y,{})}),o.jsx(Z,{to:"/search",className:"p-2 hover:text-primary transition-colors hidden lg:block",children:o.jsx(qo,{size:18})}),o.jsx(Z,{to:"/account",className:"p-2 hover:text-primary transition-colors",children:o.jsx(sm,{size:20,className:"lg:w-[18px] lg:h-[18px]"})}),o.jsx(SW,{children:o.jsxs("button",{className:"p-2 hover:text-primary transition-colors relative",children:[o.jsx(us,{size:20,className:"lg:w-[18px] lg:h-[18px]"}),o.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-4 h-4 bg-primary text-primary-foreground text-[10px] rounded-full flex items-center justify-center font-bold",children:c})]})})]})]})}),o.jsx("div",{"aria-hidden":"true",className:`hidden lg:block absolute left-0 right-0 top-full z-40 h-screen bg-background/40 backdrop-blur-sm transition-opacity duration-300 ${n?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"}`,onMouseEnter:()=>s(null)}),o.jsxs("div",{className:`hidden lg:block absolute left-0 right-0 bg-black border-t border-border shadow-2xl z-50 overflow-hidden transition-all duration-500 ease-out ${n?"opacity-100 visible max-h-[500px] pointer-events-auto":"opacity-0 invisible max-h-0 pointer-events-none"}`,style:{transform:n?"translateY(0)":"translateY(-8px)",transitionProperty:"opacity, transform, max-height, visibility"},onMouseEnter:()=>n&&s(n),onMouseLeave:()=>s(null),children:[o.jsx("div",{className:"h-2"}),o.jsx("div",{className:`container mx-auto px-4 py-6 transition-all duration-400 ease-out ${n?"opacity-100":"opacity-0"}`,style:{transform:n?"translateY(0)":"translateY(12px)",transitionDelay:n?"80ms":"0ms",transitionProperty:"opacity, transform"},children:u.filter(m=>m.megaMenu&&m.label===n).map(m=>m.megaMenu.companyLayout?o.jsxs("div",{className:"grid grid-cols-4 gap-12",children:[o.jsxs("div",{children:[o.jsx("h4",{className:"text-primary text-[11px] uppercase tracking-widest mb-3",children:e("nav.company")}),o.jsx("ul",{className:"space-y-1",children:m.megaMenu.models.map((v,g)=>o.jsx("li",{className:"transition-all duration-200",style:{transitionDelay:n?`${100+g*30}ms`:"0ms"},children:o.jsx(Z,{to:v.href,onClick:()=>s(null),className:"font-ibrand text-xl font-normal text-white hover:text-primary transition-colors block",children:v.label})},v.label))})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-primary text-[11px] uppercase tracking-widest mb-3",children:"Other"}),o.jsx("ul",{className:"space-y-1",children:m.megaMenu.useCases.map((v,g)=>o.jsx("li",{className:"transition-all duration-200",style:{transitionDelay:n?`${150+g*30}ms`:"0ms"},children:o.jsx(Z,{to:v.href,onClick:()=>s(null),className:"text-sm font-normal text-white/70 hover:text-white transition-colors block",children:v.label})},v.label))})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-primary text-[11px] uppercase tracking-widest mb-3",children:"Events"}),o.jsx("div",{className:"bg-card/50 border border-border/30 rounded-lg p-4 text-center",children:o.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Coming Soon"})})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-primary text-[11px] uppercase tracking-widest mb-3",children:"Our Brands"}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsx("div",{className:"rounded-lg overflow-hidden",children:o.jsx("img",{src:IW,alt:"Gigarge",className:"w-full h-auto"})}),o.jsx("div",{className:"rounded-lg overflow-hidden",children:o.jsx("img",{src:DW,alt:"Oversoft",className:"w-full h-auto"})}),o.jsx("div",{className:"rounded-lg overflow-hidden",children:o.jsx("img",{src:LW,alt:"Cybercharge",className:"w-full h-auto"})}),o.jsx("div",{className:"rounded-lg overflow-hidden",children:o.jsx("img",{src:MW,alt:"Cybertrend",className:"w-full h-auto"})})]})]})]},m.label):o.jsxs("div",{className:"grid grid-cols-3 gap-16",children:[o.jsxs("div",{children:[o.jsx("h4",{className:"text-primary text-[11px] uppercase tracking-widest mb-4",children:e("nav.modelsRange")}),o.jsx("ul",{className:"space-y-1.5",children:m.megaMenu.models.map((v,g)=>o.jsx("li",{className:"transition-all duration-200",style:{transitionDelay:n?`${100+g*30}ms`:"0ms"},children:o.jsx(Z,{to:v.href,onClick:()=>s(null),className:`font-ibrand text-2xl font-normal hover:text-primary transition-colors block ${v.highlight?"text-primary":"text-white"}`,children:v.label})},v.label))})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-primary text-[11px] uppercase tracking-widest mb-4",children:e("nav.selectByPurpose")}),o.jsx("ul",{className:"space-y-2.5",children:m.megaMenu.useCases.map((v,g)=>o.jsx("li",{className:"transition-all duration-200",style:{transitionDelay:n?`${150+g*30}ms`:"0ms"},children:o.jsx(Z,{to:v.href,onClick:()=>s(null),className:"text-sm font-normal text-white/70 hover:text-white transition-colors block",children:v.label})},v.label))})]}),m.megaMenu.featured&&o.jsx("div",{className:"transition-all duration-300 flex flex-col",style:{transitionDelay:n?"200ms":"0ms"},children:o.jsx(Z,{to:m.megaMenu.featured.href,onClick:()=>s(null),className:"block group flex-1 flex flex-col",children:o.jsx("div",{className:"relative overflow-hidden rounded-lg flex-1 min-h-0",children:o.jsx("img",{src:m.megaMenu.featured.image,alt:m.megaMenu.featured.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})})})})]},m.label))})]}),t&&o.jsxs("div",{className:"lg:hidden bg-background absolute left-0 right-0 top-full z-50 overflow-y-auto h-[calc(100vh-4.2rem)]",children:[o.jsx("div",{className:`${i?"hidden":"block"}`,children:o.jsx("nav",{className:"px-4",children:o.jsxs("ul",{children:[u.map(m=>o.jsx("li",{className:"border-b border-border/50",children:m.megaMenu?o.jsxs("button",{onClick:()=>d(m),className:"flex items-center justify-between w-full py-4 text-base font-bold text-foreground",children:[m.label,o.jsx(Yt,{size:18,className:"text-foreground
632/70"})]}):o.jsxs(Z,{to:m.href,className:"flex items-center justify-between w-full py-4 text-base font-bold text-foreground",onClick:f,children:[m.label,o.jsx(Yt,{size:18,className:"text-foreground/70"})]})},m.label)),o.jsx("li",{children:o.jsx(Z,{to:"/wishlist",className:"block py-4 text-base font-bold text-primary",onClick:f,children:e("common.wishlist")})}),o.jsx("li",{className:"py-4",children:o.jsx(_y,{})})]})})}),i&&o.jsxs("div",{className:"animate-fade-in",children:[o.jsx("div",{className:"px-4 py-3 border-b border-border/50",children:o.jsxs("button",{onClick:h,className:"flex items-center gap-2 text-foreground/70",children:[o.jsx(Wc,{size:18}),o.jsx("span",{className:"text-sm font-medium",children:i})]})}),u.filter(m=>m.megaMenu&&m.label===i).map(m=>o.jsxs("div",{className:"px-4 py-6",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h4",{className:"text-muted-foreground text-xs uppercase tracking-widest mb-4",children:e("nav.modelsRange")}),o.jsx("ul",{className:"space-y-3",children:m.megaMenu.models.map(v=>o.jsx("li",{children:o.jsx(Z,{to:v.href,className:`text-lg font-bold block ${v.highlight?"text-primary":"text-foreground"}`,onClick:f,children:v.label})},v.label))})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-muted-foreground text-xs uppercase tracking-widest mb-4",children:e("nav.selectByPurpose")}),o.jsx("ul",{className:"space-y-3",children:m.megaMenu.useCases.map(v=>o.jsx("li",{children:o.jsx(Z,{to:v.href,className:"text-foreground/70 text-sm block",onClick:f,children:v.label})},v.label))})]})]},m.label))]})]})]})]})}const FW="/assets/logo-icon-Dn6mJdhJ.png";function $W(){const{t:e}=Rt(),t=[[{title:e("nav.pcGaming")||"Gaming PCs",links:[{label:"All models",href:"/products?category=desktop"},{label:"In stock",href:"/products?category=desktop&inStock=true"},{label:"Configurator",href:"/products?category=desktop"},{label:"Help me choose",href:"/contact"}]},{title:e("nav.workstations")||"Workstations",links:[{label:"All models",href:"/collection/workstation"},{label:"Configurator",href:"/collection/workstation"},{label:"Help me choose",href:"/contact"}]}],[{title:"Notebook",links:[{label:"All models",href:"/products?category=notebook"},{label:"Cyberbook Ultra",href:"/cyberbook-ultra"}]},{title:e("nav.accessories")||"Accessories",links:[{label:"All Accessories",href:"/products?category=accessories"},{label:"Monitors",href:"/products?category=monitors"},{label:"Keyboards",href:"/products?category=keyboards"},{label:"Mice",href:"/products?category=mice"},{label:"Headsets",href:"/products?category=headsets"},{label:"Mouse Pads",href:"/products?category=mousepads"},{label:"Microphones",href:"/products?category=microphones"},{label:"Chairs",href:"/products?category=chairs"}]}],[{title:"Services",links:[{label:"All Services",href:"/services"},{label:"Custom Builds",href:"/services/custom-builds"},{label:"Repairs",href:"/services/repairs"},{label:"Upgrades",href:"/services/upgrades"},{label:"Warranty",href:"/services/warranty"}]},{title:"For Business",links:[{label:"Business Solutions",href:"/services/business"},{label:"Service+",href:"/service-plus"}]}],[{title:"For Buyers",links:[{label:"Financing",href:"/services/financing"},{label:"Payment & Delivery",href:"/services/support"},{label:"Warranty",href:"/services/warranty"},{label:"Consulting",href:"/services/consulting"}]},{title:"For Owners",links:[{label:"Returns & Exchange",href:"/returns"},{label:"Support",href:"/services/support"},{label:"Track Order",href:"/track-order"}]}],[{title:e("common.company")||"Company",links:[{label:e("footer.contacts")||"Contacts",href:"/contact"},{label:e("footer.aboutUs")||"About Us",href:"/about"},{label:"Our Team",href:"/team"},{label:e("footer.careers")||"Careers",href:"/careers"},{label:"Blog",href:"/news"}]},{title:"Blog",links:[{label:e("footer.news")||"News & Articles",href:"/news"}]}]];return o.jsx("footer",{className:"bg-background border-t border-border",children:o.jsxs("div",{className:"container mx-auto px-4 py-10 md:py-14",children:[o.jsx("div",{className:"mb-8 md:mb-12",children:o.jsx(Z,{to:"/",children:o.jsx("img",{src:FW,alt:"OVERCLOCK",className:"h-10 md:h-12 w-auto"})})}),o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 ga
632p-8 md:gap-10",children:t.map((r,n)=>o.jsx("div",{className:"space-y-8",children:r.map(s=>o.jsxs("div",{children:[o.jsx("h4",{className:"font-semibold text-sm md:text-base mb-3 md:mb-4 text-foreground",children:s.title}),o.jsx("ul",{className:"space-y-2",children:s.links.map(i=>o.jsx("li",{children:o.jsx(Z,{to:i.href,className:"text-muted-foreground hover:text-foreground transition-colors text-xs md:text-sm",children:i.label})},i.label))})]},s.title))},n))}),o.jsxs("div",{className:"mt-10 md:mt-14 pt-6 md:pt-8 border-t border-border",children:[o.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4 md:gap-6",children:[o.jsxs("div",{className:"text-xs md:text-sm text-muted-foreground space-y-1",children:[o.jsxs("p",{children:[e("common.visitShowroom")," ",o.jsx(Z,{to:"/showroom",className:"text-foreground underline",children:e("common.showroomInTurin")}),". ",e("common.callUs")," ",o.jsx(Z,{to:"/contact",className:"text-foreground underline",children:e("common.writeToUs")}),"."]}),o.jsx("p",{children:e("common.deliveryToEurope")})]}),o.jsxs("div",{className:"flex gap-2 md:gap-3",children:[o.jsx("a",{href:"#","aria-label":"YouTube",className:"p-2 bg-secondary rounded-full hover:bg-muted transition-colors",children:o.jsx(DD,{size:16})}),o.jsx("a",{href:"#","aria-label":"Instagram",className:"p-2 bg-secondary rounded-full hover:bg-muted transition-colors",children:o.jsx(pD,{size:16})}),o.jsx("a",{href:"#","aria-label":"Facebook",className:"p-2 bg-secondary rounded-full hover:bg-muted transition-colors",children:o.jsx(cD,{size:16})}),o.jsx("a",{href:"#","aria-label":"LinkedIn",className:"p-2 bg-secondary rounded-full hover:bg-muted transition-colors",children:o.jsx(vD,{size:16})})]})]}),o.jsxs("div",{className:"mt-6 md:mt-8 pt-6 border-t border-border flex flex-col md:flex-row justify-between items-center gap-3 md:gap-4",children:[o.jsxs("p",{className:"text-[10px] md:text-xs text-muted-foreground",children:["Copyright © 2010-",new Date().getFullYear()," OVERCLOCK TECH SRL · P.IVA IT12692220010"]}),o.jsxs("div",{className:"flex items-center gap-4 md:gap-6",children:[o.jsx(Z,{to:"/privacy",className:"text-[10px] md:text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Legal Information"}),o.jsx(Z,{to:"/sitemap",className:"text-[10px] md:text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Site Map"}),o.jsx(_y,{})]})]})]})]})})}const og="WELCOME20",U2="promo_popup_shown";function VW(){const{t:e}=Rt(),[t,r]=p.useState(!1),[n,s]=p.useState(!1);p.useEffect(()=>{if(!localStorage.getItem(U2)){const c=setTimeout(()=>{r(!0)},6e3);return()=>clearTimeout(c)}},[]);const i=()=>{r(!1),localStorage.setItem(U2,"true")},a=async()=>{try{await navigator.clipboard.writeText(og),s(!0),setTimeout(()=>s(!1),2e3)}catch{const l=document.createElement("textarea");l.value=og,document.body.appendChild(l),l.select(),document.execCommand("copy"),document.body.removeChild(l),s(!0),setTimeout(()=>s(!1),2e3)}};return o.jsx(Eu,{children:t&&o.jsxs(o.Fragment,{children:[o.jsx(X.div,{initial:{opacity:0}
632,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50",onClick:i}),o.jsx(X.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{type:"spring",damping:25,stiffness:300},className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:o.jsx("div",{className:"w-full max-w-3xl",children:o.jsxs("div",{className:"relative bg-card border border-border rounded-2xl overflow-hidden shadow-2xl",children:[o.jsx("button",{onClick:i,className:"absolute top-4 right-4 p-1 rounded-full hover:bg-muted transition-colors z-10","aria-label":"Close popup",children:o.jsx(kt,{size:20,className:"text-muted-foreground"})}),o.jsxs("div",{className:"grid md:grid-cols-2 items-center",children:[o.jsxs("div",{className:"relative hidden md:block bg-gradient-to-br from-primary/20 to-secondary",children:[o.jsx("img",{src:"https://images.unsplash.com/photo-1593642632559-0c6d3fc62b89?w=600&h=800&fit=crop",alt:"Premium laptop",className:"w-full h-full object-cover"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-trans
632parent to-transparent"}),o.jsxs("div",{className:"absolute bottom-6 left-6 right-6 text-center",children:[o.jsx("p",{className:"text-white/80 text-sm",children:e("promo.limitedTimeOffer")}),o.jsx("p",{className:"text-white font-ibrand text-3xl font-normal",children:e("promo.save")})]})]}),o.jsxs("div",{className:"relative p-8 md:p-10 text-center",children:[o.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-primary/10 rounded-full blur-3xl"}),o.jsxs("div",{className:"relative flex flex-col items-center",children:[o.jsx("div",{className:"w-14 h-14 bg-primary/10 rounded-full flex items-center justify-center mb-6",children:o.jsx(hD,{className:"w-7 h-7 text-primary"})}),o.jsx("h2",{className:"font-ibrand text-2xl md:text-3xl font-normal text-foreground mb-2",children:e("promo.welcomeGift")}),o.jsxs("p",{className:"text-muted-foreground mb-6",children:[e("promo.signUpToday")," ",o.jsx("span",{className:"text-primary font-semibold",children:"â¬20 OFF"})," ",e("promo.offFirstOrder")]}),o.jsxs("div",{className:"bg-secondary/50 border border-border rounded-lg p-4 mb-6",children:[o.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider mb-2",children:e("promo.yourCouponCode")}),o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsx("span",{className:"font-mono text-xl font-bold text-primary tracking-widest",children:og}),o.jsx("button",{onClick:a,className:"px-3 py-1.5 text-xs bg-muted hover:bg-muted/80 rounded-md transition-colors",children:e(n?"common.copied":"common.copy")})]})]}),o.jsx(ue,{asChild:!0,size:"lg",className:"w-full mb-3",children:o.jsx(Z,{to:"/auth",onClick:i,children:e("promo.signUpNow")})}),o.jsx("button",{onClick:i,className:"w-full text-sm text-muted-foreground hover:text-foreground transition-colors",children:e("promo.noThanks")})]})]})]})]})})})]})})}function Em(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Pm="Switch",[UW,IX]=hs(Pm),[BW,HW]=UW(Pm),wT=p.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:a,disabled:l,value:c="on",onCheckedChange:u,form:d,...h}=e,[f,m]=p.useState(null),v=_e(t,x=>m(x)),g=p.useRef(!1),w=f?d||!!f.closest("form"):!0,[b,y]=Ho({prop:s,defaultProp:i??!1,onChange:u,caller:Pm});return o.jsxs(BW,{scope:r,checked:b,disabled:l,children:[o.jsx(ye.button,{type:"button",role:"switch","aria-checked":b,"aria-required":a,"data-state":AT(b),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:v,onClick:he(e.onClick,x=>{y(j=>!j),w&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),w&&o.jsx(ST,{control:f,bubbles:!g.current,name:n,value:c,checked:b,required:a,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});wT.displayName=Pm;var jT="SwitchThumb",kT=p.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=HW(jT,r);return o.jsx(ye.span,{"data-state":AT(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});kT.displayName=jT;var WW="SwitchBubbleInput",ST=p.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...s},i)=>{const a=p.useRef(null),l=_e(a,i),c=Em(r),u=lm(t);return p.useEffect(()=>{const d=a.current;if(!d)return;const h=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==r&&m){const v=new Event("click",{bubbles:n});m.call(d,r),d.dispatchEvent(v)}},[c,r,n]),o.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:l,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ST.displayName=WW;function AT(e){return e?"checked":"unchecked"}var NT=wT,qW=kT;const CT=p.forwardRef(({className:e,...t},r)=>o.jsx(NT,{className:Ie("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:r,children:o.jsx(qW,{className:Ie("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")})}
632));CT.displayName=NT.displayName;const B2="cookie_consent",H2={necessary:!0,analytics:!1,marketing:!1,preferences:!1};function KW(){const{t:e}=Rt(),[t,r]=p.useState(!1),[n,s]=p.useState(!1),[i,a]=p.useState(H2);p.useEffect(()=>{localStorage.getItem(B2)||r(!0)},[]);const l=m=>{localStorage.setItem(B2,JSON.stringify(m)),r(!1)},c=()=>{l({necessary:!0,analytics:!0,marketing:!0,preferences:!0})},u=()=>{l(H2)},d=()=>{l(i)},h=m=>{m!=="necessary"&&a(v=>({...v,[m]:!v[m]}))},f=[{key:"necessary",icon:Mn,title:e("cookies.categories.necessary.title","Necessary"),description:e("cookies.categories.necessary.description","Essential for the website to function. Cannot be disabled."),required:!0},{key:"analytics",icon:qv,title:e("cookies.categories.analytics.title","Analytics"),description:e("cookies.categories.analytics.description","Help us understand how visitors interact with our website."),required:!1},{key:"marketing",icon:Jv,title:e("cookies.categories.marketing.title","Marketing"),description:e("cookies.categories.marketing.description","Used to deliver personalized advertisements."),required:!1},{key:"preferences",icon:Ko,title:e("cookies.categories.preferences.title","Preferences"),description:e("cookies.categories.preferences.description","Remember your settings and preferences for a better experience."),required:!1}];return o.jsx(Eu,{children:t&&o.jsx(X.div,{initial:{y:100,opacity:0},animate:{y:0,opacity:1},exit:{y:100,opacity:0},transition:{type:"spring",damping:25,stiffness:300},className:"fixed bottom-0 left-0 right-0 sm:bottom-4 sm:left-4 sm:right-4 md:left-auto md:right-4 md:max-w-lg z-50",children:o.jsxs("div",{className:"bg-card border-t sm:border border-border sm:rounded-xl shadow-2xl overflow-hidden max-h-[85vh] overflow-y-auto",children:[o.jsx("div",{className:"p-3 sm:p-4 pb-2 sm:pb-3",children:o.jsxs("div",{className:"flex items-start gap-2 sm:gap-3",children:[o.jsx("div",{className:"p-2 sm:p-2.5 bg-primary/10 rounded-full shrink-0",children:o.jsx(XN,{className:"w-4 h-4 sm:w-5 sm:h-5 text-primary"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"font-semibold text-foreground text-sm sm:text-base mb-0.5 sm:mb-1",children:e("cookies.title","Cookie Settings")}),o.jsxs("p",{className:"text-xs sm:text-sm text-muted-foreground leading-relaxed",children:[e("cookies.message","We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic.")," ",o.jsx(Z,{to:"/cookie-policy",className:"text-primary hover:underline font-medium",children:e("cookies.privacyPolicy","Privacy Policy")})]})]})]})}),o.jsx(Eu,{children:n&&o.jsx(X.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:o.jsx("div",{className:"px-3 sm:px-4 pb-2 sm:pb-3 space-y-2 sm:space-y-3 border-t border-border pt-2 sm:pt-3",children:f.map(m=>{const v=m.icon;return o.jsxs("div",{className:"flex items-start gap-2 sm:gap-3 p-2 sm:p-3 rounded-lg bg-muted/50 hover:bg-muted/70 transition-colors",children:[o.jsx("div",{className:"p-1 sm:p-1.5 bg-background rounded-md shrink-0",children:o.jsx(v,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-muted-foreground"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2 mb-0.5 sm:mb-1",children:[o.jsx("span",{className:"font-medium text-xs sm:text-sm text-foreground",children:m.title}),o.jsx(CT,{checked:i[m.key],onCheckedChange:()=>h(m.key),disabled:m.required,className:"shrink-0 scale-90 sm:scale-100"})]}),o.jsx("p",{className:"text-[10px] sm:text-xs text-muted-foreground leading-relaxed",children:m.description})]})]},m.key)})})})}),o.jsx("div",{className:"p-3 sm:p-4 pt-2 border-t border-border bg-muted/30",children:o.jsx("div",{className:"flex flex-col sm:flex-row gap-2",children:n?o.jsxs(o.Fragment,{children:[o.jsxs(ue,{size:"sm",variant:"outline",onClick:()=>s(!1),className:"w-full sm:flex-1 h-9 sm:h-8 text-xs sm:text-sm",children:[o.jsx(Kv,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 mr-1"}),e("cookies.hideSettings","Hide")]}),o.jsx(ue,{size:"sm",onClick:d,className:"w-full sm:flex-1 h-9 sm:h-8 text-xs sm:text-sm",children:e("cookies.savePreferences","S
632ave Preferences")})]}):o.jsxs(o.Fragment,{children:[o.jsxs(ue,{size:"sm",variant:"outline",onClick:()=>s(!0),className:"w-full sm:w-auto sm:flex-1 h-9 sm:h-8 text-xs sm:text-sm order-3 sm:order-1",children:[o.jsx(Ko,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 mr-1"}),e("cookies.customize","Customize")]}),o.jsx(ue,{size:"sm",variant:"ghost",onClick:u,className:"w-full sm:w-auto sm:flex-1 h-9 sm:h-8 text-xs sm:text-sm order-2",children:e("cookies.necessaryOnly","Necessary Only")}),o.jsx(ue,{size:"sm",onClick:c,className:"w-full sm:w-auto sm:flex-1 h-9 sm:h-8 text-xs sm:text-sm order-1 sm:order-3",children:e("cookies.acceptAll","Accept All")})]})})})]})})})}function Je({children:e}){return o.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[o.jsx(zW,{}),o.jsx("main",{className:"flex-1",children:e}),o.jsx($W,{}),o.jsx(VW,{}),o.jsx(KW,{})]})}const Kn="OVERCLOCK",GW="OVERCLOCK - High-performance gaming PCs, workstations, and notebooks. Premium components, expert craftsmanship.",mo=typeof window<"u"?window.location.origin:"https://overclock-prime-store.lovable.app",QW=`${mo}/og-image.jpg`;function $t({title:e,description:t=GW,keywords:r,image:n=QW,url:s,type:i="website",product:a,noIndex:l=!1,breadcrumbs:c,jsonLd:u}){const d=` | ${Kn}`,h=e==null?void 0:e.toUpperCase().includes(Kn),f=e?h||e.length+d.length>60?e:`${e}${d}`:`${Kn} - Premium Gaming PCs & Notebooks`,m=s||(typeof window<"u"?window.location.href:""),v={"@context":"https://schema.org","@type":"Organization",name:Kn,url:mo,logo:`${mo}/favicon.ico`,sameAs:[],contactPoint:{"@type":"ContactPoint",contactType:"customer service",availableLanguage:["English","Italian"]}},g=a?{"@context":"https://schema.org","@type":"Product",name:a.name,description:a.description||t,image:a.image||n,sku:a.sku,brand:{"@type":"Brand",name:a.brand||Kn},offers:{"@type":"Offer",url:m,priceCurrency:a.currency||"EUR",price:a.price,availability:`https://schema.org/${a.availability||"InStock"}`,seller:{"@type":"Organization",name:Kn}}}:null,w={"@context":"https://schema.org","@type":"WebSite",name:Kn,url:mo,potentialAction:{"@type":"SearchAction",target:{"@type":"EntryPoint",urlTemplate:`${mo}/search?q={search_term_string}`},"query-input":"required name=search_term_string"}},y={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{name:"Home",url:mo},...(c||[]).map(j=>({name:j.name,url:j.url?j.url.startsWith("http")?j.url:`${mo}${j.url}`:void 0}))].map((j,k)=>({"@type":"ListItem",position:k+1,name:j.name,...j.url?{item:j.url}:{}}))},x=u?Array.isArray(u)?u:[u]:[];return o.jsxs(Yu,{children:[o.jsx("title",{children:f}),o.jsx("meta",{name:"title",content:f}),o.jsx("meta",{name:"description",content:t}),r&&o.jsx("meta",{name:"keywords",content:r}),o.jsx("meta",{name:"author",content:Kn}),o.jsx("link",{rel:"canonical",href:m}),l?o.jsx("meta",{name:"robots",content:"noindex, nofollow"}):o.jsx("meta",{name:"robots",content:"index, follow"}),o.jsx("meta",{property:"og:type",content:i==="product"?"product":"website"}),o.jsx("meta",{property:"og:url",content:m}),o.jsx("meta",{property:"og:title",content:f}),o.jsx("meta",{property:"og:description",content:t}),o.jsx("meta",{property:"og:image",content:n}),o.jsx("meta",{property:"og:site_name",content:Kn}),o.jsx("meta",{property:"og:locale",content:"en_US"}),o.jsx("meta",{property:"og:locale:alternate",content:"it_IT"}),o.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),o.jsx("meta",{name:"twitter:url",content:m}),o.jsx("meta",{name:"twitter:title",content:f}),o.jsx("meta",{name:"twitter:description",content:t}),o.jsx("meta",{name:"twitter:image",content:n}),o.jsx("meta",{name:"twitter:site",content:"@OVERCLOCK"}),a&&o.jsxs(o.Fragment,{children:[o.jsx("meta",{property:"product:price:amount",content:a.price.toString()}),o.jsx("meta",{property:"product:price:currency",content:a.currency||"EUR"}),o.jsx("meta",{property:"product:availability",content:a.availability||"in stock"}),o.jsx("meta",{property:"product:brand",content:a.brand||Kn})]}),o.jsx("script",{type:"application/ld+json",children:JSON.stringify(v)}),o.jsx("script",{type:"application/ld+json",children:JSON.stringify(w)}),o.jsx("script",{type:"application/ld+json",children:JSON.stringify(y)}),g&&o.jsx("script",{type:"application/ld+json",children:JSON.stringify(g)}),x.map((j,k)=>o.jsx("script",{type:"application/ld+json",children:JSON.stringify(j)},k))]})}const ZW="/assets/cyberbook-home-BCmKQ9da.webp",XW="/assets/pc-banner-DlKuYCUQ.webp",YW="/assets/workstation-banner-DOHTT5U-.webp",JW="/assets/cybercharge-BYZNkvJP.png",eq="/assets/cyberbook-ultra-dfNReTcp.jpg",tq="/assets/aerocore-C8ymIpFH.jpg",rq="/assets/server-CattSH5q.jpg",js={hidden:{opacity:0,y:40},visible:{opacity:1,y:0,transition:{duration:.6,ease:[.25,.46,.45,.94]}}},ag={hidden:{opacity:0}
632,visible:{opacity:1,transition:{staggerChildren:.15}}};function nq(){const{t:e}=Rt();return o.jsxs(Je,{children:[o.jsx($t,{title:"Premium Gaming PCs & Notebooks",description:"OVERCLOCK - High-performance gaming PCs, workstations, and notebooks. Premium components, expert craftsmanship, AI-powered customization.",keywords:"gaming PC, gaming laptop, gaming notebook, workstation, custom PC, RTX 5090, Intel Core i9, gaming computer"}),o.jsx("h1",{className:"sr-only",children:"OVERCLOCK â Premium Gaming PCs & Notebooks"}),o.jsxs("section",{className:"flex flex-col overflow-hidden bg-background",children:[o.jsxs("div",{className:"bg-background text-center pt-6 md:pt-10 pb-6 px-4",children:[o.jsx("h2",{className:"text-2xl md:text-4xl font-normal mb-1 animate-fade-in font-ibrand",children:e("home.cyberbookX6")}),o.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mb-3 animate-fade-in",style:{animationDelay:"0.1s"},children:e("home.basedOnIntel")}),o.jsxs("div",{className:"flex items-center justify-center gap-3 animate-fade-in",style:{animationDelay:"0.2s"},children:[o.jsxs(Z,{to:"/product/cyberbook-x6","aria-label":`${e("common.learnMore")} ${e("home.cyberbookX6")}`,className:"inline-flex items-center gap-2 text-xs border border-foreground
632/40 text-foreground px-4 py-2 rounded-full hover:bg-foreground/10 transition-colors",children:[e("common.learnMore")," ",o.jsx("span",{className:"sr-only",children:e("home.cyberbookX6")})]}),o.jsx(Z,{to:"/configurator?type=notebook",className:"inline-flex items-center gap-2 text-xs bg-primary text-primary-foreground px-4 py-2 rounded-full hover:brightness-110 transition-all btn-glow-breath",children:e("common.configure")})]})]}),o.jsx("div",{className:"w-full aspect-[4/3] md:aspect-auto md:h-[70vh]",children:o.jsx("img",{src:ZW,alt:"Cyberbook Series",width:1920,height:1080,fetchPriority:"high",decoding:"async",className:"w-full h-full object-cover object-center"})})]}),o.jsxs(X.section,{className:"flex flex-col overflow-hidden bg-background",initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.3},variants:js,children:[o.jsxs("div",{className:"bg-background text-center pt-6 md:pt-10 pb-6 px-4",children:[o.jsx("h2",{className:"text-2xl md:text-4xl font-normal mb-1 font-ibrand",children:e("home.pcGaming")}),o.jsx("p",{className:"text-xs md:text-sm text-muted-foreground max-w-md mx-auto mb-3",children:e("home.powerUpArsenal")}),o.jsxs("div",{className:"flex items-center justify-center gap-3",children:[o.jsxs(Z,{to:"/products?category=desktop","aria-label":`${e("common.learnMore")} ${e("home.pcGaming")}`,className:"inline-flex items-center gap-2 text-xs border border-foreground
632/40 text-foreground px-4 py-2 rounded-full hover:bg-foreground/10 transition-colors",children:[e("common.learnMore")," ",o.jsx("span",{className:"sr-only",children:e("home.pcGaming")})]}),o.jsx(Z,{to:"/configurator?type=desktop",className:"inline-flex items-center gap-2 text-xs bg-primary text-primary-foreground px-4 py-2 rounded-full hover:brightness-110 transition-all btn-glow-breath",children:e("common.configure")})]})]}),o.jsx("div",{className:"w-full aspect-[4/3] md:aspect-auto md:h-[70vh]",children:o.jsx("img",{src:XW,alt:"PC Gaming",className:"w-full h-full object-cover object-center"})})]}),o.jsxs(X.section,{className:"flex flex-col overflow-hidden bg-background",initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.3},variants:js,children:[o.jsxs("div",{className:"bg-background text-center pt-6 md:pt-10 pb-6 px-4",children:[o.jsx("h2",{className:"text-2xl md:text-4xl font-normal mb-1 font-ibrand",children:e("home.studioPro")}),o.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mb-3",children:e("home.powerUpWork")}),o.jsxs("div",{className:"flex items-center justify-center gap-3",children:[o.jsxs(Z,{to:"/collection/workstation","aria-label":`${e("common.learnMore")} ${e("home.studioPro")}`,className:"inline-flex items-center gap-2 text-xs border border-foreground
632/40 text-foreground px-4 py-2 rounded-full hover:bg-foreground/10 transition-colors",children:[e("common.learnMore")," ",o.jsx("span",{className:"sr-only",children:e("home.studioPro")})]}),o.jsx(Z,{to:"/configurator?type=workstation",className:"inline-flex items-center gap-2 text-xs bg-primary text-primary-foreground px-4 py-2 rounded-full hover:brightness-110 transition-all btn-glow-breath",children:e("common.configure")})]})]}),o.jsx("div",{className:"w-full aspect-[4/3] md:aspect-auto md:h-[70vh]",children:o.jsx("img",{src:YW,alt:"Studio PRO",className:"w-full h-full object-cover object-center"})})]}),o.jsx("section",{className:"py-8 md:py-12 px-4",children:o.jsx(X.div,{className:"w-full",initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},variants:ag,children:o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6",children:[o.jsxs(X.div,{className:"relative overflow-hidden h-[400px] md:h-[500px] group",variants:js,children:[o.jsx("img",{src:JW,alt:"CyberCharge",className:"absolute inset-0 w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background/60 via-trans
632parent to-transparent"}),o.jsxs("div",{className:"relative z-10 p-5 md:p-6 text-center",children:[o.jsx("h3",{className:"text-xl md:text-2xl font-ibrand mb-1",children:e("home.cybercharge")}),o.jsx("h4",{className:"text-sm md:text-base font-medium mb-2",children:e("home.aiPlatform")}),o.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:e("home.freeSubscription")}),o.jsxs(Z,{to:"/cybercharge","aria-label":`${e("common.learnMore")} ${e("home.cybercharge")}`,className:"inline-block text-xs bg-accent text-accent-foreground font-medium px-5 py-2 rounded-full hover:brightness-110 transition-all",children:[e("common.learnMore")," ",o.jsx("span",{className:"sr-only",children:e("home.cybercharge")})]})]})]}),o.jsxs(X.div,{className:"relative overflow-hidden h-[400px] md:h-[500px] group",variants:js,children:[o.jsx("img",{src:eq,alt:"Cyberbook Ultra",className:"absolute inset-0 w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background/60 via-trans
632parent to-transparent"}),o.jsxs("div",{className:"relative z-10 p-5 md:p-6 text-center",children:[o.jsx("h3",{className:"text-xl md:text-2xl font-ibrand mb-1",children:e("home.cyberbookUltra")}),o.jsx("h4",{className:"text-xs md:text-sm font-medium mb-2",children:e("home.maxedProductivity")}),o.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:e("home.discoverNotebooks")}),o.jsxs("div",{className:"flex items-center justify-center gap-3",children:[o.jsxs(Z,{to:"/cyberbook-ultra","aria-label":`${e("common.learnMore")} ${e("home.cyberbookUltra")}`,className:"inline-flex items-center gap-2 text-xs border border-foreground/40 text-foreground px-4 py-2 rounded-full hover:bg-foreground/10 transition-colors",children:[e("common.learnMore")," ",o.jsx("span",{className:"sr-only",children:e("home.cyberbookUltra")})]}),o.jsx(Z,{to:"/configurator?type=notebook",className:"inline-flex items-center gap-2 text-xs bg-primary text-primary-foreground px-4 py-2 rounded-full hover:brightness-110 transition-all btn-glow-breath",children:e("common.configure")})]})]})]})]})})}),o.jsx("section",{className:"py-8 md:py-12 px-4",children:o.jsx(X.div,{className:"w-full",initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},variants:ag,children:o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6",children:[o.jsxs(X.div,{className:"relative overflow-hidden h-[400px] md:h-[500px] group",variants:js,children:[o.jsx("img",{src:tq,alt:"Aerocore Desktop PC",className:"absolute inset-0 w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background/60 via-trans
632parent to-transparent"}),o.jsxs("div",{className:"relative z-10 p-5 md:p-6 text-center",children:[o.jsx("h3",{className:"text-xl md:text-2xl font-ibrand mb-1",children:e("home.aerocoreDesktop")}),o.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:e("home.ultimateGaming")}),o.jsxs("div",{className:"flex items-center justify-center gap-3",children:[o.jsxs(Z,{to:"/products?category=desktop","aria-label":`${e("common.learnMore")} ${e("home.aerocoreDesktop")}`,className:"inline-flex items-center gap-2 text-xs border border-foreground/40 text-foreground px-4 py-2 rounded-full hover:bg-foreground/10 transition-colors",children:[e("common.learnMore")," ",o.jsx("span",{className:"sr-only",children:e("home.aerocoreDesktop")})]}),o.jsx(Z,{to:"/configurator?type=desktop",className:"inline-flex items-center gap-2 text-xs bg-primary text-primary-foreground px-4 py-2 rounded-full hover:brightness-110 transition-all btn-glow-breath",children:e("common.configure")})]})]})]}),o.jsxs(X.div,{className:"relative overflow-hidden h-[400px] md:h-[500px] group",variants:js,children:[o.jsx("img",{src:rq,alt:"Coregrid Server",className:"absolute inset-0 w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background/60 via-trans
632parent to-transparent"}),o.jsxs("div",{className:"relative z-10 p-5 md:p-6 text-center",children:[o.jsx("h3",{className:"text-xl md:text-2xl font-ibrand mb-1",children:e("home.coregrid")}),o.jsx("h4",{className:"text-xs md:text-sm mb-1",children:e("home.professionalServers")}),o.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:e("home.ultimateWork")}),o.jsxs("div",{className:"flex items-center justify-center gap-3",children:[o.jsxs(Z,{to:"/products?category=servers","aria-label":`${e("common.learnMore")} ${e("home.coregrid")}`,className:"inline-flex items-center gap-2 text-xs border border-foreground/40 text-foreground px-4 py-2 rounded-full hover:bg-foreground/10 transition-colors",children:[e("common.learnMore")," ",o.jsx("span",{className:"sr-only",children:e("home.coregrid")})]}),o.jsx(Z,{to:"/configurator?type=server",className:"inline-flex items-center gap-2 text-xs bg-primary text-primary-foreground px-4 py-2 rounded-full hover:brightness-110 transition-all btn-glow-breath",children:e("common.configure")})]})]})]})]})})}),o.jsx("section",{className:"py-8 md:py-12 px-4",children:o.jsx(X.div,{className:"w-full",initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.3},variants:ag,children:o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 text-center",children:[o.jsxs(X.div,{className:"p-4",variants:js,children:[o.jsx("div",{className:"w-10 h-10 md:w-12 md:h-12 mx-auto mb-3 rounded-full bg-primary/10 flex items-center justify-center",children:o.jsx(Hi,{className:"text-primary",size:20})}),o.jsx("h3",{className:"font-medium text-sm mb-2",children:e("features.premiumComponents")}),o.jsx("p",{className:"text-muted-foreground text-xs",children:e("features.premiumDesc")})]}),o.jsxs(X.div,{className:"p-4",variants:js,children:[o.jsx("div",{className:"w-10 h-10 md:w-12 md:h-12 mx-auto mb-3 rounded-full bg-primary/10 flex items-center justify-center",children:o.jsx(Mn,{className:"text-primary",size:20})}),o.jsx("h3",{className:"font-medium text-sm mb-2",children:e("features.expertBuilders")}),o.jsx("p",{className:"text-muted-foreground text-xs",children:e("features.expertDesc")})]}),o.jsxs(X.div,{className:"p-4",variants:js,children:[o.jsx("div",{className:"w-10 h-10 md:w-12 md:h-12 mx-auto mb-3 rounded-full bg-primary/10 flex items-center justify-center",children:o.jsx(rC,{className:"text-primary",size:20})}),o.jsx("h3",{className:"font-medium text-sm mb-2",children:e("features.aiIntegration")}),o.jsx("p",{className:"text-muted-foreground text-xs",children:e("features.aiDesc")})]})]})})})]})}function _T({id:e,slug:t,name:r,subtitle:n,image:s,price:i,priceMax:a,salePrice:l,specs:c,badges:u,deliveryTime:d="7-9",viewMode:h="list"}){const{t:f}=Rt(),[m,v]=p.useState(!1),g=l??i,w=(g/36).toFixed(2),b=t?`/product/${t}`:`/product/${e}`,y=c?[c.cpu&&{label:"CPU",value:c.cpu},c.gpu&&{label:"GPU",value:c.gpu},c.ram&&{label:"RAM",value:c.ram},c.storage&&{label:"Storage",value:c.storage}].filter(Boolean):[];return h==="grid"?o.jsxs("div",{className:"bg-card border border-border rounded-lg overflow-hidden group hover:border-foreground
632/30 hover:shadow-xl hover:shadow-black/20 hover:scale-[1.02] transition-all duration-300 flex flex-col",children:[o.jsxs("div",{className:"relative aspect-square p-4 flex items-center justify-center bg-black",children:[u&&u.length>0&&o.jsx("span",{className:"absolute top-2 left-2 px-2.5 py-1 text-xs font-bold rounded text-white z-10",style:{backgroundColor:u[0].color},children:u[0].label}),l&&o.jsxs("span",{className:"absolute top-2 right-10 px-2 py-1 text-xs font-bold rounded bg-red-500 text-white z-10",children:["-",(i-l).toLocaleString("de-DE")," â¬"]}),o.jsx("button",{type:"button","aria-label":m?`Remove ${r} from wishlist`:`Add ${r} to wishlist`,"aria-pressed":m,onClick:x=>{x.preventDefault(),v(!m)},className:"absolute top-2 right-2 p-1 hover:text-foreground transition-colors z-10",children:o.jsx(Is,{size:16,className:m?"fill-foreground text-foreground":"text-muted-foreground"})}),o.jsx(Z,{to:b,className:"flex justify-center w-full h-full",children:o.jsx("img",{src:s,alt:r,className:"h-full w-full object-contain group-hover:scale-105 transition-transform duration-500"})})]}),o.jsxs("div",{className:"p-3 flex flex-col flex-1",children:[o.jsx("h3",{className:"text-sm font-bold text-foreground line-clamp-2 mb-1",children:r}),n&&o.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 mb-2",children:n}),o.jsxs("div",{className:"mt-auto",children:[o.jsxs("div",{className:"mb-1",children:[l&&o.jsxs("span",{className:"text-xs text-muted-foreground line-through block",children:[i.toLocaleString("de-DE")," â¬"]}),o.jsxs("span",{className:`text-base font-bold ${l?"text-red-500":"text-foreground"}`,children:[g.toLocaleString("de-DE")," â¬"]})]}),o.jsxs("p",{className:"text-[10px] text-muted-foreground mb-2",children:[f("products.fromPerMonth")," ",w,"â¬",f("products.perMonth")]}),o.jsxs(Z,{to:b,className:"flex items-center justify-center gap-1 w-full px-3 py-2 bg-foreground text-background rounded font-semibold hover:bg-foreground
632/90 transition-colors text-xs",children:[o.jsx("span",{children:f("products.configureNow")}),o.jsx(ct,{size:14})]})]})]})]}):o.jsxs("div",{className:"bg-card border border-border rounded-lg overflow-hidden group hover:border-foreground/30 hover:shadow-xl hover:shadow-black/20 hover:scale-[1.02] transition-all duration-300 flex flex-col md:flex-row",children:[o.jsx("div",{className:"relative w-full md:w-2/5 md:min-w-[280px] p-6 md:p-8 flex items-center justify-center bg-black",children:o.jsx(Z,{to:b,className:"flex justify-center",children:o.jsx("img",{src:s,alt:r,className:"h-48 md:h-80 object-contain group-hover:scale-105 transition-transform duration-500"})})}),o.jsxs("div",{className:"flex-1 p-4 md:p-6 flex flex-col",children:[o.jsxs("div",{className:"flex items-start justify-between mb-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[u&&u.length>0&&o.jsx("span",{className:"px-2.5 py-1 text-xs font-bold rounded text-white",style:{backgroundColor:u[0].color},children:u[0].label}),l&&o.jsxs("span",{className:"px-2 py-1 text-xs font-bold rounded bg-red-500 text-white",children:["-",(i-l).toLocaleString("de-DE")," â¬"]})]}),o.jsx("button",{type:"button","aria-label":m?`Remove ${r} from wishlist`:`Add ${r} to wishlist`,"aria-pressed":m,onClick:x=>{x.preventDefault(),v(!m)},className:"p-1 hover:text-foreground transition-colors",children:o.jsx(Is,{size:18,className:m?"fill-foreground text-foreground":"text-muted-foreground"})})]}),o.jsxs("div",{className:"mb-4",children:[o.jsx("h3",{className:"text-lg font-bold text-foreground tracking-wide",children:r}),n&&o.jsx("p",{className:"text-sm text-muted-foreground mt-1.5",children:n})]}),y.length>0&&o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-2 mb-5",children:y.map((x,j)=>o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx(ct,{size:12,className:"text-foreground shrink-0"}),o.jsxs("span",{children:[o.jsxs("span",{className:"font-semibold text-foreground",children:[x.label,":"]}),o.jsxs("span",{className:"text-muted-foreground",children:[" ",x.value]})]})]},j))}),o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mt-auto",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex flex-col flex-wrap",children:[l&&o.jsxs("span",{className:"text-sm text-muted-foreground line-through",children:[i.toLocaleString("de-DE"),",- â¬"]}),o.jsxs("span",{className:`text-xl font-bold ${l?"text-red-500":"text-foreground"}`,children:[g.toLocaleString("de-DE"),",- â¬"]}),!l&&a&&o.jsxs("span",{className:"text-sm text-muted-foreground",children:["- ",a.toLocaleString("de-DE"),",- â¬"]})]}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[f("products.fromPerMonth")," ",w,"â¬",f("products.perMonth")," ",o.jsx("span",{className:"text-foreground underline cursor-pointer",children:f("products.financing")})]})]}),o.jsxs(Z,{to:b,className:"flex items-center justify-center gap-2 px-4 py-2.5 bg-foreground text-background rounded font-semibold hover:bg-foreground
632/90 transition-colors text-sm whitespace-nowrap",children:[o.jsx("span",{children:f("products.configureNow")}),o.jsx(ct,{size:16})]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-xs mt-2",children:[o.jsx("span",{className:"w-2 h-2 bg-green-500 rounded-full"}),o.jsxs("span",{className:"text-muted-foreground",children:[f("products.delivery"),": ",d]})]})]})]})}const sq=[{id:"price",label:"Price",icon:o.jsx("span",{className:"text-foreground text-xs",children:"â¬"})},{id:"cpu",label:"Processor",icon:o.jsx(Hi,{size:14})},{id:"gpu",label:"Graphics",icon:o.jsx(SD,{size:14})},{id:"ram",label:"RAM",icon:o.jsx(Zv,{size:14})},{id:"storage",label:"Storage",icon:o.jsx(Gv,{size:14})}];function W2({categories:e,activeCategory:t,onCategoryChange:r}){const[n,s]=p.useState([]),i=a=>{s(l=>l.includes(a)?l.filter(c=>c!==a):[...l,a])};return o.jsxs("aside",{className:"w-full lg:w-56 shrink-0 space-y-3",children:[o.jsxs("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[o.jsx("div",{className:"bg-foreground px-3 py-2",children:o.jsx("h3",{className:"font-bold text-background uppercase tracking-wide text-xs",children:"Categories"})}),o.jsx("nav",{className:"p-1.5",children:e.map(a=>o.jsxs("button",{onClick:()=>r(a.id),className:`w-full flex items-center justify-between px-2.5 py-1.5 rounded text-sm transition-colors ${t===a.id?"bg-muted text-foreground font-medium":"text-foreground hover:bg-muted"}`,children:[o.jsx("span",{children:a.label}),o.jsx(ct,{size:12,className:"text-muted-foreground"})]},a.id))})]}),o.jsxs("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[o.jsx("div",{className:"bg-foreground px-3 py-2",children:o.jsx("h3",{className:"font-bold text-background uppercase tracking-wide text-xs",children:"Filters"})}),o.jsx("div",{children:sq.map((a,l)=>o.jsxs("div",{className:l>0?"border-t border-border":"",children:[o.jsxs("button",{onClick:()=>i(a.id),className:"w-full flex items-center justify-between px-3 py-2 hover:bg-muted/50 transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-muted-foreground",children:a.icon}),o.jsx("span",{className:"text-sm text-foreground",children:a.label})]}),o.jsx(eo,{size:12,className:`text-muted-foreground transition-transform ${n.includes(a.id)?"rotate-180":""}`})]}),n.includes(a.id)&&o.jsx("div",{className:"px-3 pb-2 text-xs text-muted-foreground",children:"Filter options..."})]},a.id))})]})]})}function iq(e){return Vt({queryKey:["user_role",e],queryFn:async()=>{if(!e)return!1;const{data:{session:t}}=await Y.auth.getSession();if(!(t!=null&&t.access_token))return!1;const{data:r,error:n}=await Y.functions.invoke("verify-admin",{headers:{Authorization:`Bearer ${t.access_token}`}});return n?(console.error("Admin verification error:",n),!1):(r==null?void 0:r.isAdmin)===!0},enabled:!!e})}function ET(){return Vt({queryKey:["products"],queryFn:async()=>{const{data:e,error:t}=await Y.from("products").select("*").order("created_at",{ascending:!1});if(t)throw t;return(e||[]).map(r=>({...r,images:r.images||[],specs:r.specs||{},badges:r.badges||[],configurable:r.configurable||!1,fps_check_enabled:r.fps_check_enabled!==!1,template:r.template||"gaming",productivity_metrics:r.productivity_metrics||{}}))}})}function oq(){return Vt({queryKey:["configurable_products"],queryFn:async()=>{const{data:e,error:t}=await Y.from("configurable_products").select("*").order("created_at",{ascending:!1});if(t)throw t;return(e||[]).map(r=>({...r,categories:r.categories||[]}))}})}function aq(){const e=Ot(),{toast:t}=qr();return Ft({mutationFn:async r=>{const{data:n,error:s}=await Y.from("products").insert(r).select().single();if(s)throw s;return n},onSuccess:()=>{e.invalidateQueries({queryKey:["products"]}),t({title:"Product created",description:"Product has been added successfully."})},onError:r=>{t({title:"Error",description:r.message,variant:"destructive"})}})}function lq(){const e=Ot(),{toast:t}=qr();return Ft({mutationFn:async({id:r,...n})=>{const{data:s,error:i}=await Y.from("products").update(n).eq("id",r).select().single();if(i)throw i;return s},onSuccess:()=>
632{e.invalidateQueries({queryKey:["products"]}),t({title:"Product updated",description:"Product has been updated successfully."})},onError:r=>{t({title:"Error",description:r.message,variant:"destructive"})}})}function cq(){const e=Ot(),{toast:t}=qr();return Ft({mutationFn:async r=>{const{error:n}=await Y.from("products").delete().eq("id",r);if(n)throw n},onSuccess:()=>{e.invalidateQueries({queryKey:["products"]}),t({title:"Product deleted",description:"Product has been removed."})},onError:r=>{t({title:"Error",description:r.message,variant:"destructive"})}})}function uq(){const e=Ot(),{toast:t}=qr();return Ft({mutationFn:async r=>{const{data:n,error:s}=await Y.from("configurable_products").insert(r).select().single();if(s)throw s;return n},onSuccess:()=>{e.invalidateQueries({queryKey:["configurable_products"]}),t({title:"Configurator created",description:"Configurable product has been added successfully."})},onError:r=>{t({title:"Error",description:r.message,variant:"destructive"})}})}function dq(){const e=Ot(),{toast:t}=qr();return Ft({mutationFn:async({id:r,...n})=>{const{data:s,error:i}=await Y.from("configurable_products").update(n).eq("id",r).select().single();if(i)throw i;return s},onSuccess:()=>{e.invalidateQueries({queryKey:["configurable_products"]}),t({title:"Configurator updated",description:"Configurable product has been updated successfully."})},onError:r=>{t({title:"Error",description:r.message,variant:"destructive"})}})}function hq(){const e=Ot(),{toast:t}=qr();return Ft({mutationFn:async r=>{const{error:n}=await Y.from("configurable_products").delete().eq("id",r);if(n)throw n},onSuccess:()=>{e.invalidateQueries({queryKey:["configurable_products"]}),t({title:"Configurator deleted",description:"Configurable product has been removed."})},onError:r=>{t({title:"Error",description:r.message,variant:"destructive"})}})}function fq(){return Vt({queryKey:["admin_orders"],queryFn:async()=>{const{data:e,error:t}=await Y.from("orders").select("*").order("created_at",{ascending:!1});if(t)throw t;return e||[]}})}function mq(){const e=Ot(),{toast:t}=qr();return Ft({mutationFn:async({id:r,status:n})=>{const{data:s,error:i}=await Y.from("orders").update({status:n}).eq("id",r).select().single();if(i)throw i;return s},onSuccess:()=>{e.invalidateQueries({queryKey:["admin_orders"]}),t({title:"Order updated",description:"Order status has been updated."})},onError:r=>{t({title:"Error",description:r.message,variant:"destructive"})}})}function pq(){const e=Ot(),{toast:t}=qr();return Ft({mutationFn:async r=>{const{error:n}=await Y.from("orders").delete().eq("id",r);if(n)throw n},onSuccess:()=>{e.invalidateQueries({queryKey:["admin_orders"]}),t({title:"Order deleted",description:"Order has been removed."})},onError:r=>{t({title:"Error",description:r.message,variant:"destructive"})}})}function gq(){return Vt({queryKey:["user_roles"],queryFn:async()=>{const{data:e,error:t}=await Y.from("user_roles").select("*").order("created_at",{ascending:!1});if(t)throw t;return e||[]}})}function xq(){const e=Ot(),{toast:t}=qr();return Ft({mutationFn:async({id:r,role:n})=>{const{data:s,error:i}=await Y.from("user_roles").update({role:n}).eq("id",r).select().single();if(i)throw i;return s},onSuccess:()=>{e.invalidateQueries({queryKey:["user_roles"]}),t({title:"Role updated",description:"User role has been updated."})},onError:r=>{t({title:"Error",description:r.message,variant:"destructive"})}})}function yq(){const e=Ot(),{toast:t}=qr();return Ft({mutationFn:async r=>{const{error:n}=await Y.from("user_roles").delete().eq("id",r);if(n)throw n},onSuccess:()=>{e.invalidateQueries({queryKey:["user_roles"]}),t({title:"Role deleted",description:"User role has been removed."})},onError:r=>{t({title:"Error",description:r.message,variant:"destructive"})}})}function vq(){return Vt({queryKey:["admin_stats"],queryFn:async()=>{const[e,t]=await Promise.all([Y.from("orders").select("total, status, created_at"),Y.from("products").select("id")]),r=e.data||[],n=t.data||[],s=r.reduce((c,u)=>c+(u.total||0),0),i=r.length,a=n.length,l=new Set(r.map(c=>c.user_id)).size;return{totalRevenue:s,totalOrders:i,totalProducts:a,totalCustomers:l}}})}function bq(){const{t:e}=Rt(),[t,r]=mm(),n=t.get("category")||"",s=[{label:e("products.priceLowToHigh"),value:"price-asc"},{label:e("products.priceHighToLow"),value:"price-desc"},{label:e("products.newest"),value:"newest"}],i=[{id:"",label:e("products.allProducts")},{id:"notebook",label:e("products.notebooks")},{id:"desktop",label:e("products.desktops")}
632],[a,l]=p.useState("price-asc"),[c,u]=p.useState(!1),[d,h]=p.useState("list"),{data:f=[],isLoading:m}=ET(),v=y=>{r(y?{category:y}:{})},w=[...n?f.filter(y=>y.category===n):f].sort((y,x)=>{switch(a){case"price-asc":return Number(y.price)-Number(x.price);case"price-desc":return Number(x.price)-Number(y.price);default:return 0}}),b=n?n.charAt(0).toUpperCase()+n.slice(1)+"s":e("products.allProducts");return m?o.jsx(Je,{children:o.jsx("div",{className:"container mx-auto px-4 py-20 flex items-center justify-center",children:o.jsx(st,{className:"w-8 h-8 animate-spin text-muted-foreground"})})}):o.jsxs(Je,{children:[o.jsx($t,{title:b,description:`Browse our collection of ${b.toLowerCase()}. High-performance gaming PCs, notebooks, and workstations with premium components.`,keywords:`${n||"gaming PC"}, gaming computer, custom PC, gaming laptop, OVERCLOCK`}),o.jsxs("div",{className:"container mx-auto px-4 py-6",children:[o.jsxs("nav",{className:"text-sm text-muted-foreground mb-4",children:[o.jsx("span",{children:e("common.home")}),o.jsx("span",{className:"mx-2",children:"/"}),o.jsx("span",{className:"text-foreground",children:b})]}),o.jsx("div",{className:"mb-6",children:o.jsx("h1",{className:"text-2xl font-bold text-foreground",children:b})}),o.jsxs("div",{className:"flex gap-6",children:[o.jsx("button",{onClick:()=>u(!0),"aria-label":e("products.openCategories")||"Open categories",className:"lg:hidden fixed bottom-4 left-4 z-50 bg-foreground text-background p-3 rounded-full shadow-lg",children:o.jsx(Xv,{size:20})}),c&&o.jsx("div",{className:"lg:hidden fixed inset-0 bg-black/50 z-50",onClick:()=>u(!1),children:o.jsxs("div",{className:"absolute left-0 top-0 h-full w-72 bg-background p-4 overflow-y-auto",onClick:y=>y.stopPropagation(),children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h3",{className:"font-bold text-foreground",children:e("products.categories")}),o.jsx("button",{onClick:()=>u(!1),"aria-label":e("common.close")||"Close",children:o.jsx(kt,{size:20})})]}),o.jsx(W2,{categories:i,activeCategory:n,onCategoryChange:y=>{v(y),u(!1)}})]})}),o.jsx("div",{className:"hidden lg:block",children:o.jsx(W2,{categories:i,activeCategory:n,onCategoryChange:v})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4 mb-4 pb-4 border-b border-border",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{onClick:()=>h("list"),className:`p-2 rounded transition-colors ${d==="list"?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"}`,"aria-label":"List view",children:o.jsx(bD,{size:18})}),o.jsx("button",{onClick:()=>h("grid"),className:`p-2 rounded transition-colors ${d==="grid"?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"}`,"aria-label":"Grid view",children:o.jsx(yD,{size:18})})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("label",{htmlFor:"sort-select",className:"text-sm text-muted-foreground hidden sm:inline",children:e("products.sortBy")}),o.jsxs("div",{className:"relative",children:[o.jsx("select",{id:"sort-select","aria-label":e("products.sortBy"),value:a,onChange:y=>l(y.target.value),className:"appearance-none bg-card border border-border text-foreground text-sm px-3 py-1.5 pr-8 rounded cursor-pointer focus:outline-none focus:ring-1 focus:ring-foreground",children:s.map(y=>o.jsx("option",{value:y.value,children:y.label},y.value))}),o.jsx(eo,{size:14,className:"absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none text-muted-foreground"})]})]})]}),o.jsx("div",{className:d==="grid"?"grid grid-cols-2 md:grid-cols-3 gap-3 md:gap-4":"grid grid-cols-1 gap-4",children:w.map(y=>o.jsx(_T,{id:y.id,slug:y.slug||void 0,name:y.name.split(" - ")[0]||y.name,subtitle:y.name.split(" - ")[1]||void 0,image:y.image||"",price:Number(y.price),priceMax:y.price_max?Number(y.price_max):void 0,salePrice:y.sale_price?Number(y.sale_price):null,specs:y.specs,badges:y.featured?[{label:"TOP",color:"#1a1a1a"}]:y.badges,viewMode:d},y.id))}),w.length===0&&o.jsx("div",{className:"text-center py-20",children:o.jsx("p",{className:"text-muted-foreground",children:e("products.noProducts")})})]})]})]})]})}const q2="data:image/svg+xml,%3csvg%20width='101px'%20height='32'%20viewBox='0%200%20101%2032'%20preserveAspectRatio='xMinYMin%20meet'%20xmlns='http:&%23x2F;&%23x2F;www.w3.org&%23x2F;2000&%23x2F;
632svg'%3e%3cpath%20fill='%23ffffff'%20d='M%2012.237%202.8%20L%204.437%202.8%20C%203.937%202.8%203.437%203.2%203.337%203.7%20L%200.237%2023.7%20C%200.137%2024.1%200.437%2024.4%200.837%2024.4%20L%204.537%2024.4%20C%205.037%2024.4%205.537%2024%205.637%2023.5%20L%206.437%2018.1%20C%206.537%2017.6%206.937%2017.2%207.537%2017.2%20L%2010.037%2017.2%20C%2015.137%2017.2%2018.137%2014.7%2018.937%209.8%20C%2019.237%207.7%2018.937%206%2017.937%204.8%20C%2016.837%203.5%2014.837%202.8%2012.237%202.8%20Z%20M%2013.137%2010.1%20C%2012.737%2012.9%2010.537%2012.9%208.537%2012.9%20L%207.337%2012.9%20L%208.137%207.7%20C%208.137%207.4%208.437%207.2%208.737%207.2%20L%209.237%207.2%20C%2010.637%207.2%2011.937%207.2%2012.637%208%20C%2013.137%208.4%2013.337%209.1%2013.137%2010.1%20Z'%3e%3c/path%3e%3cpath%20fill='%23ffffff'%20d='M%2035.437%2010%20L%2031.737%2010%20C%2031.437%2010%2031.137%2010.2%2031.137%2010.5%20L%2030.937%2011.5%20L%2030.637%2011.1%20C%2029.837%209.9%2028.037%209.5%2026.237%209.5%20C%2022.137%209.5%2018.637%2012.6%2017.937%2017%20C%2017.537%2019.2%2018.037%2021.3%2019.337%2022.7%20C%2020.437%2024%2022.137%2024.6%2024.037%2024.6%20C%2027.337%2024.6%2029.237%2022.5%2029.237%2022.5%20L%2029.037%2023.5%20C%2028.937%2023.9%2029.237%2024.3%2029.637%2024.3%20L%2033.037%2024.3%20C%2033.537%2024.3%2034.037%2023.9%2034.137%2023.4%20L%2036.137%2010.6%20C%2036.237%2010.4%2035.837%2010%2035.437%2010%20Z%20M%2030.337%2017.2%20C%2029.937%2019.3%2028.337%2020.8%2026.137%2020.8%20C%2025.037%2020.8%2024.237%2020.5%2023.637%2019.8%20C%2023.037%2019.1%2022.837%2018.2%2023.037%2017.2%20C%2023.337%2015.1%2025.137%2013.6%2027.237%2013.6%20C%2028.337%2013.6%2029.137%2014%2029.737%2014.6%20C%2030.237%2015.3%2030.437%2016.2%2030.337%2017.2%20Z'%3e%3c/path%3e%3cpath%20fill='%23ffffff'%20d='M%2055.337%2010%20L%2051.637%2010%20C%2051.237%2010%2050.937%2010.2%2050.737%2010.5%20L%2045.537%2018.1%20L%2043.337%2010.8%20C%2043.237%2010.3%2042.737%2010%2042.337%2010%20L%2038.637%2010%20C%2038.237%2010%2037.837%2010.4%2038.037%2010.9%20L%2042.137%2023%20L%2038.237%2028.4%20C%2037.937%2028.8%2038.237%2029.4%2038.737%2029.4%20L%2042.437%2029.4%20C%2042.837%2029.4%2043.137%2029.2%2043.337%2028.9%20L%2055.837%2010.9%20C%2056.137%2010.6%2055.837%2010%2055.337%2010%20Z'%3e%3c/path%3e%3cpath%20fill='%23ffffff'%20d='M%2067.737%202.8%20L%2059.937%202.8%20C%2059.437%202.8%2058.937%203.2%2058.837%203.7%20L%2055.737%2023.6%20C%2055.637%2024%2055.937%2024.3%2056.337%2024.3%20L%2060.337%2024.3%20C%2060.737%2024.3%2061.037%2024%2061.037%2023.7%20L%2061.937%2018%20C%2062.037%2017.5%2062.437%2017.1%2063.037%2017.1%20L%2065.537%2017.1%20C%2070.637%2017.1%2073.637%2014.6%2074.437%209.7%20C%2074.737%207.6%2074.437%205.9%2073.437%204.7%20C%2072.237%203.5%2070.337%202.8%2067.737%202.8%20Z%20M%2068.637%2010.1%20C%2068.237%2012.9%2066.037%2012.9%2064.037%2012.9%20L%2062.837%2012.9%20L%2063.637%207.7%20C%2063.637%207.4%2063.937%207.2%2064.237%207.2%20L%2064.737%207.2%20C%2066.137%207.2%2067.437%207.2%2068.137%208%20C%2068.637%208.4%2068.737%209.1%2068.637%2010.1%20Z'%3e%3c/path%3e%3cpath%20fill='%23ffffff'%20d='M%2090.937%2010%20L%2087.237%2010%20C%2086.937%2010%2086.637%2010.2%2086.637%2010.5%20L%2086.437%2011.5%20L%2086.137%2011.1%20C%2085.337%209.9%2083.537%209.5%2081.737%209.5%20C%2077.637%209.5%2074.137%2012.6%2073.437%2017%20C%2073.037%2019.2%2073.537%2021.3%2074.837%2022.7%20C%2075.937%2024%2077.637%2024.6%2079.537%2024.6%20C%2082.837%2024.6%2084.737%2022.5%2084.737%2022.5%20L%2084.537%2023.5%20C%2084.437%2023.9%2084.737%2024.3%2085.137%2024.3%20L%2088.537%2024.3%20C%2089.037%2024.3%2089.537%2023.9%2089.637%2023.4%20L%2091.637%2010.6%20C%2091.637%2010.4%2091.337%2010%2090.937%2010%20Z%20M%2085.737%2017.2%20C%2085.337%2019.3%2083.737%2020.8%2081.537%2020.8%20C%2080.437%2020.8%2079.637%2020.5%2079.037%2019.8%20C%2078.437%2019.1%2078.237%2018.2%2078.437%2017.2%20C%2078.737%2015.1%2080.537%2013.6%2082.637%2013.6%20C%2083.737%2013.6%2084.537%2014%2085.137%2014.6%20C%2085.737%2015.3%2085.937%2016.2%2085.737%2017.2%20Z'%3e%3c/path%3e%3cpath%20fill='%23ffffff'%20d='M%2095.337%203.3%20L%2092.137%2023.6%20C%2092.037%2024%2092.337%2024.3%2092.737%2024.3%20L%2095.937%2024.3%20C%2096.437%2024.3%2096.937%2023.9%2097.037%2023.4%20L%20100.237%203.5%20C%20100.337%203.1%20100.037%202.8%2099.637%202.8%20L%2096.037%202.8%20C%2095.637%202.8%2095.437%203%2095.337%203.3%20Z'%3e%3c/path%3e%3c/svg%3e",K2="/assets/klarna-logo-BpgMU0uc.png",wq="/assets/tradein-CASqb5Zm.png",jq="/assets/pc_descr1_2-CJOiNcDZ.webp",kq="/assets/gaming_1-CYxY71j4.webp",Sq="/assets/cybercharge-logo-ru2M3itG.png",Aq="/assets/cybercharge-pack-T6N93G_d.webp",Nq="/assets/steam-keys-oyfpBsPK.webp";function Cq({id:e,slug:t,name:r,image:n,price:s,priceMax:i,salePrice:a,specs:l,badges:c}){const u=t?`/product/${t}`:`/product/${e}`;return o.jsxs(Z,{to:u,className:"group block",children:[o.jsxs("div",{className:"relative aspect-square bg-black rounded-lg overflow-hidden mb-4",children:[c&&c.length>0&&o.jsx("div",{className:"absolute bottom-3 left-3 flex gap-1 z-10",children:c.map((d,h)=>o.jsx("span",{className:"px-2 py-1 text-[10px] font-semibold rounded",style:{backgroundColor:d.color,color:"#fff"},children:d.label},h))}),o.jsx("img",{src:n,alt:r,className:"w-full h-full object-contain p-4 group-hover:scale-110 transition-transform duration-500"})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-medium text-foreground leading-relaxed mb-2 line-clamp-3 group-hover:text-primary transition-colors",children:r}),l&&l.length>0&&o.jsx("ul",{className:"text-[10px] text-muted-foreground space-y-1 mb-2",children:l.slice(0,2).map((d,h)=>o.jsx("li",{children:d},h))}),o.jsx("div",{className:"text-sm font-semibold text-foreground",children:a?o.jsxs("div",{className:"flex flex-col",children:[o.jsxs("span",{className:"text-muted-foreground font-normal text-xs line-through",children:["â¬",s.toLocaleStr
632ing("it-IT",{minimumFractionDigits:2})]}),o.jsxs("span",{className:"text-red-500",children:["â¬",a.toLocaleString("it-IT",{minimumFractionDigits:2}),o.jsxs("span",{className:"ml-2 text-[10px] font-bold text-white bg-red-500 rounded px-1.5 py-0.5 align-middle",children:["-â¬",(s-a).toLocaleString("it-IT",{minimumFractionDigits:2})]})]})]}):o.jsxs(o.Fragment,{children:["â¬",s.toLocaleString("it-IT",{minimumFractionDigits:2}),i&&o.jsxs("span",{className:"text-muted-foreground font-normal text-xs",children:[" ","- â¬",i.toLocaleString("it-IT",{minimumFractionDigits:2})]})]})})]})]})}const _q=e=>Vt({queryKey:["product-configurator",e],queryFn:async()=>{if(!e)return null;const{data:t,error:r}=await Y.from("configurable_products").select("*").eq("product_id",e).eq("status","active").maybeSingle();if(r)throw r;return t},enabled:!!e});function Eq({isOpen:e,onClose:t,productId:r,product:n}){const{data:s,isLoading:i}=_q(r),{addToCart:a}=Xs(),[l,c]=p.useState({}),[u,d]=p.useState(1),[h,f]=p.useState(!1),[m,v]=p.useState(!1),[g,w]=p.useState(!1),b=s==null?void 0:s.categories,y=(b==null?void 0:b.map(_=>{var F;return{id:_.id,title:_.name,options:((F=_.options)==null?void 0:F.map(C=>({id:C.id,label:C.name,price:parseFloat(C.price)||0})))||[]}}))||[];p.useEffect(()=>{if(y.length>0&&Object.keys(l).length===0){const _={};y.forEach(F=>{F.options.length>0&&(_[F.id]=F.options[0].id)}),c(_)}},[s]),p.useEffect(()=>{e?(v(!0),requestAnimationFrame(()=>{f(!0)})):f(!1)},[e]);const x=()=>{f(!1),setTimeout(()=>{v(!1),t()},400)};if(!e&&!m)return null;const j=()=>{let _=0;return y.forEach(F=>{const C=F.options.find(L=>L.id===l[F.id]);C&&(_+=C.price)}),_},k=(s==null?void 0:s.base_price)??n.price,S=j(),N=k+S,A=(_,F)=>{c(C=>({...C,[_]:F}))},E=async()=>{w(!0);try{const _={};y.forEach(F=>{const C=l[F.id],L=F.options.find(I=>I.id===C);L&&(_[F.title]=L.label,_[`${F.title}_price`]=L.price)}),_.total_price=N,await a.mutateAsync({productId:r,quantity:u,configuration:_}),x()}finally{w(!1)}};return o.jsxs("div",{className:`fixed inset-0 z-50 transition-all duration-400 ${h?"opacity-100":"opacity-0"}`,children:[o.jsx("div",{className:`absolute inset-0 bg-black transition-opacity duration-500 ${h?"opacity-100":"opacity-0"}`,onClick:x}),o.jsx("button",{onClick:x,className:`fixed top-4 right-4 md:top-6 md:right-6 z-[60] w-10 h-10 md:w-12 md:h-12 flex items-center justify-center rounded-full bg-white/10 hover:bg-white/20 hover:scale-105 transition-all duration-300 ${h?"opacity-100 scale-100":"opacity-0 scale-90"}`,style:{transitionDelay:h?"200ms":"0ms"},children:o.jsx(kt,{size:18,className:"text-white md:w-5 md:h-5"})}),o.jsx("div",{className:`relative h-full overflow-y-auto transition-all duration-500 ease-out ${h?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,children:o.jsxs("div",{className:"h-full flex flex-col lg:flex-row",children:[o.jsxs("div",{className:`lg:w-1/2 lg:sticky lg:top-0 lg:h-[calc(100vh-80px)] p-4 md:p-8 lg:p-12 flex flex-col bg-black transition-all duration-700 ease-out ${h?"opacity-100 translate-x-0":"opacity-0 -translate-x-12"}`,children:[o.jsxs("div",{className:"mb-2 md:mb-4 pt-10 md:pt-0",children:[o.jsx("span",{className:"text-[9px] md:text-[10px] font-medium uppercase tracking-widest text-white/50 mb-1 block",children:"Configure"}),o.jsx("h1",{className:"text-sm md:text-lg lg:text-xl font-display font-bold text-white leading-tight",children:n.name})]}),o.jsx("div",{className:"flex-1 flex items-center justify-center py-4 md:py-0",children:o.jsx("div",{className:"relative",children:o.jsx("img",{src:n.image,alt:n.name,className:`relative max-w-full max-h-[350px] md:max-h-[500px] lg:max-h-[650px] object-contain transition-all duration-700 ease-out ${h?"opacity-100 scale-100":"opacity-0 scale-95"}`,style:{transitionDelay:h?"150ms":"0ms"}})})})]}),o.jsx("div",{className:`lg:w-1/2 p-4 md:p-8 lg:p-12 lg:pr-8 bg-black flex flex-col transition-all duration-700 ease-out ${h?"opacity-100 translate-x-0":"opacity-0 translate-x-12"}`,style:{transitionDelay:h?"100ms":"0ms"},children:o.jsxs("div",{className:"max-w-lg mx-auto flex-1 min-h-0 flex flex-col",children:[i&&o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx(st,{className:"h-8 w-8 animate-spin text-white/50"})}),!i&&y.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-white/50 text-sm",children:"No configuration options available for this product."})}),!i&&y.length>0&&o.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden pb-24 md:pb-28 space-y-6 md:space-y-8 scrollbar-none",children:y.map((_,F)=>o.jsxs("div",{className:`transition-all duration-500 ease-out ${h?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,style:{transitionDelay:h?`${200+F*75}ms`:"0ms"},children:[o.jsxs("h3",{className:"text-[10px] md:text-xs font-semibold uppercase tracking-widest text-white/50 mb-3 md:mb-4 flex items-center gap-2",children:[o.jsx("span",{className:"w-4 h-4 md:w-5 md:h-5 rounded-full bg-white flex items-center justify-center text-[9px] md:text-[10px] text-black",children:F+1}),_.title]}),o.jsx("div",{className:"space-y-2",children:_.options.map(C=>{const L=l[_.id]===C.id;return o.jsxs("button",{onClick:()=>A(_.id,C.id),className:`w-full flex items-center justify-between px-3 md:px-4 py-3 md:py-4 rounded-xl border transition-all duration-200 group ${L?"border-white bg-white":"border-white/20 hover:border-white/40 bg-transparent"}`,children:[o.jsxs("div",{className:"flex items-center gap-3 md:gap-4",children:[o.jsx("div",{className:`w-4 h-4 md:w-5 md:h-5 rounded-full border-2 flex items-center justify-center transition-all duration-200 flex-shrink-0 ${L?"border-black bg-black":"border-white/30 group-hover:border-white/50"}
632`,children:L&&o.jsx(Vs,{size:10,className:"text-white md:w-3 md:h-3"})}),o.jsx("span",{className:`text-xs md:text-sm transition-colors text-left ${L?"text-black font-medium":"text-white/70"}`,children:C.label})]}),C.price>0?o.jsxs("span",{className:`text-xs md:text-sm font-medium flex-shrink-0 ${L?"text-black":"text-white/50"}`,children:["+â¬",C.price]}):o.jsx("span",{className:`text-[10px] md:text-xs flex-shrink-0 ${L?"text-black/50":"text-white/30"}`,children:"Included"})]},C.id)})})]},_.id))})]})})]})}),o.jsx("div",{className:`fixed bottom-0 left-0 right-0 z-[60] bg-black border-t border-white/10 transition-all duration-500 ease-out ${h?"opacity-100 translate-y-0":"opacity-0 translate-y-full"}`,style:{transitionDelay:h?"400ms":"0ms"},children:o.jsx("div",{className:"max-w-4xl mx-auto px-4 md:px-6 py-3 md:py-4",children:o.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 md:gap-6",children:[o.jsxs("div",{className:"flex items-center gap-4 md:gap-6 w-full sm:w-auto justify-between sm:justify-start",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-[10px] md:text-xs text-white/50 uppercase tracking-wide",children:"Total"}),o.jsxs("div",{className:"text-xl md:text-2xl font-bold text-white",children:["â¬",N.toLocaleString("it-IT",{minimumFractionDigits:2})]})]}),S>0&&o.jsxs("div",{className:"text-xs md:text-sm text-white/50",children:[o.jsxs("span",{className:"hidden sm:inline",children:["Base â¬",n.price.toLocaleString("it-IT",{minimumFractionDigits:2})," + "]}),o.jsxs("span",{className:"text-white font-medium",children:["+â¬",S]}),o.jsx("span",{className:"sm:hidden",children:" upgrades"})]})]}),o.jsxs("div",{className:"flex items-center gap-2 md:gap-3 w-full sm:w-auto",children:[o.jsxs("div",{className:"flex items-center bg-white/10 rounded-lg overflow-hidden",children:[o.jsx("button",{onClick:()=>d(Math.max(1,u-1)),className:"w-9 md:w-10 h-10 md:h-12 flex items-center justify-center hover:bg-white/20 transition-colors",children:o.jsx(Yv,{size:14,className:"text-white md:w-4 md:h-4"})}),o.jsx("span",{className:"w-8 md:w-10 text-center font-semibold text-white text-sm md:text-base",children:u}),o.jsx("button",{onClick:()=>d(u+1),className:"w-9 md:w-10 h-10 md:h-12 flex items-center justify-center hover:bg-white/20 transition-colors",children:o.jsx(Yt,{size:14,className:"text-white md:w-4 md:h-4"})})]}),o.jsx("button",{onClick:E,disabled:g,className:"flex-1 sm:flex-none h-10 md:h-12 px-4 md:px-8 rounded-lg font-semibold text-sm md:text-base bg-rgb-gradient animate-rgb text-background flex items-center justify-center gap-2 hover:scale-[1.02] transition-transform disabled:opacity-50 disabled:hover:scale-100",children:g?o.jsx(st,{size:16,className:"animate-spin md:w-[18px] md:h-[18px]"}):o.jsxs(o.Fragment,{children:["Add to Cart",o.jsx(ct,{size:16,className:"hidden sm:block md:w-[18px] md:h-[18px]"})]})})]})]})})})]})}function Pq({images:e,initialIndex:t,isOpen:r,onClose:n,productName:s}){const[i,a]=p.useState(t),[l,c]=p.useState(!1);p.useEffect(()=>{a(t)},[t]),p.useEffect(()=>(r?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[r]),p.useEffect(()=>{const f=m=>{r&&(m.key==="Escape"&&n(),m.key==="ArrowLeft"&&u(),m.key==="ArrowRight"&&d())};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[r,i]);const u=()=>{c(!1),a(f=>f===0?e.length-1:f-1)},d=()=>{c(!1),a(f=>f===e.length-1?0:f+1)},h=()=>{c(!l)};return o.jsx(Eu,{children:r&&o.jsxs(X.div,{initial:{opacity:0}
632,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center bg-black/95 backdrop-blur-sm",onClick:n,children:[o.jsx("button",{onClick:n,className:"absolute top-4 right-4 z-50 p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors",children:o.jsx(kt,{className:"w-6 h-6 text-white"})}),o.jsx("button",{onClick:f=>{f.stopPropagation(),h()},className:"absolute top-4 right-16 z-50 p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors",children:l?o.jsx(LD,{className:"w-6 h-6 text-white"}):o.jsx(nC,{className:"w-6 h-6 text-white"})}),e.length>1&&o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:f=>{f.stopPropagation(),u()},className:"absolute left-4 z-50 p-3 rounded-full bg-white/10 hover:bg-white/20 transition-colors",children:o.jsx(Wc,{className:"w-8 h-8 text-white"})}),o.jsx("button",{onClick:f=>{f.stopPropagation(),d()},className:"absolute right-4 z-50 p-3 rounded-full bg-white/10 hover:bg-white/20 transition-colors",children:o.jsx(ct,{className:"w-8 h-8 text-white"})})]}),o.jsx(X.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2},className:`relative ${l?"cursor-zoom-out":"cursor-zoom-in"}`,onClick:f=>{f.stopPropagation(),h()},children:o.jsx(X.img,{src:e[i],alt:`${s} - Image ${i+1}`,className:"max-h-[85vh] max-w-[90vw] object-contain",animate:{scale:l?1.5:1},transition:{duration:.3}})},i),e.length>1&&o.jsx("div",{className:"absolute bottom-6 left-1/2 -translate-x-1/2 flex gap-2",children:e.map((f,m)=>o.jsx("button",{onClick:v=>{v.stopPropagation(),c(!1),a(m)},className:`w-16 h-16 rounded-lg overflow-hidden border-2 transition-all ${i===m?"border-primary ring-2 ring-primary/50":"border-white/20 hover:border-white/50"}`,children:o.jsx("img",{src:f,alt:"",className:"w-full h-full object-cover"})},m))}),o.jsxs("div",{className:"absolute bottom-6 right-6 text-white/70 text-sm",children:[i+1," / ",e.length]})]})})}const Tq="/assets/fortnite-BDztkHcm.jpg",Rq="/assets/tarkov-B6HfXLCU.jpg",Oq="/assets/cyberpunk-m4Bzi46E.jpg",Iq="/assets/warzone-CxTg0boD.jpg",Dq="/assets/eldenring-nCLYaMaD.jpg",Lq="/assets/baldursgate-BfipTAMD.jpg",Mq="/assets/wukong-DHHsI0lh.jpg",zq="/assets/csgo-Dins9l0A.jpg",Fq="/assets/gta-BHU0uCBM.jpg",$q={"rtx 4090":1,"rtx 4080 super":.85,"rtx 4080":.82,"rtx 4070 ti super":.72,"rtx 4070 ti":.68,"rtx 4070 super":.62,"rtx 4070":.55,"rtx 4060 ti":.45,"rtx 4060":.38,"rtx 3090 ti":.7,"rtx 3090":.65,"rtx 3080 ti":.62,"rtx 3080":.58,"rtx 3070 ti":.48,"rtx 3070":.45,"rtx 3060 ti":.4,"rtx 3060":.32,"rtx 3050":.22,"rtx 2080 ti":.45,"rtx 2080 super":.4,"rtx 2080":.38,"rtx 2070 super":.35,"rtx 2070":.32,"rtx 2060 super":.3,"rtx 2060":.28,"gtx 1080 ti":.35,"gtx 1080":.28,"gtx 1070 ti":.25,"gtx 1070":.22,"gtx 1660 super":.22,"gtx 1660 ti":.21,"gtx 1660":.19,"gtx 1650 super":.17,"gtx 1650":.14,"rx 7900 xtx":.92,"rx 7900 xt":.8,"rx 7800 xt":.62,"rx 7700 xt":.52,"rx 7600":.38,"rx 6950 xt":.68,"rx 6900 xt":.62,"rx 6800 xt":.55,"rx 6800":.48,"rx 6700 xt":.4,"rx 6600 xt":.32,"rx 6600":.28},Vq={fortnite:{fhd:400,wqhd:320,"4k":180},tarkov:{fhd:200,wqhd:160,"4k":95},cyberpunk:{fhd:180,wqhd:130,"4k":75},warzone:{fhd:280,wqhd:220,"4k":130},eldenring:{fhd:165,wqhd:145,"4k":90},baldursgate:{fhd:200,wqhd:160,"4k":95},wukong:{fhd:140,wqhd:100,"4k":55},csgo:{fhd:600,wqhd:500,"4k":350},gta:{fhd:180,wqhd:140,"4k":85}},G2=[{id:"fortnite",name:"Fortnite",cover:Tq},{id:"tarkov",name:"Escape from Tarkov",cover:Rq},{id:"cyberpunk",name:"Cyberpunk 2077",cover:Oq},{id:"warzone",name:"Warzone 2.0",cover:Iq},{id:"eldenring",name:"Elden Ring",cover:Dq},{id:"baldursgate",name:"Baldur's Gate 3",cover:Lq},{id:"wukong",name:"Black Myth: Wukong",cover:Mq},{id:"csgo",name:"Counter-Strike 2",cover:zq},{id:"gta",name:"GTA V",cover:Fq}];function Uq(e){if(!e)return .3;const t=e.toLowerCase().trim();for(const[r,n]of Object.entries($q))if(t.includes(r))return n;return .3}function Bq(e,t){const r=Vq[e]||{fhd:100,wqhd:80,"4k":50};return{fhd:Math.round(r.fhd*t),wqhd:Math.round(r.wqhd*t),"4k":Math.round(r["4k"]*t)}}function Hq(e){return Math.round(36e3*e)}function Wq({gpu:e,productId:t}){const[r,n]=p.useState(0),[s,i]=p.useState({fhd:0,wqhd:0,"4k":0}),{data:a}=Vt({queryKey:["product_fps_data",t],queryFn:async()=>
632{if(!t)return null;const{data:v,error:g}=await Y.from("product_fps_data").select("*").eq("product_id",t);if(g)throw g;return v&&v.length>0?v:null},enabled:!!t}),l=Uq(e),c=G2[r],d=a&&a.length>0?a.find(v=>v.game_id===c.id):null,h=d?{fhd:d.fps_fhd,wqhd:d.fps_wqhd,"4k":d.fps_4k}:Bq(c.id,l),f=(d==null?void 0:d.time_spy_score)||Hq(l),m=250;return p.useEffect(()=>{const w=26.666666666666668;let b=0;const y=setInterval(()=>{b++;const x=b/30,j=1-Math.pow(1-x,3);i({fhd:Math.round(h.fhd*j),wqhd:Math.round(h.wqhd*j),"4k":Math.round(h["4k"]*j)}),b>=30&&clearInterval(y)},w);return()=>clearInterval(y)},[h.fhd,h.wqhd,h["4k"]]),o.jsxs(X.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.5,ease:[.25,.46,.45,.94]},className:"py-8 md:py-12",children:[o.jsxs("div",{className:"text-center mb-8 md:mb-10",children:[o.jsx("h2",{className:"text-2xl md:text-3xl font-display font-bold text-primary uppercase tracking-wider mb-2",children:"FPS Check"}),o.jsxs("p",{className:"text-sm text-muted-foreground max-w-2xl mx-auto",children:["Prestazioni stimate per ",o.jsx("span",{className:"text-foreground font-medium",children:e||"GPU"})," sui giochi più popolari."]})]}),o.jsx("div",{className:"bg-gradient-to-br from-card/60 to-card/30 border border-border/30 rounded-xl overflow-hidden backdrop-blur-sm",children:o.jsxs("div",{className:"flex flex-col lg:flex-row",children:[o.jsxs("div",{className:"lg:w-[340px] p-5 lg:p-6 border-b lg:border-b-0 lg:border-r border-border/20",children:[o.jsx("h3",{className:"text-xs uppercase tracking-widest text-muted-foreground mb-4 font-medium",children:"Scegli il tuo gioco"}),o.jsx("div",{className:"grid grid-cols-3 gap-2",children:G2.map((v,g)=>o.jsxs("button",{onClick:()=>n(g),className:`aspect-[3/4] rounded-lg border transition-all overflow-hidden relative group ${r===g?"border-primary ring-2 ring-primary/40 scale-[1.02]":"border-border/20 hover:border-primary/50"}`,children:[o.jsx("img",{src:v.cover,alt:v.name,className:"w-full h-full object-cover transition-transform group-hover:scale-105",loading:"lazy"}),r===g&&o.jsx(X.div,{layoutId:"game-selector",className:"absolute inset-0 border-2 border-primary rounded-lg",transition:{type:"spring",stiffness:500,damping:30}})]},v.id))})]}),o.jsxs("div",{className:"flex-1 p-5 lg:p-6",children:[o.jsx("h3",{className:"text-xs uppercase tracking-widest text-muted-foreground mb-4 font-medium",children:"Performance stimata"}),o.jsxs("div",{className:"flex gap-5",children:[o.jsxs("div",{className:"hidden sm:block w-32 md:w-40 flex-shrink-0",children:[o.jsxs("div",{className:"aspect-[3/4] rounded-lg overflow-hidden border border-border/20 relative",children:[o.jsx(X.img,{initial:{opacity:0,scale:1.1},animate:{opacity:1,scale:1},transition:{duration:.4},src:c.cover,alt:c.name,className:"w-full h-full object-cover"},c.id),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-primary/20 to-transparent opacity-50"})]}),o.jsxs("div",{className:"mt-3 text-center",children:[o.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Time Spy"}),o.jsx("p",{className:"text-lg font-display font-bold text-primary",children:f.toLocaleString()})]})]}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"flex items-baseline gap-3 mb-5",children:o.jsx(X.h4,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"text-lg md:text-xl font-display font-bold truncate",children:c.name},c.name)}),o.jsx("div",{className:"space-y-5",children:["fhd","wqhd","4k"].map((v,g)=>{const w=h[v],b=s[v],y=Math.min(w/m*100,100),x={fhd:"FHD",wqhd:"WQHD","4k":"4K"};return o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x[v]}),o.jsxs(X.span,{className:"text-lg font-bold tabular-nums",children:[b," ",o.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:"FPS"})]})]}),o.jsxs("div",{className:"relative h-5 rounded overflow-hidden bg-black/40 border border-orange-900/30",children:[o.jsxs(X.div,{initial:{width:0},animate:{width:`${y}%`},transition:{duration:.6,delay:g*.1,ease:[.25,.46,.45,.94]},className:"absolute inset-y-0 left-0 rounded overflow-hidden",children:[o.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-yellow-400 via-orange-500 to-red-600"}),o.jsx(X.div,{className:"absolute inset-0 opacity-60",style:{background:"linear-gradient(90deg, transparent 0%, rgba(255,200,0,0.4) 20%, transparent 40%, rgba(255,100,0,0.5) 60%, transparent 80%, rgba(255,50,0,0.3) 100%)"},animate:{x:["-50%","50%"],opacity:[.4,.7,.4]},transition:{duration:.8,repeat:1/0,ease:"easeInOut"}}),o.jsx(X.div,{className:"absolute inset-0",style:{background:"radial-gradient(ellipse at 30% 50%, rgba(255,255,200,0.3) 0%, transparent 50%), radial-gradient(ellipse at 70% 50%, rgba(255,200,100,0.2) 0%, transparent 40%)"},animate:{scale:[1,1.02,1],opacity:[.5,.8,.5]},transition:{duration:.5,repeat:1/0,ease:"easeInOut"}}),o.jsx(X.div,{className:"absolute right-0 top-0 bottom-0 w-4",style:{background:"linear-gradient(90deg, transparent, rgba(255,200,50,0.6), rgba(255,255,200,0.8))"}
632,animate:{opacity:[.6,1,.6]},transition:{duration:.3,repeat:1/0,ease:"easeInOut"}}),o.jsx(X.div,{className:"absolute -top-1 left-0 right-0 h-2 opacity-50",style:{background:"linear-gradient(to top, rgba(255,100,0,0.4), transparent)"},animate:{scaleY:[1,1.5,1],opacity:[.3,.6,.3]},transition:{duration:.4,repeat:1/0,ease:"easeInOut"}})]},`${c.id}-${v}`),o.jsx(X.div,{className:"absolute inset-0 pointer-events-none overflow-hidden",style:{width:`${y}%`},children:[...Array(3)].map((j,k)=>o.jsx(X.div,{className:"absolute w-1 h-1 rounded-full bg-yellow-300",style:{left:`${30+k*25}%`,bottom:0},animate:{y:[0,-12,-20],opacity:[.8,.6,0],scale:[1,.8,.4]},transition:{duration:1+k*.3,repeat:1/0,delay:k*.3,ease:"easeOut"}},k))})]})]},v)})}),o.jsx("p",{className:"text-[10px] text-muted-foreground/60 mt-5",children:"* Prestazioni stimate basate su benchmark. I risultati effettivi possono variare."})]})]})]})]})})]})}function qq(e){return Vt({queryKey:["product",e],queryFn:async()=>{if(!e)return null;const{data:t,error:r}=await Y.from("products").select("*").eq("slug",e).maybeSingle();if(r)throw r;return t?{...t,images:t.images||[],specs:t.specs||{},badges:t.badges||[],configurable:t.configurable||!1,fps_check_enabled:t.fps_check_enabled!==!1,template:t.template||"gaming",productivity_metrics:t.productivity_metrics||{}}:null},enabled:!!e})}function Kq(e,t){return Vt({queryKey:["related_products",e,t],queryFn:async()=>{if(!e)return[];const{data:r,error:n}=await Y.from("products").select("*").eq("category",e).neq("id",t||"").limit(5);if(n)throw n;return(r||[]).map(s=>({...s,images:s.images||[],specs:s.specs||{},badges:s.badges||[],configurable:s.configurable||!1,fps_check_enabled:s.fps_check_enabled!==!1,template:s.template||"gaming",productivity_metrics:s.productivity_metrics||{}}))},enabled:!!e})}const Ch=[{id:"3d_modelling",label:"3D Modelling",description:"Rendering & sculpting"},{id:"cad_cae",label:"CAD & CAE",description:"Engineering & simulation"},{id:"software_dev",label:"Software Development",description:"Build & compile"},{id:"office",label:"Office",description:"Documents & spreadsheets"},{id:"video_photo",label:"Video & Photo Editing",description:"Timeline & RAW"},{id:"ai",label:"AI",description:"Inference & training"}],Gq=[{id:"blender",name:"Blender",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/blender.svg",categories:["3d_modelling"]},{id:"maya",name:"Autodesk Maya",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/autodeskmaya.svg",categories:["3d_modelling"]},{id:"cinema4d",name:"Cinema 4D",logo:"https://upload.wikimedia.org/wikipedia/commons/4/47/C4D_New_Logo.png",categories:["3d_modelling"]},{id:"zbrush",name:"ZBrush",logo:"https://upload.wikimedia.org/wikipedia/commons/9/96/Pixologic_ZBrush_logo.png",categories:["3d_modelling"]},{id:"houdini",name:"Houdini",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/houdini.svg",categories:["3d_modelling"]},{id:"autocad",name:"AutoCAD",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/autodesk.svg",categories:["cad_cae"]},{id:"solidworks",name:"SolidWorks",logo:"https://upload.wikimedia.org/wikipedia/commons/8/87/SolidWorks_Logo.svg",categories:["cad_cae"]},{id:"fusion360",name:"Fusion 360",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/autodesk.svg",categories:["cad_cae"]},{id:"ansys",name:"ANSYS",logo:"https://upload.wikimedia.org/wikipedia/commons/9/9c/ANSYS_logo.png",categories:["cad_cae"]},{id:"revit",name:"Revit",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/autodeskrevit.svg",categories:["cad_cae"]},{id:"vscode",name:"VS Code",logo:"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/vscode/vscode-original.svg",categories:["software_dev"]},{id:"intellij",name:"IntelliJ IDEA",logo:"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/intellij/intellij-original.svg",categories:["software_dev"]},{id:"docker",name:"Docker",logo:"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/docker/docker-original.svg",categories:["software_dev"]},{id:"git",name:"Git",logo:"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/git/git-original.svg",categories:["software_dev"]},{id:"android_studio",name:"Android Studio",logo:"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/androidstudio/androidstudio-original.svg",categories:["software_dev"]},{id:"ms_word",name:"Microsoft Word",logo:"https://upload.wikimedia.org/wikipedia/commons/f/fd/Microsoft_Office_Word_%282019%E2%80%93present%29.svg",categories:["office"]},{id:"ms_excel",name:"Microsoft Excel",logo:"https://upload.wikimedia.org/wikipedia/commons/3/34/Microsoft_Office_Excel_%282019%E2%80%93present%29.svg",categories:["office"]},{id:"ms_ppt",name:"PowerPoint",logo:"https://upload.wikimedia.org/wikipedia/commons/0/0d/Microsoft_Office_PowerPoint_%282019%E2%80%93present%29.svg",categories:["office"]},{id:"outlook",name:"Outlook",logo:"https://upload.wikimedia.org/wikipedia/commons/d/df/Microsoft_Office_Outlook_%282018%E2%80%93present%29.svg",categories:["office"]},{id:"google_docs",name:"Google Docs",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/googledocs.svg",categories:["office"]},{id:"photoshop",name:"Photoshop",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/adobephotoshop.svg",categories:["video_photo"]},{id:"premiere",name:"Premiere Pro",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/adobepremierepro.svg",categories:["video_photo"]},{id:"after_effects",name:"After Effects",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/adobeaftereffects.svg",categories:["video_photo"]},{id:"lightroom",name:"Lightroom",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/adobelightroom.svg",categories:["video_photo"]},{id:"davinci",name:"DaVinci Resolve",logo:"https://upload.wikimedia.org/wikipedia/commons/5/57/DaVinci_Re
632solve_17_logo.svg",categories:["video_photo"]},{id:"capture_one",name:"Capture One",logo:"https://upload.wikimedia.org/wikipedia/commons/0/0a/Capture_One_logo.png",categories:["video_photo"]},{id:"chatgpt",name:"ChatGPT",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/openai.svg",categories:["ai"]},{id:"stable_diffusion",name:"Stable Diffusion",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/stablediffusion.svg",categories:["ai"]},{id:"pytorch",name:"PyTorch",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/pytorch.svg",categories:["ai"]},{id:"tensorflow",name:"TensorFlow",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/tensorflow.svg",categories:["ai"]},{id:"ollama",name:"Ollama",logo:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/ollama.svg",categories:["ai"]},{id:"comfyui",name:"ComfyUI",logo:"https://avatars.githubusercontent.com/u/121283862?s=200&v=4",categories:["ai"]}];function Q2(e){return Gq.filter(t=>t.categories.includes(e))}function Ey(e){return{id:e,summaryScore:"â",summaryUnit:"/10",summaryDesc:"",software:[]}}const lo={hidden:{opacity:0,y:30},visible:{opacity:1,y:0,transition:{duration:.5,ease:[.25,.46,.45,.94]}}},lg={hidden:{opacity:0,x:-30},visible:{opacity:1,x:0,transition:{duration:.5,ease:[.25,.46,.45,.94]}}},cg={hidden:{opacity:0,x:30},visible:{opacity:1,x:0,transition:{duration:.5,ease:[.25,.46,.45,.94]}}},Yd={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.15}}};function Qq(){var L,I,O,U;const{t:e}=Rt(),{slug:t}=y_();Un();const{data:r,isLoading:n,error:s}=qq(t),{data:i=[]}=Kq(r==null?void 0:r.category,r==null?void 0:r.id),{addToCart:a}=Xs(),[l,c]=p.useState(0),[u,d]=p.useState(!0),[h,f]=p.useState(!1),[m,v]=p.useState(!1),[g,w]=p.useState(!1),[b,y]=p.useState(!1),[x,j]=p.useState(!1),[k,S]=p.useState(!1),[N,A]=p.useState(!1),[E,_]=p.useState(!1),F=async()=>{if(r){w(!0);try{await a.mutateAsync({productId:r.id,quantity:1,product:{id:r.id,name:r.name,price:r.sale_price??r.price,image:r.image}})}finally{w(!1)}}};if(n)return o.jsx(Je,{children:o.jsx("div",{className:"container mx-auto px-4 py-20 flex justify-center",children:o.jsx(st,{className:"h-8 w-8 animate-spin text-primary"})})});if(s||!r)return o.jsx(Je,{children:o.jsxs("div",{className:"container mx-auto px-4 py-20 text-center",children:[o.jsx("h1",{className:"text-2xl font-display font-bold mb-4",children:e("product.notFound")}),o.jsx(Z,{to:"/products",className:"text-primary hover:underline",children:e("product.browseAll")})]})});const C=r.images.length>0?r.images:r.image?[r.image]:[];return o.jsxs(o.Fragment,{children:[o.jsx($t,{title:r.name,description:r.description||`${r.name} - High-performance ${r.category} from OVERCLOCK. Premium components, expert craftsmanship.`,keywords:`${r.name}, ${r.category}, gaming PC, OVERCLOCK, ${((L=r.specs)==null?void 0:L.gpu)||""}, ${((I=r.specs)==null?void 0:I.cpu)||""}`,image:r.images[0]||r.image||void 0,type:"product",product:{name:r.name,price:r.sale_price||r.price,currency:"EUR",availability:"InStock",description:r.description||void 0,sku:r.id,brand:"OVERCLOCK",image:r.images[0]||r.image||void 0}}),o.jsxs(Je,{children:[o.jsx(X.div,{initial:"hidden",animate:"visible",variants:lo,className:"container mx-auto px-4 py-4",children:o.jsxs("nav",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx(Z,{to:"/",className:"hover:text-foreground transition-colors",children:e("common.home")}),o.jsx(ct,{size:14}),o.jsx(Z,{to:`/products?category=${r.category}`,className:"hover:text-foreground transition-colors capitalize",children:r.category}),o.jsx(ct,{size:14}),o.jsx("span",{className:"text-foreground truncate max-w-[200px]",children:r.name})]})}),o.jsx("section",{className:"container mx-auto px-4 py-4 lg:py-10",children:o.jsxs("div",{className:"flex flex-col lg:flex-row gap-6 lg:gap-12",children:[o.jsxs("div",{className:"flex-1 lg:w-[64%]",children:[o.jsxs(X.div,{initial:"hidden",animate:"visible",variants:lg,className:"flex flex-col-reverse md:flex-row gap-3 md:gap-4 mb-6 lg:mb-10",children:[C.length>1&&o.jsx("div",{className:"flex md:flex-col gap-2 md:gap-3 overflow-x-auto md:overflow-visible pb-2 md:pb-0",children:C.map((M,P)=>o.jsx("button",{onClick:()=>c(P),className:`w-14 h-14 md:w-16 md:h-16 flex-shrink-0 rounded-lg border-2 overflow-hidden transition-all ${l===P?"border-primary ring-2 ring-primary/20":"border-border/50 hover:border-muted-foreground"}`,children:o.jsx("img",{src:M,alt:"",className:"w-full h-full object-cover"})},P))}),o.jsx("button",{type:"button","aria-label":`${e("product.zoomImage")||"Zoom image"}: ${r.name}`,className:"flex-1 aspect-square bg-black rounded-2xl overflow-hidden relative group cursor-pointer text-left",onClick:()=>C.length>0&&v(!0),children:C.length>0?o.jsxs(o.Fragment,{children:[o.jsx("img",{src:C[l]||C[0],alt:r.name,className:"w-full h-full object-contain p-4 lg:p-6 transition-transform duration-300 group-hover:scale-105"}),o.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors flex items-center justify-center",children:o.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity bg-white/20 backdrop-blur-sm rounded-full p-3",children:o.jsx(nC,{className:"w-6 h-6 text-white"})})})]}):o.jsx("div",{className:"w-full h-full flex items-center justify-center text-muted-foreground",children:e("product.noImage")})})]}),o.jsxs("div",{className:"lg:hidden mb-6",children:[o.jsx("span",{className:"text-[10px] md:text-xs font-medium uppercase tracking-widest text-primary mb-2 block",children:r.category}),o.jsx("h1",{className:"text-base md:text-lg font-display font-bold mb-3 leading-tight",children:r.name}),o.jsxs("div",{className:"bg-card/50 border border-border/30 rounded-xl p-3 mb-4",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx("img",{src:q2,alt:"PayPal",className:"h-4"}),o.jsx("img",{src:K2,alt:"Klarna",className:"h-3"})]}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[e("product.payIn3")," â¬",(r.price/3).toFixed(2)]}
632),o.jsx("p",{className:"text-[10px] text-muted-foreground/70 mt-0.5",children:e("product.learnMorePayment")})]}),o.jsx("div",{className:"mb-5",children:r.sale_price?o.jsxs("div",{className:"flex flex-col items-start",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[o.jsxs("span",{className:"text-sm text-muted-foreground line-through",children:["â¬",r.price.toLocaleString("it-IT",{minimumFractionDigits:2})]}),o.jsxs("span",{className:"px-1.5 py-0.5 text-[10px] font-bold rounded bg-red-500 text-white leading-none",children:["-â¬",(r.price-r.sale_price).toLocaleString("it-IT",{minimumFractionDigits:2})]})]}),o.jsxs("div",{className:"text-2xl font-bold text-red-500",children:["â¬",r.sale_price.toLocaleString("it-IT",{minimumFractionDigits:2})]})]}):o.jsxs("div",{className:"text-2xl font-bold",children:["â¬",r.price.toLocaleString("it-IT",{minimumFractionDigits:2}),r.price_max&&o.jsxs("span",{className:"text-lg text-muted-foreground ml-2",children:["- â¬",r.price_max.toLocaleString("it-IT",{minimumFractionDigits:2})]})]})}),o.jsx("div",{className:"space-y-2 mb-4",children:r.configurable?o.jsx("button",{onClick:()=>f(!0),className:"w-full py-3 px-4 rounded-xl text-sm font-semibold flex items-center justify-center gap-2 bg-rgb-gradient animate-rgb text-background",children:e("product.configureAndAdd")}):o.jsxs("button",{onClick:F,disabled:g,className:"w-full py-3 px-4 rounded-xl text-sm font-semibold flex items-center justify-center gap-2 bg-rgb-gradient animate-rgb text-background disabled:opacity-50",children:[g?o.jsx(st,{className:"w-4 h-4 animate-spin"}):o.jsx(us,{className:"w-4 h-4"}),e(g?"product.adding":"product.addToCart")]})}),o.jsx("div",{className:"flex gap-4 pt-3 border-t border-border/30 mb-4",children:o.jsxs("button",{className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[o.jsx(Is,{size:16}),e("product.addToWishlist")]})}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("button",{onClick:()=>A(!0),className:"w-full flex items-center gap-3 p-3 bg-card/30 border border-border/20 rounded-lg text-left hover:border-primary/30 transition-colors",children:[o.jsx("div",{className:"w-8 h-8 bg-primary/10 rounded-full flex items-center justify-center flex-shrink-0",children:o.jsx(on,{className:"w-4 h-4 text-primary"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h4",{className:"text-xs font-medium",children:e("products.fastShipping")}),o.jsx("p",{className:"text-[10px] text-muted-foreground",children:e("products.freeDelivery")})]}),o.jsx(ct,{size:14,className:"text-muted-foreground flex-shrink-0"})]}),o.jsxs("button",{onClick:()=>j(!0),className:"w-full flex items-center gap-3 p-3 bg-card/30 border border-border/20 rounded-lg text-left hover:border-primary/30 transition-colors",children:[o.jsx("div",{className:"w-8 h-8 bg-primary/10 rounded-full flex items-center justify-center flex-shrink-0",children:o.jsx(Mn,{className:"w-4 h-4 text-primary"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h4",{className:"text-xs font-medium",children:e("products.twoYearWarranty")}),o.jsx("p",{className:"text-[10px] text-muted-foreground",children:e("products.extendedProtection")})]}),o.jsx(ct,{size:14,className:"text-muted-foreground flex-shrink-0"})]}),o.jsxs("button",{onClick:()=>S(!0),className:"w-full flex items-center gap-3 p-3 bg-card/30 border border-border/20 rounded-lg text-left hover:border-primary/30 transition-colors",children:[o.jsx("div",{className:"w-8 h-8 bg-primary/10 rounded-full flex items-center justify-center flex-shrink-0",children:o.jsx(_i,{className:"w-4 h-4 text-primary"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h4",{className:"text-xs font-medium",children:e("products.securePayment")}),o.jsx("p",{className:"text-[10px] text-muted-foreground",children:e("products.sslEncrypted")})]}),o.jsx(ct,{size:14,className:"text-muted-foreground flex-shrink-0"})]})]})]}),r.template!=="accessory"&&o.jsxs(X.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},variants:lo,className:"mb-6 lg:mb-10",children:[o.jsx("h2",{className:"text-lg lg:text-xl font-display font-bold mb-4 lg:mb-6",children:e("product.inThePack")}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 md:gap-4",children:[o.jsxs("div",{className:"bg-card/30 border border-border/20 rounded-xl p-3 md:p-4",children:[o.jsx("div",{className:"aspect-square bg-muted/20 rounded-lg overflow-hidden mb-2 md:mb-3",children:C[0]&&o.jsx("img",{src:C[0],alt:"Product",className:"w-full h-full object-contain p-2"})}),o.jsx("h3",{className:"text-xs md:text-sm font-medium",children:r.category==="notebook"?e("product.notebook"):e("product.desktop")}),o.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground",children:"x1"})]}),o.jsxs("div",{className:"bg-card/30 border border-border/20 rounded-xl p-3 md:p-4",children:[o.jsx("div",{className:"aspect-square bg-muted/20 rounded-lg flex items-center justify-center mb-2 md:mb-3",children:o.jsx(tD,{className:"w-10 h-10 md:w-12 md:h-12 text-muted-foreground"})}),o.jsx("h3",{className:"text-xs md:text-sm font-medium",children:e("product.powerCable")}),o.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground",children:"x1"})]}),o.jsxs("div",{className:"bg-card/30 border border-border/20 rounded-xl p-3 md:p-4",children:[o.jsx("div",{className:"aspect-square rounded-lg overflow-hidden mb-2 md:mb-3",children:o.jsx("img",{src:Aq,alt:"CyberCharge 3 Months Free",className:"w-full h-full object-cover"})}),o.jsx("h3",{className:"text-xs md:text-sm font-medium",children:e("product.cyberchargeAiFree")}),o.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground",children:"x1"})]}),o.jsxs("div",{className:"bg-card/30 border border-border/20 rounded-xl p-3 md:p-4",children:[o.jsx("div",{className:"aspect-square rounded-lg overflow-hidden mb-2 md:mb-3",children:o.jsx("img",{src:Nq,alt:"3 Random Steam Ke
632ys",className:"w-full h-full object-cover"})}),o.jsx("h3",{className:"text-xs md:text-sm font-medium",children:e("product.randomGifts")}),o.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground",children:"x1"})]})]})]}),r.specs&&Object.keys(r.specs).length>0&&o.jsxs(X.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},variants:lo,className:"mb-6 lg:mb-10",children:[o.jsxs("button",{onClick:()=>d(!u),className:"w-full flex items-center justify-between mb-4 lg:mb-6 text-left",children:[o.jsx("h2",{className:"text-lg lg:text-xl font-display font-bold",children:e("product.specifications")}),o.jsx(eo,{size:20,className:`transition-transform duration-200 text-muted-foreground ${u?"rotate-180":""}`})]}),u&&o.jsx("div",{className:"bg-card/30 border border-border/20 rounded-xl overflow-hidden",children:Object.entries(r.specs).map(([M,P],z)=>o.jsxs("div",{className:`flex justify-between py-3 px-4 ${z<Object.entries(r.specs).length-1?"border-b border-border/20":""}`,children:[o.jsx("span",{className:"font-medium text-foreground capitalize text-sm",children:M}),o.jsx("span",{className:"text-sm text-muted-foreground",children:P})]},M))})]}),r.template!=="business"&&r.template!=="accessory"&&((O=r.specs)==null?void 0:O.gpu)&&r.fps_check_enabled!==!1&&o.jsx(X.button,{initial:{opacity:0,y:20,scale:.98},whileInView:{opacity:1,y:0,scale:1},viewport:{once:!0,margin:"-100px"},whileHover:{scale:1.01},whileTap:{scale:.99},transition:{duration:.4,ease:[.25,.46,.45,.94]},onClick:()=>y(!0),className:"w-full mb-6 lg:mb-10 group",children:o.jsxs("div",{className:"relative overflow-hidden bg-gradient-to-r from-yellow-500/5 via-orange-500/10 to-red-500/5 border border-orange-500/40 rounded-xl p-4 flex items-center justify-between hover:border-orange-400/60 hover:shadow-lg hover:shadow-orange-500/10 transition-all duration-300",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsxs(X.div,{className:"relative w-12 h-12 rounded-full bg-gradient-to-br from-yellow-400 via-orange-500 to-red-600 flex items-center justify-center shadow-lg shadow-orange-500/30",animate:{boxShadow:["0 10px 25px -5px rgba(249, 115, 22, 0.3)","0 10px 35px -5px rgba(249, 115, 22, 0.5)","0 10px 25px -5px rgba(249, 115, 22, 0.3)"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"},children:[o.jsx(X.div,{animate:{scale:[1,1.1,1],rotate:[0,5,-5,0]},transition:{duration:.8,repeat:1/0,ease:"easeInOut"},children:o.jsx(vu,{className:"w-6 h-6 text-white drop-shadow-lg"})}),o.jsx(X.div,{className:"absolute -top-1 left-1/2 w-1.5 h-1.5 rounded-full bg-yellow-300",animate:{y:[-5,-15],opacity:[.8,0],scale:[1,.5]},transition:{duration:.8,repeat:1/0,ease:"easeOut"}}),o.jsx(X.div,{className:"absolute -top-1 left-1/3 w-1 h-1 rounded-full bg-orange-300",animate:{y:[-5,-12],opacity:[.6,0],scale:[1,.3]},transition:{duration:.6,repeat:1/0,delay:.2,ease:"easeOut"}})]}),o.jsxs("div",{className:"text-left",children:[o.jsx("h3",{className:"text-sm md:text-base font-display font-bold text-foreground group-hover:text-orange-400 transition-colors",children:e("product.fpsCheck")}),o.jsx("p",{className:"text-xs text-muted-foreground",children:e("product.fpsCheckDesc")})]})]}),o.jsx(X.div,{animate:{x:[0,4,0]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"},children:o.jsx(ct,{className:"w-5 h-5 text-orange-500"})}),o.jsx(X.div,{className:"absolute inset-0 pointer-events-none",style:{background:"radial-gradient(ellipse at 0% 50%, rgba(251,191,36,0.15) 0%, transparent 50%)"},animate:{opacity:[.3,.6,.3],scale:[1,1.1,1]},transition:{duration:2,repeat:1/0,ease:"easeInOut"}}),o.jsx(X.div,{className:"absolute inset-0 pointer-events-none",style:{background:"radial-gradient(ellipse at 100% 50%, rgba(239,68,68,0.1) 0%, transparent 50%)"},animate:{opacity:[.2,.5,.2]},transition:{duration:2.5,repeat:1/0,ease:"easeInOut",delay:.5}}),o.jsx(X.div,{className:"absolute inset-0 pointer-events-none",style:{background:"linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%)"},animate:{x:["-100%","200%"]},transition:{duration:3,repeat:1/0,ease:"easeInOut",repeatDelay:2}})]})}),r.template==="business"&&(()=>{const M=r.productivity_metrics||{},P=Ch.map(B=>({cat:B,data:M[B.id]}
632)).filter(B=>B.data&&B.data.summaryScore&&B.data.summaryScore!=="â").slice(0,4),z=P.length>0?P.map(B=>({label:B.cat.label,score:B.data.summaryScore,unit:B.data.summaryUnit,desc:B.data.summaryDesc})):Ch.slice(0,4).map(B=>({label:B.label,score:"â",unit:"/10",desc:B.description}));return o.jsx(X.button,{type:"button",onClick:()=>_(!0),initial:{opacity:0,y:20,scale:.98},whileInView:{opacity:1,y:0,scale:1},viewport:{once:!0,margin:"-100px"},transition:{duration:.4,ease:[.25,.46,.45,.94]},whileHover:{scale:1.005},className:"w-full mb-6 lg:mb-10 text-left",children:o.jsxs("div",{className:"relative overflow-hidden bg-gradient-to-r from-blue-500/5 via-cyan-500/10 to-indigo-500/5 border border-blue-500/40 rounded-xl p-5 hover:border-blue-500/70 transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[o.jsx("div",{className:"relative w-12 h-12 rounded-full bg-gradient-to-br from-blue-400 via-cyan-500 to-indigo-600 flex items-center justify-center shadow-lg shadow-blue-500/30",children:o.jsx(Wo,{className:"w-6 h-6 text-white drop-shadow-lg"})}),o.jsxs("div",{className:"text-left flex-1",children:[o.jsx("h3",{className:"text-sm md:text-base font-display font-bold text-foreground",children:"Productivity Performance"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Benchmark scores for professional workloads â tap for details"})]}),o.jsx(ct,{className:"w-5 h-5 text-blue-500/70"})]}),o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 md:gap-3",children:z.map(B=>o.jsxs("div",{className:"bg-card/40 border border-border/30 rounded-lg p-3 flex flex-col",children:[o.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:B.label}),o.jsxs("div",{className:"flex items-baseline gap-1",children:[o.jsx("span",{className:"text-xl font-display font-bold text-foreground",children:B.score}),o.jsx("span",{className:"text-xs text-muted-foreground",children:B.unit})]}),B.desc&&o.jsx("span",{className:"text-[10px] text-muted-foreground mt-0.5",children:B.desc})]},B.label))})]})})})(),r.template!=="accessory"&&o.jsxs(o.Fragment,{children:[o.jsx(X.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},variants:lo,className:"relative overflow-hidden rounded-2xl mb-4 lg:mb-6 border border-border/40 bg-gradient-to-r from-background via-card to-background",children:o.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-0",children:[o.jsxs("div",{className:"flex-1 p-5 md:p-8 flex flex-col justify-center",children:[o.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-primary mb-3",children:"â»ï¸ Trade-In Program"}),o.jsx("h2",{className:"text-xl md:text-2xl font-display font-bold mb-2 text-foreground",children:e("product.tradeInTitle")}),o.jsx("p",{className:"text-muted-foreground text-sm mb-5 max-w-md",children:e("product.tradeInDesc")}),o.jsxs("a",{href:"https://wa.me/393479756823?text=Hi%2C%20I%27d%20like%20to%20trade%20in%20my%20used%20PC",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 w-fit rounded-lg bg-primary hover:bg-primary/90 text-primary-foreground font-semibold px-6 py-2.5 text-sm transition-colors",children:[e("product.tradeInButton"),o.jsx(ct,{className:"w-4 h-4"})]})]}),o.jsx("div",{className:"hidden md:flex items-center justify-center w-[280px] lg:w-[320px] shrink-0 p-4",children:o.jsx("img",{src:wq,alt:"Trade in your used PC",className:"w-full h-auto object-contain drop-shadow-2xl"})})]})}),r.description&&o.jsxs("div",{className:"mb-10 space-y-0",children:[o.jsxs(X.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},variants:Yd,className:"grid md:grid-cols-2 gap-0 items-stretch",children:[o.jsx(X.div,{variants:lg,className:"overflow-hidden",children:o.jsx("img",{src:jq,alt:"Premium Components",className:"w-full h-full object-cover"})}),o.jsxs(X.div,{variants:cg,className:"flex flex-col justify-center p-6 md:p-10 lg:p-12",children:[o.jsx("h2",{className:"text-2xl md:text-3xl font-display font-bold mb-4 text-foreground",children:e("features.premiumComponents","Premium Components")}),o.jsx("p",{className:"text-muted-foreground leading-relaxed text-sm md:text-base",children:e("features.premiumDesc")})]})]}
632),o.jsxs(X.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},variants:Yd,className:"grid md:grid-cols-2 gap-0 items-stretch",children:[o.jsxs(X.div,{variants:lg,className:"flex flex-col justify-center p-6 md:p-10 lg:p-12 order-2 md:order-1",children:[o.jsx("h2",{className:"text-2xl md:text-3xl font-display font-bold mb-4 text-foreground",children:e("features.expertBuilders","Expert PC Builders")}),o.jsx("p",{className:"text-muted-foreground leading-relaxed text-sm md:text-base",children:e("features.expertDesc")})]}),o.jsx(X.div,{variants:cg,className:"overflow-hidden order-1 md:order-2",children:o.jsx("img",{src:kq,alt:"Expert PC Builders",className:"w-full h-full object-cover"})})]})]}),o.jsxs(X.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},variants:lo,className:"flex flex-col md:flex-row items-center gap-4 md:gap-6 rounded-xl p-4 md:p-6 mb-6 lg:mb-10",style:{background:"linear-gradient(to right, hsl(var(--background)), hsl(var(--background))) padding-box, linear-gradient(to right, #b388ff, #64b5f6) border-box",border:"1px solid transparent"},children:[o.jsx("img",{src:Sq,alt:"CyberCharge",className:"h-7 md:h-[34px] object-contain flex-shrink-0"}),o.jsxs("div",{className:"md:border-l md:border-border/30 md:pl-6",children:[o.jsx("h3",{className:"text-sm md:text-base font-display font-bold text-primary mb-1",children:e("features.aiIntegration")}),o.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:e("features.aiDesc")})]})]})]})]}),o.jsx("div",{className:"lg:w-[36%] hidden lg:block",children:o.jsxs(X.div,{initial:"hidden",animate:"visible",variants:cg,className:"lg:sticky lg:top-24",children:[o.jsx("span",{className:"text-xs font-medium uppercase tracking-widest text-primary mb-3 block",children:r.category}),o.jsx("h1",{className:"text-lg lg:text-2xl font-display font-bold mb-4 leading-tight",children:r.name}),o.jsxs("div",{className:"bg-card/50 border border-border/30 rounded-xl p-4 mb-6",children:[o.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[o.jsx("img",{src:q2,alt:"PayPal",className:"h-5"}),o.jsx("img",{src:K2,alt:"Klarna",className:"h-4"})]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:[e("product.payIn3")," â¬",(r.price/3).toFixed(2)]}),o.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1",children:e("product.learnMorePayment")})]}),o.jsx("div",{className:"mb-8",children:r.sale_price?o.jsxs("div",{className:"flex flex-col items-start",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[o.jsxs("span",{className:"text-xl text-muted-foreground line-through",children:["â¬",r.price.toLocaleString("it-IT",{minimumFractionDigits:2})]}),o.jsxs("span",{className:"px-2 py-0.5 text-xs font-bold rounded bg-red-500 text-white leading-none",children:["-â¬",(r.price-r.sale_price).toLocaleString("it-IT",{minimumFractionDigits:2})]})]}),o.jsxs("div",{className:"text-4xl lg:text-5xl font-bold text-red-500",children:["â¬",r.sale_price.toLocaleString("it-IT",{minimumFractionDigits:2})]})]}):o.jsxs("div",{className:"text-4xl lg:text-5xl font-bold",children:["â¬",r.price.toLocaleString("it-IT",{minimumFractionDigits:2}),r.price_max&&o.jsxs("span",{className:"text-2xl text-muted-foreground ml-2",children:["- â¬",r.price_max.toLocaleString("it-IT",{minimumFractionDigits:2})]})]})}),o.jsx("div",{className:"space-y-3 mb-6",children:r.configurable?o.jsx("button",{onClick:()=>f(!0),className:"w-full py-4 px-6 rounded-xl text-base font-semibold flex items-center justify-center gap-2 bg-rgb-gradient animate-rgb text-background",children:e("product.configureAndAdd")}):o.jsxs("button",{onClick:F,disabled:g,className:"w-full py-4 px-6 rounded-xl text-base font-semibold flex items-center justify-center gap-2 bg-rgb-gradient animate-rgb text-background disabled:opacity-50",children:[g?o.jsx(st,{className:"w-5 h-5 animate-spin"}):o.jsx(us,{className:"w-5 h-5"}),e(g?"product.adding":"product.addToCart")]})}),o.jsx("div",{className:"flex gap-6 pt-4 border-t border-border/30 mb-6",children:o.jsxs("button",{className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[o.jsx(Is,{size:16}),e("product.addToWishlist")]})}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("button",{onClick:()=>A(!0),className:"w-full flex items-center gap-2.5 p-2.5 bg-card/30 border border-border/20 rounded-lg text-left hover:border-primary/30 transition-colors",children:[o.jsx("div",{className:"w-8 h-8 bg-primary/10 rounded-full flex items-center justify-center flex-shrink-0",children:o.jsx(on,{className:"w-4 h-4 text-primary"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h4",{className:"text-xs font-medium",children:e("products.fastShipping")}),o.jsx("p",{className:"text-[10px] text-muted-foreground",children:e("products.freeDelivery")})]}),o.jsx(ct,{size:14,className:"text-muted-foreground flex-shrink-0"})]}),o.jsxs("button",{onClick:()=>j(!0),className:"w-full flex items-center gap-2.5 p-2.5 bg-card/30 border border-border/20 rounded-lg text-left hover:border-primary/30 transition-colors",children:[o.jsx("div",{className:"w-8 h-8 bg-primary/10 rounded-full flex items-center justify-center flex-shrink-0",children:o.jsx(Mn,{className:"w-4 h-4 text-primary"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h4",{className:"text-xs font-medium",children:e("products.twoYearWarranty")}),o.jsx("p",{className:"text-[10px] text-muted-foreground",children:e("products.extendedProtection")})]}),o.jsx(ct,{size:14,className:"text-muted-foreground flex-shrink-0"})]}),o.jsxs("button",{onClick:()=>S(!0),className:"w-full flex items-center gap-2.5 p-2.5 bg-card/30 border border-border/20 rounded-lg text-left hover:border-primary/30 transition-colors",children:[o.jsx("div",{className:"w-8 h-8 bg-primary/10 rounded-full flex items-center justify-center flex-shrink-0",children:o.jsx(_i,{className:"w-4 h-4 text-primary"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h4",{className:"text-xs font-medium",children:e("products.securePayment")}),o.jsx("p",{className:"text-[10px] text-muted-foreground",children:e("products.sslEncrypted")})]}),o.jsx(ct,{size:14,className:"text-muted-foreground flex-shrink-0"})]})]})]})})]})}),i.length>
6320&&o.jsxs(X.section,{initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},variants:Yd,className:"container mx-auto px-4 py-8 md:py-12 border-t border-border/30",children:[o.jsx(X.h2,{variants:lo,className:"text-lg md:text-xl font-display font-bold mb-6 md:mb-8",children:e("product.relatedProducts")}),o.jsx(X.div,{variants:Yd,className:"grid grid-cols-2 md:grid-cols-5 gap-3 md:gap-4 lg:gap-6",children:i.map(M=>o.jsx(X.div,{variants:lo,children:o.jsx(Cq,{id:M.id,slug:M.slug||void 0,name:M.name,image:M.image||"",price:M.price,priceMax:M.price_max||void 0,salePrice:M.sale_price?Number(M.sale_price):null,badges:M.badges})},M.id))})]})]}),o.jsx(Pq,{images:C,initialIndex:l,isOpen:m,onClose:()=>v(!1),productName:r.name}),r.configurable&&o.jsx(Eq,{isOpen:h,onClose:()=>f(!1),productId:r.id,product:{name:r.name,image:r.image||"",price:r.price}}),b&&o.jsx(X.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm",onClick:()=>y(!1),children:o.jsxs(X.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},transition:{duration:.3,ease:[.25,.46,.45,.94]},className:"relative w-full max-w-5xl max-h-[90vh] overflow-y-auto bg-background border border-border/50 rounded-2xl shadow-2xl",onClick:M=>M.stopPropagation(),children:[o.jsx("button",{onClick:()=>y(!1),className:"absolute top-4 right-4 z-10 p-2 rounded-full bg-muted/50 hover:bg-muted transition-colors",children:o.jsx(kt,{size:20})}),o.jsx("div",{className:"p-4 md:p-6",children:o.jsx(Wq,{gpu:(U=r.specs)==null?void 0:U.gpu,productId:r.id})})]})}),o.jsx(Eu,{children:E&&r.template==="business"&&(()=>{const M=r.productivity_metrics||{};return o.jsx(X.div,{initial:{opacity:0}
632,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm",onClick:()=>_(!1),children:o.jsxs(X.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},transition:{duration:.3,ease:[.25,.46,.45,.94]},className:"relative w-full max-w-6xl max-h-[90vh] overflow-y-auto bg-background border border-border/50 rounded-2xl shadow-2xl",onClick:P=>P.stopPropagation(),children:[o.jsx("button",{onClick:()=>_(!1),className:"absolute top-4 right-4 z-10 p-2 rounded-full bg-muted/50 hover:bg-muted transition-colors",children:o.jsx(kt,{size:20})}),o.jsxs("div",{className:"p-5 md:p-8",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[o.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-blue-400 via-cyan-500 to-indigo-600 flex items-center justify-center",children:o.jsx(Wo,{className:"w-5 h-5 text-white"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl md:text-2xl font-display font-bold text-foreground",children:"Productivity Performance"}),o.jsxs("p",{className:"text-xs md:text-sm text-muted-foreground",children:["Per-software benchmark scores for ",r.name]})]})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-4 mt-6",children:Ch.map((P,z)=>{const B=M[P.id]||Ey(P.id),re=["from-blue-500/10 to-cyan-500/5 border-blue-500/30","from-purple-500/10 to-fuchsia-500/5 border-purple-500/30","from-amber-500/10 to-orange-500/5 border-amber-500/30","from-emerald-500/10 to-teal-500/5 border-emerald-500/30","from-pink-500/10 to-rose-500/5 border-pink-500/30","from-indigo-500/10 to-violet-500/5 border-indigo-500/30"];return o.jsxs(X.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.3,delay:z*.04},className:`bg-gradient-to-br ${re[z%re.length]} border rounded-xl p-4 flex flex-col`,children:[o.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm font-display font-bold text-foreground",children:P.label}),o.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:P.description})]}),o.jsxs("div",{className:"text-right shrink-0",children:[o.jsxs("div",{className:"flex items-baseline gap-0.5",children:[o.jsx("span",{className:"text-2xl font-display font-bold text-foreground leading-none",children:B.summaryScore}),o.jsx("span",{className:"text-xs text-muted-foreground",children:B.summaryUnit})]}),B.summaryDesc&&o.jsx("span",{className:"text-[10px] text-muted-foreground",children:B.summaryDesc})]})]}),B.software.length>0?o.jsx("div",{className:"space-y-2 mt-1",children:B.software.map(Q=>o.jsxs("div",{className:"flex items-center gap-2.5 p-2 bg-background/60 border border-border/40 rounded-lg",children:[o.jsx("div",{className:"w-8 h-8 shrink-0 rounded-md bg-card flex items-center justify-center overflow-hidden",children:Q.logo?o.jsx("img",{src:Q.logo,alt:Q.name,className:"w-6 h-6 object-contain",loading:"lazy"}):o.jsx("span",{className:"text-[10px] text-muted-foreground",children:"?"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"text-xs font-medium text-foreground truncate",children:Q.name}),Q.note&&o.jsx("div",{className:"text-[10px] text-muted-foreground truncate",children:Q.note}),o.jsx("div",{className:"mt-1 h-1.5 w-full bg-muted rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-gradient-to-r from-blue-500 to-cyan-400 rounded-full",style:{width:`${Math.min(100,Math.max(0,Q.score))}%`}})})]}),o.jsx("span",{className:"text-xs font-bold text-foreground tabular-nums shrink-0",children:Q.score})]},Q.id))}):o.jsx("p",{className:"text-xs text-muted-foreground/60 italic mt-2",children:"No software benchmarks configured."})]},P.id)})})]})]})})})()}),N&&o.jsx(X.div,{initial:{opacity:0}
632,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-end md:items-center justify-center bg-black/80 backdrop-blur-sm",onClick:()=>A(!1),children:o.jsxs(X.div,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{duration:.3,ease:[.25,.46,.45,.94]},className:"relative w-full max-w-lg bg-background border border-border/50 rounded-t-2xl md:rounded-2xl shadow-2xl",onClick:M=>M.stopPropagation(),children:[o.jsx("button",{onClick:()=>A(!1),className:"absolute top-4 right-4 z-10 p-2 rounded-full bg-muted/50 hover:bg-muted transition-colors",children:o.jsx(kt,{size:18})}),o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[o.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center",children:o.jsx(on,{className:"w-6 h-6 text-primary"})}),o.jsx("h3",{className:"text-lg font-display font-bold",children:e("products.shippingTitle")})]}),o.jsxs("div",{className:"space-y-3 text-sm text-muted-foreground",children:[o.jsx("p",{children:e("products.shippingDesc1")}),o.jsx("p",{children:e("products.shippingDesc2")})]}),o.jsx("p",{className:"text-sm font-medium text-foreground mt-4 mb-3",children:e("products.shippingCarriers")}),o.jsx("div",{className:"grid grid-cols-3 gap-2",children:["DHL","FedEx","UPS","GLS","BRT","Poste Italiane"].map(M=>o.jsx("div",{className:"flex items-center justify-center p-2.5 bg-card/30 border border-border/20 rounded-lg text-xs font-medium",children:M},M))}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-4 flex items-center gap-2",children:[o.jsx(on,{size:12,className:"text-primary"}),e("products.shippingTracking")]})]})]})}),x&&o.jsx(X.div,{initial:{opacity:0}
632,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-end md:items-center justify-center bg-black/80 backdrop-blur-sm",onClick:()=>j(!1),children:o.jsxs(X.div,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{duration:.3,ease:[.25,.46,.45,.94]},className:"relative w-full max-w-lg bg-background border border-border/50 rounded-t-2xl md:rounded-2xl shadow-2xl",onClick:M=>M.stopPropagation(),children:[o.jsx("button",{onClick:()=>j(!1),className:"absolute top-4 right-4 z-10 p-2 rounded-full bg-muted/50 hover:bg-muted transition-colors",children:o.jsx(kt,{size:18})}),o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[o.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center",children:o.jsx(Mn,{className:"w-6 h-6 text-primary"})}),o.jsx("h3",{className:"text-lg font-display font-bold",children:e("products.warrantyTitle")})]}),o.jsxs("div",{className:"space-y-3 text-sm text-muted-foreground",children:[o.jsx("p",{children:e("products.warrantyDesc1")}),o.jsx("p",{children:e("products.warrantyDesc2")}),o.jsx("p",{className:"text-primary font-medium",children:e("products.warrantyDesc3")})]})]})]})}),k&&o.jsx(X.div,{initial:{opacity:0}
632,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-end md:items-center justify-center bg-black/80 backdrop-blur-sm",onClick:()=>S(!1),children:o.jsxs(X.div,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{duration:.3,ease:[.25,.46,.45,.94]},className:"relative w-full max-w-lg bg-background border border-border/50 rounded-t-2xl md:rounded-2xl shadow-2xl",onClick:M=>M.stopPropagation(),children:[o.jsx("button",{onClick:()=>S(!1),className:"absolute top-4 right-4 z-10 p-2 rounded-full bg-muted/50 hover:bg-muted transition-colors",children:o.jsx(kt,{size:18})}),o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[o.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center",children:o.jsx(_i,{className:"w-6 h-6 text-primary"})}),o.jsx("h3",{className:"text-lg font-display font-bold",children:e("products.paymentTitle")})]}),o.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:e("products.paymentDesc")}),o.jsxs("ul",{className:"space-y-3 text-sm",children:[o.jsxs("li",{className:"flex items-center gap-3 p-3 bg-card/30 border border-border/20 rounded-lg",children:[o.jsx(ct,{size:14,className:"text-primary flex-shrink-0"}),o.jsx("span",{children:e("products.paymentVisa")})]}),o.jsxs("li",{className:"flex items-center gap-3 p-3 bg-card/30 border border-border/20 rounded-lg",children:[o.jsx(ct,{size:14,className:"text-primary flex-shrink-0"}),o.jsx("span",{children:e("products.paymentPaypal")})]}),o.jsxs("li",{className:"flex items-center gap-3 p-3 bg-card/30 border border-border/20 rounded-lg",children:[o.jsx(ct,{size:14,className:"text-primary flex-shrink-0"}),o.jsx("span",{children:e("products.paymentKlarna")})]}),o.jsxs("li",{className:"flex items-center gap-3 p-3 bg-card/30 border border-border/20 rounded-lg",children:[o.jsx(ct,{size:14,className:"text-primary flex-shrink-0"}),o.jsx("span",{children:e("products.paymentBankTransfer")})]})]}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-4 flex items-center gap-2",children:[o.jsx(_i,{size:12,className:"text-primary"}),e("products.paymentEncrypted")]})]})]})})]})}const Zq={gpu:Hi,cpu:Hi,motherboard:oD,ram:Zv,ssd:Gv};function Xq({id:e,name:t,image:r,description:n,priceFrom:s,priceMonthly:i,specs:a}){return o.jsxs("div",{className:"bg-card border border-border rounded-lg overflow-hidden hover:border-primary/50 transition-all duration-300 group",children:[o.jsx("div",{className:"relative aspect-square bg-gradient-to-b from-secondary/50 to-card overflow-hidden",children:o.jsx("img",{src:r,alt:t,className:"w-full h-full object-contain p-6 group-hover:scale-105 transition-transform duration-500"})}),o.jsxs("div",{className:"p-6 text-center",children:[o.jsx("h3",{className:"text-xl font-display font-semibold mb-2",children:t}),o.jsx("p",{className:"text-sm text-muted-foreground mb-4 line-clamp-2",children:n}),o.jsxs("div",{className:"mb-4",children:[o.jsxs("p",{className:"text-lg font-bold",children:["a partire da ",s.toLocaleString("it-IT"),"â¬"]}),i&&o.jsxs("p",{className:"text-sm text-muted-foreground",children:["o da ",i,"⬠al mese"]})]}),o.jsx(Z,{to:`/product/${e}`,className:"btn-coral inline-block w-full text-center mb-6",children:"Scopri di più"}),o.jsx("div",{className:"space-y-2",children:a.map((l,c)=>{const u=Zq[l.icon];return o.jsxs("div",{className:"spec-badge",children:[o.jsx(u,{size:16,className:"text-muted-foreground flex-shrink-0"}),o.jsxs("div",{className:"flex-1 text-left",children:[o.jsxs("span",{className:"text-xs text-muted-foreground block",children:[l.label,":"]}),o.jsx("span",{className:"text-sm",children:l.value})]})]},c)})})]})]})}function Yq(){return Vt({queryKey:["collection-pages"],queryFn:async()=>{const{data:e,error:t}=await Y.from("collection_pages").select("*").order("created_at",{ascending:!1});if(t)throw t;return e}})}function Jq(e){return Vt({queryKey:["collection-page",e],queryFn:async()=>{const{data:t,error:r}=await Y.from("collection_pages").select("*").eq("slug",e).single();if(r){if(r.code==="PGRST116")return null;throw r}return t},enabled:!!e})}function eK(){const e=Ot();return Ft({mutationFn:async t=>{const{data:r,error:n}=await Y.from("collection_pages").insert(t).select().single();if(n)throw n;return r},onSuccess:()=>
632{e.invalidateQueries({queryKey:["collection-pages"]})}})}function tK(){const e=Ot();return Ft({mutationFn:async({id:t,...r})=>{const{data:n,error:s}=await Y.from("collection_pages").update(r).eq("id",t).select().single();if(s)throw s;return n},onSuccess:()=>{e.invalidateQueries({queryKey:["collection-pages"]})}})}function rK(){const e=Ot();return Ft({mutationFn:async t=>{const{error:r}=await Y.from("collection_pages").delete().eq("id",t);if(r)throw r},onSuccess:()=>{e.invalidateQueries({queryKey:["collection-pages"]})}})}function bc({className:e,...t}){return o.jsx("div",{className:Ie("animate-pulse rounded-md bg-muted",e),...t})}function nK(){var s,i;const{slug:e}=y_(),{data:t,isLoading:r,error:n}=Jq(e||"");return r?o.jsx(Je,{children:o.jsxs("div",{className:"container mx-auto px-4 py-16",children:[o.jsx(bc,{className:"h-64 w-full mb-8"}),o.jsx(bc,{className:"h-12 w-1/2 mx-auto mb-16"}),o.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[o.jsx(bc,{className:"h-96"}),o.jsx(bc,{className:"h-96"}),o.jsx(bc,{className:"h-96"})]})]})}):n||!t?o.jsx(Je,{children:o.jsxs("div",{className:"container mx-auto px-4 py-16 text-center",children:[o.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Collezione non trovata"}),o.jsx("p",{className:"text-muted-foreground",children:"La collezione richiesta non esiste o non è disponibile."})]})}):o.jsxs(Je,{children:[o.jsx($t,{title:t.title,description:t.description||`Explore the ${t.title} collection at OVERCLOCK. Premium gaming PCs and notebooks.`,keywords:`${t.title}, gaming PC, gaming laptop, OVERCLOCK collection`,image:t.hero_image||void 0}),o.jsxs("section",{className:"relative overflow-hidden bg-[#111111]",children:[(t.hero_image||t.mobile_hero_image)&&o.jsxs("div",{className:"absolute inset-0 hidden md:block",children:[o.jsx("img",{src:t.hero_image||t.mobile_hero_image||"",alt:t.title,className:"w-full h-full object-cover"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-black/90 via-black/70 to-black/40"})]}),o.jsx("div",{className:"container mx-auto px-4 relative z-10 pt-5 pb-2 md:pt-14 md:pb-28",children:o.jsxs("div",{className:"max-w-2xl",children:[o.jsx("h1",{className:"text-2xl md:text-4xl font-display font-bold mb-3 md:mb-4 leading-tight",children:t.title}),t.description&&o.jsx("p",{className:"text-muted-foreground max-w-lg text-sm md:text-base mb-2 md:mb-0",children:t.description})]})}),(t.mobile_hero_image||t.hero_image)&&o.jsx("div",{className:"md:hidden relative z-10",children:o.jsx("img",{src:t.mobile_hero_image||t.hero_image||"",alt:t.title,className:"w-full h-auto object-cover"})}),o.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-white z-20"})]}),t.section_title&&o.jsx("section",{className:"py-16",children:o.jsx("div",{className:"container mx-auto px-4",children:o.jsx("h2",{className:"text-3xl md:text-4xl font-display font-bold text-center",children:t.section_title})})}),t.products&&t.products.length>0&&o.jsx("section",{className:"pb-16",children:o.jsx("div",{className:"container mx-auto px-4",children:o.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:t.products.map(a=>o.jsx(Xq,{...a},a.id))})})}),(t.features_title||((s=t.features_list)==null?void 0:s.length)>0)&&o.jsx("section",{className:"py-16 bg-card",children:o.jsx("div",{className:"container mx-auto px-4",children:o.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center",children:[t.features_image&&o.jsx("div",{children:o.jsx("img",{src:t.features_image,alt:t.features_title||"Features",className:"w-full max-w-lg mx-auto"})}),o.jsxs("div",{children:[t.features_title&&o.jsx("h2",{className:"text-3xl font-display font-bold mb-6",children:t.features_title}),t.features_description&&o.jsx("p",{className:"text-muted-foreground mb-6",children:t.features_description}),t.features_list&&t.features_list.length>0&&o.jsx("ul",{className:"space-y-3",children:t.features_list.map((a,l)=>o.jsxs("li",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"text-primary mt-1",children:"-"}),o.jsx("span",{className:"text-foreground/80",children:a})]},l))})]})]})})}),(t.processor_title||((i=t.processor_content)==null?void 0:i.length)>0)&&o.jsx("section",{className:"py-16",children:o.jsx("div",{className:"container mx-auto px-4",children:o.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center",children:[o.jsxs("div",{children:[t.processor_title&&o.jsx("h2",{className:"text-3xl font-display font-bold mb-6",children:t.processor_title}),t.processor_content&&t.processor_content.map((a,l)=>o.jsx("p",{className:"text-muted-foreground mb-4",children:a},l))]}),t.processor_image&&o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-glow/20 to-transparent roun
632ded-2xl"}),o.jsx("img",{src:t.processor_image,alt:t.processor_title||"Processor",className:"w-full rounded-2xl"})]})]})})})]})}const Fe=p.forwardRef(({className:e,type:t,...r},n)=>o.jsx("input",{type:t,className:Ie("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}));Fe.displayName="Input";var Tm="Checkbox",[sK,DX]=hs(Tm),[iK,mb]=sK(Tm);function oK(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:i,form:a,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=e,[f,m]=Ho({prop:r,defaultProp:s??!1,onChange:c,caller:Tm}),[v,g]=p.useState(null),[w,b]=p.useState(null),y=p.useRef(!1),x=v?!!a||!!v.closest("form"):!0,j={checked:f,disabled:i,setChecked:m,control:v,setControl:g,name:l,form:a,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:$i(s)?!1:s,isFormControl:x,bubbleInput:w,setBubbleInput:b};return o.jsx(iK,{scope:t,...j,children:aK(h)?h(j):n})}var PT="CheckboxTrigger",TT=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:i,value:a,disabled:l,checked:c,required:u,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:f,isFormControl:m,bubbleInput:v}=mb(PT,e),g=_e(s,d),w=p.useRef(c);return p.useEffect(()=>{const b=i==null?void 0:i.form;if(b){const y=()=>h(w.current);return b.addEventListener("reset",y),()=>b.removeEventListener("reset",y)}},[i,h]),o.jsx(ye.button,{type:"button",role:"checkbox","aria-checked":$i(c)?"mixed":c,"aria-required":u,"data-state":LT(c),"data-disabled":l?"":void 0,disabled:l,value:a,...n,ref:g,onKeyDown:he(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:he(r,b=>{h(y=>$i(y)?!0:!y),v&&m&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})})});TT.displayName=PT;var pb=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:a,disabled:l,value:c,onCheckedChange:u,form:d,...h}=e;return o.jsx(oK,{__scopeCheckbox:r,checked:s,defaultChecked:i,disabled:l,required:a,onCheckedChange:u,name:n,form:d,value:c,internal_do_not_use_render:({isFormControl:f})=>o.jsxs(o.Fragment,{children:[o.jsx(TT,{...h,ref:t,__scopeCheckbox:r}),f&&o.jsx(DT,{__scopeCheckbox:r})]})})});pb.displayName=Tm;var RT="CheckboxIndicator",OT=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,i=mb(RT,r);return o.jsx(Vn,{present:n||$i(i.checked)||i.checked===!0,children:o.jsx(ye.span,{"data-state":LT(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});OT.displayName=RT;var IT="CheckboxBubbleInput",DT=p.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:a,required:l,disabled:c,name:u,value:d,form:h,bubbleInput:f,setBubbleInput:m}=mb(IT,e),v=_e(r,m),g=Em(i),w=lm(n);p.useEffect(()=>{const y=f;if(!y)return;const x=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(x,"checked").set,S=!s.current;if(g!==i&&k){const N=new Event("click",{bubbles:S});y.indeterminate=$i(i),k.call(y,$i(i)?!1:i),y.dispatchEvent(N)}},[f,g,i,s]);const b=p.useRef($i(i)?!1:i);return o.jsx(ye.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??b.current,required:l,disabled:c,name:u,value:d,form:h,...t,tabIndex:-1,ref:v,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});DT.displayName=IT;function aK(e){return typeof e=="function"}function $i(e){return e==="indeterminate"}function LT(e){return $i(e)?"indeterminate":e?"checked":"unchecked"}const MT=p.forwardRef(({className:e,...t},r)=>o.jsx(pb,{ref:r,className:Ie("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-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),...t,children:o.jsx(OT,{className:Ie("flex items-center justify-center text-current"),children:o.jsx(Vs,{className:"h-4 w-4"})})}));MT.displayName=pb.displayName;let Z2=!1,ug=!1;const Jd=[];function lK(){return Z2?Promise.resolve():new Promise(e=>{if(ug){Jd.push(e);return}ug=!0,Jd.push(e),window.onTurnstileLoaded=()=>{Z2=!0,ug=!1,Jd.forEach(r=>r()),Jd.length=0};const t=document.createElement("script");t.src="https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onTurnstileLoaded&render=explicit",t.async=!0,t.defer=!0,document.head.appendChild(t)})}let dg=null;async function cK(){if(dg)return dg;const{data:e,error:t}=await Y.functions.invoke("verify-captcha",{method:"GET"});if(t||!(e!=null&&e.site_key))throw new Error("Failed to load CAPTCHA configuration");return dg=e.site_key,e.site_key}function zT(){const[e,t]=p.useState(null),[r,n]=p.useState(!1),[s,i]=p.useState(!1),a=p.useRef(null),l=p.useRef(null),c=p.useRef(null);p.useEffect(()=>{let f=!1;async function m(){try{const[v]=await Promise.all([cK(),lK()]);f||(c.current=v,n(!0))}catch(v){console.error("Failed to initialize Turnstile:",v)}}return m(),()=>{f=!0}},[]);const u=p.useCallback(f=>{if(l.current=f,!(!r||!window.turnstile||!c.current)){if(a.current){try{window.turnstile.remove(a.current)}catch{}a.current=null}a.current=window.turnstile.render(f,{sitekey:c.current,callback:m=>t(m),"expired-callback":()=>t(null),"error-callback":()=>t(null),theme:"dark",size:"flexible",appearance:"always"})}},[r]),d=p.useCallback(()=>
632{if(t(null),a.current&&window.turnstile)try{window.turnstile.reset(a.current)}catch{}},[]),h=p.useCallback(async f=>{const m=f||e;if(!m)return!1;i(!0);try{const{data:v,error:g}=await Y.functions.invoke("verify-captcha",{body:{token:m}});return g||!(v!=null&&v.success)?(d(),!1):!0}catch{return d(),!1}finally{i(!1)}},[e,d]);return p.useEffect(()=>()=>{if(a.current&&window.turnstile)try{window.turnstile.remove(a.current)}catch{}},[]),{token:e,isReady:r,isVerifying:s,renderWidget:u,reset:d,verify:h}}function Py({isReady:e,renderWidget:t,className:r=""}){const n=p.useRef(null),s=p.useRef(!1);return p.useEffect(()=>{e&&n.current&&!s.current&&(s.current=!0,t(n.current))},[e,t]),e?o.jsx("div",{ref:n,className:r}):o.jsxs("div",{className:`flex items-center justify-center py-3 ${r}`,children:[o.jsx(st,{className:"h-4 w-4 animate-spin text-muted-foreground mr-2"}),o.jsx("span",{className:"text-xs text-muted-foreground",children:"Loading CAPTCHA..."})]})}var uK="authorization_response",dK="/~oauth/initiate",hK=["https://oauth.lovable.app","https://lovable.dev"],fK="lovable://oauth-callback",mK="http://127.0.0.1/iframe-oauth/callback",pK=500,gK=12e4;function xK(e){let t;const r=new Promise(i=>{t=i}),n=i=>{if(!e.some(c=>i.origin===c))return;const l=i.data;!l||typeof l!="object"||l.type===uK&&t(l.response)},s=()=>{window.removeEventListener("message",n)};return window.addEventListener("message",n),{cleanup:s,messagePromise:r}}function yK(e){const t=window.screenX!==0||window.screenY!==0||!e,r=t?window.outerWidth*.5:window.screen.width*.5,n=t?window.outerHeight*.5:window.screen.height*.5,s=t?window.screenX+(window.outerWidth-r)/2:(window.screen.width-r)/2,i=t?window.screenY+(window.outerHeight-n)/2:(window.screen.height-n)/2;return{width:r,height:n,left:s,top:i}}function X2(e,t){return e.state!==t?{error:new Error("State is invalid")}:e.error?e.error==="legacy_flow"?{error:new Error("This flow is not supported in Preview mode. Please open the app in a new tab to sign in.")}:{error:new Error(e.error_description??"Sign in failed")}:!e.access_token||!e.refresh_token?{error:new Error("No tokens received")}:{tokens:{access_token:e.access_token,refresh_token:e.refresh_token},error:null}}function vK(){const e=navigator.userAgent;return!!(/iPhone|iPad|iPod|Android/i.test(e)||/Macintosh/i.test(e)&&navigator.maxTouchPoints>1)}function bK(){return typeof crypto<"u"&&crypto.getRandomValues?[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,"0")).join(""):Math.random().toString(36).substring(2)+Date.now().toString(36)}function wK(e={}){const t=e.oauthBrokerUrl??dK,r=e.supportedOAuthOrigins??hK;async function n(s,i={}){let a=!1;try{a=window.self!==window.top}catch{a=!0}const l=navigator.userAgent,c=/LovableApp\//.test(l),u=!c&&/lovable/i.test(l),d=bK();let h=i.redirect_uri??window.location.origin;c&&a?h=fK:u&&a&&(h=mK);const f=new URLSearchParams({...i.extraParams,provider:s,redirect_uri:h,state:d});if(!a)return window.location.href=`${t}?${f.toString()}`,{error:null,redirected:!0};!c&&!u&&f.set("response_mode","web_message");const m=`${t}?${f.toString()}`,v=u?[...r,window.location.origin]:r,{messagePromise:g,cleanup:w}=xK(v);let b;if(vK())b=window.open(m,"_blank");else{const{width:j,height:k,left:S,top:N}=yK(a);b=window.open(m,"oauth",`width=${j},height=${k},left=${S},top=${N}`)}if(!b&&(c||u)){let j;const k=new Promise((S,N)=>{j=setTimeout(()=>{N(new Error("OAuth timed out waiting for response"))},gK)});try{const S=await Promise.race([g,k]);return X2(S,d)}catch(S){return{error:S instanceof Error?S:new Error(String(S))}}finally{j&&clearTimeout(j),w()}}if(!b)return w(),{error:new Error("Popup was blocked")};let y;const x=new Promise((j,k)=>{y=setInterval(()=>{b.closed&&(clearInterval(y),k(new Error("Sign in was cancelled")))},pK)});try{const j=await Promise.race([g,x]);return X2(j,d)}catch(j){return{error:j instanceof Error?j:new Error(String(j))}}finally{clearInterval(y),w(),b==null||b.close()}}return{signInWithOAuth:n}}var jK={name:"@lovable.dev/cloud-auth-js",version:"1.1.1",description:"Lovable Cloud Auth JS",main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist"],scripts:{build:"tsup src/index.ts --format cjs,esm --dts --outDir dist",dev:"tsup src/index.ts --format cjs,esm --dts --watch",test:"vitest run",typecheck:"tsgo --noEmit",prepublishOnly:"npm run clean && npm run build",clean:"rimraf dist"},keywords:["lovable","oauth","authentication"],license:"MIT",devDependencies:{"@types/node":"^22",jsdom:"^26",rimraf:"^5.0.0",tsup:"^7.2.0",typescript:"^5",vitest:"^4.1.0"}};typeof window<"u"&&(window.__lovable_cloud_auth_js_version=jK.version);function kK(e={}){return wK(e)}const SK=kK({}),AK={auth:{signInWithOAuth:async(e,t)=>{const r=await SK.signInWithOAuth(e,{redirect_uri:t==null?void 0:t.redirect_uri,extraParams:{...t==null?void 0:t.extraParams}});if(r.redirected||r.error)return r;try{await Y.auth.setSession(r.tokens)}catch(n){return{error:n instanceof Error?n:new Error(String(n))}}return r}}},NK=e=>{const t={length:e.length>=8,lowercase:/[a-z]/.test(e),uppercase:/[A-Z]/.test(e),number:/[0-9]/.test(e),symbol:/[!@#$%^&*(),.?":{}|<>_\-+=\[\]\\;'/`~]/.test(e)}
632,r=Object.values(t).filter(Boolean).length,n=(t.lowercase||t.uppercase)&&t.number&&t.symbol;return{checks:t,passed:r,meetsMinimum:n,score:r}},CK=()=>{const{t:e}=Rt(),[t,r]=p.useState("login"),[n,s]=p.useState(""),[i,a]=p.useState(""),[l,c]=p.useState(""),[u,d]=p.useState(!1),[h,f]=p.useState(!1),{user:m,signIn:v,signUp:g}=Zs(),w=Un(),[b]=mm(),y=b.get("redirect")||"/",{token:x,isReady:j,isVerifying:k,renderWidget:S,reset:N,verify:A}=zT(),{mergeGuestCart:E}=Xs(),_=p.useMemo(()=>NK(i),[i]),F=60,[C,L]=p.useState(0),I=P=>`pwreset_cooldown_${P.trim().toLowerCase()}`;p.useEffect(()=>{if(t!=="forgot"||!n){L(0);return}const P=parseInt(localStorage.getItem(I(n))||"0",10),z=Math.max(0,Math.ceil((P-Date.now())/1e3));L(z)},[n,t]),p.useEffect(()=>{if(C<=0)return;const P=setInterval(()=>{L(z=>z<=1?0:z-1)},1e3);return()=>clearInterval(P)},[C]);const O=P=>P<=1?{label:e("auth.veryWeak"),color:"bg-red-500"}:P===2?{label:e("auth.weak"),color:"bg-orange-500"}:P===3?{label:e("auth.fair"),color:"bg-yellow-500"}:P===4?{label:e("auth.good"),color:"bg-lime-500"}:{label:e("auth.strong"),color:"bg-green-500"},U=p.useMemo(()=>O(_.score),[_.score,e]);p.useEffect(()=>{m&&w(y)},[m,w,y]);const M=async P=>{P.preventDefault(),f(!0);try{if(t==="forgot"){const B=I(n),re=parseInt(localStorage.getItem(B)||"0",10),Q=Math.max(0,Math.ceil((re-Date.now())/1e3));if(Q>0){Le({title:e("auth.resetCooldownTitle")||"Please wait",description:(e("auth.resetCooldownDesc")||"You can request another reset link in {{seconds}}s.").replace("{{seconds}}",String(Q)),variant:"destructive"}),L(Q),f(!1);return}const{error:fe}=await Y.functions.invoke("send-password-reset",{body:{email:n,redirectTo:`${window.location.origin}/reset-password`}});if(fe)Le({title:fe.message,variant:"destructive"});else{const pe=Date.now()+F*1e3;localStorage.setItem(B,String(pe)),L(F),Le({title:e("auth.resetEmailSent"),description:e("auth.resetEmailSentDesc")}),r("login")}f(!1);return}if(!await A()){Le({title:e("auth.captchaFailed")||"CAPTCHA verification failed",description:e("auth.pleaseTryAgain")||"Please complete the CAPTCHA and try again.",variant:"destructive"});return}if(t==="login"){const{error:B}=await v(n,i);B?B.message.includes("Invalid login credentials")?Le({title:e("auth.invalidCredentials"),variant:"destructive"}):Le({title:B.message,variant:"destructive"}):(await E(),Le({title:e("auth.welcomeBack")+"!"}),w(y))}else{if(!_.meetsMinimum){Le({title:e("auth.passwordTooWeak"),description:e("auth.passwordRequirements"),variant:"destructive"});return}if(!l.trim()){Le({title:e("auth.nameRequired"),description:e("auth.enterFullName"),variant:"destructive"});return}const{error:B}=await g(n,i,l.trim(),u);B?B.message.includes("already registered")?Le({title:e("auth.emailAlreadyRegistered"),variant:"destructive"}):Le({title:B.message,variant:"destructive"}):(Le({title:e("auth.accountCreated")}),Y.functions.invoke("send-welcome-email",{body:{name:l.trim()}}).catch(re=>{console.error("Failed to send welcome email:",re)}),w(y))}}finally{f(!1),N()}};return o.jsxs(o.Fragment,{children:[o.jsxs(Yu,{children:[o.jsxs("title",{children:[t==="login"?"Login":t==="signup"?"Sign Up":"Forgot Password"," | OVERCLOCK"]}),o.jsx("meta",{name:"description",content:t==="login"?"Login to your OVERCLOCK account to access your orders, wishlist, and exclusive deals.":"Create an OVERCLOCK account to shop premium gaming PCs and notebooks."}),o.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),o.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center relative overflow-hidden px-4 py-8",children:[o.jsx("div",{className:"hidden md:flex absolute top-8 left-8 w-16 h-16 border border-muted-foreground/20 rounded-lg items-center justify-center",children:o.jsx("div",{className:"w-2 h-2 bg-muted-foreground/40 rounded-full"})}),o.jsx("div",{className:"hidden md:flex absolute top-8 right-8 w-16 h-16 border border-muted-foreground/20 rounded-lg items-center justify-center",children:o.jsx("div",{className:"w-2 h-2 bg-muted-foreground/40 rounded-full"})}),o.jsx("div",{className:"hidden md:flex absolute bottom-8 left-8 w-16 h-16 border border-muted-foreground
632/20 rounded-lg items-center justify-center",children:o.jsx("div",{className:"w-2 h-2 bg-muted-foreground/40 rounded-full"})}),o.jsx("div",{className:"hidden md:flex absolute bottom-8 right-8 w-16 h-16 border border-muted-foreground/20 rounded-lg items-center justify-center",children:o.jsx("div",{className:"w-2 h-2 bg-muted-foreground/40 rounded-full"})}),o.jsx("div",{className:"hidden md:block absolute top-16 left-24 w-[calc(50%-8rem)] h-px bg-gradient-to-r from-muted-foreground/20 to-transparent"}),o.jsx("div",{className:"hidden md:block absolute top-16 right-24 w-[calc(50%-8rem)] h-px bg-gradient-to-l from-muted-foreground/20 to-transparent"}),o.jsx("div",{className:"hidden md:block absolute bottom-16 left-24 w-[calc(50%-8rem)] h-px bg-gradient-to-r from-muted-foreground/20 to-transparent"}),o.jsx("div",{className:"hidden md:block absolute bottom-16 right-24 w-[calc(50%-8rem)] h-px bg-gradient-to-l from-muted-foreground/20 to-transparent"}),o.jsxs("div",{className:"w-full max-w-sm bg-card/50 backdrop-blur-sm border border-border rounded-2xl p-4 sm:p-6",children:[o.jsx("div",{className:"flex justify-center mb-4",children:o.jsx("img",{src:Fi,alt:"Overclock",className:"h-10 sm:h-12 w-auto"})}),o.jsx("h1",{className:"text-lg sm:text-xl font-bold text-center text-foreground mb-1",children:e(t==="login"?"auth.welcomeBack":t==="signup"?"auth.createAccount":"auth.forgotPassword")}),o.jsx("p",{className:"text-center text-muted-foreground text-xs mb-5",children:t==="forgot"?e("auth.forgotPasswordDesc"):o.jsxs(o.Fragment,{children:[t==="login"?e("auth.dontHaveAccount")+" ":e("auth.alreadyHaveAccount")+" ",o.jsx("button",{onClick:()=>r(t==="login"?"signup":"login"),className:"text-foreground hover:underline font-medium",children:e(t==="login"?"common.signUp":"auth.login")})]})}),o.jsxs("form",{onSubmit:M,className:"space-y-3",children:[t==="signup"&&o.jsxs("div",{className:"relative",children:[o.jsx(sm,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(Fe,{type:"text",placeholder:e("auth.fullName"),value:l,onChange:P=>c(P.target.value),className:"pl-9 bg-muted/50 border-border h-10 text-sm",required:!0,minLength:2,maxLength:100})]}),o.jsxs("div",{className:"relative",children:[o.jsx(Qv,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(Fe,{type:"email",placeholder:e("auth.emailAddress"),value:n,onChange:P=>s(P.target.value),className:"pl-9 bg-muted/50 border-border h-10 text-sm",required:!0})]}),t!=="forgot"&&o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"relative",children:[o.jsx(_i,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(Fe,{type:"password",placeholder:e("auth.password"),value:i,onChange:P=>a(P.target.value),className:"pl-9 bg-muted/50 border-border h-10 text-sm",required:!0,minLength:8})]}),t==="signup"&&i.length>0&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(P=>o.jsx("div",{className:`h-1.5 flex-1 rounded-full transition-all duration-300 ${P<=_.score?U.color:"bg-muted"}`},P))}),o.jsx("div",{className:"flex items-center justify-between text-xs",children:o.jsx("span",{className:`font-medium ${_.meetsMinimum?"text-green-500":"text-muted-foreground"}`,children:U.label})}),o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[o.jsxs("div",{className:`flex items-center gap-1.5 ${_.checks.length?"text-green-500":"text-muted-foreground"}`,children:[o.jsx("span",{className:"w-1 h-1 rounded-full bg-current"}),e("auth.characters")]}),o.jsxs("div",{className:`flex items-center gap-1.5 ${_.checks.lowercase||_.checks.uppercase?"text-green-500":"text-muted-foreground"}`,children:[o.jsx("span",{className:"w-1 h-1 rounded-full bg-current"}),e("auth.letter")]}),o.jsxs("div",{className:`flex items-center gap-1.5 ${_.checks.number?"text-green-500":"text-muted-foreground"}`,children:[o.jsx("span",{className:"w-1 h-1 rounded-full bg-current"}),e("auth.number")]}),o.jsxs("div",{className:`flex items-center gap-1.5 ${_.checks.symbol?"text-green-500":"text-muted-foreground"}`,children:[o.jsx("span",{className:"w-1 h-1 rounded-full bg-current"}),e("auth.symbol")]})]})]}),t==="login"&&o.jsx("div",{className:"text-right",children:o.jsx("button",{type:"button",onClick:()=>r("forgot"),className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:e("auth.forgotPassword")})})]}),t==="signup"&&o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx(MT,{id:"newsletter",checked:u,onCheckedChange:P=>d(P===!0),className:"mt-0.5"}),o.jsx("label",{htmlFor:"newsletter",className:"text-sm text-muted-foreground leading-tight cursor-pointer",children:e("auth.newsletterConsent")})]}),t!=="forgot"&&o.jsx(Py,{isReady:j,renderWidget:S}),o.jsx("button",{type:"submit",disabled:h||t!=="forgot"&&(k||!x)||t==="signup"&&!_.meetsMinimum||t==="forgot"&&C>0,className:"w-full h-10 rounded-lg font-semibold text-sm text-black bg-rgb-gradient animate-rgb transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:h||k?e("common.loading"):t==="forgot"?C>0?`${e("auth.resendIn")||"Resend in"} ${C}
632s`:e("auth.sendResetLink"):x?e(t==="login"?"auth.login":"auth.signUp"):e("auth.completeCaptcha")||"Sign in or register"}),t==="forgot"&&o.jsxs("button",{type:"button",onClick:()=>r("login"),className:"w-full text-sm text-muted-foreground hover:text-foreground transition-colors",children:["â ",e("auth.backToLogin")]})]}),t!=="forgot"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-4 my-4",children:[o.jsx("div",{className:"flex-1 h-px bg-border"}),o.jsx("span",{className:"text-muted-foreground text-xs",children:e("common.or")}),o.jsx("div",{className:"flex-1 h-px bg-border"})]}),o.jsx("div",{className:"space-y-3",children:o.jsxs(ue,{variant:"outline",className:"w-full h-10 bg-muted/50 border-border hover:bg-muted gap-2 text-sm",onClick:async()=>{const{error:P}=await AK.auth.signInWithOAuth("google",{redirect_uri:window.location.origin});P&&Le({title:P.message,variant:"destructive"})},children:[o.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[o.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"}),o.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"}),o.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"}),o.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"})]}),e("auth.continueWithGoogle")||"Continue with Google"]})})]}),o.jsx("div",{className:"mt-5 text-center",children:o.jsxs(Z,{to:"/",className:"text-muted-foreground text-sm hover:text-foreground transition-colors",children:["â ",e("common.backToHome")]})})]})]})]})},_K=e=>{const t={length:e.length>=8,lowercase:/[a-z]/.test(e),uppercase:/[A-Z]/.test(e),number:/[0-9]/.test(e),symbol:/[!@#$%^&*(),.?":{}|<>_\-+=\[\]\\;'/`~]/.test(e)},r=Object.values(t).filter(Boolean).length,n=(t.lowercase||t.uppercase)&&t.number&&t.symbol;return{checks:t,passed:r,meetsMinimum:n,score:r}},EK=()=>{const{t:e}=Rt(),t=Un(),[r,n]=p.useState(""),[s,i]=p.useState(""),[a,l]=p.useState(!1),c=p.useMemo(()=>_K(r),[r]),u=f=>f<=1?{label:e("auth.veryWeak"),color:"bg-red-500"}:f===2?{label:e("auth.weak"),color:"bg-orange-500"}:f===3?{label:e("auth.fair"),color:"bg-yellow-500"}:f===4?{label:e("auth.good"),color:"bg-lime-500"}:{label:e("auth.strong"),color:"bg-green-500"},d=p.useMemo(()=>u(c.score),[c.score,e]),h=async f=>{if(f.preventDefault(),!c.meetsMinimum){Le({title:e("auth.passwordTooWeak"),description:e("auth.passwordRequirements"),variant:"destructive"});return}if(r!==s){Le({title:e("auth.passwordsMismatch"),variant:"destructive"});return}l(!0);try{const{error:m}=await Y.auth.updateUser({password:r});m?Le({title:m.message,variant:"destructive"}):(Le({title:e("auth.passwordUpdated")}),t("/"))}finally{l(!1)}};return o.jsxs(o.Fragment,{children:[o.jsxs(Yu,{children:[o.jsxs("title",{children:[e("auth.resetPassword")," | OVERCLOCK"]}),o.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),o.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center relative overflow-hidden",children:[o.jsx("div",{className:"absolute top-8 left-8 w-16 h-16 border border-muted-foreground/20 rounded-lg flex items-center justify-center",children:o.jsx("div",{className:"w-2 h-2 bg-muted-foreground/40 rounded-full"})}),o.jsx("div",{className:"absolute top-8 right-8 w-16 h-16 border border-muted-foreground/20 rounded-lg flex items-center justify-center",children:o.jsx("div",{className:"w-2 h-2 bg-muted-foreground/40 rounded-full"})}),o.jsx("div",{className:"absolute bottom-8 left-8 w-16 h-16 border border-muted-foreground/20 rounded-lg flex items-center justify-center",children:o.jsx("div",{className:"w-2 h-2 bg-muted-foreground/40 rounded-full"})}),o.jsx("div",{className:"absolute bottom-8 right-8 w-16 h-16 border border-muted-foreground
632/20 rounded-lg flex items-center justify-center",children:o.jsx("div",{className:"w-2 h-2 bg-muted-foreground/40 rounded-full"})}),o.jsx("div",{className:"absolute top-16 left-24 w-[calc(50%-8rem)] h-px bg-gradient-to-r from-muted-foreground/20 to-transparent"}),o.jsx("div",{className:"absolute top-16 right-24 w-[calc(50%-8rem)] h-px bg-gradient-to-l from-muted-foreground/20 to-transparent"}),o.jsx("div",{className:"absolute bottom-16 left-24 w-[calc(50%-8rem)] h-px bg-gradient-to-r from-muted-foreground/20 to-transparent"}),o.jsx("div",{className:"absolute bottom-16 right-24 w-[calc(50%-8rem)] h-px bg-gradient-to-l from-muted-foreground/20 to-transparent"}),o.jsxs("div",{className:"w-full max-w-md mx-4 bg-card/50 backdrop-blur-sm border border-border rounded-2xl p-8",children:[o.jsx("div",{className:"flex justify-center mb-6",children:o.jsx("img",{src:Fi,alt:"Overclock",className:"h-14 w-auto"})}),o.jsx("h1",{className:"text-2xl font-bold text-center text-foreground mb-2",children:e("auth.setNewPassword")}),o.jsx("p",{className:"text-center text-muted-foreground text-sm mb-8",children:e("auth.setNewPasswordDesc")}),o.jsxs("form",{onSubmit:h,className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"relative",children:[o.jsx(_i,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground"}),o.jsx(Fe,{type:"password",placeholder:e("auth.newPassword"),value:r,onChange:f=>n(f.target.value),className:"pl-10 bg-muted/50 border-border h-12",required:!0,minLength:8})]}),r.length>0&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(f=>o.jsx("div",{className:`h-1.5 flex-1 rounded-full transition-all duration-300 ${f<=c.score?d.color:"bg-muted"}`},f))}),o.jsx("div",{className:"flex items-center justify-between text-xs",children:o.jsx("span",{className:`font-medium ${c.meetsMinimum?"text-green-500":"text-muted-foreground"}`,children:d.label})}),o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[o.jsxs("div",{className:`flex items-center gap-1.5 ${c.checks.length?"text-green-500":"text-muted-foreground"}`,children:[o.jsx("span",{className:"w-1 h-1 rounded-full bg-current"}),e("auth.characters")]}),o.jsxs("div",{className:`flex items-center gap-1.5 ${c.checks.lowercase||c.checks.uppercase?"text-green-500":"text-muted-foreground"}`,children:[o.jsx("span",{className:"w-1 h-1 rounded-full bg-current"}),e("auth.letter")]}),o.jsxs("div",{className:`flex items-center gap-1.5 ${c.checks.number?"text-green-500":"text-muted-foreground"}`,children:[o.jsx("span",{className:"w-1 h-1 rounded-full bg-current"}),e("auth.number")]}),o.jsxs("div",{className:`flex items-center gap-1.5 ${c.checks.symbol?"text-green-500":"text-muted-foreground"}`,children:[o.jsx("span",{className:"w-1 h-1 rounded-full bg-current"}),e("auth.symbol")]})]})]})]}),o.jsxs("div",{className:"relative",children:[o.jsx(_i,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground"}),o.jsx(Fe,{type:"password",placeholder:e("auth.confirmPassword"),value:s,onChange:f=>i(f.target.value),className:"pl-10 bg-muted/50 border-border h-12",required:!0,minLength:8})]}),o.jsx("button",{type:"submit",disabled:a||!c.meetsMinimum,className:"w-full h-12 rounded-lg font-semibold text-black bg-rgb-gradient animate-rgb transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:e(a?"common.loading":"auth.updatePassword")})]}),o.jsx("div",{className:"mt-8 text-center",children:o.jsxs(Z,{to:"/",className:"text-muted-foreground text-sm hover:text-foreground transition-colors",children:["â ",e("common.backToHome")]})})]})]})]})};function FT(){const{user:e}=Zs(),t=Ot(),{data:r=[],isLoading:n}=Vt({queryKey:["wishlist",e==null?void 0:e.id],queryFn:async()=>{if(!e)return[];const{data:c,error:u}=await Y.from("wishlist_items").select(` 633 id, 634 product_id, 635 created_at, 636 products ( 637 id, 638 name, 639 price, 640 image, 641 category 642 ) 643 `).eq("user_id",e.id).order("created_at",{ascending:!1});if(u)throw u;return c.map(d=>({...d,product:d.products}))},enabled:!!e}),s=Ft({mutationFn:async c=>
643{if(!e)throw new Error("Must be logged in");const{data:u,error:d}=await Y.from("wishlist_items").insert({user_id:e.id,product_id:c}).select().single();if(d)throw d;return u},onSuccess:()=>{t.invalidateQueries({queryKey:["wishlist",e==null?void 0:e.id]}),Le({title:"Added to wishlist"})},onError:()=>{Le({title:"Failed to add to wishlist",variant:"destructive"})}}),i=Ft({mutationFn:async c=>{if(!e)throw new Error("Must be logged in");const{error:u}=await Y.from("wishlist_items").delete().eq("user_id",e.id).eq("product_id",c);if(u)throw u},onSuccess:()=>{t.invalidateQueries({queryKey:["wishlist",e==null?void 0:e.id]}),Le({title:"Removed from wishlist"})}});return{wishlistItems:r,isLoading:n,addToWishlist:s,removeFromWishlist:i,toggleWishlist:async c=>{r.some(d=>d.product_id===c)?await i.mutateAsync(c):await s.mutateAsync(c)},isInWishlist:c=>r.some(u=>u.product_id===c),wishlistCount:r.length}}const gb={pro_gamer:{price_id:"price_1SviG1GGorK912QBXekeXbrP",product_id:"prod_TtVGXCqjm16Ak4",name:"Pro Gamer"},business_starter:{price_id:"price_1SviGGGGorK912QBHpCdIK4I",product_id:"prod_TtVGqkhjZ7V42f",name:"Business Starter"},business:{price_id:"price_1SviHlGGorK912QBsJcnHpXn",product_id:"prod_TtVIHdjHuHwZG9",name:"Business"},business_full:{price_id:"price_1SviI0GGorK912QBHZ3COFnY",product_id:"prod_TtVIlkSQDf43sL",name:"Business Full"}};function $T(){const{user:e}=Zs(),[t,r]=p.useState({subscribed:!1,plan:null,subscriptionEnd:null,isLoading:!1}),n=p.useCallback(async()=>{if(!e){r({subscribed:!1,plan:null,subscriptionEnd:null,isLoading:!1});return}r(a=>({...a,isLoading:!0}));try{const{data:a,error:l}=await Y.functions.invoke("check-service-subscription");if(l)throw l;r({subscribed:a.subscribed,plan:a.plan,subscriptionEnd:a.subscription_end,isLoading:!1})}catch(a){console.error("Error checking subscription:",a),r(l=>({...l,isLoading:!1}))}},[e]);return p.useEffect(()=>{n()},[n]),{...t,checkSubscription:n,subscribe:async a=>{if(!e)throw new Error("User must be logged in to subscribe");const l=gb[a],{data:c,error:u}=await Y.functions.invoke("create-service-subscription",{body:{price_id:l.price_id}});if(u)throw u;c.url&&window.open(c.url,"_blank")},openPortal:async()=>{const{data:a,error:l}=await Y.functions.invoke("service-customer-portal");if(l)throw l;a.url&&window.open(a.url,"_blank")}}}function PK(){var L,I;const{t:e}=Rt(),t=Un(),{user:r,loading:n,signOut:s}=Zs(),{wishlistItems:i,isLoading:a,removeFromWishlist:l}=FT(),{addToCart:c}=Xs(),{subscribed:u,plan:d,subscriptionEnd:h,isLoading:f,openPortal:m}=$T(),[v,g]=p.useState("orders"),[w,b]=p.useState(!1),y=[{id:"orders",label:e("account.orders"),icon:tl},{id:"addresses",label:e("account.addresses"),icon:bu},{id:"wishlist",label:e("account.wishlist"),icon:Is},{id:"service",label:"Service+",icon:Mn},{id:"settings",label:e("account.settings"),icon:Ko}];p.useEffect(()=>{!n&&!r&&t("/auth")},[n,r,t]);const{data:x=[],isLoading:j}=Vt({queryKey:["orders",r==null?void 0:r.id],queryFn:async()=>{if(!r)return[];const{data:O,error:U}=await Y.from("orders").select("id, status, total, items, shipping_address, created_at").eq("user_id",r.id).order("created_at",{ascending:!1});if(U)throw U;return(O||[]).map(M=>({id:M.id,status:M.status,total:M.total,items:M.items||[],shipping_address:M.shipping_address,created_at:M.created_at,tracking_number:M.tracking_number??null,tracking_url:M.tracking_url??null,carrier:M.carrier??null,shipped_at:M.shipped_at??null}))},enabled:!!r}),{data:k=[],isLoading:S,refetch:N}=Vt({queryKey:["addresses",r==null?void 0:r.id],queryFn:async()=>{if(!r)return[];const{data:O,error:U}=await Y.from("shipping_addresses").select("*").eq("user_id",r.id).order("is_default",{ascending:!1});if(U)throw U;return O},enabled:!!r}),A=async()=>{await s(),t("/")},E=async O=>{const{error:U}=await Y.from("shipping_addresses").delete().eq("id",O);U?Le({title:e("account.failedDeleteAddress"),variant:"destructive"}):(Le({title:e("account.addressDeleted")}),N())},_=async O=>{await Y.from("shipping_addresses").update({is_default:!1}).eq("user_id",r==null?void 0:r.id);const{error:U}=await Y.from("shipping_addresses").update({is_default:!0}).eq("id",O);U?Le({title:e("account.failedSetDefault"),variant:"destructive"}):(Le({title:e("account.defaultUpdated")}),N())},F=O=>{switch(O){case"paid":return"text-green-500 bg-green-500/10";
643case"pending":return"text-yellow-500 bg-yellow-500/10";case"shipping":return"text-blue-500 bg-blue-500/10";case"delivered":return"text-green-500 bg-green-500/10";default:return"text-muted-foreground bg-muted"}},C=O=>{switch(O){case"paid":return Vs;case"delivered":return Vs;case"shipping":return on;case"pending":return El;default:return El}};return n?o.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:o.jsx(st,{className:"h-8 w-8 animate-spin text-primary"})}):r?o.jsxs(o.Fragment,{children:[o.jsxs(Yu,{children:[o.jsx("title",{children:"My Account | OVERCLOCK"}),o.jsx("meta",{name:"description",content:"Manage your OVERCLOCK account, view orders, addresses and wishlist."}),o.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),o.jsxs("div",{className:"min-h-screen bg-background flex",children:[w&&o.jsx("div",{className:"fixed inset-0 bg-black/60 z-40 lg:hidden",onClick:()=>b(!1)}),o.jsxs("aside",{className:`w-64 bg-card border-r border-border flex flex-col fixed left-0 top-0 h-screen z-50 transition-transform duration-300 lg:translate-x-0 ${w?"translate-x-0":"-translate-x-full"}`,children:[o.jsxs("div",{className:"p-5 border-b border-border flex items-center justify-between",children:[o.jsx(Z,{to:"/",className:"flex-shrink-0",children:o.jsx("img",{src:Fi,alt:"OVERCLOCK",className:"h-14 w-auto"})}),o.jsx("button",{onClick:()=>b(!1),className:"lg:hidden p-2 hover:bg-muted rounded-lg transition-colors",children:o.jsx(kt,{size:20})})]}),o.jsx("div",{className:"p-3",children:o.jsxs("div",{className:"flex items-center gap-3 p-3 bg-muted/50 rounded-xl",children:[o.jsx("div",{className:"w-10 h-10 rounded-full bg-muted border border-border flex items-center justify-center",children:o.jsx(sm,{size:20,className:"text-foreground"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("h3",{className:"font-semibold text-foreground text-sm truncate",children:(L=r.email)==null?void 0:L.split("@")[0]}),o.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r.email})]})]})}),o.jsx("nav",{className:"flex-1 px-3 py-2 space-y-0.5 overflow-y-auto",children:y.map(O=>{const U=O.icon;return o.jsxs("button",{onClick:()=>{g(O.id),b(!1)},className:`w-full flex items-center justify-between px-3 py-2.5 rounded-lg transition-all ${v===O.id?"bg-rgb-gradient animate-rgb text-background font-semibold":"hover:bg-muted text-foreground"}`,children:[o.jsxs("div",{className:"flex items-center gap-2.5",children:[o.jsx(U,{size:16}),o.jsx("span",{className:"text-[13px] font-medium",children:O.label})]}),o.jsx(ct,{size:14,className:v===O.id?"opacity-100":"opacity-0"})]},O.id)})}),o.jsxs("div",{className:"p-3 border-t border-border space-y-1",children:[o.jsxs(Z,{to:"/",className:"flex items-center gap-2.5 px-3 py-2.5 text-muted-foreground hover:text-foreground hover:bg-muted rounded-lg transition-all",children:[o.jsx(rm,{size:16}),o.jsx("span",{className:"text-[13px] font-medium",children:e("common.backToShop")})]}),o.jsxs("button",{onClick:A,className:"w-full flex items-center gap-2.5 px-3 py-2.5 text-muted-foreground hover:text-foreground hover:bg-muted rounded-lg transition-all",children:[o.jsx(Sx,{size:16}),o.jsx("span",{className:"text-[13px] font-medium",children:e("common.signOut")})]})]})]}),o.jsxs("main",{className:"flex-1 lg:ml-64",children:[o.jsx("header",{className:"lg:hidden sticky top-0 z-30 bg-background border-b border-border",children:o.jsxs("div",{className:"flex items-center justify-between px-4 h-16",children:[o.jsx("button",{onClick:()=>b(!0),className:"p-2 hover:bg-muted rounded-lg transition-colors",children:o.jsx(Xv,{size:24})}),o.jsx(Z,{to:"/",className:"flex-shrink-0",children:o.jsx("img",{src:Fi,alt:"OVERCLOCK",className:"h-8 w-auto"})}),o.jsx("div",{className:"w-10"})]})}),o.jsxs("div",{className:"p-4 md:p-8",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h1",{className:"text-3xl font-display font-bold text-foreground",children:e("account.myAccount")}),o.jsx("p",{className:"text-muted-foreground mt-1",children:e("account.manageAccount")})]}),o.jsxs("div",{children:[v==="orders"&&o.jsxs("div",{className:"space-y-4",children:[o.jsx("h2",{className:"text-xl font-semibold mb-6",children:e("account.orderHistory")}),j?o.jsx("div",{className:"flex justify-center py-12",children:o.jsx(st,{className:"h-8 w-8 animate-spin text-primary"})}):x.length===0?o.jsxs("div",{className:"text-center py-12 bg-card rounded-2xl border border-border",children:[o.jsx(tl,{className:"mx-auto h-12 w-12 text-muted-foreground
643/50 mb-4"}),o.jsx("h3",{className:"font-medium text-lg mb-2",children:e("account.noOrders")}),o.jsx("p",{className:"text-muted-foreground mb-4",children:e("account.startShopping")}),o.jsx(Z,{to:"/products",children:o.jsx(ue,{children:e("common.browseProducts")})})]}):x.map(O=>{const U=C(O.status),M=O.items;return o.jsxs("div",{className:"bg-card rounded-2xl border border-border p-4 sm:p-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-4",children:[o.jsxs("div",{children:[o.jsxs("span",{className:"text-sm text-muted-foreground",children:[e("account.order")," #",O.id.slice(0,8)]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:new Date(O.created_at).toLocaleDateString("it-IT",{year:"numeric",month:"long",day:"numeric"})})]}),o.jsxs("div",{className:`flex items-center gap-2 px-3 py-1.5 rounded-full text-xs font-medium ${F(O.status)}`,children:[o.jsx(U,{size:14}),o.jsx("span",{className:"capitalize",children:O.status})]})]}),o.jsx("div",{className:"space-y-3",children:M.map((P,z)=>o.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[o.jsx("div",{className:"w-12 h-12 sm:w-16 sm:h-16 bg-muted rounded-lg flex items-center justify-center flex-shrink-0",children:o.jsx(tl,{size:24,className:"text-muted-foreground"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h4",{className:"font-medium text-foreground text-sm sm:text-base line-clamp-2",children:P.product_name||"Product"}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:[e("checkout.qty"),": ",P.quantity]})]}),o.jsxs("span",{className:"font-semibold",children:["â¬",(P.price||0).toLocaleString("it-IT",{minimumFractionDigits:2})]})]},z))}),O.shipping_address&&o.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:e("account.shippingTo")}),o.jsx("p",{className:"text-sm",children:O.shipping_address.full_name}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:[O.shipping_address.address_line1,", ",O.shipping_address.postal_code," ",O.shipping_address.city]})]}),(O.tracking_number||O.tracking_url)&&o.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:o.jsxs("div",{className:"flex items-start gap-3 p-3 sm:p-4 rounded-xl bg-primary/5 border border-primary/20",children:[o.jsx("div",{className:"w-9 h-9 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:o.jsx(on,{className:"w-4 h-4 text-primary"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[o.jsxs("p",{className:"text-xs text-muted-foreground",children:[e("account.trackShipment")||"Track your shipment",O.carrier?` · ${O.carrier}`:""]}),o.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full bg-emerald-500/10 text-emerald-500",children:["â ",e("account.trackingSent")||"Tracking sent"]})]}),O.tracking_number&&o.jsx("p",{className:"text-sm font-mono break-all",children:O.tracking_number}),O.tracking_url&&o.jsxs("a",{href:O.tracking_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-primary hover:underline mt-1",children:[e("account.openTracking")||"Open tracking",o.jsx(ct,{className:"w-3.5 h-3.5"})]})]})]})}),o.jsxs("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[o.jsx("span",{className:"text-sm text-muted-foreground",children:e("cart.total")}),o.jsxs("span",{className:"text-lg font-bold",children:["â¬",O.total.toLocaleString("it-IT",{minimumFractionDigits:2})]})]})]},O.id)})]}),v==="addresses"&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsx("h2",{className:"text-xl font-semibold",children:e("account.shippingAddresses")}),o.jsx(Z,{to:"/checkout",children:o.jsxs(ue,{size:"sm",children:[o.jsx(Yt,{size:16,className:"mr-2"}),e("account.addAddress")]})})]}),S?o.jsx("div",{className:"flex justify-center py-12",children:o.jsx(st,{className:"h-8 w-8 animate-spin text-primary"})}):k.length===0?o.jsxs("div",{className:"text-center py-12 bg-card rounded-2xl border border-border",children:[o.jsx(bu,{className:"mx-auto h-12 w-12 text-muted-foreground
643/50 mb-4"}),o.jsx("h3",{className:"font-medium text-lg mb-2",children:e("account.noAddresses")}),o.jsx("p",{className:"text-muted-foreground mb-4",children:e("account.addDuringCheckout")})]}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:k.map(O=>o.jsxs("div",{className:`bg-card rounded-2xl border p-6 ${O.is_default?"border-primary":"border-border"}`,children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"font-semibold text-foreground",children:O.full_name}),O.is_default&&o.jsx("span",{className:"text-xs bg-primary/10 text-primary px-2 py-0.5 rounded-full",children:e("common.default")})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[!O.is_default&&o.jsx("button",{onClick:()=>_(O.id),className:"p-2 hover:bg-muted rounded-lg transition-colors text-xs text-muted-foreground hover:text-foreground",children:e("common.setDefault")}),o.jsx("button",{onClick:()=>E(O.id),className:"p-2 hover:bg-muted rounded-lg transition-colors",children:o.jsx(or,{size:14,className:"text-muted-foreground"})})]})]}),o.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[o.jsx("p",{children:O.address_line1}),O.address_line2&&o.jsx("p",{children:O.address_line2}),o.jsxs("p",{children:[O.postal_code," ",O.city,", ",O.province]}),o.jsx("p",{children:O.country}),O.phone&&o.jsxs("p",{className:"mt-2",children:["Tel: ",O.phone]})]})]},O.id))})]}),v==="wishlist"&&o.jsxs("div",{className:"space-y-4",children:[o.jsx("h2",{className:"text-xl font-semibold mb-6",children:e("account.myWishlist")}),a?o.jsx("div",{className:"flex justify-center py-12",children:o.jsx(st,{className:"h-8 w-8 animate-spin text-primary"})}):i.length===0?o.jsxs("div",{className:"text-center py-12 bg-card rounded-2xl border border-border",children:[o.jsx(Is,{className:"mx-auto h-12 w-12 text-muted-foreground/50 mb-4"}),o.jsx("h3",{className:"font-medium text-lg mb-2",children:e("account.wishlistEmpty")}),o.jsx("p",{className:"text-muted-foreground mb-4",children:e("account.saveForLater")}),o.jsx(Z,{to:"/products",children:o.jsx(ue,{children:e("common.browseProducts")})})]}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:i.map(O=>{var U,M,P,z;return o.jsxs("div",{className:"bg-card rounded-2xl border border-border overflow-hidden group",children:[o.jsxs(Z,{to:`/product/${O.product_id}`,className:"aspect-square bg-black block relative",children:[o.jsx("img",{src:((U=O.product)==null?void 0:U.image)||"/placeholder.svg",alt:(M=O.product)==null?void 0:M.name,className:"w-full h-full object-contain p-4"}),o.jsx("button",{onClick:B=>{B.preventDefault(),l.mutate(O.product_id)},className:"absolute top-3 right-3 p-2 bg-background/80 backdrop-blur-sm rounded-full hover:bg-background transition-colors",children:o.jsx(Is,{size:16,className:"text-primary fill-primary"})})]}),o.jsxs("div",{className:"p-4",children:[o.jsx(Z,{to:`/product/${O.product_id}`,children:o.jsx("h3",{className:"font-medium text-foreground mb-1 hover:text-primary transition-colors line-clamp-2",children:(P=O.product)==null?void 0:P.name})}),o.jsxs("p",{className:"text-lg font-bold",children:["â¬",(((z=O.product)==null?void 0:z.price)||0).toLocaleString("it-IT",{minimumFractionDigits:2})]}),o.jsxs("button",{onClick:()=>c.mutate({productId:O.product_id,product:O.product?{id:O.product.id,name:O.product.name,price:O.product.price,image:O.product.image}:void 0}),className:"w-full mt-3 py-2.5 bg-primary text-primary-foreground rounded-lg text-sm font-medium hover:bg-primary/90 transition-colors flex items-center justify-center gap-2",children:[o.jsx(us,{size:16}),e("product.addToCart")]})]})]},O.id)})})]}),v==="service"&&o.jsxs("div",{className:"space-y-6",children:[o.jsx("h2",{className:"text-xl font-semibold mb-6",children:"Service+"}),f?o.jsx("div",{className:"flex justify-center py-12",children:o.jsx(st,{className:"h-8 w-8 animate-spin text-primary"})}):u&&d?o.jsx("div",{className:"bg-card rounded-2xl border border-primary p-4 sm:p-6",children:o.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-4",children:[o.jsx("div",{className:"w-12 h-12 bg-primary/20 rounded-full flex items-center justify-center flex-shrink-0",children:o.jsx(Mn,{className:"w-6 h-6 text-primary"})}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[o.jsxs("h3",{className:"font-semibold text-lg",children:["Service+ ",((I=gb[d])==null?void 0:I.name)||d]}),o.jsx("span",{className:"text-xs bg-primary/10 text-primary px-2 py-0.5 rounded-full",children:"Attivo"})]}),o.jsx("p",{className:"text-muted-foreground text-sm mb-4",children:"Assistenza tecnica professionale con supporto prioritario"}),h&&o.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Prossimo rinnovo: ",new Date(h).toLocaleDateString("it-IT",{year:"numeric",month:"long",day:"numeric"})]}),o.jsxs("div",{className:"flex flex-wrap gap-3",children:[o.jsx(ue,{onClick:m,variant:"outline",className:"border-primary text-primary hover:bg-primary/10",children:"Gestisci Abbonamento"}),o.jsx(Z,{to:"/service-plus",children:o.jsx(ue,{variant:"ghost",children:"Vedi Tutti i Piani"})})]})]})]})}):o.jsxs("div",{className:"text-center py-12 bg-card rounded-2xl border border-border",children:[o.jsx(Mn,{className:"mx-auto h-12 w-12 text-muted-foreground
643/50 mb-4"}),o.jsx("h3",{className:"font-medium text-lg mb-2",children:"Nessun abbonamento Service+"}),o.jsx("p",{className:"text-muted-foreground mb-4 max-w-md mx-auto",children:"Sottoscrivi Service+ per ricevere assistenza tecnica professionale, supporto prioritario e molto altro."}),o.jsx(Z,{to:"/service-plus",children:o.jsx(ue,{children:"Scopri Service+"})})]})]}),v==="settings"&&o.jsxs("div",{className:"space-y-6",children:[o.jsx("h2",{className:"text-xl font-semibold mb-6",children:e("account.accountSettings")}),o.jsxs("div",{className:"bg-card rounded-2xl border border-border p-6",children:[o.jsx("h3",{className:"font-semibold mb-4",children:e("account.profileInfo")}),o.jsx("div",{className:"space-y-4",children:o.jsxs("div",{children:[o.jsx("label",{className:"text-sm text-muted-foreground block mb-2",children:e("account.email")}),o.jsx("input",{type:"email",value:r.email||"",disabled:!0,className:"w-full px-4 py-3 bg-muted/50 border border-border rounded-xl text-foreground opacity-60"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:e("account.emailCantChange")})]})})]}),o.jsxs("div",{className:"bg-card rounded-2xl border border-destructive/30 p-6",children:[o.jsx("h3",{className:"font-semibold text-destructive mb-2",children:e("account.dangerZone")}),o.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:e("account.signOutDesc")}),o.jsx("button",{onClick:A,className:"px-6 py-2.5 bg-destructive text-destructive-foreground rounded-lg text-sm font-medium hover:bg-destructive/90 transition-colors",children:e("common.signOut")})]})]})]})]}),o.jsx("nav",{className:"lg:hidden fixed bottom-0 left-0 right-0 bg-card/95 backdrop-blur-md border-t border-border/50 z-30",children:o.jsx("div",{className:"flex items-center justify-around px-2 py-1.5 pb-[env(safe-area-inset-bottom,6px)]",children:y.map(O=>{const U=O.icon,M=v===O.id;return o.jsxs("button",{onClick:()=>g(O.id),className:`flex flex-col items-center gap-0.5 py-1 px-3 rounded-lg transition-all ${M?"text-primary":"text-muted-foreground"}`,children:[o.jsx(U,{size:18,strokeWidth:M?2.5:1.5}),o.jsx("span",{className:`text-[9px] leading-tight ${M?"font-semibold text-primary":"font-medium"}`,children:O.label.length>8?O.label.split(" ")[0]:O.label}),M&&o.jsx("div",{className:"w-4 h-0.5 bg-primary rounded-full mt-0.5"})]},O.id)})})}),o.jsx("div",{className:"lg:hidden h-20"})]})]})]}):null}const hg="/assets/notebook-1-D4T2HmW4.jpg",fg="/assets/notebook-2-eIGwTK8E.jpg",TK="/assets/notebook-3-PRePEHK2.jpg",RK="/assets/gaming-pc-CiX_gCo_.jpg",Y2="/assets/workstation-pc-D3E-oFRO.jpg",OK=[{id:"cyberbook-v360s",name:"OVERCLOCK Cyberbook V360S - Intel Core i7 16 Core Processor 14650HX, RTX-5070, QHD+ 165Hz, 16.0 inch, Windows 11 Pro",category:"notebook",image:hg,price:1489,description:"Treat yourself to the luxury of smooth browsing, effortless multitasking and an immersive gaming experience thanks to our dedicated care in selecting high-quality components.",specs:{cpu:"Intel Core i7 14650HX 16 Core",gpu:"NVIDIA RTX 5070",ram:"32GB DDR5 5600MHz",storage:"1TB SSD NVMe",display:'16.0" QHD+ 165Hz',battery:"80Wh"},badges:[{label:"Intel",color:"#0071C5"},{label:"RTX",color:"#76B900"}],featured:!0,inPack:[{name:"Backpack",quantity:1,image:"/placeholder.svg"},{name:"Power Cable",quantity:1,image:"/placeholder.svg"},{name:"CyberCharge AI Pro",quantity:1,image:"/placeholder.svg"},{name:"3 Years Warranty",quantity:1,image:"/placeholder.svg"}]},{id:"airbook-14",name:'OVERCLOCK Airbook 14 - Intel Core i5 13110U 6 Core, 14" FHD+ LED 1920x1200, Intel Iris XE Graphics, Windows 11 Pro',category:"notebook",image:TK,price:620,description:"Perfect for everyday productivity with power-efficient performance.",specs:{cpu:"Intel Core i5 13110U",gpu:"Intel Iris XE",ram:"16GB DDR5",storage:"512GB SSD",display:'14" FHD+ 1920x1200'},badges:[{label:"Intel Core",color:"#0071C5"},{label:"Intel ARC",color:"#00C7FD"}]},{id:"airfusion-max",name:'OVERCLOCK AirFusion Max â AMD Ryzen AI 7 350 8 Core, 5.0GHz Turbo, 50 AI TOPS, AMD Radeon Graphics 860M, 14" QHD+ 120HZ LED sRGB 100%',category:"notebook",image:fg,price:999,description:"AI-powered productivity with stunning visuals.",specs:{cpu:"AMD Ryzen AI 7 350",gpu:"AMD Radeon 860M",ram:"32GB DDR5",storage:"1TB SSD",display:'14" QHD+ 120Hz'},badges:[{label:"AMD Ryzen AI",color:"#ED1C24"},{label:"AMD Radeon",color:"#ED1C24"}]},{id:"cyberbook-x5",name:'OVERCLOCK Cyberbook X5 â Intel Core i7 13620H, 16" FHD+ 165HZ sRGB 100%, RTX 6060 8gb GDDR7, 84Wh Lithium Ion Battery, WIFI 6E, RGB Keyboard',category:"notebook",image:hg,price:1129,description:"High-performance gaming laptop with cutting-edge graphics.",specs:{cpu:"Intel Core i7 13620H",gpu:"NVIDIA RTX 6060 8GB",ram:"16GB DDR5",storage:"1TB SSD",display:'16" FHD+ 165Hz'},badges:[{label:"Intel Core",color:"#0071C5"},{label:"RTX",color:"#76B900"}]},{id:"cyberbook-air-x5",name:'OVERCLOCK Cyberbook Air X5 - Intel Core i5 13500HX, 16" Matte F
643HD+ 165HZ, RTX 6060 8gb GDDR7, 80Wh Battery, WIFI 6E, RGB Keyboard',category:"notebook",image:fg,price:1199,description:"Thin and light gaming powerhouse.",specs:{cpu:"Intel Core i5 13500HX",gpu:"NVIDIA RTX 6060 8GB",ram:"16GB DDR5",storage:"512GB SSD",display:'16" FHD+ 165Hz'},badges:[{label:"Intel Core",color:"#0071C5"},{label:"RTX",color:"#76B900"}]},{id:"cyberbook-x6",name:'OVERCLOCK Cyberbook X6 - Intel Core i9 14900HX, 16" QHD+ 300HZ, Nvidia RTX 5070 Ti 12GB GDDR7, Pro Battery 80Wh, WIFI 6E, Windows 11 Pro',category:"notebook",image:hg,price:1979,priceMax:2239,description:"Ultimate gaming laptop for professionals.",specs:{cpu:"Intel Core i9 14900HX",gpu:"NVIDIA RTX 5070 Ti 12GB",ram:"32GB DDR5",storage:"2TB SSD",display:'16" QHD+ 300Hz'},badges:[{label:"Intel Core",color:"#0071C5"},{label:"RTX",color:"#76B900"}],featured:!0},{id:"cyberbook-ultra-x7",name:'OVERCLOCK Cyberbook Ultra X7 - AMD Ryzen 9 9955HX3D, 16" QHD+ 300HZ sRGB 100%, RTX 5070 Ti 12gb GDDR7, 99Wh Lithium Ion Battery, WIFI 6E, RGB Keyboard',category:"notebook",image:fg,price:2199,priceMax:2459,description:"The ultimate desktop replacement gaming laptop.",specs:{cpu:"AMD Ryzen 9 9955HX3D",gpu:"NVIDIA RTX 5070 Ti 12GB",ram:"64GB DDR5",storage:"2TB SSD",display:'16" QHD+ 300Hz'},badges:[{label:"AMD Ryzen",color:"#ED1C24"},{label:"RTX",color:"#76B900"}],featured:!0},{id:"studio-pro",name:"Studio Pro",category:"desktop",image:Y2,price:849,description:"Optimal performance for basic creative activities. A reliable start for working with 3D modeling.",specs:{gpu:"NVIDIA RTX 5080",cpu:"Intel Core i5 14400F",ram:"32GB DDR4 4000MHz",storage:"1TB SSD M.2 PCIe 4.0"}},{id:"studio-pro-x",name:"Studio Pro X",category:"desktop",image:RK,price:1299,description:"Optimal performance for high-level creative activities. Designed for PRO 3D modeling and rendering.",specs:{gpu:"NVIDIA RTX 5070",cpu:"Intel Core Ultra 9 245k",ram:"32GB DDR5 6200MHz",storage:"1TB SSD M.2 PCIe 4.0"},featured:!0},{id:"studio-mini",name:"Studio Mini",category:"desktop",image:Y2,price:1399,description:"Optimal performance for creative activities in Mini format. Designed for PRO 3D modeling and rendering.",specs:{gpu:"NVIDIA RTX 5080",cpu:"AMD Ryzen 9 7945HX",ram:"32GB DDR5 5200MHz",storage:"1TB SSD M.2 PCIe 4.0"}}];function IK({value:e,onChange:t}){const[r,n]=p.useState(null),s=(u,d)=>{const h=e[u]||Ey(u);t({...e,[u]:{...h,...d}})},i=(u,d)=>{s(u,{software:d})},a=(u,d)=>{var m;if(!d)return;const h=Q2(u).find(v=>v.id===d);if(!h)return;const f=((m=e[u])==null?void 0:m.software)||[];f.find(v=>v.id===h.id)||i(u,[...f,{id:h.id,name:h.name,logo:h.logo,score:80,note:""}])},l=u=>{var h;const d=((h=e[u])==null?void 0:h.software)||[];i(u,[...d,{id:crypto.randomUUID(),name:"",logo:"",score:75,note:""}])},c=(u,d)=>{var f;const h=((f=e[u])==null?void 0:f.software)||[];i(u,h.filter((m,v)=>v!==d))};return o.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[o.jsxs("div",{className:"px-3 py-2 bg-muted/50 border-b border-border",children:[o.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Productivity Benchmarks"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Shown on the Business template product page. Click a category to configure its summary score and software entries."})]}),o.jsx("div",{className:"divide-y divide-border",children:Ch.map(u=>{const d=e[u.id]||Ey(u.id),h=r===u.id,f=Q2(u.id).filter(m=>!d.software.find(v=>v.id===m.id));return o.jsxs("div",{children:[o.jsxs("button",{type:"button",onClick:()=>n(h?null:u.id),className:"w-full flex items-center justify-between px-3 py-2.5 hover:bg-muted/30 transition-colors",children:[o.jsxs("div",{className:"text-left",children:[o.jsx("div",{className:"text-sm font-medium text-foreground",children:u.label}),o.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[d.summaryScore,d.summaryUnit," · ",d.software.length," software"]})]}),h?o.jsx(Kv,{size:16}):o.jsx(eo,{size:16})]}),h&&o.jsxs("div",{className:"px-3 pb-4 space-y-3 bg-muted/20",children:[o.jsxs("div",{className:"grid grid-cols-3 gap-2 pt-2",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-[11px] text-muted-foreground mb-1",children:"Score"}),o.jsx("input",{type:"text",value:d.summaryScore,onChange:m=>s(u.id,{summaryScore:m.target.value}),className:"w-full px-2 py-1.5 bg-background border border-border rounded text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"8.9"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-[11px] text-muted-foreground mb-1",children:"Unit"}),o.jsx("input",{type:"text",value:d.summaryUnit,onChange:m=>s(u.id,{summaryUnit:m.target.value}),className:"w-full px-2 py-1.5 bg-background border border-border rounded text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"/10"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-[11px] text-muted-foreground mb-1",children:"Caption"}),o.jsx("input",{type:"text",value:d.summaryDesc,onChange:m=>s(u.id,{summaryDesc:m.target.value}),className:"w-full px-2 py-1.5 bg-background border border-border rounded text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"Cycles avg"})]})]}),o.jsx("div",{className:"space-y-2",children:d.software.map((m,v)=>o.jsxs("div",{className:"flex items-center gap-2 p-2 bg-background border border-border rounded",children:[o.jsx("div",{className:"w-9 h-9 shrink-0 bg-muted rounded flex items-center justify-center overflow-hidden",children:m.logo?o.jsx("img",{src:m.logo,alt:m.name,className:"w-7 h-7 object-contain"}):o.jsx("span",{className:"text-[10px] text-muted-foreground",children:"no logo"})}),o.jsxs("div",{className:"grid grid-cols-12 gap-2 flex-1",children:[o.jsx("input",{type:"text",value:m.name,onChange:g=>{const w=[...d.software];w[v]={...m,name:g.target.value},i(u.id,w)},placeholder:"Name",className:"col-span-4 px-2 py-1.5 bg-muted border border-border rounded text-sm focus:outline-none focus:ring-1 focus:ring-foreground"}),o.jsx("input",{type:"text",value:m.logo,onChange:g=>{const w=[...d.software];w[v]={...m,logo:g.target.value},i(u.id,w)},placeholder:"Logo URL",className:"col-span-4 px-2 py-1.5 bg-muted border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-foreground"}),o.jsx("input",{type:"number",min:0,max:100,value:m.score,onChange:g=>{const w=[...d.software];w[v]={...m,score:Number(g.target.value)},i(u.id,w)},placeholder:"Score",className:"col-span-2 px-2 py-1.5 bg-muted border border-border rounded text-sm focus:outline-none focus:ring-1 focus:ring-foreground"}),o.jsx("input",{type:"text",value:m.note||"",onChange:g=>{const w=[...d.software];w[v]={...m,note:g.target.value},i(u.id,w)},placeholder:"Note (optional)",className:"col-span-2 px-2 py-1.5 bg-muted border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-foreground"})]}),o.jsx("button",{type:"button",onClick:()=>c(u.id,v),className:"p-1.5 text-muted-foreground hover:text-red-500 transition-colors",children:o.jsx(or,{size:14})})]},v))}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("select",{onChange:m=>{a(u.id,m.target.value),m.target.value=""},className:"flex-1 px-2 py-1.5 bg-background border border-border rounded text-sm focus:outline-none focus:ring-1 focus:ring-foreground",defaultValue:"",children:[o.jsx("option",{value:"",disabled:!0,children:"+ Add from preset libraryâ¦"}),f.map(m=>o.jsx("option",{value:m.id,children:m.name},m.id))]}),o.jsxs("button",{type:"button",onClick:()=>l(u.id),className:"flex items-center gap-1 px-3 py-1.5 bg-muted border border-border rounded text-xs hover:bg-muted/70",children:[o.jsx(Yt,{size:14})," Custom"]})]})]})]},u.id)})})]})}const eh=7;function DK({isOpen:e,onClose:t,onSave:r,product:n}){const s=p.useRef(null),[i,a]=p.useState(!1),[l,c]=p.useState([]),[u,d]=p.useState(!1),[h,f]=p.useState(!0),[m,v]=p.useState("gaming"),[g,w]=p.useState({}),[b,y]=p.useState("en"),[x,j]=p.useState({name:"",slug:"",category:"",price:"",salePrice:"",description:"",description_it:"",cpu:"",gpu:"",ram:"",storage:"",display:""});p.useEffect(()=>{var A,E;if(n){const _=n.specs||{},F=Array.isArray(n.images)?n.images:[];j({name:n.name||"",slug:n.slug||"",category:n.category||"",price:((A=n.price)==null?void 0:A.toString())||"",salePrice:((E=n.sale_price)==null?void 0:E.toString())||"",description:n.description||"",description_it:n.description_it||"",cpu:_.cpu||"",gpu:_.gpu||"",ram:_.ram||"",storage:_.storage||"",display:_.display||""}),F.length>0?c(F):n.image?c([n.image]):c([]),d(n.configurable===!0),f(n.fps_check_enabled!==!1),v(n.template||"gaming"),w(n.productivity_metrics||{})}else j({name:"",slug:"",category:"",price:"",salePrice:"",description:"",description_it:"",cpu:"",gpu:"",ram:"",storage:"",display:""}),c([]),d(!1),f(!0),v("gaming"),w({})},[n,e]);const k=async A=>{const E=A.target.files;if(!E||E.length===0)return;const _=eh-l.length,F=Array.from(E).slice(0,_);if(F.length!==0){a(!0);try{const C=[];for(const L of F){const I=L.name.split(".").pop(),U=`products/${`${crypto.randomUUID()}.${I}`}`,{error:M}=await Y.storage.from("product-images").upload(U,L);if(M)throw M;const{data:P}=Y.storage.from("product-images").getPublicUrl(U);C.push(P.publicUrl)}c(L=>[...L,...C])}catch(C){console.error("Error uploading images:",C)}finally{a(!1),s.current&&(s.current.value="")}}},S=A=>{c(E=>E.filter((_,F)=>F!==A))}
643,N=A=>{A.preventDefault(),r({id:n==null?void 0:n.id,slug:x.slug||void 0,name:x.name,category:x.category,image:l[0]||"/placeholder.svg",images:l,configurable:u,fps_check_enabled:h,template:m,productivity_metrics:g,price:parseFloat(x.price)||0,sale_price:x.salePrice?parseFloat(x.salePrice):void 0,description:x.description,description_it:x.description_it||void 0,specs:{cpu:x.cpu||void 0,gpu:x.gpu||void 0,ram:x.ram||void 0,storage:x.storage||void 0,display:x.display||void 0}}),t()};return e?o.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"bg-card border border-border rounded-lg w-full max-w-2xl max-h-[90vh] overflow-y-auto",children:[o.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:n?"Edit Product":"Add New Product"}),o.jsx("button",{onClick:t,className:"p-1 hover:bg-muted rounded transition-colors",children:o.jsx(kt,{size:20})})]}),o.jsxs("form",{onSubmit:N,className:"p-6 space-y-4",children:[o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm text-muted-foreground mb-2",children:["Product Images (",l.length,"/",eh,")"]}),o.jsxs("div",{className:"flex flex-wrap gap-3",children:[l.map((A,E)=>o.jsxs("div",{className:"relative group",children:[o.jsx("div",{className:"w-24 h-24 bg-muted border border-border rounded-lg overflow-hidden",children:o.jsx("img",{src:A,alt:`Product ${E+1}`,className:"w-full h-full object-contain"})}),o.jsx("button",{type:"button",onClick:()=>S(E),className:"absolute -top-2 -right-2 p-1 bg-red-500 text-white rounded-full opacity-0 group-hover:opacity-100 transition-opacity",children:o.jsx(or,{size:12})}),E===0&&o.jsx("span",{className:"absolute bottom-1 left-1 text-[10px] bg-foreground text-background px-1 rounded",children:"Main"})]},E)),l.length<eh&&o.jsxs("div",{children:[o.jsx("input",{ref:s,type:"file",accept:"image/*",multiple:!0,onChange:k,className:"hidden"}),o.jsx("button",{type:"button",onClick:()=>{var A;return(A=s.current)==null?void 0:A.click()},disabled:i,className:"w-24 h-24 flex flex-col items-center justify-center gap-1 bg-muted border border-dashed border-border rounded-lg text-muted-foreground hover:text-foreground hover:border-foreground
643/50 transition-colors disabled:opacity-50",children:i?o.jsx(st,{size:20,className:"animate-spin"}):o.jsxs(o.Fragment,{children:[o.jsx(ka,{size:20}),o.jsx("span",{className:"text-[10px]",children:"Add Image"})]})})]})]}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["First image is the main product image. Max ",eh," images."]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Template"}),o.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Choose how this product page is laid out"}),o.jsx("div",{className:"grid grid-cols-3 gap-2",children:[{value:"gaming",label:"Gaming",desc:"FPS banner + Trade-in + AI",Icon:dD},{value:"business",label:"Business",desc:"Productivity banner + Trade-in + AI",Icon:Wo},{value:"accessory",label:"Accessory",desc:"Description only",Icon:tl}].map(A=>{const E=A.Icon,_=m===A.value;return o.jsxs("button",{type:"button",onClick:()=>v(A.value),className:`flex flex-col items-start gap-1.5 p-3 rounded-lg border text-left transition-colors ${_?"border-foreground bg-foreground
643/5":"border-border bg-muted/30 hover:border-foreground/40"}`,children:[o.jsx(E,{className:`w-4 h-4 ${_?"text-foreground":"text-muted-foreground"}`}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:A.label}),o.jsx("span",{className:"text-[10px] text-muted-foreground leading-tight",children:A.desc})]},A.value)})})]}),m==="business"&&o.jsx(IK,{value:g,onChange:w}),o.jsxs("div",{className:"flex items-center gap-3 p-3 bg-muted/50 border border-border rounded-lg",children:[o.jsx("input",{type:"checkbox",id:"configurable",checked:u,onChange:A=>d(A.target.checked),className:"w-4 h-4 rounded border-border"}),o.jsxs("label",{htmlFor:"configurable",className:"flex-1",children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:"Configurable Product"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Enable to add configuration options (CPU, GPU, RAM, etc.) in the Configurator"})]})]}),o.jsxs("div",{className:"flex items-center gap-3 p-3 bg-gradient-to-r from-orange-500/10 to-red-500/10 border border-orange-500/30 rounded-lg",children:[o.jsx("input",{type:"checkbox",id:"fpsCheckEnabled",checked:h,onChange:A=>f(A.target.checked),className:"w-4 h-4 rounded border-border accent-orange-500"}),o.jsx(vu,{className:"w-5 h-5 text-orange-500"}),o.jsxs("label",{htmlFor:"fpsCheckEnabled",className:"flex-1",children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:"FPS Check"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Show FPS performance banner on product page"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Product Name *"}),o.jsx("input",{type:"text",required:!0,value:x.name,onChange:A=>j({...x,name:A.target.value}),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"e.g., OVERCLOCK Cyberbook X7"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"URL Slug (SEO)"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm text-muted-foreground",children:"/product/"}),o.jsx("input",{type:"text",value:x.slug,onChange:A=>j({...x,slug:A.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-")}),className:"flex-1 px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"auto-generated-from-name"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Leave empty to auto-generate from product name. Use lowercase letters, numbers, and hyphens only."})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Category *"}),o.jsx("input",{type:"text",required:!0,value:x.category,onChange:A=>j({...x,category:A.target.value}),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"e.g., notebook, desktop, workstation"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Price (â¬) *"}),o.jsx("input",{type:"number",required:!0,value:x.price,onChange:A=>j({...x,price:A.target.value}),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"1299"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Sale Price (â¬) - Optional"}),o.jsx("input",{type:"number",value:x.salePrice,onChange:A=>j({...x,salePrice:A.target.value}),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"999"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"If set, the original price will be shown as crossed out"})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-1",children:[o.jsx("label",{className:"block text-sm text-muted-foreground",children:"Description *"}),o.jsxs("div",{className:"flex gap-1",children:[o.jsx("button",{type:"button",onClick:()=>y("en"),className:`px-2 py-0.5 text-xs rounded transition-colors ${b==="en"?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"}`,children:"EN"}),o.jsx("button",{type:"button",onClick:()=>y("it"),className:`px-2 py-0.5 text-xs rounded transition-colors ${b==="it"?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"}`,children:"IT"})]})]}),o.jsx("textarea",{required:b==="en",value:b==="en"?x.description:x.description_it,onChange:A=>j({...x,[b==="en"?"description":"description_it"]:A.target.value}),rows:3,className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground resize-none",placeholder:b==="en"?"Product description (English)...":"Descrizione prodotto (Italiano)..."}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:b==="en"?"English description (required)":"Italian translation (optional)"})]}),o.jsxs("div",{className:"border-t border-border pt-4",children:[o.jsx("h3",{className:"text-sm font-medium text-foreground mb-3",children:"Specifications"}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"CPU"}),o.jsx("input",{type:"text",value:x.cpu,onChange:A=>j({...x,cpu:A.target.value}),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"Intel Core i7 14650HX"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"GPU"}),o.jsx("input",{type:"text",value:x.gpu,onChange:A=>j({...x,gpu:A.target.value}),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"NVIDIA RTX 5070"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"RAM"}),o.jsx("input",{type:"text",value:x.ram,onChange:A=>j({...x,ram:A.target.value}),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"32GB DDR5"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Storage"}),o.jsx("input",{type:"text",value:x.storage,onChange:A=>j({...x,storage:A.target.value}),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"1TB SSD NVMe"})]}),o.jsxs("div",{className:"col-span-2",children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Display"}),o.jsx("input",{type:"text",value:x.display,onChange:A=>j({...x,display:A.target.value}),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:'16" QHD+ 165Hz'})]})]})]}),o.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4 border-t border-border",children:[o.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Cancel"}),o.jsx("button",{type:"submit",className:"px-4 py-2 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground
643/90 transition-colors",children:n?"Save Changes":"Add Product"})]})]})]})}):null}function wc({isOpen:e,onClose:t,onConfirm:r,productName:n,title:s="Delete Product",description:i}){if(!e)return null;const a=i||(n?`"${n}" will be permanently removed. This action cannot be undone.`:"This item will be permanently removed. This action cannot be undone.");return o.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"bg-card border border-border rounded-lg w-full max-w-md",children:[o.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:s}),o.jsx("button",{onClick:t,className:"p-1 hover:bg-muted rounded transition-colors",children:o.jsx(kt,{size:20})})]}),o.jsx("div",{className:"p-6",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"p-2 bg-red-500/10 rounded-lg",children:o.jsx(OD,{size:24,className:"text-red-500"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-foreground mb-2",children:"Are you sure you want to proceed?"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:a})]})]})}),o.jsxs("div",{className:"flex items-center justify-end gap-3 px-6 py-4 border-t border-border",children:[o.jsx("button",{onClick:t,className:"px-4 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Cancel"}),o.jsx("button",{onClick:()=>{r(),t()},className:"px-4 py-2 bg-red-500 text-white rounded-lg text-sm font-medium hover:bg-red-600 transition-colors",children:"Delete"})]})]})})}const mg=[{id:"cpu",name:"Processor (CPU)",options:[]},{id:"gpu",name:"Graphics Card (GPU)",options:[]},{id:"ram",name:"Memory (RAM)",options:[]},{id:"storage",name:"Storage",options:[]}];function LK({isOpen:e,onClose:t,onSave:r,product:n,availableProducts:s}){const[i,a]=p.useState(""),[l,c]=p.useState(mg),u=s.filter(x=>x.configurable),d=u.find(x=>x.id===i);p.useEffect(()=>{n?(a(n.productId||""),c(n.categories.length>0?n.categories:mg)):(a(""),c(mg))},[n,e]);const h=x=>{c(j=>j.map(k=>k.id===x?{...k,options:[...k.options,{id:`opt-${Date.now()}`,name:"",price:0,thumbnail:""}]}:k))},f=(x,j,k,S)=>{c(N=>N.map(A=>A.id===x?{...A,options:A.options.map(E=>E.id===j?{...E,[k]:k==="price"?parseFloat(S)||0:S}:E)}:A))},m=async(x,j,k)=>{try{const S=k.name.split(".").pop(),A=`configurator-thumbnails/${`${crypto.randomUUID()}.${S}`}`,{error:E}=await Y.storage.from("product-images").upload(A,k);if(E)throw E;const{data:_}=Y.storage.from("product-images").getPublicUrl(A);f(x,j,"thumbnail",_.publicUrl)}catch(S){console.error("Error uploading thumbnail:",S)}},v=(x,j)=>{c(k=>k.map(S=>S.id===x?{...S,options:S.options.filter(N=>N.id!==j)}:S))},g=()=>{c(x=>[...x,{id:`cat-${Date.now()}`,name:"New Category",options:[]}])},w=x=>{c(j=>j.filter(k=>k.id!==x))},b=(x,j)=>{c(k=>k.map(S=>S.id===x?{...S,name:j}:S))},y=x=>{x.preventDefault(),i&&(r({id:(n==null?void 0:n.id)||`config-${Date.now()}`,name:(d==null?void 0:d.name)||"",productId:i,basePrice:Number(d==null?void 0:d.price)||0,categories:l.filter(j=>j.options.length>0)}),t())};return e?o.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"bg-card border border-border rounded-lg w-full max-w-4xl max-h-[90vh] overflow-hidden flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:n?"Edit Configurator":"Create Configurator"}),o.jsx("button",{onClick:t,className:"p-1 hover:bg-muted rounded transition-colors",children:o.jsx(kt,{size:20})})]}),o.jsxs("form",{onSubmit:y,className:"flex-1 overflow-y-auto",children:[o.jsxs("div",{className:"p-6 space-y-6",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Select Product *"}),u.length===0?o.jsx("div",{className:"p-4 bg-muted/50 border border-border rounded-lg text-center",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:'No configurable products found. Mark a product as "Configurable" in the Products section first.'})}):o.jsxs("div",{className:"relative",children:[o.jsxs("select",{required:!0,value:i,onChange:x=>a(x.target.value),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground appearance-none",children:[o.jsx("option",{value:"",children:"Choose a product..."}),u.map(x=>o.jsxs("option",{value:x.id,children:[x.name," - â¬",Number(x.price).toLocaleStr
643ing()]},x.id))]}),o.jsx(eo,{size:16,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-muted-foreground"})]})]}),d&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-4 p-4 bg-muted/50 border border-border rounded-lg",children:[o.jsx("img",{src:d.image||"/placeholder.svg",alt:d.name,className:"w-16 h-16 object-contain bg-muted rounded"}),o.jsxs("div",{children:[o.jsx("h4",{className:"font-medium text-foreground",children:d.name}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Base Price: â¬",Number(d.price).toLocaleString()]})]})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Configuration Options"}),o.jsxs("button",{type:"button",onClick:g,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[o.jsx(Yt,{size:14}),"Add Category"]})]}),o.jsx("div",{className:"space-y-4",children:l.map(x=>o.jsxs("div",{className:"bg-muted/50 border border-border rounded-lg p-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(kx,{size:14,className:"text-muted-foreground"}),o.jsx("input",{type:"text",value:x.name,onChange:j=>b(x.id,j.target.value),className:"bg-transparent font-medium text-foreground text-sm focus:outline-none border-b border-transparent focus:border-foreground"})]}),o.jsx("button",{type:"button",onClick:()=>w(x.id),className:"p-1 hover:bg-red-500/10 rounded transition-colors",children:o.jsx(or,{size:14,className:"text-red-500"})})]}),o.jsxs("div",{className:"space-y-2",children:[x.options.map(j=>o.jsxs("div",{className:"flex items-start gap-2 bg-card rounded p-2",children:[o.jsxs("div",{className:"flex-shrink-0",children:[o.jsx("input",{type:"file",accept:"image/*",onChange:k=>{var N;const S=(N=k.target.files)==null?void 0:N[0];S&&m(x.id,j.id,S),k.target.value=""},className:"hidden",id:`thumb-${j.id}`}),o.jsx("label",{htmlFor:`thumb-${j.id}`,className:"block w-10 h-10 bg-muted border border-border rounded cursor-pointer hover:border-foreground
643/50 transition-colors overflow-hidden",children:j.thumbnail?o.jsx("img",{src:j.thumbnail,alt:"Thumbnail",className:"w-full h-full object-cover"}):o.jsx("div",{className:"w-full h-full flex items-center justify-center",children:o.jsx(mD,{size:14,className:"text-muted-foreground"})})})]}),o.jsx("input",{type:"text",value:j.name,onChange:k=>f(x.id,j.id,"name",k.target.value),placeholder:"Option name (e.g., Intel Core i7)",className:"flex-1 px-2 py-1 bg-muted border border-border rounded text-sm focus:outline-none focus:ring-1 focus:ring-foreground"}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("span",{className:"text-xs text-muted-foreground",children:"+â¬"}),o.jsx("input",{type:"number",value:j.price||"",onChange:k=>f(x.id,j.id,"price",k.target.value),placeholder:"0",className:"w-20 px-2 py-1 bg-muted border border-border rounded text-sm focus:outline-none focus:ring-1 focus:ring-foreground"})]}),o.jsx("button",{type:"button",onClick:()=>v(x.id,j.id),className:"p-1 hover:bg-muted rounded transition-colors",children:o.jsx(kt,{size:14,className:"text-muted-foreground"})})]},j.id)),o.jsxs("button",{type:"button",onClick:()=>h(x.id),className:"w-full flex items-center justify-center gap-1 py-2 border border-dashed border-border rounded text-xs text-muted-foreground hover:text-foreground hover:border-foreground
643/50 transition-colors",children:[o.jsx(Yt,{size:12}),"Add Option"]})]})]},x.id))})]})]})]}),o.jsxs("div",{className:"flex items-center justify-end gap-3 px-6 py-4 border-t border-border bg-card",children:[o.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Cancel"}),o.jsx("button",{type:"submit",disabled:!i||u.length===0,className:"px-4 py-2 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:n?"Save Changes":"Create Configurator"})]})]})]})}):null}const MK=[{id:"fortnite",name:"Fortnite"},{id:"tarkov",name:"Escape from Tarkov"},{id:"cyberpunk",name:"Cyberpunk 2077"},{id:"warzone",name:"Warzone 2.0"},{id:"eldenring",name:"Elden Ring"},{id:"baldursgate",name:"Baldur's Gate 3"},{id:"wukong",name:"Black Myth: Wukong"},{id:"csgo",name:"Counter-Strike 2"},{id:"gta",name:"GTA V"}];function zK({products:e}){const{toast:t}=qr(),r=Ot(),[n,s]=p.useState(""),[i,a]=p.useState([]),[l,c]=p.useState(0),[u,d]=p.useState(!1),{data:h,isLoading:f}=Vt({queryKey:["product_fps_data",n],queryFn:async()=>{if(!n)return[];const{data:w,error:b}=await Y.from("product_fps_data").select("*").eq("product_id",n);if(b)throw b;return w||[]},enabled:!!n});p.useEffect(()=>{var w;h&&h.length>0?(a(h),c(((w=h[0])==null?void 0:w.time_spy_score)||0)):n&&(a(MK.map(b=>({product_id:n,game_id:b.id,game_name:b.name,fps_fhd:60,fps_wqhd:45,fps_4k:30,time_spy_score:null}))),c(0))},[h,n]);const m=(w,b,y)=>{a(x=>x.map(j=>j.game_id===w?{...j,[b]:y}:j))},v=async()=>{if(n){d(!0);try{await Y.from("product_fps_data").delete().eq("product_id",n);const w=i.map(y=>({product_id:n,game_id:y.game_id,game_name:y.game_name,fps_fhd:y.fps_fhd,fps_wqhd:y.fps_wqhd,fps_4k:y.fps_4k,time_spy_score:l||null})),{error:b}=await Y.from("product_fps_data").insert(w);if(b)throw b;r.invalidateQueries({queryKey:["product_fps_data",n]}),t({title:"FPS data saved",description:"Performance data has been updated successfully."})}catch(w){t({title:"Error",description:w.message,variant:"destructive"})}finally{d(!1)}}},g=e.filter(w=>{var b;return(b=w.specs)==null?void 0:b.gpu});return o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"flex items-center justify-between",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-yellow-400 via-orange-500 to-red-600 flex items-center justify-center",children:o.jsx(vu,{className:"w-5 h-5 text-white"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"FPS Check Manager"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure game performance data for products"})]})]})}),o.jsxs("div",{className:"bg-card border border-border rounded-lg p-4",children:[o.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Select Product"}),o.jsxs("select",{value:n,onChange:w=>s(w.target.value),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-primary",children:[o.jsx("option",{value:"",children:"Choose a product..."}),g.map(w=>{var b;return o.jsxs("option",{value:w.id,children:[w.name," (",(b=w.specs)==null?void 0:b.gpu,")"]},w.id)})]}),e.length>0&&g.length===0&&o.jsx("p",{className:"text-xs text-yellow-500 mt-2",children:"No products with GPU specs found. Add GPU info to products first."})]}),n&&o.jsxs("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[o.jsx("div",{className:"p-4 border-b border-border bg-gradient-to-r from-orange-500/5 to-transparent",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Time Spy Score"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"3DMark benchmark score for this system"})]}
643),o.jsx("input",{type:"number",value:l,onChange:w=>c(parseInt(w.target.value)||0),className:"w-32 px-3 py-2 bg-muted border border-border rounded-lg text-sm text-right font-mono focus:outline-none focus:ring-1 focus:ring-primary",placeholder:"e.g., 15000"})]})}),f?o.jsx("div",{className:"p-8 flex items-center justify-center",children:o.jsx(st,{className:"w-6 h-6 animate-spin text-muted-foreground"})}):o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-muted/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Game"}),o.jsx("th",{className:"text-center px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"FHD (1080p)"}),o.jsx("th",{className:"text-center px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"WQHD (1440p)"}),o.jsx("th",{className:"text-center px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"4K (2160p)"})]})}),o.jsx("tbody",{className:"divide-y divide-border",children:i.map(w=>o.jsxs("tr",{className:"hover:bg-muted/30",children:[o.jsx("td",{className:"px-4 py-3",children:o.jsx("span",{className:"text-sm font-medium text-foreground",children:w.game_name})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("input",{type:"number",value:w.fps_fhd,onChange:b=>m(w.game_id,"fps_fhd",parseInt(b.target.value)||0),className:"w-20 mx-auto block px-2 py-1.5 bg-muted border border-border rounded text-sm text-center font-mono focus:outline-none focus:ring-1 focus:ring-primary"})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("input",{type:"number",value:w.fps_wqhd,onChange:b=>m(w.game_id,"fps_wqhd",parseInt(b.target.value)||0),className:"w-20 mx-auto block px-2 py-1.5 bg-muted border border-border rounded text-sm text-center font-mono focus:outline-none focus:ring-1 focus:ring-primary"})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("input",{type:"number",value:w.fps_4k,onChange:b=>m(w.game_id,"fps_4k",parseInt(b.target.value)||0),className:"w-20 mx-auto block px-2 py-1.5 bg-muted border border-border rounded text-sm text-center font-mono focus:outline-none focus:ring-1 focus:ring-primary"})})]},w.game_id))})]}),o.jsx("div",{className:"p-4 border-t border-border bg-muted/30 flex justify-end",children:o.jsxs("button",{onClick:v,disabled:u,className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-orange-500 to-red-500 text-white rounded-lg text-sm font-medium hover:from-orange-600 hover:to-red-600 transition-all disabled:opacity-50",children:[u?o.jsx(st,{size:16,className:"animate-spin"}):o.jsx(_D,{size:16}),"Save FPS Data"]})})]}),!n&&o.jsxs("div",{className:"bg-card border border-border rounded-lg p-8 text-center",children:[o.jsx(vu,{size:48,className:"mx-auto text-orange-500/50 mb-4"}),o.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:"Select a Product"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a product from the dropdown above to configure its FPS performance data."})]})]})}const qa=p.forwardRef(({className:e,...t},r)=>o.jsx("textarea",{className:Ie("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
643ing-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}));qa.displayName="Textarea";var FK="Label",VT=p.forwardRef((e,t)=>o.jsx(ye.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));VT.displayName=FK;var UT=VT;const $K=tm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),$e=p.forwardRef(({className:e,...t},r)=>o.jsx(UT,{ref:r,className:Ie($K(),e),...t}));$e.displayName=UT.displayName;var VK=[" ","Enter","ArrowUp","ArrowDown"],UK=[" ","Enter"],Yo="Select",[Rm,Om,BK]=Uv(Yo),[Jl,LX]=hs(Yo,[BK,cm]),Im=cm(),[HK,ro]=Jl(Yo),[WK,qK]=Jl(Yo),BT=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:i,value:a,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:h,disabled:f,required:m,form:v}=e,g=Im(t),[w,b]=p.useState(null),[y,x]=p.useState(null),[j,k]=p.useState(!1),S=cb(u),[N,A]=Ho({prop:n,defaultProp:s??!1,onChange:i,caller:Yo}),[E,_]=Ho({prop:a,defaultProp:l,onChange:c,caller:Yo}),F=p.useRef(null),C=w?v||!!w.closest("form"):!0,[L,I]=p.useState(new Set),O=Array.from(L).map(U=>U.props.value).join(";");return o.jsx(xz,{...g,children:o.jsxs(HK,{required:m,scope:t,trigger:w,onTriggerChange:b,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:j,onValueNodeHasChildrenChange:k,contentId:nl(),value:E,onValueChange:_,open:N,onOpenChange:A,dir:S,triggerPointerDownPosRef:F,disabled:f,children:[o.jsx(Rm.Provider,{scope:t,children:o.jsx(WK,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(U=>{I(M=>new Set(M).add(U))},[]),onNativeOptionRemove:p.useCallback(U=>{I(M=>{const P=new Set(M);return P.delete(U),P})},[]),children:r})}),C?o.jsxs(fR,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:h,value:E,onChange:U=>_(U.target.value),disabled:f,form:v,children:[E===void 0?o.jsx("option",{value:""}):null,Array.from(L)]},O):null]})})};BT.displayName=Yo;var HT="SelectTrigger",WT=p.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,i=Im(r),a=ro(HT,r),l=a.disabled||n,c=_e(t,a.onTriggerChange),u=Om(r),d=p.useRef("touch"),[h,f,m]=pR(g=>{const w=u().filter(x=>!x.disabled),b=w.find(x=>x.value===a.value),y=gR(w,g,b);y!==void 0&&a.onValueChange(y.value)}),v=g=>{l||(a.onOpenChange(!0),m()),g&&(a.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return o.jsx(DC,{asChild:!0,...i,children:o.jsx(ye.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":mR(a.value)?"":void 0,...s,ref:c,onClick:he(s.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&v(g)}),onPointerDown:he(s.onPointerDown,g=>{d.current=g.pointerType;const w=g.target;w.hasPointerCapture(g.pointerId)&&w.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:he(s.onKeyDown,g=>{const w=h.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(w&&g.key===" ")&&VK.includes(g.key)&&(v(),g.preventDefault())})})})});WT.displayName=HT;var qT="SelectValue",KT=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:a="",...l}=e,c=ro(qT,r),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,h=_e(t,c.onValueNodeChange);return qt(()=>{u(d)},[u,d]),o.jsx(ye.span,{...l,ref:h,style:{pointerEvents:"none"},children:mR(c.value)?o.jsx(o.Fragment,{children:a}):i})});KT.displayName=qT;var KK="SelectIcon",GT=p.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return o.jsx(ye.span,{"aria-hidden":!0,...s,ref:t,children:n||"â¼"})});GT.displayName=KK;var GK="SelectPortal",QT=e=>o.jsx(Yf,{asChild:!0,...e});QT.displayName=GK;var Jo="SelectContent",ZT=p.forwardRef((e,t)=>{const r=ro(Jo,e.__scopeSelect),[n,s]=p.useState();if(qt(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?na.createPortal(o.jsx(XT,{scope:e.__scopeSelect,children:o.jsx(Rm.Slot,{scope:e.__scopeSelect,children:o.jsx("div",{children:e.children})})}),i):null}return o.jsx(YT,{...e,ref:t})});ZT.displayName=Jo;var Sn=10,[XT,no]=Jl(Jo),QK="SelectContentImpl",ZK=_l("SelectContent.RemoveScroll"),YT=p.forwardRef((e,t)=>
vendor: 14,549 bytes, line 643
643{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:a,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:w,...b}=e,y=ro(Jo,r),[x,j]=p.useState(null),[k,S]=p.useState(null),N=_e(t,ee=>j(ee)),[A,E]=p.useState(null),[_,F]=p.useState(null),C=Om(r),[L,I]=p.useState(!1),O=p.useRef(!1);p.useEffect(()=>{if(x)return TP(x)},[x]),kP();const U=p.useCallback(ee=>{const[Pe,...He]=C().map(Te=>Te.ref.current),[Ae]=He.slice(-1),Ne=document.activeElement;for(const Te of ee)if(Te===Ne||(Te==null||Te.scrollIntoView({block:"nearest"}),Te===Pe&&k&&(k.scrollTop=0),Te===Ae&&k&&(k.scrollTop=k.scrollHeight),Te==null||Te.focus(),document.activeElement!==Ne))return},[C,k]),M=p.useCallback(()=>U([A,x]),[U,A,x]);p.useEffect(()=>{L&&M()},[L,M]);const{onOpenChange:P,triggerPointerDownPosRef:z}=y;p.useEffect(()=>{if(x){let ee={x:0,y:0};const Pe=Ae=>{var Ne,Te;ee={x:Math.abs(Math.round(Ae.pageX)-(((Ne=z.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(Ae.pageY)-(((Te=z.current)==null?void 0:Te.y)??0))}},He=Ae=>{ee.x<=10&&ee.y<=10?Ae.preventDefault():x.contains(Ae.target)||P(!1),document.removeEventListener("pointermove",Pe),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",Pe),document.addEventListener("pointerup",He,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Pe),document.removeEventListener("pointerup",He,{capture:!0})}}},[x,P,z]),p.useEffect(()=>{const ee=()=>P(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[P]);const[B,re]=pR(ee=>{const Pe=C().filter(Ne=>!Ne.disabled),He=Pe.find(Ne=>Ne.ref.current===document.activeElement),Ae=gR(Pe,ee,He);Ae&&setTimeout(()=>Ae.ref.current.focus())}),Q=p.useCallback((ee,Pe,He)=>{const Ae=!O.current&&!He;(y.value!==void 0&&y.value===Pe||Ae)&&(E(ee),Ae&&(O.current=!0))},[y.value]),fe=p.useCallback(()=>x==null?void 0:x.focus(),[x]),pe=p.useCallback((ee,Pe,He)=>{const Ae=!O.current&&!He;(y.value!==void 0&&y.value===Pe||Ae)&&F(ee)},[y.value]),Me=n==="popper"?Ty:JT,Ze=Me===Ty?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:w}:{};return o.jsx(XT,{scope:r,content:x,viewport:k,onViewportChange:S,itemRefCallback:Q,selectedItem:A,onItemLeave:fe,itemTextRefCallback:pe,focusSelectedItem:M,selectedItemText:_,position:n,isPositioned:L,searchRef:B,children:o.jsx(ib,{as:ZK,allowPinchZoom:!0,children:o.jsx(sb,{asChild:!0,trapped:y.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:he(s,ee=>{var Pe;(Pe=y.trigger)==null||Pe.focus({preventScroll:!0}),ee.preventDefault()}),children:o.jsx(Ju,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:o.jsx(Me,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:ee=>ee.preventDefault(),...b,...Ze,onPlaced:()=>I(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:he(b.onKeyDown,ee=>{const Pe=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!Pe&&ee.key.length===1&&re(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let Ae=C().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(Ae=Ae.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const Ne=ee.target,Te=Ae.indexOf(Ne);Ae=Ae.slice(Te+1)}setTimeout(()=>U(Ae)),ee.preventDefault()}})})})})})})});YT.displayName=QK;var XK="SelectItemAlignedPosition",JT=p.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,i=ro(Jo,r),a=no(Jo,r),[l,c]=p.useState(null),[u,d]=p.useState(null),h=_e(t,N=>d(N)),f=Om(r),m=p.useRef(!1),v=p.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:b,focusSelectedItem:y}=a,x=p.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&g&&w&&b){const N=i.trigger.getBoundingClientRect(),A=u.getBoundingClientRect(),E=i.valueNode.getBoundingClientRect(),_=b.getBoundingClientRect();if(i.dir!=="rtl"){const Ne=_.left-A.left,Te=E.left-Ne,Nt=N.left-Te,Kt=N.width+Nt,Er=Math.max(Kt,A.width),gt=window.innerWidth-Sn,Kr=zu(Te,[Sn,Math.max(Sn,gt-Er)]);l.style.minWidth=Kt+"px",l.style.left=Kr+"px"}else{const Ne=A.right-_.right,Te=window.innerWidth-E.right-Ne,Nt=window.innerWidth-N.right-Te,Kt=N.width+Nt,Er=Math.max(Kt,A.width),gt=window.innerWidth-Sn,Kr=zu(Te,[Sn,Math.max(Sn,gt-Er)]);l.style.minWidth=Kt+"px",l.style.right=Kr+"px"}const F=f(),C=window.innerHeight-Sn*2,L=g.scrollHeight,I=window.getComputedStyle(u),O=parseInt(I.borderTopWidth,10),U=parseInt(I.paddingTop,10),M=parseInt(I.borderBottomWidth,10),P=parseInt(I.paddingBottom,10),z=O+U+L+P+M,B=Math.min(w.offsetHeight*5,z),re=window.getComputedStyle(g),Q=parseInt(re.paddingTop,10),fe=parseInt(re.paddingBottom,10),pe=N.top+N.height/2-Sn,Me=C-pe,Ze=w.offsetHeight/2,ee=w.offsetTop+Ze,Pe=O+U+ee,He=z-Pe;if(Pe<=pe){const Ne=F.length>0&&w===F[F.length-1].ref.current;l.style.bottom="0px";const Te=u.clientHeight-g.offsetTop-g.offsetHeight,Nt=Math.max(Me,Ze+(Ne?fe:0)+Te+M),Kt=Pe+Nt;l.style.height=Kt+"px"}else{const Ne=F.length>0&&w===F[0].ref.current;l.style.top="0px";const Nt=Math.max(pe,O+g.offsetTop+(Ne?Q:0)+Ze)+He;l.style.height=Nt+"px",g.scrollTop=Pe-pe+g.offsetTop}l.style.margin=`${Sn}px 0`,l.style.minHeight=B+"px",l.style.maxHeight=C+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[f,i.trigger,i.valueNode,l,u,g,w,b,i.dir,n]);qt(()=>x(),[x]);const[j,k]=p.useState();qt(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const S=p.useCallback(N=>{N&&v.current===!0&&(x(),y==null||y(),v.current=!1)},[x,y]);return o.jsx(JK,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:S,children:o.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:o.jsx(ye.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});JT.displayName=XK;var YK="SelectPopperPosition",Ty=p.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Sn,...i}=e,a=Im(r);return o.jsx(LC,{...a,...i,ref:t,align:n,collisionPadding:s,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)"}})});Ty.displayName=YK;var[JK,xb]=Jl(Jo,{}),Ry="SelectViewport",eR=p.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,i=no(Ry,r),a=xb(Ry,r),l=_e(t,i.onViewportChange),c=p.useRef(0);return o.jsxs(o.Fragment,{children:[o.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}),o.jsx(Rm.Slot,{scope:r,children:o.jsx(ye.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:he(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:f}=a;if(f!=null&&f.current&&h){const m=Math.abs(c.current-d.scrollTop);if(m>0){const v=window.innerHeight-Sn*2,g=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),b=Math.max(g,w);if(b<v){const y=b+m,x=Math.min(v,y),j=y-x;h.style.height=x+"px",h.style.bottom==="0px"&&(d.scrollTop=j>0?j:0,h.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});eR.displayName=Ry;var tR="SelectGroup",[eG,tG]=Jl(tR),rG=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=nl();return o.jsx(eG,{scope:r,id:s,children:o.jsx(ye.div,{role:"group","aria-labelledby":s,...n,ref:t})})});rG.displayName=tR;var rR="SelectLabel",nR=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=tG(rR,r);return o.jsx(ye.div,{id:s.id,...n,ref:t})});nR.displayName=rR;var Sf="SelectItem",[nG,sR]=Jl(Sf),iR=p.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...a}=e,l=ro(Sf,r),c=no(Sf,r),u=l.value===n,[d,h]=p.useState(i??""),[f,m]=p.useState(!1),v=_e(t,y=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,y,n,s)}),g=nl(),w=p.useRef("touch"),b=()=>{s||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return o.jsx(nG,{scope:r,value:n,disabled:s,textId:g,isSelected:u,onItemTextChange:p.useCallback(y=>{h(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:o.jsx(Rm.ItemSlot,{scope:r,value:n,disabled:s,textValue:d,children:o.jsx(ye.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:v,onFocus:he(a.onFocus,()=>m(!0)),onBlur:he(a.onBlur,()=>m(!1)),onClick:he(a.onClick,()=>{w.current!=="mouse"&&b()}),onPointerUp:he(a.onPointerUp,()=>{w.current==="mouse"&&b()}),onPointerDown:he(a.onPointerDown,y=>{w.current=y.pointerType}),onPointerMove:he(a.onPointerMove,y=>{var x;w.current=y.pointerType,s?(x=c.onItemLeave)==null||x.call(c):w.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:he(a.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:he(a.onKeyDown,y=>{var j;((j=c.searchRef)==null?void 0:j.current)!==""&&y.key===" "||(UK.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})})})})});iR.displayName=Sf;var Tc="SelectItemText",oR=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...i}=e,a=ro(Tc,r),l=no(Tc,r),c=sR(Tc,r),u=qK(Tc,r),[d,h]=p.useState(null),f=_e(t,b=>h(b),c.onItemTextChange,b=>{var y;return(y=l.itemTextRefCallback)==null?void 0:y.call(l,b,c.value,c.disabled)}),m=d==null?void 0:d.textContent,v=p.useMemo(()=>o.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:w}=u;return qt(()=>(g(v),()=>w(v)),[g,w,v]),o.jsxs(o.Fragment,{children:[o.jsx(ye.span,{id:c.textId,...i,ref:f}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?na.createPortal(i.children,a.valueNode):null]})});oR.displayName=Tc;var aR="SelectItemIndicator",lR=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return sR(aR,r).isSelected?o.jsx(ye.span,{"aria-hidden":!0,...n,ref:t}):null});lR.displayName=aR;var Oy="SelectScrollUpButton",cR=p.forwardRef((e,t)=>{const r=no(Oy,e.__scopeSelect),n=xb(Oy,e.__scopeSelect),[s,i]=p.useState(!1),a=_e(t,n.onScrollButtonChange);return qt(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?o.jsx(dR,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});cR.displayName=Oy;var Iy="SelectScrollDownButton",uR=p.forwardRef((e,t)=>{const r=no(Iy,e.__scopeSelect),n=xb(Iy,e.__scopeSelect),[s,i]=p.useState(!1),a=_e(t,n.onScrollButtonChange);return qt(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;i(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?o.jsx(dR,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});uR.displayName=Iy;var dR=p.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,i=no("SelectScrollButton",r),a=p.useRef(null),l=Om(r),c=p.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return p.useEffect(()=>()=>c(),[c]),qt(()=>{var d;const u=l().find(h=>h.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),o.jsx(ye.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:he(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:he(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:he(s.onPointerLeave,()=>{c()})})}),sG="SelectSeparator",hR=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return o.jsx(ye.div,{"aria-hidden":!0,...n,ref:t})});hR.displayName=sG;var Dy="SelectArrow",iG=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Im(r),i=ro(Dy,r),a=no(Dy,r);return i.open&&a.position==="popper"?o.jsx(MC,{...s,...n,ref:t}):null});iG.displayName=Dy;var oG="SelectBubbleInput",fR=p.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const s=p.useRef(null),i=_e(n,s),a=Em(t);return p.useEffect(()=>{const l=s.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&d){const h=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(h)}},[a,t]),o.jsx(ye.select,{...r,style:{...NN,...r.style},ref:i,defaultValue:t})});fR.displayName=oG;function mR(e){return e===""||e===void 0}function pR(e){const t=Ht(e),r=p.useRef(""),n=p.useRef(0),s=p.useCallback(a=>{const l=r.current+a;t(l),function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),i=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function gR(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let a=aG(e,Math.max(i,0));s.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function aG(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var lG=BT,xR=WT,cG=KT,uG=GT,dG=QT,yR=ZT,hG=eR,vR=nR,bR=iR,fG=oR,mG=lR,wR=cR,jR=uR,kR=hR;const Ly=lG,My=cG,Af=p.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(xR,{ref:n,className:Ie("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
643ing-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,o.jsx(uG,{asChild:!0,children:o.jsx(eo,{className:"h-4 w-4 opacity-50"})})]}));Af.displayName=xR.displayName;const SR=p.forwardRef(({className:e,...t},r)=>o.jsx(wR,{ref:r,className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(Kv,{className:"h-4 w-4"})}));SR.displayName=wR.displayName;const AR=p.forwardRef(({className:e,...t},r)=>o.jsx(jR,{ref:r,className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(eo,{className:"h-4 w-4"})}));AR.displayName=jR.displayName;const Nf=p.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>o.jsx(dG,{children:o.jsxs(yR,{ref:s,className:Ie("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[o.jsx(SR,{}),o.jsx(hG,{className:Ie("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(AR,{})]})}));Nf.displayName=yR.displayName;const pG=p.forwardRef(({className:e,...t},r)=>o.jsx(vR,{ref:r,className:Ie("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));pG.displayName=vR.displayName;const _s=p.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(bR,{ref:n,className:Ie("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(mG,{children:o.jsx(Vs,{className:"h-4 w-4"})})}),o.jsx(fG,{children:t})]}));_s.displayName=bR.displayName;const gG=p.forwardRef(({className:e,...t},r)=>o.jsx(kR,{ref:r,className:Ie("-mx-1 my-1 h-px bg-muted",e),...t}));gG.displayName=kR.displayName;const xG={id:"",name:"",image:"",description:"",priceFrom:0,priceMonthly:0,specs:[{icon:"gpu",label:"GPU",value:""},{icon:"cpu",label:"CPU",value:""},{icon:"motherboard",label:"Motherboard",value:""},{icon:"ram",label:"RAM",value:""},{icon:"ssd",label:"SSD",value:""}]};function yG({isOpen:e,onClose:t,onSave:r,page:n}){const[s,i]=p.useState({slug:"",title:"",description:"",hero_image:"",mobile_hero_image:"",section_title:"",features_title:"",features_description:"",features_list:[],features_image:"",processor_title:"",processor_content:[],processor_image:"",products:[],status:"active"}),[a,l]=p.useState(""),[c,u]=p.useState(""),[d,h]=p.useState(null);p.useEffect(()=>{i(n?{slug:n.slug,title:n.title,description:n.description||"",hero_image:n.hero_image||"",mobile_hero_image:n.mobile_hero_image||"",section_title:n.section_title||"",features_title:n.features_title||"",features_description:n.features_description||"",features_list:n.features_list||[],features_image:n.features_image||"",processor_title:n.processor_title||"",processor_content:n.processor_content||[],processor_image:n.processor_image||"",products:n.products||[],status:n.status||"active"}:{slug:"",title:"",description:"",hero_image:"",mobile_hero_image:"",section_title:"",features_title:"",features_description:"",features_list:[],features_image:"",processor_title:"",processor_content:[],processor_image:"",products:[],status:"active"})},[n,e]);const f=async(S,N,A)=>{var _;const E=(_=S.target.files)==null?void 0:_[0];if(E){h(N);try{const F=E.name.split(".").pop(),L=`collections/${`${Date.now()}-${Math.random().toString(36).substring(7)}.${F}`}`,{error:I}=await Y.storage.from("product-images").upload(L,E);if(I)throw I;const{data:{publicUrl:O}}=Y.storage.from("product-images").getPublicUrl(L);if(A!==void 0){const U=[...s.products];U[A]={...U[A],image:O},i({...s,products:U})}else i({...s,[N]:O});fi.success("Immagine caricata")}catch{fi.error("Errore nel caricamento dell'immagine")}finally{h(null)}}},m=()=>{a.trim()&&(i({...s,features_list:[...s.features_list,a.trim()]}),l(""))},v=S=>{i({...s,features_list:s.features_list.filter((N,A)=>A!==S)})},g=()=>{c.trim()&&(i({...s,processor_content:[...s.processor_content,c.trim()]}),u(""))},w=S=>{i({...s,processor_content:s.processor_content.filter((N,A)=>A!==S)})},b=()=>{i({...s,products:[...s.products,{...xG,id:`product-${Date.now()}`}]})},y=(S,N,A)=>{const E=[...s.products];E[S]={...E[S],[N]:A},i({...s,products:E})},x=(S,N,A,E)=>{const _=[...s.products],F=[..._[S].specs];F[N]={...F[N],[A]:E},_[S]={..._[S],specs:F},i({...s,products:_})},j=S=>{i({...s,products:s.products.filter((N,A)=>A!==S)})},k=()=>
643{if(!s.slug||!s.title){fi.error("Slug e titolo sono obbligatori");return}r(s)};return e?o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm",children:o.jsxs("div",{className:"relative w-full max-w-4xl max-h-[90vh] overflow-y-auto bg-background border border-border rounded-lg shadow-xl m-4",children:[o.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between p-4 bg-background border-b border-border",children:[o.jsx("h2",{className:"text-xl font-bold",children:n?"Modifica Pagina Collezione":"Nuova Pagina Collezione"}),o.jsx(ue,{variant:"ghost",size:"icon",onClick:t,children:o.jsx(kt,{className:"h-5 w-5"})})]}),o.jsxs("div",{className:"p-6 space-y-8",children:[o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold border-b border-border pb-2",children:"Informazioni Base"}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx($e,{children:"Slug (URL)"}),o.jsx(Fe,{value:s.slug,onChange:S=>i({...s,slug:S.target.value}),placeholder:"workstation-pc"})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Stato"}),o.jsxs(Ly,{value:s.status,onValueChange:S=>i({...s,status:S}),children:[o.jsx(Af,{children:o.jsx(My,{})}),o.jsxs(Nf,{children:[o.jsx(_s,{value:"active",children:"Attivo"}),o.jsx(_s,{value:"draft",children:"Bozza"})]})]})]})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Titolo"}),o.jsx(Fe,{value:s.title,onChange:S=>i({...s,title:S.target.value}),placeholder:"Workstation PC"})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Descrizione"}),o.jsx(qa,{value:s.description,onChange:S=>i({...s,description:S.target.value}),placeholder:"Descrizione della collezione...",rows:3})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Immagine Hero (Desktop)"}),o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(Fe,{value:s.hero_image,onChange:S=>i({...s,hero_image:S.target.value}),placeholder:"URL immagine o carica...",className:"flex-1"}),o.jsxs("label",{className:"cursor-pointer",children:[o.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:S=>f(S,"hero_image"),disabled:d==="hero_image"}),o.jsx(ue,{type:"button",variant:"outline",size:"icon",disabled:d==="hero_image",asChild:!0,children:o.jsx("span",{children:o.jsx(ka,{className:"h-4 w-4"})})})]})]}),s.hero_image&&o.jsx("img",{src:s.hero_image,alt:"Hero preview",className:"mt-2 h-24 object-contain rounded"})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Immagine Hero Mobile"}),o.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Usata come sfondo del hero nella vista mobile. Se non impostata, viene usata l'immagine desktop."}),o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(Fe,{value:s.mobile_hero_image,onChange:S=>i({...s,mobile_hero_image:S.target.value}),placeholder:"URL immagine o carica...",className:"flex-1"}),o.jsxs("label",{className:"cursor-pointer",children:[o.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:S=>f(S,"mobile_hero_image"),disabled:d==="mobile_hero_image"}),o.jsx(ue,{type:"button",variant:"outline",size:"icon",disabled:d==="mobile_hero_image",asChild:!0,children:o.jsx("span",{children:o.jsx(ka,{className:"h-4 w-4"})})})]})]}),s.mobile_hero_image&&o.jsx("img",{src:s.mobile_hero_image,alt:"Mobile hero preview",className:"mt-2 h-24 object-contain rounded"})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold border-b border-border pb-2",children:"Titolo Sezione"}),o.jsxs("div",{children:[o.jsx($e,{children:"Titolo centrale"}),o.jsx(Fe,{value:s.section_title,onChange:S=>i({...s,section_title:S.target.value}),placeholder:"Ottimale. Il Perfetto Equilibrio Tra Prezzo E Prestazioni."})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold border-b border-border pb-2",children:"Sezione Features"}),o.jsxs("div",{children:[o.jsx($e,{children:"Titolo Features"}),o.jsx(Fe,{value:s.features_title,onChange:S=>i({...s,features_title:S.target.value}),placeholder:"Features delle Workstation"})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Descrizione Features"}),o.jsx(qa,{value:s.features_description,onChange:S=>i({...s,features_description:S.target.value}),placeholder:"Per garantire un funzionamento fluido...",rows:2})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Lista Features"}),o.jsx("div",{className:"space-y-2 mb-2",children:s.features_list.map((S,N)=>o.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted rounded",children:[o.jsx(kx,{className:"h-4 w-4 text-muted-foreground"}),o.jsx("span",{className:"flex-1 text-sm",children:S}),o.jsx(ue,{type:"button",variant:"ghost",size:"icon",onClick:()=>v(N),children:o.jsx(or,{className:"h-4 w-4 text-destructive"})})]},N))}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Fe,{value:a,onChange:S=>l(S.target.value),placeholder:"Nuova feature...",onKeyDown:S=>S.key==="Enter"&&m()}),o.jsx(ue,{type:"button",variant:"outline",onClick:m,children:o.jsx(Yt,{className:"h-4 w-4"})})]})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Immagine Features"}),o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(Fe,{value:s.features_image,onChange:S=>i({...s,features_image:S.target.value}),placeholder:"URL immagine o carica...",className:"flex-1"}),o.jsxs("label",{className:"cursor-pointer",children:[o.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:S=>f(S,"features_image"),disabled:d==="features_image"}),o.jsx(ue,{type:"button",variant:"outline",size:"icon",disabled:d==="features_image",asChild:!0,children:o.jsx("span",{children:o.jsx(ka,{className:"h-4 w-4"})})})]})]}),s.features_image&&o.jsx("img",{src:s.features_image,alt:"Features preview",className:"mt-2 h-24 object-contain rounded"})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold border-b border-border pb-2",children:"Sezione Processore"}),o.jsxs("div",{children:[o.jsx($e,{children:"Titolo"}),o.jsx(Fe,{value:s.processor_title,onChange:S=>i({...s,processor_title:S.target.value}),placeholder:"Processore, RAM e unità SSD"})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Paragrafi"}),o.jsx("div",{className:"space-y-2 mb-2",children:s.processor_content.map((S,N)=>o.jsxs("div",{className:"flex items-start gap-2 p-2 bg-muted rounded",children:[o.jsx(kx,{className:"h-4 w-4 text-muted-foreground mt-1"}),o.jsx("span",{className:"flex-1 text-sm",children:S}),o.jsx(ue,{type:"button",variant:"ghost",size:"icon",onClick:()=>w(N),children:o.jsx(or,{className:"h-4 w-4 text-destructive"})})]},N))}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(qa,{value:c,onChange:S=>u(S.target.value),placeholder:"Nuovo paragrafo...",rows:2,className:"flex-1"}),o.jsx(ue,{type:"button",variant:"outline",onClick:g,children:o.jsx(Yt,{className:"h-4 w-4"})})]})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Immagine"}),o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(Fe,{value:s.processor_image,onChange:S=>i({...s,processor_image:S.target.value}),placeholder:"URL immagine o carica...",className:"flex-1"}),o.jsxs("label",{className:"cursor-pointer",children:[o.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:S=>f(S,"processor_image"),disabled:d==="processor_image"}),o.jsx(ue,{type:"button",variant:"outline",size:"icon",disabled:d==="processor_image",asChild:!0,children:o.jsx("span",{children:o.jsx(ka,{className:"h-4 w-4"})})})]})]}),s.processor_image&&o.jsx("img",{src:s.processor_image,alt:"Processor preview",className:"mt-2 h-24 object-contain rounded"})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-border pb-2",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Prodotti"}),o.jsxs(ue,{type:"button",variant:"outline",size:"sm",onClick:b,children:[o.jsx(Yt,{className:"h-4 w-4 mr-1"}
643)," Aggiungi Prodotto"]})]}),o.jsx("div",{className:"space-y-6",children:s.products.map((S,N)=>o.jsxs("div",{className:"p-4 border border-border rounded-lg space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h4",{className:"font-medium",children:["Prodotto #",N+1]}),o.jsx(ue,{type:"button",variant:"ghost",size:"icon",onClick:()=>j(N),children:o.jsx(or,{className:"h-4 w-4 text-destructive"})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx($e,{children:"ID"}),o.jsx(Fe,{value:S.id,onChange:A=>y(N,"id",A.target.value),placeholder:"studio-pro"})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Nome"}),o.jsx(Fe,{value:S.name,onChange:A=>y(N,"name",A.target.value),placeholder:"Studio Pro"})]})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Descrizione"}),o.jsx(qa,{value:S.description,onChange:A=>y(N,"description",A.target.value),placeholder:"Descrizione del prodotto...",rows:2})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx($e,{children:"Prezzo da (â¬)"}),o.jsx(Fe,{type:"number",value:S.priceFrom,onChange:A=>y(N,"priceFrom",parseFloat(A.target.value)||0)})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Rata mensile (â¬)"}),o.jsx(Fe,{type:"number",value:S.priceMonthly||"",onChange:A=>y(N,"priceMonthly",parseFloat(A.target.value)||void 0)})]})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Immagine"}),o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(Fe,{value:S.image,onChange:A=>y(N,"image",A.target.value),placeholder:"URL immagine...",className:"flex-1"}),o.jsxs("label",{className:"cursor-pointer",children:[o.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:A=>f(A,`product-${N}`,N),disabled:d===`product-${N}`}),o.jsx(ue,{type:"button",variant:"outline",size:"icon",disabled:d===`product-${N}`,asChild:!0,children:o.jsx("span",{children:o.jsx(ka,{className:"h-4 w-4"})})})]})]}),S.image&&o.jsx("img",{src:S.image,alt:"Product preview",className:"mt-2 h-16 object-contain rounded"})]}),o.jsxs("div",{children:[o.jsx($e,{children:"Specifiche"}),o.jsx("div",{className:"space-y-2 mt-2",children:S.specs.map((A,E)=>o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx("span",{className:"w-24 text-sm text-muted-foreground uppercase",children:A.icon}),o.jsx(Fe,{value:A.label,onChange:_=>x(N,E,"label",_.target.value),placeholder:"Label",className:"w-24"}),o.jsx(Fe,{value:A.value,onChange:_=>x(N,E,"value",_.target.value),placeholder:"Valore",className:"flex-1"})]},E))})]})]},S.id||N))})]})]}),o.jsxs("div",{className:"sticky bottom-0 flex justify-end gap-3 p-4 bg-background border-t border-border",children:[o.jsx(ue,{variant:"outline",onClick:t,children:"Annulla"}),o.jsx(ue,{onClick:k,children:n?"Salva Modifiche":"Crea Pagina"})]})]})}):null}function vG({order:e,isOpen:t,onClose:r}){var x,j;const{toast:n}=qr(),s=Ot(),[i,a]=p.useState(!1),[l,c]=p.useState(""),[u,d]=p.useState("DHL"),[h,f]=p.useState(""),[m,v]=p.useState("");if(!t)return null;const g=[{value:"DHL",label:"DHL",urlTemplate:"https://www.dhl.com/en/express/tracking.html?AWB="},{value:"FedEx",label:"FedEx",urlTemplate:"https://www.fedex.com/fedextrack/?trknbr="},{value:"UPS",label:"UPS",urlTemplate:"https://www.ups.com/track?tracknum="},{value:"GLS",label:"GLS",urlTemplate:"https://gls-group.eu/EU/en/parcel-tracking?match="},{value:"BRT",label:"BRT (Bartolini)",urlTemplate:"https://www.brt.it/it/tracking?refid="},{value:"Poste Italiane",label:"Poste Italiane",urlTemplate:"https://www.poste.it/cerca/index.html#/risultati-ricerca-702/"},{value:"Other",label:"Other",urlTemplate:""}],w=k=>{d(k);const S=g.find(N=>N.value===k);S&&l&&S.urlTemplate&&f(S.urlTemplate+l)},b=k=>{c(k);const S=g.find(N=>N.value===u);S&&k&&S.urlTemplate&&f(S.urlTemplate+k)},y=async k=>{k.preventDefault(),a(!0);try{const{error:S}=await Y.from("orders").update({status:"shipped",tracking_number:l||null,carrier:u||null,tracking_url:h||null,shipped_at:new Date().toISOString()}).eq("id",e.id);if(S)throw S;const{data:N,error:A}=await Y.functions.invoke("send-shipping-notification",{body:{order_id:e.id,tracking_number:l||void 0,carrier:u||void 0,tracking_url:h||void 0,estimated_delivery:m||void 0}});A?(console.error("Email error:",A),n({title:"Order marked as shipped",de
643scription:"Order updated but email notification failed to send.",variant:"destructive"})):n({title:"Order shipped!",description:"Order status updated and customer has been notified via email."}),s.invalidateQueries({queryKey:["admin_orders"]}),r()}catch(S){console.error("Error:",S),n({title:"Error",description:S instanceof Error?S.message:"Failed to update order",variant:"destructive"})}finally{a(!1)}};return o.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:o.jsxs("div",{className:"bg-card border border-border rounded-xl w-full max-w-2xl max-h-[90vh] overflow-auto",children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[o.jsxs("div",{children:[o.jsxs("h2",{className:"text-xl font-bold text-foreground flex items-center gap-2",children:[o.jsx(on,{size:24}),"Ship Order"]}),o.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Order #",e.id.slice(0,8).toUpperCase()]})]}),o.jsx("button",{onClick:r,className:"p-2 hover:bg-muted rounded-lg transition-colors",children:o.jsx(kt,{size:20})})]}),o.jsxs("div",{className:"p-6 border-b border-border bg-muted/30",children:[o.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase mb-3",children:"Order Details"}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-1",children:[o.jsx(sm,{size:14}),"Customer"]}),o.jsx("p",{className:"text-sm font-medium text-foreground",children:((x=e.shipping_address)==null?void 0:x.full_name)||"N/A"})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-1",children:[o.jsx(tl,{size:14}),"Items"]}),o.jsxs("p",{className:"text-sm font-medium text-foreground",children:[e.items.length," item(s) - â¬",e.total.toLocaleString()]})]}),o.jsxs("div",{className:"col-span-2",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-1",children:[o.jsx(bu,{size:14}),"Shipping Address"]}),e.shipping_address?o.jsxs("p",{className:"text-sm text-foreground",children:[e.shipping_address.address_line1,e.shipping_address.address_line2&&`, ${e.shipping_address.address_line2}`,o.jsx("br",{}),e.shipping_address.postal_code," ",e.shipping_address.city," (",e.shipping_address.province,")",o.jsx("br",{}),e.shipping_address.country]}):o.jsx("p",{className:"text-sm text-muted-foreground",children:"No address provided"})]}),((j=e.shipping_address)==null?void 0:j.phone)&&o.jsxs("div",{className:"col-span-2",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-1",children:[o.jsx(nm,{size:14}),"Phone"]}),o.jsx("p",{className:"text-sm text-foreground",children:e.shipping_address.phone})]})]}),o.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[o.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Items in this shipment:"}),o.jsx("ul",{className:"space-y-1",children:e.items.map((k,S)=>o.jsxs("li",{className:"text-sm text-foreground flex justify-between",children:[o.jsxs("span",{children:[k.product_name," à ",k.quantity]}),o.jsxs("span",{className:"text-muted-foreground",children:["â¬",k.price.toLocaleString()]})]},S))})]})]}),o.jsxs("form",{onSubmit:y,className:"p-6 space-y-4",children:[o.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase mb-3",children:"Tracking Information"}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Carrier"}),o.jsx("select",{value:u,onChange:k=>w(k.target.value),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",children:g.map(k=>o.jsx("option",{value:k.value,children:k.label},k.value))})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Tracking Number"}
643),o.jsx("input",{type:"text",value:l,onChange:k=>b(k.target.value),placeholder:"Enter tracking number",className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Tracking URL (auto-generated)"}),o.jsx("input",{type:"url",value:h,onChange:k=>f(k.target.value),placeholder:"https://...",className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Estimated Delivery (optional)"}),o.jsx("input",{type:"text",value:m,onChange:k=>v(k.target.value),placeholder:"e.g., January 20, 2026",className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground"})]}),o.jsxs("div",{className:"flex gap-3 pt-4",children:[o.jsx("button",{type:"button",onClick:r,className:"flex-1 px-4 py-2.5 border border-border rounded-lg text-sm font-medium hover:bg-muted transition-colors",children:"Cancel"}),o.jsx("button",{type:"submit",disabled:i,className:"flex-1 flex items-center justify-center gap-2 px-4 py-2.5 bg-purple-600 text-white rounded-lg text-sm font-medium hover:bg-purple-700 transition-colors disabled:opacity-50",children:i?o.jsxs(o.Fragment,{children:[o.jsx(st,{size:16,className:"animate-spin"}),"Shipping..."]}):o.jsxs(o.Fragment,{children:[o.jsx(on,{size:16}),"Mark as Shipped & Notify Customer"]})})]})]})]})})}const bG=[{id:"dashboard",label:"Dashboard",icon:xD},{id:"products",label:"Products",icon:tl},{id:"configurator",label:"Configurator",icon:Ax},{id:"collections",label:"Collezioni",icon:yu},{id:"fps-check",label:"FPS Check",icon:vu},{id:"orders",label:"Orders",icon:us},{id:"customers",label:"Customers",icon:wu},{id:"analytics",label:"Analytics",icon:qv},{id:"settings",label:"Settings",icon:Ko}];function wG(){Un();const[e,t]=p.useState(null),[r,n]=p.useState(!0),{data:s,isLoading:i}=iq(e==null?void 0:e.id),[a,l]=p.useState("dashboard"),[c,u]=p.useState(""),[d,h]=p.useState(""),[f,m]=p.useState(""),[v,g]=p.useState(""),[w,b]=p.useState(!1),[y,x]=p.useState(!1),[j,k]=p.useState(!1),[S,N]=p.useState(null),[A,E]=p.useState(null),[_,F]=p.useState(!1),[C,L]=p.useState(null),[I,O]=p.useState(null),[U,M]=p.useState(!1),[P,z]=p.useState(!1),[B,re]=p.useState(null),[Q,fe]=p.useState(null),[pe,Me]=p.useState(!1),[Ze,ee]=p.useState(null),[Pe,He]=p.useState(null),[Ae,Ne]=p.useState(null),{data:Te=[],isLoading:Nt}=ET(),{data:Kt=[],isLoading:Er}=oq(),{data:gt=[],isLoading:Kr}=fq(),{data:Ys=[],isLoading:Gr}=Yq(),{data:T=[],isLoading:$}=gq(),{data:V}=vq(),te=aq(),J=lq(),G=cq(),ie=uq(),Re=dq(),We=hq(),tr=eK(),gn=tK(),Qr=rK(),sa=mq(),xs=pq(),Pr=xq(),ia=yq();p.useEffect(()=>{Y.auth.onAuthStateChange((D,je)=>{t((je==null?void 0:je.user)??null),n(!1)}),Y.auth.getSession().then(({data:{session:D}})=>{t((D==null?void 0:D.user)??null),n(!1)})},[]);const xn=async D=>{D.preventDefault(),g(""),b(!0);const{error:je}=await Y.auth.signInWithPassword({email:d,password:f});je&&g("Invalid credentials. Please try again."),b(!1)},oa=async()=>{await Y.auth.signOut()},Js=Te.length>0?Te:OK.map(D=>({id:D.id,slug:null,name:D.name,category:D.category,image:D.image,images:[],price:D.price,price_max:D.priceMax||null,sale_price:null,description:D.description,description_it:null,specs:D.specs,badges:D.badges||[],featured:D.featured||!1,configurable:!1,fps_check_enabled:!0,template:"gaming",productivity_metrics:{},status:"active",created_at:new Date().toISOString(),updated_at:new Date().toISOString()})),tc=Js.filter(D=>D.name.toLowerCase().includes(c.toLowerCase())),aa=Kt.filter(D=>D.name.toLowerCase().includes(c.toLowerCase())),rc=Ys.filter(D=>D.title.toLowerCase().includes(c.toLowerCase())||D.slug.toLowerCase().includes(c.toLowerCase())),nc=()=>{N(null),x(!0)},Hn=D=>{N(D),x(!0)},Mm=D=>{E(D),k(!0)},we=D=>{const je={name:D.name,slug:D.slug||null,category:D.category,image:D.image,images:D.images||[],price:D.price,price_max:D.priceMax||null,sale_price:D.sale_price||null,description:D.description,description_it:D.description_it||null,specs:D.specs,badges:D.badges||[],featured:D.featured||!1,configurable:D.configurable||!1,fps_check_enabled:D.fps_check_enabled!==!1,template:D.template||"gaming",productivity_metrics:D.productivity_metrics||{},status:"active"};S?J.mutate({id:S.id,...je}):te.mutate(je)},qe=()=>{A&&(G.mutate(A.id),E(null))},Xe=()=>{L(null),F(!0)}
643,Tr=D=>{L(D),F(!0)},Rr=D=>{O(D),M(!0)},Wn=D=>{const je={name:D.name,product_id:D.productId,base_price:D.basePrice,categories:D.categories,status:"active"};C?Re.mutate({id:C.id,...je}):ie.mutate(je)},ys=()=>{I&&(We.mutate(I.id),O(null))},Or=D=>D.categories.reduce((je,xt)=>je+xt.options.length,0),yn=()=>{re(null),z(!0)},sO=D=>{re(D),z(!0)},iO=D=>{fe(D),Me(!0)},oO=D=>{B?gn.mutate({id:B.id,...D}):tr.mutate(D),z(!1)},aO=()=>{Q&&(Qr.mutate(Q.id),fe(null),Me(!1))};return r||i?o.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center",children:[o.jsx($t,{title:"Admin",noIndex:!0}),o.jsx(st,{className:"animate-spin text-muted-foreground",size:32})]}):e&&!s?o.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:[o.jsx($t,{title:"Admin",noIndex:!0}),o.jsxs("div",{className:"bg-card border border-border rounded-lg p-8 w-full max-w-md text-center",children:[o.jsxs("div",{className:"mb-6",children:[o.jsx("img",{src:Fi,alt:"OVERCLOCK",className:"h-12 mx-auto mb-4"}),o.jsx("h1",{className:"text-xl font-bold text-foreground",children:"Access Denied"}),o.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"You don't have admin privileges. Please sign in with an admin account."})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("button",{onClick:oa,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground
643/90 transition-colors",children:[o.jsx(Sx,{size:16}),"Sign Out"]}),o.jsxs(Z,{to:"/",className:"flex items-center justify-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[o.jsx(Wc,{size:16}),"Back to Store"]})]})]})]}):e?o.jsxs("div",{className:"min-h-screen bg-background flex",children:[o.jsx($t,{title:"Admin",noIndex:!0}),o.jsxs("aside",{className:"w-60 bg-card border-r border-border flex flex-col",children:[o.jsx("div",{className:"p-4 border-b border-border",children:o.jsx(Z,{to:"/",className:"flex items-center gap-2",children:o.jsx("img",{src:Fi,alt:"OVERCLOCK",className:"h-10"})})}),o.jsx("nav",{className:"flex-1 p-3",children:bG.map(D=>o.jsxs("button",{onClick:()=>l(D.id),className:`w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors mb-1 ${a===D.id?"bg-foreground text-background font-medium":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,children:[o.jsx(D.icon,{size:18}),D.label]},D.id))}),o.jsxs("div",{className:"p-3 border-t border-border space-y-1",children:[o.jsx("div",{className:"px-3 py-2 text-xs text-muted-foreground truncate",children:e.email}),o.jsxs("button",{onClick:oa,className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[o.jsx(Sx,{size:16}),"Sign Out"]}),o.jsxs(Z,{to:"/",className:"flex items-center gap-2 px-3 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[o.jsx(Wc,{size:16}),"Back to Store"]})]})]}),o.jsxs("main",{className:"flex-1 overflow-auto",children:[o.jsxs("header",{className:"bg-card border-b border-border px-6 py-4 flex items-center justify-between",children:[o.jsx("h1",{className:"text-xl font-bold text-foreground capitalize",children:a}),o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{className:"relative",children:[o.jsx(qo,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),o.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:D=>u(D.target.value),className:"pl-9 pr-4 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground w-64"})]})})]}),o.jsxs("div",{className:"p-6",children:[a==="dashboard"&&o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[o.jsxs("div",{className:"bg-card border border-border rounded-lg p-4",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Revenue"}),o.jsx("div",{className:"flex items-baseline gap-2 mt-1",children:o.jsxs("span",{className:"text-2xl font-bold text-foreground",children:["â¬",((V==null?void 0:V.totalRevenue)||0).toLocaleString()]})})]}),o.jsxs("div",{className:"bg-card border border-border rounded-lg p-4",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Orders"}),o.jsx("div",{className:"flex items-baseline gap-2 mt-1",children:o.jsx("span",{className:"text-2xl font-bold text-foreground",children:(V==null?void 0:V.totalOrders)||0})})]}),o.jsxs("div",{className:"bg-card border border-border rounded-lg p-4",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Customers"}),o.jsx("div",{className:"flex items-baseline gap-2 mt-1",children:o.jsx("span",{className:"text-2xl font-bold text-foreground",children:(V==null?void 0:V.totalCustomers)||0})})]}),o.jsxs("div",{className:"bg-card border border-border rounded-lg p-4",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Products"}),o.jsx("div",{className:"flex items-baseline gap-2 mt-1",children:o.jsx("span",{className:"text-2xl font-bold text-foreground",children:(V==null?void 0:V.totalProducts)||0})})]})]}),o.jsxs("div",{className:"bg-card border border-border rounded-lg",children:[o.jsx("div",{className:"px-4 py-3 border-b border-border",children:o.jsx("h2",{className:"font-semibold text-foreground",children:"Recent Orders"})}),gt.length===0?o.jsx("div",{className:"p-4",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No orders yet. Orders will appear here once customers start purchasing."})}):o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-muted/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Order ID"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Customer"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Total"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Status"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Date"})]})}),o.jsx("tbody",{className:"divide-y divide-border",children:gt.slice(0,5).map(D=>{var je;return o.jsxs("tr",{className:"hover:bg-muted/30",children:[o.jsxs("td",{className:"px-4 py-3 text-sm font-mono text-foreground",children:[D.id.slice(0,8),"..."]}),o.jsx("td",{className:"px-4 py-3 text-sm text-foreground",children:((je=D.shipping_address)==null?void 0:je.full_name)||"N/A"}),o.jsxs("td",{className:"px-4 py-3 text-sm text-foreground",children:["â¬",D.total.toLocaleStr
643ing()]}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${D.status==="completed"?"bg-green-500/10 text-green-500":D.status==="pending"?"bg-yellow-500/10 text-yellow-500":D.status==="cancelled"?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"}`,children:D.status})}),o.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:new Date(D.created_at).toLocaleDateString()})]},D.id)})})]})})]})]}),a==="products"&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:Nt?"Loading...":`${tc.length} products`}),o.jsxs("button",{onClick:nc,className:"flex items-center gap-2 px-4 py-2 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground/90 transition-colors",children:[o.jsx(Yt,{size:16}),"Add Product"]})]}),o.jsx("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-muted/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Product"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Category"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Price"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Status"}),o.jsx("th",{className:"text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Actions"})]})}),o.jsx("tbody",{className:"divide-y divide-border",children:tc.map(D=>o.jsxs("tr",{className:"hover:bg-muted/30",children:[o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("img",{src:D.image||"/placeholder.svg",alt:D.name,className:"w-10 h-10 object-contain bg-muted rounded"}),o.jsx("span",{className:"text-sm font-medium text-foreground line-clamp-1",children:D.name.split(" - ")[0]})]})}),o.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground capitalize",children:D.category}),o.jsxs("td",{className:"px-4 py-3 text-sm text-foreground",children:["â¬",D.price.toLocaleString()]}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("span",{className:"px-2 py-1 bg-green-500/10 text-green-500 text-xs rounded-full",children:D.status})}),o.jsx("td",{className:"px-4 py-3 text-right",children:o.jsxs("div",{className:"flex items-center justify-end gap-1",children:[o.jsx("button",{onClick:()=>Hn(D),className:"p-1.5 hover:bg-muted rounded transition-colors",title:"Edit product",children:o.jsx(Dd,{size:14,className:"text-muted-foreground"})}),o.jsx("button",{onClick:()=>Mm(D),className:"p-1.5 hover:bg-red-500/10 rounded transition-colors",title:"Delete product",children:o.jsx(or,{size:14,className:"text-red-500"})})]})})]},D.id))})]})})]}),a==="configurator"&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:Er?"Loading...":`${aa.length} configurable products`}),o.jsxs("button",{onClick:Xe,className:"flex items-center gap-2 px-4 py-2 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground
643/90 transition-colors",children:[o.jsx(Yt,{size:16}),"Create Configurator"]})]}),aa.length===0&&!Er?o.jsxs("div",{className:"bg-card border border-border rounded-lg p-8 text-center",children:[o.jsx(Ax,{size:48,className:"mx-auto text-muted-foreground mb-4"}),o.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"No Configurators Yet"}),o.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Create configurable products that let customers choose their specs."}),o.jsxs("button",{onClick:Xe,className:"inline-flex items-center gap-2 px-4 py-2 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground/90 transition-colors",children:[o.jsx(Yt,{size:16}),"Create Your First Configurator"]})]}):o.jsx("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-muted/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Name"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Base Price"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Categories"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Options"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Status"}),o.jsx("th",{className:"text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Actions"})]})}),o.jsx("tbody",{className:"divide-y divide-border",children:aa.map(D=>o.jsxs("tr",{className:"hover:bg-muted/30",children:[o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-10 h-10 bg-muted rounded flex items-center justify-center",children:o.jsx(Ax,{size:18,className:"text-muted-foreground"})}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:D.name})]})}),o.jsxs("td",{className:"px-4 py-3 text-sm text-foreground",children:["â¬",D.base_price.toLocaleString()]}),o.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:D.categories.length}),o.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:Or(D)}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("span",{className:"px-2 py-1 bg-green-500/10 text-green-500 text-xs rounded-full",children:D.status})}),o.jsx("td",{className:"px-4 py-3 text-right",children:o.jsxs("div",{className:"flex items-center justify-end gap-1",children:[o.jsx("button",{onClick:()=>Tr(D),className:"p-1.5 hover:bg-muted rounded transition-colors",title:"Edit configurator",children:o.jsx(Dd,{size:14,className:"text-muted-foreground"})}),o.jsx("button",{onClick:()=>Rr(D),className:"p-1.5 hover:bg-red-500/10 rounded transition-colors",title:"Delete configurator",children:o.jsx(or,{size:14,className:"text-red-500"})})]})})]},D.id))})]})})]}),a==="collections"&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:Gr?"Loading...":`${rc.length} pagine collezione`}),o.jsxs("button",{onClick:yn,className:"flex items-center gap-2 px-4 py-2 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground
643/90 transition-colors",children:[o.jsx(Yt,{size:16}),"Nuova Pagina"]})]}),rc.length===0&&!Gr?o.jsxs("div",{className:"bg-card border border-border rounded-lg p-8 text-center",children:[o.jsx(yu,{size:48,className:"mx-auto text-muted-foreground mb-4"}),o.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"Nessuna Pagina Collezione"}),o.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Crea pagine per le tue collezioni di prodotti (Workstation, Gaming, ecc.)"}),o.jsxs("button",{onClick:yn,className:"inline-flex items-center gap-2 px-4 py-2 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground/90 transition-colors",children:[o.jsx(Yt,{size:16}),"Crea la Prima Pagina"]})]}):o.jsx("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-muted/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Titolo"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Slug"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Prodotti"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Stato"}),o.jsx("th",{className:"text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Azioni"})]})}),o.jsx("tbody",{className:"divide-y divide-border",children:rc.map(D=>{var je;return o.jsxs("tr",{className:"hover:bg-muted/30",children:[o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[D.hero_image?o.jsx("img",{src:D.hero_image,alt:D.title,className:"w-10 h-10 object-cover rounded"}):o.jsx("div",{className:"w-10 h-10 bg-muted rounded flex items-center justify-center",children:o.jsx(yu,{size:18,className:"text-muted-foreground"})}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:D.title})]})}),o.jsxs("td",{className:"px-4 py-3 text-sm text-muted-foreground font-mono",children:["/collection/",D.slug]}),o.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:((je=D.products)==null?void 0:je.length)||0}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${D.status==="active"?"bg-green-500/10 text-green-500":"bg-yellow-500/10 text-yellow-500"}`,children:D.status})}),o.jsx("td",{className:"px-4 py-3 text-right",children:o.jsxs("div",{className:"flex items-center justify-end gap-1",children:[o.jsx("button",{onClick:()=>sO(D),className:"p-1.5 hover:bg-muted rounded transition-colors",title:"Modifica pagina",children:o.jsx(Dd,{size:14,className:"text-muted-foreground"})}),o.jsx("button",{onClick:()=>iO(D),className:"p-1.5 hover:bg-red-500/10 rounded transition-colors",title:"Elimina pagina",children:o.jsx(or,{size:14,className:"text-red-500"})})]})})]},D.id)})})]})})]}),a==="fps-check"&&o.jsx(zK,{products:Js}),a==="orders"&&o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"flex items-center justify-between",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:Kr?"Loading...":`${gt.length} orders`})}),gt.length===0&&!Kr?o.jsxs("div",{className:"bg-card border border-border rounded-lg p-8 text-center",children:[o.jsx(us,{size:48,className:"mx-auto text-muted-foreground mb-4"}),o.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"No orders yet"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Orders will appear here when customers make purchases."})]}):o.jsx("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-muted/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Order ID"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Customer"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Items"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Total"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Status"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Date"}),o.jsx("th",{className:"text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Actions"})]})}),o.jsx("tbody",{className:"divide-y divide-border",children:gt.map(D=>{var je,xt,lt;return o.jsxs("tr",{className:"hover:bg-muted/30",children:[o.jsxs("td",{className:"px-4 py-3 text-sm font-mono text-foreground",children:[D.id.slice(0,8),"..."]}),o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:((je=D.shipping_address)==null?void 0:je.full_name)||"N/A"}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[(xt=D.shipping_address)==null?void 0:xt.city,", ",(lt=D.shipping_address)==null?void 0:lt.country]})]})}),o.jsxs("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:[D.items.length," item(s)"]}),o.jsxs("td",{className:"px-4 py-3 text-sm font-medium text-foreground",children:["â¬",D.total.toLocaleStr
643ing()]}),o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{className:"flex flex-col items-start gap-1",children:[o.jsxs("select",{value:D.status,onChange:vs=>sa.mutate({id:D.id,status:vs.target.value}),className:`px-2 py-1 text-xs rounded-full border-0 cursor-pointer ${D.status==="completed"?"bg-green-500/10 text-green-500":D.status==="pending"?"bg-yellow-500/10 text-yellow-500":D.status==="cancelled"?"bg-red-500/10 text-red-500":D.status==="processing"?"bg-blue-500/10 text-blue-500":D.status==="shipped"?"bg-purple-500/10 text-purple-500":"bg-muted text-muted-foreground"}`,children:[o.jsx("option",{value:"pending",children:"Pending"}),o.jsx("option",{value:"processing",children:"Processing"}),o.jsx("option",{value:"shipped",children:"Shipped"}),o.jsx("option",{value:"completed",children:"Completed"}),o.jsx("option",{value:"cancelled",children:"Cancelled"})]}),D.tracking_number&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-[10px] font-medium rounded-full bg-emerald-500/10 text-emerald-500",title:`Tracking sent to customer${D.carrier?` via ${D.carrier}`:""}: ${D.tracking_number}`,children:[o.jsx(jD,{size:10}),"Tracking sent"]})]})}),o.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:new Date(D.created_at).toLocaleDateString()}),o.jsx("td",{className:"px-4 py-3 text-right",children:o.jsxs("div",{className:"flex items-center justify-end gap-1",children:[D.status==="paid"&&o.jsx("button",{onClick:()=>ee(D),className:"p-1.5 hover:bg-purple-500/10 rounded transition-colors",title:"Ship order",children:o.jsx(on,{size:14,className:"text-purple-500"})}),o.jsx("button",{onClick:()=>{var Zr,ei,hd,Ab,Nb,Cb,_b,Eb;const vs=` 644Order ID: ${D.id} 645Customer: ${((Zr=D.shipping_address)==null?void 0:Zr.full_name)||"N/A"} 646Address: ${((ei=D.shipping_address)==null?void 0:ei.address_line1)||""} ${((hd=D.shipping_address)==null?void 0:hd.address_line2)||""} 647City: ${((Ab=D.shipping_address)==null?void 0:Ab.city)||""}, ${((Nb=D.shipping_address)==null?void 0:Nb.province)||""} 648Postal: ${((Cb=D.shipping_address)==null?void 0:Cb.postal_code)||""} 649Country: ${((_b=D.shipping_address)==null?void 0:_b.country)||""} 650Phone: ${((Eb=D.shipping_address)==null?void 0:Eb.phone)||"N/A"} 651Items: ${D.items.map(Pb=>`${Pb.product_name} x${Pb.quantity}`).join(", ")} 652Total: â¬${D.total} 653Status: ${D.status} 654 `.trim();alert(vs)},className:"p-1.5 hover:bg-muted rounded transition-colors",title:"View order details",children:o.jsx(Dd,{size:14,className:"text-muted-foreground"})}),o.jsx("button",{onClick:()=>He(D),className:"p-1.5 hover:bg-red-500/10 rounded transition-colors",title:"Delete order",children:o.jsx(or,{size:14,className:"text-red-500"})})]})})]},D.id)})})]})}),Ze&&o.jsx(vG,{order:Ze,isOpen:!!Ze,onClose:()=>ee(null)}),o.jsx(wc,{isOpen:!!Pe,onClose:()=>He(null),onConfirm:()=>{Pe&&(xs.mutate(Pe.id),He(null))},title:"Delete Order",description:`Are you sure you want to delete order #${Pe==null?void 0:Pe.id.slice(0,8)}? This action cannot be undone.`})]}),a==="customers"&&o.jsxs("div",{className:"space-y-6",children:[o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Customers from orders: ",(V==null?void 0:V.totalCustomers)||0]}),gt.length===0?o.jsxs("div",{className:"bg-card border border-border rounded-lg p-8 text-center",children:[o.jsx(wu,{size:48,className:"mx-auto text-muted-foreground mb-4"}),o.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"No customers yet"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Customer data will appear here when users make purchases."})]}):o.jsx("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-muted/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Customer"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"User ID"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Location"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Orders"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Total Spent"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Role"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Last Order"})]})}),o.jsx("tbody",{className:"divide-y divide-border",children:(()=>{const D=new Map;return gt.forEach(je=>{var lt;const xt=D.get(je.user_id);xt?xt.orders.push(je):D.set(je.user_id,{orders:[je],name:((lt=je.shipping_address)==null?void 0:lt.full_name)||"Unknown",location:je.shipping_address?`${je.shipping_address.city}, ${je.shipping_address.country}`:"N/A",userId:je.user_id})}
654),Array.from(D.entries()).map(([je,xt])=>{const lt=xt.orders.reduce((ei,hd)=>ei+hd.total,0),vs=xt.orders[0],Zr=T.find(ei=>ei.user_id===je);return o.jsxs("tr",{className:"hover:bg-muted/30",children:[o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-8 h-8 bg-muted rounded-full flex items-center justify-center",children:o.jsx(wu,{size:14,className:"text-muted-foreground"})}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:xt.name})]})}),o.jsxs("td",{className:"px-4 py-3 text-xs font-mono text-muted-foreground",children:[je.slice(0,8),"..."]}),o.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:xt.location}),o.jsx("td",{className:"px-4 py-3 text-sm text-foreground",children:xt.orders.length}),o.jsxs("td",{className:"px-4 py-3 text-sm font-medium text-foreground",children:["â¬",lt.toLocaleString()]}),o.jsx("td",{className:"px-4 py-3",children:Zr?o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("select",{value:Zr.role,onChange:ei=>Pr.mutate({id:Zr.id,role:ei.target.value}),className:`px-2 py-1 text-xs rounded-full border-0 cursor-pointer ${Zr.role==="admin"?"bg-red-500/10 text-red-500":Zr.role==="moderator"?"bg-blue-500/10 text-blue-500":"bg-green-500/10 text-green-500"}`,children:[o.jsx("option",{value:"user",children:"User"}),o.jsx("option",{value:"moderator",children:"Moderator"}),o.jsx("option",{value:"admin",children:"Admin"})]}),o.jsx("button",{onClick:()=>Ne(Zr),className:"p-1 hover:bg-red-500/10 rounded transition-colors",title:"Remove role",children:o.jsx(or,{size:12,className:"text-red-500"})})]}):o.jsx("span",{className:"px-2 py-1 text-xs rounded-full bg-muted text-muted-foreground",children:"No role"})}),o.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:new Date(vs.created_at).toLocaleDateString()})]},je)})})()})]})}),o.jsxs("div",{className:"mt-8",children:[o.jsx("h3",{className:"text-lg font-semibold text-foreground mb-4",children:"User Roles"}),$?o.jsx("div",{className:"flex items-center justify-center py-8",children:o.jsx(st,{className:"animate-spin text-muted-foreground",size:24})}):T.length===0?o.jsx("div",{className:"bg-card border border-border rounded-lg p-6 text-center",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No user roles assigned yet."})}):o.jsx("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-muted/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"User ID"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Role"}),o.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Assigned"}),o.jsx("th",{className:"text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase",children:"Actions"})]})}),o.jsx("tbody",{className:"divide-y divide-border",children:T.map(D=>o.jsxs("tr",{className:"hover:bg-muted/30",children:[o.jsxs("td",{className:"px-4 py-3 text-sm font-mono text-foreground",children:[D.user_id.slice(0,8),"..."]}),o.jsx("td",{className:"px-4 py-3",children:o.jsxs("select",{value:D.role,onChange:je=>Pr.mutate({id:D.id,role:je.target.value}),className:`px-2 py-1 text-xs rounded-full border-0 cursor-pointer ${D.role==="admin"?"bg-red-500/10 text-red-500":D.role==="moderator"?"bg-blue-500/10 text-blue-500":"bg-green-500/10 text-green-500"}`,children:[o.jsx("option",{value:"user",children:"User"}),o.jsx("option",{value:"moderator",children:"Moderator"}),o.jsx("option",{value:"admin",children:"Admin"})]})}),o.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:new Date(D.created_at).toLocaleDateString()}),o.jsx("td",{className:"px-4 py-3 text-right",children:o.jsx("button",{onClick:()=>Ne(D),className:"p-1.5 hover:bg-red-500/10 rounded transition-colors",title:"Delete role",children:o.jsx(or,{size:14,className:"text-red-500"})})})]},D.id))})]})})]}),o.jsx(wc,{isOpen:!!Ae,onClose:()=>Ne(null),onConfirm:()=>{Ae&&(ia.mutate(Ae.id),Ne(null))},title:"Delete User Role",description:`Are you sure you want to remove the ${Ae==null?void 0:Ae.role} role from this user? They will lose their privileges.`})]}),a==="analytics"&&o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"bg-card border border-border rounded-lg p-4",children:[o.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Total Revenue"}),o.jsxs("p",{className:"text-3xl font-bold text-foreground",children:["â¬",((V==null?void 0:V.totalRevenue)||0).toLocaleStr
654ing()]})]}),o.jsxs("div",{className:"bg-card border border-border rounded-lg p-4",children:[o.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Average Order Value"}),o.jsxs("p",{className:"text-3xl font-bold text-foreground",children:["â¬",V!=null&&V.totalOrders?Math.round((V.totalRevenue||0)/V.totalOrders).toLocaleString():0]})]}),o.jsxs("div",{className:"bg-card border border-border rounded-lg p-4",children:[o.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Conversion Rate"}),o.jsx("p",{className:"text-3xl font-bold text-foreground",children:"--"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Coming soon"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"bg-card border border-border rounded-lg p-4",children:[o.jsx("h3",{className:"font-semibold text-foreground mb-4",children:"Orders by Status"}),o.jsx("div",{className:"space-y-3",children:["pending","processing","shipped","completed","cancelled"].map(D=>{const je=gt.filter(lt=>lt.status===D).length,xt=gt.length>0?je/gt.length*100:0;return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-sm text-muted-foreground capitalize w-24",children:D}),o.jsx("div",{className:"flex-1 bg-muted rounded-full h-2 overflow-hidden",children:o.jsx("div",{className:`h-full ${D==="completed"?"bg-green-500":D==="pending"?"bg-yellow-500":D==="cancelled"?"bg-red-500":D==="processing"?"bg-blue-500":"bg-purple-500"}`,style:{width:`${xt}%`}})}),o.jsx("span",{className:"text-sm font-medium text-foreground w-8",children:je})]},D)})})]}),o.jsxs("div",{className:"bg-card border border-border rounded-lg p-4",children:[o.jsx("h3",{className:"font-semibold text-foreground mb-4",children:"Top Products"}),o.jsx("div",{className:"space-y-3",children:(()=>{const D=new Map;gt.forEach(xt=>{xt.items.forEach(lt=>{var Zr;const vs=D.get(lt.product_id);vs?(vs.count+=lt.quantity,vs.revenue+=lt.price*lt.quantity):D.set(lt.product_id,{name:((Zr=lt.product_name)==null?void 0:Zr.split(" â ")[0])||"Unknown",count:lt.quantity,revenue:lt.price*lt.quantity})})});const je=Array.from(D.values()).sort((xt,lt)=>lt.revenue-xt.revenue).slice(0,5);return je.length===0?o.jsx("p",{className:"text-sm text-muted-foreground",children:"No sales data yet"}):je.map((xt,lt)=>o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-sm text-foreground truncate max-w-[200px]",children:xt.name}),o.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:["â¬",xt.revenue.toLocaleString()]})]},lt))})()})]})]})]}),a==="settings"&&o.jsx("div",{className:"space-y-4",children:o.jsxs("div",{className:"bg-card border border-border rounded-lg p-4",children:[o.jsx("h3",{className:"font-semibold text-foreground mb-4",children:"Store Settings"}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Store Name"}),o.jsx("input",{type:"text",defaultValue:"OVERCLOCK",className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Contact Email"}),o.jsx("input",{type:"email",defaultValue:"[email protected]",className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground"})]}),o.jsx("button",{className:"px-4 py-2 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground
654/90 transition-colors",children:"Save Changes"})]})]})})]})]}),o.jsx(DK,{isOpen:y,onClose:()=>x(!1),onSave:we,product:S?{id:S.id,slug:S.slug,name:S.name,category:S.category,image:S.image,images:S.images,price:S.price,price_max:S.price_max,sale_price:S.sale_price,description:S.description,description_it:S.description_it,specs:S.specs,badges:S.badges,featured:S.featured,configurable:S.configurable,fps_check_enabled:S.fps_check_enabled,template:S.template??null}:null}),o.jsx(wc,{isOpen:j,onClose:()=>k(!1),onConfirm:qe,productName:(A==null?void 0:A.name.split(" - ")[0])||""}),o.jsx(LK,{isOpen:_,onClose:()=>F(!1),onSave:Wn,availableProducts:Js,product:C?{id:C.id,name:C.name,productId:C.product_id,basePrice:C.base_price,categories:C.categories}:null}),o.jsx(wc,{isOpen:U,onClose:()=>M(!1),onConfirm:ys,productName:(I==null?void 0:I.name)||""}),o.jsx(yG,{isOpen:P,onClose:()=>z(!1),onSave:oO,page:B}),o.jsx(wc,{isOpen:pe,onClose:()=>Me(!1),onConfirm:aO,productName:(Q==null?void 0:Q.title)||""})]}):o.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:[o.jsx($t,{title:"Admin",noIndex:!0}),o.jsxs("div",{className:"bg-card border border-border rounded-lg p-8 w-full max-w-md",children:[o.jsxs("div",{className:"text-center mb-6",children:[o.jsx("img",{src:Fi,alt:"OVERCLOCK",className:"h-12 mx-auto mb-4"}),o.jsx("h1",{className:"text-xl font-bold text-foreground",children:"Admin Login"}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Sign in to manage your store"})]}),o.jsxs("form",{onSubmit:xn,className:"space-y-4",children:[v&&o.jsx("div",{className:"p-3 bg-red-500/10 border border-red-500/20 rounded-lg text-sm text-red-500",children:v}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Email"}),o.jsx("input",{type:"email",required:!0,value:d,onChange:D=>h(D.target.value),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"[email protected]"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm text-muted-foreground mb-1",children:"Password"}),o.jsx("input",{type:"password",required:!0,value:f,onChange:D=>m(D.target.value),className:"w-full px-3 py-2 bg-muted border border-border rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-foreground",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢"})]}),o.jsxs("button",{type:"submit",disabled:w,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground
654/90 transition-colors disabled:opacity-50",children:[w?o.jsx(st,{size:16,className:"animate-spin"}):o.jsx(wD,{size:16}),"Sign In"]})]}),o.jsx("p",{className:"text-xs text-muted-foreground text-center mt-4",children:"Don't have an account? Enter your email and password to create one."}),o.jsx("div",{className:"mt-6 pt-4 border-t border-border",children:o.jsxs(Z,{to:"/",className:"flex items-center justify-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[o.jsx(Wc,{size:16}),"Back to Store"]})})]})]})}function jG(){const{t:e}=Rt(),t=Un(),{cartItems:r,isLoading:n,updateQuantity:s,removeFromCart:i,cartTotal:a,clearCart:l}=Xs();return n?o.jsx(Je,{children:o.jsxs("div",{className:"container mx-auto px-4 py-8",children:[o.jsx("h1",{className:"text-3xl font-bold mb-8",children:e("cart.yourCart")}),o.jsx("div",{className:"space-y-4",children:[...Array(3)].map((c,u)=>o.jsx("div",{className:"h-24 bg-muted/50 rounded-lg animate-pulse"},u))})]})}):r.length===0?o.jsx(Je,{children:o.jsxs("div",{className:"container mx-auto px-4 py-8",children:[o.jsx("h1",{className:"text-3xl font-bold mb-8",children:e("cart.yourCart")}),o.jsxs("div",{className:"text-center py-16",children:[o.jsx(us,{className:"mx-auto h-16 w-16 text-muted-foreground/50 mb-6"}),o.jsx("h2",{className:"text-xl font-medium mb-4",children:e("cart.emptyCart")}),o.jsx("p",{className:"text-muted-foreground mb-6",children:e("cart.startAdding")}),o.jsx(Z,{to:"/products",children:o.jsx(ue,{children:e("common.browseProducts")})})]})]})}):o.jsxs(Je,{children:[o.jsx($t,{title:"Shopping Cart",description:"Review the gaming PCs and notebooks in your OVERCLOCK cart. Update quantities, view totals, and proceed to secure checkout.",noIndex:!0}),o.jsxs("div",{className:"container mx-auto px-4 py-8",children:[o.jsx("h1",{className:"text-3xl font-bold mb-8",children:e("cart.yourCart")}),o.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[o.jsxs("div",{className:"lg:col-span-2 space-y-4",children:[r.map(c=>{var u,d,h,f,m;return o.jsxs("div",{className:"flex gap-4 p-4 bg-card border border-border rounded-lg",children:[o.jsx(Z,{to:`/product/${c.product_id}`,className:"w-24 h-24 bg-black rounded-lg shrink-0 overflow-hidden",children:o.jsx("img",{src:((u=c.product)==null?void 0:u.image)||"/placeholder.svg",alt:(d=c.product)==null?void 0:d.name,className:"w-full h-full object-contain p-2"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx(Z,{to:`/product/${c.product_id}`,className:"font-semibold hover:text-primary transition-colors line-clamp-2",children:(h=c.product)==null?void 0:h.name}),c.configuration&&Object.keys(c.configuration).length>0&&o.jsx("div",{className:"mt-2 space-y-1",children:Object.entries(c.configuration).filter(([v])=>!v.endsWith("_price")&&v!=="total_price").map(([v,g])=>o.jsxs("p",{className:"text-xs text-muted-foreground",children:[o.jsxs("span",{className:"font-medium",children:[v,":"]})," ",String(g)]},v))}),o.jsxs("p",{className:"text-lg font-bold mt-2",children:["â¬",(((f=c.configuration)==null?void 0:f.total_price)||((m=c.product)==null?void 0:m.price)||0).toLocaleString("de-DE")]})]}),o.jsxs("div",{className:"flex flex-col items-end justify-between",children:[o.jsx("button",{type:"button",onClick:()=>i.mutate(c.id),className:"text-muted-foreground hover:text-destructive transition-colors",children:o.jsx(or,{size:18})}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{type:"button",onClick:()=>s.mutate({itemId:c.id,quantity:c.quantity-1}),className:"w-8 h-8 flex items-center justify-center border border-border rounded hover:bg-muted transition-colors",children:o.jsx(Yv,{size:14})}),o.jsx("span",{className:"w-8 text-center font-medium",children:c.quantity}),o.jsx("button",{type:"button",onClick:()=>s.mutate({itemId:c.id,quantity:c.quantity+1}),className:"w-8 h-8 flex items-center justify-center border border-border rounded hover:bg-muted transition-colors",children:o.jsx(Yt,{size:14})})]})]})]},c.id)}),o.jsx("button",{type:"button",onClick:()=>l.mutate(),className:"text-sm text-muted-foreground hover:text-destructive transition-colors",children:e("cart.clearCart")})]}),o.jsx("div",{className:"lg:col-span-1",children:o.jsxs("div",{className:"bg-card border border-border rounded-lg p-6 sticky top-24",children:[o.jsx("h2",{className:"text-lg font-bold mb-4",children:e("cart.orderSummary")}
654),o.jsxs("div",{className:"space-y-3 mb-6",children:[o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:e("cart.subtotal")}),o.jsxs("span",{children:["â¬",a.toLocaleString("de-DE")]})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:e("cart.shipping")}),o.jsx("span",{className:"text-green-500",children:e("cart.free")})]}),o.jsxs("div",{className:"border-t border-border pt-3 flex justify-between font-bold",children:[o.jsx("span",{children:e("cart.total")}),o.jsxs("span",{children:["â¬",a.toLocaleString("de-DE")]})]})]}),o.jsxs(ue,{className:"w-full",size:"lg",onClick:()=>t("/checkout"),children:[e("cart.checkout"),o.jsx(rf,{size:18,className:"ml-2"})]}),o.jsx("p",{className:"text-xs text-muted-foreground text-center mt-4",children:e("cart.taxesCalculated")})]})})]})]})]})}function kG(){const{t:e}=Rt(),{user:t,loading:r}=Zs(),{wishlistItems:n,isLoading:s,removeFromWishlist:i}=FT(),{addToCart:a}=Xs();return r?o.jsx(Je,{children:o.jsx("div",{className:"container mx-auto px-4 py-16 text-center",children:o.jsx("div",{className:"animate-pulse",children:e("common.loading")})})}):t?o.jsxs(Je,{children:[o.jsx($t,{title:"Wishlist",description:"View your saved products at OVERCLOCK. Keep track of gaming PCs and notebooks you love.",noIndex:!0}),o.jsxs("div",{className:"container mx-auto px-4 py-8",children:[o.jsx("h1",{className:"text-3xl font-bold mb-8",children:e("wishlist.yourWishlist")}),s?o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:[...Array(4)].map((l,c)=>o.jsx("div",{className:"h-64 bg-muted/50 rounded-lg animate-pulse"},c))}):n.length===0?o.jsxs("div",{className:"text-center py-16",children:[o.jsx(Is,{className:"mx-auto h-16 w-16 text-muted-foreground/50 mb-6"}),o.jsx("h2",{className:"text-xl font-medium mb-4",children:e("wishlist.emptyWishlist")}),o.jsx("p",{className:"text-muted-foreground mb-6",children:e("wishlist.saveProducts")}),o.jsx(Z,{to:"/products",children:o.jsx(ue,{children:e("common.browseProducts")})})]}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:n.map(l=>{var c,u,d,h,f;return o.jsxs("div",{className:"bg-card border border-border rounded-lg overflow-hidden group",children:[o.jsxs(Z,{to:`/product/${l.product_id}`,className:"block aspect-square bg-black relative",children:[o.jsx("img",{src:((c=l.product)==null?void 0:c.image)||"/placeholder.svg",alt:(u=l.product)==null?void 0:u.name,className:"w-full h-full object-contain p-4 group-hover:scale-105 transition-transform duration-300"}),o.jsx("button",{onClick:m=>{m.preventDefault(),i.mutate(l.product_id)},className:"absolute top-3 right-3 p-2 bg-background/80 rounded-full hover:bg-destructive hover:text-destructive-foreground transition-colors",children:o.jsx(or,{size:16})})]}),o.jsxs("div",{className:"p-4",children:[o.jsx(Z,{to:`/product/${l.product_id}`,className:"font-semibold hover:text-primary transition-colors line-clamp-2 text-sm",children:(d=l.product)==null?void 0:d.name}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1 capitalize",children:(h=l.product)==null?void 0:h.category}),o.jsxs("p",{className:"text-lg font-bold mt-2",children:["â¬",(f=l.product)==null?void 0:f.price.toLocaleString("de-DE")]}),o.jsxs(ue,{className:"w-full mt-4",size:"sm",onClick:()=>a.mutate({productId:l.product_id,product:l.product?{id:l.product.id,name:l.product.name,price:l.product.price,image:l.product.image}:void 0}),children:[o.jsx(us,{size:16,className:"mr-2"}),e("product.addToCart")]})]})]},l.id)})})]})]}):o.jsx(Je,{children:o.jsxs("div",{className:"container mx-auto px-4 py-16 text-center",children:[o.jsx(Is,{className:"mx-auto h-16 w-16 text-muted-foreground/50 mb-6"}),o.jsx("h1",{className:"text-2xl font-bold mb-4",children:e("wishlist.yourWishlist")}),o.jsx("p",{className:"text-muted-foreground mb-6",children:e("wishlist.pleaseLogIn")}),o.jsx(Z,{to:"/auth",children:o.jsx(ue,{children:e("common.logIn")})})]})})}var NR=["PageUp","PageDown"],CR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_R={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ec="Slider",[zy,SG,AG]=Uv(ec),[ER,MX]=hs(ec,[AG]),[NG,Dm]=ER(ec),PR=p.forwardRef((e,t)=>
654{const{name:r,min:n=0,max:s=100,step:i=1,orientation:a="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[n],value:d,onValueChange:h=()=>{},onValueCommit:f=()=>{},inverted:m=!1,form:v,...g}=e,w=p.useRef(new Set),b=p.useRef(0),x=a==="horizontal"?CG:_G,[j=[],k]=Ho({prop:d,defaultProp:u,onChange:F=>{var L;(L=[...w.current][b.current])==null||L.focus(),h(F)}}),S=p.useRef(j);function N(F){const C=OG(j,F);_(F,C)}function A(F){_(F,b.current)}function E(){const F=S.current[b.current];j[b.current]!==F&&f(j)}function _(F,C,{commit:L}={commit:!1}){const I=MG(i),O=zG(Math.round((F-n)/i)*i+n,I),U=zu(O,[n,s]);k((M=[])=>{const P=TG(M,U,C);if(LG(P,c*i)){b.current=P.indexOf(U);const z=String(P)!==String(M);return z&&L&&f(P),z?P:M}else return M})}return o.jsx(NG,{scope:e.__scopeSlider,name:r,disabled:l,min:n,max:s,valueIndexToChangeRef:b,thumbs:w.current,values:j,orientation:a,form:v,children:o.jsx(zy.Provider,{scope:e.__scopeSlider,children:o.jsx(zy.Slot,{scope:e.__scopeSlider,children:o.jsx(x,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:t,onPointerDown:he(g.onPointerDown,()=>{l||(S.current=j)}),min:n,max:s,inverted:m,onSlideStart:l?void 0:N,onSlideMove:l?void 0:A,onSlideEnd:l?void 0:E,onHomeKeyDown:()=>!l&&_(n,0,{commit:!0}),onEndKeyDown:()=>!l&&_(s,j.length-1,{commit:!0}),onStepKeyDown:({event:F,direction:C})=>{if(!l){const O=NR.includes(F.key)||F.shiftKey&&CR.includes(F.key)?10:1,U=b.current,M=j[U],P=i*O*C;_(M+P,U,{commit:!0})}}})})})})});PR.displayName=ec;var[TR,RR]=ER(ec,{startEdge:"left",endEdge:"right",size:"width",direction:1}),CG=p.forwardRef((e,t)=>{const{min:r,max:n,dir:s,inverted:i,onSlideStart:a,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=e,[h,f]=p.useState(null),m=_e(t,x=>f(x)),v=p.useRef(void 0),g=cb(s),w=g==="ltr",b=w&&!i||!w&&i;function y(x){const j=v.current||h.getBoundingClientRect(),k=[0,j.width],N=yb(k,b?[r,n]:[n,r]);return v.current=j,N(x-j.left)}return o.jsx(TR,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:o.jsx(OR,{dir:g,"data-orientation":"horizontal",...d,ref:m,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const j=y(x.clientX);a==null||a(j)},onSlideMove:x=>{const j=y(x.clientX);l==null||l(j)},onSlideEnd:()=>{v.current=void 0,c==null||c()},onStepKeyDown:x=>{const k=_R[b?"from-left":"from-right"].includes(x.key);u==null||u({event:x,direction:k?-1:1})}})})}),_G=p.forwardRef((e,t)=>{const{min:r,max:n,inverted:s,onSlideStart:i,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...u}=e,d=p.useRef(null),h=_e(t,d),f=p.useRef(void 0),m=!s;function v(g){const w=f.current||d.current.getBoundingClientRect(),b=[0,w.height],x=yb(b,m?[n,r]:[r,n]);return f.current=w,x(g-w.top)}return o.jsx(TR,{scope:e.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:o.jsx(OR,{"data-orientation":"vertical",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const w=v(g.clientY);i==null||i(w)},onSlideMove:g=>{const w=v(g.clientY);a==null||a(w)},onSlideEnd:()=>{f.current=void 0,l==null||l()},onStepKeyDown:g=>{const b=_R[m?"from-bottom":"from-top"].includes(g.key);c==null||c({event:g,direction:b?-1:1})}})})}),OR=p.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:l,onStepKeyDown:c,...u}=e,d=Dm(ec,r);return o.jsx(ye.span,{...u,ref:t,onKeyDown:he(e.onKeyDown,h=>{h.key==="Home"?(a(h),h.preventDefault()):h.key==="End"?(l(h),h.preventDefault()):NR.concat(CR).includes(h.key)&&(c(h),h.preventDefault())}),onPointerDown:he(e.onPointerDown,h=>{const f=h.target;f.setPointerCapture(h.pointerId),h.preventDefault(),d.thumbs.has(f)?f.focus():n(h)}),onPointerMove:he(e.onPointerMove,h=>{h.target.hasPointerCapture(h.pointerId)&&s(h)}),onPointerUp:he(e.onPointerUp,h=>{const f=h.target;f.hasPointerCapture(h.pointerId)&&(f.releasePointerCapture(h.pointerId),i(h))})})}),IR="SliderTrack",DR=p.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=Dm(IR,r);return o.jsx(ye.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});DR.displayName=IR;var Fy="SliderRange",LR=p.forwardRef((e,t)=>
654{const{__scopeSlider:r,...n}=e,s=Dm(Fy,r),i=RR(Fy,r),a=p.useRef(null),l=_e(t,a),c=s.values.length,u=s.values.map(f=>FR(f,s.min,s.max)),d=c>1?Math.min(...u):0,h=100-Math.max(...u);return o.jsx(ye.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:l,style:{...e.style,[i.startEdge]:d+"%",[i.endEdge]:h+"%"}})});LR.displayName=Fy;var $y="SliderThumb",MR=p.forwardRef((e,t)=>{const r=SG(e.__scopeSlider),[n,s]=p.useState(null),i=_e(t,l=>s(l)),a=p.useMemo(()=>n?r().findIndex(l=>l.ref.current===n):-1,[r,n]);return o.jsx(EG,{...e,ref:i,index:a})}),EG=p.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:s,...i}=e,a=Dm($y,r),l=RR($y,r),[c,u]=p.useState(null),d=_e(t,y=>u(y)),h=c?a.form||!!c.closest("form"):!0,f=lm(c),m=a.values[n],v=m===void 0?0:FR(m,a.min,a.max),g=RG(n,a.values.length),w=f==null?void 0:f[l.size],b=w?IG(w,v,l.direction):0;return p.useEffect(()=>{if(c)return a.thumbs.add(c),()=>{a.thumbs.delete(c)}},[c,a.thumbs]),o.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${v}% + ${b}px)`},children:[o.jsx(zy.ItemSlot,{scope:e.__scopeSlider,children:o.jsx(ye.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":m,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:d,style:m===void 0?{display:"none"}:e.style,onFocus:he(e.onFocus,()=>{a.valueIndexToChangeRef.current=n})})}),h&&o.jsx(zR,{name:s??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:m},n)]})});MR.displayName=$y;var PG="RadioBubbleInput",zR=p.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const s=p.useRef(null),i=_e(s,n),a=Em(t);return p.useEffect(()=>{const l=s.current;if(!l)return;const c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&d){const h=new Event("input",{bubbles:!0});d.call(l,t),l.dispatchEvent(h)}},[a,t]),o.jsx(ye.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});zR.displayName=PG;function TG(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function FR(e,t,r){const i=100/(r-t)*(e-t);return zu(i,[0,100])}function RG(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function OG(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function IG(e,t,r){const n=e/2,i=yb([0,50],[0,n]);return(n-i(t)*r)*r}function DG(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function LG(e,t){if(t>0){const r=DG(e);return Math.min(...r)>=t}return!0}function yb(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 MG(e){return(String(e).split(".")[1]||"").length}function zG(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var $R=PR,FG=DR,$G=LR,VG=MR;const VR=p.forwardRef(({className:e,...t},r)=>o.jsxs($R,{ref:r,className:Ie("relative flex w-full touch-none select-none items-center",e),...t,children:[o.jsx(FG,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:o.jsx($G,{className:"absolute h-full bg-primary"})}),o.jsx(VG,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background 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"})]}));VR.displayName=$R.displayName;function UG(){const{t:e}=Rt(),[t,r]=p.useState(""),[n,s]=p.useState("all"),[i,a]=p.useState("relevance"),[l,c]=p.useState([0,1e4]),[u,d]=p.useState(!1),{data:h=[],isLoading:f}=Vt({queryKey:["search-products"],queryFn:async()=>{const{data:g,error:w}=await Y.from("products").select("*").eq("status","active");if(w)throw w;return g||[]}}),m=p.useMemo(()=>[...new Set(h.map(w=>w.category))],[h]),v=p.useMemo(()=>{let g=h;if(t.trim()){const w=t.toLowerCase();g=g.filter(b=>{const y=b.name.toLowerCase().includes(w),x=b.category.toLowerCase().includes(w),j=b.specs?Object.values(b.specs).some(k=>String(k).toLowerCase().includes(w)):!1;return y||x||j})}switch(n!=="all"&&(g=g.filter(w=>w.category===n)),g=g.filter(w=>w.price>=l[0]&&w.price<=l[1]),i){case"price-asc":g=[...g].sort((w,b)=>w.price-b.price);break;case"price-desc":g=[...g].sort((w,b)=>b.price-w.price);break;case"name":g=[...g].sort((w,b)=>w.name.localeCompare(b.name));break;default:if(t.trim()){const w=t.toLowerCase();g=[...g].sort((b,y)=>{const x=b.name.toLowerCase().includes(w)?0:1,j=y.name.toLowerCase().includes(w)?0:1;return x-j})}}return g},[h,t,n,i,l]);return o.jsxs(Je,{children:[o.jsx($t,{title:"Search Products",description:"Search OVERCLOCK's catalog of high-performance gaming PCs, notebooks, and workstations. Filter by category, price, and sort by relevance.",keywords:"search gaming PC, find gaming laptop, gaming computer search, OVERCLOCK products",noIndex:!0}),o.jsxs("div",{className:"container mx-auto px-4 py-8",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h1",{className:"text-3xl font-bold mb-6",children:e("search.searchProducts")}),o.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx("label",{htmlFor:"search-input",className:"sr-only",children:e("search.searchProducts")}),o.jsx(qo,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground"}),o.jsx(Fe,{id:"search-input",type:"text",placeholder:e("search.searchPlaceholder"),value:t,onChange:g=>r(g.target.value),className:"pl-12 h-12 text-base"}),t&&o.jsx("button",{type:"button","aria-label":e("common.clear")||"Clear search",onClick:()=>r(""),className:"absolute right-4 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:o.jsx(kt,{size:18})})]}),o.jsxs(ue,{variant:"outline",className:"md:hidden",onClick:()=>d(!u),children:[o.jsx(PD,{size:18,className:"mr-2"}),e("common.filters")]})]})]}),o.jsxs("div",{className:"flex gap-8",children:[o.jsxs("aside",{className:`${u?"block":"hidden"} md:block w-full md:w-64 shrink-0 space-y-6`,children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-sm font-semibold mb-3",children:e("search.category")}),o.jsxs(Ly,{value:n,onValueChange:s,children:[o.jsx(Af,{children:o.jsx(My,{placeholder:e("search.allCategories")})}),o.jsxs(Nf,{children:[o.jsx(_s,{value:"all",children:e("search.allCategories")}),m.map(g=>o.jsx(_s,{value:g,children:g.charAt(0).toUpperCase()+g.slice(1)},g))]})]})]}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-sm font-semibold mb-3",children:e("search.sortBy")}),o.jsxs(Ly,{value:i,onValueChange:a,children:[o.jsx(Af,{children:o.jsx(My,{placeholder:e("search.relevance")})}),o.jsxs(Nf,{children:[o.jsx(_s,{value:"relevance",children:e("search.relevance")}),o.jsx(_s,{value:"price-asc",children:e("products.priceLowToHigh")}),o.jsx(_s,{value:"price-desc",children:e("products.priceHighToLow")}),o.jsx(_s,{value:"name",children:e("search.name")}
654)]})]})]}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-sm font-semibold mb-3",children:e("search.priceRange")}),o.jsx(VR,{value:l,onValueChange:g=>c(g),min:0,max:1e4,step:100,className:"mb-2"}),o.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[o.jsxs("span",{children:["â¬",l[0].toLocaleString()]}),o.jsxs("span",{children:["â¬",l[1].toLocaleString()]})]})]}),o.jsx(ue,{variant:"ghost",className:"w-full",onClick:()=>{r(""),s("all"),a("relevance"),c([0,1e4])},children:e("common.clearAllFilters")})]}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"mb-4 text-sm text-muted-foreground",children:f?e("common.loading"):o.jsxs(o.Fragment,{children:[v.length," ",v.length!==1?e("search.productsFoundPlural"):e("search.productsFound")," ",e("search.found"),t&&` ${e("search.for")} "${t}"`]})}),f?o.jsx("div",{className:"space-y-4",children:[...Array(3)].map((g,w)=>o.jsx("div",{className:"h-48 bg-muted/50 rounded-lg animate-pulse"},w))}):v.length>0?o.jsx("div",{className:"space-y-4",children:v.map(g=>o.jsx(_T,{id:g.id,slug:g.slug||void 0,name:g.name,image:g.image||"/placeholder.svg",price:g.price,priceMax:g.price_max||void 0,salePrice:g.sale_price?Number(g.sale_price):null,specs:g.specs||void 0,badges:g.badges||void 0},g.id))}):o.jsxs("div",{className:"text-center py-16",children:[o.jsx(qo,{className:"mx-auto h-12 w-12 text-muted-foreground/50 mb-4"}),o.jsx("h3",{className:"text-lg font-medium mb-2",children:e("search.noProductsFound")}),o.jsx("p",{className:"text-muted-foreground",children:e("search.adjustSearch")})]})]})]})]})]})}const J2="/assets/cyberbook-series-FOFOO9Td.jpg";function BG(){return o.jsxs(Je,{children:[o.jsx($t,{title:"Cyberbook Ultra",description:"Cyberbook Ultra - The ultimate gaming laptop with Intel Core i9-14900HX, NVIDIA RTX 5090, 64GB DDR5 RAM, and 240Hz QHD+ display. Experience desktop-class performance.",keywords:"Cyberbook Ultra, gaming laptop, RTX 5090, Intel i9-14900HX, 240Hz display, gaming notebook, OVERCLOCK laptop",type:"product",product:{name:"Cyberbook Ultra",price:4999,currency:"EUR",availability:"InStock",description:"Ultimate gaming laptop with Intel Core i9-14900HX and NVIDIA RTX 5090",brand:"OVERCLOCK"}}),o.jsxs("div",{className:"min-h-screen bg-black",children:[o.jsx("header",{className:"sticky top-[4.2rem] left-0 right-0 z-40 bg-black/90 backdrop-blur-sm border-b border-white/10",children:o.jsxs("div",{className:"container mx-auto px-4 h-14 flex items-center justify-between",children:[o.jsx("h1",{className:"text-white font-normal text-[1.75rem] m-0",style:{fontFamily:"Ibrand, sans-serif"},children:"Cyberbook Ultra"}),o.jsx(Z,{to:"/products",children:o.jsx("button",{className:"btn-coral px-5 py-2 text-sm font-semibold rounded-md",children:"Configure Now"})})]})}),o.jsxs("section",{className:"relative min-h-[90vh] flex items-center justify-center overflow-hidden bg-black",children:[o.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/20 via-transparent to-black z-0"}),o.jsxs("div",{className:"absolute inset-0",children:[o.jsx("img",{src:J2,alt:"Cyberbook Ultra",className:"w-full h-full object-cover opacity-90"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-black/30 to-transparent"})]})]}),o.jsx("section",{className:"py-24 bg-black",children:o.jsxs("div",{className:"container mx-auto px-4",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("p",{className:"text-primary font-medium tracking-widest uppercase mb-3",children:"Max-Switch 2.0"}),o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-white font-heading mb-6",children:"Advanced Optimus"}),o.jsx("p",{className:"text-white/70 max-w-3xl mx-auto text-lg leading-relaxed",children:"Cyberbook Ultra features NVIDIA Advanced Optimus technology, automatically switching between integrated and dedicated graphics for optimal performance and battery life. Experience seamless transitions without rebooting, giving you the best of both worlds."})]}),o.jsx("div",{className:"flex justify-center",children:o.jsx("img",{alt:"Advanced Optimus",className:"max-w-4xl w-full rounded-lg shadow-2xl",src:"/lovable-uploads/2abd7f29-7154-41b1-b69b-5253e6ab4d22.webp"})})]})}),o.jsx("section",{className:"py-24 bg-black",children:o.jsxs("div",{className:"container mx-auto px-4",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("p",{className:"text-primary font-medium tracking-widest uppercase mb-3",children:"Intel Core i9-14900HX"}),o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-white font-heading mb-6",children:"24-Core CPU Power"}),o.jsx("p",{className:"text-white/70 max-w-3xl mx-auto text-lg leading-relaxed",children:"The Intel Core i9-14900HX delivers unprecedented mobile performance with 24 cores and 32 threads. Push your games and creative workflows to new heights with up to 5.8 GHz boost clock speeds and intelligent power management."})]}),o.jsx("div",{className:"flex justify-center",children:o.jsx("img",{alt:"CPU Power",className:"max-w-4xl w-full rounded-lg shadow-2xl",src:"/lovable-uploads/29038b25-c7aa-4d88-bb60-6ddfe8e2004b.webp"})})]})}),o.jsx("section",{className:"py-24 bg-black text-white",children:o.jsxs("div",{className:"container mx-auto px-4",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("p",{className:"text-primary font-medium tracking-widest uppercase mb-3",children:"NVIDIA GeForce RTX 5090"}),o.jsx("h2",{className:"text-4xl md:text-5xl font-bold font-heading mb-6",children:"Maximum Performance with DLSS 4"}),o.jsx("p",{className:"text-white/70 max-w-3xl mx-auto text-lg leading-relaxed",children:"The Cyberbook Ultra is equipped with the revolutionary NVIDIA GeForce RTX 5090, featuring 4th generation Tensor Cores and ray tracing capabilities. DLSS 4 with Multi Frame Generation delivers up to 8x performance boost in supported games."})]}),o.jsx("div",{className:"flex justify-center",children:o.jsx("img",{alt:"RTX Performance",className:"max-w-4xl w-full rounded-lg shadow-2xl",src:"/lovable-uploads/a0120c85-bab0-4c30-86dd-b20b3708f548.webp"})})]})}),o.jsx("section",{className:"py-24 bg-black",children:o.jsxs("div",{className:"container mx-auto px-4",children:[o.jsxs("div",{className:"text-center mb-16",children:[o.jsx("p",{className:"text-primary font-medium tracking-widest uppercase mb-3",children:"Power Unleashed"}),o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-white font-heading mb-6",children:"For Gamers & Creators"}),o.jsx("p",{className:"text-white/70 max-w-3xl mx-auto text-lg leading-relaxed",children:"Whether you're conquering virtual worlds or creating masterpieces, the Cyberbook Ultra adapts to your needs with intelligent performance modes and studio-grade color accuracy."})]}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-8 max-w-5xl mx-auto",children:[o.jsxs("div",{className:"bg-zinc-900/50 backdrop-blur-sm border border-white/10 rounded-xl p-8",children:[o.jsx("h3",{className:"text-2xl font-bold text-white mb-4 font-heading",children:"Intel Core i9 14900HX"}),o.jsx("p",{className:"text-white/60 leading-relaxed",children:"24 cores and 32 threads of pure processing power. The flagship Intel mobile processor delivers desktop-class performance in a portable form factor, with intelligent power management for extended battery life when you need it."})]}),o.jsxs("div",{className:"bg-zinc-900/50 backdrop-blur-sm border border-white/10 rounded-xl p-8",children:[o.jsx("h3",{className:"text-2xl font-bold text-white mb-4 font-heading",children:"RTX 50 Series"}),o.jsx("p",{className:"text-white/60 leading-relaxed",children:"Next-generation graphics with Blackwell architecture. Experience ray tracing at its finest with up to 2x performance improvement and revolutionary AI-powered features that transform your gaming and creative experience."})]})]})]})}),o.jsxs("section",{className:"py-24 bg-black relative overflow-hidden",children:[o.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/10 via-trans
654parent to-transparent"}),o.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("p",{className:"text-primary font-medium tracking-widest uppercase mb-3",children:"Thermal Engineering"}),o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-white font-heading mb-6",children:"Perfectly Cooled Components"}),o.jsx("p",{className:"text-white/70 max-w-3xl mx-auto text-lg leading-relaxed",children:"Featuring an advanced vapor chamber cooling system with liquid metal thermal compound, the Cyberbook Ultra maintains peak performance under the most demanding workloads. Dual 90mm fans with anti-dust technology ensure long-term reliability."})]}),o.jsx("div",{className:"flex justify-center",children:o.jsx("img",{src:J2,alt:"Cooling System",className:"max-w-5xl w-full rounded-lg shadow-2xl"})})]})]}),o.jsx("section",{className:"py-24 bg-zinc-950",children:o.jsxs("div",{className:"container mx-auto px-4",children:[o.jsx("div",{className:"text-center mb-16",children:o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-white font-heading mb-6",children:"Technical Specifications"})}),o.jsxs("div",{className:"grid md:grid-cols-3 gap-8 max-w-5xl mx-auto",children:[o.jsxs("div",{className:"text-center p-6 bg-zinc-900 rounded-xl border border-white/10",children:[o.jsx("div",{className:"text-primary text-4xl font-bold mb-2",children:"24"}),o.jsx("div",{className:"text-white/60",children:"CPU Cores"})]}),o.jsxs("div",{className:"text-center p-6 bg-zinc-900 rounded-xl border border-white/10",children:[o.jsx("div",{className:"text-primary text-4xl font-bold mb-2",children:"64GB"}),o.jsx("div",{className:"text-white/60",children:"DDR5 RAM"})]}),o.jsxs("div",{className:"text-center p-6 bg-zinc-900 rounded-xl border border-white/10",children:[o.jsx("div",{className:"text-primary text-4xl font-bold mb-2",children:"4TB"}),o.jsx("div",{className:"text-white/60",children:"NVMe SSD"})]}),o.jsxs("div",{className:"text-center p-6 bg-zinc-900 rounded-xl border border-white/10",children:[o.jsx("div",{className:"text-primary text-4xl font-bold mb-2",children:"240Hz"}),o.jsx("div",{className:"text-white/60",children:"Display Refresh"})]}),o.jsxs("div",{className:"text-center p-6 bg-zinc-900 rounded-xl border border-white/10",children:[o.jsx("div",{className:"text-primary text-4xl font-bold mb-2",children:'16"'}),o.jsx("div",{className:"text-white/60",children:"QHD+ Display"})]}),o.jsxs("div",{className:"text-center p-6 bg-zinc-900 rounded-xl border border-white/10",children:[o.jsx("div",{className:"text-primary text-4xl font-bold mb-2",children:"99Wh"}),o.jsx("div",{className:"text-white/60",children:"Battery Capacity"})]})]})]})}),o.jsx("section",{className:"py-24 bg-gradient-to-r from-primary/20 to-black",children:o.jsxs("div",{className:"container mx-auto px-4 text-center",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-white font-heading mb-6",children:"Ready to Upgrade?"}),o.jsx("p",{className:"text-white/70 max-w-2xl mx-auto mb-8 text-lg",children:"Configure your Cyberbook Ultra today and experience the future of mobile gaming."}),o.jsx(Z,{to:"/products",children:o.jsx(ue,{size:"lg",className:"bg-primary hover:bg-primary/90 text-white",children:"Configure Your Cyberbook"})})]})})]})]})}function HG(){const{t:e}=Rt(),[t]=mm(),[r,n]=p.useState("loading"),[s,i]=p.useState(""),a=Ot(),{user:l}=Zs(),c=t.get("session_id"),u=t.get("order_id");return p.useEffect(()=>{async function d(){if(!c||!u){n("error"),i(e("checkout.missingPaymentInfo"));return}try{const{data:h,error:f}=await Y.functions.invoke("verify-payment",{body:{session_id:c,order_id:u}});if(f)throw f;h.success?(n("success"),a.invalidateQueries({queryKey:["cart",l==null?void 0:l.id]})):(n("error"),i(h.message||e("checkout.paymentVerificationFailed")))}catch(h){console.error("Payment verification error:",h),n("error"),i(e("checkout.failedToVerify"))}}d()},[c,u,a,l==null?void 0:l.id,e]),o.jsxs(Je,{children:[o.jsx($t,{title:"Order Confirmation",description:"Thank you for your order at OVERCLOCK.",noIndex:!0}),o.jsxs("div",{className:"container mx-auto px-4 py-16 text-center",children:[r==="loading"&&o.jsxs("div",{className:"flex flex-col items-center gap-4",children:[o.jsx(st,{className:"h-16 w-16 animate-spin text-primary"}),o.jsx("h1",{className:"text-2xl font-bold",children:e("checkout.verifyingPayment")}),o.jsx("p",{className:"text-muted-foreground",children:e("checkout.pleaseWait")})]}),r==="success"&&o.jsxs("div",{className:"flex flex-col items-center gap-6",children:[o.jsx(sD,{className:"h-20 w-20 text-green-500"}),o.jsx("h1",{className:"text-3xl font-bold",children:e("checkout.paymentSuccessful")}),o.jsx("p",{className:"text-muted-foreground max-w-md",children:e("checkout.thankYou")}),o.jsxs("div",{className:"flex gap-4 mt-4",children:[o.jsx(Z,{to:"/account",children:o.jsx(ue,{variant:"outline",children:e("common.viewOrders")})}),o.jsx(Z,{to:"/products",children:o.jsx(ue,{children:e("common.continueShopping")})})]})]}),r==="error"&&o.jsxs("div",{className:"flex flex-col items-center gap-6",children:[o.jsx(iD,{className:"h-20 w-20 text-destructive"}),o.jsx("h1",{className:"text-3xl font-bold",children:e("checkout.paymentIssue")}),o.jsx("p",{className:"text-muted-foreground max-w-md",children:s||e("checkout.paymentError")}),o.jsx("div",{className:"flex gap-4 mt-4",children:o.jsx(Z,{to:"/cart",children:o.jsx(ue,{children:e("common.returnToCart")})})})]})]})]})}var Be;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const i={};for(const a of s)i[a]=a;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),a={};for(const l of i)a[l]=s[l];return e.objectValues(a)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},e.find=(s,i)=>{for(const a of s)if(i(a))return a}
vendor: 6,854 bytes, line 654
654,e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Be||(Be={}));var ek;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(ek||(ek={}));const le=Be.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 le.undefined;case"string":return le.string;case"number":return Number.isNaN(e)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(e)?le.array:e===null?le.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?le.promise:typeof Map<"u"&&e instanceof Map?le.map:typeof Set<"u"&&e instanceof Set?le.set:typeof Date<"u"&&e instanceof Date?le.date:le.object;default:return le.unknown}},K=Be.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 Ks 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:[]},s=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let l=n,c=0;for(;c<a.path.length;){const u=a.path[c];c===a.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(r(a))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof Ks))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];r[i]=r[i]||[],r[i].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Ks.create=e=>new Ks(e);const Vy=(e,t)=>{let r;switch(e.code){case K.invalid_type:e.received===le.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Be.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:r=`Unrecognized key(s) in object: ${Be.joinValues(e.keys,", ")}`;break;case K.invalid_union:r="Invalid input";break;case K.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Be.joinValues(e.options)}`;break;case K.invalid_enum_value:r=`Invalid enum value. Expected ${Be.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:r="Invalid function arguments";break;case K.invalid_return_type:r="Invalid function return type";break;case K.invalid_date:r="Invalid date";break;case K.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}"`:Be.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case K.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 K.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 K.custom:r="Invalid input";break;case K.invalid_intersection_types:r="Intersection results could not be merged";break;case K.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:r="Number must be finite";break;default:r=t.defaultError,Be.assertNever(e)}return{message:r}};let WG=Vy;function qG(){return WG}const KG=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let l="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)l=u(a,{data:t,defaultError:l}).message;return{...s,path:i,message:l}};function se(e,t){const r=qG(),n=KG({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Vy?void 0:Vy].filter(s=>!!s)});e.common.issues.push(n)}class Br{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 s of r){if(s.status==="aborted")return ke;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const i=await s.key,a=await s.value;n.push({key:i,value:a})}return Br.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:i,value:a}=s;
vendor: 16,807 bytes, line 654
654if(i.status==="aborted"||a.status==="aborted")return ke;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(n[i.value]=a.value)}return{status:t.value,value:n}}}const ke=Object.freeze({status:"aborted"}),Rc=e=>({status:"dirty",value:e}),pn=e=>({status:"valid",value:e}),tk=e=>e.status==="aborted",rk=e=>e.status==="dirty",Dl=e=>e.status==="valid",Cf=e=>typeof Promise<"u"&&e instanceof Promise;var ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ce||(ce={}));class Qi{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}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 nk=(e,t)=>{if(Dl(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 Ks(e.common.issues);return this._error=r,this._error}}};function Oe(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=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:s}:{errorMap:(a,l)=>{const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??n??l.defaultError}:a.code!=="invalid_type"?{message:l.defaultError}:{message:c??r??l.defaultError}},description:s}}class Ue{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 Br,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(Cf(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)},s=this._parseSync({data:t,path:n.path,parent:n});return nk(n,s)}"~validate"(t){var n,s;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 Dl(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(s=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(i=>Dl(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)},s=this._parse({data:t,path:n.path,parent:n}),i=await(Cf(s)?s:Promise.resolve(s));return nk(n,i)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{const a=t(s),l=()=>i.addIssue({code:K.custom,...n(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(l(),!1)):a?!0:(l(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Ml({schema:this,typeName:Se.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 Vi.create(this,this._def)}nullable(){return zl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cs.create(this)}promise(){return Tf.create(this,this._def)}or(t){return Ef.create([this,t],this._def)}and(t){return Pf.create(this,t,this._def)}transform(t){return new Ml({...Oe(this._def),schema:this,typeName:Se.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new By({...Oe(this._def),innerType:this,defaultValue:r,typeName:Se.ZodDefault})}brand(){return new gQ({typeName:Se.ZodBranded,type:this,...Oe(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Hy({...Oe(this._def),innerType:this,catchValue:r,typeName:Se.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return vb.create(this,t)}readonly(){return Wy.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const GG=/^c[^\s-]{8,}$/i,QG=/^[0-9a-z]+$/,ZG=/^[0-9A-HJKMNP-TV-Z]{26}$/i,XG=/^[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,YG=/^[a-z0-9_-]{21}$/i,JG=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,eQ=/^[-+]?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)?)??$/,tQ=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rQ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let pg;const nQ=/^(?:(?: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])$/,sQ=/^(?:(?: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])$/,iQ=/^(([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]))$/,oQ=/^(([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])$/,aQ=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,lQ=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,UR="((\\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])))",cQ=new RegExp(`^${UR}$`);function BR(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 uQ(e){return new RegExp(`^${BR(e)}$`)}function dQ(e){let t=`${UR}T${BR(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 hQ(e,t){return!!((t==="v4"||!t)&&nQ.test(e)||(t==="v6"||!t)&&iQ.test(e))}function fQ(e,t){if(!JG.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,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function mQ(e,t){return!!((t==="v4"||!t)&&sQ.test(e)||(t==="v6"||!t)&&oQ.test(e))}class Ei extends Ue{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==le.string){const i=this._getOrReturnCtx(t);return se(i,{code:K.invalid_type,expected:le.string,received:i.parsedType}),ke}const n=new Br;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),se(s,{code:K.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&&(s=this._getOrReturnCtx(t,s),se(s,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,l=t.data.length<i.value;(a||l)&&(s=this._getOrReturnCtx(t,s),a?se(s,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&se(s,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")tQ.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"email",code:K.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")pg||(pg=new RegExp(rQ,"u")),pg.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"emoji",code:K.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")XG.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"uuid",code:K.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")YG.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"nanoid",code:K.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")GG.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"cuid",code:K.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")QG.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"cuid2",code:K.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")ZG.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"ulid",code:K.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),se(s,{validation:"url",code:K.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"regex",code:K.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)||(s=this._getOrReturnCtx(t,s),se(s,{code:K.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)||(s=this._getOrReturnCtx(t,s),se(s,{code:K.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),se(s,{code:K.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?dQ(i).test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{code:K.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?cQ.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{code:K.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?uQ(i).test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{code:K.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?eQ.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"duration",code:K.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?hQ(t.data,i.version)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"ip",code:K.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?fQ(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"jwt",code:K.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?mQ(t.data,i.version)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"cidr",code:K.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?aQ.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"base64",code:K.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?lQ.test(t.data)||(s=this._getOrReturnCtx(t,s),se(s,{validation:"base64url",code:K.invalid_string,message:i.message}),n.dirty()):Be.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:K.invalid_string,...ce.errToObj(n)})}_addCheck(t){return new Ei({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ce.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ce.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ce.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ce.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,...ce.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,...ce.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ce.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ce.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...ce.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ce.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ce.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ce.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ce.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ce.errToObj(r)})}nonempty(t){return this.min(1,ce.errToObj(t))}trim(){return new Ei({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ei({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ei({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 4,664 bytes, line 654
654get 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}}Ei.create=e=>new Ei({checks:[],typeName:Se.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Oe(e)});function pQ(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return i%a/10**s}class Fu extends Ue{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)!==le.number){const i=this._getOrReturnCtx(t);return se(i,{code:K.invalid_type,expected:le.number,received:i.parsedType}),ke}let n;const s=new Br;for(const i of this._def.checks)i.kind==="int"?Be.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:K.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),se(n,{code:K.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),se(n,{code:K.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?pQ(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),se(n,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:K.not_finite,message:i.message}),s.dirty()):Be.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ce.toString(r))}setLimit(t,r,n,s){return new Fu({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ce.toString(s)}]})}_addCheck(t){return new Fu({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.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"&&Be.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: 4,125 bytes, line 654
654}Fu.create=e=>new Fu({checks:[],typeName:Se.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Oe(e)});class $u extends Ue{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)!==le.bigint)return this._getInvalidInput(t);let n;const s=new Br;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),se(n,{code:K.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),se(n,{code:K.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),se(n,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Be.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return se(r,{code:K.invalid_type,expected:le.bigint,received:r.parsedType}),ke}gte(t,r){return this.setLimit("min",t,!0,ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ce.toString(r))}setLimit(t,r,n,s){return new $u({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ce.toString(s)}]})}_addCheck(t){return new $u({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ce.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}}$u.create=e=>new $u({checks:[],typeName:Se.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Oe(e)});class sk extends Ue{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==le.boolean){const n=this._getOrReturnCtx(t);return se(n,{code:K.invalid_type,expected:le.boolean,received:n.parsedType}),ke}return pn(t.data)}}sk.create=e=>new sk({typeName:Se.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Oe(e)});class _f extends Ue{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==le.date){const i=this._getOrReturnCtx(t);return se(i,{code:K.invalid_type,expected:le.date,received:i.parsedType}),ke}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return se(i,{code:K.invalid_date}),ke}const n=new Br;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),se(s,{code:K.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),se(s,{code:K.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Be.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new _f({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ce.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ce.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}}_f.create=e=>new _f({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Se.ZodD
vendor: 8,529 bytes, line 654
654ate,...Oe(e)});class ik extends Ue{_parse(t){if(this._getType(t)!==le.symbol){const n=this._getOrReturnCtx(t);return se(n,{code:K.invalid_type,expected:le.symbol,received:n.parsedType}),ke}return pn(t.data)}}ik.create=e=>new ik({typeName:Se.ZodSymbol,...Oe(e)});class ok extends Ue{_parse(t){if(this._getType(t)!==le.undefined){const n=this._getOrReturnCtx(t);return se(n,{code:K.invalid_type,expected:le.undefined,received:n.parsedType}),ke}return pn(t.data)}}ok.create=e=>new ok({typeName:Se.ZodUndefined,...Oe(e)});class ak extends Ue{_parse(t){if(this._getType(t)!==le.null){const n=this._getOrReturnCtx(t);return se(n,{code:K.invalid_type,expected:le.null,received:n.parsedType}),ke}return pn(t.data)}}ak.create=e=>new ak({typeName:Se.ZodNull,...Oe(e)});class lk extends Ue{constructor(){super(...arguments),this._any=!0}_parse(t){return pn(t.data)}}lk.create=e=>new lk({typeName:Se.ZodAny,...Oe(e)});class ck extends Ue{constructor(){super(...arguments),this._unknown=!0}_parse(t){return pn(t.data)}}ck.create=e=>new ck({typeName:Se.ZodUnknown,...Oe(e)});class Zi extends Ue{_parse(t){const r=this._getOrReturnCtx(t);return se(r,{code:K.invalid_type,expected:le.never,received:r.parsedType}),ke}}Zi.create=e=>new Zi({typeName:Se.ZodNever,...Oe(e)});class uk extends Ue{_parse(t){if(this._getType(t)!==le.undefined){const n=this._getOrReturnCtx(t);return se(n,{code:K.invalid_type,expected:le.void,received:n.parsedType}),ke}return pn(t.data)}}uk.create=e=>new uk({typeName:Se.ZodVoid,...Oe(e)});class cs extends Ue{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==le.array)return se(r,{code:K.invalid_type,expected:le.array,received:r.parsedType}),ke;if(s.exactLength!==null){const a=r.data.length>s.exactLength.value,l=r.data.length<s.exactLength.value;(a||l)&&(se(r,{code:a?K.too_big:K.too_small,minimum:l?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(se(r,{code:K.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(se(r,{code:K.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,l)=>s.type._parseAsync(new Qi(r,a,r.path,l)))).then(a=>Br.mergeArray(n,a));const i=[...r.data].map((a,l)=>s.type._parseSync(new Qi(r,a,r.path,l)));return Br.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new cs({...this._def,minLength:{value:t,message:ce.toString(r)}})}max(t,r){return new cs({...this._def,maxLength:{value:t,message:ce.toString(r)}})}length(t,r){return new cs({...this._def,exactLength:{value:t,message:ce.toString(r)}})}nonempty(t){return this.min(1,t)}}cs.create=(e,t)=>new cs({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Se.ZodArray,...Oe(t)});function Ca(e){if(e instanceof wt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Vi.create(Ca(n))}return new wt({...e._def,shape:()=>t})}else return e instanceof cs?new cs({...e._def,type:Ca(e.element)}):e instanceof Vi?Vi.create(Ca(e.unwrap())):e instanceof zl?zl.create(Ca(e.unwrap())):e instanceof ea?ea.create(e.items.map(t=>Ca(t))):e}class wt extends Ue{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Be.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==le.object){const u=this._getOrReturnCtx(t);return se(u,{code:K.invalid_type,expected:le.object,received:u.parsedType}),ke}const{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),l=[];if(!(this._def.catchall instanceof Zi&&this._def.unknownKeys==="strip"))for(const u in s.data)a.includes(u)||l.push(u);const c=[];for(const u of a){const d=i[u],h=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Qi(s,h,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Zi){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")l.length>0&&(se(s,{code:K.unrecognized_keys,keys:l}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of l){const h=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Qi(s,h,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const h=await d.key,f=await d.value;u.push({key:h,value:f,alwaysSet:d.alwaysSet})}return u}).then(u=>Br.mergeObjectSync(n,u)):Br.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return ce.errToObj,new wt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,a;const s=((a=(i=this._def).errorMap)==null?void 0:a.call(i,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:ce.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new wt({...this._def,unknownKeys:"strip"})}passthrough(){return new wt({...this._def,unknownKeys:"passthrough"})}extend(t){return new wt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new wt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Se.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new wt({...this._def,catchall:t})}pick(t){const r={};for(const n of Be.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new wt({...this._def,shape:()=>r})}omit(t){const r={};for(const n of Be.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new wt({...this._def,shape:()=>r})}deepPartial(){return Ca(this)}partial(t){const r={};for(const n of Be.objectKeys(this.shape)){const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new wt({...this._def,shape:()=>r})}required(t){const r={};for(const n of Be.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Vi;)i=i._def.innerType;r[n]=i}return new wt({...this._def,shape:()=>r})}keyof(){return HR(Be.objectKeys(this.shape))}}wt.create=(e,t)=>new wt({shape:()=>e,unknownKeys:"strip",catchall:Zi.create(),typeName:Se.ZodObject,...Oe(t)});wt.strictCreate=(e,t)=>new wt({shape:()=>e,unknownKeys:"strict",catchall:Zi.create(),typeName:Se.ZodObject,...Oe(t)});wt.lazycreate=(e,t)=>new wt({shape:e,unknownKeys:"strip",catchall:Zi.create(),typeName:Se.ZodObject,...Oe(t)});class Ef extends Ue{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(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 a=i.map(l=>new Ks(l.ctx.common.issues));return se(r,{code:K.invalid_union,unionErrors:a}),ke}if(r.common.async)return Promise.all(n.map(async i=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(s);{let i;const a=[];for(const c of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const l=a.map(c=>new Ks(c));return se(r,{code:K.invalid_union,unionErrors:l}),ke}}get options(){return this._def.options}}Ef.create=(e,t)=>new Ef({options:e,typeName:Se.ZodUnion,...Oe(t)});function Uy(e,t){const r=ui(e),n=ui(t);if(e===t)return{valid:!0,data:e};if(r===le.object&&n===le.object){const s=Be.objectKeys(t),i=Be.objectKeys(e).filter(l=>s.indexOf(l)!==-1),a={...e,...t};for(const l of i){const c=Uy(e[l],t[l]);if(!c.valid)return{valid:!1};a[l]=c.data}return{valid:!0,data:a}}else if(r===le.array&&n===le.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const a=e[i],l=t[i],c=Uy(a,l);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===le.date&&n===le.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Pf extends Ue{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(i,a)=>
vendor: 1,888 bytes, line 654
654{if(tk(i)||tk(a))return ke;const l=Uy(i.value,a.value);return l.valid?((rk(i)||rk(a))&&r.dirty(),{status:r.value,value:l.data}):(se(n,{code:K.invalid_intersection_types}),ke)};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,a])=>s(i,a)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Pf.create=(e,t,r)=>new Pf({left:e,right:t,typeName:Se.ZodIntersection,...Oe(r)});class ea extends Ue{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==le.array)return se(n,{code:K.invalid_type,expected:le.array,received:n.parsedType}),ke;if(n.data.length<this._def.items.length)return se(n,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ke;!this._def.rest&&n.data.length>this._def.items.length&&(se(n,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((a,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new Qi(n,a,n.path,l)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>Br.mergeArray(r,a)):Br.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new ea({...this._def,rest:t})}}ea.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ea({items:e,typeName:Se.ZodTuple,rest:null,...Oe(t)})};class dk extends Ue{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!==le.map)return se(n,{code:K.invalid_type,expected:le.map,received:n.parsedType}),ke;const s=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([l,c],u)=>
vendor: 4,169 bytes, line 654
654({key:s._parse(new Qi(n,l,n.path,[u,"key"])),value:i._parse(new Qi(n,c,n.path,[u,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of a){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return ke;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(u.value,d.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const c of a){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return ke;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(u.value,d.value)}return{status:r.value,value:l}}}}dk.create=(e,t,r)=>new dk({valueType:t,keyType:e,typeName:Se.ZodMap,...Oe(r)});class Vu extends Ue{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==le.set)return se(n,{code:K.invalid_type,expected:le.set,received:n.parsedType}),ke;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(se(n,{code:K.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(se(n,{code:K.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const i=this._def.valueType;function a(c){const u=new Set;for(const d of c){if(d.status==="aborted")return ke;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const l=[...n.data.values()].map((c,u)=>i._parse(new Qi(n,c,n.path,u)));return n.common.async?Promise.all(l).then(c=>a(c)):a(l)}min(t,r){return new Vu({...this._def,minSize:{value:t,message:ce.toString(r)}})}max(t,r){return new Vu({...this._def,maxSize:{value:t,message:ce.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Vu.create=(e,t)=>new Vu({valueType:e,minSize:null,maxSize:null,typeName:Se.ZodSet,...Oe(t)});class hk extends Ue{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})}}hk.create=(e,t)=>new hk({getter:e,typeName:Se.ZodLazy,...Oe(t)});class fk extends Ue{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return se(r,{received:r.data,code:K.invalid_literal,expected:this._def.value}),ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}fk.create=(e,t)=>new fk({value:e,typeName:Se.ZodLiteral,...Oe(t)});function HR(e,t){return new Ll({values:e,typeName:Se.ZodEnum,...Oe(t)})}class Ll extends Ue{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return se(r,{expected:Be.joinValues(n),received:r.parsedType,code:K.invalid_type}),ke}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 se(r,{received:r.data,code:K.invalid_enum_value,options:n}),ke}return pn(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 Ll.create(t,{...this._def,...r})}exclude(t,r=this._def){return Ll.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Ll.create=HR;class mk extends Ue{_parse(t){const r=Be.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==le.string&&n.parsedType!==le.number){const s=Be.objectValues(r);return se(n,{expected:Be.joinValues(s),received:n.parsedType,code:K.invalid_type}),ke}if(this._cache||(this._cache=new Set(Be.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=Be.objectValues(r);return se(n,{received:n.data,code:K.invalid_enum_value,options:s}),ke}return pn(t.data)}get enum(){return this._def.values}}mk.create=(e,t)=>new mk({values:e,typeName:Se.ZodNativeEnum,...Oe(t)});class Tf extends Ue{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==le.promise&&r.common.async===!1)return se(r,{code:K.invalid_type,expected:le.promise,received:r.parsedType}),ke;
vendor: 15,903 bytes, line 654
654const n=r.parsedType===le.promise?r.data:Promise.resolve(r.data);return pn(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Tf.create=(e,t)=>new Tf({type:e,typeName:Se.ZodPromise,...Oe(t)});class Ml extends Ue{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Se.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:a=>{se(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const a=s.transform(n.data,i);if(n.common.async)return Promise.resolve(a).then(async l=>{if(r.value==="aborted")return ke;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?ke:c.status==="dirty"||r.value==="dirty"?Rc(c.value):c});{if(r.value==="aborted")return ke;const l=this._def.schema._parseSync({data:a,path:n.path,parent:n});return l.status==="aborted"?ke:l.status==="dirty"||r.value==="dirty"?Rc(l.value):l}}if(s.type==="refinement"){const a=l=>{const c=s.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"?ke:(l.status==="dirty"&&r.dirty(),a(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"?ke:(l.status==="dirty"&&r.dirty(),a(l.value).then(()=>({status:r.value,value:l.value}))))}if(s.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Dl(a))return ke;const l=s.transform(a.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(a=>Dl(a)?Promise.resolve(s.transform(a.value,i)).then(l=>({status:r.value,value:l})):ke);Be.assertNever(s)}}Ml.create=(e,t,r)=>new Ml({schema:e,typeName:Se.ZodEffects,effect:t,...Oe(r)});Ml.createWithPreprocess=(e,t,r)=>new Ml({schema:t,effect:{type:"preprocess",transform:e},typeName:Se.ZodEffects,...Oe(r)});class Vi extends Ue{_parse(t){return this._getType(t)===le.undefined?pn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Vi.create=(e,t)=>new Vi({innerType:e,typeName:Se.ZodOptional,...Oe(t)});class zl extends Ue{_parse(t){return this._getType(t)===le.null?pn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zl.create=(e,t)=>new zl({innerType:e,typeName:Se.ZodNullable,...Oe(t)});class By extends Ue{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===le.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}By.create=(e,t)=>new By({innerType:e,typeName:Se.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Oe(t)});class Hy extends Ue{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Cf(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ks(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ks(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Hy.create=(e,t)=>new Hy({innerType:e,typeName:Se.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Oe(t)});class pk extends Ue{_parse(t){if(this._getType(t)!==le.nan){const n=this._getOrReturnCtx(t);return se(n,{code:K.invalid_type,expected:le.nan,received:n.parsedType}),ke}return{status:"valid",value:t.data}}}pk.create=e=>new pk({typeName:Se.ZodNaN,...Oe(e)});class gQ extends Ue{_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 vb extends Ue{_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"?ke:i.status==="dirty"?(r.dirty(),Rc(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?ke:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new vb({in:t,out:r,typeName:Se.ZodPipeline})}}class Wy extends Ue{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Dl(s)&&(s.value=Object.freeze(s.value)),s);return Cf(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Wy.create=(e,t)=>new Wy({innerType:e,typeName:Se.ZodReadonly,...Oe(t)});wt.lazycreate;var Se;(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"})(Se||(Se={}));const en=Ei.create;Zi.create;cs.create;const WR=wt.create;wt.strictCreate;Ef.create;Pf.create;ea.create;Ll.create;Tf.create;Vi.create;zl.create;var dd=e=>e.type==="checkbox",ko=e=>e instanceof Date,mr=e=>e==null;const qR=e=>typeof e=="object";var At=e=>!mr(e)&&!Array.isArray(e)&&qR(e)&&!ko(e),xQ=e=>At(e)&&e.target?dd(e.target)?e.target.checked:e.target.value:e,yQ=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vQ=(e,t)=>e.has(yQ(t)),bQ=e=>{const t=e.constructor&&e.constructor.prototype;return At(t)&&t.hasOwnProperty("isPrototypeOf")},bb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ut(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(!(bb&&(e instanceof Blob||n))&&(r||At(e)))if(t=r?[]:{},!r&&!bQ(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=Ut(e[s]));else return e;return t}var Lm=e=>/^\w*$/.test(e),Pt=e=>e===void 0,wb=e=>Array.isArray(e)?e.filter(Boolean):[],jb=e=>wb(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ae=(e,t,r)=>{if(!t||!At(e))return r;const n=(Lm(t)?[t]:jb(t)).reduce((s,i)=>mr(s)?s:s[i],e);return Pt(n)||n===e?Pt(e[t])?r:e[t]:n},Qn=e=>typeof e=="boolean",Ye=(e,t,r)=>{let n=-1;const s=Lm(t)?[t]:jb(t),i=s.length,a=i-1;for(;++n<i;){const l=s[n];let c=r;if(n!==a){const u=e[l];c=At(u)||Array.isArray(u)?u:isNaN(+s[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=c,e=e[l]}};const gk={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Rn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ks={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},wQ=H.createContext(null);wQ.displayName="HookFormContext";var jQ=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const a=i;return t._proxyFormState[a]!==Rn.all&&(t._proxyFormState[a]=!n||Rn.all),e[a]}});return s};const kQ=typeof window<"u"?H.useLayoutEffect:H.useEffect;var ns=e=>typeof e=="string",SQ=(e,t,r,n,s)=>ns(e)?(n&&t.watch.add(e),ae(r,e,s)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),ae(r,i))):(n&&(t.watchAll=!0),r),qy=e=>mr(e)||!qR(e);function pi(e,t,r=new WeakSet){if(qy(e)||qy(t))return e===t;if(ko(e)&&ko(t))return e.getTime()===t.getTime();const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const i of n){const a=e[i];if(!s.includes(i))return!1;if(i!=="ref"){const l=t[i];if(ko(a)&&ko(l)||At(a)&&At(l)||Array.isArray(a)&&Array.isArray(l)?!pi(a,l,r):a!==l)return!1}}return!0}var KR=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},Yc=e=>Array.isArray(e)?e:[e],xk=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},wr=e=>At(e)&&!Object.keys(e).length,kb=e=>e.type==="file",On=e=>typeof e=="function",Rf=e=>{if(!bb)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},GR=e=>e.type==="select-multiple",Sb=e=>e.type==="radio",AQ=e=>Sb(e)||dd(e),gg=e=>Rf(e)&&e.isConnected;function NQ(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Pt(e)?n++:e[t[n++]];return e}function CQ(e){for(const t in e)if(e.hasOwnProperty(t)&&!Pt(e[t]))return!1;return!0}function Ct(e,t){const r=Array.isArray(t)?t:Lm(t)?[t]:jb(t),n=r.length===1?e:NQ(e,r),s=r.length-1,i=r[s];return n&&delete n[i],s!==0&&(At(n)&&wr(n)||Array.isArray(n)&&CQ(n))&&Ct(e,r.slice(0,-1)),e}var QR=e=>{for(const t in e)if(On(e[t]))return!0;return!1};function Of(e,t={}){const r=Array.isArray(e);if(At(e)||r)for(const n in e)Array.isArray(e[n])||At(e[n])&&!QR(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Of(e[n],t[n])):mr(e[n])||(t[n]=!0);return t}function ZR(e,t,r){const n=Array.isArray(e);if(At(e)||n)for(const s in e)Array.isArray(e[s])||At(e[s])&&!QR(e[s])?Pt(t)||qy(r[s])?r[s]=Array.isArray(e[s])?Of(e[s],[]):{...Of(e[s])}:ZR(e[s],mr(t)?{}:t[s],r[s]):r[s]=!pi(e[s],t[s]);return r}var jc=(e,t)=>ZR(e,t,Of(t));const yk={value:!1,isValid:!1},vk={value:!0,isValid:!0};var XR=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&&!Pt(e[0].attributes.value)?Pt(e[0].value)||e[0].value===""?vk:{value:e[0].value,isValid:!0}:vk:yk}return yk},YR=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Pt(e)?e:t?e===""?NaN:e&&+e:r&&ns(e)?new Date(e):n?n(e):e;const bk={isValid:!1,value:null};var JR=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,bk):bk;function wk(e){const t=e.ref;return kb(t)?t.files:Sb(t)?JR(e.refs).value:GR(t)?[...t.selectedOptions].map(({value:r})=>r):dd(t)?XR(e.refs).value:YR(Pt(t.value)?e.ref.value:t.value,e)}var _Q=(e,t,r,n)=>{const s={};for(const i of e){const a=ae(t,i);a&&Ye(s,i,a._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},If=e=>e instanceof RegExp,kc=e=>Pt(e)?e:If(e)?e.source:At(e)?If(e.value)?e.value.source:e.value:e,jk=e=>({isOnSubmit:!e||e===Rn.onSubmit,isOnBlur:e===Rn.onBlur,isOnChange:e===Rn.onChange,isOnAll:e===Rn.all,isOnTouch:e===Rn.onTouched});const kk="AsyncFunction";var EQ=e=>!!e&&!!e.validate&&!!(On(e.validate)&&e.validate.constructor.name===kk||At(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===kk)),PQ=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Sk=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Jc=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const i=ae(e,s);if(i){const{_f:a,...l}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],s)&&!n)return!0;if(a.ref&&t(a.ref,a.name)&&!n)return!0;if(Jc(l,t))break}else if(At(l)&&Jc(l,t))break}}};function Ak(e,t,r){const n=ae(e,r);if(n||Lm(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const i=s.join("."),a=ae(t,i),l=ae(e,i);if(a&&!Array.isArray(a)&&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};s.pop()}return{name:r}}var TQ=(e,t,r,n)=>{r(e);const{name:s,...i}=e;return wr(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!n||Rn.all))},RQ=(e,t,r)=>!e||!t||e===t||Yc(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),OQ=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,IQ=(e,t)=>!wb(ae(e,t)).length&&Ct(e,t),DQ=(e,t,r)=>{const n=Yc(ae(e,r));return Ye(n,"root",t[r]),Ye(e,r,n),e},_h=e=>ns(e);function Nk(e,t,r="validate"){if(_h(e)||Array.isArray(e)&&e.every(_h)||Qn(e)&&!e)return{type:r,message:_h(e)?e:"",ref:t}}var ba=e=>At(e)&&!If(e)?e:{value:e,message:""},Ck=async(e,t,r,n,s,i)=>{const{ref:a,refs:l,required:c,maxLength:u,minLength:d,min:h,max:f,pattern:m,validate:v,name:g,valueAsNumber:w,mount:b}=e._f,y=ae(r,g);if(!b||t.has(g))return{};const x=l?l[0]:a,j=C=>{s&&x.reportValidity&&(x.setCustomValidity(Qn(C)?"":C||""),x.reportValidity())},k={},S=Sb(a),N=dd(a),A=S||N,E=(w||kb(a))&&Pt(a.value)&&Pt(y)||Rf(a)&&a.value===""||y===""||Array.isArray(y)&&!y.length,_=KR.bind(null,g,n,k),F=(C,L,I,O=ks.maxLength,U=ks.minLength)=>{const M=C?L:I;k[g]={type:C?O:U,message:M,ref:a,..._(C?O:U,M)}};if(i?!Array.isArray(y)||!y.length:c&&(!A&&(E||mr(y))||Qn(y)&&!y||N&&!XR(l).isValid||S&&!JR(l).isValid)){const{value:C,message:L}=_h(c)?{value:!!c,message:c}:ba(c);if(C&&(k[g]={type:ks.required,message:L,ref:x,..._(ks.required,L)},!n))return j(L),k}if(!E&&(!mr(h)||!mr(f))){let C,L;const I=ba(f),O=ba(h);if(!mr(y)&&!isNaN(y)){const U=a.valueAsNumber||y&&+y;mr(I.value)||(C=U>I.value),mr(O.value)||(L=U<O.value)}else{const U=a.valueAsDate||new Date(y),M=B=>new Date(new Date().toDateString()+" "+B),P=a.type=="time",z=a.type=="week";ns(I.value)&&y&&(C=P?M(y)>M(I.value):z?y>I.value:U>new Date(I.value)),ns(O.value)&&y&&(L=P?M(y)<M(O.value):z?y<O.value:U<new Date(O.value))}if((C||L)&&(F(!!C,I.message,O.message,ks.max,ks.min),!n))return j(k[g].message),k}if((u||d)&&!E&&(ns(y)||i&&Array.isArray(y))){const C=ba(u),L=ba(d),I=!mr(C.value)&&y.length>+C.value,O=!mr(L.value)&&y.length<+L.value;if((I||O)&&(F(I,C.message,L.message),!n))return j(k[g].message),k}if(m&&!E&&ns(y)){const{value:C,message:L}=ba(m);if(If(C)&&!y.match(C)&&(k[g]={type:ks.pattern,message:L,ref:a,..._(ks.pattern,L)},!n))return j(L),k}if(v){if(On(v)){const C=await v(y,r),L=Nk(C,x);if(L&&(k[g]={...L,..._(ks.validate,L.message)},!n))return j(L.message),k}else if(At(v)){let C={};for(const L in v){if(!wr(C)&&!n)break;const I=Nk(await v[L](y,r),x,L);I&&(C={...I,..._(L,I.message)},j(I.message),n&&(k[g]=C))}if(!wr(C)&&(k[g]={ref:x,...C},!n))return k}}return j(!0),k};const LQ={mode:Rn.onSubmit,reValidateMode:Rn.onChange,shouldFocusError:!0};function MQ(e={}){let t={...LQ,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:On(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=At(t.defaultValues)||At(t.values)?Ut(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Ut(s),a={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...d};const f={array:xk(),state:xk()},m=t.criteriaMode===Rn.all,v=T=>$=>{clearTimeout(u),u=setTimeout(T,$)},g=async T=>
vendor: 4,777 bytes, line 654
654{if(!t.disabled&&(d.isValid||h.isValid||T)){const $=t.resolver?wr((await N()).errors):await E(n,!0);$!==r.isValid&&f.state.next({isValid:$})}},w=(T,$)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((T||Array.from(l.mount)).forEach(V=>{V&&($?Ye(r.validatingFields,V,$):Ct(r.validatingFields,V))}),f.state.next({validatingFields:r.validatingFields,isValidating:!wr(r.validatingFields)}))},b=(T,$=[],V,te,J=!0,G=!0)=>{if(te&&V&&!t.disabled){if(a.action=!0,G&&Array.isArray(ae(n,T))){const ie=V(ae(n,T),te.argA,te.argB);J&&Ye(n,T,ie)}if(G&&Array.isArray(ae(r.errors,T))){const ie=V(ae(r.errors,T),te.argA,te.argB);J&&Ye(r.errors,T,ie),IQ(r.errors,T)}if((d.touchedFields||h.touchedFields)&&G&&Array.isArray(ae(r.touchedFields,T))){const ie=V(ae(r.touchedFields,T),te.argA,te.argB);J&&Ye(r.touchedFields,T,ie)}(d.dirtyFields||h.dirtyFields)&&(r.dirtyFields=jc(s,i)),f.state.next({name:T,isDirty:F(T,$),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ye(i,T,$)},y=(T,$)=>{Ye(r.errors,T,$),f.state.next({errors:r.errors})},x=T=>{r.errors=T,f.state.next({errors:r.errors,isValid:!1})},j=(T,$,V,te)=>{const J=ae(n,T);if(J){const G=ae(i,T,Pt(V)?ae(s,T):V);Pt(G)||te&&te.defaultChecked||$?Ye(i,T,$?G:wk(J._f)):I(T,G),a.mount&&g()}},k=(T,$,V,te,J)=>{let G=!1,ie=!1;const Re={name:T};if(!t.disabled){if(!V||te){(d.isDirty||h.isDirty)&&(ie=r.isDirty,r.isDirty=Re.isDirty=F(),G=ie!==Re.isDirty);const We=pi(ae(s,T),$);ie=!!ae(r.dirtyFields,T),We?Ct(r.dirtyFields,T):Ye(r.dirtyFields,T,!0),Re.dirtyFields=r.dirtyFields,G=G||(d.dirtyFields||h.dirtyFields)&&ie!==!We}if(V){const We=ae(r.touchedFields,T);We||(Ye(r.touchedFields,T,V),Re.touchedFields=r.touchedFields,G=G||(d.touchedFields||h.touchedFields)&&We!==V)}G&&J&&f.state.next(Re)}return G?Re:{}},S=(T,$,V,te)=>{const J=ae(r.errors,T),G=(d.isValid||h.isValid)&&Qn($)&&r.isValid!==$;if(t.delayError&&V?(c=v(()=>y(T,V)),c(t.delayError)):(clearTimeout(u),c=null,V?Ye(r.errors,T,V):Ct(r.errors,T)),(V?!pi(J,V):J)||!wr(te)||G){const ie={...te,...G&&Qn($)?{isValid:$}:{},errors:r.errors,name:T};r={...r,...ie},f.state.next(ie)}},N=async T=>{w(T,!0);const $=await t.resolver(i,t.context,_Q(T||l.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return w(T),$},A=async T=>{const{errors:$}=await N(T);if(T)for(const V of T){const te=ae($,V);te?Ye(r.errors,V,te):Ct(r.errors,V)}else r.errors=$;return $},E=async(T,$,V={valid:!0})=>{for(const te in T){const J=T[te];if(J){const{_f:G,...ie}=J;if(G){const Re=l.array.has(G.name),We=J._f&&EQ(J._f);We&&d.validatingFields&&w([te],!0);const tr=await Ck(J,l.disabled,i,m,t.shouldUseNativeValidation&&!$,Re);if(We&&d.validatingFields&&w([te]),tr[G.name]&&(V.valid=!1,$))break;!$&&(ae(tr,G.name)?Re?DQ(r.errors,tr,G.name):Ye(r.errors,G.name,tr[G.name]):Ct(r.errors,G.name))}!wr(ie)&&await E(ie,$,V)}}return V.valid},_=()=>{for(const T of l.unMount){const $=ae(n,T);$&&($._f.refs?$._f.refs.every(V=>!gg(V)):!gg($._f.ref))&&ee(T)}l.unMount=new Set},F=(T,$)=>!t.disabled&&(T&&$&&Ye(i,T,$),!pi(B(),s)),C=(T,$,V)=>SQ(T,l,{...a.mount?i:Pt($)?s:ns(T)?{[T]:$}:$},V,$),L=T=>wb(ae(a.mount?i:s,T,t.shouldUnregister?ae(s,T,[]):[])),I=(T,$,V={})=>{const te=ae(n,T);let J=$;if(te){const G=te._f;G&&(!G.disabled&&Ye(i,T,YR($,G)),J=Rf(G.ref)&&mr($)?"":$,GR(G.ref)?[...G.ref.options].forEach(ie=>ie.selected=J.includes(ie.value)):G.refs?dd(G.ref)?G.refs.forEach(ie=>{(!ie.defaultChecked||!ie.disabled)&&(Array.isArray(J)?ie.checked=!!J.find(Re=>Re===ie.value):ie.checked=J===ie.value||!!J)}):G.refs.forEach(ie=>ie.checked=ie.value===J):kb(G.ref)?G.ref.value="":(G.ref.value=J,G.ref.type||f.state.next({name:T,values:Ut(i)})))}(V.shouldDirty||V.shouldTouch)&&k(T,J,V.shouldTouch,V.shouldDirty,!0),V.shouldValidate&&z(T)},O=(T,$,V)=>{for(const te in $){if(!$.hasOwnProperty(te))return;const J=$[te],G=T+"."+te,ie=ae(n,G);(l.array.has(T)||At(J)||ie&&!ie._f)&&!ko(J)?O(G,J,V):I(G,J,V)}},U=(T,$,V={})=>{const te=ae(n,T),J=l.array.has(T),G=Ut($);Ye(i,T,G),J?(f.array.next({name:T,values:Ut(i)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&V.shouldDirty&&f.state.next({name:T,dirtyFields:jc(s,i),isDirty:F(T,G)})):te&&!te._f&&!mr(G)?O(T,G,V):I(T,G,V),Sk(T,l)&&f.state.next({...r,name:T}),f.state.next({name:a.mount?T:void 0,values:Ut(i)})},M=async T=>{a.mount=!0;const $=T.target;let V=$.name,te=!0;const J=ae(n,V),G=We=>{te=Number.isNaN(We)||ko(We)&&isNaN(We.getTime())||pi(We,ae(i,V,We))},ie=jk(t.mode),Re=jk(t.reValidateMode);if(J){let We,tr;const gn=$.type?wk(J._f):xQ(T),Qr=T.type===gk.BLUR||T.type===gk.FOCUS_OUT,sa=!PQ(J._f)&&!t.resolver&&!ae(r.errors,V)&&!J._f.deps||OQ(Qr,ae(r.touchedFields,V),r.isSubmitted,Re,ie),xs=Sk(V,l,Qr);Ye(i,V,gn),Qr?(J._f.onBlur&&J._f.onBlur(T),c&&c(0)):J._f.onChange&&J._f.onChange(T);const Pr=k(V,gn,Qr),ia=!wr(Pr)||xs;
vendor: 5,951 bytes, line 654
654if(!Qr&&f.state.next({name:V,type:T.type,values:Ut(i)}),sa)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?Qr&&g():Qr||g()),ia&&f.state.next({name:V,...xs?{}:Pr});if(!Qr&&xs&&f.state.next({...r}),t.resolver){const{errors:xn}=await N([V]);if(G(gn),te){const oa=Ak(r.errors,n,V),Js=Ak(xn,n,oa.name||V);We=Js.error,V=Js.name,tr=wr(xn)}}else w([V],!0),We=(await Ck(J,l.disabled,i,m,t.shouldUseNativeValidation))[V],w([V]),G(gn),te&&(We?tr=!1:(d.isValid||h.isValid)&&(tr=await E(n,!0)));te&&(J._f.deps&&z(J._f.deps),S(V,tr,We,Pr))}},P=(T,$)=>{if(ae(r.errors,$)&&T.focus)return T.focus(),1},z=async(T,$={})=>{let V,te;const J=Yc(T);if(t.resolver){const G=await A(Pt(T)?T:J);V=wr(G),te=T?!J.some(ie=>ae(G,ie)):V}else T?(te=(await Promise.all(J.map(async G=>{const ie=ae(n,G);return await E(ie&&ie._f?{[G]:ie}:ie)}))).every(Boolean),!(!te&&!r.isValid)&&g()):te=V=await E(n);return f.state.next({...!ns(T)||(d.isValid||h.isValid)&&V!==r.isValid?{}:{name:T},...t.resolver||!T?{isValid:V}:{},errors:r.errors}),$.shouldFocus&&!te&&Jc(n,P,T?J:l.mount),te},B=T=>{const $={...a.mount?i:s};return Pt(T)?$:ns(T)?ae($,T):T.map(V=>ae($,V))},re=(T,$)=>({invalid:!!ae(($||r).errors,T),isDirty:!!ae(($||r).dirtyFields,T),error:ae(($||r).errors,T),isValidating:!!ae(r.validatingFields,T),isTouched:!!ae(($||r).touchedFields,T)}),Q=T=>{T&&Yc(T).forEach($=>Ct(r.errors,$)),f.state.next({errors:T?r.errors:{}})},fe=(T,$,V)=>{const te=(ae(n,T,{_f:{}})._f||{}).ref,J=ae(r.errors,T)||{},{ref:G,message:ie,type:Re,...We}=J;Ye(r.errors,T,{...We,...$,ref:te}),f.state.next({name:T,errors:r.errors,isValid:!1}),V&&V.shouldFocus&&te&&te.focus&&te.focus()},pe=(T,$)=>On(T)?f.state.subscribe({next:V=>"values"in V&&T(C(void 0,$),V)}):C(T,$,!0),Me=T=>f.state.subscribe({next:$=>{RQ(T.name,$.name,T.exact)&&TQ($,T.formState||d,Kr,T.reRenderRoot)&&T.callback({values:{...i},...r,...$,defaultValues:s})}}).unsubscribe,Ze=T=>(a.mount=!0,h={...h,...T.formState},Me({...T,formState:h})),ee=(T,$={})=>{for(const V of T?Yc(T):l.mount)l.mount.delete(V),l.array.delete(V),$.keepValue||(Ct(n,V),Ct(i,V)),!$.keepError&&Ct(r.errors,V),!$.keepDirty&&Ct(r.dirtyFields,V),!$.keepTouched&&Ct(r.touchedFields,V),!$.keepIsValidating&&Ct(r.validatingFields,V),!t.shouldUnregister&&!$.keepDefaultValue&&Ct(s,V);f.state.next({values:Ut(i)}),f.state.next({...r,...$.keepDirty?{isDirty:F()}:{}}),!$.keepIsValid&&g()},Pe=({disabled:T,name:$})=>{(Qn(T)&&a.mount||T||l.disabled.has($))&&(T?l.disabled.add($):l.disabled.delete($))},He=(T,$={})=>{let V=ae(n,T);const te=Qn($.disabled)||Qn(t.disabled);return Ye(n,T,{...V||{},_f:{...V&&V._f?V._f:{ref:{name:T}},name:T,mount:!0,...$}}),l.mount.add(T),V?Pe({disabled:Qn($.disabled)?$.disabled:t.disabled,name:T}):j(T,!0,$.value),{...te?{disabled:$.disabled||t.disabled}:{},...t.progressive?{required:!!$.required,min:kc($.min),max:kc($.max),minLength:kc($.minLength),maxLength:kc($.maxLength),pattern:kc($.pattern)}:{},name:T,onChange:M,onBlur:M,ref:J=>{if(J){He(T,$),V=ae(n,T);const G=Pt(J.value)&&J.querySelectorAll&&J.querySelectorAll("input,select,textarea")[0]||J,ie=AQ(G),Re=V._f.refs||[];if(ie?Re.find(We=>We===G):G===V._f.ref)return;Ye(n,T,{_f:{...V._f,...ie?{refs:[...Re.filter(gg),G,...Array.isArray(ae(s,T))?[{}]:[]],ref:{type:G.type,name:T}}:{ref:G}}}),j(T,!1,void 0,G)}else V=ae(n,T,{}),V._f&&(V._f.mount=!1),(t.shouldUnregister||$.shouldUnregister)&&!(vQ(l.array,T)&&a.action)&&l.unMount.add(T)}}},Ae=()=>t.shouldFocusError&&Jc(n,P,l.mount),Ne=T=>{Qn(T)&&(f.state.next({disabled:T}),Jc(n,($,V)=>{const te=ae(n,V);te&&($.disabled=te._f.disabled||T,Array.isArray(te._f.refs)&&te._f.refs.forEach(J=>{J.disabled=te._f.disabled||T}))},0,!1))},Te=(T,$)=>async V=>{let te;V&&(V.preventDefault&&V.preventDefault(),V.persist&&V.persist());let J=Ut(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:G,values:ie}=await N();r.errors=G,J=Ut(ie)}else await E(n);if(l.disabled.size)for(const G of l.disabled)Ct(J,G);if(Ct(r.errors,"root"),wr(r.errors)){f.state.next({errors:{}});try{await T(J,V)}catch(G){te=G}}else $&&await $({...r.errors},V),Ae(),setTimeout(Ae);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:wr(r.errors)&&!te,submitCount:r.submitCount+1,errors:r.errors}),te)throw te},Nt=(T,$={})=>{ae(n,T)&&(Pt($.defaultValue)?U(T,Ut(ae(s,T))):(U(T,$.defaultValue),Ye(s,T,Ut($.defaultValue))),$.keepTouched||Ct(r.touchedFields,T),$.keepDirty||(Ct(r.dirtyFields,T),r.isDirty=$.defaultValue?F(T,Ut(ae(s,T))):F()),$.keepError||(Ct(r.errors,T),d.isValid&&g()),f.state.next({...r}))},Kt=(T,$={})=>{const V=T?Ut(T):s,te=Ut(V),J=wr(T),G=J?s:te;if($.keepDefaultValues||(s=V),!$.keepValues){if($.keepDirtyValues){const ie=new Set([...l.mount,...Object.keys(jc(s,i))]);for(const Re of Array.from(ie))ae(r.dirtyFields,Re)?Ye(G,Re,ae(i,Re)):U(Re,ae(G,Re))}else{if(bb&&Pt(T))for(const ie of l.mount){const Re=ae(n,ie);if(Re&&Re._f){const We=Array.isArray(Re._f.refs)?Re._f.refs[0]:Re._f.ref;if(Rf(We)){const tr=We.closest("form");if(tr){tr.reset();break}}}}if($.keepFieldsRef)for(const ie of l.mount)U(ie,ae(G,ie));else n={}}i=t.shouldUnregister?$.keepDefaultValues?Ut(s):{}:Ut(G),f.array.next({values:{...G}}),f.state.next({values:{...G}})}l={mount:$.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!$.keepIsValid||!!$.keepDirtyValues,a.watch=!!t.shouldUnregister,f.state.next({submitCount:$.keepSubmitCount?r.submitCount:0,isDirty:J?!1:$.keepDirty?r.isDirty:!!($.keepDefaultValues&&!pi(T,s)),isSubmitted:$.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:J?{}:$.keepDirtyValues?$.keepDefaultValues&&i?jc(s,i):r.dirtyFields:$.keepDefaultValues&&T?jc(s,T):$.keepDirty?r.dirtyFields:{},touchedFields:$.keepTouched?r.touchedFields:{},errors:$.keepErrors?r.errors:{},isSubmitSuccessful:$.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Er=(T,$)=>Kt(On(T)?T(i):T,$),gt=(T,$={})=>{const V=ae(n,T),te=V&&V._f;if(te){const J=te.refs?te.refs[0]:te.ref;
654J.focus&&(J.focus(),$.shouldSelect&&On(J.select)&&J.select())}},Kr=T=>{r={...r,...T}},Gr={control:{register:He,unregister:ee,getFieldState:re,handleSubmit:Te,setError:fe,_subscribe:Me,_runSchema:N,_focusError:Ae,_getWatch:C,_getDirty:F,_setValid:g,_setFieldArray:b,_setDisabledField:Pe,_setErrors:x,_getFieldArray:L,_reset:Kt,_resetDefaultValues:()=>On(t.defaultValues)&&t.defaultValues().then(T=>{Er(T,t.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:_,_disableForm:Ne,_subjects:f,_proxyFormState:d,get _fields(){return n},get _formValues(){return i},get _state(){return a},set _state(T){a=T},get _defaultValues(){return s},get _names(){return l},set _names(T){l=T},get _formState(){return r},get _options(){return t},set _options(T){t={...t,...T}}},subscribe:Ze,trigger:z,register:He,handleSubmit:Te,watch:pe,setValue:U,getValues:B,reset:Er,resetField:Nt,clearErrors:Q,unregister:ee,setError:fe,setFocus:gt,getFieldState:re};return{...Gr,formControl:Gr}}function zQ(e={}){const t=H.useRef(void 0),r=H.useRef(void 0),[n,s]=H.useState({isDirty:!1,isValidating:!1,isLoading:On(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:On(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!On(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...l}=MQ(e);t.current={...l,formState:n}}const i=t.current.control;return i._options=e,kQ(()=>{const a=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}),reRenderRoot:!0});return s(l=>({...l,isReady:!0})),i._formState.isReady=!0,a},[i]),H.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),H.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),H.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),H.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),H.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==n.isDirty&&i._subjects.state.next({isDirty:a})}},[i,n.isDirty]),H.useEffect(()=>{e.values&&!pi(e.values,r.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),r.current=e.values,s(a=>({...a}))):i._resetDefaultValues()},[i,e.values]),H.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=jQ(n,i),t.current}const _k=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ae(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},eO=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?_k(n.ref,r,e):n.refs&&n.refs.forEach(s=>_k(s,r,e))}},FQ=(e,t)=>{t.shouldUseNativeValidation&&eO(e,t);const r={};for(const n in e){const s=ae(t.fields,n),i=Object.assign(e[n]||{},{ref:s&&s.ref});if($Q(t.names||Object.keys(e),n)){const a=Object.assign({},ae(r,n));Ye(a,"root",i),Ye(r,n,a)}else Ye(r,n,i)}return r},$Q=(e,t)=>e.some(r=>r.startsWith(t+"."));var VQ=function(e,t){for(var r={};e.length;){var n=e[0],s=n.code,i=n.message,a=n.path.join(".");if(!r[a])if("unionErrors"in n){var l=n.unionErrors[0].errors[0];r[a]={message:l.message,type:l.code}}else r[a]={message:i,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(h){return e.push(h)})}),t){var c=r[a].types,u=c&&c[n.code];r[a]=KR(a,t,r,s,u?[].concat(u,n.message):n.message)}e.shift()}return r},UQ=function(e,t,r){return r===void 0&&(r={}),function(n,s,i){try{return Promise.resolve(function(a,l){try{var c=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return i.shouldUseNativeValidation&&eO({},i),{errors:{},values:r.raw?n:u}})}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(a){if(function(l){return Array.isArray(l==null?void 0:l.errors)}(a))return{values:{},errors:FQ(VQ(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};const BQ=WR({full_name:en().trim().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters"),address_line1:en().trim().min(5,"Address is required").max(200,"Address must be less than 200 characters"),address_line2:en().trim().max(200,"Address must be less than 200 characters").optional(),city:en().trim().min(2,"City is required").max(100,"City must be less than 100 characters"),province:en().trim().min(2,"Province is required").max(100,"Province must be less than 100 characters"),postal_code:en().trim().min(4,"Postal code is required").max(10,"Postal code must be less than 10 characters"),country:en().trim().min(2,"Country is required").max(100,"Country must be less than 100 characters"),phone:en().trim().max(20,"Phone must be less than 20 characters").optional()});function HQ(){const{t:e}=Rt(),t=Un(),{user:r,loading:n}=Zs(),{cartItems:s,isLoading:i,cartTotal:a}=Xs(),[l,c]=p.useState(!1),[u,d]=p.useState([]),[h,f]=p.useState(null),[m,v]=p.useState(!1),{token:g,isReady:w,isVerifying:b,renderWidget:y,reset:x,verify:j}=zT(),{register:k,handleSubmit:S,reset:N,formState:{errors:A}}=zQ({resolver:UQ(BQ),defaultValues:{country:"Italia"}});p.useEffect(()=>{async function C(){if(!r)return;const{data:L,error:I}=await Y.from("shipping_addresses").select("*").eq("user_id",r.id).order("is_default",{ascending:!1});if(!I&&L)if(d(L),L.length>0){const O=L.find(U=>U.is_default)||L[0];f(O.id)}else v(!0)}C()},[r]),p.useEffect(()=>{!n&&!r&&(Le({title:e("checkout.loginRequired")||"Login required",description:e("checkout.loginRequiredDescription")||"Please log in or create an account to complete your purchase."}),t("/auth?redirect=/checkout"))},[n,r,t,e]);const E=async C=>
654{if(!await j()){Le({title:"CAPTCHA verification failed",description:"Please complete the CAPTCHA and try again.",variant:"destructive"});return}c(!0);try{const{data:I,error:O}=await Y.functions.invoke("create-checkout",{body:{shipping_address:C}});if(O){let U=O.message||"Checkout failed";if(U.toLowerCase().includes("authentication")||U.toLowerCase().includes("auth")||U.toLowerCase().includes("expired")){await Y.auth.signOut(),Le({title:"Session expired",description:"Please log in again to continue checkout.",variant:"destructive"}),t("/auth?redirect=/checkout");return}throw new Error(U)}if(I!=null&&I.url)window.open(I.url,"_blank");else throw new Error("No checkout URL received")}catch(I){console.error("Checkout error:",I),Le({title:"Checkout failed",description:I instanceof Error?I.message:"Please try again",variant:"destructive"})}finally{c(!1),x()}},_=async C=>{if(!r)return;const{error:L}=await Y.from("shipping_addresses").insert([{user_id:r.id,full_name:C.full_name,address_line1:C.address_line1,address_line2:C.address_line2||null,city:C.city,province:C.province,postal_code:C.postal_code,country:C.country,phone:C.phone||null,is_default:u.length===0}]);if(L){Le({title:"Failed to save address",variant:"destructive"});return}await E(C)},F=async()=>{const C=u.find(L=>
654L.id===h);if(!C){Le({title:"Please select an address",variant:"destructive"});return}await E({full_name:C.full_name,address_line1:C.address_line1,address_line2:C.address_line2,city:C.city,province:C.province,postal_code:C.postal_code,country:C.country,phone:C.phone})};return n||i?o.jsx(Je,{children:o.jsx("div",{className:"container mx-auto px-4 py-16 text-center",children:o.jsx(st,{className:"h-8 w-8 animate-spin mx-auto"})})}):o.jsxs(Je,{children:[o.jsx($t,{title:"Secure Checkout",description:"Complete your OVERCLOCK order with secure checkout. Enter shipping details, choose payment method, and finalize your purchase safely.",noIndex:!0}),o.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-4xl",children:[o.jsxs(Z,{to:"/cart",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground mb-6",children:[o.jsx(rm,{size:18}),e("checkout.backToCart")]}),o.jsx("h1",{className:"text-3xl font-bold mb-8",children:e("checkout.checkout")}),o.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[o.jsx("div",{className:"lg:col-span-2",children:o.jsxs("div",{className:"bg-card border border-border rounded-lg p-6",children:[o.jsxs("h2",{className:"text-xl font-semibold mb-6 flex items-center gap-2",children:[o.jsx(bu,{size:20}),e("checkout.shippingAddress")]}),u.length>0&&!m&&o.jsxs("div",{className:"space-y-4",children:[u.map(C=>o.jsxs("label",{className:`block p-4 border rounded-lg cursor-pointer transition-colors ${h===C.id?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,children:[o.jsx("input",{type:"radio",name:"savedAddress",value:C.id,checked:h===C.id,onChange:()=>f(C.id),className:"sr-only"}),o.jsxs("div",{className:"flex justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-medium",children:C.full_name}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:[C.address_line1,C.address_line2&&`, ${C.address_line2}`]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:[C.postal_code," ",C.city,", ",C.province]}),o.jsx("p",{className:"text-sm text-muted-foreground",children:C.country}),C.phone&&o.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Tel: ",C.phone]})]}),C.is_default&&o.jsx("span",{className:"text-xs bg-primary/10 text-primary px-2 py-1 rounded h-fit",children:e("common.default")})]})]},C.id)),o.jsx("button",{type:"button",onClick:()=>{v(!0),N({country:"Italia"})},className:"text-sm text-primary hover:underline",children:e("common.addNewAddress")}),o.jsx(Py,{isReady:w,renderWidget:y,className:"mt-4"}),o.jsx(ue,{className:"w-full mt-4",size:"lg",onClick:F,disabled:l||b||!h||!g,children:l||b?o.jsxs(o.Fragment,{children:[o.jsx(st,{size:18,className:"mr-2 animate-spin"}),e("checkout.processing")]}):o.jsx(o.Fragment,{children:e("checkout.continueToPayment")})})]}),(m||u.length===0)&&o.jsxs("form",{onSubmit:S(_),className:"space-y-4",children:[u.length>0&&o.jsx("button",{type:"button",onClick:()=>v(!1),className:"text-sm text-muted-foreground hover:text-foreground mb-4",children:e("common.useSavedAddress")}),o.jsxs("div",{children:[o.jsxs($e,{htmlFor:"full_name",children:[e("checkout.fullName")," *"]}),o.jsx(Fe,{id:"full_name",...k("full_name"),placeholder:"Mario Rossi",className:A.full_name?"border-destructive":""}),A.full_name&&o.jsx("p",{className:"text-sm text-destructive mt-1",children:A.full_name.message})]}),o.jsxs("div",{children:[o.jsxs($e,{htmlFor:"address_line1",children:[e("checkout.address")," *"]}),o.jsx(Fe,{id:"address_line1",...k("address_line1"),placeholder:"Via Roma 123",className:A.address_line1?"border-destructive":""}),A.address_line1&&o.jsx("p",{className:"text-sm text-destructive mt-1",children:A.address_line1.message})]}),o.jsxs("div",{children:[o.jsx($e,{htmlFor:"address_line2",children:e("checkout.apartment")}),o.jsx(Fe,{id:"address_line2",...k("address_line2"),placeholder:"Interno 4"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsxs($e,{htmlFor:"city",children:[e("checkout.city")," *"]}),o.jsx(Fe,{id:"city",...k("city"),placeholder:"Milano",className:A.city?"border-destructive":""}),A.city&&o.jsx("p",{className:"text-sm text-destructive mt-1",children:A.city.message})]}),o.jsxs("div",{children:[o.jsxs($e,{htmlFor:"province",children:[e("checkout.province")," *"]}),o.jsx(Fe,{id:"province",...k("province"),placeholder:"MI",className:A.province?"border-destructive":""}),A.province&&o.jsx("p",{className:"text-sm text-destructive mt-1",children:A.province.message})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsxs($e,{htmlFor:"postal_code",children:[e("checkout.postalCode")," *"]}),o.jsx(Fe,{id:"postal_code",...k("postal_code"),placeholder:"20100",className:A.postal_code?"border-destructive":""}),A.postal_code&&o.jsx("p",{className:"text-sm text-destructive mt-1",children:A.postal_code.message})]}),o.jsxs("div",{children:[o.jsxs($e,{htmlFor:"country",children:[e("checkout.country")," *"]}),o.jsx(Fe,{id:"country",...k("country"),placeholder:"Italia",className:A.country?"border-destructive":""}),A.country&&o.jsx("p",{className:"text-sm text-destructive mt-1",children:A.country.message})]})]}),o.jsxs("div",{children:[o.jsx($e,{htmlFor:"phone",children:e("checkout.phone")}
654),o.jsx(Fe,{id:"phone",...k("phone"),placeholder:"+39 123 456 7890",type:"tel"})]}),o.jsx(Py,{isReady:w,renderWidget:y,className:"mt-4"}),o.jsx(ue,{type:"submit",className:"w-full mt-6",size:"lg",disabled:l||b||!g,children:l||b?o.jsxs(o.Fragment,{children:[o.jsx(st,{size:18,className:"mr-2 animate-spin"}),e("checkout.processing")]}):o.jsx(o.Fragment,{children:e("checkout.continueToPayment")})})]})]})}),o.jsx("div",{className:"lg:col-span-1",children:o.jsxs("div",{className:"bg-card border border-border rounded-lg p-6 sticky top-24",children:[o.jsx("h2",{className:"text-lg font-bold mb-4",children:e("cart.orderSummary")}),o.jsx("div",{className:"space-y-3 mb-4",children:s.map(C=>{var I,O,U,M,P;const L=((I=C.configuration)==null?void 0:I.total_price)||((O=C.product)==null?void 0:O.price)||0;return o.jsxs("div",{className:"flex gap-3",children:[o.jsx("div",{className:"w-12 h-12 bg-black rounded shrink-0 overflow-hidden",children:o.jsx("img",{src:((U=C.product)==null?void 0:U.image)||"/placeholder.svg",alt:(M=C.product)==null?void 0:M.name,className:"w-full h-full object-contain p-1"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm font-medium truncate",children:(P=C.product)==null?void 0:P.name}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[e("checkout.qty"),": ",C.quantity]})]}),o.jsxs("p",{className:"text-sm font-medium",children:["â¬",(L*C.quantity).toLocaleString("de-DE")]})]},C.id)})}),o.jsxs("div",{className:"border-t border-border pt-4 space-y-2",children:[o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:e("cart.subtotal")}),o.jsxs("span",{children:["â¬",a.toLocaleString("de-DE")]})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:e("cart.shipping")}),o.jsx("span",{className:"text-green-500",children:e("cart.free")})]}),o.jsxs("div",{className:"border-t border-border pt-2 flex justify-between font-bold",children:[o.jsx("span",{children:e("cart.total")}),o.jsxs("span",{children:["â¬",a.toLocaleString("de-DE")]})]})]})]})})]})]})]})}function WQ(){const{t:e}=Rt(),t=[{key:"necessary",icon:Mn,iconBg:"bg-green-500/10",iconColor:"text-green-500",cookies:[{name:"cookie_consent",duration:e("cookiePolicy.duration.1year"),purpose:e("cookiePolicy.cookies.necessary.cookieConsent")},{name:"session_id",duration:e("cookiePolicy.duration.session"),purpose:e("cookiePolicy.cookies.necessary.sessionId")},{name:"auth_token",duration:e("cookiePolicy.duration.7days"),purpose:e("cookiePolicy.cookies.necessary.authToken")},{name:"csrf_token",duration:e("cookiePolicy.duration.session"),purpose:e("cookiePolicy.cookies.necessary.csrfToken")}]},{key:"analytics",icon:qv,iconBg:"bg-blue-500/10",iconColor:"text-blue-500",cookies:[{name:"_ga",duration:e("cookiePolicy.duration.2years"),purpose:e("cookiePolicy.cookies.analytics.ga")},{name:"_ga_*",duration:e("cookiePolicy.duration.2years"),purpose:e("cookiePolicy.cookies.analytics.gaId")},{name:"_gid",duration:e("cookiePolicy.duration.24hours"),purpose:e("cookiePolicy.cookies.analytics.gid")},{name:"_gat",duration:e("cookiePolicy.duration.1minute"),purpose:e("cookiePolicy.cookies.analytics.gat")}]},{key:"marketing",icon:Jv,iconBg:"bg-purple-500/10",iconColor:"text-purple-500",cookies:[{name:"_fbp",duration:e("cookiePolicy.duration.3months"),purpose:e("cookiePolicy.cookies.marketing.fbp")},{name:"_gcl_au",duration:e("cookiePolicy.duration.3months"),purpose:e("cookiePolicy.cookies.marketing.gclAu")},{name:"IDE",duration:e("cookiePolicy.duration.1year"),purpose:e("cookiePolicy.cookies.marketing.ide")},{name:"NID",duration:e("cookiePolicy.duration.6months"),purpose:e("cookiePolicy.cookies.marketing.nid")}]},{key:"preferences",icon:Ko,iconBg:"bg-orange-500/10",iconColor:"text-orange-500",cookies:[{name:"i18next",duration:e("cookiePolicy.duration.1year"),purpose:e("cookiePolicy.cookies.preferences.i18next")},{name:"theme",duration:e("cookiePolicy.duration.1year"),purpose:e("cookiePolicy.cookies.preferences.theme")},{name:"cart_items",duration:e("cookiePolicy.duration.30days"),purpose:e("cookiePolicy.cookies.preferences.cartItems")},{name:"recently_viewed",duration:e("cookiePolicy.duration.30days"),purpose:e("cookiePolicy.cookies.preferences.recentlyViewed")}]}],r=[{browser:"Chrome",url:"https://support.google.com/chrome/answer/95647"},{browser:"Firefox",url:"https://support.mozilla.org/en-US/kb/clear-cookies-and-site-data-firefox"},{browser:"Safari",url:"https://support.apple.com/guide/safari/manage-cookies-sfri11471/mac"}
654,{browser:"Edge",url:"https://support.microsoft.com/en-us/microsoft-edge/delete-cookies-in-microsoft-edge-63947406-40ac-c3b8-57b9-2a946a29ae09"}];return o.jsxs(Je,{children:[o.jsx($t,{title:e("cookiePolicy.pageTitle","Cookie Policy"),description:e("cookiePolicy.pageDescription","Learn about how we use cookies and similar technologies on our website.")}),o.jsxs("div",{className:"min-h-screen bg-background",children:[o.jsx("div",{className:"bg-gradient-to-b from-muted/50 to-background border-b border-border",children:o.jsxs("div",{className:"container max-w-4xl mx-auto px-4 py-12",children:[o.jsxs(Z,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors mb-6",children:[o.jsx(rm,{className:"w-4 h-4"}),e("common.backToHome")]}),o.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[o.jsx("div",{className:"p-3 bg-primary/10 rounded-xl",children:o.jsx(XN,{className:"w-8 h-8 text-primary"})}),o.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground",children:e("cookiePolicy.title")})]}),o.jsxs("p",{className:"text-muted-foreground text-lg",children:[e("cookiePolicy.lastUpdated"),": January 2026"]})]})}),o.jsxs("div",{className:"container max-w-4xl mx-auto px-4 py-12 space-y-12",children:[o.jsxs("section",{className:"prose prose-neutral dark:prose-invert max-w-none",children:[o.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:e("cookiePolicy.whatAreCookies.title")}),o.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e("cookiePolicy.whatAreCookies.description")})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:e("cookiePolicy.howWeUse.title")}),o.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6",children:e("cookiePolicy.howWeUse.description")})]}),o.jsxs("section",{className:"space-y-6",children:[o.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:e("cookiePolicy.typesOfCookies.title")}),t.map(n=>{const s=n.icon;return o.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden",children:[o.jsx("div",{className:"p-5 border-b border-border bg-muted/30",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:`p-2.5 rounded-lg ${n.iconBg}`,children:o.jsx(s,{className:`w-5 h-5 ${n.iconColor}`})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-foreground",children:e(`cookies.categories.${n.key}.title`)}),o.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:e(`cookiePolicy.categories.${n.key}.fullDescription`)})]})]})}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-muted/50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left text-xs font-medium text-muted-foreground uppercase tracking-wider px-5 py-3",children:e("cookiePolicy.table.cookieName")}),o.jsx("th",{className:"text-left text-xs font-medium text-muted-foreground uppercase tracking-wider px-5 py-3",children:e("cookiePolicy.table.duration")}),o.jsx("th",{className:"text-left text-xs font-medium text-muted-foreground uppercase tracking-wider px-5 py-3",children:e("cookiePolicy.table.purpose")})]})}),o.jsx("tbody",{className:"divide-y divide-border",children:n.cookies.map(i=>o.jsxs("tr",{className:"hover:bg-muted/20 transition-colors",children:[o.jsx("td",{className:"px-5 py-4",children:o.jsx("code",{className:"text-sm bg-muted px-2 py-1 rounded font-mono",children:i.name})}),o.jsx("td",{className:"px-5 py-4 text-sm text-muted-foreground",children:i.duration}),o.jsx("td",{className:"px-5 py-4 text-sm text-muted-foreground",children:i.purpose})]},i.name))})]})})]},n.key)})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:e("cookiePolicy.manageCookies.title")}),o.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6",children:e("cookiePolicy.manageCookies.description")}),o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:r.map(n=>o.jsxs("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 p-4 bg-card border border-border rounded-lg hover:bg-muted/50 hover:border-primary/50 transition-all group",children:[o.jsx("span",{className:"font-medium text-foreground group-hover:text-primary transition-colors",children:n.browser}),o.jsx(lD,{className:"w-4 h-4 text-muted-foreground group-hover:text-primary transition-colors"})]},n.browser))})]}),o.jsxs("section",{className:"bg-card border border-border rounded-xl p-6",children:[o.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:e("cookiePolicy.yourChoices.title")}),o.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6",children:e("cookiePolicy.yourChoices.description")}),o.jsxs(ue,{onClick:()=>{localStorage.removeItem("cookie_consent"),window.location.reload()},variant:"outline",className:"gap-2",children:[o.jsx(Ko,{className:"w-4 h-4"}),e("cookiePolicy.yourChoices.updatePreferences")]})]}),o.jsxs("section",{children:[o.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-4",children:e("cookiePolicy.contact.title")}),o.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e("cookiePolicy.contact.description")})]})]})]})]})}const qQ=[{name:"Basic",key:null,badge:"GRATIS",price:"Gratis",period:"",subt
654itle:"con ogni acquisto PC",featured:!1,features:[{name:"Idoneità ",value:"Solo acquirenti"},{name:"Troubleshooting Remoto",value:"Assistenza base"},{name:"Tempo di Risposta",value:"48-72 ore"},{name:"Supporto On-Site",value:"Non incluso"},{name:"Gestione Flotta",value:"Non incluso"},{name:"Security Audit",value:"Non incluso"}]}],KQ=[{name:"Business Starter",key:"business_starter",badge:"",price:"â¬15",period:"/PC + IVA",subtitle:"Per freelancer",featured:!1,features:[{name:"Idoneità ",value:"Partita IVA"},{name:"Troubleshooting Remoto",value:"Illimitato"},{name:"Tempo di Risposta",value:"24 ore"},{name:"Supporto On-Site",value:"Non incluso"},{name:"Gestione Flotta",value:"Non incluso"},{name:"Security Audit",value:"Non incluso"}]},{name:"Business",key:"business",badge:"CONSIGLIATO",price:"â¬30",period:"/PC + IVA",subtitle:"Per piccole imprese",featured:!0,features:[{name:"Idoneità ",value:"Tutti i business"},{name:"Troubleshooting Remoto",value:"Illimitato"},{name:"Tempo di Risposta",value:"4 ore lavorative"},{name:"Supporto On-Site",value:"Incluso"},{name:"Gestione Flotta",value:"Dashboard dedicata"},{name:"Security Audit",value:"Trimestrale"}]},{name:"Business Full",key:"business_full",badge:"ENTERPRISE",price:"â¬60",period:"/PC + IVA",subtitle:"Supporto completo",featured:!1,features:[{name:"Idoneità ",value:"Enterprise"},{name:"Troubleshooting Remoto",value:"Illimitato + Prioritario"},{name:"Tempo di Risposta",value:"2 ore"},{name:"Supporto On-Site",value:"Illimitato"},{name:"Gestione Flotta",value:"Dashboard + API"},{name:"Security Audit",value:"Mensile"}]}],GQ=[{icon:nm,title:"1. Contattaci",description:"Chiamaci o apri un ticket di supporto"},{icon:Ko,title:"2. Diagnosi",description:"Analizziamo il problema in remoto o in loco"},{icon:rC,title:"3. Soluzione",description:"Risolviamo rapidamente ed efficacemente"}],QQ=[{icon:_i,title:"Crittografia Sicura",description:"Connessioni protette end-to-end"},{icon:El,title:"Uptime Garantito",description:"SLA fino al 99.9%"},{icon:Mn,title:"Accesso Temporaneo",description:"Controllo totale sui permessi"}];function ZQ(){const[e,t]=p.useState("gamer"),[r,n]=p.useState(null),[s]=mm(),i=Un(),{user:a}=Zs(),{subscribed:l,plan:c,subscriptionEnd:u,isLoading:d,subscribe:h,openPortal:f,checkSubscription:m}=$T(),v=e==="gamer"?qQ:KQ;p.useEffect(()=>{const x=s.get("subscription");x==="success"?(fi.success("Abbonamento attivato con successo!"),m(),i("/service-plus",{replace:!0})):x==="cancelled"&&(fi.info("Abbonamento annullato"),i("/service-plus",{replace:!0}))},[s,i,m]);const g=async x=>{if(!a){fi.error("Effettua l'accesso per abbonarti"),i("/auth");return}n(x);try{await h(x)}catch(j){console.error("Subscription error:",j),fi.error("Errore durante l'abbonamento. Riprova.")}finally{n(null)}},w=async()=>{try{await f()}catch(x){console.error("Portal error:",x),fi.error("Errore nell'apertura del portale. Riprova.")}},b=x=>x?l&&c===x:!1,y=x=>{var j;return x?((j=gb[x])==null?void 0:j.name)||x:null};return o.jsxs(Je,{children:[o.jsx($t,{title:"Service+ | Assistenza Tecnica Premium",description:"Assistenza tecnica professionale per gaming e business. Supporto remoto e on-site con tempi di risposta garantiti."}),o.jsxs("section",{className:"relative py-24 md:py-32 overflow-hidden",children:[o.jsx("div",{className:"absolute inset-0 bg-background"}),o.jsx("div",{className:"absolute inset-0 bg-[url('/lovable-uploads/a0120c85-bab0-4c30-86dd-b20b3708f548.webp')] bg-cover bg-center opacity-[0.07]"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background via-transparent to-background"}),o.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[400px] bg-accent/5 rounded-full blur-[120px]"}),o.jsx("div",{className:"container mx-auto px-4 relative z-10",children:o.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[o.jsxs(X.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full border border-border bg-card/60 backdrop-blur-sm mb-8",children:[o.jsx(Mn,{className:"w-3.5 h-3.5 text-accent"}),o.jsx("span",{className:"text-xs font-medium tracking-wider up
654percase text-muted-foreground",children:"Assistenza Tecnica Premium"})]}),o.jsxs(X.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.05},className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-5 leading-[1.1] tracking-tight",children:["Il supporto che il tuo"," ",o.jsxs("span",{className:"relative inline-block",children:[o.jsx("span",{className:"text-accent",children:"hardware merita"}),o.jsx("span",{className:"absolute -bottom-1 left-0 right-0 h-[2px] bg-gradient-to-r from-transparent via-accent/50 to-transparent"})]})]}),o.jsx(X.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"text-base md:text-lg text-muted-foreground mb-10 max-w-2xl mx-auto leading-relaxed",children:"Dal gaming al business, assistenza professionale con tempi di risposta garantiti. Il tuo partner tecnologico in Italia dal 2026."}),o.jsx(X.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.15},className:"flex items-center justify-center gap-8 md:gap-12 mb-10",children:[{value:"2h",label:"Risposta minima"},{value:"99.9%",label:"SLA garantito"},{value:"24/7",label:"Supporto remoto"}].map(x=>o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-2xl md:text-3xl font-bold text-foreground",children:x.value}),o.jsx("p",{className:"text-[11px] md:text-xs text-muted-foreground mt-0.5",children:x.label})]},x.label))}),l&&c&&o.jsxs(X.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.15},className:"mb-8 inline-flex items-center gap-4 px-5 py-3 bg-card border border-accent/20 rounded-xl",children:[o.jsx("div",{className:"w-2 h-2 rounded-full bg-accent animate-pulse"}),o.jsxs("div",{className:"text-left",children:[o.jsxs("p",{className:"text-sm font-medium text-foreground",children:["Service+ ",y(c)," attivo"]}),u&&o.jsxs("p",{className:"text-xs text-muted-foreground",children:["Rinnovo: ",new Date(u).toLocaleDateString("it-IT")]})]}),o.jsx(ue,{onClick:w,variant:"outline",size:"sm",className:"border-border text-foreground hover:bg-muted ml-2",children:"Gestisci"})]}),o.jsxs(X.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"flex flex-wrap items-center justify-center gap-3",children:[o.jsx(ue,{size:"lg",className:"bg-accent hover:bg-accent/90 text-accent-foreground px-8",children:"Scopri i Piani"}),o.jsx(ue,{size:"lg",variant:"outline",className:"border-border text-foreground hover:bg-card",children:"Richiedi Assistenza"})]})]})})]}),o.jsx("section",{className:"py-16 bg-card",children:o.jsxs("div",{className:"container mx-auto px-4",children:[o.jsx("div",{className:"flex justify-center mb-12",children:o.jsxs("div",{className:"inline-flex bg-background border border-border rounded-full p-1",children:[o.jsx("button",{onClick:()=>t("gamer"),className:`px-6 py-2 rounded-full text-sm font-medium transition-all ${e==="gamer"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Gamer"}),o.jsx("button",{onClick:()=>t("business"),className:`px-6 py-2 rounded-full text-sm font-medium transition-all ${e==="business"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,children:"Business"})]})}),o.jsx("div",{className:`grid gap-8 mx-auto ${e==="gamer"?"max-w-md":"md:grid-cols-3 max-w-6xl"}`,children:v.map((x,j)=>{const k=b(x.key),S=r===x.key;return o.jsxs(X.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:j*.1},className:`bg-background rounded-xl p-8 relative ${k?"border-2 border-accent ring-2 ring-accent/20":x.featured?"border-2 border-primary":"border border-border"}`,children:[k&&o.jsx("div",{className:"absolute -top-3 left-4 px-3 py-1 rounded text-xs font-medium bg-accent text-accent-foreground",children:"IL TUO PIANO"}),x.badge&&!k&&o.jsx("div",{className:`absolute -top-3 right-4 px-3 py-1 rounded text-xs font-medium ${x.featured?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,children:x.badge}),o.jsxs("div",{className:"mb-6",children:[o.jsxs("h3",{className:"text-xl font-bold",children:["Service+ ",x.name]}),o.jsx("p",{className:"text-sm text-muted-foreground",children:x.subtitle}),o.jsxs("div",{className:"mt-3 text-3xl font-bold text-primary",children:[x.price,o.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:x.period})]}),x.key&&o.jsx("div",{className:"mt-4",children:k?o.jsx(ue,{onClick:w,className:"w-full",variant:"outline",children:"Gestisci Abbonamento"}):o.jsx(ue,{onClick:()=>g(x.key),className:`w-full ${x.featured?"bg-primary hover:bg-primary/90":""}`,variant:x.featured?"default":"outline",disabled:S||d,children:S?o.jsxs(o.Fragment,{children:[o.jsx(st,{className:"w-4 h-4 mr-2 animate-spin"}),"Elaborazione..."]}
654):"Abbonati Ora"})}),!x.key&&o.jsx("p",{className:"mt-4 text-sm text-muted-foreground italic",children:"Incluso con ogni acquisto PC"})]}),o.jsx("div",{className:"space-y-4",children:x.features.map((N,A)=>o.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-border/50",children:[o.jsx("span",{className:"text-muted-foreground text-sm",children:N.name}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm",children:N.value}),o.jsx(Vs,{className:"w-4 h-4 text-primary"})]})]},A))})]},x.name)})})]})}),o.jsx("section",{className:"py-16 bg-card",children:o.jsxs("div",{className:"container mx-auto px-4",children:[o.jsx("h2",{className:"text-3xl font-bold mb-12 text-center",children:"Come Funziona"}),o.jsx("div",{className:"grid md:grid-cols-3 gap-8 max-w-4xl mx-auto",children:GQ.map((x,j)=>o.jsxs(X.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:j*.1},className:"text-center",children:[o.jsx("div",{className:"w-20 h-20 mx-auto mb-4 bg-primary/20 rounded-full flex items-center justify-center",children:o.jsx(x.icon,{className:"w-10 h-10 text-primary"})}),o.jsx("h3",{className:"font-bold mb-2",children:x.title}),o.jsx("p",{className:"text-muted-foreground text-sm",children:x.description})]},x.title))})]})}),o.jsx("section",{className:"py-16",children:o.jsxs("div",{className:"container mx-auto px-4",children:[o.jsx("h2",{className:"text-3xl font-bold mb-12 text-center",children:"Sicurezza & Affidabilità "}),o.jsx("div",{className:"grid md:grid-cols-3 gap-8 max-w-4xl mx-auto",children:QQ.map((x,j)=>o.jsxs(X.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:j*.1},className:"text-center",children:[o.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-accent/20 rounded-full flex items-center justify-center",children:o.jsx(x.icon,{className:"w-8 h-8 text-accent"})}),o.jsx("h3",{className:"font-bold mb-2",children:x.title}),o.jsx("p",{className:"text-muted-foreground text-sm",children:x.description})]},x.title))}),o.jsx("p",{className:"text-center text-sm text-muted-foreground mt-12",children:"Tutti i prezzi per privati includono IVA"})]})})]})}const XQ=()=>{const{t:e}=Rt(),t=ps();return p.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),o.jsxs(Je,{children:[o.jsxs(Yu,{children:[o.jsx("title",{children:"Page Not Found | OVERCLOCK"}),o.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),o.jsxs("section",{className:"container mx-auto px-4 py-20 md:py-32 flex flex-col items-center justify-center text-center",children:[o.jsx("p",{className:"text-[120px] md:text-[200px] font-bold leading-none bg-gradient-to-br from-primary via-primary to-foreground bg-clip-text text-transparent",children:"404"}),o.jsx("h1",{className:"mt-4 text-3xl md:text-5xl font-bold text-foreground",children:e("notFound.title")||"Page Not Found"}),o.jsx("p",{className:"mt-4 max-w-md text-base md:text-lg text-muted-foreground",children:e("notFound.message")||"The page you're looking for doesn't exist or has been moved."}),o.jsx("p",{className:"mt-2 text-xs text-muted-foreground/70 font-mono break-all",children:t.pathname}),o.jsxs("div",{className:"mt-8 flex flex-col sm:flex-row gap-3",children:[o.jsx(ue,{asChild:!0,size:"lg",children:o.jsxs(Z,{to:"/",children:[o.jsx(fD,{className:"mr-2 h-4 w-4"}),e("notFound.returnHome")||"Back to Home"]})}),o.jsx(ue,{asChild:!0,variant:"outline",size:"lg",children:o.jsxs(Z,{to:"/search",children:[o.jsx(qo,{className:"mr-2 h-4 w-4"}),"Search Products"]})}),o.jsxs(ue,{variant:"ghost",size:"lg",onClick:()=>window.history.back(),children:[o.jsx(rm,{className:"mr-2 h-4 w-4"}),"Go Back"]})]})]})]})};function YQ(){Rt();const[e,t]=p.useState(null),[r,n]=p.useState(!1),[s,i]=p.useState(!1);p.useEffect(()=>{const l=/iPad|iPhone|iPod/.test(navigator.userAgent);i(l),window.matchMedia("(display-mode: standalone)").matches&&n(!0);const u=d=>{d.preventDefault(),t(d)};return window.addEventListener("beforeinstallprompt",u),()=>window.removeEventListener("beforeinstallprompt",u)},[]);const a=async()=>
654{if(!e)return;await e.prompt();const{outcome:l}=await e.userChoice;l==="accepted"&&n(!0),t(null)};return o.jsx(Je,{children:o.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-4 py-16",children:o.jsxs("div",{className:"max-w-md w-full text-center space-y-8",children:[o.jsx("div",{className:"w-20 h-20 bg-primary/10 rounded-2xl flex items-center justify-center mx-auto",children:o.jsx(TD,{className:"w-10 h-10 text-primary"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-display font-bold mb-3",children:"Install OVERCLOCK App"}),o.jsx("p",{className:"text-muted-foreground text-sm",children:"Add OVERCLOCK to your home screen for the best experience â fast access, offline support, and a native app feel."})]}),r?o.jsxs("div",{className:"flex items-center justify-center gap-2 text-primary",children:[o.jsx(Vs,{className:"w-5 h-5"}),o.jsx("span",{className:"font-medium",children:"App already installed!"})]}):s?o.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 text-left space-y-4",children:[o.jsx("h3",{className:"font-semibold text-sm",children:"How to install on iPhone/iPad:"}),o.jsxs("ol",{className:"space-y-3 text-sm text-muted-foreground",children:[o.jsxs("li",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"w-6 h-6 bg-primary/10 text-primary rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0",children:"1"}),o.jsxs("span",{children:["Tap the ",o.jsx(ED,{className:"inline w-4 h-4 text-primary"})," Share button in Safari"]})]}),o.jsxs("li",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"w-6 h-6 bg-primary/10 text-primary rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0",children:"2"}),o.jsxs("span",{children:["Scroll down and tap ",o.jsx("strong",{children:'"Add to Home Screen"'})]})]}),o.jsxs("li",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"w-6 h-6 bg-primary/10 text-primary rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0",children:"3"}),o.jsxs("span",{children:["Tap ",o.jsx("strong",{children:'"Add"'})," to confirm"]})]})]})]}):e?o.jsxs(ue,{onClick:a,size:"lg",className:"gap-2",children:[o.jsx(aD,{className:"w-5 h-5"}),"Install App"]}):o.jsx("p",{className:"text-sm text-muted-foreground",children:"Use your browser menu to add this site to your home screen."}),o.jsx("div",{className:"grid grid-cols-3 gap-4 pt-4",children:[{icon:"â¡",label:"Fast & Smooth"},{icon:"ð´",label:"Works Offline"},{icon:"ð",label:"Home Screen"}].map(l=>o.jsxs("div",{className:"text-center",children:[o.jsx("span",{className:"text-2xl",children:l.icon}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:l.label})]},l.label))})]})})})}const JQ="/assets/services-hero-Dl2Xc00B.jpg",eZ=[{slug:"custom-builds",title:"Custom Builds",description:"Configurazioni su misura assemblate a mano dai nostri ingegneri nel laboratorio di Torino.",icon:Hi},{slug:"repairs",title:"Riparazioni",description:"Diagnostica avanzata e riparazione di PC, notebook e workstation di qualunque marca.",icon:td},{slug:"upgrades",title:"Upgrade",description:"Aggiorna GPU, CPU, RAM e storage del tuo sistema con componenti certificati e installazione professionale.",icon:ZN},{slug:"consulting",title:"Consulenza Tecnica",description:"Analisi delle esigenze e progettazione della soluzione hardware più adatta al tuo workflow.",icon:tC},{slug:"warranty",title:"Garanzia Estesa",description:"Estendi la copertura del tuo sistema fino a 5 anni con assistenza prioritaria e parti incluse.",icon:Ul},{slug:"support",title:"Supporto Tecnico",description:"Helpdesk dedicato, assistenza remota e on-site per privati e aziende.",icon:eC},{slug:"financing",title:"Finanziamento",description:"Acquista oggi e paga a rate con soluzioni di finanziamento flessibili a tasso agevolato.",icon:YN},{slug:"business",title:"Soluzioni Business",description:"Forniture per studi, aziende e PA: gestione flotta, leasing operativo e SLA dedicati.",icon:Wo}];function tZ(){return o.jsxs(Je,{children:[o.jsx($t,{title:"OVERCLOCK Services â Builds, Repairs & Business",description:"Custom builds, repairs, upgrades, extended warranty, financing and dedicated business solutions from the OVERCLOCK team in Torino.",url:"https://overclock-prime-store.lovable.app/services",breadcrumbs:[{name:"Services",url:"/services"}]}),o.jsxs("section",{className:"relative overflow-hidden bg-background",children:[o.jsxs("div",{className:"absolute inset-0",children:[o.jsx("img",{src:JQ,alt:"OVERCLOCK laboratorio servizi",width:1920,height:1080,className:"h-full w-full object-cover object-right"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-background via-background/85 to-transparent md:from-background md:via-background/70 md:to-transparent"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/80 via-trans
654parent to-transparent"})]}),o.jsx("div",{className:"container relative mx-auto px-4 py-24 md:py-32 lg:py-40",children:o.jsxs(X.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5},className:"max-w-2xl",children:[o.jsx("p",{className:"text-primary text-xs uppercase tracking-[0.25em] mb-4",children:"Servizi"}),o.jsxs("h1",{className:"font-ibrand text-4xl md:text-6xl lg:text-7xl mb-6 leading-[1.05]",children:["Più di un negozio.",o.jsx("br",{}),"Un partner tecnico."]}),o.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-xl",children:"Dal primo preventivo all'assistenza post-vendita, ti accompagniamo in ogni fase del ciclo di vita del tuo hardware."})]})})]}),o.jsx("section",{className:"container mx-auto px-4 py-16 md:py-20",children:o.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-5",children:eZ.map((e,t)=>{const r=e.icon;return o.jsx(X.div,{initial:{opacity:0,y:14},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.35,delay:t*.04},children:o.jsxs(Z,{to:`/services/${e.slug}`,className:"group block h-full rounded-2xl border border-border/60 bg-card/40 p-6 hover:border-primary/50 hover:bg-card/70 transition-all",children:[o.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 text-primary flex items-center justify-center mb-4 group-hover:scale-105 transition-transform",children:o.jsx(r,{size:22})}),o.jsx("h2",{className:"font-ibrand text-2xl mb-2",children:e.title}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mb-4",children:e.description}),o.jsxs("span",{className:"inline-flex items-center gap-1 text-primary text-sm font-medium",children:["Scopri ",o.jsx(rf,{size:14})]})]})},e.slug)})})}),o.jsx("section",{className:"border-t border-border/50 bg-card/30",children:o.jsxs("div",{className:"container mx-auto px-4 py-14 md:py-16 text-center",children:[o.jsx("h2",{className:"font-ibrand text-3xl md:text-4xl mb-4",children:"Cerchi un piano di assistenza continuativo?"}),o.jsx("p",{className:"text-muted-foreground mb-6 max-w-2xl mx-auto",children:"Service+ offre supporto prioritario, gestione flotta e SLA dedicati per professionisti e aziende."}),o.jsx(ue,{asChild:!0,size:"lg",className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:o.jsxs(Z,{to:"/service-plus",children:["Scopri Service+ ",o.jsx(rf,{className:"ml-1"})]})})]})})]})}function so({slug:e,eyebrow:t,title:r,subtitle:n,description:s,heroAccent:i="from-primary/20 via-background to-background",features:a,bullets:l,steps:c,ctaPrimary:u,ctaSecondary:d,whatsappNumber:h="+39 347 975 6823"}){return o.jsxs(Je,{children:[o.jsx($t,{title:r.length>55?r.slice(0,55):r,description:n.slice(0,160),url:`https://overclock-prime-store.lovable.app/services/${e}`,breadcrumbs:[{name:"Services",url:"/services"},{name:t,url:`/services/${e}`}],jsonLd:{"@context":"https://schema.org","@type":"Service",name:r,description:n,provider:{"@type":"Organization",name:"OVERCLOCK"},areaServed:"IT",url:`https://overclock-prime-store.lovable.app/services/${e}`}}),o.jsx("section",{className:`relative overflow-hidden bg-gradient-to-b ${i}`,children:o.jsx("div",{className:"container mx-auto px-4 py-20 md:py-28",children:o.jsxs(X.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5},className:"max-w-3xl",children:[o.jsx("p",{className:"text-primary text-xs uppercase tracking-[0.25em] mb-4",children:t}),o.jsx("h1",{className:"font-ibrand text-4xl md:text-6xl lg:text-7xl text-foreground leading-[1.05] mb-6",children:r}),o.jsx("p",{className:"text-lg md:text-xl text-muted-foreground mb-8 max-w-2xl",children:n}),o.jsxs("div",{className:"flex flex-wrap gap-3",children:[u&&o.jsx(ue,{asChild:!0,size:"lg",className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:o.jsxs(Z,{to:u.href,children:[u.label," ",o.jsx(rf,{className:"ml-1"})]})}),d&&o.jsx(ue,{asChild:!0,size:"lg",variant:"outline",children:o.jsx(Z,{to:d.href,children:d.label})})]})]})})}),o.jsx("section",{className:"border-t border-border/50",children:o.jsx("div",{className:"container mx-auto px-4 py-16 md:py-20",children:o.jsxs("div",{className:"grid md:grid-cols-3 gap-10",children:[o.jsx("div",{children:o.jsx("h2",{className:"font-ibrand text-3xl md:text-4xl mb-4",children:t.toLowerCase()})}),o.jsxs("div",{className:"md:col-span-2",children:[o.jsx("p",{className:"text-base md:text-lg text-muted-foreground leading-relaxed whitespace-pre-line",children:s}),l&&l.length>0&&o.jsx("ul",{className:"mt-8 grid sm:grid-cols-2 gap-3",children:l.map(f=>o.jsxs("li",{className:"flex items-start gap-3 text-sm text-foreground",children:[o.jsx(Vs,{className:"text-primary shrink-0 mt-0.5",size:18}),o.jsx("span",{children:f})]},f))})]})]})})}),o.jsx("section",{className:"bg-card/30 border-y border-border/50",children:o.jsxs("div",{className:"container mx-auto px-4 py-16 md:py-20",children:[o.jsx("h2",{className:"font-ibrand text-3xl md:text-4xl mb-10 text-center",children:"Cosa è incluso"}),o.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-5",children:a.map((f,m)=>o.jsxs(X.div,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.35,delay:m*.05},className:"rounded-2xl border border-border/60 bg-background/60 p-6 hover:border-primary/40 transition-colors",children:[o.jsx("div",{className:"w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center mb-4",children:f.icon}),o.jsx("h3",{className:"font-semibold text-lg mb-2",children:f.title}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:f.description})]},f.title))})]})}),c&&c.length>0&&o.jsx("section",{children:o.jsxs("div",{className:"container mx-auto px-4 py-16 md:py-20",children:[o.jsx("h2",{className:"font-ibrand text-3xl md:text-4xl mb-10 text-center",children:"Come funziona"}),o.jsx("div",{className:"grid md:grid-cols-4 gap-6",children:c.map(f=>o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"text-primary font-ibrand text-5xl mb-3",children:f.number}),o.jsx("h3",{className:"font-semibold text-lg mb-2",children:f.title}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:f.description})]},f.number))})]})}),o.jsx("section",{className:"border-t border-border/50 bg-gradient-to-b from-background to-card/40",children:o.jsx("div",{className:"container mx-auto px-4 py-16 md:py-20",children:o.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[o.jsx("h2",{className:"font-ibrand text-3xl md:text-5xl mb-4",children:"Parla con un nostro tecnico"}),o.jsx("p",{className:"text-muted-foreground mb-8",children:"Rispondiamo entro 24 ore lavorative. Preventivi gratuiti e personalizzati."}),o.jsxs("div",{className:"flex flex-wrap justify-center gap-3",children:[o.jsx(ue,{asChild:!0,size:"lg",className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:o.jsxs("a",{href:`https://wa.me/${h.replace(/[^0-9]/g,"")}`,target:"_blank",rel:"noreferrer",children:[o.jsx(nm,{className:"mr-1"})," WhatsApp ",h]})}),o.jsx(ue,{asChild:!0,size:"lg",variant:"outline",children:o.jsxs("a",{href:"mailto:[email protected]",children:[o.jsx(Qv,{className:"mr-1"})," Scrivici"]})})]})]})})})]})}function rZ(){return o.jsx(so,{slug:"custom-builds",eyebrow:"Custom Builds",title:"PC su misura, costruiti a mano a Torino.",subt
654itle:"Ogni configurazione viene progettata, assemblata e testata dai nostri ingegneri. Niente compromessi su componenti, dissipazione e silenziosità .",description:`Partiamo dal tuo workflow â gaming, streaming, 3D, sviluppo, AI â e progettiamo la build perfetta in termini di prestazioni, rumorosità e budget. 655 656Utilizziamo solo componenti di tier 1, cable management premium e stress test di 24 ore prima della spedizione. Ogni macchina lascia il laboratorio con un report di benchmark dedicato.`,bullets:["Componenti di tier 1 (NVIDIA, AMD, Intel, ASUS, Corsair, MSI)","Cable management premium e build sleeved","Stress test 24h: CPU, GPU, RAM e SSD","Report benchmark personalizzato","Garanzia 24 mesi sui componenti","Spedizione protetta in tutta Europa"],features:[{icon:o.jsx(Hi,{size:20}),title:"Componenti premium",description:"Solo brand certificati e ultime generazioni."},{icon:o.jsx(td,{size:20}),title:"Assemblaggio artigianale",description:"Ogni cavo, vite e dissipatore curato a mano."},{icon:o.jsx(JN,{size:20}),title:"Tuning prestazionale",description:"Profili XMP, undervolt e curve ventole ottimizzate."},{icon:o.jsx(AD,{size:20}
656),title:"Estetica su misura",description:"RGB sincronizzato, sleeved cables e finiture custom."},{icon:o.jsx(eD,{size:20}),title:"Configuratore online",description:"Costruisci la tua build dal nostro configuratore."},{icon:o.jsx(QN,{size:20}),title:"Garanzia 24 mesi",description:"Sostituzione rapida e supporto prioritario."}],steps:[{number:"01",title:"Briefing",description:"Ci racconti utilizzo, budget e estetica desiderata."},{number:"02",title:"Progetto",description:"Ti inviamo una proposta dettagliata con benchmark attesi."},{number:"03",title:"Build",description:"Assemblaggio in laboratorio entro 5-10 giorni lavorativi."},{number:"04",title:"Consegna",description:"Spedizione tracciata con imballo professionale."}],ctaPrimary:{label:"Vai al configuratore",href:"/configurator"},ctaSecondary:{label:"Vedi i nostri PC",href:"/products?category=desktop"}})}function nZ(){return o.jsx(so,{slug:"repairs",eyebrow:"Riparazioni",title:"Diagnostica avanzata e riparazione professionale.",subtitle:"Risolviamo problemi hardware e software su PC, notebook e workstation di qualunque marca, anche fuori garanzia.",description:`Il nostro laboratorio è attrezzato per interventi di micro-saldatura, sostituzione GPU/CPU, ripristino bios, recupero dati e ricostruzione di sistemi termici. 657 658Ti forniamo un preventivo gratuito entro 48 ore dall'arrivo del sistema. Se decidi di non procedere, ti restituiamo l'apparecchio senza costi.`,bullets:["Diagnostica gratuita entro 48 ore","Preventivo dettagliato senza impegno","Riparazioni anche fuori garanzia","Ricambi originali o equivalenti certificati","Garanzia 12 mesi sull'intervento","Servizio ritiro e consegna dis
658ponibile"],features:[{icon:o.jsx(qo,{size:20}),title:"Diagnosi accurata",description:"Test hardware e software completi prima di ogni intervento."},{icon:o.jsx(td,{size:20}),title:"Micro-saldatura",description:"Riparazioni a livello di chip e componente SMD."},{icon:o.jsx(Hi,{size:20}),title:"Ricambi certificati",description:"Solo componenti originali o equivalenti di pari qualità ."},{icon:o.jsx(El,{size:20}),title:"Tempi rapidi",description:"Interventi standard completati in 5-7 giorni."},{icon:o.jsx(Ul,{size:20}),title:"Garanzia 12 mesi",description:"Copertura sull'intervento e sui ricambi installati."},{icon:o.jsx(on,{size:20}),title:"Ritiro a domicilio",description:"Servizio corriere disponibile in tutta Italia."}],steps:[{number:"01",title:"Contatto",description:"Descrivici il problema via WhatsApp o email."},{number:"02",title:"Diagnosi",description:"Analisi gratuita e preventivo entro 48 ore."},{number:"03",title:"Riparazione",description:"Procediamo solo dopo la tua approvazione."},{number:"04",title:"Riconsegna",description:"Test finali, report e spedizione del sistema riparato."}],ctaPrimary:{label:"Richiedi diagnosi",href:"/contact"}})}function sZ(){return o.jsx(so,{slug:"upgrades",eyebrow:"Upgrade",title:"Più prestazioni, senza cambiare PC.",subtitle:"Aggiorniamo GPU, CPU, RAM, SSD e sistemi di raffreddamento del tuo computer attuale, con installazione professionale e test di stabilità .",description:`Spesso un upgrade mirato regala più anni di vita al tuo sistema rispetto a un PC nuovo. Analizziamo il tuo hardware, identifichiamo i colli di bottiglia e proponiamo l'upgrade con il miglior rapporto prezzo-prestazioni. 659 660Ogni upgrade include backup dei dati, reinstallazione driver, ottimizzazione BIOS e benchmark prima/dopo per misurare il guadagno reale.`,bullets:["Analisi colli di bottiglia gratuita","Backup dati incluso prima dell'intervento","Aggiornamento BIOS e driver","Benchmark prima e dopo l'upgrade","Compatibilità verificata in laboratorio","Ritiro dei componenti vecchi (riciclo certificato)"],features:[{icon:o.jsx(Hi,{size:20}),title:"Upgrade GPU/CPU",description:"Sostituzioni di processori e schede video di ultima generazione."},{icon:o.jsx(Zv,{size:20}),title:"RAM & DDR5",description:"Espansione e ottimizzazione delle memorie con profili XMP."},{icon:o.jsx(Gv,{size:20}),title:"SSD NVMe Gen4/5",description:"Cloning del sistema su nuovi SSD ad alte prestazioni."},{icon:o.jsx(uD,{size:20}),title:"Raffreddamento",description:"AIO, liquid custom e ricambio paste termiche premium."},{icon:o.jsx(Ul,{size:20}),title:"Garanzia upgrade",description:"12 mesi su componenti e installazione."},{icon:o.jsx(ZN,{size:20}),title:"Trade-in vecchio HW",description:"Valutiamo i tuoi componenti usati come sconto."}],steps:[{number:"01",title:"Check-up",description:"Analizziamo il tuo PC e identifichiamo gli upgrade utili."},{number:"02",title:"Preventivo",description:"Ti proponiamo opzioni con benchmark attesi e costi."},{number:"03",title:"Installazione",description:"Montaggio in laboratorio e test di stabilità 12h."},{number:"04",title:"Riconsegna",description:"PC ottimizzato con report di benchmark prima/dopo."}],ctaPrimary:{label:"Richiedi un upgrade",href:"/contact"}})}function iZ(){return o.jsx(so,{slug:"consulting",eyebrow:"Consulenza Tecnica",title:"Scegli la macchina giusta. Senza marketing.",subtitle:"Una consulenza one-to-one con un nostro ingegnere per definire la soluzione hardware più adatta al tuo workflow e al tuo budget.",description:`Dalla postazione di rendering 3D alla stazione di trading, dalla cabina di registrazione allo studio di design: ogni professione ha esigenze diverse. 661 662Analizziamo i software che usi, i carichi tipici e le tue priorità (silenziosità , espandibilità , mobilità ) per costruire una proposta su misura â oppure orientarti verso la migliore configurazione esistente.`,bullets:["Sessione di consulenza fino a 60 minuti","Analisi software e benchmark di riferimento","Proposta di 2-3 configurazioni","Confronto prezzi/prestazioni trasparente","Roadmap upgrade futuri","Disponibile in sede, in video call o on-site"],features:[{icon:o.jsx(wu,{size:20}),title:"Sessione 1-to-1",description:"Un ingegnere dedicato studia il tuo caso d'uso."},{icon:o.jsx(JN,{size:20}),title:"Benchmark software",description:"Usiamo dati reali sui software che utilizzi quotidianamente."},{icon:o.jsx(yu,{size:20}),title:"Report scritto",description:"Riceverai un documento PDF con la nostra raccomandazione."},{icon:o.jsx(Jv,{size:20}),title:"Focus su ROI",description:"Investimento calibrato sulla durata utile del sistema."},{icon:o.jsx(Wo,{size:20}),title:"Per professionisti",description:"Esperienza con creator, studi, sviluppatori e gamer pro."},{icon:o.jsx(tC,{size:20}),title:"Indipendenti",description:"Consigli oggettivi, anche se la soluzione non è una nostra build."}],ctaPrimary:{label:"Prenota consulenza",href:"/contact"}})}function oZ(){return o.jsx(so,{slug:"warranty",eyebrow:"Garanzia Estesa",title:"Estendi la garanzia. Dormi tranquillo.",subtitle:"Copertura fino a 5 anni con sostituzione parti, manodopera e supporto prioritario inclusi.",description:`La garanzia estesa OVERCLOCK ti protegge da guasti hardware oltre la copertura legale di 24 mesi. 663 664Include sostituzione delle parti, manodopera, spese di spedizione e accesso a un canale di supp
664orto prioritario con tempi di risposta garantiti.`,bullets:["Copertura fino a 60 mesi totali","Sostituzione parti e manodopera incluse","Spedizione gratuita di andata e ritorno","Supporto prioritario con SLA dedicato","PC sostitutivo in caso di guasti gravi (Premium)","Trasferibile in caso di vendita del sistema"],features:[{icon:o.jsx(Ul,{size:20}),title:"Copertura completa",description:"Componenti, manodopera e spedizione tutto incluso."},{icon:o.jsx(El,{size:20}),title:"SLA garantito",description:"Risposta entro 4 ore lavorative su piani Business."},{icon:o.jsx(on,{size:20}),title:"Pickup gratuito",description:"Ritiriamo il sistema direttamente a casa o in ufficio."},{icon:o.jsx(td,{size:20}),title:"Tecnici certificati",description:"Interventi eseguiti dal nostro laboratorio interno."},{icon:o.jsx(CD,{size:20}),title:"PC sostitutivo",description:"Macchina di cortesia per i guasti più importanti."},{icon:o.jsx(QN,{size:20}),title:"Trasferibile",description:"La copertura segue il PC anche in caso di rivendita."}],ctaPrimary:{label:"Vai a Service+",href:"/service-plus"},ctaSecondary:{label:"Contattaci",href:"/contact"}})}function aZ(){return o.jsx(so,{slug:"support",eyebrow:"Supporto Tecnico",title:"Un tecnico vero, quando ti serve.",subtitle:"Helpdesk, assistenza remota e on-site. Niente bot, niente attese: parli direttamente con chi ha costruito il tuo PC.",description:`Il supporto tecnico OVERCLOCK è composto da ingegneri italiani che conoscono ogni configurazione spedita dal nostro laboratorio. 665 666Ti assistiamo per installazioni, troubleshooting, ottimizzazioni e configurazioni avanzate. Disponibile via WhatsApp, email, telefono e â per i piani business â anche on-site.`,bullets:["Helpdesk via WhatsApp, email e telefono","Assistenza remota con TeamViewer/AnyDesk","Interventi on-site su richiesta (piani business)","Risoluzione problemi software e hardware","Supporto multi-utente per studi e team","Knowledge base e tutorial dedicati"],features:[{icon:o.jsx(eC,{size:20}),title:"Tecnici dedicati",description:"Lo stesso team che assembla i nostri sistemi."},{icon:o.jsx(kD,{size:20}),title:"Multi-canale",description:"WhatsApp, email, telefono o ticket."},{icon:o.jsx(ID,{size:20}),title:"Remoto in 1 click",description:"Sessione di assistenza remota in pochi minuti."},{icon:o.jsx(td,{size:20}),title:"On-site disponibile",description:"Interventi a casa o in azienda nel Nord Italia."},{icon:o.jsx(El,{size:20}),title:"SLA chiari",description:"Tempi di risposta garantiti per i piani Service+."},{icon:o.jsx(jx,{size:20}),title:"Italiano & Inglese",description:"Supporto bilingue per team internazionali."}],ctaPrimary:{label:"Apri un ticket",href:"/contact"},ctaSecondary:{label:"Scopri Service+",href:"/service-plus"}})}function lZ(){return o.jsx(so,{slug:"financing",eyebrow:"Finanziamento",title:"Acquista oggi, paga in comode rate.",subtitle:"Soluzioni di finanziamento e leasing per privati e partite IVA, con tassi agevolati e approvazione rapida.",description:`Grazie ai nostri partner finanziari puoi rateizzare l'acquisto del tuo PC fino a 36 mesi, con esito immediato online. 667 668Per le aziende offriamo formule di leasing operativo che permettono di dedurre l'intero canone e mantenere sempre hardware aggiornato.`,bullets:["Pagamento in 3, 12, 24 o 36 rate","Tasso agevolato e zero spese istruttoria","Esito immediato online","Klarna e PayPal in 3 rate senza interessi","Leasing operativo per aziende","Possibilità di rinnovo hardware ogni 24 mesi"],features:[{icon:o.jsx(YN,{size:20}),title:"Rate flessibili",description:"Da 3 a 36 mesi, scegli la formula più adatta."},{icon:o.jsx(ND,{size:20}),title:"Tassi agevolati",description:"TAEG competitivi e trasparenti."},{icon:o.jsx(nD,{size:20}),title:"Klarna & PayPal",description:"3 rate senza interessi al checkout."},{icon:o.jsx(Wo,{size:20}),title:"Leasing aziende",description:"Canoni deducibili e hardware sempre aggiornato."},{icon:o.jsx(rD,{size:20}),title:"Simulatore online",description:"Calcola la rata direttamente al checkout."},{icon:o.jsx(Ul,{size:20}),title:"Approvazione rapida",description:"Esito in pochi minuti, anche per importi alti."}],ctaPrimary:{label:"Sfoglia i PC",href:"/products?category=desktop"},ctaSecondary:{label:"Parla con noi",href:"/contact"}})}function cZ(){return o.jsx(so,{slug:"business",eyebrow:"Soluzioni Business",title:"Hardware su scala. Tagliato per la tua azienda.",subt
668itle:"Forniture per studi professionali, PMI, agenzie e Pubblica Amministrazione. Gestione flotta, leasing operativo e SLA dedicati.",description:`Da 5 a 500 postazioni: progettiamo e gestiamo l'intera flotta IT della tua azienda. 669 670Dallo standard di configurazione al deployment in sede, dalla manutenzione preventiva al ricambio in 24 ore: un unico interlocutore per tutto il ciclo di vita dell'hardware.`,bullets:["Listini riservati e quantity discount","Configurazione standard ripetibile","Imaging e deployment on-site","Gestione flotta con dashboard dedicata","SLA personalizzati con tempi di intervento garantiti","Fatturazione elettronica B2B e PA"],features:[{icon:o.jsx(Wo,{size:20}),title:"Account dedicato",description:"Un referente commerciale e tecnico unico."},{icon:o.jsx(gD,{size:20}),title:"Standard di build",description:"Configurazioni replicabili su tutta la flotta."},{icon:o.jsx(wu,{size:20}),title:"Onboarding utenti",description:"Setup postazioni, account e software pre-installato."},{icon:o.jsx(Ul,{size:20}),title:"SLA garantiti",description:"Intervento entro 4 ore per criticità alte."},{icon:o.jsx(on,{size:20}),title:"Logistica nazionale",description:"Consegne pianificate in tutta Italia ed Europa."},{icon:o.jsx(yu,{size:20}),title:"Fatturazione PA",description:"Pronta per gare, MEPA e fatturazione elettronica."}],steps:[{number:"01",title:"Audit",description:"Analizziamo le tue postazioni e i workflow attuali."},{number:"02",title:"Standard",description:"Definiamo configurazioni standard riutilizzabili."},{number:"03",title:"Rollout",description:"Pianifichiamo deployment e migrazione utenti."},{number:"04",title:"Manutenzione",description:"Gestione continua, ricambi e aggiornamenti."}],ctaPrimary:{label:"Richiedi preventivo B2B",href:"/contact"},ctaSecondary:{label:"Scopri Service+",href:"/service-plus"}})}const uZ=WR({name:en().trim().min(1,"Name is required").max(100,"Name must be less than 100 characters"),email:en().trim().email("Invalid email address").max(255,"Email too long"),subject:en().trim().max(200,"Subject too long").optional(),message:en().trim().min(10,"Message must be at least 10 characters").max(2e3,"Message must be less than 2000 characters")});function dZ(){const[e,t]=p.useState({name:"",email:"",subject:"",message:""}),[r,n]=p.useState({}),[s,i]=p.useState(!1),a=c=>u=>{t(d=>({...d,[c]:u.target.value})),r[c]&&n(d=>({...d,[c]:void 0}))},l=async c=>{c.preventDefault();const u=uZ.safeParse(e);if(!u.success){const d={};for(const h of u.error.issues){const f=h.path[0];d[f]||(d[f]=h.message)}n(d);return}i(!0);try{const{error:d}=await Y.functions.invoke("submit-contact",{body:u.data});if(d)throw d;Le({title:"Message sent",description:"Thanks for reaching out â we'll get back to you soon."}),t({name:"",email:"",subject:"",message:""})}catch(d){console.error(d),Le({title:"Something went wrong",description:"Please try again in a moment.",variant:"destructive"})}finally{i(!1)}};return o.jsxs(Je,{children:[o.jsx($t,{title:"Contact OVERCLOCK â Write to Us",description:"Get in touch with OVERCLOCK. Send us a message and our team will reply as soon as possible.",breadcrumbs:[{name:"Contact",url:"/contact"}],jsonLd:{"@context":"https://schema.org","@type":"LocalBusiness",name:"OVERCLOCK TECH SRL",image:"https://overclock-prime-store.lovable.app/og-image.jpg",url:"https://overclock-prime-store.lovable.app/contact",telephone:"+39 347 975 6823",email:"[email protected]",address:{"@type":"PostalAddress",streetAddress:"Via Andrea Sansovino 225",addressLocality:"Torino",postalCode:"10151",addressCountry:"IT"},openingHoursSpecification:[{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday"],opens:"09:00",closes:"18:00"}]}}),o.jsxs("section",{className:"container mx-auto px-4 py-12 md:py-20",children:[o.jsxs("div",{className:"max-w-3xl mb-10 md:mb-14",children:[o.jsx("h1",{className:"text-3xl md:text-5xl font-bold mb-4",children:"Contact us"}),o.jsx("p",{className:"text-muted-foreground text-base md:text-lg",children:"Questions about a build, an order or a partnership? Send us a message â we usually reply within one business day."})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8 lg:gap-12",children:[o.jsxs("aside",{className:"space-y-6 lg:col-span-1",children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"p-2 rounded-md bg-secondary",children:o.jsx(bu,{size:18})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold",children:"OVERCLOCK TECH SRL"}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Via Andrea Sansovino 225,",o.jsx("br",{}),"10151 Torino, Italy"]})]})]}),o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"p-2 rounded-md bg-secondary",children:o.jsx(nm,{size:18})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold",children:"347-975-6823"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"MonâFri, 9:00â18:00 CET"})]})]}),o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"p-2 rounded-md bg-secondary",children:o.jsx(Qv,{size:18})}),o.jsxs("div",{children:[o.jsx("a",{href:"mailto:[email protected]",className:"font-semibold hover:underline break-all",children:"[email protected]"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"General inquiries"})]})]})]}),o.jsxs("form",{onSubmit:l,noValidate:!0,className:"lg:col-span-2 bg-card border border-border rounded-lg p-6 md:p-8 space-y-5",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx($e,{htmlFor:"name",children:"Name *"}),o.jsx(Fe,{id:"name",value:e.name,onChange:a("name"),maxLength:100,"aria-invalid":!!r.name,"aria-describedby":r.name?"name-error":void 0,disabled:s}),r.name&&o.jsx("p",{id:"name-error",className:"text-xs text-destructive",children:r.name})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx($e,{htmlFor:"email",children:"Email *"}),o.jsx(Fe,{id:"email",type:"email",value:e.email,onChange:a("email"),maxLength:255,"aria-invalid":!!r.email,"aria-describedby":r.email?"email-error":void 0,disabled:s}),r.email&&o.jsx("p",{id:"email-error",className:"text-xs text-destructive",children:r.email})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx($e,{htmlFor:"subject",children:"Subject"}),o.jsx(Fe,{id:"subject",value:e.subject??"",onChange:a("subject"),maxLength:200,disabled:s}),r.subject&&o.jsx("p",{className:"text-xs text-destructive",children:r.subject})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx($e,{htmlFor:"message",children:"Message *"}),o.jsx(qa,{id:"message",rows:6,value:e.message,onChange:a("message"),maxLength:2e3,"aria-invalid":!!r.message,"aria-describedby":r.message?"message-error":void 0,disabled:s}),o.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[r.message?o.jsx("p",{id:"message-error",className:"text-destructive",children:r.message}):o.jsx("span",{children:"Tell us about your project or question."}),o.jsxs("span",{children:[e.message.length,"/2000"]})]})]}),o.jsx(ue,{type:"submit",disabled:s,className:"w-full md:w-auto",children:s?o.jsxs(o.Fragment,{children:[o.jsx(st,{className:"animate-spin mr-2",size:16})," Sendingâ¦"]}):"Send message"})]})]})]})]})}const hZ=new Yz,fZ=()=>o.jsx(n6,{client:hZ,children:o.jsxs(Dz,{children:[o.jsx(yL,{}),o.jsx(ZL,{}
670),o.jsx(LF,{children:o.jsxs(dF,{children:[o.jsx(Ge,{path:"/",element:o.jsx(nq,{})}),o.jsx(Ge,{path:"/auth",element:o.jsx(CK,{})}),o.jsx(Ge,{path:"/reset-password",element:o.jsx(EK,{})}),o.jsx(Ge,{path:"/account",element:o.jsx(PK,{})}),o.jsx(Ge,{path:"/admin",element:o.jsx(wG,{})}),o.jsx(Ge,{path:"/products",element:o.jsx(bq,{})}),o.jsx(Ge,{path:"/product/:slug",element:o.jsx(Qq,{})}),o.jsx(Ge,{path:"/collection/:slug",element:o.jsx(nK,{})}),o.jsx(Ge,{path:"/cart",element:o.jsx(jG,{})}),o.jsx(Ge,{path:"/wishlist",element:o.jsx(kG,{})}),o.jsx(Ge,{path:"/search",element:o.jsx(UG,{})}),o.jsx(Ge,{path:"/cyberbook-ultra",element:o.jsx(BG,{})}),o.jsx(Ge,{path:"/checkout",element:o.jsx(HQ,{})}),o.jsx(Ge,{path:"/checkout-success",element:o.jsx(HG,{})}),o.jsx(Ge,{path:"/cookie-policy",element:o.jsx(WQ,{})}),o.jsx(Ge,{path:"/service-plus",element:o.jsx(ZQ,{})}),o.jsx(Ge,{path:"/install",element:o.jsx(YQ,{})}),o.jsx(Ge,{path:"/services",element:o.jsx(tZ,{})}),o.jsx(Ge,{path:"/services/custom-builds",element:o.jsx(rZ,{})}),o.jsx(Ge,{path:"/services/repairs",element:o.jsx(nZ,{})}),o.jsx(Ge,{path:"/services/upgrades",element:o.jsx(sZ,{})}),o.jsx(Ge,{path:"/services/consulting",element:o.jsx(iZ,{})}),o.jsx(Ge,{path:"/services/warranty",element:o.jsx(oZ,{})}),o.jsx(Ge,{path:"/services/support",element:o.jsx(aZ,{})}),o.jsx(Ge,{path:"/services/financing",element:o.jsx(lZ,{})}),o.jsx(Ge,{path:"/services/business",element:o.jsx(cZ,{})}),o.jsx(Ge,{path:"/contact",element:o.jsx(dZ,{})}),o.jsx(Ge,{path:"*",element:o.jsx(XQ,{})})]})})]})}),{slice:mZ,forEach:pZ}=[];function gZ(e){return pZ.call(mZ.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}
670function xZ(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(e))}const Ek=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,yZ=function(e,t){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(t);let i=`${e}=${s}`;if(n.maxAge>0){const a=n.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`}if(n.domain){if(!Ek.test(n.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${n.domain}`}if(n.path){if(!Ek.test(n.path))throw new TypeError("option path is invalid");i+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(i+="; Partitioned"),i},Pk={create(e,t,r,n){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+r*60*1e3)),n&&(s.domain=n),document.cookie=yZ(e,t,s)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n<r.length;n++){let s=r[n];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var vZ={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Pk.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:r,cookieMinutes:n,cookieDomain:s,cookieOptions:i}=t;r&&typeof document<"u"&&Pk.create(r,e,n,s,i)}},bZ={name:"querystring",lookup(e){var n;let{lookupQuerystring:t}=e,r;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const a=s.substring(1).split("&");for(let l=0;l<a.length;l++){const c=a[l].indexOf("=");c>0&&a[l].substring(0,c)===t&&(r=a[l].substring(c+1))}}return r}},wZ={name:"hash",lookup(e){var s;let{lookupHash:t,lookupFromHashIndex:r}=e,n;if(typeof window<"u"){const{hash:i}=window.location;if(i&&i.length>2){const a=i.substring(1);if(t){const l=a.split("&");for(let c=0;c<l.length;c++){const u=l[c].indexOf("=");u>0&&l[c].substring(0,u)===t&&(n=l[c].substring(u+1))}}if(n)return n;if(!n&&r>-1){const l=i.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?(s=l[typeof r=="number"?r:0])==null?void 0:s.replace("/",""):void 0}}}return n}};let wa=null;const Tk=()=>{if(wa!==null)return wa;try{if(wa=typeof window<"u"&&window.localStorage!==null,!wa)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{wa=!1}return wa};var jZ={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Tk())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&Tk()&&window.localStorage.setItem(r,e)}};let ja=null;const Rk=()=>{if(ja!==null)return ja;try{if(ja=typeof window<"u"&&window.sessionStorage!==null,!ja)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ja=!1}return ja};var kZ={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Rk())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&Rk()&&window.sessionStorage.setItem(r,e)}},SZ={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:s}=navigator;if(r)for(let i=0;i<r.length;i++)t.push(r[i]);
vendor: 4,939 bytes, line 670
670n&&t.push(n),s&&t.push(s)}return t.length>0?t:void 0}},AZ={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},NZ={name:"path",lookup(e){var s;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(s=r[typeof t=="number"?t:0])==null?void 0:s.replace("/",""):void 0}},CZ={name:"subdomain",lookup(e){var s,i;let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&((i=(s=window.location)==null?void 0:s.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};let tO=!1;try{document.cookie,tO=!0}catch{}const rO=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];tO||rO.splice(1,1);const _Z=()=>({order:rO,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class nO{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=gZ(r,this.options||{},_Z()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(vZ),this.addDetector(bZ),this.addDetector(jZ),this.addDetector(kZ),this.addDetector(SZ),this.addDetector(AZ),this.addDetector(NZ),this.addDetector(CZ),this.addDetector(wZ)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return t.forEach(n=>{if(this.detectors[n]){let s=this.detectors[n].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(r=r.concat(s))}}),r=r.filter(n=>n!=null&&!xZ(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}nO.type="languageDetector";const EZ={learnMore:"Learn More",configure:"Configure",shop:"Shop",company:"Company",information:"Information",account:"Account",contact:"Contact",wishlist:"Wishlist",cart:"Cart",search:"Search",freeShipping:"Free shipping for all orders over $200.",deliveryToEurope:"Delivery to Europe",visitShowroom:"We invite you to visit our",showroomInTurin:"showroom in Turin",callUs:"Call us at +39 347 975 6823 or",writeToUs:"write to us",allRightsReserved:"© Copyright OVERCLOCK. All Rights Reserved.",loading:"Loading...",home:"Home",browseProducts:"Browse Products",logIn:"Log In",signOut:"Sign Out",signUp:"Sign Up",backToShop:"Back to Shop",backToHome:"Back to Home",default:"Default",setDefault:"Set Default",addNewAddress:"+ Add new address",useSavedAddress:"â Use saved address",remove:"Remove",copy:"Copy",copied:"Copied!",viewOrders:"View Orders",continueShopping:"Continue Shopping",returnToCart:"Return to Cart",filters:"Filters",clearAllFilters:"Clear All Filters",or:"OR"},PZ={pcGaming:"PC Gaming",notebook:"Notebook",workstations:"Workstations",accessories:"Accessories",services:"Services",company:"Company",modelsRange:"Models Range",selectByPurpose:"Select By Purpose",allModels:"All Models",configurators:"Configurators",allNotebooks:"All Notebooks",allWorkstations:"All Workstations",allAccessories:"All Accessories"},TZ={monitors:"Monitors",peripherals:"Peripherals",components:"Components",cables:"Cables & Adapters",gaming:"Gaming Gear",streaming:"Streaming Setup",office:"Office Essentials",upgrades:"PC Upgrades"},RZ={allServices:"All Services",customBuilds:"Custom Builds",repairs:"Repairs & Maintenance",upgrades:"Upgrades",consulting:"Tech Consulting",warranty:"Warranty & Protection",support:"Technical Support",financing:"Financing Options",businessSolutions:"Business Solutions"},OZ={aboutUs:"About Us",ourStory:"Our Story",team:"Our Team",careers:"Careers",contact:"Contact Us",press:"Press & Media",blog:"Blog",partners:"Partners",affiliates:"Affiliate Program"},IZ={forWork:"For Work and Study",forEsports:"For eSports",forStreaming:"For Streaming",for2kGaming:"PCs for 2K Gaming",for4kGaming:"PCs for 4K Gam
670ing",specialEditions:"Special Editions",portableGaming:"Portable Gaming",productivity:"Productivity",creativesDesign:"Creatives & Design",students:"Students",business:"Business","3dRendering":"3D Rendering",videoEditing:"Video Editing",cadEngineering:"CAD & Engineering",dataScienceAi:"Data Science & AI",softwareDev:"Software Development"},DZ={desktop:"Desktop",workstations:"Workstations",notebook:"Notebook",keyboards:"Keyboards",accessories:"Accessories",contacts:"Contacts",aboutUs:"About Us",investors:"Investors",careers:"Careers",news:"News",trackOrder:"Track Order",returns:"Returns",help:"Help",giftCards:"Gift Cards",privacyPolicy:"Privacy Policy",myAccount:"My Account",myOrders:"My Orders",affiliateProgram:"Affiliate Program"},LZ={cyberbookX6:"Cyberbook X6",basedOnIntel:"Based on Intel i9 14900HX and RTX 5070 Ti",pcGaming:"PC Gaming",powerUpArsenal:"Power up your battle arsenal with our PCs!",studioPro:"Studio PRO",powerUpWork:"Power up the way you work",cybercharge:"CYBERCHARGE",aiPlatform:"AI all-in-one platform",freeSubscription:"All our PCs come with 3 months free subscription.",cyberbookUltra:"Cyberbook Ultra",maxedProductivity:"Maxed productivity",discoverNotebooks:"Discover our laptops with AI integration.",aerocoreDesktop:"Aerocore Desktop",ultimateGaming:"Your ultimate gaming companion.",coregrid:"Coregrid",professionalServers:"Professional Servers",ultimateWork:"The ultimate work companion."},MZ={premiumComponents:"Premium Components",premiumDesc:"Our PCs are equipped with the latest components on the market to offer maximum performance to gamers and creators.",expertBuilders:"Expert PC Builders",expertDesc:"Each system is carefully crafted by our team of experts with attention to detail in every aspect.",aiIntegration:"AI Integration Included",aiDesc:"Our PCs are equipped with 1 Year Free Subscription to CyberCharge AI, our AI All-in-One Tools Platform."}
670,zZ={english:"English",italian:"Italiano",selectLanguage:"Select Language"},FZ={notFound:"Product Not Found",browseAll:"Browse all products",reviews:"Reviews",writeReview:"Write a review",noReviews:"No reviews yet. Be the first to write a review!",payIn3:"Pay in 3 installments without interest from",learnMorePayment:"Learn more",configureAndAdd:"Configure & Add to Cart",addToCart:"Add to Cart",adding:"Adding...",addToWishlist:"Add to wishlist",inThePack:"In the pack",desktop:"Desktop",notebook:"Notebook",powerCable:"Power Cable",cyberchargeAiFree:"Cybercharge AI Free",monthsFree:"3 MONTHS FREE",randomGifts:"3 Random Gifts",fpsCheck:"How many FPS does this PC get?",fpsCheckDesc:"Discover the estimated performance on the most popular games",discover:"Discover",specifications:"Specifications",relatedProducts:"Related Products",noImage:"No image available",wantToCustomize:"Want to Customize it?",customQuoteDesc:"Contact us and get a custom quote with your custom components.",getCustomQuote:"Get a Custom Quote",description:"Description",descriptionExtra:"Our attention to detail is reflected in every aspect of your PC, offering you not just a device, but a concentrate of performance, reliability and style.",pleaseLogIn:"Please log in to add items to cart",tradeInTitle:"Trade-In Your Used PC",tradeInDesc:"Got an old PC? Trade it in and get a discount on your new OVERCLOCK system. We'll handle the rest.",tradeInButton:"Get a Trade-In Quote"},$Z={yourCart:"Your Cart",pleaseLogIn:"Please log in to view your cart",emptyCart:"Your cart is empty",startAdding:"Start adding products to your cart",clearCart:"Clear Cart",orderSummary:"Order Summary",subtotal:"Subtotal",shipping:"Shipping",free:"Free",total:"Total",checkout:"Checkout",taxesCalculated:"Taxes calculated at checkout",viewFullCart:"View Full Cart"},VZ={backToCart:"Back to Cart",checkout:"Checkout",shippingAddress:"Shipping Address",fullName:"Full Name",address:"Address",apartment:"Apartment, suite, etc. (optional)",city:"City",province:"Province",postalCode:"Postal Code",country:"Country",phone:"Phone (optional)",continueToPayment:"Continue to Payment",processing:"Processing...",qty:"Qty",verifyingPayment:"Verifying your payment...",pleaseWait:"Please wait while we confirm your order",paymentSuccessful:"Payment Successful!",thankYou:"Thank you for your order. We've sent a confirmation email with your order details.",paymentIssue:"Payment Issue",paymentError:"There was an issue processing your payment. Please try again.",missingPaymentInfo:"Missing payment information",paymentVerificationFailed:"Payment verification failed",failedToVerify:"Failed to verify payment"},UZ={myAccount:"My Account",manageAccount:"Manage your orders, settings, and preferences",orders:"Orders",addresses:"Addresses",wishlist:"Wishlist",settings:"Settings",orderHistory:"Order History",noOrders:"No orders yet",startShopping:"Start shopping to see your orders here",order:"Order",shippingTo:"Shipping to:",shippingAddresses:"Shipping Addresses",addAddress:"Add Address",noAddresses:"No addresses saved",addDuringCheckout:"Add an address during checkout",myWishlist:"My Wishlist",wishlistEmpty:"Wishlist is empty",saveForLater:"Save products you love for later",emptyWishlist:"Your wishlist is empty",browseAndSave:"Browse products and save your favorites",accountSettings:"Account Settings",profileInfo:"Profile Information",email:"Email",emailCantChange:"Email cannot be changed",memberSince:"Member since",dangerZone:"Danger Zone",signOutDesc:"Sign out of your account",deleteAccount:"Delete Account",deleteWarning:"This action cannot be undone. This will permanently delete your account.",failedDeleteAddress:"Failed to delete address",addressDeleted:"Address deleted",failedSetDefault:"Failed to set default",defaultUpdated:"Default address updated"},BZ={allProducts:"All Products",notebooks:"Notebooks",desktops:"Desktop PCs",categories:"Categories",sortBy:"Sort by",priceLowToHigh:"Price: Low to High",priceHighToLow:"Price: High to Low",newest:"Newest",noProducts:"No products found in this category.",configureNow:"Configure now",fromPerMonth:"From",perMonth:"/month",financing:"financing",delivery:"Delivery",fastShipping:"Fast Shipping",freeDelivery:"Free delivery in 3-5 business days",shippingTitle:"Shipping & Delivery",shippingDesc1:"Free shipping on all orders over â¬200. Standard delivery in 3-5 business days across Europe.",shippingDesc2:"All orders are carefully packaged with protective materials to ensure your product arrives in perfect condition.",shippingCarriers:"Our trusted carriers:",shippingTracking:"Once shipped, you'll receive an email with your tracking number to follow your delivery in real time.",twoYearWarranty:"2 Year Warranty",extendedProtection:"Extended protection on all products",securePayment:"Secure Payment",ssl
670Encrypted:"SSL encrypted checkout",warrantyTitle:"2 Year Warranty",warrantyDesc1:"All OVERCLOCK products come with a 2-year manufacturer warranty covering defects in materials and workmanship.",warrantyDesc2:"Our warranty includes free repair or replacement of defective components, remote technical support, and coverage for all hardware parts.",warrantyDesc3:"Extended warranty options up to 5 years are available at checkout.",paymentTitle:"Secure Payment Methods",paymentDesc:"We accept a wide range of secure payment methods:",paymentVisa:"Visa / Mastercard / American Express",paymentPaypal:"PayPal â Pay instantly or in 3 interest-free installments",paymentKlarna:"Klarna â Buy now, pay in 3 installments",paymentBankTransfer:"Bank Transfer (SEPA)",paymentEncrypted:"All transactions are protected with 256-bit SSL encryption."},HZ={welcomeBack:"Welcome Back",createAccount:"Create Account",dontHaveAccount:"Don't have an account yet?",alreadyHaveAccount:"Already have an account?",fullName:"Full Name",emailAddress:"Email address",password:"Password",login:"Login",signUp:"Sign Up",passwordTooWeak:"Password too weak",passwordRequirements:"Password must contain at least one letter, one number, and one symbol.",nameRequired:"Name required",enterFullName:"Please enter your full name.",invalidCredentials:"Invalid email or password",accountCreated:"Account created successfully!",emailAlreadyRegistered:"This email is already registered",veryWeak:"Very Weak",weak:"Weak",fair:"Fair",good:"Good",strong:"Strong",characters:"8+ characters",letter:"Letter (a-z, A-Z)",number:"Number (0-9)",symbol:"Symbol (!@#$...)",newsletterConsent:"I agree to receive newsletters, promotional emails, and exclusive offers from OVERCLOCK. You can unsubscribe at any time.",forgotPassword:"Forgot password?",forgotPasswordDesc:"Enter your email and we'll send you a link to reset your password.",sendResetLink:"Send Reset Link",resetEmailSent:"Reset link sent!",resetEmailSentDesc:"Check your email for a link to reset your password.",backToLogin:"Back to login",resetPassword:"Reset Password",setNewPassword:"Set New Password",setNewPasswordDesc:"Enter your new password below.",newPassword:"New password",confirmPassword:"Confirm password",passwordsMismatch:"Passwords do not match",updatePassword:"Update Password",passwordUpdated:"Password updated successfully!",continueWithGoogle:"Continue with Google"},WZ={yourWishlist:"Your Wishlist",pleaseLogIn:"Please log in to view your wishlist",emptyWishlist:"Your wishlist is empty",saveProducts:"Save products you love to your wishlist"},qZ={searchProducts:"Search Products",searchPlaceholder:"Search by name, category, or specs...",category:"Category",allCategories:"All Categories",sortBy:"Sort By",relevance:"Relevance",name:"Name",priceRange:"Price Range",productsFound:"product",productsFoundPlural:"products",found:"found",for:"for",noProductsFound:"No products found",adjustSearch:"Try adjusting your search or filters"},KZ={title:"404",message:"Oops! Page not found",returnHome:"Return to Home"},GZ={title:"Cookie Settings",message:"We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic.",privacyPolicy:"Privacy Policy",accept:"Accept",decline:"Decline",acceptAll:"Accept All",necessaryOnly:"Necessary Only",customize:"Customize",savePreferences:"Save Preferences",hideSettings:"Hide",categories:{necessary:{title:"Necessary",description:"Essential for the website to function. Cannot be disabled."},analytics:{title:"Analytics",description:"Help us understand how visitors interact with our website."},marketing:{title:"Marketing",description:"Used to deliver personalized advertisements."},preferences:{title:"Preferences",description:"Remember your settings and preferences for a better experience."}}},QZ={pageTitle:"Cookie Policy",pageDescription:"Learn about how we use cookies and similar technologies on our website.",title:"Cookie Policy",lastUpdated:"Last Updated",whatAreCookies:{title:"What Are Cookies?",description:"Cookies are small text files that are stored on your device when you visit a website. They help websites remember your preferences, understand how you use the site, and improve your overall experience. Cookies can be 'session' cookies, which are deleted when you close your browser, or 'persistent' cookies, which remain on your device for a set period of time."},howWeUse:{title:"How We Use Cookies",description:"We use cookies for various purposes, including ensuring the website functions correctly, analyzing site traffic, personalizing content, and delivering targeted advertisements. Some cookies are essential for the website to work, while others help us improve your experience."},typesOfCookies:{title:"Types of Cookies We Use"},categories:{necessary:{fullDescription:"These cookies are essential for the website to function properly. They enable core functionality such as security, network management, and accessibility. You cannot disable these cookies in our systems."},analytics:{fullDescription:"Analytics cookies help us understand how visitors interact with our website by collecting and reporting information anonymously. This data helps us improve our website and your experience."},marketing:{fullDescription:"Marketing cookies are used to track visitors across websites. They are set by third-party advertising partners to build a profile of your interests and show you relevant advertisements on other sites."},preferences:{fullDescription:"Preference cookies enable the website to remember information that changes how the website behaves or looks, such as your preferred language or the region you are in."}},table:{cookieName:"Cookie Name",duration:"Duration",purpose:"Purpose"},duration:{session:"Session","1minute":"1 minute","24hours":"24 hours","7days":"7 days","30days":"30 days","3months":"3 months","6months":"6 months","1year":"1 year","2years":"2 years"},cookies:{necessary:{cookieConsent:"Stores your cookie consent preferences",sessionId:"Maintains your session state across page requests",authToken:"Keeps you logged in securely",csrfToken:"Protects against cross-site request forgery attacks"},analytics:{ga:"Used by Google Analytics to distinguish users",gaId:"Used to persist session state",gid:"Used to distinguish users for 24 hours",gat:"Used to throttle request rate"},marketing:{fbp:"Used by Facebook to deliver advertisements",gclAu:"Used by Google AdSense for advertising efficiency",ide:"Used by Google DoubleClick to register and report actions",nid:"Used by Google to personalize ads"},preferences:{i18next:"Stores your preferred language setting",theme:"Remembers your dark/light mode preference",cartItems:"Preserves your shopping cart between sessions",re
670centlyViewed:"Tracks products you've recently viewed"}},manageCookies:{title:"Managing Cookies",description:"You can control and manage cookies in various ways. Please note that removing or blocking cookies may impact your user experience and some features may no longer be available. Here's how to manage cookies in popular browsers:"},yourChoices:{title:"Your Choices",description:"You can change your cookie preferences at any time by clicking the button below. This will reset your cookie consent and show the cookie settings banner again.",updatePreferences:"Update Cookie Preferences"},contact:{title:"Contact Us",description:"If you have any questions about our use of cookies or this Cookie Policy, please contact us at [email protected] or through our contact page."}},ZZ={limitedTimeOffer:"Limited Time Offer",save:"Save â¬20",welcomeGift:"Welcome Gift!",signUpToday:"Sign up today and get",offFirstOrder:"OFF your first order",yourCouponCode:"Your Coupon Code",signUpNow:"Sign Up Now",noThanks:"No thanks, I'll pay full price"},XZ={common:EZ,nav:PZ,accessories:TZ,services:RZ,company:OZ,useCases:IZ,footer:DZ,home:LZ,features:MZ,language:zZ,product:FZ,cart:$Z,checkout:VZ,account:UZ,products:BZ,auth:HZ,wishlist:WZ,search:qZ,notFound:KZ,cookies:GZ,cookiePolicy:QZ,promo:ZZ},YZ={learnMore:"Scopri di più",configure:"Configura",shop:"Shop",company:"Azienda",information:"Informazioni",account:"Account",contact:"Contatti",wishlist:"Lista dei desideri",cart:"Carrello",search:"Cerca",freeShipping:"Spedizione gratuita per tutti gli ordini superiori a â¬200.",deliveryToEurope:"Consegna in Europa",visitShowroom:"Ti invitiamo a visitare il nostro",showroomInTurin:"showroom a Torino",callUs:"Chiamaci al +39 347 975 6823 oppure",writeToUs:"scrivici",allRightsReserved:"© Copyright OVERCLOCK. Tutti i diritti riservati.",loading:"Caricamento...",home:"Home",browseProducts:"Sfoglia Prodotti",logIn:"Accedi",signOut:"Esci",signUp:"Registrati",backToShop:"Torna allo Shop",backToHome:"Torna alla Home",default:"Predefinito",setDefault:"Imposta Predefinito",addNewAddress:"+ Aggiungi nuovo indirizzo",useSavedAddress:"â Usa indirizzo salvato",remove:"Rimuovi",copy:"Copia",copied:"Copiato!",viewOrders:"Vedi Ordini",continueShopping:"Continua lo Shopping",returnToCart:"Torna al Carrello",filters:"Filtri",clearAllFilters:"Rimuovi Filtri",or:"OPPURE"},JZ={pcGaming:"PC Gaming",notebook:"Notebook",workstations:"Workstation",accessories:"Accessori",services:"Servizi",company:"Azienda",modelsRange:"Gamma Modelli",selectByPurpose:"Seleziona per Scopo",allModels:"Tutti i Modelli",configurators:"Configuratori",allNotebooks:"Tutti i Notebook",allWorkstations:"Tutte le Workstation",allAccessories:"Tutti gli Accessori"},eX={monitors:"Monitor",peripherals:"Periferiche",components:"Componenti",cables:"Cavi e Adattatori",gaming:"Accessori Gaming",streaming:"Setup Streaming",office:"Essenziali Ufficio",upgrades:"Upgrade PC"},tX={allServices:"Tutti i Servizi",customBuilds:"Build Personalizzate",repairs:"Riparazioni e Manutenzione",upgrades:"Upgrade",consulting:"Consulenza Tech",warranty:"Garanzia e Protezione",support:"Supporto Tecnico",financing:"Opzioni Finanziamento",businessSolutions:"Soluzioni Business"},rX={aboutUs:"Chi Siamo",ourStory:"La Nostra Storia",team:"Il Nostro Team",careers:"Lavora con Noi",contact:"Contattaci",press:"Stampa e Media",blog:"Blog",partners:"Partner",affiliates:"Programma Affiliati"},nX={forWork:"Per Lavoro e Studio",forEsports:"Per eSports",forStreaming:"Per Streaming",for2kGaming:"PC per Gaming 2K",for4kGaming:"PC per Gaming 4K",specialEditions:"Edizioni Speciali",portableGaming:"Gaming Portatile",productivity:"Produttività ",creativesDesign:"Creativi & Design",students:"Studenti",business:"Business","3dRendering":"Rendering 3D",videoEditing:"Video Editing",cadEngineering:"CAD & Ingegneria",dataScienceAi:"Data Science & AI",softwareDev:"Sviluppo Software"},sX={desktop:"Desktop",workstations:"Workstation",notebook:"Notebook",keyboards:"Tastiere",accessories:"Accessori",contacts:"Contatti",aboutUs:"Chi Siamo",investors:"Investitori",careers:"Carriere",news:"Notizie",trackOrder:"Traccia Ordine",returns:"Resi",help:"Aiuto",giftCards:"Gift Card",privacyPolicy:"Privacy Policy",myAccount:"Il Mio Account",myOrders:"I Miei Ordini",affiliateProgram:"Programma Affiliati"},iX={cyberbookX6:"Cyberbook X6",basedOnIntel:"Basato su Intel i9 14900HX e RTX 5070 Ti",pcGaming:"PC Gaming",powerUpArsenal:"Potenzia il tuo arsenale da battaglia con i nostri PC!",studioPro:"Studio PRO",powerUpWork:"Potenzia il modo in cui lavori",cybercharge:"CYBERCHARGE",aiPlatform:"Piattaforma AI all-in-one",freeSubscription:"Tutti i nostri PC vengono forniti con 3 mesi di abbonamento gratuito.",cyberbookUltra:"Cyberbook Ultra",maxedProductivity:"Produttività maxata",discoverNotebooks:"Scopri i nostri portatili con integrazione IA.",aerocoreDesktop:"Aerocore Desktop",ultimateGaming:"Il vostro compagno di gioco definitivo.",coregrid:"Coregrid",professionalServers:"Server Professionali",ultimateWork:"Il compagno di lavoro definitivo."},oX={premiumComponents:"Componenti Premium",premiumDesc:"I nostri PC sono equipaggiati con i componenti più recenti sul mercato per offrire le massime prestazioni a gamer e creator.",expertBuilders:"Costruttori Esperti",expertDesc:"Ogni sistema è accuratamente realizzato dal nostro team di esperti con attenzione ai dettagli in ogni aspetto.",aiIntegration:"Integrazione AI Inclusa",aiDesc:"I nostri PC includono 1 Anno di Abbonamento Gratuito a CyberCharge AI, la nostra piattaforma AI All-in-One."}
670,aX={english:"English",italian:"Italiano",selectLanguage:"Seleziona Lingua"},lX={notFound:"Prodotto Non Trovato",browseAll:"Sfoglia tutti i prodotti",reviews:"Recensioni",writeReview:"Scrivi una recensione",noReviews:"Nessuna recensione ancora. Sii il primo a scrivere una recensione!",payIn3:"Paga in 3 rate senza interessi da",learnMorePayment:"Scopri di più",configureAndAdd:"Configura e Aggiungi al Carrello",addToCart:"Aggiungi al Carrello",adding:"Aggiunta...",addToWishlist:"Aggiungi alla wishlist",inThePack:"Nella confezione",desktop:"Desktop",notebook:"Notebook",powerCable:"Cavo di Alimentazione",cyberchargeAiFree:"Cybercharge AI Gratis",monthsFree:"3 MESI GRATIS",randomGifts:"3 Regali Random",fpsCheck:"Quanti FPS fa questo PC?",fpsCheckDesc:"Scopri le prestazioni stimate sui giochi più popolari",discover:"Scopri",specifications:"Specifiche",relatedProducts:"Prodotti Correlati",noImage:"Nessuna immagine disponibile",wantToCustomize:"Vuoi Personalizzarlo?",customQuoteDesc:"Contattaci e ottieni un preventivo personalizzato con i tuoi componenti.",getCustomQuote:"Richiedi Preventivo",description:"Descrizione",descriptionExtra:"La nostra attenzione ai dettagli si riflette in ogni aspetto del tuo PC, offrendoti non solo un dispositivo, ma un concentrato di prestazioni, affidabilità e stile.",pleaseLogIn:"Effettua l'accesso per aggiungere articoli al carrello",tradeInTitle:"Permuta il Tuo PC Usato",tradeInDesc:"Hai un vecchio PC? Permutalo e ottieni uno sconto sul tuo nuovo sistema OVERCLOCK. Pensiamo a tutto noi.",tradeInButton:"Richiedi Valutazione"},cX={yourCart:"Il Tuo Carrello",pleaseLogIn:"Accedi per visualizzare il tuo carrello",emptyCart:"Il tuo carrello è vuoto",startAdding:"Inizia ad aggiungere prodotti al carrello",clearCart:"Svuota Carrello",orderSummary:"Riepilogo Ordine",subtotal:"Subtotale",shipping:"Spedizione",free:"Gratis",total:"Totale",checkout:"Checkout",taxesCalculated:"Tasse calcolate al checkout",viewFullCart:"Vedi Carrello Completo"},uX={backToCart:"Torna al Carrello",checkout:"Checkout",shippingAddress:"Indirizzo di Spedizione",fullName:"Nome Completo",address:"Indirizzo",apartment:"Interno, scala, ecc. (opzionale)",city:"Città ",province:"Provincia",postalCode:"CAP",country:"Paese",phone:"Telefono (opzionale)",continueToPayment:"Continua al Pagamento",processing:"Elaborazione...",qty:"Qtà ",verifyingPayment:"Verifica del pagamento in corso...",pleaseWait:"Attendere prego mentre confermiamo il tuo ordine",paymentSuccessful:"Pagamento Completato!",thankYou:"Grazie per il tuo ordine. Ti abbiamo inviato un'email di conferma con i dettagli dell'ordine.",paymentIssue:"Problema con il Pagamento",paymentError:"Si è verificato un problema con il pagamento. Riprova.",missingPaymentInfo:"Informazioni di pagamento mancanti",paymentVerificationFailed:"Verifica del pagamento fallita",failedToVerify:"Impossibile verificare il pagamento"},dX={myAccount:"Il Mio Account",manageAccount:"Gestisci i tuoi ordini, impostazioni e preferenze",orders:"Ordini",addresses:"Indirizzi",wishlist:"Wishlist",settings:"Impostazioni",orderHistory:"Storico Ordini",noOrders:"Nessun ordine ancora",startShopping:"Inizia a fare acquisti per vedere i tuoi ordini qui",order:"Ordine",shippingTo:"Spedizione a:",shippingAddresses:"Indirizzi di Spedizione",addAddress:"Aggiungi Indirizzo",noAddresses:"Nessun indirizzo salvato",addDuringCheckout:"Aggiungi un indirizzo durante il checkout",myWishlist:"La Mia Wishlist",wishlistEmpty:"Wishlist vuota",saveForLater:"Salva i prodotti che ami per dopo",emptyWishlist:"La tua wishlist è vuota",browseAndSave:"Sfoglia i prodotti e salva i tuoi preferiti",accountSettings:"Impostazioni Account",profileInfo:"Informazioni Profilo",email:"Email",emailCantChange:"L'email non può essere modificata",memberSince:"Membro dal",dangerZone:"Zona Pericolosa",signOutDesc:"Disconnettiti dal tuo account",deleteAccount:"Elimina Account",deleteWarning:"Questa azione non può essere annullata. Eliminerà permanentemente il tuo account.",failedDeleteAddress:"Impossibile eliminare l'indirizzo",addressDeleted:"Indirizzo eliminato",failedSetDefault:"Impossibile impostare come predefinito",defaultUpdated:"Indirizzo predefinito aggiornato"},hX={allProducts:"Tutti i Prodotti",notebooks:"Notebook",desktops:"PC Desktop",categories:"Categorie",sortBy:"Ordina per",priceLowToHigh:"Prezzo: dal più basso",priceHighToLow:"Prezzo: dal più alto",newest:"Più recenti",noProducts:"Nessun prodotto trovato in questa categoria.",configureNow:"Configura ora",fromPerMonth:"Da",perMonth:"/mese",financing:"finanziamento",delivery:"Consegna",fastShipping:"Spedizione Veloce",freeDelivery:"Consegna gratuita in 3-5 giorni lavorativi",shippingTitle:"Spedizione & Consegna",shippingDesc1:"Spedizione gratuita su tutti gli ordini superiori a â¬200. Consegna standard in 3-5 giorni lavorativi in tutta Europa.",shippingDesc2:"Tutti gli ordini vengono accuratamente imballati con materiali protettivi per garantire che il tuo prodotto arrivi in perfette condizioni.",shippingCarriers:"I nostri corrieri di fiducia:",shippingTracking:"Una volta spedito, riceverai un'email con il numero di tracciamento per seguire la consegna in tempo reale.",twoYearWarranty:"Garanzia 2 Anni",extendedProtection:"Protezione estesa su tutti i prodotti",securePayment:"Pagamento Sicuro",sslEncrypted:"Checkout crittografato SSL",warrantyTitle:"Garanzia 2 Anni",warrantyDesc1:"Tutti i prodotti OVERCLOCK includono una garanzia del produttore di 2 anni che copre difetti nei materiali e nella lavorazione.",warrantyDesc2:"La nostra garanzia include riparazione o sostituzione gratuita dei componenti difettosi, supporto tecnico remoto e copertura per tutti i componenti hardware.",warrantyDesc3:"Opzioni di garanzia estesa fino a 5 anni sono disponibili al checkout.",paymentTitle:"Metodi di Pagamento Sicuri",paymentDesc:"Accettiamo un'ampia gamma di metodi di pagamento sicuri:",paymentVisa:"Visa / Mastercard / American Express",paymentPaypal:"PayPal â Paga subito o in 3 rate senza interessi",paymentKlarna:"Klarna â Compra ora, paga in 3 rate",paymentBankTransfer:"Bonifico Bancario (SEPA)",paymentEncrypted:"Tutte le transazioni sono protette con crittografia SSL a 256 bit."},fX={welcomeBack:"Bentornato",createAccount:"Crea Account",dontHaveAccount:"Non hai ancora un account?",alreadyHaveAccount:"Hai già un account?",fullName:"Nome Completo",emailAddress:"Indirizzo email",password:"Password",login:"Accedi",signUp:"Registrati",passwordTooWeak:"Password troppo debole",passwordRequirements:"La password deve contenere almeno una lettera, un numero e un simbolo.",nameRequired:"Nome richiesto",enterFullName:"Inserisci il tuo nome completo.",invalidCredentials:"Email o password non validi",accountCreated:"Account creato con successo!",emailAlreadyRegistered:"Questa email è già registrata",veryWeak:"Molto Debole",weak:"Debole",fair:"Discreta",good:"Buona",strong:"Forte",characters:"8+ caratteri",letter:"Lettera (a-z, A-Z)",number:"Numero (0-9)",symbol:"Simbolo (!@#$...)",newsletterConsent:"Acconsento a ricevere newsletter, email promozionali e offerte esclusive da OVERCLOCK. Puoi annullare l'iscrizione in qualsiasi momento.",forgotPassword:"Password dimenticata?",forgotPasswordDesc:"Inserisci la tua email e ti invieremo un link per reimpostare la password.",sendResetLink:"Invia Link di Reset",resetEmailSent:"Link di reset inviato!",resetEmailSentDesc:"Controlla la tua email per il link di reimpostazione della password.",backToLogin:"Torna al login",resetPassword:"Reimposta Password",setNewPassword:"Imposta Nuova Password",setNewPasswordDesc:"Inserisci la tua nuova password qui sotto.",newPassword:"Nuova password",confirmPassword:"Conferma password",passwordsMismatch:"Le password non corrispondono",updatePassword:"Aggiorna Password",passwordUpdated:"Password aggiornata con successo!",continueWithGoogle:"Continua con Google"},mX={yourWishlist:"La Tua Wishlist",pleaseLogIn:"Accedi per visualizzare la tua wishlist",emptyWishlist:"La tua wishlist è vuota",saveProducts:"Salva i prodotti che ami nella tua wishlist"},pX={searchProducts:"Cerca Prodotti",searchPlaceholder:"Cerca per nome, categoria o specifiche...",category:"Categoria",allCategories:"Tutte le Categorie",sortBy:"Ordina per",relevance:"Rilevanza",name:"Nome",priceRange:"Fascia di Prezzo",productsFound:"prodotto",productsFoundPlural:"prodotti",found:"trovato",for:"per",noProductsFound:"Nessun prodotto trovato",adjustSearch:"Prova a modificare la ricerca o i filtri"},gX={title:"404",message:"Oops! Pagina non trovata",returnHome:"Torna alla Home"},xX={title:"Impostazioni Cookie",message:"Utilizziamo i cookie per migliorare la tua esperienza di navigazione, offrirti contenuti personalizzati e analizzare il nostro traffico.",privacyPolicy:"Privacy Policy",accept:"Accetta",decline:"Rifiuta",acceptAll:"Accetta Tutti",necessaryOnly:"Solo Necessari",customize:"Personalizza",savePreferences:"Salva Preferenze",hideSettings:"Nascondi",categories:{necessary:{title:"Necessari",description:"Essenziali per il funzionamento del sito. Non possono essere disabilitati."},analytics:{title:"Analitici",description:"Ci aiutano a capire come i visitatori interagiscono con il nostro
670sito."},marketing:{title:"Marketing",description:"Utilizzati per mostrare pubblicità personalizzate."},preferences:{title:"Preferenze",description:"Ricordano le tue impostazioni e preferenze per un'esperienza migliore."}}},yX={pageTitle:"Cookie Policy",pageDescription:"Scopri come utilizziamo i cookie e le tecnologie simili sul nostro sito web.",title:"Cookie Policy",lastUpdated:"Ultimo aggiornamento",whatAreCookies:{title:"Cosa Sono i Cookie?",description:"I cookie sono piccoli file di testo che vengono memorizzati sul tuo dispositivo quando visiti un sito web. Aiutano i siti a ricordare le tue preferenze, a capire come utilizzi il sito e a migliorare la tua esperienza complessiva. I cookie possono essere 'di sessione', che vengono eliminati quando chiudi il browser, o 'persistenti', che rimangono sul tuo dispositivo per un periodo di tempo prestabilito."},howWeUse:{title:"Come Utilizziamo i Cookie",description:"Utilizziamo i cookie per vari scopi, tra cui garantire il corretto funzionamento del sito, analizzare il traffico, personalizzare i contenuti e fornire pubblicità mirata. Alcuni cookie sono essenziali per il funzionamento del sito, mentre altri ci aiutano a migliorare la tua esperienza."},typesOfCookies:{title:"Tipi di Cookie Utilizzati"},categories:{necessary:{fullDescription:"Questi cookie sono essenziali per il corretto funzionamento del sito web. Abilitano funzionalità fondamentali come la sicurezza, la gestione della rete e l'accessibilità . Non puoi disabilitare questi cookie nei nostri sistemi."},analytics:{fullDescription:"I cookie analitici ci aiutano a capire come i visitatori interagiscono con il nostro sito web, raccogliendo e riportando informazioni in modo anonimo. Questi dati ci aiutano a migliorare il nostro sito e la tua esperienza."},marketing:{fullDescription:"I cookie di marketing vengono utilizzati per tracciare i visitatori attraverso i siti web. Sono impostati da partner pubblicitari di terze parti per creare un profilo dei tuoi interessi e mostrarti annunci pertinenti su altri siti."},preferences:{fullDescription:"I cookie di preferenza consentono al sito di ricordare informazioni che modificano il comportamento o l'aspetto del sito, come la lingua preferita o la regione in cui ti trovi."}},table:{cookieName:"Nome Cookie",duration:"Durata",purpose:"Finalità "},duration:{session:"Sessione","1minute":"1 minuto","24hours":"24 ore","7days":"7 giorni","30days":"30 giorni","3months":"3 mesi","6months":"6 mesi","1year":"1 anno","2years":"2 anni"},cookies:{necessary:{cookieConsent:"Memorizza le tue preferenze sui cookie",sessionId:"Mantiene lo stato della sessione tra le pagine",authToken:"Ti mantiene connesso in modo sicuro",csrfToken:"Protegge dagli attacchi di falsificazione delle richieste"},analytics:{ga:"Utilizzato da Google Analytics per distinguere gli utenti",gaId:"Utilizzato per persistere lo stato della sessione",gid:"Utilizzato per distinguere gli utenti per 24 ore",gat:"Utilizzato per limitare il tasso di richieste"},marketing:{fbp:"Utilizzato da Facebook per la pubblicità ",gclAu:"Utilizzato da Google AdSense per l'efficienza pubblicitaria",ide:"Utilizzato da Google DoubleClick per registrare e segnalare azioni",nid:"Utilizzato da Google per personalizzare gli annunci"},preferences:{i18next:"Memorizza la tua lingua preferita",theme:"Ricorda la tua preferenza di tema scuro/chiaro",cartItems:"Conserva il tuo carrello tra le sessioni",recentlyViewed:"Traccia i prodotti visualizzati di recente"}},manageCookies:{title:"Gestione dei Cookie",description:"Puoi controllare e gestire i cookie in vari modi. Tieni presente che rimuovere o bloccare i cookie potrebbe influire sulla tua esperienza utente e alcune funzionalità potrebbero non essere più disponibili. Ecco come gestire i cookie nei browser più diffusi:"},yourChoices:{title:"Le Tue Scelte",description:"Puoi modificare le tue preferenze sui cookie in qualsiasi momento cliccando il pulsante qui sotto. Questo resetterà il tuo consenso e mostrerà nuovamente il banner delle impostazioni cookie.",updatePreferences:"Aggiorna Preferenze Cookie"},contact:{title:"Contattaci",description:"Se hai domande sull'uso dei cookie o su questa Cookie Policy, contattaci all'indirizzo [email protected] o attraverso la nostra pagina contatti."}},vX={limitedTimeOffer:"Offerta a Tempo Limitato",save:"Risparmia â¬20",welcomeGift:"Regalo di Benvenuto!",signUpToday:"Registrati oggi e ottieni",offFirstOrder:"sul tuo primo ordine",yourCouponCode:"Il Tuo Codice Sconto",signUpNow:"Registrati Ora",noThanks:"No grazie, pagherò il prezzo pieno"}
670,bX={common:YZ,nav:JZ,accessories:eX,services:tX,company:rX,useCases:nX,footer:sX,home:iX,features:oX,language:aX,product:lX,cart:cX,checkout:uX,account:dX,products:hX,auth:fX,wishlist:mX,search:pX,notFound:gX,cookies:xX,cookiePolicy:yX,promo:vX},wX={en:{translation:XZ},it:{translation:bX}},jX=()=>{const e=localStorage.getItem("i18nextLng");if(e&&(e==="en"||e==="it"))return e;try{const r=Intl.DateTimeFormat().resolvedOptions().timeZone;if(r.includes("Rome")||r.includes("Europe/Rome"))return"it"}catch{console.log("Timezone detection failed")}return navigator.language.split("-")[0]==="it"?"it":"en"};cr.use(nO).use($I).init({resources:wX,lng:jX(),fallbackLng:"en",detection:{order:["localStorage","navigator"],caches:["localStorage"]},interpolation:{escapeValue:!1}});nN(document.getElementById("root")).render(o.jsx(uN,{children:o.jsx(t5,{i18n:cr,children:o.jsx(fZ,{})})}));
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.