tokentracker-cli 0.29.1 → 0.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/ActivityHeatmap-C7-tnMYf.js +42 -0
- package/dashboard/dist/assets/{Card-DQJCYufs.js → Card-DSgpCS30.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage--NrTtR92.js → DashboardPage-CB6VzM2W.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-Cc51NGr0.js → DevicePage-CvrCNfjD.js} +1 -1
- package/dashboard/dist/assets/{DialogTitle-B2WKxziz.js → DialogTitle-B-afswln.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-ysKK8xhY.js → FadeIn-D1-QPLIW.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-DF4XD29e.js → HeaderGithubStar-B98VaHbR.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-ysqVCc4x.js → IpCheckPage-CJxv_Sd8.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-DRpfXd6d.js → LandingPage-CIOqWNDm.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardAvatar-V7yc6mtv.js → LeaderboardAvatar-D6qRteef.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-CJYW5jW6.js → LeaderboardPage-CgtoFmMi.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfileModal-1oRX-NfO.js → LeaderboardProfileModal-OTLhvzV6.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfilePage-DRkbH5aJ.js → LeaderboardProfilePage-C7OaZcf2.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-QvoeFYhb.js → LimitsPage-pyyJbh3F.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-CFaI6o8X.js → LocalOnlyNotice-3LPVUJ2h.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-htfPy3uF.js → LoginPage-CDLz8PnP.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-BEYu9oE6.js → PopoverPopup-97Rik7mb.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-3wYO2sFC.js → ProviderIcon-XOgnf2pw.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-B5HoHDyp.js → SettingsPage-KVjKUepK.js} +1 -1
- package/dashboard/dist/assets/{SkillsPage-hIECAnG_.js → SkillsPage-DyIY1U9O.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-DU3_jCbJ.js → WidgetsPage-BU7ejAYd.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-C1iQxeu8.js → WrappedPage-Cp8uyLbu.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-BWCsKUsC.js → arrow-up-right-CBzDSqD7.js} +1 -1
- package/dashboard/dist/assets/check-Bsgzg2T8.js +1 -0
- package/dashboard/dist/assets/{chevron-down-CQNmA4xq.js → chevron-down--Hb5e71i.js} +1 -1
- package/dashboard/dist/assets/{download-CR_v_5BB.js → download-BaVXaxbw.js} +1 -1
- package/dashboard/dist/assets/{info-DXyc9WZg.js → info-WGRGGnfx.js} +1 -1
- package/dashboard/dist/assets/{main-k2upMg0B.js → main-DDTfmaoo.js} +2 -2
- package/dashboard/dist/assets/{use-limits-display-prefs-CVG4uIZa.js → use-limits-display-prefs-C1AkRZcO.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-DP93dLRs.js → use-native-settings-DdooJHwm.js} +1 -1
- package/dashboard/dist/assets/{use-reduced-motion-C3qtfspm.js → use-reduced-motion-wvh7iFTi.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-uMQRnuSX.js → use-usage-limits-D1mepldk.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-EUQxlsrn.js → useCurrency-C3szwbkj.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/lib/pricing/curated-overrides.json +1 -0
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/dashboard/dist/assets/ActivityHeatmap-Db0W8qLd.js +0 -42
- package/dashboard/dist/assets/check-COi2sd1x.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-CB6VzM2W.js","assets/use-usage-limits-D1mepldk.js","assets/useCurrency-C3szwbkj.js","assets/ActivityHeatmap-C7-tnMYf.js","assets/info-WGRGGnfx.js","assets/DialogTitle-B-afswln.js","assets/PopoverPopup-97Rik7mb.js","assets/Card-DSgpCS30.js","assets/use-reduced-motion-wvh7iFTi.js","assets/ProviderIcon-XOgnf2pw.js","assets/FadeIn-D1-QPLIW.js","assets/LandingPage-CIOqWNDm.js","assets/HeaderGithubStar-B98VaHbR.js","assets/LeaderboardPage-CgtoFmMi.js","assets/LeaderboardAvatar-D6qRteef.js","assets/chevron-down--Hb5e71i.js","assets/LeaderboardProfilePage-C7OaZcf2.js","assets/LeaderboardProfileModal-OTLhvzV6.js","assets/arrow-up-right-CBzDSqD7.js","assets/check-Bsgzg2T8.js","assets/LimitsPage-pyyJbh3F.js","assets/use-limits-display-prefs-C1AkRZcO.js","assets/LocalOnlyNotice-3LPVUJ2h.js","assets/download-BaVXaxbw.js","assets/SettingsPage-KVjKUepK.js","assets/use-native-settings-DdooJHwm.js","assets/SkillsPage-DyIY1U9O.js","assets/WidgetsPage-BU7ejAYd.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function ES(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function R_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function AS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var gh={exports:{}},us={},yh={exports:{}},Ze={};var Oy;function RS(){if(Oy)return Ze;Oy=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function k(M){return M===null||typeof M!="object"?null:(M=y&&M[y]||M["@@iterator"],typeof M=="function"?M:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,C={};function S(M,q,xe){this.props=M,this.context=q,this.refs=C,this.updater=xe||w}S.prototype.isReactComponent={},S.prototype.setState=function(M,q){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,q,"setState")},S.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function D(){}D.prototype=S.prototype;function L(M,q,xe){this.props=M,this.context=q,this.refs=C,this.updater=xe||w}var R=L.prototype=new D;R.constructor=L,x(R,S.prototype),R.isPureReactComponent=!0;var O=Array.isArray,K=Object.prototype.hasOwnProperty,W={current:null},z={key:!0,ref:!0,__self:!0,__source:!0};function P(M,q,xe){var Re,Pe={},Te=null,Ke=null;if(q!=null)for(Re in q.ref!==void 0&&(Ke=q.ref),q.key!==void 0&&(Te=""+q.key),q)K.call(q,Re)&&!z.hasOwnProperty(Re)&&(Pe[Re]=q[Re]);var Qe=arguments.length-2;if(Qe===1)Pe.children=xe;else if(1<Qe){for(var Ue=Array(Qe),jt=0;jt<Qe;jt++)Ue[jt]=arguments[jt+2];Pe.children=Ue}if(M&&M.defaultProps)for(Re in Qe=M.defaultProps,Qe)Pe[Re]===void 0&&(Pe[Re]=Qe[Re]);return{$$typeof:e,type:M,key:Te,ref:Ke,props:Pe,_owner:W.current}}function Y(M,q){return{$$typeof:e,type:M.type,key:q,ref:M.ref,props:M.props,_owner:M._owner}}function X(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ue(M){var q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(xe){return q[xe]})}var se=/\/+/g;function Ae(M,q){return typeof M=="object"&&M!==null&&M.key!=null?ue(""+M.key):q.toString(36)}function pe(M,q,xe,Re,Pe){var Te=typeof M;(Te==="undefined"||Te==="boolean")&&(M=null);var Ke=!1;if(M===null)Ke=!0;else switch(Te){case"string":case"number":Ke=!0;break;case"object":switch(M.$$typeof){case e:case t:Ke=!0}}if(Ke)return Ke=M,Pe=Pe(Ke),M=Re===""?"."+Ae(Ke,0):Re,O(Pe)?(xe="",M!=null&&(xe=M.replace(se,"$&/")+"/"),pe(Pe,q,xe,"",function(jt){return jt})):Pe!=null&&(X(Pe)&&(Pe=Y(Pe,xe+(!Pe.key||Ke&&Ke.key===Pe.key?"":(""+Pe.key).replace(se,"$&/")+"/")+M)),q.push(Pe)),1;if(Ke=0,Re=Re===""?".":Re+":",O(M))for(var Qe=0;Qe<M.length;Qe++){Te=M[Qe];var Ue=Re+Ae(Te,Qe);Ke+=pe(Te,q,xe,Ue,Pe)}else if(Ue=k(M),typeof Ue=="function")for(M=Ue.call(M),Qe=0;!(Te=M.next()).done;)Te=Te.value,Ue=Re+Ae(Te,Qe++),Ke+=pe(Te,q,xe,Ue,Pe);else if(Te==="object")throw q=String(M),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return Ke}function le(M,q,xe){if(M==null)return M;var Re=[],Pe=0;return pe(M,Re,"","",function(Te){return q.call(xe,Te,Pe++)}),Re}function fe(M){if(M._status===-1){var q=M._result;q=q(),q.then(function(xe){(M._status===0||M._status===-1)&&(M._status=1,M._result=xe)},function(xe){(M._status===0||M._status===-1)&&(M._status=2,M._result=xe)}),M._status===-1&&(M._status=0,M._result=q)}if(M._status===1)return M._result.default;throw M._result}var Ne={current:null},G={transition:null},Z={ReactCurrentDispatcher:Ne,ReactCurrentBatchConfig:G,ReactCurrentOwner:W};function $(){throw Error("act(...) is not supported in production builds of React.")}return Ze.Children={map:le,forEach:function(M,q,xe){le(M,function(){q.apply(this,arguments)},xe)},count:function(M){var q=0;return le(M,function(){q++}),q},toArray:function(M){return le(M,function(q){return q})||[]},only:function(M){if(!X(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Ze.Component=S,Ze.Fragment=n,Ze.Profiler=o,Ze.PureComponent=L,Ze.StrictMode=r,Ze.Suspense=h,Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Ze.act=$,Ze.cloneElement=function(M,q,xe){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var Re=x({},M.props),Pe=M.key,Te=M.ref,Ke=M._owner;if(q!=null){if(q.ref!==void 0&&(Te=q.ref,Ke=W.current),q.key!==void 0&&(Pe=""+q.key),M.type&&M.type.defaultProps)var Qe=M.type.defaultProps;for(Ue in q)K.call(q,Ue)&&!z.hasOwnProperty(Ue)&&(Re[Ue]=q[Ue]===void 0&&Qe!==void 0?Qe[Ue]:q[Ue])}var Ue=arguments.length-2;if(Ue===1)Re.children=xe;else if(1<Ue){Qe=Array(Ue);for(var jt=0;jt<Ue;jt++)Qe[jt]=arguments[jt+2];Re.children=Qe}return{$$typeof:e,type:M.type,key:Pe,ref:Te,props:Re,_owner:Ke}},Ze.createContext=function(M){return M={$$typeof:c,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:s,_context:M},M.Consumer=M},Ze.createElement=P,Ze.createFactory=function(M){var q=P.bind(null,M);return q.type=M,q},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(M){return{$$typeof:u,render:M}},Ze.isValidElement=X,Ze.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:fe}},Ze.memo=function(M,q){return{$$typeof:p,type:M,compare:q===void 0?null:q}},Ze.startTransition=function(M){var q=G.transition;G.transition={};try{M()}finally{G.transition=q}},Ze.unstable_act=$,Ze.useCallback=function(M,q){return Ne.current.useCallback(M,q)},Ze.useContext=function(M){return Ne.current.useContext(M)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(M){return Ne.current.useDeferredValue(M)},Ze.useEffect=function(M,q){return Ne.current.useEffect(M,q)},Ze.useId=function(){return Ne.current.useId()},Ze.useImperativeHandle=function(M,q,xe){return Ne.current.useImperativeHandle(M,q,xe)},Ze.useInsertionEffect=function(M,q){return Ne.current.useInsertionEffect(M,q)},Ze.useLayoutEffect=function(M,q){return Ne.current.useLayoutEffect(M,q)},Ze.useMemo=function(M,q){return Ne.current.useMemo(M,q)},Ze.useReducer=function(M,q,xe){return Ne.current.useReducer(M,q,xe)},Ze.useRef=function(M){return Ne.current.useRef(M)},Ze.useState=function(M){return Ne.current.useState(M)},Ze.useSyncExternalStore=function(M,q,xe){return Ne.current.useSyncExternalStore(M,q,xe)},Ze.useTransition=function(){return Ne.current.useTransition()},Ze.version="18.3.1",Ze}var jy;function Xp(){return jy||(jy=1,yh.exports=RS()),yh.exports}var Uy;function LS(){if(Uy)return us;Uy=1;var e=Xp(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(u,h,p){var m,y={},k=null,w=null;p!==void 0&&(k=""+p),h.key!==void 0&&(k=""+h.key),h.ref!==void 0&&(w=h.ref);for(m in h)r.call(h,m)&&!s.hasOwnProperty(m)&&(y[m]=h[m]);if(u&&u.defaultProps)for(m in h=u.defaultProps,h)y[m]===void 0&&(y[m]=h[m]);return{$$typeof:t,type:u,key:k,ref:w,props:y,_owner:o.current}}return us.Fragment=n,us.jsx=c,us.jsxs=c,us}var By;function DS(){return By||(By=1,gh.exports=LS()),gh.exports}var N=DS(),b=Xp();const Ls=R_(b),IS=ES({__proto__:null,default:Ls},[b]);var uc={},vh={exports:{}},vn={},kh={exports:{}},_h={};var Fy;function MS(){return Fy||(Fy=1,(function(e){function t(G,Z){var $=G.length;G.push(Z);e:for(;0<$;){var M=$-1>>>1,q=G[M];if(0<o(q,Z))G[M]=Z,G[$]=q,$=M;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var Z=G[0],$=G.pop();if($!==Z){G[0]=$;e:for(var M=0,q=G.length,xe=q>>>1;M<xe;){var Re=2*(M+1)-1,Pe=G[Re],Te=Re+1,Ke=G[Te];if(0>o(Pe,$))Te<q&&0>o(Ke,Pe)?(G[M]=Ke,G[Te]=$,M=Te):(G[M]=Pe,G[Re]=$,M=Re);else if(Te<q&&0>o(Ke,$))G[M]=Ke,G[Te]=$,M=Te;else break e}}return Z}function o(G,Z){var $=G.sortIndex-Z.sortIndex;return $!==0?$:G.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var h=[],p=[],m=1,y=null,k=3,w=!1,x=!1,C=!1,S=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(G){for(var Z=n(p);Z!==null;){if(Z.callback===null)r(p);else if(Z.startTime<=G)r(p),Z.sortIndex=Z.expirationTime,t(h,Z);else break;Z=n(p)}}function O(G){if(C=!1,R(G),!x)if(n(h)!==null)x=!0,fe(K);else{var Z=n(p);Z!==null&&Ne(O,Z.startTime-G)}}function K(G,Z){x=!1,C&&(C=!1,D(P),P=-1),w=!0;var $=k;try{for(R(Z),y=n(h);y!==null&&(!(y.expirationTime>Z)||G&&!ue());){var M=y.callback;if(typeof M=="function"){y.callback=null,k=y.priorityLevel;var q=M(y.expirationTime<=Z);Z=e.unstable_now(),typeof q=="function"?y.callback=q:y===n(h)&&r(h),R(Z)}else r(h);y=n(h)}if(y!==null)var xe=!0;else{var Re=n(p);Re!==null&&Ne(O,Re.startTime-Z),xe=!1}return xe}finally{y=null,k=$,w=!1}}var W=!1,z=null,P=-1,Y=5,X=-1;function ue(){return!(e.unstable_now()-X<Y)}function se(){if(z!==null){var G=e.unstable_now();X=G;var Z=!0;try{Z=z(!0,G)}finally{Z?Ae():(W=!1,z=null)}}else W=!1}var Ae;if(typeof L=="function")Ae=function(){L(se)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,le=pe.port2;pe.port1.onmessage=se,Ae=function(){le.postMessage(null)}}else Ae=function(){S(se,0)};function fe(G){z=G,W||(W=!0,Ae())}function Ne(G,Z){P=S(function(){G(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(G){G.callback=null},e.unstable_continueExecution=function(){x||w||(x=!0,fe(K))},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(G){switch(k){case 1:case 2:case 3:var Z=3;break;default:Z=k}var $=k;k=Z;try{return G()}finally{k=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,Z){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var $=k;k=G;try{return Z()}finally{k=$}},e.unstable_scheduleCallback=function(G,Z,$){var M=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?M+$:M):$=M,G){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=$+q,G={id:m++,callback:Z,priorityLevel:G,startTime:$,expirationTime:q,sortIndex:-1},$>M?(G.sortIndex=$,t(p,G),n(h)===null&&G===n(p)&&(C?(D(P),P=-1):C=!0,Ne(O,$-M))):(G.sortIndex=q,t(h,G),x||w||(x=!0,fe(K))),G},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(G){var Z=k;return function(){var $=k;k=Z;try{return G.apply(this,arguments)}finally{k=$}}}})(_h)),_h}var Vy;function NS(){return Vy||(Vy=1,kh.exports=MS()),kh.exports}var zy;function OS(){if(zy)return vn;zy=1;var e=Xp(),t=NS();function n(a){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+a,l=1;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+a+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function s(a,i){c(a,i),c(a+"Capture",i)}function c(a,i){for(o[a]=i,a=0;a<i.length;a++)r.add(i[a])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,p=/^[: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]*$/,m={},y={};function k(a){return h.call(y,a)?!0:h.call(m,a)?!1:p.test(a)?y[a]=!0:(m[a]=!0,!1)}function w(a,i,l,d){if(l!==null&&l.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return d?!1:l!==null?!l.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function x(a,i,l,d){if(i===null||typeof i>"u"||w(a,i,l,d))return!0;if(d)return!1;if(l!==null)switch(l.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function C(a,i,l,d,f,g,_){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=d,this.attributeNamespace=f,this.mustUseProperty=l,this.propertyName=a,this.type=i,this.sanitizeURL=g,this.removeEmptyString=_}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){S[a]=new C(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var i=a[0];S[i]=new C(i,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){S[a]=new C(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){S[a]=new C(a,2,!1,a,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(a){S[a]=new C(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){S[a]=new C(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){S[a]=new C(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){S[a]=new C(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){S[a]=new C(a,5,!1,a.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function L(a){return a[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(a){var i=a.replace(D,L);S[i]=new C(i,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var i=a.replace(D,L);S[i]=new C(i,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var i=a.replace(D,L);S[i]=new C(i,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){S[a]=new C(a,1,!1,a.toLowerCase(),null,!1,!1)}),S.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){S[a]=new C(a,1,!1,a.toLowerCase(),null,!0,!0)});function R(a,i,l,d){var f=S.hasOwnProperty(i)?S[i]:null;(f!==null?f.type!==0:d||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(x(i,l,f,d)&&(l=null),d||f===null?k(i)&&(l===null?a.removeAttribute(i):a.setAttribute(i,""+l)):f.mustUseProperty?a[f.propertyName]=l===null?f.type===3?!1:"":l:(i=f.attributeName,d=f.attributeNamespace,l===null?a.removeAttribute(i):(f=f.type,l=f===3||f===4&&l===!0?"":""+l,d?a.setAttributeNS(d,i,l):a.setAttribute(i,l))))}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,K=Symbol.for("react.element"),W=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),ue=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),Ae=Symbol.for("react.suspense"),pe=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),Ne=Symbol.for("react.offscreen"),G=Symbol.iterator;function Z(a){return a===null||typeof a!="object"?null:(a=G&&a[G]||a["@@iterator"],typeof a=="function"?a:null)}var $=Object.assign,M;function q(a){if(M===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);M=i&&i[1]||""}return`
|
|
3
3
|
`+M+a}var xe=!1;function Re(a,i){if(!a||xe)return"";xe=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(H){var d=H}Reflect.construct(a,[],i)}else{try{i.call()}catch(H){d=H}a.call(i.prototype)}else{try{throw Error()}catch(H){d=H}a()}}catch(H){if(H&&d&&typeof H.stack=="string"){for(var f=H.stack.split(`
|
|
4
4
|
`),g=d.stack.split(`
|
|
@@ -851,4 +851,4 @@ leaderboard.profile.like.aria_unlike,dashboard,LeaderboardProfileModal,LikeButto
|
|
|
851
851
|
${L}px !important;
|
|
852
852
|
${R}px !important;
|
|
853
853
|
}
|
|
854
|
-
`),()=>{u.current?.removeAttribute("data-motion-pop-id"),K.contains(O)&&K.removeChild(O)}},[t]),N.jsx(kO,{isPresent:t,childRef:u,sizeRef:h,pop:s,children:s===!1?e:b.cloneElement(e,{ref:y})})}const bO=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:c,anchorX:u,anchorY:h,root:p})=>{const m=Of(wO),y=b.useId();let k=!0,w=b.useMemo(()=>(k=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:x=>{m.set(x,!0);for(const C of m.values())if(!C)return;r&&r()},register:x=>(m.set(x,!1),()=>m.delete(x))}),[n,m,r]);return s&&k&&(w={...w}),b.useMemo(()=>{m.forEach((x,C)=>m.set(C,!1))},[n]),b.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),e=N.jsx(_O,{pop:c==="popLayout",isPresent:n,anchorX:u,anchorY:h,root:p,children:e}),N.jsx(Lu.Provider,{value:w,children:e})};function wO(){return new Map}function gx(e=!0){const t=b.useContext(Lu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=b.useId();b.useEffect(()=>{if(e)return o(s)},[e]);const c=b.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,c]:[!0]}const _c=e=>e.key||"";function o_(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const xO=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:c=!1,anchorX:u="left",anchorY:h="top",root:p})=>{const[m,y]=gx(c),k=b.useMemo(()=>o_(e),[e]),w=c&&!m?[]:k.map(_c),x=b.useRef(!0),C=b.useRef(k),S=Of(()=>new Map),D=b.useRef(new Set),[L,R]=b.useState(k),[O,K]=b.useState(k);Hw(()=>{x.current=!1,C.current=k;for(let P=0;P<O.length;P++){const Y=_c(O[P]);w.includes(Y)?(S.delete(Y),D.current.delete(Y)):S.get(Y)!==!0&&S.set(Y,!1)}},[O,w.length,w.join("-")]);const W=[];if(k!==L){let P=[...k];for(let Y=0;Y<O.length;Y++){const X=O[Y],ue=_c(X);w.includes(ue)||(P.splice(Y,0,X),W.push(X))}return s==="wait"&&W.length&&(P=W),K(o_(P)),R(k),null}const{forceRender:z}=b.useContext(Nf);return N.jsx(N.Fragment,{children:O.map(P=>{const Y=_c(P),X=c&&!m?!1:k===O||w.includes(Y),ue=()=>{if(D.current.has(Y))return;if(S.has(Y))D.current.add(Y),S.set(Y,!0);else return;let se=!0;S.forEach(Ae=>{Ae||(se=!1)}),se&&(z?.(),K(C.current),c&&y?.(),r&&r())};return N.jsx(bO,{isPresent:X,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:p,onExitComplete:X?void 0:ue,anchorX:u,anchorY:h,children:P},Y)})})},yx=b.createContext({strict:!1}),s_={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"]};let l_=!1;function PO(){if(l_)return;const e={};for(const t in s_)e[t]={isEnabled:n=>s_[t].some(r=>!!n[r])};G0(e),l_=!0}function vx(){return PO(),sN()}function SO(e){const t=vx();for(const n in e)t[n]={...t[n],...e[n]};G0(t)}const CO=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","propagate","ignoreStrict","viewport"]);function vu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||CO.has(e)}let kx=e=>!vu(e);function TO(e){typeof e=="function"&&(kx=t=>t.startsWith("on")?!vu(t):e(t))}try{TO(require("@emotion/is-prop-valid").default)}catch{}function EO(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||Kt(e[o])||(kx(o)||n===!0&&vu(o)||!t&&!vu(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Nu=b.createContext({});function AO(e,t){if(Mu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fs(n)?n:void 0,animate:Fs(r)?r:void 0}}return e.inherit!==!1?t:{}}function RO(e){const{initial:t,animate:n}=AO(e,b.useContext(Nu));return b.useMemo(()=>({initial:t,animate:n}),[c_(t),c_(n)])}function c_(e){return Array.isArray(e)?e.join(" "):e}const lm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _x(e,t,n){for(const r in t)!Kt(t[r])&&!J0(r,n)&&(e[r]=t[r])}function LO({transformTemplate:e},t){return b.useMemo(()=>{const n=lm();return im(n,t,e),Object.assign({},n.vars,n.style)},[t])}function DO(e,t){const n=e.style||{},r={};return _x(r,n,e),Object.assign(r,LO(e,t)),r}function IO(e,t){const n={},r=DO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const bx=()=>({...lm(),attrs:{}});function MO(e,t,n,r){const o=b.useMemo(()=>{const s=bx();return ex(s,t,nx(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};_x(s,e.style,e),o.style={...s,...o.style}}return o}const NO=["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 cm(e){return typeof e!="string"||e.includes("-")?!1:!!(NO.indexOf(e)>-1||/[A-Z]/u.test(e))}function OO(e,t,n,{latestValues:r},o,s=!1,c){const h=(c??cm(e)?MO:IO)(t,r,o,e),p=EO(t,typeof e=="string",s),m=e!==b.Fragment?{...p,...h,ref:n}:{},{children:y}=t,k=b.useMemo(()=>Kt(y)?y.get():y,[y]);return b.createElement(e,{...m,children:k})}function jO({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:UO(n,r,o,e),renderState:t()}}function UO(e,t,n,r){const o={},s=r(e,{});for(const k in s)o[k]=$c(s[k]);let{initial:c,animate:u}=e;const h=Mu(e),p=$0(e);t&&p&&!h&&e.inherit!==!1&&(c===void 0&&(c=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const y=m?u:c;if(y&&typeof y!="boolean"&&!Iu(y)){const k=Array.isArray(y)?y:[y];for(let w=0;w<k.length;w++){const x=Xf(e,k[w]);if(x){const{transitionEnd:C,transition:S,...D}=x;for(const L in D){let R=D[L];if(Array.isArray(R)){const O=m?R.length-1:0;R=R[O]}R!==null&&(o[L]=R)}for(const L in C)o[L]=C[L]}}}return o}const wx=e=>(t,n)=>{const r=b.useContext(Nu),o=b.useContext(Lu),s=()=>jO(e,t,r,o);return n?s():Of(s)},BO=wx({scrapeMotionValuesFromProps:om,createRenderState:lm}),FO=wx({scrapeMotionValuesFromProps:ax,createRenderState:bx}),VO=Symbol.for("motionComponentSymbol");function zO(e,t,n){const r=b.useRef(n);b.useInsertionEffect(()=>{r.current=n});const o=b.useRef(null);return b.useCallback(s=>{s&&e.onMount?.(s);const c=r.current;if(typeof c=="function")if(s){const u=c(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):c(s);else c&&(c.current=s);t&&(s?t.mount(s):t.unmount())},[t])}const xx=b.createContext({});function no(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function HO(e,t,n,r,o,s){const{visualElement:c}=b.useContext(Nu),u=b.useContext(yx),h=b.useContext(Lu),p=b.useContext(sm),m=p.reducedMotion,y=p.skipAnimations,k=b.useRef(null),w=b.useRef(!1);r=r||u.renderer,!k.current&&r&&(k.current=r(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:s}),w.current&&k.current&&(k.current.manuallyAnimateOnMount=!0));const x=k.current,C=b.useContext(xx);x&&!x.projection&&o&&(x.type==="html"||x.type==="svg")&&$O(k.current,n,o,C);const S=b.useRef(!1);b.useInsertionEffect(()=>{x&&S.current&&x.update(n,h)});const D=n[L0],L=b.useRef(!!D&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(D)&&window.MotionHasOptimisedAnimation?.(D));return Hw(()=>{w.current=!0,x&&(S.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),L.current&&x.animationState&&x.animationState.animateChanges())}),b.useEffect(()=>{x&&(!L.current&&x.animationState&&x.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(D)}),L.current=!1),x.enteringChildren=void 0)}),x}function $O(e,t,n,r){const{layoutId:o,layout:s,drag:c,dragConstraints:u,layoutScroll:h,layoutRoot:p,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Px(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!c||u&&no(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:y,layoutScroll:h,layoutRoot:p,layoutAnchor:m})}function Px(e){if(e)return e.options.allowProjection!==!1?e.projection:Px(e.parent)}function Yh(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&SO(r);const s=n?n==="svg":cm(e),c=s?FO:BO;function u(p,m){let y;const k={...b.useContext(sm),...p,layoutId:WO(p)},{isStatic:w}=k,x=RO(p),C=c(p,w);if(!w&&typeof window<"u"){GO();const S=KO(k);y=S.MeasureLayout,x.visualElement=HO(e,C,k,o,S.ProjectionNode,s)}return N.jsxs(Nu.Provider,{value:x,children:[y&&x.visualElement?N.jsx(y,{visualElement:x.visualElement,...k}):null,OO(e,p,zO(C,x.visualElement,m),C,w,t,s)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=b.forwardRef(u);return h[VO]=e,h}function WO({layoutId:e}){const t=b.useContext(Nf).id;return t&&e!==void 0?t+"-"+e:e}function GO(e,t){b.useContext(yx).strict}function KO(e){const t=vx(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function qO(e,t){if(typeof Proxy>"u")return Yh;const n=new Map,r=(s,c)=>Yh(s,c,e,t),o=(s,c)=>r(s,c);return new Proxy(o,{get:(s,c)=>c==="create"?r:(n.has(c)||n.set(c,Yh(c,void 0,e,t)),n.get(c))})}const YO=(e,t)=>t.isSVG??cm(e)?new PN(t):new vN(t,{allowProjection:e!==b.Fragment});class ZO extends jr{constructor(t){super(t),t.animationState||(t.animationState=AN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Iu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let XO=0;class QO extends jr{constructor(){super(...arguments),this.id=XO++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:s,custom:c}=this.node.getProps();if(typeof s=="string"){const u=si(this.node,s,c);if(u){const{transition:h,transitionEnd:p,...m}=u;for(const y in m)this.node.getValue(y)?.jump(m[y])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const JO={animation:{Feature:ZO},exit:{Feature:QO}};function nl(e){return{point:{x:e.pageX,y:e.pageY}}}const e3=e=>t=>tm(t)&&e(t,nl(t));function Rs(e,t,n,r){return Vs(e,t,e3(n),r)}const Sx=({current:e})=>e?e.ownerDocument.defaultView:null,u_=(e,t)=>Math.abs(e-t);function t3(e,t){const n=u_(e.x,t.x),r=u_(e.y,t.y);return Math.sqrt(n**2+r**2)}const d_=new Set(["auto","scroll"]);class Cx{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:c=3,element:u}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=bc(this.lastRawMoveEventInfo,this.transformPagePoint));const w=Zh(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,C=t3(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!C)return;const{point:S}=w,{timestamp:D}=Gt;this.history.push({...S,timestamp:D});const{onStart:L,onMove:R}=this.handlers;x||(L&&L(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,w)},this.handlePointerMove=(w,x)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=bc(x,this.transformPagePoint),dt.update(this.updatePoint,!0)},this.handlePointerUp=(w,x)=>{this.end();const{onEnd:C,onSessionEnd:S,resumeAnimation:D}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&D&&D(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const L=Zh(w.type==="pointercancel"?this.lastMoveEventInfo:bc(x,this.transformPagePoint),this.history);this.startEvent&&C&&C(w,L),S&&S(w,L)},!tm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=o||window;const h=nl(t),p=bc(h,this.transformPagePoint),{point:m}=p,{timestamp:y}=Gt;this.history=[{...m,timestamp:y}];const{onSessionStart:k}=n;k&&k(t,Zh(p,this.history)),this.removeListeners=Js(Rs(this.contextWindow,"pointermove",this.handlePointerMove),Rs(this.contextWindow,"pointerup",this.handlePointerUp),Rs(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(d_.has(r.overflowX)||d_.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),dt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Nr(this.updatePoint)}}function bc(e,t){return t?{point:t(e.point)}:e}function h_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zh({point:e},t){return{point:e,delta:h_(e,Tx(t)),offset:h_(e,n3(t)),velocity:a3(t,.1)}}function n3(e){return e[0]}function Tx(e){return e[e.length-1]}function a3(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Tx(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Sn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>Sn(t)*2&&(r=e[1]);const s=On(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const c={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function r3(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?vt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?vt(n,e,r.max):Math.min(e,n)),e}function p_(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function i3(e,{top:t,left:n,bottom:r,right:o}){return{x:p_(e.x,n,o),y:p_(e.y,t,r)}}function f_(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function o3(e,t){return{x:f_(e.x,t.x),y:f_(e.y,t.y)}}function s3(e,t){let n=.5;const r=ln(e),o=ln(t);return o>r?n=Us(t.min,t.max-r,e.min):r>o&&(n=Us(e.min,e.max-o,t.min)),xa(0,1,n)}function l3(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Kp=.35;function c3(e=Kp){return e===!1?e=0:e===!0&&(e=Kp),{x:m_(e,"left","right"),y:m_(e,"top","bottom")}}function m_(e,t,n){return{min:g_(e,t),max:g_(e,n)}}function g_(e,t){return typeof e=="number"?e:e[t]||0}const u3=new WeakMap;class d3{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=Ot(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=y=>{n&&this.snapToCursor(nl(y).point),this.stopAnimation()},c=(y,k)=>{const{drag:w,dragPropagation:x,onDragStart:C}=this.getProps();if(w&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jM(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=k,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fa(D=>{let L=this.getAxisMotionValue(D).get()||0;if(va.test(L)){const{projection:R}=this.visualElement;if(R&&R.layout){const O=R.layout.layoutBox[D];O&&(L=ln(O)*(parseFloat(L)/100))}}this.originPoint[D]=L}),C&&dt.update(()=>C(y,k),!1,!0),Up(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},u=(y,k)=>{this.latestPointerEvent=y,this.latestPanInfo=k;const{dragPropagation:w,dragDirectionLock:x,onDirectionLock:C,onDrag:S}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:D}=k;if(x&&this.currentDirection===null){this.currentDirection=p3(D),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",k.point,D),this.updateAxis("y",k.point,D),this.visualElement.render(),S&&dt.update(()=>S(y,k),!1,!0)},h=(y,k)=>{this.latestPointerEvent=y,this.latestPanInfo=k,this.stop(y,k),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new Cx(t,{onSessionStart:s,onStart:c,onMove:u,onSessionEnd:h,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:Sx(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:u}=this.getProps();u&&dt.postRender(()=>u(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!wc(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=r3(c,this.constraints[t],this.elastic[t])),s.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&no(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=i3(r.layoutBox,t):this.constraints=!1,this.elastic=c3(n),o!==this.constraints&&!no(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&fa(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=l3(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!no(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=hN(r,o.root,this.visualElement.getTransformPagePoint());let c=o3(o.layout.layoutBox,s);if(n){const u=n(cN(c));this.hasMutatedConstraints=!!u,u&&(c=q0(u))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:c,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},p=fa(m=>{if(!wc(m,n,this.currentDirection))return;let y=h&&h[m]||{};(c===!0||c===m)&&(y={min:0,max:0});const k=o?200:1e6,w=o?40:1e7,x={type:"inertia",velocity:r?t[m]:0,bounceStiffness:k,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...s,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(p).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Up(this.visualElement,t),r.start(Zf(t,r,0,n,this.visualElement,!1))}stopAnimation(){fa(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){fa(n=>{const{drag:r}=this.getProps();if(!wc(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:u}=o.layout.layoutBox[n],h=s.get()||0;s.set(t[n]-vt(c,u,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!no(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};fa(c=>{const u=this.getAxisMotionValue(c);if(u&&this.constraints!==!1){const h=u.get();o[c]=s3({min:h,max:h},this.constraints[c])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),fa(c=>{if(!wc(c,t,null))return;const u=this.getAxisMotionValue(c),{min:h,max:p}=this.constraints[c];u.set(vt(h,p,o[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;u3.set(this.visualElement,this);const t=this.visualElement.current,n=Rs(t,"pointerdown",p=>{const{drag:m,dragListener:y=!0}=this.getProps(),k=p.target,w=k!==t&&HM(k);m&&y&&!w&&this.start(p)});let r;const o=()=>{const{dragConstraints:p}=this.getProps();no(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),r||(r=h3(t,p.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,c=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),dt.read(o);const u=Vs(window,"resize",()=>this.scalePositionWithinConstraints()),h=s.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:m})=>{this.isDragging&&m&&(fa(y=>{const k=this.getAxisMotionValue(y);k&&(this.originPoint[y]+=p[y].translate,k.set(k.get()+p[y].translate))}),this.visualElement.render())}));return()=>{u(),n(),c(),h&&h(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:c=Kp,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:c,dragMomentum:u}}}function y_(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function h3(e,t,n){const r=Pk(e,y_(n)),o=Pk(t,y_(n));return()=>{r(),o()}}function wc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function p3(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class f3 extends jr{constructor(t){super(t),this.removeGroupControls=jn,this.removeListeners=jn,this.controls=new d3(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||jn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Xh=e=>(t,n)=>{e&&dt.update(()=>e(t,n),!1,!0)};class m3 extends jr{constructor(){super(...arguments),this.removePointerDownListener=jn}onPointerDown(t){this.session=new Cx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Xh(t),onStart:Xh(n),onMove:Xh(r),onEnd:(s,c)=>{delete this.session,o&&dt.postRender(()=>o(s,c))}}}mount(){this.removePointerDownListener=Rs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Qh=!1;class g3 extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),Qh&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Wc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:c}=r;return c&&(c.isPresent=s,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),Qh=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?c.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?c.promote():c.relegate()||dt.postRender(()=>{const u=c.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),em.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Qh=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ex(e){const[t,n]=gx(),r=b.useContext(Nf);return N.jsx(g3,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(xx),isPresent:t,safeToRemove:n})}const y3={pan:{Feature:m3},drag:{Feature:f3,ProjectionNode:mx,MeasureLayout:Ex}};function v_(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&dt.postRender(()=>s(t,nl(t)))}class v3 extends jr{mount(){const{current:t}=this.node;t&&(this.unmount=BM(t,(n,r)=>(v_(this.node,r,"Start"),o=>v_(this.node,o,"End"))))}unmount(){}}class k3 extends jr{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=Js(Vs(this.node.current,"focus",()=>this.onFocus()),Vs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function k_(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&dt.postRender(()=>s(t,nl(t)))}class _3 extends jr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=WM(t,(o,s)=>(k_(this.node,s,"Start"),(c,{success:u})=>k_(this.node,c,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const qp=new WeakMap,Jh=new WeakMap,b3=e=>{const t=qp.get(e.target);t&&t(e)},w3=e=>{e.forEach(b3)};function x3({root:e,...t}){const n=e||document;Jh.has(n)||Jh.set(n,{});const r=Jh.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(w3,{root:e,...t})),r[o]}function P3(e,t,n){const r=x3(t);return qp.set(e,n),r.observe(e),()=>{qp.delete(e),r.unobserve(e)}}const S3={some:0,all:1};class C3 extends jr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,c={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:S3[o]},u=h=>{const{isIntersecting:p}=h;if(this.isInView===p||(this.isInView=p,s&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),k=p?m:y;k&&k(h)};this.stopObserver=P3(this.node.current,c,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(T3(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function T3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const E3={inView:{Feature:C3},tap:{Feature:_3},focus:{Feature:k3},hover:{Feature:v3}},A3={layout:{ProjectionNode:mx,MeasureLayout:Ex}},R3={...JO,...E3,...y3,...A3},ep=qO(R3,YO);function Ax(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ax(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function L3(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ax(e))&&(r&&(r+=" "),r+=t);return r}const D3=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},I3=(e,t)=>({classGroupId:e,validator:t}),Rx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ku="-",__=[],M3="arbitrary..",N3=e=>{const t=j3(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return O3(c);const u=c.split(ku),h=u[0]===""&&u.length>1?1:0;return Lx(u,h,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const h=r[c],p=n[c];return h?p?D3(p,h):h:p||__}return n[c]||__}}},Lx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const p=Lx(e,t+1,s);if(p)return p}const c=n.validators;if(c===null)return;const u=t===0?e.join(ku):e.slice(t).join(ku),h=c.length;for(let p=0;p<h;p++){const m=c[p];if(m.validator(u))return m.classGroupId}},O3=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?M3+r:void 0})(),j3=e=>{const{theme:t,classGroups:n}=e;return U3(n,t)},U3=(e,t)=>{const n=Rx();for(const r in e){const o=e[r];um(o,n,r,t)}return n},um=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const c=e[s];B3(c,t,n,r)}},B3=(e,t,n,r)=>{if(typeof e=="string"){F3(e,t,n);return}if(typeof e=="function"){V3(e,t,n,r);return}z3(e,t,n,r)},F3=(e,t,n)=>{const r=e===""?t:Dx(t,e);r.classGroupId=n},V3=(e,t,n,r)=>{if(H3(e)){um(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(I3(n,e))},z3=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let c=0;c<s;c++){const[u,h]=o[c];um(h,Dx(t,u),n,r)}},Dx=(e,t)=>{let n=e;const r=t.split(ku),o=r.length;for(let s=0;s<o;s++){const c=r[s];let u=n.nextPart.get(c);u||(u=Rx(),n.nextPart.set(c,u)),n=u}return n},H3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,$3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,c)=>{n[s]=c,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let c=n[s];if(c!==void 0)return c;if((c=r[s])!==void 0)return o(s,c),c},set(s,c){s in n?n[s]=c:o(s,c)}}},Yp="!",b_=":",W3=[],w_=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),G3=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let c=0,u=0,h=0,p;const m=o.length;for(let C=0;C<m;C++){const S=o[C];if(c===0&&u===0){if(S===b_){s.push(o.slice(h,C)),h=C+1;continue}if(S==="/"){p=C;continue}}S==="["?c++:S==="]"?c--:S==="("?u++:S===")"&&u--}const y=s.length===0?o:o.slice(h);let k=y,w=!1;y.endsWith(Yp)?(k=y.slice(0,-1),w=!0):y.startsWith(Yp)&&(k=y.slice(1),w=!0);const x=p&&p>h?p-h:void 0;return w_(s,w,k,x)};if(t){const o=t+b_,s=r;r=c=>c.startsWith(o)?s(c.slice(o.length)):w_(W3,!1,c,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},K3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const c=n[s],u=c[0]==="[",h=t.has(c);u||h?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(c)):o.push(c)}return o.length>0&&(o.sort(),r.push(...o)),r}},q3=e=>({cache:$3(e.cacheSize),parseClassName:G3(e),sortModifiers:K3(e),...N3(e)}),Y3=/\s+/,Z3=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,c=[],u=e.trim().split(Y3);let h="";for(let p=u.length-1;p>=0;p-=1){const m=u[p],{isExternal:y,modifiers:k,hasImportantModifier:w,baseClassName:x,maybePostfixModifierPosition:C}=n(m);if(y){h=m+(h.length>0?" "+h:h);continue}let S=!!C,D=r(S?x.substring(0,C):x);if(!D){if(!S){h=m+(h.length>0?" "+h:h);continue}if(D=r(x),!D){h=m+(h.length>0?" "+h:h);continue}S=!1}const L=k.length===0?"":k.length===1?k[0]:s(k).join(":"),R=w?L+Yp:L,O=R+D;if(c.indexOf(O)>-1)continue;c.push(O);const K=o(D,S);for(let W=0;W<K.length;++W){const z=K[W];c.push(R+z)}h=m+(h.length>0?" "+h:h)}return h},X3=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Ix(n))&&(o&&(o+=" "),o+=r);return o},Ix=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ix(e[r]))&&(n&&(n+=" "),n+=t);return n},Q3=(e,...t)=>{let n,r,o,s;const c=h=>{const p=t.reduce((m,y)=>y(m),e());return n=q3(p),r=n.cache.get,o=n.cache.set,s=u,u(h)},u=h=>{const p=r(h);if(p)return p;const m=Z3(h,n);return o(h,m),m};return s=c,(...h)=>s(X3(...h))},J3=[],Nt=e=>{const t=n=>n[e]||J3;return t.isThemeGetter=!0,t},Mx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Nx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ej=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,tj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nj=/\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$/,aj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ij=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xr=e=>ej.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Pr=e=>!!e&&Number.isInteger(Number(e)),tp=e=>e.endsWith("%")&&qe(e.slice(0,-1)),Fa=e=>tj.test(e),Ox=()=>!0,oj=e=>nj.test(e)&&!aj.test(e),dm=()=>!1,sj=e=>rj.test(e),lj=e=>ij.test(e),cj=e=>!ke(e)&&!be(e),uj=e=>Ur(e,Bx,dm),ke=e=>Mx.test(e),ei=e=>Ur(e,Fx,oj),x_=e=>Ur(e,vj,qe),dj=e=>Ur(e,zx,Ox),hj=e=>Ur(e,Vx,dm),P_=e=>Ur(e,jx,dm),pj=e=>Ur(e,Ux,lj),xc=e=>Ur(e,Hx,sj),be=e=>Nx.test(e),gs=e=>yi(e,Fx),fj=e=>yi(e,Vx),S_=e=>yi(e,jx),mj=e=>yi(e,Bx),gj=e=>yi(e,Ux),Pc=e=>yi(e,Hx,!0),yj=e=>yi(e,zx,!0),Ur=(e,t,n)=>{const r=Mx.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},yi=(e,t,n=!1)=>{const r=Nx.exec(e);return r?r[1]?t(r[1]):n:!1},jx=e=>e==="position"||e==="percentage",Ux=e=>e==="image"||e==="url",Bx=e=>e==="length"||e==="size"||e==="bg-size",Fx=e=>e==="length",vj=e=>e==="number",Vx=e=>e==="family-name",zx=e=>e==="number"||e==="weight",Hx=e=>e==="shadow",kj=()=>{const e=Nt("color"),t=Nt("font"),n=Nt("text"),r=Nt("font-weight"),o=Nt("tracking"),s=Nt("leading"),c=Nt("breakpoint"),u=Nt("container"),h=Nt("spacing"),p=Nt("radius"),m=Nt("shadow"),y=Nt("inset-shadow"),k=Nt("text-shadow"),w=Nt("drop-shadow"),x=Nt("blur"),C=Nt("perspective"),S=Nt("aspect"),D=Nt("ease"),L=Nt("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],K=()=>[...O(),be,ke],W=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],P=()=>[be,ke,h],Y=()=>[xr,"full","auto",...P()],X=()=>[Pr,"none","subgrid",be,ke],ue=()=>["auto",{span:["full",Pr,be,ke]},Pr,be,ke],se=()=>[Pr,"auto",be,ke],Ae=()=>["auto","min","max","fr",be,ke],pe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],fe=()=>["auto",...P()],Ne=()=>[xr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],G=()=>[xr,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Z=()=>[xr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],$=()=>[e,be,ke],M=()=>[...O(),S_,P_,{position:[be,ke]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",mj,uj,{size:[be,ke]}],Re=()=>[tp,gs,ei],Pe=()=>["","none","full",p,be,ke],Te=()=>["",qe,gs,ei],Ke=()=>["solid","dashed","dotted","double"],Qe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ue=()=>[qe,tp,S_,P_],jt=()=>["","none",x,be,ke],$n=()=>["none",qe,be,ke],Ca=()=>["none",qe,be,ke],ft=()=>[qe,be,ke],en=()=>[xr,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fa],breakpoint:[Fa],color:[Ox],container:[Fa],"drop-shadow":[Fa],ease:["in","out","in-out"],font:[cj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fa],shadow:[Fa],spacing:["px",qe],text:[Fa],"text-shadow":[Fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xr,ke,be,S]}],container:["container"],columns:[{columns:[qe,ke,be,u]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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"],sr:["sr-only","not-sr-only"],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:K()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Pr,"auto",be,ke]}],basis:[{basis:[xr,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,xr,"auto","initial","none",ke]}],grow:[{grow:["",qe,be,ke]}],shrink:[{shrink:["",qe,be,ke]}],order:[{order:[Pr,"first","last","none",be,ke]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:ue()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:ue()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...pe(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...pe()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":pe()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:fe()}],mx:[{mx:fe()}],my:[{my:fe()}],ms:[{ms:fe()}],me:[{me:fe()}],mbs:[{mbs:fe()}],mbe:[{mbe:fe()}],mt:[{mt:fe()}],mr:[{mr:fe()}],mb:[{mb:fe()}],ml:[{ml:fe()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ne()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...Z()]}],"min-block-size":[{"min-block":["auto",...Z()]}],"max-block-size":[{"max-block":["none",...Z()]}],w:[{w:[u,"screen",...Ne()]}],"min-w":[{"min-w":[u,"screen","none",...Ne()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...Ne()]}],h:[{h:["screen","lh",...Ne()]}],"min-h":[{"min-h":["screen","lh","none",...Ne()]}],"max-h":[{"max-h":["screen","lh",...Ne()]}],"font-size":[{text:["base",n,gs,ei]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,yj,dj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tp,ke]}],"font-family":[{font:[fj,hj,t]}],"font-features":[{"font-features":[ke]}],"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:[o,be,ke]}],"line-clamp":[{"line-clamp":[qe,"none",be,x_]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",be,ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ke(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",be,ei]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[qe,"auto",be,ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pr,be,ke],radial:["",be,ke],conic:[Pr,be,ke]},gj,pj]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:Re()}],"gradient-via-pos":[{via:Re()}],"gradient-to-pos":[{to:Re()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:Pe()}],"rounded-s":[{"rounded-s":Pe()}],"rounded-e":[{"rounded-e":Pe()}],"rounded-t":[{"rounded-t":Pe()}],"rounded-r":[{"rounded-r":Pe()}],"rounded-b":[{"rounded-b":Pe()}],"rounded-l":[{"rounded-l":Pe()}],"rounded-ss":[{"rounded-ss":Pe()}],"rounded-se":[{"rounded-se":Pe()}],"rounded-ee":[{"rounded-ee":Pe()}],"rounded-es":[{"rounded-es":Pe()}],"rounded-tl":[{"rounded-tl":Pe()}],"rounded-tr":[{"rounded-tr":Pe()}],"rounded-br":[{"rounded-br":Pe()}],"rounded-bl":[{"rounded-bl":Pe()}],"border-w":[{border:Te()}],"border-w-x":[{"border-x":Te()}],"border-w-y":[{"border-y":Te()}],"border-w-s":[{"border-s":Te()}],"border-w-e":[{"border-e":Te()}],"border-w-bs":[{"border-bs":Te()}],"border-w-be":[{"border-be":Te()}],"border-w-t":[{"border-t":Te()}],"border-w-r":[{"border-r":Te()}],"border-w-b":[{"border-b":Te()}],"border-w-l":[{"border-l":Te()}],"divide-x":[{"divide-x":Te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ke(),"hidden","none"]}],"divide-style":[{divide:[...Ke(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...Ke(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,be,ke]}],"outline-w":[{outline:["",qe,gs,ei]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",m,Pc,xc]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",y,Pc,xc]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[qe,ei]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":Te()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",k,Pc,xc]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[qe,be,ke]}],"mix-blend":[{"mix-blend":[...Qe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Qe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ue()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":Ue()}],"mask-image-t-to-pos":[{"mask-t-to":Ue()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":Ue()}],"mask-image-r-to-pos":[{"mask-r-to":Ue()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":Ue()}],"mask-image-b-to-pos":[{"mask-b-to":Ue()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":Ue()}],"mask-image-l-to-pos":[{"mask-l-to":Ue()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":Ue()}],"mask-image-x-to-pos":[{"mask-x-to":Ue()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":Ue()}],"mask-image-y-to-pos":[{"mask-y-to":Ue()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[be,ke]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ue()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ue()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ke]}],filter:[{filter:["","none",be,ke]}],blur:[{blur:jt()}],brightness:[{brightness:[qe,be,ke]}],contrast:[{contrast:[qe,be,ke]}],"drop-shadow":[{"drop-shadow":["","none",w,Pc,xc]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",qe,be,ke]}],"hue-rotate":[{"hue-rotate":[qe,be,ke]}],invert:[{invert:["",qe,be,ke]}],saturate:[{saturate:[qe,be,ke]}],sepia:[{sepia:["",qe,be,ke]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ke]}],"backdrop-blur":[{"backdrop-blur":jt()}],"backdrop-brightness":[{"backdrop-brightness":[qe,be,ke]}],"backdrop-contrast":[{"backdrop-contrast":[qe,be,ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,be,ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,be,ke]}],"backdrop-invert":[{"backdrop-invert":["",qe,be,ke]}],"backdrop-opacity":[{"backdrop-opacity":[qe,be,ke]}],"backdrop-saturate":[{"backdrop-saturate":[qe,be,ke]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,be,ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",be,ke]}],ease:[{ease:["linear","initial",D,be,ke]}],delay:[{delay:[qe,be,ke]}],animate:[{animate:["none",L,be,ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,be,ke]}],"perspective-origin":[{"perspective-origin":K()}],rotate:[{rotate:$n()}],"rotate-x":[{"rotate-x":$n()}],"rotate-y":[{"rotate-y":$n()}],"rotate-z":[{"rotate-z":$n()}],scale:[{scale:Ca()}],"scale-x":[{"scale-x":Ca()}],"scale-y":[{"scale-y":Ca()}],"scale-z":[{"scale-z":Ca()}],"scale-3d":["scale-3d"],skew:[{skew:ft()}],"skew-x":[{"skew-x":ft()}],"skew-y":[{"skew-y":ft()}],transform:[{transform:[be,ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:K()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:en()}],"translate-x":[{"translate-x":en()}],"translate-y":[{"translate-y":en()}],"translate-z":[{"translate-z":en()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",be,ke]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be,ke]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[qe,gs,ei,x_]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_j=Q3(kj);function Tt(...e){return _j(L3(e))}const bj=N.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[N.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1Z",fill:"#4285F4"}),N.jsx("path",{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",fill:"#34A853"}),N.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A10.96 10.96 0 0 0 1 12c0 1.77.42 3.44 1.18 4.93l3.66-2.84Z",fill:"#FBBC05"}),N.jsx("path",{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",fill:"#EA4335"})]}),wj=N.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:N.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12Z"})}),xj={google:bj,github:wj},Pj={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function Sj(e){return Pj[e]||String(e||"").replace(/-/g," ")}function Cj(){Qs();const{isOpen:e,closeLoginModal:t}=zw(),{enabled:n,signedIn:r,refreshUser:o,signInWithPassword:s,signUp:c,signInWithOAuth:u,getPublicAuthConfig:h}=Zs(),[p,m]=b.useState("signin"),[y,k]=b.useState(""),[w,x]=b.useState(""),[C,S]=b.useState(""),[D,L]=b.useState(!1),[R,O]=b.useState(null),[K,W]=b.useState(null),[z,P]=b.useState(!1),[Y,X]=b.useState(!0),[ue,se]=b.useState([]),[Ae,pe]=b.useState(8);b.useEffect(()=>{e&&(O(null),W(null),m("signin"),k(""),x(""),S(""),P(!1))},[e]),b.useEffect(()=>{if(!e||!n||ue.length>0)return;let G=!0;return X(!0),(async()=>{const{data:Z,error:$}=await h();if(G){if($||!Z)se(["google","github"]);else{const M=Array.isArray(Z.oAuthProviders)?Z.oAuthProviders:[],q=Array.isArray(Z.customOAuthProviders)?Z.customOAuthProviders:[];se([...M,...q]),typeof Z.passwordMinLength=="number"&&Z.passwordMinLength>0&&pe(Z.passwordMinLength)}X(!1)}})(),()=>{G=!1}},[e,n,h,ue.length]),b.useEffect(()=>{e&&r&&t()},[e,r,t]);const le=b.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),fe=b.useCallback(async G=>{O(null),L(!0);try{const{error:Z}=await u(G,le);Z&&O(Z.message||String(Z))}finally{L(!1)}},[u,le]),Ne=b.useCallback(async G=>{G.preventDefault(),O(null),L(!0);try{if(p==="signup"){const{data:$,error:M}=await c({email:y.trim(),password:w,name:C.trim()||void 0});if(M){O(M.message||String(M));return}if($?.requireEmailVerification){W(Fe("login.verify_email_pending")),m("signin");return}await o();return}const{error:Z}=await s({email:y.trim(),password:w});if(Z){O(Z.message||String(Z));return}await o()}finally{L(!1)}},[p,y,w,C,c,s,o]);return b.useEffect(()=>{if(!e)return;const G=Z=>{Z.key==="Escape"&&t()};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[e,t]),n?N.jsx(xO,{children:e&&N.jsxs(ep.div,{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[N.jsx(ep.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60 ",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),N.jsxs(ep.div,{className:"relative w-full max-w-[420px] rounded-2xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 p-6 shadow-2xl",initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{duration:.2},onClick:G=>G.stopPropagation(),children:[N.jsx("button",{type:"button",onClick:t,className:"absolute right-4 top-4 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:N.jsx(Bw,{className:"h-5 w-5"})}),N.jsxs("div",{className:"text-center mb-6",children:[N.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[N.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),N.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white",children:"Token Tracker"})]}),N.jsx("p",{className:"text-sm text-oai-gray-500",children:Fe("login_modal.subtitle")})]}),K&&N.jsx("div",{className:"mb-4 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900/50 px-3 py-2 text-xs text-oai-gray-700 dark:text-oai-gray-300",children:K}),R&&N.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400",role:"alert",children:R}),N.jsx("div",{className:"space-y-2.5 mb-5",children:Y?N.jsxs("div",{className:"space-y-2.5",children:[N.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),N.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):ue.map(G=>N.jsxs("button",{type:"button",disabled:D,onClick:()=>fe(G),className:Tt("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors disabled:opacity-50","flex items-center justify-center gap-2.5"),children:[xj[G]||null,Fe("login.oauth.continue",{provider:Sj(G)})]},G))}),z?N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"relative mb-5",children:[N.jsx("div",{className:"absolute inset-0 flex items-center",children:N.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),N.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:N.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login_modal.divider_email")})})]}),N.jsxs("div",{className:"flex rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 p-0.5 bg-oai-gray-50 dark:bg-oai-gray-900/50 mb-4",children:[N.jsx("button",{type:"button",className:Tt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",p==="signin"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{m("signin"),O(null)},children:Fe("login.tab.sign_in")}),N.jsx("button",{type:"button",className:Tt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",p==="signup"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{m("signup"),O(null)},children:Fe("login.tab.sign_up")})]}),N.jsxs("form",{onSubmit:Ne,className:"space-y-3",children:[p==="signup"&&N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.name")}),N.jsx("input",{id:"modal-name",type:"text",autoComplete:"name",value:C,onChange:G=>S(G.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500",placeholder:Fe("login.field.name_placeholder")})]}),N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.email")}),N.jsx("input",{id:"modal-email",type:"email",autoComplete:"email",required:!0,value:y,onChange:G=>k(G.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.password")}),N.jsx("input",{id:"modal-password",type:"password",autoComplete:p==="signup"?"new-password":"current-password",required:!0,minLength:p==="signup"?Ae:void 0,value:w,onChange:G=>x(G.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"}),p==="signup"&&N.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login.password_hint",{min:String(Ae)})})]}),N.jsx("button",{type:"submit",disabled:D,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:Fe(p==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"relative mb-5",children:[N.jsx("div",{className:"absolute inset-0 flex items-center",children:N.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),N.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:N.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login.divider")})})]}),N.jsxs("button",{type:"button",onClick:()=>P(!0),className:Tt("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors","flex items-center justify-center gap-2.5"),children:[N.jsx(lI,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),Fe("login_modal.continue_email")]})]})]})]})}):null}const Tj={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},u4="https://tokentracker.statuspage.io/";function Ej(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?Tj:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||Wa()).trim()}function d4(){return Wa()}function Aj(e=""){if(typeof e!="string"||e.length===0)return!1;const t=new URLSearchParams(e),n=String(t.get("screenshot")||"").toLowerCase();return n==="1"||n==="true"}const Rj=300*1e3,Lj=720*60*1e3;function hm(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function Dj(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+Lj<=t:!0}async function $x(e,t){const n=Wa();if(!hm(n)||!e)return;const r=n.replace(/\/$/,""),o=Ks(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};o&&(s.apikey=o);try{await fetch(`${r}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:t})})}catch{}}async function Ij(e){const t=Wa();if(!hm(t)||!e)return null;const n=t.replace(/\/$/,""),r=Ks(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};r&&(o.apikey=r);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",c=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:o,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:s})});if(!c.ok)return null;const u=await c.json().catch(()=>null),h=typeof u?.token=="string"?u.token:null,p=typeof u?.device_id=="string"?u.device_id:null;return!h||!p?null:{token:h,deviceId:p,issuedAt:typeof u?.created_at=="string"?u.created_at:new Date().toISOString()}}async function C_(e){const{deviceToken:t,insforgeBaseUrl:n}=e,r={deviceToken:t},o=n||Wa();hm(o)&&(r.insforgeBaseUrl=o.trim());const s=await Lf(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...s},body:JSON.stringify(r)}),u=await c.json().catch(()=>({}));if(!c.ok){const h=typeof u.error=="string"?u.error:`HTTP ${c.status}`;throw new Error(h)}return u}async function T_(e){const t=await e();if(!t)return null;const n=nw();if(n&&!Dj(n))return n;const r=await Ij(t);return r?($R(r),r):null}async function Wx(e){let t=await e();if(!t)return null;let n=await T_(async()=>t);if(!n)return t;try{return await C_({deviceToken:n.token,insforgeBaseUrl:Wa()}),t}catch(r){if(!nw()||(aw(),t=await e(),!t)||(n=await T_(async()=>t),!n))throw r;return await C_({deviceToken:n.token,insforgeBaseUrl:Wa()}),t}}async function Mj(e){const t=WR();if(Date.now()-t<Rj)return;const n=await Wx(e);n&&(rw(Date.now()),await $x(n,"cloud-sync-auto"))}async function h4(e){const t=await Wx(e);t&&(rw(Date.now()),await $x(t,"cloud-sync-now"))}function Nj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function Oj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||Nj(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function jj(){const e=Fn(),t=Zs(),n=b.useRef(!1);b.useEffect(()=>{if(!zR()||!Oj(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!HR())return;let r=!1;const o=window.setTimeout(()=>{(async()=>{if(!(r||n.current)){n.current=!0;try{await Mj(()=>t.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{r=!0,window.clearTimeout(o)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function Uj(){const e=b.useContext(Fw);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function Bj({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function Fj(e){if(!e||typeof e!="object")return null;const t=e.user_metadata&&typeof e.user_metadata=="object"?e.user_metadata:{},n=e.profile&&typeof e.profile=="object"?e.profile:{},r=t.avatar_url||t.picture||n.avatar_url||e.avatar_url;return typeof r=="string"&&r.trim()?r.trim():null}function Vj(e){return e?If()?`/api/avatar-proxy?url=${encodeURIComponent(e)}`:e:null}function Sc(e){const t=String(e||"").trim();if(!t)return"?";const n=t.split(/\s+/).filter(Boolean);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function E_({className:e,variant:t="header",collapsed:n=!1,onAfterAction:r}){Qs();const o=t==="sidebar",{enabled:s,loading:c,signedIn:u,user:h,displayName:p}=Zs(),{openLoginModal:m}=zw(),y=wu(),k=b.useMemo(()=>Fj(h),[h]),w=b.useMemo(()=>Vj(k),[k]),[x,C]=Ls.useState(!1);if(Ls.useEffect(()=>{C(!1)},[w]),!s)return null;if(c)return N.jsx("div",{className:Tt("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",e),"aria-hidden":!0});if(!u)return o?N.jsxs("button",{type:"button",onClick:()=>{m(),r?.()},className:Tt("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] font-medium text-oai-gray-700 dark:text-oai-gray-300 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 min-w-0",n?"h-8 w-8 justify-center px-0":"w-full",e),"aria-label":Fe("header.auth.sign_in_aria"),title:n?Fe("header.auth.sign_in_aria"):void 0,children:[N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:N.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&N.jsx("span",{className:"truncate flex-1 text-left",children:Fe("header.auth.sign_in_aria")})]}):N.jsx("button",{type:"button",onClick:m,className:Tt("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",e),"aria-label":Fe("header.auth.sign_in_aria"),children:Fe("header.auth.sign_in_aria")});const S=()=>{y("/settings"),r?.()};return N.jsx("div",{className:Tt(o?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:N.jsxs("button",{type:"button",onClick:S,className:Tt(o?Tt("flex w-full items-center gap-2 rounded-md px-2 py-1.5 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 transition-colors min-w-0",n&&"justify-center px-0 py-0 h-9 w-9"):"flex items-center gap-2 rounded-md pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":Fe("header.auth.open_settings"),title:o&&n?p:void 0,children:[o?N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:w&&!x?N.jsx("img",{src:w,alt:"",width:20,height:20,className:"h-5 w-5 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700",referrerPolicy:"no-referrer",onError:()=>C(!0)}):Sc(p)==="?"?N.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:N.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):N.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600 text-[9px] font-semibold text-white ring-1 ring-oai-brand-500/50",children:Sc(p)})}):w&&!x?N.jsx("img",{src:w,alt:"",width:32,height:32,className:"h-8 w-8 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700 shrink-0",referrerPolicy:"no-referrer",onError:()=>C(!0)}):Sc(p)==="?"?N.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:N.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):N.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600 text-xs font-semibold text-white ring-1 ring-oai-brand-500/50",children:Sc(p)}),o?!n&&N.jsx("span",{className:"truncate text-[13px] font-medium text-oai-gray-900 dark:text-oai-gray-200 flex-1 text-left min-w-0",children:p}):N.jsx("span",{className:"hidden sm:inline truncate text-sm font-medium text-oai-gray-900 dark:text-oai-gray-200 max-w-[120px]",children:p})]})})}const Zp="tt.sidebarCollapsed";function zj(){return[{id:"general",label:Fe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:eI,label:Fe("nav.usage")},{id:"limits",to:"/limits",icon:nI,label:Fe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:PI,label:Fe("nav.leaderboard")}]},{id:"tools",label:Fe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:oI,label:Fe("nav.widgets")},{id:"skills",to:"/skills",icon:mI,label:Fe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:rI,label:Fe("nav.ip_check")}]},{id:"account",label:Fe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:kI,label:Fe("nav.settings")}]}]}function Hj(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Zp)==="1"}catch{return!1}}function $j(){const[e,t]=b.useState(Hj),n=b.useCallback(()=>{t(r=>{const o=!r;try{typeof window<"u"&&window.localStorage.setItem(Zp,o?"1":"0")}catch{}return o})},[]);return b.useEffect(()=>{if(typeof window>"u")return;const r=o=>{o.key===Zp&&t(o.newValue==="1")};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)},[]),{collapsed:e,toggle:n}}function Wj(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function Gj({label:e,collapsed:t,first:n}){return t?n?null:N.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):N.jsx("div",{className:Tt("px-3 pb-1 text-[10px] uppercase tracking-wider text-oai-gray-500 dark:text-oai-gray-500",n?"pt-2":"pt-4"),children:e})}function Kj({item:e,collapsed:t,active:n,onClick:r}){const o=e.icon;return N.jsxs(Pu,{to:e.to,onClick:r,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:Tt("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] no-underline transition-colors",t&&"justify-center px-0 py-2",n?"bg-oai-gray-200/70 text-oai-black font-medium dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/50 hover:text-oai-black dark:hover:bg-oai-gray-800/60 dark:hover:text-white"),children:[N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:N.jsx(o,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&N.jsx("span",{className:"truncate",children:e.label})]})}function qj({as:e="button",title:t,onClick:n,href:r,children:o,className:s,...c}){const u=Tt("flex h-10 w-10 items-center justify-center rounded-lg text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",s);return e==="a"?N.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...c,children:o}):N.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...c,children:o})}function Yj({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,r]=b.useState(null);return b.useEffect(()=>{if(typeof window>"u")return;const o=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;Bj({prefersReducedMotion:o,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&r(s.stargazers_count)}).catch(()=>{})},[e]),N.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:Tt("inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",t?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:[N.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:N.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),N.jsx("span",{children:"Star"}),n!==null&&N.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const Zj=[{value:"light",label:"Light",Icon:Uw},{value:"dark",label:"Dark",Icon:jw},{value:"system",label:"System",Icon:hI}];function Xj({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:r=!1}){const[o,s]=b.useState(!1),c=b.useRef(null),u=t==="dark"?jw:Uw;return b.useEffect(()=>{if(!o)return;const h=m=>{c.current&&!c.current.contains(m.target)&&s(!1)},p=m=>{m.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",p)}},[o]),N.jsxs("div",{ref:c,className:"relative",children:[N.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":o,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(h=>!h),className:Tt("inline-flex h-7 w-7 items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",r?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:N.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),o&&N.jsx("div",{role:"menu",className:"absolute bottom-full left-0 mb-2 z-50 min-w-[140px] py-1 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 shadow-lg",children:Zj.map(({value:h,label:p,Icon:m})=>{const y=e===h;return N.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),s(!1)},className:Tt("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",y?"text-oai-black dark:text-white bg-oai-gray-100 dark:bg-oai-gray-800":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 hover:text-oai-black dark:hover:text-white"),children:[N.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),N.jsx("span",{children:p})]},h)})})]})}function Gx({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:r=!1,onClose:o,glassChrome:s=!1}){const u=Fn()?.pathname||"/",{theme:h,resolvedTheme:p,setTheme:m}=Uj(),{resolvedLocale:y}=Qs(),k=b.useMemo(()=>zj(),[y]);return N.jsxs(N.Fragment,{children:[N.jsx("div",{className:Tt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:r?N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx("div",{className:"flex-1 min-w-0",children:N.jsx(E_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),N.jsx("button",{type:"button",onClick:o,"aria-label":Fe("nav.close_menu"),title:Fe("nav.close_menu"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-oai-gray-500 dark:text-oai-gray-500 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-gray-900 dark:hover:text-oai-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:N.jsx(Bw,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):N.jsx(E_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),N.jsx("nav",{"aria-label":Fe("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:k.map((w,x)=>N.jsxs("div",{className:"flex flex-col",children:[N.jsx(Gj,{label:w.label,collapsed:e,first:x===0}),N.jsx("div",{className:"flex flex-col gap-0.5",children:w.items.map(C=>N.jsx(Kj,{item:C,collapsed:e,active:Wj(u,C.to),onClick:n},C.id))})]},w.id))}),N.jsxs("div",{className:Tt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[N.jsx(Xj,{theme:h,resolvedTheme:p,onSetTheme:m,glassChrome:s}),N.jsx("div",{className:"flex items-center gap-1.5",children:!e&&N.jsx(Yj,{glassChrome:s})})]})]})}function Qj({collapsed:e,onToggleCollapsed:t}){const n=b.useMemo(()=>typeof window>"u"?!1:ra()||If(),[]);return N.jsx("aside",{"aria-label":Fe("nav.aside_label"),className:Tt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:N.jsx(Gx,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function Jj({open:e,onClose:t}){return b.useEffect(()=>{if(!e)return;const n=r=>{r.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),b.useEffect(()=>{if(!e)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e]),e?N.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[N.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),N.jsx("aside",{"aria-label":Fe("nav.aside_label"),className:"relative w-[260px] max-w-[80vw] flex flex-col bg-oai-white dark:bg-oai-gray-900 border-r border-oai-gray-200 dark:border-oai-gray-800 shadow-2xl",children:N.jsx(Gx,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function eU({onOpenDrawer:e}){return N.jsxs("div",{className:"lg:hidden flex items-center justify-between gap-2 px-3 h-14 border-b border-oai-gray-200 dark:border-oai-gray-800",children:[N.jsx(qj,{title:Fe("nav.menu"),onClick:e,children:N.jsx(uI,{className:"h-5 w-5","aria-hidden":!0})}),N.jsxs(Pu,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[N.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),N.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),N.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function tU({children:e}){const{collapsed:t,toggle:n}=$j(),[r,o]=b.useState(!1),s=b.useCallback(()=>o(!0),[]),c=b.useCallback(()=>o(!1),[]),u=b.useMemo(()=>typeof window>"u"?!1:ra()||If(),[]);return N.jsxs("div",{className:Tt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",u?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[u&&N.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),N.jsxs("div",{className:"flex-1 min-h-0 flex",children:[N.jsx(Qj,{collapsed:t,onToggleCollapsed:n}),N.jsx(Jj,{open:r,onClose:c}),N.jsx("div",{className:"flex-1 min-w-0 min-h-0 p-2 lg:pl-0 lg:pr-3 lg:pb-3 flex flex-col",children:N.jsxs("div",{className:Tt("flex-1 min-h-0 flex flex-col bg-oai-white dark:bg-oai-gray-900 border border-oai-gray-200 dark:border-oai-gray-800 overflow-hidden",u?"tt-native-main-card":"rounded-2xl",!u&&"shadow-sm"),children:[N.jsx(eU,{onOpenDrawer:s}),N.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}const nU=typeof window<"u"?window.location.search:"",A_=new URLSearchParams(nU),Cc=A_.get("insforge_code")||A_.get("code")||null,aU=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function rU(){Qs();const{loading:e,signedIn:t}=Zs(),n=wu(),[r,o]=b.useState("processing"),[s,c]=b.useState(null),u=b.useRef(!1);b.useEffect(()=>{if(!(!Cc||u.current)){if(u.current=!0,aU){c(!1);return}(async()=>{try{const m=await(await fetch("/api/auth-bridge/verifier")).json();c(!!m?.native)}catch{c(!1)}})()}},[]),b.useEffect(()=>{if(s!==!0||!Cc)return;o("redirecting");const p=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(Cc)}`},200);return()=>clearTimeout(p)},[s]),b.useEffect(()=>{if(s!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const p=setTimeout(()=>{t||o("failed")},12e3);return()=>clearTimeout(p)},[s,e,t,n]),b.useEffect(()=>{if(!Cc&&s===null){const p=setTimeout(()=>o("failed"),3e3);return()=>clearTimeout(p)}},[s]);const h=()=>{n("/dashboard",{replace:!0})};return r==="processing"&&s!==!0&&(s===null||s===!1&&e)?N.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):N.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:N.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[r==="processing"&&N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),N.jsx("p",{className:"text-oai-gray-400 text-sm",children:Fe("auth.callback.processing")})]}),r==="redirecting"&&N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:N.jsx("svg",{className:"w-6 h-6 text-green-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:N.jsx("path",{d:"M20 6 9 17l-5-5"})})}),N.jsx("p",{className:"text-white text-sm font-medium",children:Fe("auth.callback.success")}),N.jsx("p",{className:"text-oai-gray-500 text-xs",children:Fe("auth.callback.redirecting")})]}),r==="failed"&&N.jsxs("div",{className:"space-y-3",children:[N.jsx("p",{className:"text-oai-gray-300 text-sm",children:Fe("auth.callback.failed")}),N.jsx("button",{type:"button",onClick:h,className:"px-4 py-2 rounded-lg bg-oai-gray-800 text-sm text-white hover:bg-oai-gray-700 transition-colors",children:Fe("auth.callback.close")})]})]})})}const iU=b.lazy(()=>Hn(()=>import("./DashboardPage--NrTtR92.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.DashboardPage}))),oU=b.lazy(()=>Hn(()=>import("./IpCheckPage-ysqVCc4x.js"),[])),sU=b.lazy(()=>Hn(()=>import("./LandingPage-DRpfXd6d.js"),__vite__mapDeps([11,12,8])).then(e=>({default:e.LandingPage}))),lU=b.lazy(()=>Hn(()=>import("./LeaderboardPage-CJYW5jW6.js"),__vite__mapDeps([13,9,2,14,15])).then(e=>({default:e.LeaderboardPage}))),cU=b.lazy(()=>Hn(()=>import("./LeaderboardProfilePage-DRkbH5aJ.js"),__vite__mapDeps([16,2,12,17,14,9,3,4,18,19,5])).then(e=>({default:e.LeaderboardProfilePage}))),uU=b.lazy(()=>Hn(()=>import("./LimitsPage-QvoeFYhb.js"),__vite__mapDeps([20,1,21,7,10,8,22,18,23])).then(e=>({default:e.LimitsPage}))),dU=b.lazy(()=>Hn(()=>import("./LoginPage-htfPy3uF.js"),[]).then(e=>({default:e.LoginPage}))),hU=b.lazy(()=>Hn(()=>import("./DevicePage-Cc51NGr0.js"),[])),pU=b.lazy(()=>Hn(()=>import("./WrappedPage-C1iQxeu8.js"),[])),fU=b.lazy(()=>Hn(()=>import("./SettingsPage-B5HoHDyp.js"),__vite__mapDeps([24,21,25,7,19,2,15,4,23])).then(e=>({default:e.SettingsPage}))),mU=b.lazy(()=>Hn(()=>import("./SkillsPage-hIECAnG_.js"),__vite__mapDeps([26,22,18,23,7,5,4,9,19,6,8,15])).then(e=>({default:e.SkillsPage}))),gU=b.lazy(()=>Hn(()=>import("./WidgetsPage-DU3_jCbJ.js"),__vite__mapDeps([27,25,7,10,8,18,23,15])).then(e=>({default:e.WidgetsPage})));function yU(){const{resolvedLocale:e}=Qs(),t=Fn(),n=Zs();jj();const r=dn(),o=b.useMemo(()=>typeof window>"u"?!1:Aj(window.location.search),[]),s=t?.pathname||"/",c=new URL(window.location.href),u=c.pathname.replace(/\/+$/,"")||"/",p=u.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,m=c.searchParams.get("token")||null,y=p||m,k=u==="/share"||u==="/share.html"||u.startsWith("/share/"),w=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),x=s.replace(/\/+$/,"")||"/",C=x==="/leaderboard",S=x.match(/^\/u\/([^/]+)$/i),D=S?S[1]:null,L=!!(n.enabled&&n.signedIn),R=w||L,O=!1,K=Ej(),W=b.useMemo(()=>!n.enabled||!L?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[L,n]);let z=w||r||o?"dashboard":"landing";x==="/landing"&&(z="landing"),x==="/dashboard"&&(z="dashboard"),C&&(z="dashboard"),D&&(z="dashboard");const P=x==="/limits",Y=x==="/settings",X=x==="/skills",ue=x==="/widgets",se=x==="/ip-check";(P||Y||X||ue||se)&&(z="dashboard");let Ae=iU;D?Ae=cU:x==="/leaderboard"?Ae=lU:P?Ae=uU:Y?Ae=fU:X?Ae=mU:ue?Ae=gU:se&&(Ae=oU);const pe=!k&&(x==="/dashboard"||x==="/"||C||P||Y||X||ue||se);let le=null;if(x==="/auth/callback"||x==="/auth/native-callback")le=N.jsx(rU,{});else if(x==="/login")le=N.jsx(dU,{});else if(x==="/device")le=N.jsx(hU,{});else if(x==="/wrapped")le=N.jsx(pU,{});else if(z==="landing")le=N.jsx(sU,{signInUrl:"/login",signUpUrl:"/login"});else{const fe=N.jsx(Ae,{baseUrl:K,auth:W,signedIn:R,sessionSoftExpired:O,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:k,publicToken:y,userId:D,signInUrl:"/login",signUpUrl:"/login"},e);pe?le=N.jsx(tU,{children:fe}):le=fe}return N.jsx(TI,{children:N.jsx(RI,{children:N.jsxs(LI,{children:[N.jsx(b.Suspense,{fallback:null,children:le}),N.jsx(Cj,{}),N.jsx(ND,{}),N.jsx(GD,{})]})})})}const vU=Z1([{path:"*",element:N.jsx(yU,{})}]);US.createRoot(document.getElementById("root")).render(N.jsx(Ls.StrictMode,{children:N.jsx(fD,{children:N.jsx(bD,{children:N.jsx(NL,{children:N.jsx(cT,{router:vU})})})})}));export{Ar as $,mw as A,Fe as B,N as C,ep as D,Nc as E,FU as F,BU as G,Os as H,CI as I,fu as J,JU as K,Pu as L,sm as M,RU as N,AU as O,xO as P,Uj as Q,Ls as R,Tt as S,zw as T,Zs as U,OU as V,$U as W,Bw as X,Qs as Y,Aj as Z,Hn as _,Kt as a,ZU as a0,VU as a1,eL as a2,LU as a3,DU as a4,XU as a5,UU as a6,NU as a7,E_ as a8,u4 as a9,Pw as aA,Sw as aB,Cw as aC,yI as aD,_D as aE,Ef as aF,Lf as aG,s4 as aH,ra as aI,If as aJ,i4 as aK,l4 as aL,o4 as aM,Cs as aN,W0 as aO,oN as aP,zp as aQ,qU as aR,YU as aS,KU as aT,Wa as aU,IS as aV,Xp as aW,lT as aa,Fn as ab,wu as ac,d4 as ad,HR as ae,CU as af,h4 as ag,TU as ah,GU as ai,PI as aj,Bj as ak,kI as al,a4 as am,kU as an,FR as ao,Nf as ap,zR as aq,Yv as ar,WU as as,Uw as at,jw as au,hI as av,jU as aw,go as ax,iu as ay,xw as az,Hw as b,hn as c,Nr as d,vk as e,dt as f,gw as g,dn as h,T2 as i,EU as j,qR as k,r4 as l,vo as m,cL as n,uL as o,e4 as p,MU as q,b as r,HU as s,t4 as t,Of as u,n4 as v,IU as w,yt as x,zU as y,QU as z};
|
|
854
|
+
`),()=>{u.current?.removeAttribute("data-motion-pop-id"),K.contains(O)&&K.removeChild(O)}},[t]),N.jsx(kO,{isPresent:t,childRef:u,sizeRef:h,pop:s,children:s===!1?e:b.cloneElement(e,{ref:y})})}const bO=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:c,anchorX:u,anchorY:h,root:p})=>{const m=Of(wO),y=b.useId();let k=!0,w=b.useMemo(()=>(k=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:x=>{m.set(x,!0);for(const C of m.values())if(!C)return;r&&r()},register:x=>(m.set(x,!1),()=>m.delete(x))}),[n,m,r]);return s&&k&&(w={...w}),b.useMemo(()=>{m.forEach((x,C)=>m.set(C,!1))},[n]),b.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),e=N.jsx(_O,{pop:c==="popLayout",isPresent:n,anchorX:u,anchorY:h,root:p,children:e}),N.jsx(Lu.Provider,{value:w,children:e})};function wO(){return new Map}function gx(e=!0){const t=b.useContext(Lu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=b.useId();b.useEffect(()=>{if(e)return o(s)},[e]);const c=b.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,c]:[!0]}const _c=e=>e.key||"";function o_(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const xO=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:c=!1,anchorX:u="left",anchorY:h="top",root:p})=>{const[m,y]=gx(c),k=b.useMemo(()=>o_(e),[e]),w=c&&!m?[]:k.map(_c),x=b.useRef(!0),C=b.useRef(k),S=Of(()=>new Map),D=b.useRef(new Set),[L,R]=b.useState(k),[O,K]=b.useState(k);Hw(()=>{x.current=!1,C.current=k;for(let P=0;P<O.length;P++){const Y=_c(O[P]);w.includes(Y)?(S.delete(Y),D.current.delete(Y)):S.get(Y)!==!0&&S.set(Y,!1)}},[O,w.length,w.join("-")]);const W=[];if(k!==L){let P=[...k];for(let Y=0;Y<O.length;Y++){const X=O[Y],ue=_c(X);w.includes(ue)||(P.splice(Y,0,X),W.push(X))}return s==="wait"&&W.length&&(P=W),K(o_(P)),R(k),null}const{forceRender:z}=b.useContext(Nf);return N.jsx(N.Fragment,{children:O.map(P=>{const Y=_c(P),X=c&&!m?!1:k===O||w.includes(Y),ue=()=>{if(D.current.has(Y))return;if(S.has(Y))D.current.add(Y),S.set(Y,!0);else return;let se=!0;S.forEach(Ae=>{Ae||(se=!1)}),se&&(z?.(),K(C.current),c&&y?.(),r&&r())};return N.jsx(bO,{isPresent:X,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:p,onExitComplete:X?void 0:ue,anchorX:u,anchorY:h,children:P},Y)})})},yx=b.createContext({strict:!1}),s_={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"]};let l_=!1;function PO(){if(l_)return;const e={};for(const t in s_)e[t]={isEnabled:n=>s_[t].some(r=>!!n[r])};G0(e),l_=!0}function vx(){return PO(),sN()}function SO(e){const t=vx();for(const n in e)t[n]={...t[n],...e[n]};G0(t)}const CO=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","propagate","ignoreStrict","viewport"]);function vu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||CO.has(e)}let kx=e=>!vu(e);function TO(e){typeof e=="function"&&(kx=t=>t.startsWith("on")?!vu(t):e(t))}try{TO(require("@emotion/is-prop-valid").default)}catch{}function EO(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||Kt(e[o])||(kx(o)||n===!0&&vu(o)||!t&&!vu(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Nu=b.createContext({});function AO(e,t){if(Mu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fs(n)?n:void 0,animate:Fs(r)?r:void 0}}return e.inherit!==!1?t:{}}function RO(e){const{initial:t,animate:n}=AO(e,b.useContext(Nu));return b.useMemo(()=>({initial:t,animate:n}),[c_(t),c_(n)])}function c_(e){return Array.isArray(e)?e.join(" "):e}const lm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _x(e,t,n){for(const r in t)!Kt(t[r])&&!J0(r,n)&&(e[r]=t[r])}function LO({transformTemplate:e},t){return b.useMemo(()=>{const n=lm();return im(n,t,e),Object.assign({},n.vars,n.style)},[t])}function DO(e,t){const n=e.style||{},r={};return _x(r,n,e),Object.assign(r,LO(e,t)),r}function IO(e,t){const n={},r=DO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const bx=()=>({...lm(),attrs:{}});function MO(e,t,n,r){const o=b.useMemo(()=>{const s=bx();return ex(s,t,nx(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};_x(s,e.style,e),o.style={...s,...o.style}}return o}const NO=["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 cm(e){return typeof e!="string"||e.includes("-")?!1:!!(NO.indexOf(e)>-1||/[A-Z]/u.test(e))}function OO(e,t,n,{latestValues:r},o,s=!1,c){const h=(c??cm(e)?MO:IO)(t,r,o,e),p=EO(t,typeof e=="string",s),m=e!==b.Fragment?{...p,...h,ref:n}:{},{children:y}=t,k=b.useMemo(()=>Kt(y)?y.get():y,[y]);return b.createElement(e,{...m,children:k})}function jO({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:UO(n,r,o,e),renderState:t()}}function UO(e,t,n,r){const o={},s=r(e,{});for(const k in s)o[k]=$c(s[k]);let{initial:c,animate:u}=e;const h=Mu(e),p=$0(e);t&&p&&!h&&e.inherit!==!1&&(c===void 0&&(c=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const y=m?u:c;if(y&&typeof y!="boolean"&&!Iu(y)){const k=Array.isArray(y)?y:[y];for(let w=0;w<k.length;w++){const x=Xf(e,k[w]);if(x){const{transitionEnd:C,transition:S,...D}=x;for(const L in D){let R=D[L];if(Array.isArray(R)){const O=m?R.length-1:0;R=R[O]}R!==null&&(o[L]=R)}for(const L in C)o[L]=C[L]}}}return o}const wx=e=>(t,n)=>{const r=b.useContext(Nu),o=b.useContext(Lu),s=()=>jO(e,t,r,o);return n?s():Of(s)},BO=wx({scrapeMotionValuesFromProps:om,createRenderState:lm}),FO=wx({scrapeMotionValuesFromProps:ax,createRenderState:bx}),VO=Symbol.for("motionComponentSymbol");function zO(e,t,n){const r=b.useRef(n);b.useInsertionEffect(()=>{r.current=n});const o=b.useRef(null);return b.useCallback(s=>{s&&e.onMount?.(s);const c=r.current;if(typeof c=="function")if(s){const u=c(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):c(s);else c&&(c.current=s);t&&(s?t.mount(s):t.unmount())},[t])}const xx=b.createContext({});function no(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function HO(e,t,n,r,o,s){const{visualElement:c}=b.useContext(Nu),u=b.useContext(yx),h=b.useContext(Lu),p=b.useContext(sm),m=p.reducedMotion,y=p.skipAnimations,k=b.useRef(null),w=b.useRef(!1);r=r||u.renderer,!k.current&&r&&(k.current=r(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:s}),w.current&&k.current&&(k.current.manuallyAnimateOnMount=!0));const x=k.current,C=b.useContext(xx);x&&!x.projection&&o&&(x.type==="html"||x.type==="svg")&&$O(k.current,n,o,C);const S=b.useRef(!1);b.useInsertionEffect(()=>{x&&S.current&&x.update(n,h)});const D=n[L0],L=b.useRef(!!D&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(D)&&window.MotionHasOptimisedAnimation?.(D));return Hw(()=>{w.current=!0,x&&(S.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),L.current&&x.animationState&&x.animationState.animateChanges())}),b.useEffect(()=>{x&&(!L.current&&x.animationState&&x.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(D)}),L.current=!1),x.enteringChildren=void 0)}),x}function $O(e,t,n,r){const{layoutId:o,layout:s,drag:c,dragConstraints:u,layoutScroll:h,layoutRoot:p,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Px(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!c||u&&no(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:y,layoutScroll:h,layoutRoot:p,layoutAnchor:m})}function Px(e){if(e)return e.options.allowProjection!==!1?e.projection:Px(e.parent)}function Yh(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&SO(r);const s=n?n==="svg":cm(e),c=s?FO:BO;function u(p,m){let y;const k={...b.useContext(sm),...p,layoutId:WO(p)},{isStatic:w}=k,x=RO(p),C=c(p,w);if(!w&&typeof window<"u"){GO();const S=KO(k);y=S.MeasureLayout,x.visualElement=HO(e,C,k,o,S.ProjectionNode,s)}return N.jsxs(Nu.Provider,{value:x,children:[y&&x.visualElement?N.jsx(y,{visualElement:x.visualElement,...k}):null,OO(e,p,zO(C,x.visualElement,m),C,w,t,s)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=b.forwardRef(u);return h[VO]=e,h}function WO({layoutId:e}){const t=b.useContext(Nf).id;return t&&e!==void 0?t+"-"+e:e}function GO(e,t){b.useContext(yx).strict}function KO(e){const t=vx(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function qO(e,t){if(typeof Proxy>"u")return Yh;const n=new Map,r=(s,c)=>Yh(s,c,e,t),o=(s,c)=>r(s,c);return new Proxy(o,{get:(s,c)=>c==="create"?r:(n.has(c)||n.set(c,Yh(c,void 0,e,t)),n.get(c))})}const YO=(e,t)=>t.isSVG??cm(e)?new PN(t):new vN(t,{allowProjection:e!==b.Fragment});class ZO extends jr{constructor(t){super(t),t.animationState||(t.animationState=AN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Iu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let XO=0;class QO extends jr{constructor(){super(...arguments),this.id=XO++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:s,custom:c}=this.node.getProps();if(typeof s=="string"){const u=si(this.node,s,c);if(u){const{transition:h,transitionEnd:p,...m}=u;for(const y in m)this.node.getValue(y)?.jump(m[y])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const JO={animation:{Feature:ZO},exit:{Feature:QO}};function nl(e){return{point:{x:e.pageX,y:e.pageY}}}const e3=e=>t=>tm(t)&&e(t,nl(t));function Rs(e,t,n,r){return Vs(e,t,e3(n),r)}const Sx=({current:e})=>e?e.ownerDocument.defaultView:null,u_=(e,t)=>Math.abs(e-t);function t3(e,t){const n=u_(e.x,t.x),r=u_(e.y,t.y);return Math.sqrt(n**2+r**2)}const d_=new Set(["auto","scroll"]);class Cx{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:c=3,element:u}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=bc(this.lastRawMoveEventInfo,this.transformPagePoint));const w=Zh(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,C=t3(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!C)return;const{point:S}=w,{timestamp:D}=Gt;this.history.push({...S,timestamp:D});const{onStart:L,onMove:R}=this.handlers;x||(L&&L(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,w)},this.handlePointerMove=(w,x)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=bc(x,this.transformPagePoint),dt.update(this.updatePoint,!0)},this.handlePointerUp=(w,x)=>{this.end();const{onEnd:C,onSessionEnd:S,resumeAnimation:D}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&D&&D(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const L=Zh(w.type==="pointercancel"?this.lastMoveEventInfo:bc(x,this.transformPagePoint),this.history);this.startEvent&&C&&C(w,L),S&&S(w,L)},!tm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=o||window;const h=nl(t),p=bc(h,this.transformPagePoint),{point:m}=p,{timestamp:y}=Gt;this.history=[{...m,timestamp:y}];const{onSessionStart:k}=n;k&&k(t,Zh(p,this.history)),this.removeListeners=Js(Rs(this.contextWindow,"pointermove",this.handlePointerMove),Rs(this.contextWindow,"pointerup",this.handlePointerUp),Rs(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(d_.has(r.overflowX)||d_.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),dt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Nr(this.updatePoint)}}function bc(e,t){return t?{point:t(e.point)}:e}function h_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zh({point:e},t){return{point:e,delta:h_(e,Tx(t)),offset:h_(e,n3(t)),velocity:a3(t,.1)}}function n3(e){return e[0]}function Tx(e){return e[e.length-1]}function a3(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Tx(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Sn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>Sn(t)*2&&(r=e[1]);const s=On(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const c={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function r3(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?vt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?vt(n,e,r.max):Math.min(e,n)),e}function p_(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function i3(e,{top:t,left:n,bottom:r,right:o}){return{x:p_(e.x,n,o),y:p_(e.y,t,r)}}function f_(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function o3(e,t){return{x:f_(e.x,t.x),y:f_(e.y,t.y)}}function s3(e,t){let n=.5;const r=ln(e),o=ln(t);return o>r?n=Us(t.min,t.max-r,e.min):r>o&&(n=Us(e.min,e.max-o,t.min)),xa(0,1,n)}function l3(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Kp=.35;function c3(e=Kp){return e===!1?e=0:e===!0&&(e=Kp),{x:m_(e,"left","right"),y:m_(e,"top","bottom")}}function m_(e,t,n){return{min:g_(e,t),max:g_(e,n)}}function g_(e,t){return typeof e=="number"?e:e[t]||0}const u3=new WeakMap;class d3{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=Ot(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=y=>{n&&this.snapToCursor(nl(y).point),this.stopAnimation()},c=(y,k)=>{const{drag:w,dragPropagation:x,onDragStart:C}=this.getProps();if(w&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jM(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=k,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fa(D=>{let L=this.getAxisMotionValue(D).get()||0;if(va.test(L)){const{projection:R}=this.visualElement;if(R&&R.layout){const O=R.layout.layoutBox[D];O&&(L=ln(O)*(parseFloat(L)/100))}}this.originPoint[D]=L}),C&&dt.update(()=>C(y,k),!1,!0),Up(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},u=(y,k)=>{this.latestPointerEvent=y,this.latestPanInfo=k;const{dragPropagation:w,dragDirectionLock:x,onDirectionLock:C,onDrag:S}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:D}=k;if(x&&this.currentDirection===null){this.currentDirection=p3(D),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",k.point,D),this.updateAxis("y",k.point,D),this.visualElement.render(),S&&dt.update(()=>S(y,k),!1,!0)},h=(y,k)=>{this.latestPointerEvent=y,this.latestPanInfo=k,this.stop(y,k),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new Cx(t,{onSessionStart:s,onStart:c,onMove:u,onSessionEnd:h,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:Sx(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:u}=this.getProps();u&&dt.postRender(()=>u(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!wc(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=r3(c,this.constraints[t],this.elastic[t])),s.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&no(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=i3(r.layoutBox,t):this.constraints=!1,this.elastic=c3(n),o!==this.constraints&&!no(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&fa(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=l3(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!no(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=hN(r,o.root,this.visualElement.getTransformPagePoint());let c=o3(o.layout.layoutBox,s);if(n){const u=n(cN(c));this.hasMutatedConstraints=!!u,u&&(c=q0(u))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:c,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},p=fa(m=>{if(!wc(m,n,this.currentDirection))return;let y=h&&h[m]||{};(c===!0||c===m)&&(y={min:0,max:0});const k=o?200:1e6,w=o?40:1e7,x={type:"inertia",velocity:r?t[m]:0,bounceStiffness:k,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...s,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(p).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Up(this.visualElement,t),r.start(Zf(t,r,0,n,this.visualElement,!1))}stopAnimation(){fa(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){fa(n=>{const{drag:r}=this.getProps();if(!wc(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:u}=o.layout.layoutBox[n],h=s.get()||0;s.set(t[n]-vt(c,u,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!no(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};fa(c=>{const u=this.getAxisMotionValue(c);if(u&&this.constraints!==!1){const h=u.get();o[c]=s3({min:h,max:h},this.constraints[c])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),fa(c=>{if(!wc(c,t,null))return;const u=this.getAxisMotionValue(c),{min:h,max:p}=this.constraints[c];u.set(vt(h,p,o[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;u3.set(this.visualElement,this);const t=this.visualElement.current,n=Rs(t,"pointerdown",p=>{const{drag:m,dragListener:y=!0}=this.getProps(),k=p.target,w=k!==t&&HM(k);m&&y&&!w&&this.start(p)});let r;const o=()=>{const{dragConstraints:p}=this.getProps();no(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),r||(r=h3(t,p.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,c=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),dt.read(o);const u=Vs(window,"resize",()=>this.scalePositionWithinConstraints()),h=s.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:m})=>{this.isDragging&&m&&(fa(y=>{const k=this.getAxisMotionValue(y);k&&(this.originPoint[y]+=p[y].translate,k.set(k.get()+p[y].translate))}),this.visualElement.render())}));return()=>{u(),n(),c(),h&&h(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:c=Kp,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:c,dragMomentum:u}}}function y_(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function h3(e,t,n){const r=Pk(e,y_(n)),o=Pk(t,y_(n));return()=>{r(),o()}}function wc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function p3(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class f3 extends jr{constructor(t){super(t),this.removeGroupControls=jn,this.removeListeners=jn,this.controls=new d3(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||jn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Xh=e=>(t,n)=>{e&&dt.update(()=>e(t,n),!1,!0)};class m3 extends jr{constructor(){super(...arguments),this.removePointerDownListener=jn}onPointerDown(t){this.session=new Cx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Xh(t),onStart:Xh(n),onMove:Xh(r),onEnd:(s,c)=>{delete this.session,o&&dt.postRender(()=>o(s,c))}}}mount(){this.removePointerDownListener=Rs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Qh=!1;class g3 extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),Qh&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Wc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:c}=r;return c&&(c.isPresent=s,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),Qh=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?c.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?c.promote():c.relegate()||dt.postRender(()=>{const u=c.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),em.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Qh=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ex(e){const[t,n]=gx(),r=b.useContext(Nf);return N.jsx(g3,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(xx),isPresent:t,safeToRemove:n})}const y3={pan:{Feature:m3},drag:{Feature:f3,ProjectionNode:mx,MeasureLayout:Ex}};function v_(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&dt.postRender(()=>s(t,nl(t)))}class v3 extends jr{mount(){const{current:t}=this.node;t&&(this.unmount=BM(t,(n,r)=>(v_(this.node,r,"Start"),o=>v_(this.node,o,"End"))))}unmount(){}}class k3 extends jr{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=Js(Vs(this.node.current,"focus",()=>this.onFocus()),Vs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function k_(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&dt.postRender(()=>s(t,nl(t)))}class _3 extends jr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=WM(t,(o,s)=>(k_(this.node,s,"Start"),(c,{success:u})=>k_(this.node,c,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const qp=new WeakMap,Jh=new WeakMap,b3=e=>{const t=qp.get(e.target);t&&t(e)},w3=e=>{e.forEach(b3)};function x3({root:e,...t}){const n=e||document;Jh.has(n)||Jh.set(n,{});const r=Jh.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(w3,{root:e,...t})),r[o]}function P3(e,t,n){const r=x3(t);return qp.set(e,n),r.observe(e),()=>{qp.delete(e),r.unobserve(e)}}const S3={some:0,all:1};class C3 extends jr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,c={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:S3[o]},u=h=>{const{isIntersecting:p}=h;if(this.isInView===p||(this.isInView=p,s&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),k=p?m:y;k&&k(h)};this.stopObserver=P3(this.node.current,c,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(T3(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function T3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const E3={inView:{Feature:C3},tap:{Feature:_3},focus:{Feature:k3},hover:{Feature:v3}},A3={layout:{ProjectionNode:mx,MeasureLayout:Ex}},R3={...JO,...E3,...y3,...A3},ep=qO(R3,YO);function Ax(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ax(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function L3(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ax(e))&&(r&&(r+=" "),r+=t);return r}const D3=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},I3=(e,t)=>({classGroupId:e,validator:t}),Rx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ku="-",__=[],M3="arbitrary..",N3=e=>{const t=j3(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return O3(c);const u=c.split(ku),h=u[0]===""&&u.length>1?1:0;return Lx(u,h,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const h=r[c],p=n[c];return h?p?D3(p,h):h:p||__}return n[c]||__}}},Lx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const p=Lx(e,t+1,s);if(p)return p}const c=n.validators;if(c===null)return;const u=t===0?e.join(ku):e.slice(t).join(ku),h=c.length;for(let p=0;p<h;p++){const m=c[p];if(m.validator(u))return m.classGroupId}},O3=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?M3+r:void 0})(),j3=e=>{const{theme:t,classGroups:n}=e;return U3(n,t)},U3=(e,t)=>{const n=Rx();for(const r in e){const o=e[r];um(o,n,r,t)}return n},um=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const c=e[s];B3(c,t,n,r)}},B3=(e,t,n,r)=>{if(typeof e=="string"){F3(e,t,n);return}if(typeof e=="function"){V3(e,t,n,r);return}z3(e,t,n,r)},F3=(e,t,n)=>{const r=e===""?t:Dx(t,e);r.classGroupId=n},V3=(e,t,n,r)=>{if(H3(e)){um(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(I3(n,e))},z3=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let c=0;c<s;c++){const[u,h]=o[c];um(h,Dx(t,u),n,r)}},Dx=(e,t)=>{let n=e;const r=t.split(ku),o=r.length;for(let s=0;s<o;s++){const c=r[s];let u=n.nextPart.get(c);u||(u=Rx(),n.nextPart.set(c,u)),n=u}return n},H3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,$3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,c)=>{n[s]=c,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let c=n[s];if(c!==void 0)return c;if((c=r[s])!==void 0)return o(s,c),c},set(s,c){s in n?n[s]=c:o(s,c)}}},Yp="!",b_=":",W3=[],w_=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),G3=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let c=0,u=0,h=0,p;const m=o.length;for(let C=0;C<m;C++){const S=o[C];if(c===0&&u===0){if(S===b_){s.push(o.slice(h,C)),h=C+1;continue}if(S==="/"){p=C;continue}}S==="["?c++:S==="]"?c--:S==="("?u++:S===")"&&u--}const y=s.length===0?o:o.slice(h);let k=y,w=!1;y.endsWith(Yp)?(k=y.slice(0,-1),w=!0):y.startsWith(Yp)&&(k=y.slice(1),w=!0);const x=p&&p>h?p-h:void 0;return w_(s,w,k,x)};if(t){const o=t+b_,s=r;r=c=>c.startsWith(o)?s(c.slice(o.length)):w_(W3,!1,c,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},K3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const c=n[s],u=c[0]==="[",h=t.has(c);u||h?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(c)):o.push(c)}return o.length>0&&(o.sort(),r.push(...o)),r}},q3=e=>({cache:$3(e.cacheSize),parseClassName:G3(e),sortModifiers:K3(e),...N3(e)}),Y3=/\s+/,Z3=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,c=[],u=e.trim().split(Y3);let h="";for(let p=u.length-1;p>=0;p-=1){const m=u[p],{isExternal:y,modifiers:k,hasImportantModifier:w,baseClassName:x,maybePostfixModifierPosition:C}=n(m);if(y){h=m+(h.length>0?" "+h:h);continue}let S=!!C,D=r(S?x.substring(0,C):x);if(!D){if(!S){h=m+(h.length>0?" "+h:h);continue}if(D=r(x),!D){h=m+(h.length>0?" "+h:h);continue}S=!1}const L=k.length===0?"":k.length===1?k[0]:s(k).join(":"),R=w?L+Yp:L,O=R+D;if(c.indexOf(O)>-1)continue;c.push(O);const K=o(D,S);for(let W=0;W<K.length;++W){const z=K[W];c.push(R+z)}h=m+(h.length>0?" "+h:h)}return h},X3=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Ix(n))&&(o&&(o+=" "),o+=r);return o},Ix=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ix(e[r]))&&(n&&(n+=" "),n+=t);return n},Q3=(e,...t)=>{let n,r,o,s;const c=h=>{const p=t.reduce((m,y)=>y(m),e());return n=q3(p),r=n.cache.get,o=n.cache.set,s=u,u(h)},u=h=>{const p=r(h);if(p)return p;const m=Z3(h,n);return o(h,m),m};return s=c,(...h)=>s(X3(...h))},J3=[],Nt=e=>{const t=n=>n[e]||J3;return t.isThemeGetter=!0,t},Mx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Nx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ej=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,tj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nj=/\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$/,aj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ij=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xr=e=>ej.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Pr=e=>!!e&&Number.isInteger(Number(e)),tp=e=>e.endsWith("%")&&qe(e.slice(0,-1)),Fa=e=>tj.test(e),Ox=()=>!0,oj=e=>nj.test(e)&&!aj.test(e),dm=()=>!1,sj=e=>rj.test(e),lj=e=>ij.test(e),cj=e=>!ke(e)&&!be(e),uj=e=>Ur(e,Bx,dm),ke=e=>Mx.test(e),ei=e=>Ur(e,Fx,oj),x_=e=>Ur(e,vj,qe),dj=e=>Ur(e,zx,Ox),hj=e=>Ur(e,Vx,dm),P_=e=>Ur(e,jx,dm),pj=e=>Ur(e,Ux,lj),xc=e=>Ur(e,Hx,sj),be=e=>Nx.test(e),gs=e=>yi(e,Fx),fj=e=>yi(e,Vx),S_=e=>yi(e,jx),mj=e=>yi(e,Bx),gj=e=>yi(e,Ux),Pc=e=>yi(e,Hx,!0),yj=e=>yi(e,zx,!0),Ur=(e,t,n)=>{const r=Mx.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},yi=(e,t,n=!1)=>{const r=Nx.exec(e);return r?r[1]?t(r[1]):n:!1},jx=e=>e==="position"||e==="percentage",Ux=e=>e==="image"||e==="url",Bx=e=>e==="length"||e==="size"||e==="bg-size",Fx=e=>e==="length",vj=e=>e==="number",Vx=e=>e==="family-name",zx=e=>e==="number"||e==="weight",Hx=e=>e==="shadow",kj=()=>{const e=Nt("color"),t=Nt("font"),n=Nt("text"),r=Nt("font-weight"),o=Nt("tracking"),s=Nt("leading"),c=Nt("breakpoint"),u=Nt("container"),h=Nt("spacing"),p=Nt("radius"),m=Nt("shadow"),y=Nt("inset-shadow"),k=Nt("text-shadow"),w=Nt("drop-shadow"),x=Nt("blur"),C=Nt("perspective"),S=Nt("aspect"),D=Nt("ease"),L=Nt("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],K=()=>[...O(),be,ke],W=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],P=()=>[be,ke,h],Y=()=>[xr,"full","auto",...P()],X=()=>[Pr,"none","subgrid",be,ke],ue=()=>["auto",{span:["full",Pr,be,ke]},Pr,be,ke],se=()=>[Pr,"auto",be,ke],Ae=()=>["auto","min","max","fr",be,ke],pe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],fe=()=>["auto",...P()],Ne=()=>[xr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],G=()=>[xr,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Z=()=>[xr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],$=()=>[e,be,ke],M=()=>[...O(),S_,P_,{position:[be,ke]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",mj,uj,{size:[be,ke]}],Re=()=>[tp,gs,ei],Pe=()=>["","none","full",p,be,ke],Te=()=>["",qe,gs,ei],Ke=()=>["solid","dashed","dotted","double"],Qe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ue=()=>[qe,tp,S_,P_],jt=()=>["","none",x,be,ke],$n=()=>["none",qe,be,ke],Ca=()=>["none",qe,be,ke],ft=()=>[qe,be,ke],en=()=>[xr,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fa],breakpoint:[Fa],color:[Ox],container:[Fa],"drop-shadow":[Fa],ease:["in","out","in-out"],font:[cj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fa],shadow:[Fa],spacing:["px",qe],text:[Fa],"text-shadow":[Fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xr,ke,be,S]}],container:["container"],columns:[{columns:[qe,ke,be,u]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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"],sr:["sr-only","not-sr-only"],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:K()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Pr,"auto",be,ke]}],basis:[{basis:[xr,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,xr,"auto","initial","none",ke]}],grow:[{grow:["",qe,be,ke]}],shrink:[{shrink:["",qe,be,ke]}],order:[{order:[Pr,"first","last","none",be,ke]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:ue()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:ue()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...pe(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...pe()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":pe()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:fe()}],mx:[{mx:fe()}],my:[{my:fe()}],ms:[{ms:fe()}],me:[{me:fe()}],mbs:[{mbs:fe()}],mbe:[{mbe:fe()}],mt:[{mt:fe()}],mr:[{mr:fe()}],mb:[{mb:fe()}],ml:[{ml:fe()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ne()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...Z()]}],"min-block-size":[{"min-block":["auto",...Z()]}],"max-block-size":[{"max-block":["none",...Z()]}],w:[{w:[u,"screen",...Ne()]}],"min-w":[{"min-w":[u,"screen","none",...Ne()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...Ne()]}],h:[{h:["screen","lh",...Ne()]}],"min-h":[{"min-h":["screen","lh","none",...Ne()]}],"max-h":[{"max-h":["screen","lh",...Ne()]}],"font-size":[{text:["base",n,gs,ei]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,yj,dj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tp,ke]}],"font-family":[{font:[fj,hj,t]}],"font-features":[{"font-features":[ke]}],"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:[o,be,ke]}],"line-clamp":[{"line-clamp":[qe,"none",be,x_]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",be,ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ke(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",be,ei]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[qe,"auto",be,ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pr,be,ke],radial:["",be,ke],conic:[Pr,be,ke]},gj,pj]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:Re()}],"gradient-via-pos":[{via:Re()}],"gradient-to-pos":[{to:Re()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:Pe()}],"rounded-s":[{"rounded-s":Pe()}],"rounded-e":[{"rounded-e":Pe()}],"rounded-t":[{"rounded-t":Pe()}],"rounded-r":[{"rounded-r":Pe()}],"rounded-b":[{"rounded-b":Pe()}],"rounded-l":[{"rounded-l":Pe()}],"rounded-ss":[{"rounded-ss":Pe()}],"rounded-se":[{"rounded-se":Pe()}],"rounded-ee":[{"rounded-ee":Pe()}],"rounded-es":[{"rounded-es":Pe()}],"rounded-tl":[{"rounded-tl":Pe()}],"rounded-tr":[{"rounded-tr":Pe()}],"rounded-br":[{"rounded-br":Pe()}],"rounded-bl":[{"rounded-bl":Pe()}],"border-w":[{border:Te()}],"border-w-x":[{"border-x":Te()}],"border-w-y":[{"border-y":Te()}],"border-w-s":[{"border-s":Te()}],"border-w-e":[{"border-e":Te()}],"border-w-bs":[{"border-bs":Te()}],"border-w-be":[{"border-be":Te()}],"border-w-t":[{"border-t":Te()}],"border-w-r":[{"border-r":Te()}],"border-w-b":[{"border-b":Te()}],"border-w-l":[{"border-l":Te()}],"divide-x":[{"divide-x":Te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ke(),"hidden","none"]}],"divide-style":[{divide:[...Ke(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...Ke(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,be,ke]}],"outline-w":[{outline:["",qe,gs,ei]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",m,Pc,xc]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",y,Pc,xc]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[qe,ei]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":Te()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",k,Pc,xc]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[qe,be,ke]}],"mix-blend":[{"mix-blend":[...Qe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Qe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ue()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":Ue()}],"mask-image-t-to-pos":[{"mask-t-to":Ue()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":Ue()}],"mask-image-r-to-pos":[{"mask-r-to":Ue()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":Ue()}],"mask-image-b-to-pos":[{"mask-b-to":Ue()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":Ue()}],"mask-image-l-to-pos":[{"mask-l-to":Ue()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":Ue()}],"mask-image-x-to-pos":[{"mask-x-to":Ue()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":Ue()}],"mask-image-y-to-pos":[{"mask-y-to":Ue()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[be,ke]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ue()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ue()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ke]}],filter:[{filter:["","none",be,ke]}],blur:[{blur:jt()}],brightness:[{brightness:[qe,be,ke]}],contrast:[{contrast:[qe,be,ke]}],"drop-shadow":[{"drop-shadow":["","none",w,Pc,xc]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",qe,be,ke]}],"hue-rotate":[{"hue-rotate":[qe,be,ke]}],invert:[{invert:["",qe,be,ke]}],saturate:[{saturate:[qe,be,ke]}],sepia:[{sepia:["",qe,be,ke]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ke]}],"backdrop-blur":[{"backdrop-blur":jt()}],"backdrop-brightness":[{"backdrop-brightness":[qe,be,ke]}],"backdrop-contrast":[{"backdrop-contrast":[qe,be,ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,be,ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,be,ke]}],"backdrop-invert":[{"backdrop-invert":["",qe,be,ke]}],"backdrop-opacity":[{"backdrop-opacity":[qe,be,ke]}],"backdrop-saturate":[{"backdrop-saturate":[qe,be,ke]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,be,ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",be,ke]}],ease:[{ease:["linear","initial",D,be,ke]}],delay:[{delay:[qe,be,ke]}],animate:[{animate:["none",L,be,ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,be,ke]}],"perspective-origin":[{"perspective-origin":K()}],rotate:[{rotate:$n()}],"rotate-x":[{"rotate-x":$n()}],"rotate-y":[{"rotate-y":$n()}],"rotate-z":[{"rotate-z":$n()}],scale:[{scale:Ca()}],"scale-x":[{"scale-x":Ca()}],"scale-y":[{"scale-y":Ca()}],"scale-z":[{"scale-z":Ca()}],"scale-3d":["scale-3d"],skew:[{skew:ft()}],"skew-x":[{"skew-x":ft()}],"skew-y":[{"skew-y":ft()}],transform:[{transform:[be,ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:K()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:en()}],"translate-x":[{"translate-x":en()}],"translate-y":[{"translate-y":en()}],"translate-z":[{"translate-z":en()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",be,ke]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be,ke]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[qe,gs,ei,x_]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_j=Q3(kj);function Tt(...e){return _j(L3(e))}const bj=N.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[N.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1Z",fill:"#4285F4"}),N.jsx("path",{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",fill:"#34A853"}),N.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A10.96 10.96 0 0 0 1 12c0 1.77.42 3.44 1.18 4.93l3.66-2.84Z",fill:"#FBBC05"}),N.jsx("path",{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",fill:"#EA4335"})]}),wj=N.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:N.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12Z"})}),xj={google:bj,github:wj},Pj={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function Sj(e){return Pj[e]||String(e||"").replace(/-/g," ")}function Cj(){Qs();const{isOpen:e,closeLoginModal:t}=zw(),{enabled:n,signedIn:r,refreshUser:o,signInWithPassword:s,signUp:c,signInWithOAuth:u,getPublicAuthConfig:h}=Zs(),[p,m]=b.useState("signin"),[y,k]=b.useState(""),[w,x]=b.useState(""),[C,S]=b.useState(""),[D,L]=b.useState(!1),[R,O]=b.useState(null),[K,W]=b.useState(null),[z,P]=b.useState(!1),[Y,X]=b.useState(!0),[ue,se]=b.useState([]),[Ae,pe]=b.useState(8);b.useEffect(()=>{e&&(O(null),W(null),m("signin"),k(""),x(""),S(""),P(!1))},[e]),b.useEffect(()=>{if(!e||!n||ue.length>0)return;let G=!0;return X(!0),(async()=>{const{data:Z,error:$}=await h();if(G){if($||!Z)se(["google","github"]);else{const M=Array.isArray(Z.oAuthProviders)?Z.oAuthProviders:[],q=Array.isArray(Z.customOAuthProviders)?Z.customOAuthProviders:[];se([...M,...q]),typeof Z.passwordMinLength=="number"&&Z.passwordMinLength>0&&pe(Z.passwordMinLength)}X(!1)}})(),()=>{G=!1}},[e,n,h,ue.length]),b.useEffect(()=>{e&&r&&t()},[e,r,t]);const le=b.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),fe=b.useCallback(async G=>{O(null),L(!0);try{const{error:Z}=await u(G,le);Z&&O(Z.message||String(Z))}finally{L(!1)}},[u,le]),Ne=b.useCallback(async G=>{G.preventDefault(),O(null),L(!0);try{if(p==="signup"){const{data:$,error:M}=await c({email:y.trim(),password:w,name:C.trim()||void 0});if(M){O(M.message||String(M));return}if($?.requireEmailVerification){W(Fe("login.verify_email_pending")),m("signin");return}await o();return}const{error:Z}=await s({email:y.trim(),password:w});if(Z){O(Z.message||String(Z));return}await o()}finally{L(!1)}},[p,y,w,C,c,s,o]);return b.useEffect(()=>{if(!e)return;const G=Z=>{Z.key==="Escape"&&t()};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[e,t]),n?N.jsx(xO,{children:e&&N.jsxs(ep.div,{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[N.jsx(ep.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60 ",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),N.jsxs(ep.div,{className:"relative w-full max-w-[420px] rounded-2xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 p-6 shadow-2xl",initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{duration:.2},onClick:G=>G.stopPropagation(),children:[N.jsx("button",{type:"button",onClick:t,className:"absolute right-4 top-4 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:N.jsx(Bw,{className:"h-5 w-5"})}),N.jsxs("div",{className:"text-center mb-6",children:[N.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[N.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),N.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white",children:"Token Tracker"})]}),N.jsx("p",{className:"text-sm text-oai-gray-500",children:Fe("login_modal.subtitle")})]}),K&&N.jsx("div",{className:"mb-4 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900/50 px-3 py-2 text-xs text-oai-gray-700 dark:text-oai-gray-300",children:K}),R&&N.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400",role:"alert",children:R}),N.jsx("div",{className:"space-y-2.5 mb-5",children:Y?N.jsxs("div",{className:"space-y-2.5",children:[N.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),N.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):ue.map(G=>N.jsxs("button",{type:"button",disabled:D,onClick:()=>fe(G),className:Tt("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors disabled:opacity-50","flex items-center justify-center gap-2.5"),children:[xj[G]||null,Fe("login.oauth.continue",{provider:Sj(G)})]},G))}),z?N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"relative mb-5",children:[N.jsx("div",{className:"absolute inset-0 flex items-center",children:N.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),N.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:N.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login_modal.divider_email")})})]}),N.jsxs("div",{className:"flex rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 p-0.5 bg-oai-gray-50 dark:bg-oai-gray-900/50 mb-4",children:[N.jsx("button",{type:"button",className:Tt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",p==="signin"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{m("signin"),O(null)},children:Fe("login.tab.sign_in")}),N.jsx("button",{type:"button",className:Tt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",p==="signup"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{m("signup"),O(null)},children:Fe("login.tab.sign_up")})]}),N.jsxs("form",{onSubmit:Ne,className:"space-y-3",children:[p==="signup"&&N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.name")}),N.jsx("input",{id:"modal-name",type:"text",autoComplete:"name",value:C,onChange:G=>S(G.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500",placeholder:Fe("login.field.name_placeholder")})]}),N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.email")}),N.jsx("input",{id:"modal-email",type:"email",autoComplete:"email",required:!0,value:y,onChange:G=>k(G.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.password")}),N.jsx("input",{id:"modal-password",type:"password",autoComplete:p==="signup"?"new-password":"current-password",required:!0,minLength:p==="signup"?Ae:void 0,value:w,onChange:G=>x(G.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"}),p==="signup"&&N.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login.password_hint",{min:String(Ae)})})]}),N.jsx("button",{type:"submit",disabled:D,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:Fe(p==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"relative mb-5",children:[N.jsx("div",{className:"absolute inset-0 flex items-center",children:N.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),N.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:N.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login.divider")})})]}),N.jsxs("button",{type:"button",onClick:()=>P(!0),className:Tt("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors","flex items-center justify-center gap-2.5"),children:[N.jsx(lI,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),Fe("login_modal.continue_email")]})]})]})]})}):null}const Tj={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},u4="https://tokentracker.statuspage.io/";function Ej(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?Tj:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||Wa()).trim()}function d4(){return Wa()}function Aj(e=""){if(typeof e!="string"||e.length===0)return!1;const t=new URLSearchParams(e),n=String(t.get("screenshot")||"").toLowerCase();return n==="1"||n==="true"}const Rj=300*1e3,Lj=720*60*1e3;function hm(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function Dj(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+Lj<=t:!0}async function $x(e,t){const n=Wa();if(!hm(n)||!e)return;const r=n.replace(/\/$/,""),o=Ks(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};o&&(s.apikey=o);try{await fetch(`${r}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:t})})}catch{}}async function Ij(e){const t=Wa();if(!hm(t)||!e)return null;const n=t.replace(/\/$/,""),r=Ks(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};r&&(o.apikey=r);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",c=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:o,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:s})});if(!c.ok)return null;const u=await c.json().catch(()=>null),h=typeof u?.token=="string"?u.token:null,p=typeof u?.device_id=="string"?u.device_id:null;return!h||!p?null:{token:h,deviceId:p,issuedAt:typeof u?.created_at=="string"?u.created_at:new Date().toISOString()}}async function C_(e){const{deviceToken:t,insforgeBaseUrl:n}=e,r={deviceToken:t},o=n||Wa();hm(o)&&(r.insforgeBaseUrl=o.trim());const s=await Lf(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...s},body:JSON.stringify(r)}),u=await c.json().catch(()=>({}));if(!c.ok){const h=typeof u.error=="string"?u.error:`HTTP ${c.status}`;throw new Error(h)}return u}async function T_(e){const t=await e();if(!t)return null;const n=nw();if(n&&!Dj(n))return n;const r=await Ij(t);return r?($R(r),r):null}async function Wx(e){let t=await e();if(!t)return null;let n=await T_(async()=>t);if(!n)return t;try{return await C_({deviceToken:n.token,insforgeBaseUrl:Wa()}),t}catch(r){if(!nw()||(aw(),t=await e(),!t)||(n=await T_(async()=>t),!n))throw r;return await C_({deviceToken:n.token,insforgeBaseUrl:Wa()}),t}}async function Mj(e){const t=WR();if(Date.now()-t<Rj)return;const n=await Wx(e);n&&(rw(Date.now()),await $x(n,"cloud-sync-auto"))}async function h4(e){const t=await Wx(e);t&&(rw(Date.now()),await $x(t,"cloud-sync-now"))}function Nj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function Oj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||Nj(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function jj(){const e=Fn(),t=Zs(),n=b.useRef(!1);b.useEffect(()=>{if(!zR()||!Oj(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!HR())return;let r=!1;const o=window.setTimeout(()=>{(async()=>{if(!(r||n.current)){n.current=!0;try{await Mj(()=>t.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{r=!0,window.clearTimeout(o)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function Uj(){const e=b.useContext(Fw);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function Bj({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function Fj(e){if(!e||typeof e!="object")return null;const t=e.user_metadata&&typeof e.user_metadata=="object"?e.user_metadata:{},n=e.profile&&typeof e.profile=="object"?e.profile:{},r=t.avatar_url||t.picture||n.avatar_url||e.avatar_url;return typeof r=="string"&&r.trim()?r.trim():null}function Vj(e){return e?If()?`/api/avatar-proxy?url=${encodeURIComponent(e)}`:e:null}function Sc(e){const t=String(e||"").trim();if(!t)return"?";const n=t.split(/\s+/).filter(Boolean);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function E_({className:e,variant:t="header",collapsed:n=!1,onAfterAction:r}){Qs();const o=t==="sidebar",{enabled:s,loading:c,signedIn:u,user:h,displayName:p}=Zs(),{openLoginModal:m}=zw(),y=wu(),k=b.useMemo(()=>Fj(h),[h]),w=b.useMemo(()=>Vj(k),[k]),[x,C]=Ls.useState(!1);if(Ls.useEffect(()=>{C(!1)},[w]),!s)return null;if(c)return N.jsx("div",{className:Tt("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",e),"aria-hidden":!0});if(!u)return o?N.jsxs("button",{type:"button",onClick:()=>{m(),r?.()},className:Tt("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] font-medium text-oai-gray-700 dark:text-oai-gray-300 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 min-w-0",n?"h-8 w-8 justify-center px-0":"w-full",e),"aria-label":Fe("header.auth.sign_in_aria"),title:n?Fe("header.auth.sign_in_aria"):void 0,children:[N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:N.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&N.jsx("span",{className:"truncate flex-1 text-left",children:Fe("header.auth.sign_in_aria")})]}):N.jsx("button",{type:"button",onClick:m,className:Tt("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",e),"aria-label":Fe("header.auth.sign_in_aria"),children:Fe("header.auth.sign_in_aria")});const S=()=>{y("/settings"),r?.()};return N.jsx("div",{className:Tt(o?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:N.jsxs("button",{type:"button",onClick:S,className:Tt(o?Tt("flex w-full items-center gap-2 rounded-md px-2 py-1.5 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 transition-colors min-w-0",n&&"justify-center px-0 py-0 h-9 w-9"):"flex items-center gap-2 rounded-md pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":Fe("header.auth.open_settings"),title:o&&n?p:void 0,children:[o?N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:w&&!x?N.jsx("img",{src:w,alt:"",width:20,height:20,className:"h-5 w-5 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700",referrerPolicy:"no-referrer",onError:()=>C(!0)}):Sc(p)==="?"?N.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:N.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):N.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600 text-[9px] font-semibold text-white ring-1 ring-oai-brand-500/50",children:Sc(p)})}):w&&!x?N.jsx("img",{src:w,alt:"",width:32,height:32,className:"h-8 w-8 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700 shrink-0",referrerPolicy:"no-referrer",onError:()=>C(!0)}):Sc(p)==="?"?N.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:N.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):N.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600 text-xs font-semibold text-white ring-1 ring-oai-brand-500/50",children:Sc(p)}),o?!n&&N.jsx("span",{className:"truncate text-[13px] font-medium text-oai-gray-900 dark:text-oai-gray-200 flex-1 text-left min-w-0",children:p}):N.jsx("span",{className:"hidden sm:inline truncate text-sm font-medium text-oai-gray-900 dark:text-oai-gray-200 max-w-[120px]",children:p})]})})}const Zp="tt.sidebarCollapsed";function zj(){return[{id:"general",label:Fe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:eI,label:Fe("nav.usage")},{id:"limits",to:"/limits",icon:nI,label:Fe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:PI,label:Fe("nav.leaderboard")}]},{id:"tools",label:Fe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:oI,label:Fe("nav.widgets")},{id:"skills",to:"/skills",icon:mI,label:Fe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:rI,label:Fe("nav.ip_check")}]},{id:"account",label:Fe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:kI,label:Fe("nav.settings")}]}]}function Hj(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Zp)==="1"}catch{return!1}}function $j(){const[e,t]=b.useState(Hj),n=b.useCallback(()=>{t(r=>{const o=!r;try{typeof window<"u"&&window.localStorage.setItem(Zp,o?"1":"0")}catch{}return o})},[]);return b.useEffect(()=>{if(typeof window>"u")return;const r=o=>{o.key===Zp&&t(o.newValue==="1")};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)},[]),{collapsed:e,toggle:n}}function Wj(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function Gj({label:e,collapsed:t,first:n}){return t?n?null:N.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):N.jsx("div",{className:Tt("px-3 pb-1 text-[10px] uppercase tracking-wider text-oai-gray-500 dark:text-oai-gray-500",n?"pt-2":"pt-4"),children:e})}function Kj({item:e,collapsed:t,active:n,onClick:r}){const o=e.icon;return N.jsxs(Pu,{to:e.to,onClick:r,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:Tt("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] no-underline transition-colors",t&&"justify-center px-0 py-2",n?"bg-oai-gray-200/70 text-oai-black font-medium dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/50 hover:text-oai-black dark:hover:bg-oai-gray-800/60 dark:hover:text-white"),children:[N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:N.jsx(o,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&N.jsx("span",{className:"truncate",children:e.label})]})}function qj({as:e="button",title:t,onClick:n,href:r,children:o,className:s,...c}){const u=Tt("flex h-10 w-10 items-center justify-center rounded-lg text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",s);return e==="a"?N.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...c,children:o}):N.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...c,children:o})}function Yj({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,r]=b.useState(null);return b.useEffect(()=>{if(typeof window>"u")return;const o=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;Bj({prefersReducedMotion:o,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&r(s.stargazers_count)}).catch(()=>{})},[e]),N.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:Tt("inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",t?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:[N.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:N.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),N.jsx("span",{children:"Star"}),n!==null&&N.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const Zj=[{value:"light",label:"Light",Icon:Uw},{value:"dark",label:"Dark",Icon:jw},{value:"system",label:"System",Icon:hI}];function Xj({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:r=!1}){const[o,s]=b.useState(!1),c=b.useRef(null),u=t==="dark"?jw:Uw;return b.useEffect(()=>{if(!o)return;const h=m=>{c.current&&!c.current.contains(m.target)&&s(!1)},p=m=>{m.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",p)}},[o]),N.jsxs("div",{ref:c,className:"relative",children:[N.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":o,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(h=>!h),className:Tt("inline-flex h-7 w-7 items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",r?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:N.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),o&&N.jsx("div",{role:"menu",className:"absolute bottom-full left-0 mb-2 z-50 min-w-[140px] py-1 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 shadow-lg",children:Zj.map(({value:h,label:p,Icon:m})=>{const y=e===h;return N.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),s(!1)},className:Tt("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",y?"text-oai-black dark:text-white bg-oai-gray-100 dark:bg-oai-gray-800":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 hover:text-oai-black dark:hover:text-white"),children:[N.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),N.jsx("span",{children:p})]},h)})})]})}function Gx({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:r=!1,onClose:o,glassChrome:s=!1}){const u=Fn()?.pathname||"/",{theme:h,resolvedTheme:p,setTheme:m}=Uj(),{resolvedLocale:y}=Qs(),k=b.useMemo(()=>zj(),[y]);return N.jsxs(N.Fragment,{children:[N.jsx("div",{className:Tt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:r?N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx("div",{className:"flex-1 min-w-0",children:N.jsx(E_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),N.jsx("button",{type:"button",onClick:o,"aria-label":Fe("nav.close_menu"),title:Fe("nav.close_menu"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-oai-gray-500 dark:text-oai-gray-500 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-gray-900 dark:hover:text-oai-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:N.jsx(Bw,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):N.jsx(E_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),N.jsx("nav",{"aria-label":Fe("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:k.map((w,x)=>N.jsxs("div",{className:"flex flex-col",children:[N.jsx(Gj,{label:w.label,collapsed:e,first:x===0}),N.jsx("div",{className:"flex flex-col gap-0.5",children:w.items.map(C=>N.jsx(Kj,{item:C,collapsed:e,active:Wj(u,C.to),onClick:n},C.id))})]},w.id))}),N.jsxs("div",{className:Tt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[N.jsx(Xj,{theme:h,resolvedTheme:p,onSetTheme:m,glassChrome:s}),N.jsx("div",{className:"flex items-center gap-1.5",children:!e&&N.jsx(Yj,{glassChrome:s})})]})]})}function Qj({collapsed:e,onToggleCollapsed:t}){const n=b.useMemo(()=>typeof window>"u"?!1:ra()||If(),[]);return N.jsx("aside",{"aria-label":Fe("nav.aside_label"),className:Tt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:N.jsx(Gx,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function Jj({open:e,onClose:t}){return b.useEffect(()=>{if(!e)return;const n=r=>{r.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),b.useEffect(()=>{if(!e)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e]),e?N.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[N.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),N.jsx("aside",{"aria-label":Fe("nav.aside_label"),className:"relative w-[260px] max-w-[80vw] flex flex-col bg-oai-white dark:bg-oai-gray-900 border-r border-oai-gray-200 dark:border-oai-gray-800 shadow-2xl",children:N.jsx(Gx,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function eU({onOpenDrawer:e}){return N.jsxs("div",{className:"lg:hidden flex items-center justify-between gap-2 px-3 h-14 border-b border-oai-gray-200 dark:border-oai-gray-800",children:[N.jsx(qj,{title:Fe("nav.menu"),onClick:e,children:N.jsx(uI,{className:"h-5 w-5","aria-hidden":!0})}),N.jsxs(Pu,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[N.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),N.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),N.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function tU({children:e}){const{collapsed:t,toggle:n}=$j(),[r,o]=b.useState(!1),s=b.useCallback(()=>o(!0),[]),c=b.useCallback(()=>o(!1),[]),u=b.useMemo(()=>typeof window>"u"?!1:ra()||If(),[]);return N.jsxs("div",{className:Tt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",u?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[u&&N.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),N.jsxs("div",{className:"flex-1 min-h-0 flex",children:[N.jsx(Qj,{collapsed:t,onToggleCollapsed:n}),N.jsx(Jj,{open:r,onClose:c}),N.jsx("div",{className:"flex-1 min-w-0 min-h-0 p-2 lg:pl-0 lg:pr-3 lg:pb-3 flex flex-col",children:N.jsxs("div",{className:Tt("flex-1 min-h-0 flex flex-col bg-oai-white dark:bg-oai-gray-900 border border-oai-gray-200 dark:border-oai-gray-800 overflow-hidden",u?"tt-native-main-card":"rounded-2xl",!u&&"shadow-sm"),children:[N.jsx(eU,{onOpenDrawer:s}),N.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}const nU=typeof window<"u"?window.location.search:"",A_=new URLSearchParams(nU),Cc=A_.get("insforge_code")||A_.get("code")||null,aU=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function rU(){Qs();const{loading:e,signedIn:t}=Zs(),n=wu(),[r,o]=b.useState("processing"),[s,c]=b.useState(null),u=b.useRef(!1);b.useEffect(()=>{if(!(!Cc||u.current)){if(u.current=!0,aU){c(!1);return}(async()=>{try{const m=await(await fetch("/api/auth-bridge/verifier")).json();c(!!m?.native)}catch{c(!1)}})()}},[]),b.useEffect(()=>{if(s!==!0||!Cc)return;o("redirecting");const p=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(Cc)}`},200);return()=>clearTimeout(p)},[s]),b.useEffect(()=>{if(s!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const p=setTimeout(()=>{t||o("failed")},12e3);return()=>clearTimeout(p)},[s,e,t,n]),b.useEffect(()=>{if(!Cc&&s===null){const p=setTimeout(()=>o("failed"),3e3);return()=>clearTimeout(p)}},[s]);const h=()=>{n("/dashboard",{replace:!0})};return r==="processing"&&s!==!0&&(s===null||s===!1&&e)?N.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):N.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:N.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[r==="processing"&&N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),N.jsx("p",{className:"text-oai-gray-400 text-sm",children:Fe("auth.callback.processing")})]}),r==="redirecting"&&N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:N.jsx("svg",{className:"w-6 h-6 text-green-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:N.jsx("path",{d:"M20 6 9 17l-5-5"})})}),N.jsx("p",{className:"text-white text-sm font-medium",children:Fe("auth.callback.success")}),N.jsx("p",{className:"text-oai-gray-500 text-xs",children:Fe("auth.callback.redirecting")})]}),r==="failed"&&N.jsxs("div",{className:"space-y-3",children:[N.jsx("p",{className:"text-oai-gray-300 text-sm",children:Fe("auth.callback.failed")}),N.jsx("button",{type:"button",onClick:h,className:"px-4 py-2 rounded-lg bg-oai-gray-800 text-sm text-white hover:bg-oai-gray-700 transition-colors",children:Fe("auth.callback.close")})]})]})})}const iU=b.lazy(()=>Hn(()=>import("./DashboardPage-CB6VzM2W.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.DashboardPage}))),oU=b.lazy(()=>Hn(()=>import("./IpCheckPage-CJxv_Sd8.js"),[])),sU=b.lazy(()=>Hn(()=>import("./LandingPage-CIOqWNDm.js"),__vite__mapDeps([11,12,8])).then(e=>({default:e.LandingPage}))),lU=b.lazy(()=>Hn(()=>import("./LeaderboardPage-CgtoFmMi.js"),__vite__mapDeps([13,9,2,14,15])).then(e=>({default:e.LeaderboardPage}))),cU=b.lazy(()=>Hn(()=>import("./LeaderboardProfilePage-C7OaZcf2.js"),__vite__mapDeps([16,2,12,17,14,9,3,4,18,19,5])).then(e=>({default:e.LeaderboardProfilePage}))),uU=b.lazy(()=>Hn(()=>import("./LimitsPage-pyyJbh3F.js"),__vite__mapDeps([20,1,21,7,10,8,22,18,23])).then(e=>({default:e.LimitsPage}))),dU=b.lazy(()=>Hn(()=>import("./LoginPage-CDLz8PnP.js"),[]).then(e=>({default:e.LoginPage}))),hU=b.lazy(()=>Hn(()=>import("./DevicePage-CvrCNfjD.js"),[])),pU=b.lazy(()=>Hn(()=>import("./WrappedPage-Cp8uyLbu.js"),[])),fU=b.lazy(()=>Hn(()=>import("./SettingsPage-KVjKUepK.js"),__vite__mapDeps([24,21,25,7,19,2,15,4,23])).then(e=>({default:e.SettingsPage}))),mU=b.lazy(()=>Hn(()=>import("./SkillsPage-DyIY1U9O.js"),__vite__mapDeps([26,22,18,23,7,5,4,9,19,6,8,15])).then(e=>({default:e.SkillsPage}))),gU=b.lazy(()=>Hn(()=>import("./WidgetsPage-BU7ejAYd.js"),__vite__mapDeps([27,25,7,10,8,18,23,15])).then(e=>({default:e.WidgetsPage})));function yU(){const{resolvedLocale:e}=Qs(),t=Fn(),n=Zs();jj();const r=dn(),o=b.useMemo(()=>typeof window>"u"?!1:Aj(window.location.search),[]),s=t?.pathname||"/",c=new URL(window.location.href),u=c.pathname.replace(/\/+$/,"")||"/",p=u.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,m=c.searchParams.get("token")||null,y=p||m,k=u==="/share"||u==="/share.html"||u.startsWith("/share/"),w=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),x=s.replace(/\/+$/,"")||"/",C=x==="/leaderboard",S=x.match(/^\/u\/([^/]+)$/i),D=S?S[1]:null,L=!!(n.enabled&&n.signedIn),R=w||L,O=!1,K=Ej(),W=b.useMemo(()=>!n.enabled||!L?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[L,n]);let z=w||r||o?"dashboard":"landing";x==="/landing"&&(z="landing"),x==="/dashboard"&&(z="dashboard"),C&&(z="dashboard"),D&&(z="dashboard");const P=x==="/limits",Y=x==="/settings",X=x==="/skills",ue=x==="/widgets",se=x==="/ip-check";(P||Y||X||ue||se)&&(z="dashboard");let Ae=iU;D?Ae=cU:x==="/leaderboard"?Ae=lU:P?Ae=uU:Y?Ae=fU:X?Ae=mU:ue?Ae=gU:se&&(Ae=oU);const pe=!k&&(x==="/dashboard"||x==="/"||C||P||Y||X||ue||se);let le=null;if(x==="/auth/callback"||x==="/auth/native-callback")le=N.jsx(rU,{});else if(x==="/login")le=N.jsx(dU,{});else if(x==="/device")le=N.jsx(hU,{});else if(x==="/wrapped")le=N.jsx(pU,{});else if(z==="landing")le=N.jsx(sU,{signInUrl:"/login",signUpUrl:"/login"});else{const fe=N.jsx(Ae,{baseUrl:K,auth:W,signedIn:R,sessionSoftExpired:O,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:k,publicToken:y,userId:D,signInUrl:"/login",signUpUrl:"/login"},e);pe?le=N.jsx(tU,{children:fe}):le=fe}return N.jsx(TI,{children:N.jsx(RI,{children:N.jsxs(LI,{children:[N.jsx(b.Suspense,{fallback:null,children:le}),N.jsx(Cj,{}),N.jsx(ND,{}),N.jsx(GD,{})]})})})}const vU=Z1([{path:"*",element:N.jsx(yU,{})}]);US.createRoot(document.getElementById("root")).render(N.jsx(Ls.StrictMode,{children:N.jsx(fD,{children:N.jsx(bD,{children:N.jsx(NL,{children:N.jsx(cT,{router:vU})})})})}));export{Ar as $,mw as A,Fe as B,N as C,ep as D,Nc as E,FU as F,BU as G,Os as H,CI as I,fu as J,JU as K,Pu as L,sm as M,RU as N,AU as O,xO as P,Uj as Q,Ls as R,Tt as S,zw as T,Zs as U,OU as V,$U as W,Bw as X,Qs as Y,Aj as Z,Hn as _,Kt as a,ZU as a0,VU as a1,eL as a2,LU as a3,DU as a4,XU as a5,UU as a6,NU as a7,E_ as a8,u4 as a9,Pw as aA,Sw as aB,Cw as aC,yI as aD,_D as aE,Ef as aF,Lf as aG,s4 as aH,ra as aI,If as aJ,i4 as aK,l4 as aL,o4 as aM,Cs as aN,W0 as aO,oN as aP,zp as aQ,qU as aR,YU as aS,KU as aT,Wa as aU,IS as aV,Xp as aW,lT as aa,Fn as ab,wu as ac,d4 as ad,HR as ae,CU as af,h4 as ag,TU as ah,GU as ai,PI as aj,Bj as ak,kI as al,a4 as am,kU as an,FR as ao,Nf as ap,zR as aq,Yv as ar,WU as as,Uw as at,jw as au,hI as av,jU as aw,go as ax,iu as ay,xw as az,Hw as b,hn as c,Nr as d,vk as e,dt as f,gw as g,dn as h,T2 as i,EU as j,qR as k,r4 as l,vo as m,cL as n,uL as o,e4 as p,MU as q,b as r,HU as s,t4 as t,Of as u,n4 as v,IU as w,yt as x,zU as y,QU as z};
|