@ipv9/tokentracker-cli 0.39.16 → 0.39.17

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.
Files changed (39) hide show
  1. package/dashboard/dist/assets/{ActivityHeatmap-DwQ-OP7J.js → ActivityHeatmap-A0XD9pjK.js} +1 -1
  2. package/dashboard/dist/assets/{Card-BrOb3544.js → Card-BjWLZNNc.js} +1 -1
  3. package/dashboard/dist/assets/DashboardPage-DWBqSObe.js +19 -0
  4. package/dashboard/dist/assets/{DevicePage-CLHb8o6u.js → DevicePage-DR-6hUT5.js} +1 -1
  5. package/dashboard/dist/assets/{DialogTitle-B48zG3uA.js → DialogTitle-DsZwhCyU.js} +1 -1
  6. package/dashboard/dist/assets/{FadeIn-B6J8BLcy.js → FadeIn-C8tqua7r.js} +1 -1
  7. package/dashboard/dist/assets/{InsforgeUserHeaderControls-C7ghtLDr.js → InsforgeUserHeaderControls-D49IOK-Q.js} +1 -1
  8. package/dashboard/dist/assets/{IpCheckPage-Cb8Qy06W.js → IpCheckPage-CiOG0q8b.js} +1 -1
  9. package/dashboard/dist/assets/{LandingPage-C2pfu66z.js → LandingPage-cN4IqFF_.js} +1 -1
  10. package/dashboard/dist/assets/{LeaderboardAvatar-fE89SxVd.js → LeaderboardAvatar-CrDe4gkL.js} +1 -1
  11. package/dashboard/dist/assets/{LeaderboardPage-UVovfRN_.js → LeaderboardPage-DjQR8Fa-.js} +3 -3
  12. package/dashboard/dist/assets/{LeaderboardProfileModal-DBTG14Fl.js → LeaderboardProfileModal-BwaorCPO.js} +1 -1
  13. package/dashboard/dist/assets/{LeaderboardProfilePage-CLguRtzc.js → LeaderboardProfilePage-BsE2gp5R.js} +1 -1
  14. package/dashboard/dist/assets/{LimitsPage-C8TUI9WR.js → LimitsPage-pAu3DHwj.js} +1 -1
  15. package/dashboard/dist/assets/{LocalOnlyNotice-CzVfS8tw.js → LocalOnlyNotice-Cs9RgKMS.js} +1 -1
  16. package/dashboard/dist/assets/{LoginPage-DokQyzBF.js → LoginPage-DVX_NT_Q.js} +1 -1
  17. package/dashboard/dist/assets/{PopoverPopup-9WKcCnpF.js → PopoverPopup-DC0KzMrq.js} +1 -1
  18. package/dashboard/dist/assets/{Select-C8o3hvi0.js → Select-BdPsa5Uo.js} +1 -1
  19. package/dashboard/dist/assets/{SelectItemText-BMpIn2eD.js → SelectItemText-B0Csoh76.js} +1 -1
  20. package/dashboard/dist/assets/{SettingsPage-CNp2lKqF.js → SettingsPage-DrprCoQ1.js} +1 -1
  21. package/dashboard/dist/assets/{SkillsPage-tqrRcb24.js → SkillsPage-j5yFYxaw.js} +1 -1
  22. package/dashboard/dist/assets/{WidgetsPage-C1sAmvzO.js → WidgetsPage-Bcwh0w7U.js} +1 -1
  23. package/dashboard/dist/assets/{WrappedPage-DeMlihPZ.js → WrappedPage-dup_KGKH.js} +1 -1
  24. package/dashboard/dist/assets/{arrow-up-right-DEJhxqbg.js → arrow-up-right-D8oNhRVG.js} +1 -1
  25. package/dashboard/dist/assets/{download-CeVsBbcm.js → download-DSeYwQoM.js} +1 -1
  26. package/dashboard/dist/assets/{info-arT-8O9y.js → info-Cbo3VUff.js} +1 -1
  27. package/dashboard/dist/assets/{main-Csvs3Xm5.css → main-B79BaSpV.css} +1 -1
  28. package/dashboard/dist/assets/{main-gAde5MZw.js → main-DiMPY2kR.js} +2 -2
  29. package/dashboard/dist/assets/{use-limits-display-prefs-DxNT8sq-.js → use-limits-display-prefs-DK5R0f34.js} +1 -1
  30. package/dashboard/dist/assets/{use-native-settings-Cc91lmWV.js → use-native-settings-DmQb1Be8.js} +1 -1
  31. package/dashboard/dist/assets/{use-spring-NLyv6Of-.js → use-spring-BV4Z3YeB.js} +1 -1
  32. package/dashboard/dist/assets/{use-usage-limits-BOHV0vRJ.js → use-usage-limits-YCqBaGeV.js} +1 -1
  33. package/dashboard/dist/assets/{useCurrency-C6dNJgaL.js → useCurrency-BpHMgM0X.js} +1 -1
  34. package/dashboard/dist/assets/{useOpenInteractionType-D5vD91Sd.js → useOpenInteractionType-CZToOIvX.js} +1 -1
  35. package/dashboard/dist/index.html +2 -2
  36. package/dashboard/dist/share.html +2 -2
  37. package/package.json +1 -1
  38. package/src/lib/pricing/seed-snapshot.json +1 -1
  39. package/dashboard/dist/assets/DashboardPage-BddfbhCM.js +0 -19
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LimitsPage-C8TUI9WR.js","assets/use-usage-limits-BOHV0vRJ.js","assets/use-limits-display-prefs-DxNT8sq-.js","assets/Card-BrOb3544.js","assets/FadeIn-B6J8BLcy.js","assets/LocalOnlyNotice-CzVfS8tw.js","assets/arrow-up-right-DEJhxqbg.js","assets/download-CeVsBbcm.js","assets/LeaderboardPage-UVovfRN_.js","assets/Select-C8o3hvi0.js","assets/SelectItemText-BMpIn2eD.js","assets/useOpenInteractionType-D5vD91Sd.js","assets/useCurrency-C6dNJgaL.js","assets/LeaderboardAvatar-fE89SxVd.js","assets/DashboardPage-BddfbhCM.js","assets/ActivityHeatmap-DwQ-OP7J.js","assets/info-arT-8O9y.js","assets/DialogTitle-B48zG3uA.js","assets/use-spring-NLyv6Of-.js","assets/PopoverPopup-9WKcCnpF.js","assets/LandingPage-C2pfu66z.js","assets/InsforgeUserHeaderControls-C7ghtLDr.js","assets/LeaderboardProfilePage-CLguRtzc.js","assets/LeaderboardProfileModal-DBTG14Fl.js","assets/SettingsPage-CNp2lKqF.js","assets/use-native-settings-Cc91lmWV.js","assets/SkillsPage-tqrRcb24.js","assets/WidgetsPage-C1sAmvzO.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LimitsPage-pAu3DHwj.js","assets/use-usage-limits-YCqBaGeV.js","assets/use-limits-display-prefs-DK5R0f34.js","assets/Card-BjWLZNNc.js","assets/FadeIn-C8tqua7r.js","assets/LocalOnlyNotice-Cs9RgKMS.js","assets/arrow-up-right-D8oNhRVG.js","assets/download-DSeYwQoM.js","assets/LeaderboardPage-DjQR8Fa-.js","assets/Select-BdPsa5Uo.js","assets/SelectItemText-B0Csoh76.js","assets/useOpenInteractionType-CZToOIvX.js","assets/useCurrency-BpHMgM0X.js","assets/LeaderboardAvatar-CrDe4gkL.js","assets/DashboardPage-DWBqSObe.js","assets/ActivityHeatmap-A0XD9pjK.js","assets/info-Cbo3VUff.js","assets/DialogTitle-DsZwhCyU.js","assets/use-spring-BV4Z3YeB.js","assets/PopoverPopup-DC0KzMrq.js","assets/LandingPage-cN4IqFF_.js","assets/InsforgeUserHeaderControls-D49IOK-Q.js","assets/LeaderboardProfilePage-BsE2gp5R.js","assets/LeaderboardProfileModal-BwaorCPO.js","assets/SettingsPage-DrprCoQ1.js","assets/use-native-settings-DmQb1Be8.js","assets/SkillsPage-j5yFYxaw.js","assets/WidgetsPage-Bcwh0w7U.js"])))=>i.map(i=>d[i]);
2
2
  function aT(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(a,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>a[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"]'))a(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).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 a(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function b0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function rT(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function a(){var o=!1;try{o=this instanceof a}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(a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}),n}var hf={exports:{}},Bs={},ff={exports:{}},et={};var ub;function iT(){if(ub)return et;ub=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,C={};function S(I,W,ge){this.props=I,this.context=W,this.refs=C,this.updater=ge||_}S.prototype.isReactComponent={},S.prototype.setState=function(I,W){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,W,"setState")},S.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function M(){}M.prototype=S.prototype;function R(I,W,ge){this.props=I,this.context=W,this.refs=C,this.updater=ge||_}var A=R.prototype=new M;A.constructor=R,x(A,S.prototype),A.isPureReactComponent=!0;var E=Array.isArray,B=Object.prototype.hasOwnProperty,$={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function P(I,W,ge){var pe,me={},be=null,Be=null;if(W!=null)for(pe in W.ref!==void 0&&(Be=W.ref),W.key!==void 0&&(be=""+W.key),W)B.call(W,pe)&&!V.hasOwnProperty(pe)&&(me[pe]=W[pe]);var Ye=arguments.length-2;if(Ye===1)me.children=ge;else if(1<Ye){for(var Ne=Array(Ye),Rt=0;Rt<Ye;Rt++)Ne[Rt]=arguments[Rt+2];me.children=Ne}if(I&&I.defaultProps)for(pe in Ye=I.defaultProps,Ye)me[pe]===void 0&&(me[pe]=Ye[pe]);return{$$typeof:e,type:I,key:be,ref:Be,props:me,_owner:$.current}}function Z(I,W){return{$$typeof:e,type:I.type,key:W,ref:I.ref,props:I.props,_owner:I._owner}}function X(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function fe(I){var W={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(ge){return W[ge]})}var he=/\/+/g;function J(I,W){return typeof I=="object"&&I!==null&&I.key!=null?fe(""+I.key):W.toString(36)}function re(I,W,ge,pe,me){var be=typeof I;(be==="undefined"||be==="boolean")&&(I=null);var Be=!1;if(I===null)Be=!0;else switch(be){case"string":case"number":Be=!0;break;case"object":switch(I.$$typeof){case e:case t:Be=!0}}if(Be)return Be=I,me=me(Be),I=pe===""?"."+J(Be,0):pe,E(me)?(ge="",I!=null&&(ge=I.replace(he,"$&/")+"/"),re(me,W,ge,"",function(Rt){return Rt})):me!=null&&(X(me)&&(me=Z(me,ge+(!me.key||Be&&Be.key===me.key?"":(""+me.key).replace(he,"$&/")+"/")+I)),W.push(me)),1;if(Be=0,pe=pe===""?".":pe+":",E(I))for(var Ye=0;Ye<I.length;Ye++){be=I[Ye];var Ne=pe+J(be,Ye);Be+=re(be,W,ge,Ne,me)}else if(Ne=v(I),typeof Ne=="function")for(I=Ne.call(I),Ye=0;!(be=I.next()).done;)be=be.value,Ne=pe+J(be,Ye++),Be+=re(be,W,ge,Ne,me);else if(be==="object")throw W=String(I),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.");return Be}function ue(I,W,ge){if(I==null)return I;var pe=[],me=0;return re(I,pe,"","",function(be){return W.call(ge,be,me++)}),pe}function Q(I){if(I._status===-1){var W=I._result;W=W(),W.then(function(ge){(I._status===0||I._status===-1)&&(I._status=1,I._result=ge)},function(ge){(I._status===0||I._status===-1)&&(I._status=2,I._result=ge)}),I._status===-1&&(I._status=0,I._result=W)}if(I._status===1)return I._result.default;throw I._result}var ie={current:null},F={transition:null},Y={ReactCurrentDispatcher:ie,ReactCurrentBatchConfig:F,ReactCurrentOwner:$};function z(){throw Error("act(...) is not supported in production builds of React.")}return et.Children={map:ue,forEach:function(I,W,ge){ue(I,function(){W.apply(this,arguments)},ge)},count:function(I){var W=0;return ue(I,function(){W++}),W},toArray:function(I){return ue(I,function(W){return W})||[]},only:function(I){if(!X(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},et.Component=S,et.Fragment=n,et.Profiler=o,et.PureComponent=R,et.StrictMode=a,et.Suspense=h,et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,et.act=z,et.cloneElement=function(I,W,ge){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var pe=x({},I.props),me=I.key,be=I.ref,Be=I._owner;if(W!=null){if(W.ref!==void 0&&(be=W.ref,Be=$.current),W.key!==void 0&&(me=""+W.key),I.type&&I.type.defaultProps)var Ye=I.type.defaultProps;for(Ne in W)B.call(W,Ne)&&!V.hasOwnProperty(Ne)&&(pe[Ne]=W[Ne]===void 0&&Ye!==void 0?Ye[Ne]:W[Ne])}var Ne=arguments.length-2;if(Ne===1)pe.children=ge;else if(1<Ne){Ye=Array(Ne);for(var Rt=0;Rt<Ne;Rt++)Ye[Rt]=arguments[Rt+2];pe.children=Ye}return{$$typeof:e,type:I.type,key:me,ref:be,props:pe,_owner:Be}},et.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:s,_context:I},I.Consumer=I},et.createElement=P,et.createFactory=function(I){var W=P.bind(null,I);return W.type=I,W},et.createRef=function(){return{current:null}},et.forwardRef=function(I){return{$$typeof:u,render:I}},et.isValidElement=X,et.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:Q}},et.memo=function(I,W){return{$$typeof:f,type:I,compare:W===void 0?null:W}},et.startTransition=function(I){var W=F.transition;F.transition={};try{I()}finally{F.transition=W}},et.unstable_act=z,et.useCallback=function(I,W){return ie.current.useCallback(I,W)},et.useContext=function(I){return ie.current.useContext(I)},et.useDebugValue=function(){},et.useDeferredValue=function(I){return ie.current.useDeferredValue(I)},et.useEffect=function(I,W){return ie.current.useEffect(I,W)},et.useId=function(){return ie.current.useId()},et.useImperativeHandle=function(I,W,ge){return ie.current.useImperativeHandle(I,W,ge)},et.useInsertionEffect=function(I,W){return ie.current.useInsertionEffect(I,W)},et.useLayoutEffect=function(I,W){return ie.current.useLayoutEffect(I,W)},et.useMemo=function(I,W){return ie.current.useMemo(I,W)},et.useReducer=function(I,W,ge){return ie.current.useReducer(I,W,ge)},et.useRef=function(I){return ie.current.useRef(I)},et.useState=function(I){return ie.current.useState(I)},et.useSyncExternalStore=function(I,W,ge){return ie.current.useSyncExternalStore(I,W,ge)},et.useTransition=function(){return ie.current.useTransition()},et.version="18.3.1",et}var db;function sm(){return db||(db=1,ff.exports=iT()),ff.exports}var hb;function oT(){if(hb)return Bs;hb=1;var e=sm(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=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 l(u,h,f){var m,y={},v=null,_=null;f!==void 0&&(v=""+f),h.key!==void 0&&(v=""+h.key),h.ref!==void 0&&(_=h.ref);for(m in h)a.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:v,ref:_,props:y,_owner:o.current}}return Bs.Fragment=n,Bs.jsx=l,Bs.jsxs=l,Bs}var fb;function sT(){return fb||(fb=1,hf.exports=oT()),hf.exports}var T=sT(),k=sm();const lm=b0(k),cm=aT({__proto__:null,default:lm},[k]);var Kc={},pf={exports:{}},Dn={},mf={exports:{}},gf={};var pb;function lT(){return pb||(pb=1,(function(e){function t(F,Y){var z=F.length;F.push(Y);e:for(;0<z;){var I=z-1>>>1,W=F[I];if(0<o(W,Y))F[I]=Y,F[z]=W,z=I;else break e}}function n(F){return F.length===0?null:F[0]}function a(F){if(F.length===0)return null;var Y=F[0],z=F.pop();if(z!==Y){F[0]=z;e:for(var I=0,W=F.length,ge=W>>>1;I<ge;){var pe=2*(I+1)-1,me=F[pe],be=pe+1,Be=F[be];if(0>o(me,z))be<W&&0>o(Be,me)?(F[I]=Be,F[be]=z,I=be):(F[I]=me,F[pe]=z,I=pe);else if(be<W&&0>o(Be,z))F[I]=Be,F[be]=z,I=be;else break e}}return Y}function o(F,Y){var z=F.sortIndex-Y.sortIndex;return z!==0?z:F.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var h=[],f=[],m=1,y=null,v=3,_=!1,x=!1,C=!1,S=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(F){for(var Y=n(f);Y!==null;){if(Y.callback===null)a(f);else if(Y.startTime<=F)a(f),Y.sortIndex=Y.expirationTime,t(h,Y);else break;Y=n(f)}}function E(F){if(C=!1,A(F),!x)if(n(h)!==null)x=!0,Q(B);else{var Y=n(f);Y!==null&&ie(E,Y.startTime-F)}}function B(F,Y){x=!1,C&&(C=!1,M(P),P=-1),_=!0;var z=v;try{for(A(Y),y=n(h);y!==null&&(!(y.expirationTime>Y)||F&&!fe());){var I=y.callback;if(typeof I=="function"){y.callback=null,v=y.priorityLevel;var W=I(y.expirationTime<=Y);Y=e.unstable_now(),typeof W=="function"?y.callback=W:y===n(h)&&a(h),A(Y)}else a(h);y=n(h)}if(y!==null)var ge=!0;else{var pe=n(f);pe!==null&&ie(E,pe.startTime-Y),ge=!1}return ge}finally{y=null,v=z,_=!1}}var $=!1,V=null,P=-1,Z=5,X=-1;function fe(){return!(e.unstable_now()-X<Z)}function he(){if(V!==null){var F=e.unstable_now();X=F;var Y=!0;try{Y=V(!0,F)}finally{Y?J():($=!1,V=null)}}else $=!1}var J;if(typeof R=="function")J=function(){R(he)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,ue=re.port2;re.port1.onmessage=he,J=function(){ue.postMessage(null)}}else J=function(){S(he,0)};function Q(F){V=F,$||($=!0,J())}function ie(F,Y){P=S(function(){F(e.unstable_now())},Y)}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(F){F.callback=null},e.unstable_continueExecution=function(){x||_||(x=!0,Q(B))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(F){switch(v){case 1:case 2:case 3:var Y=3;break;default:Y=v}var z=v;v=Y;try{return F()}finally{v=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,Y){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var z=v;v=F;try{return Y()}finally{v=z}},e.unstable_scheduleCallback=function(F,Y,z){var I=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?I+z:I):z=I,F){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=z+W,F={id:m++,callback:Y,priorityLevel:F,startTime:z,expirationTime:W,sortIndex:-1},z>I?(F.sortIndex=z,t(f,F),n(h)===null&&F===n(f)&&(C?(M(P),P=-1):C=!0,ie(E,z-I))):(F.sortIndex=W,t(h,F),x||_||(x=!0,Q(B))),F},e.unstable_shouldYield=fe,e.unstable_wrapCallback=function(F){var Y=v;return function(){var z=v;v=Y;try{return F.apply(this,arguments)}finally{v=z}}}})(gf)),gf}var mb;function cT(){return mb||(mb=1,mf.exports=lT()),mf.exports}var gb;function uT(){if(gb)return Dn;gb=1;var e=sm(),t=cT();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,c=1;c<arguments.length;c++)i+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,o={};function s(r,i){l(r,i),l(r+"Capture",i)}function l(r,i){for(o[r]=i,r=0;r<i.length;r++)a.add(i[r])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,f=/^[: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 v(r){return h.call(y,r)?!0:h.call(m,r)?!1:f.test(r)?y[r]=!0:(m[r]=!0,!1)}function _(r,i,c,d){if(c!==null&&c.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return d?!1:c!==null?!c.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function x(r,i,c,d){if(i===null||typeof i>"u"||_(r,i,c,d))return!0;if(d)return!1;if(c!==null)switch(c.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(r,i,c,d,p,g,w){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=d,this.attributeNamespace=p,this.mustUseProperty=c,this.propertyName=r,this.type=i,this.sanitizeURL=g,this.removeEmptyString=w}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){S[r]=new C(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];S[i]=new C(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){S[r]=new C(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){S[r]=new C(r,2,!1,r,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(r){S[r]=new C(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){S[r]=new C(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){S[r]=new C(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){S[r]=new C(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){S[r]=new C(r,5,!1,r.toLowerCase(),null,!1,!1)});var M=/[\-:]([a-z])/g;function R(r){return r[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(r){var i=r.replace(M,R);S[i]=new C(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(M,R);S[i]=new C(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(M,R);S[i]=new C(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){S[r]=new C(r,1,!1,r.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(r){S[r]=new C(r,1,!1,r.toLowerCase(),null,!0,!0)});function A(r,i,c,d){var p=S.hasOwnProperty(i)?S[i]:null;(p!==null?p.type!==0:d||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(x(i,c,p,d)&&(c=null),d||p===null?v(i)&&(c===null?r.removeAttribute(i):r.setAttribute(i,""+c)):p.mustUseProperty?r[p.propertyName]=c===null?p.type===3?!1:"":c:(i=p.attributeName,d=p.attributeNamespace,c===null?r.removeAttribute(i):(p=p.type,c=p===3||p===4&&c===!0?"":""+c,d?r.setAttributeNS(d,i,c):r.setAttribute(i,c))))}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),$=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),fe=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),ue=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),ie=Symbol.for("react.offscreen"),F=Symbol.iterator;function Y(r){return r===null||typeof r!="object"?null:(r=F&&r[F]||r["@@iterator"],typeof r=="function"?r:null)}var z=Object.assign,I;function W(r){if(I===void 0)try{throw Error()}catch(c){var i=c.stack.trim().match(/\n( *(at )?)/);I=i&&i[1]||""}return`
3
3
  `+I+r}var ge=!1;function pe(r,i){if(!r||ge)return"";ge=!0;var c=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(q){var d=q}Reflect.construct(r,[],i)}else{try{i.call()}catch(q){d=q}r.call(i.prototype)}else{try{throw Error()}catch(q){d=q}r()}}catch(q){if(q&&d&&typeof q.stack=="string"){for(var p=q.stack.split(`
4
4
  `),g=d.stack.split(`
@@ -996,4 +996,4 @@ skills.usage.disclaimer,ui,SkillsPage,SkillDetailPanel,usage_disclaimer,"Counts
996
996
  ${R}px !important;
997
997
  ${A}px !important;
998
998
  }
999
- `),()=>{u.current?.removeAttribute("data-motion-pop-id"),B.contains(E)&&B.removeChild(E)}},[t]),T.jsx(J5,{isPresent:t,childRef:u,sizeRef:h,pop:s,children:s===!1?e:k.cloneElement(e,{ref:y})})}const tO=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:o,presenceAffectsLayout:s,mode:l,anchorX:u,anchorY:h,root:f})=>{const m=Qm(nO),y=k.useId();let v=!0,_=k.useMemo(()=>(v=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:x=>{m.set(x,!0);for(const C of m.values())if(!C)return;a&&a()},register:x=>(m.set(x,!1),()=>m.delete(x))}),[n,m,a]);return s&&v&&(_={..._}),k.useMemo(()=>{m.forEach((x,C)=>m.set(C,!1))},[n]),k.useEffect(()=>{!n&&!m.size&&a&&a()},[n]),e=T.jsx(eO,{pop:l==="popLayout",isPresent:n,anchorX:u,anchorY:h,root:f,children:e}),T.jsx(Sd.Provider,{value:_,children:e})};function nO(){return new Map}function iP(e=!0){const t=k.useContext(Sd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:o}=t,s=k.useId();k.useEffect(()=>{if(e)return o(s)},[e]);const l=k.useCallback(()=>e&&a&&a(s),[s,a,e]);return!n&&a?[!1,l]:[!0]}const nu=e=>e.key||"";function N_(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const oP=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:s="sync",propagate:l=!1,anchorX:u="left",anchorY:h="top",root:f})=>{const[m,y]=iP(l),v=k.useMemo(()=>N_(e),[e]),_=l&&!m?[]:v.map(nu),x=k.useRef(!0),C=k.useRef(v),S=Qm(()=>new Map),M=k.useRef(new Set),[R,A]=k.useState(v),[E,B]=k.useState(v);Lx(()=>{x.current=!1,C.current=v;for(let P=0;P<E.length;P++){const Z=nu(E[P]);_.includes(Z)?(S.delete(Z),M.current.delete(Z)):S.get(Z)!==!0&&S.set(Z,!1)}},[E,_.length,_.join("-")]);const $=[];if(v!==R){let P=[...v];for(let Z=0;Z<E.length;Z++){const X=E[Z],fe=nu(X);_.includes(fe)||(P.splice(Z,0,X),$.push(X))}return s==="wait"&&$.length&&(P=$),B(N_(P)),A(v),null}const{forceRender:V}=k.useContext(Xm);return T.jsx(T.Fragment,{children:E.map(P=>{const Z=nu(P),X=l&&!m?!1:v===E||_.includes(Z),fe=()=>{if(M.current.has(Z))return;if(S.has(Z))M.current.add(Z),S.set(Z,!0);else return;let he=!0;S.forEach(J=>{J||(he=!1)}),he&&(V?.(),B(C.current),l&&y?.(),a&&a())};return T.jsx(tO,{isPresent:X,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:f,onExitComplete:X?void 0:fe,anchorX:u,anchorY:h,children:P},Z)})})},sP=k.createContext({strict:!1}),O_={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 j_=!1;function aO(){if(j_)return;const e={};for(const t in O_)e[t]={isEnabled:n=>O_[t].some(a=>!!n[a])};N1(e),j_=!0}function lP(){return aO(),FN()}function rO(e){const t=lP();for(const n in e)t[n]={...t[n],...e[n]};N1(t)}const iO=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 od(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||iO.has(e)}let cP=e=>!od(e);function oO(e){typeof e=="function"&&(cP=t=>t.startsWith("on")?!od(t):e(t))}try{oO(require("@emotion/is-prop-valid").default)}catch{}function sO(e,t,n){const a={};for(const o in e)o==="values"&&typeof e.values=="object"||an(e[o])||(cP(o)||n===!0&&od(o)||!t&&!od(o)||e.draggable&&o.startsWith("onDrag"))&&(a[o]=e[o]);return a}const Ad=k.createContext({});function lO(e,t){if(Ed(e)){const{initial:n,animate:a}=e;return{initial:n===!1||kl(n)?n:void 0,animate:kl(a)?a:void 0}}return e.inherit!==!1?t:{}}function cO(e){const{initial:t,animate:n}=lO(e,k.useContext(Ad));return k.useMemo(()=>({initial:t,animate:n}),[U_(t),U_(n)])}function U_(e){return Array.isArray(e)?e.join(" "):e}const Sg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function uP(e,t,n){for(const a in t)!an(t[a])&&!V1(a,n)&&(e[a]=t[a])}function uO({transformTemplate:e},t){return k.useMemo(()=>{const n=Sg();return wg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function dO(e,t){const n=e.style||{},a={};return uP(a,n,e),Object.assign(a,uO(e,t)),a}function hO(e,t){const n={},a=dO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.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=a,n}const dP=()=>({...Sg(),attrs:{}});function fO(e,t,n,a){const o=k.useMemo(()=>{const s=dP();return $1(s,t,W1(a),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};uP(s,e.style,e),o.style={...s,...o.style}}return o}const pO=["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 Cg(e){return typeof e!="string"||e.includes("-")?!1:!!(pO.indexOf(e)>-1||/[A-Z]/u.test(e))}function mO(e,t,n,{latestValues:a},o,s=!1,l){const h=(l??Cg(e)?fO:hO)(t,a,o,e),f=sO(t,typeof e=="string",s),m=e!==k.Fragment?{...f,...h,ref:n}:{},{children:y}=t,v=k.useMemo(()=>an(y)?y.get():y,[y]);return k.createElement(e,{...m,children:v})}function gO({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,o){return{latestValues:yO(n,a,o,e),renderState:t()}}function yO(e,t,n,a){const o={},s=a(e,{});for(const v in s)o[v]=Au(s[v]);let{initial:l,animate:u}=e;const h=Ed(e),f=I1(e);t&&f&&!h&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const y=m?u:l;if(y&&typeof y!="boolean"&&!Td(y)){const v=Array.isArray(y)?y:[y];for(let _=0;_<v.length;_++){const x=fg(e,v[_]);if(x){const{transitionEnd:C,transition:S,...M}=x;for(const R in M){let A=M[R];if(Array.isArray(A)){const E=m?A.length-1:0;A=A[E]}A!==null&&(o[R]=A)}for(const R in C)o[R]=C[R]}}}return o}const hP=e=>(t,n)=>{const a=k.useContext(Ad),o=k.useContext(Sd),s=()=>gO(e,t,a,o);return n?s():Qm(s)},vO=hP({scrapeMotionValuesFromProps:xg,createRenderState:Sg}),bO=hP({scrapeMotionValuesFromProps:K1,createRenderState:dP}),kO=Symbol.for("motionComponentSymbol");function _O(e,t,n){const a=k.useRef(n);k.useInsertionEffect(()=>{a.current=n});const o=k.useRef(null);return k.useCallback(s=>{s&&e.onMount?.(s);const l=a.current;if(typeof l=="function")if(s){const u=l(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):l(s);else l&&(l.current=s);t&&(s?t.mount(s):t.unmount())},[t])}const fP=k.createContext({});function Io(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function wO(e,t,n,a,o,s){const{visualElement:l}=k.useContext(Ad),u=k.useContext(sP),h=k.useContext(Sd),f=k.useContext(Pg),m=f.reducedMotion,y=f.skipAnimations,v=k.useRef(null),_=k.useRef(!1);a=a||u.renderer,!v.current&&a&&(v.current=a(e,{visualState:t,parent:l,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:s}),_.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const x=v.current,C=k.useContext(fP);x&&!x.projection&&o&&(x.type==="html"||x.type==="svg")&&xO(v.current,n,o,C);const S=k.useRef(!1);k.useInsertionEffect(()=>{x&&S.current&&x.update(n,h)});const M=n[k1],R=k.useRef(!!M&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(M)&&window.MotionHasOptimisedAnimation?.(M));return Lx(()=>{_.current=!0,x&&(S.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),R.current&&x.animationState&&x.animationState.animateChanges())}),k.useEffect(()=>{x&&(!R.current&&x.animationState&&x.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(M)}),R.current=!1),x.enteringChildren=void 0)}),x}function xO(e,t,n,a){const{layoutId:o,layout:s,drag:l,dragConstraints:u,layoutScroll:h,layoutRoot:f,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:pP(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!l||u&&Io(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:a,crossfade:y,layoutScroll:h,layoutRoot:f,layoutAnchor:m})}function pP(e){if(e)return e.options.allowProjection!==!1?e.projection:pP(e.parent)}function Hf(e,{forwardMotionProps:t=!1,type:n}={},a,o){a&&rO(a);const s=n?n==="svg":Cg(e),l=s?bO:vO;function u(f,m){let y;const v={...k.useContext(Pg),...f,layoutId:PO(f)},{isStatic:_}=v,x=cO(f),C=l(f,_);if(!_&&typeof window<"u"){SO();const S=CO(v);y=S.MeasureLayout,x.visualElement=wO(e,C,v,o,S.ProjectionNode,s)}return T.jsxs(Ad.Provider,{value:x,children:[y&&x.visualElement?T.jsx(y,{visualElement:x.visualElement,...v}):null,mO(e,f,_O(C,x.visualElement,m),C,_,t,s)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=k.forwardRef(u);return h[kO]=e,h}function PO({layoutId:e}){const t=k.useContext(Xm).id;return t&&e!==void 0?t+"-"+e:e}function SO(e,t){k.useContext(sP).strict}function CO(e){const t=lP(),{drag:n,layout:a}=t;if(!n&&!a)return{};const o={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function TO(e,t){if(typeof Proxy>"u")return Hf;const n=new Map,a=(s,l)=>Hf(s,l,e,t),o=(s,l)=>a(s,l);return new Proxy(o,{get:(s,l)=>l==="create"?a:(n.has(l)||n.set(l,Hf(l,void 0,e,t)),n.get(l))})}const EO=(e,t)=>t.isSVG??Cg(e)?new r5(t):new QN(t,{allowProjection:e!==k.Fragment});class AO extends ai{constructor(t){super(t),t.animationState||(t.animationState=c5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Td(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 RO=0;class DO extends ai{constructor(){super(...arguments),this.id=RO++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;if(t&&a===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"){const u=Mi(this.node,s,l);if(u){const{transition:h,transitionEnd:f,...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 LO={animation:{Feature:AO},exit:{Feature:DO}};function jl(e){return{point:{x:e.pageX,y:e.pageY}}}const IO=e=>t=>yg(t)&&e(t,jl(t));function ll(e,t,n,a){return _l(e,t,IO(n),a)}const mP=({current:e})=>e?e.ownerDocument.defaultView:null,B_=(e,t)=>Math.abs(e-t);function MO(e,t){const n=B_(e.x,t.x),a=B_(e.y,t.y);return Math.sqrt(n**2+a**2)}const z_=new Set(["auto","scroll"]);class gP{constructor(t,n,{transformPagePoint:a,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:l=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=_=>{this.handleScroll(_.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=au(this.lastRawMoveEventInfo,this.transformPagePoint));const _=Wf(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,C=MO(_.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!C)return;const{point:S}=_,{timestamp:M}=nn;this.history.push({...S,timestamp:M});const{onStart:R,onMove:A}=this.handlers;x||(R&&R(this.lastMoveEvent,_),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,_)},this.handlePointerMove=(_,x)=>{this.lastMoveEvent=_,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=au(x,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(_,x)=>{this.end();const{onEnd:C,onSessionEnd:S,resumeAnimation:M}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&M&&M(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=Wf(_.type==="pointercancel"?this.lastMoveEventInfo:au(x,this.transformPagePoint),this.history);this.startEvent&&C&&C(_,R),S&&S(_,R)},!yg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=l,this.contextWindow=o||window;const h=jl(t),f=au(h,this.transformPagePoint),{point:m}=f,{timestamp:y}=nn;this.history=[{...m,timestamp:y}];const{onSessionStart:v}=n;v&&v(t,Wf(f,this.history)),this.removeListeners=Ml(ll(this.contextWindow,"pointermove",this.handlePointerMove),ll(this.contextWindow,"pointerup",this.handlePointerUp),ll(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(z_.has(a.overflowX)||z_.has(a.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 a=t===window,o=a?{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||(a?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),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ei(this.updatePoint)}}function au(e,t){return t?{point:t(e.point)}:e}function F_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wf({point:e},t){return{point:e,delta:F_(e,yP(t)),offset:F_(e,NO(t)),velocity:OO(t,.1)}}function NO(e){return e[0]}function yP(e){return e[e.length-1]}function OO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const o=yP(e);for(;n>=0&&(a=e[n],!(o.timestamp-a.timestamp>Hn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&o.timestamp-a.timestamp>Hn(t)*2&&(a=e[1]);const s=ta(o.timestamp-a.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-a.x)/s,y:(o.y-a.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function jO(e,{min:t,max:n},a){return t!==void 0&&e<t?e=a?xt(t,e,a.min):Math.max(e,t):n!==void 0&&e>n&&(e=a?xt(n,e,a.max):Math.min(e,n)),e}function V_(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 UO(e,{top:t,left:n,bottom:a,right:o}){return{x:V_(e.x,n,o),y:V_(e.y,t,a)}}function $_(e,t){let n=t.min-e.min,a=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,a]=[a,n]),{min:n,max:a}}function BO(e,t){return{x:$_(e.x,t.x),y:$_(e.y,t.y)}}function zO(e,t){let n=.5;const a=kn(e),o=kn(t);return o>a?n=vl(t.min,t.max-a,e.min):a>o&&(n=vl(e.min,e.max-o,t.min)),Wa(0,1,n)}function FO(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 VO(e=Kp){return e===!1?e=0:e===!0&&(e=Kp),{x:H_(e,"left","right"),y:H_(e,"top","bottom")}}function H_(e,t,n){return{min:W_(e,t),max:W_(e,n)}}function W_(e,t){return typeof e=="number"?e:e[t]||0}const $O=new WeakMap;class HO{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=Wt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=y=>{n&&this.snapToCursor(jl(y).point),this.stopAnimation()},l=(y,v)=>{const{drag:_,dragPropagation:x,onDragStart:C}=this.getProps();if(_&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=vN(_),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Oa(M=>{let R=this.getAxisMotionValue(M).get()||0;if(za.test(R)){const{projection:A}=this.visualElement;if(A&&A.layout){const E=A.layout.layoutBox[M];E&&(R=kn(E)*(parseFloat(R)/100))}}this.originPoint[M]=R}),C&&gt.update(()=>C(y,v),!1,!0),Up(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},u=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:_,dragDirectionLock:x,onDirectionLock:C,onDrag:S}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:M}=v;if(x&&this.currentDirection===null){this.currentDirection=KO(M),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",v.point,M),this.updateAxis("y",v.point,M),this.visualElement.render(),S&&gt.update(()=>S(y,v),!1,!0)},h=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new gP(t,{onSessionStart:s,onStart:l,onMove:u,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:a,contextWindow:mP(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!a)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&gt.postRender(()=>u(a,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&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,a){const{drag:o}=this.getProps();if(!a||!ru(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(l=jO(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Io(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=UO(a.layoutBox,t):this.constraints=!1,this.elastic=VO(n),o!==this.constraints&&!Io(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&Oa(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=FO(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Io(t))return!1;const a=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=KN(a,o.root,this.visualElement.getTransformPagePoint());let l=BO(o.layout.layoutBox,s);if(n){const u=n($N(l));this.hasMutatedConstraints=!!u,u&&(l=j1(u))}return l}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},f=Oa(m=>{if(!ru(m,n,this.currentDirection))return;let y=h&&h[m]||{};(l===!0||l===m)&&(y={min:0,max:0});const v=o?200:1e6,_=o?40:1e7,x={type:"inertia",velocity:a?t[m]:0,bounceStiffness:v,bounceDamping:_,timeConstant:750,restDelta:1,restSpeed:10,...s,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return Up(this.visualElement,t),a.start(hg(t,a,0,n,this.visualElement,!1))}stopAnimation(){Oa(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),o=a[n];return o||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){Oa(n=>{const{drag:a}=this.getProps();if(!ru(n,a,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:u}=o.layout.layoutBox[n],h=s.get()||0;s.set(t[n]-xt(l,u,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!Io(n)||!a||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Oa(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const h=u.get();o[l]=zO({min:h,max:h},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),Oa(l=>{if(!ru(l,t,null))return;const u=this.getAxisMotionValue(l),{min:h,max:f}=this.constraints[l];u.set(xt(h,f,o[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;$O.set(this.visualElement,this);const t=this.visualElement.current,n=ll(t,"pointerdown",f=>{const{drag:m,dragListener:y=!0}=this.getProps(),v=f.target,_=v!==t&&PN(v);m&&y&&!_&&this.start(f)});let a;const o=()=>{const{dragConstraints:f}=this.getProps();Io(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),a||(a=WO(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,l=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),gt.read(o);const u=_l(window,"resize",()=>this.scalePositionWithinConstraints()),h=s.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:m})=>{this.isDragging&&m&&(Oa(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=f[y].translate,v.set(v.get()+f[y].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),h&&h(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=Kp,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:u}}}function K_(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function WO(e,t,n){const a=Jk(e,K_(n)),o=Jk(t,K_(n));return()=>{a(),o()}}function ru(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function KO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class GO extends ai{constructor(t){super(t),this.removeGroupControls=aa,this.removeListeners=aa,this.controls=new HO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||aa}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 Kf=e=>(t,n)=>{e&&gt.update(()=>e(t,n),!1,!0)};class qO extends ai{constructor(){super(...arguments),this.removePointerDownListener=aa}onPointerDown(t){this.session=new gP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:Kf(t),onStart:Kf(n),onMove:Kf(a),onEnd:(s,l)=>{delete this.session,o&&gt.postRender(()=>o(s,l))}}}mount(){this.removePointerDownListener=ll(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 Gf=!1;class YO extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),a&&a.register&&o&&a.register(s),Gf&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ru.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:o,isPresent:s}=this.props,{projection:l}=a;return l&&(l.isPresent=s,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),Gf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||gt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:a}=t;a&&(a.options.layoutAnchor=n,a.root.didUpdate(),gg.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:o}=t;Gf=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),a&&a.deregister&&a.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function vP(e){const[t,n]=iP(),a=k.useContext(Xm);return T.jsx(YO,{...e,layoutGroup:a,switchLayoutGroup:k.useContext(fP),isPresent:t,safeToRemove:n})}const ZO={pan:{Feature:qO},drag:{Feature:GO,ProjectionNode:rP,MeasureLayout:vP}};function G_(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=a[o];s&&gt.postRender(()=>s(t,jl(t)))}class XO extends ai{mount(){const{current:t}=this.node;t&&(this.unmount=kN(t,(n,a)=>(G_(this.node,a,"Start"),o=>G_(this.node,o,"End"))))}unmount(){}}class QO extends ai{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=Ml(_l(this.node.current,"focus",()=>this.onFocus()),_l(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function q_(e,t,n){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=a[o];s&&gt.postRender(()=>s(t,jl(t)))}class JO extends ai{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=CN(t,(o,s)=>(q_(this.node,s,"Start"),(l,{success:u})=>q_(this.node,l,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const Gp=new WeakMap,qf=new WeakMap,e6=e=>{const t=Gp.get(e.target);t&&t(e)},t6=e=>{e.forEach(e6)};function n6({root:e,...t}){const n=e||document;qf.has(n)||qf.set(n,{});const a=qf.get(n),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(t6,{root:e,...t})),a[o]}function a6(e,t,n){const a=n6(t);return Gp.set(e,n),a.observe(e),()=>{Gp.delete(e),a.unobserve(e)}}const r6={some:0,all:1};class i6 extends ai{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:o="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:r6[o]},u=h=>{const{isIntersecting:f}=h;if(this.isInView===f||(this.isInView=f,s&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),v=f?m:y;v&&v(h)};this.stopObserver=a6(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(o6(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function o6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const s6={inView:{Feature:i6},tap:{Feature:JO},focus:{Feature:QO},hover:{Feature:XO}},l6={layout:{ProjectionNode:rP,MeasureLayout:vP}},c6={...LO,...s6,...ZO,...l6},cl=TO(c6,EO);function u6(){!_g.current&&M1();const[e]=k.useState(nd.current);return e}function bP(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=bP(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function d6(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=bP(e))&&(a&&(a+=" "),a+=t);return a}const h6=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},f6=(e,t)=>({classGroupId:e,validator:t}),kP=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),sd="-",Y_=[],p6="arbitrary..",m6=e=>{const t=y6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return g6(l);const u=l.split(sd),h=u[0]===""&&u.length>1?1:0;return _P(u,h,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const h=a[l],f=n[l];return h?f?h6(f,h):h:f||Y_}return n[l]||Y_}}},_P=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const f=_P(e,t+1,s);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(sd):e.slice(t).join(sd),h=l.length;for(let f=0;f<h;f++){const m=l[f];if(m.validator(u))return m.classGroupId}},g6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?p6+a:void 0})(),y6=e=>{const{theme:t,classGroups:n}=e;return v6(n,t)},v6=(e,t)=>{const n=kP();for(const a in e){const o=e[a];Tg(o,n,a,t)}return n},Tg=(e,t,n,a)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];b6(l,t,n,a)}},b6=(e,t,n,a)=>{if(typeof e=="string"){k6(e,t,n);return}if(typeof e=="function"){_6(e,t,n,a);return}w6(e,t,n,a)},k6=(e,t,n)=>{const a=e===""?t:wP(t,e);a.classGroupId=n},_6=(e,t,n,a)=>{if(x6(e)){Tg(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(f6(n,e))},w6=(e,t,n,a)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[u,h]=o[l];Tg(h,wP(t,u),n,a)}},wP=(e,t)=>{let n=e;const a=t.split(sd),o=a.length;for(let s=0;s<o;s++){const l=a[s];let u=n.nextPart.get(l);u||(u=kP(),n.nextPart.set(l,u)),n=u}return n},x6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,P6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=a[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},qp="!",Z_=":",S6=[],X_=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),C6=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const s=[];let l=0,u=0,h=0,f;const m=o.length;for(let C=0;C<m;C++){const S=o[C];if(l===0&&u===0){if(S===Z_){s.push(o.slice(h,C)),h=C+1;continue}if(S==="/"){f=C;continue}}S==="["?l++:S==="]"?l--:S==="("?u++:S===")"&&u--}const y=s.length===0?o:o.slice(h);let v=y,_=!1;y.endsWith(qp)?(v=y.slice(0,-1),_=!0):y.startsWith(qp)&&(v=y.slice(1),_=!0);const x=f&&f>h?f-h:void 0;return X_(s,_,v,x)};if(t){const o=t+Z_,s=a;a=l=>l.startsWith(o)?s(l.slice(o.length)):X_(S6,!1,l,void 0,!0)}if(n){const o=a;a=s=>n({className:s,parseClassName:o})}return a},T6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],u=l[0]==="[",h=t.has(l);u||h?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(l)):o.push(l)}return o.length>0&&(o.sort(),a.push(...o)),a}},E6=e=>({cache:P6(e.cacheSize),parseClassName:C6(e),sortModifiers:T6(e),...m6(e)}),A6=/\s+/,R6=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],u=e.trim().split(A6);let h="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:y,modifiers:v,hasImportantModifier:_,baseClassName:x,maybePostfixModifierPosition:C}=n(m);if(y){h=m+(h.length>0?" "+h:h);continue}let S=!!C,M=a(S?x.substring(0,C):x);if(!M){if(!S){h=m+(h.length>0?" "+h:h);continue}if(M=a(x),!M){h=m+(h.length>0?" "+h:h);continue}S=!1}const R=v.length===0?"":v.length===1?v[0]:s(v).join(":"),A=_?R+qp:R,E=A+M;if(l.indexOf(E)>-1)continue;l.push(E);const B=o(M,S);for(let $=0;$<B.length;++$){const V=B[$];l.push(A+V)}h=m+(h.length>0?" "+h:h)}return h},D6=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=xP(n))&&(o&&(o+=" "),o+=a);return o},xP=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=xP(e[a]))&&(n&&(n+=" "),n+=t);return n},L6=(e,...t)=>{let n,a,o,s;const l=h=>{const f=t.reduce((m,y)=>y(m),e());return n=E6(f),a=n.cache.get,o=n.cache.set,s=u,u(h)},u=h=>{const f=a(h);if(f)return f;const m=R6(h,n);return o(h,m),m};return s=l,(...h)=>s(D6(...h))},I6=[],Ht=e=>{const t=n=>n[e]||I6;return t.isThemeGetter=!0,t},PP=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,SP=/^\((?:(\w[\w-]*):)?(.+)\)$/i,M6=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,N6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O6=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,j6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,U6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zr=e=>M6.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),Fr=e=>!!e&&Number.isInteger(Number(e)),Yf=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),lr=e=>N6.test(e),CP=()=>!0,z6=e=>O6.test(e)&&!j6.test(e),Eg=()=>!1,F6=e=>U6.test(e),V6=e=>B6.test(e),$6=e=>!Pe(e)&&!Ce(e),H6=e=>ri(e,AP,Eg),Pe=e=>PP.test(e),Pi=e=>ri(e,RP,z6),Q_=e=>ri(e,Q6,Xe),W6=e=>ri(e,LP,CP),K6=e=>ri(e,DP,Eg),J_=e=>ri(e,TP,Eg),G6=e=>ri(e,EP,V6),iu=e=>ri(e,IP,F6),Ce=e=>SP.test(e),Ws=e=>Ki(e,RP),q6=e=>Ki(e,DP),e0=e=>Ki(e,TP),Y6=e=>Ki(e,AP),Z6=e=>Ki(e,EP),ou=e=>Ki(e,IP,!0),X6=e=>Ki(e,LP,!0),ri=(e,t,n)=>{const a=PP.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ki=(e,t,n=!1)=>{const a=SP.exec(e);return a?a[1]?t(a[1]):n:!1},TP=e=>e==="position"||e==="percentage",EP=e=>e==="image"||e==="url",AP=e=>e==="length"||e==="size"||e==="bg-size",RP=e=>e==="length",Q6=e=>e==="number",DP=e=>e==="family-name",LP=e=>e==="number"||e==="weight",IP=e=>e==="shadow",J6=()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),a=Ht("font-weight"),o=Ht("tracking"),s=Ht("leading"),l=Ht("breakpoint"),u=Ht("container"),h=Ht("spacing"),f=Ht("radius"),m=Ht("shadow"),y=Ht("inset-shadow"),v=Ht("text-shadow"),_=Ht("drop-shadow"),x=Ht("blur"),C=Ht("perspective"),S=Ht("aspect"),M=Ht("ease"),R=Ht("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...E(),Ce,Pe],$=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],P=()=>[Ce,Pe,h],Z=()=>[zr,"full","auto",...P()],X=()=>[Fr,"none","subgrid",Ce,Pe],fe=()=>["auto",{span:["full",Fr,Ce,Pe]},Fr,Ce,Pe],he=()=>[Fr,"auto",Ce,Pe],J=()=>["auto","min","max","fr",Ce,Pe],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ue=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...P()],ie=()=>[zr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],F=()=>[zr,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Y=()=>[zr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],z=()=>[e,Ce,Pe],I=()=>[...E(),e0,J_,{position:[Ce,Pe]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ge=()=>["auto","cover","contain",Y6,H6,{size:[Ce,Pe]}],pe=()=>[Yf,Ws,Pi],me=()=>["","none","full",f,Ce,Pe],be=()=>["",Xe,Ws,Pi],Be=()=>["solid","dashed","dotted","double"],Ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[Xe,Yf,e0,J_],Rt=()=>["","none",x,Ce,Pe],Mn=()=>["none",Xe,Ce,Pe],Pn=()=>["none",Xe,Ce,Pe],mt=()=>[Xe,Ce,Pe],Jt=()=>[zr,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lr],breakpoint:[lr],color:[CP],container:[lr],"drop-shadow":[lr],ease:["in","out","in-out"],font:[$6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lr],shadow:[lr],spacing:["px",Xe],text:[lr],"text-shadow":[lr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zr,Pe,Ce,S]}],container:["container"],columns:[{columns:[Xe,Pe,Ce,u]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:B()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[Fr,"auto",Ce,Pe]}],basis:[{basis:[zr,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,zr,"auto","initial","none",Pe]}],grow:[{grow:["",Xe,Ce,Pe]}],shrink:[{shrink:["",Xe,Ce,Pe]}],order:[{order:[Fr,"first","last","none",Ce,Pe]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...ue()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...ue(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ue(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...ue(),"baseline"]}],"place-self":[{"place-self":["auto",...ue()]}],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:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mbs:[{mbs:Q()}],mbe:[{mbe:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:ie()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[u,"screen",...ie()]}],"min-w":[{"min-w":[u,"screen","none",...ie()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...ie()]}],h:[{h:["screen","lh",...ie()]}],"min-h":[{"min-h":["screen","lh","none",...ie()]}],"max-h":[{"max-h":["screen","lh",...ie()]}],"font-size":[{text:["base",n,Ws,Pi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,X6,W6]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Yf,Pe]}],"font-family":[{font:[q6,K6,t]}],"font-features":[{"font-features":[Pe]}],"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,Ce,Pe]}],"line-clamp":[{"line-clamp":[Xe,"none",Ce,Q_]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",Ce,Pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,Pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Be(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",Ce,Pi]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Xe,"auto",Ce,Pe]}],"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",Ce,Pe]}],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",Ce,Pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:ge()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fr,Ce,Pe],radial:["",Ce,Pe],conic:[Fr,Ce,Pe]},Z6,G6]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:be()}],"border-w-x":[{"border-x":be()}],"border-w-y":[{"border-y":be()}],"border-w-s":[{"border-s":be()}],"border-w-e":[{"border-e":be()}],"border-w-bs":[{"border-bs":be()}],"border-w-be":[{"border-be":be()}],"border-w-t":[{"border-t":be()}],"border-w-r":[{"border-r":be()}],"border-w-b":[{"border-b":be()}],"border-w-l":[{"border-l":be()}],"divide-x":[{"divide-x":be()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":be()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Be(),"hidden","none"]}],"divide-style":[{divide:[...Be(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...Be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,Ce,Pe]}],"outline-w":[{outline:["",Xe,Ws,Pi]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",m,ou,iu]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",y,ou,iu]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Xe,Pi]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":be()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",v,ou,iu]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Xe,Ce,Pe]}],"mix-blend":[{"mix-blend":[...Ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ye()}],"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":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[Ce,Pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"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":E()}],"mask-image-conic-pos":[{"mask-conic":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:ge()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Pe]}],filter:[{filter:["","none",Ce,Pe]}],blur:[{blur:Rt()}],brightness:[{brightness:[Xe,Ce,Pe]}],contrast:[{contrast:[Xe,Ce,Pe]}],"drop-shadow":[{"drop-shadow":["","none",_,ou,iu]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Xe,Ce,Pe]}],"hue-rotate":[{"hue-rotate":[Xe,Ce,Pe]}],invert:[{invert:["",Xe,Ce,Pe]}],saturate:[{saturate:[Xe,Ce,Pe]}],sepia:[{sepia:["",Xe,Ce,Pe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Pe]}],"backdrop-blur":[{"backdrop-blur":Rt()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,Ce,Pe]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,Ce,Pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,Ce,Pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,Ce,Pe]}],"backdrop-invert":[{"backdrop-invert":["",Xe,Ce,Pe]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,Ce,Pe]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,Ce,Pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,Ce,Pe]}],"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",Ce,Pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",Ce,Pe]}],ease:[{ease:["linear","initial",M,Ce,Pe]}],delay:[{delay:[Xe,Ce,Pe]}],animate:[{animate:["none",R,Ce,Pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,Ce,Pe]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:Mn()}],"rotate-x":[{"rotate-x":Mn()}],"rotate-y":[{"rotate-y":Mn()}],"rotate-z":[{"rotate-z":Mn()}],scale:[{scale:Pn()}],"scale-x":[{"scale-x":Pn()}],"scale-y":[{"scale-y":Pn()}],"scale-z":[{"scale-z":Pn()}],"scale-3d":["scale-3d"],skew:[{skew:mt()}],"skew-x":[{"skew-x":mt()}],"skew-y":[{"skew-y":mt()}],transform:[{transform:[Ce,Pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Jt()}],"translate-x":[{"translate-x":Jt()}],"translate-y":[{"translate-y":Jt()}],"translate-z":[{"translate-z":Jt()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"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",Ce,Pe]}],"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",Ce,Pe]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[Xe,Ws,Pi,Q_]}],stroke:[{stroke:["none",...z()]}],"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"]}},ej=L6(J6);function Qt(...e){return ej(d6(e))}const tj=T.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[T.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"}),T.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"}),T.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"}),T.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"})]}),nj=T.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:T.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"})}),aj={google:tj,github:nj},rj={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function ij(e){return rj[e]||String(e||"").replace(/-/g," ")}function oj({title:e,subtitle:t,className:n="",onSuccess:a,hideLogo:o=!1}){Pd();const{enabled:s,signedIn:l,refreshUser:u,signInWithPassword:h,signUp:f,signInWithOAuth:m,getPublicAuthConfig:y}=Il(),[v,_]=k.useState("signin"),[x,C]=k.useState(""),[S,M]=k.useState(""),[R,A]=k.useState(""),[E,B]=k.useState(!1),[$,V]=k.useState(null),[P,Z]=k.useState(null),[X,fe]=k.useState(!1),[he,J]=k.useState(!0),[re,ue]=k.useState([]),[Q,ie]=k.useState(8);k.useEffect(()=>{if(!s)return;let I=!0;return J(!0),(async()=>{const{data:W,error:ge}=await y();if(I){if(ge||!W)ue(["google","github"]);else{const pe=Array.isArray(W.oAuthProviders)?W.oAuthProviders:[],me=Array.isArray(W.customOAuthProviders)?W.customOAuthProviders:[];ue([...pe,...me]),typeof W.passwordMinLength=="number"&&W.passwordMinLength>0&&ie(W.passwordMinLength)}J(!1)}})(),()=>{I=!1}},[s,y]),k.useEffect(()=>{l&&a&&a()},[l,a]);const F=k.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),Y=k.useCallback(async I=>{V(null),B(!0);try{const{error:W}=await m(I,F);W&&V(W.message||String(W))}finally{B(!1)}},[m,F]),z=k.useCallback(async I=>{I.preventDefault(),V(null),B(!0);try{if(v==="signup"){const{data:ge,error:pe}=await f({email:x.trim(),password:S,name:R.trim()||void 0});if(pe){V(pe.message||String(pe));return}if(ge?.requireEmailVerification){Z(Ie("login.verify_email_pending")),_("signin");return}await u();return}const{error:W}=await h({email:x.trim(),password:S});if(W){V(W.message||String(W));return}await u()}finally{B(!1)}},[v,x,S,R,f,h,u]);return s?T.jsxs("div",{className:Qt("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",n),children:[T.jsxs("div",{className:"text-center mb-6",children:[!o&&T.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[T.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),T.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white font-oai tracking-tight",children:Ie("shared.app_name")})]}),T.jsx("h2",{className:Qt("text-sm font-semibold text-oai-black dark:text-white tracking-tight mb-1",o&&"text-base font-bold md:text-lg"),children:e||Ie("login_modal.subtitle")}),t&&T.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px] mx-auto",children:t})]}),P&&T.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:P}),$&&T.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:$}),T.jsx("div",{className:"space-y-2.5 mb-5",children:he?T.jsxs("div",{className:"space-y-2.5",children:[T.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),T.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):re.map(I=>T.jsxs("button",{type:"button",disabled:E,onClick:()=>Y(I),className:Qt("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:[aj[I]||null,Ie("login.oauth.continue",{provider:ij(I)})]},I))}),X?T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"relative mb-5",children:[T.jsx("div",{className:"absolute inset-0 flex items-center",children:T.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),T.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:T.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Ie("login_modal.divider_email")})})]}),T.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:[T.jsx("button",{type:"button",className:Qt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",v==="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:()=>{_("signin"),V(null)},children:Ie("login.tab.sign_in")}),T.jsx("button",{type:"button",className:Qt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",v==="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:()=>{_("signup"),V(null)},children:Ie("login.tab.sign_up")})]}),T.jsxs("form",{onSubmit:z,className:"space-y-3",children:[v==="signup"&&T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Ie("login.field.name")}),T.jsx("input",{id:"card-name",type:"text",autoComplete:"name",value:R,onChange:I=>A(I.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:Ie("login.field.name_placeholder")})]}),T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Ie("login.field.email")}),T.jsx("input",{id:"card-email",type:"email",autoComplete:"email",required:!0,value:x,onChange:I=>C(I.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"})]}),T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Ie("login.field.password")}),T.jsx("input",{id:"card-password",type:"password",autoComplete:v==="signup"?"new-password":"current-password",required:!0,minLength:v==="signup"?Q:void 0,value:S,onChange:I=>M(I.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"}),v==="signup"&&T.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:Ie("login.password_hint",{min:String(Q)})})]}),T.jsx("button",{type:"submit",disabled:E,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:Ie(v==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"relative mb-5",children:[T.jsx("div",{className:"absolute inset-0 flex items-center",children:T.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),T.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:T.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Ie("login.divider")})})]}),T.jsxs("button",{type:"button",onClick:()=>fe(!0),className:Qt("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:[T.jsx(zI,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),Ie("login_modal.continue_email")]})]})]}):null}function sj(){const{isOpen:e,closeLoginModal:t}=hM(),{enabled:n}=Il();return k.useEffect(()=>{if(!e)return;const a=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),n?T.jsx(oP,{children:e&&T.jsxs(cl.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:[T.jsx(cl.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),T.jsxs(cl.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 shadow-2xl overflow-hidden",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:a=>a.stopPropagation(),children:[T.jsx("button",{type:"button",onClick:t,className:"absolute right-4 top-4 z-10 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:T.jsx(Zm,{className:"h-5 w-5"})}),T.jsx(oj,{onSuccess:t,className:"p-6 bg-transparent"})]})]})}):null}const lj={},d7="https://tokentracker.statuspage.io/";function cj(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?lj:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||hr()).trim()}function uj(){return hr()}function dj(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 hj=300*1e3,fj=720*60*1e3;function Ag(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function pj(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+fj<=t:!0}async function MP(e,t){const n=hr();if(!Ag(n)||!e)return;const a=n.replace(/\/$/,""),o=Al(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};o&&(s.apikey=o);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:t})})}catch{}}async function mj(e){const t=hr();if(!Ag(t)||!e)return null;const n=t.replace(/\/$/,""),a=Al(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(o.apikey=a);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:o,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:s})});if(!l.ok)return null;const u=await l.json().catch(()=>null),h=typeof u?.token=="string"?u.token:null,f=typeof u?.device_id=="string"?u.device_id:null;return!h||!f?null:{token:h,deviceId:f,issuedAt:typeof u?.created_at=="string"?u.created_at:new Date().toISOString()}}async function t0(e){const{deviceToken:t,insforgeBaseUrl:n}=e,a={deviceToken:t},o=n||hr();Ag(o)&&(a.insforgeBaseUrl=o.trim());const s=await wd(),l=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...s},body:JSON.stringify(a)}),u=await l.json().catch(()=>({}));if(!l.ok){const h=typeof u.error=="string"?u.error:`HTTP ${l.status}`;throw new Error(h)}return u}async function n0(e){const t=await e();if(!t)return null;const n=qw();if(n&&!pj(n))return n;const a=await mj(t);return a?(mD(a),a):null}async function NP(e){let t=await e();if(!t)return null;let n=await n0(async()=>t);if(!n)return t;try{return await t0({deviceToken:n.token,insforgeBaseUrl:hr()}),t}catch(a){if(!qw()||(Yw(),t=await e(),!t)||(n=await n0(async()=>t),!n))throw a;return await t0({deviceToken:n.token,insforgeBaseUrl:hr()}),t}}async function gj(e){const t=gD();if(Date.now()-t<hj)return;const n=await NP(e);n&&(Zw(Date.now()),await MP(n,"cloud-sync-auto"))}async function h7(e){const t=await NP(e);t&&(Zw(Date.now()),await MP(t,"cloud-sync-now"))}function yj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function vj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||yj(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function bj(){const e=Wn(),t=Il(),n=k.useRef(!1);k.useEffect(()=>{if(!fD()||!vj(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!pD())return;let a=!1;const o=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await gj(()=>t.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(o)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function kj(){const e=k.useContext(Rx);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}const Yp="tt.sidebarCollapsed",Zf="0.39.16".trim();function _j(){if(typeof window>"u")return!1;const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"||e==="::1"}function OP({includeLeaderboard:e=!_j()}={}){const t=[{id:"usage",to:"/dashboard",icon:CI,label:Ie("nav.usage")},{id:"limits",to:"/limits",icon:MI,label:Ie("nav.limits")}];return e&&t.push({id:"leaderboard",to:"/leaderboard",icon:rM,label:Ie("nav.leaderboard")}),[{id:"general",label:Ie("nav.group.general"),items:t},{id:"tools",label:Ie("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:UI,label:Ie("nav.widgets")},{id:"skills",to:"/skills",icon:GI,label:Ie("nav.skills")},{id:"ip-check",to:"/ip-check",icon:OI,label:Ie("nav.ip_check")}]},{id:"account",label:Ie("nav.group.account"),items:[{id:"settings",to:"/settings",icon:JI,label:Ie("nav.settings")}]}]}function wj(){if(typeof window>"u")return!0;try{const e=window.localStorage.getItem(Yp);return e!=="0"}catch{return!0}}function xj(){const[e,t]=k.useState(wj),n=k.useCallback(()=>{t(a=>{const o=!a;try{typeof window<"u"&&window.localStorage.setItem(Yp,o?"1":"0")}catch{}return o})},[]);return k.useEffect(()=>{if(typeof window>"u")return;const a=o=>{o.key===Yp&&t(o.newValue!=="0")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function Pj(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function Sj({label:e,collapsed:t,first:n}){return t?n?null:T.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):T.jsx("div",{className:Qt("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 Cj({item:e,collapsed:t,active:n,onClick:a}){const o=e.icon;return T.jsxs(gd,{to:e.to,onClick:a,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:Qt("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:[T.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:T.jsx(o,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&T.jsx("span",{className:"truncate",children:e.label})]})}function Tj({collapsed:e}){if(!Zf)return null;const t=Ie("nav.version",{version:Zf});return T.jsx("div",{className:Qt("px-2 text-[10px] font-medium tabular-nums text-oai-gray-400 dark:text-oai-gray-600",e?"text-center":"truncate"),title:t,"aria-label":t,children:`v${Zf}`})}function Ej({as:e="button",title:t,onClick:n,href:a,children:o,className:s,...l}){const u=Qt("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"?T.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...l,children:o}):T.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...l,children:o})}const Aj=[{value:"light",label:"Light",Icon:Ax},{value:"dark",label:"Dark",Icon:Ex},{value:"system",label:"System",Icon:HI}];function Rj({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[o,s]=k.useState(!1),l=k.useRef(null),u=t==="dark"?Ex:Ax;return k.useEffect(()=>{if(!o)return;const h=m=>{l.current&&!l.current.contains(m.target)&&s(!1)},f=m=>{m.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",f)}},[o]),T.jsxs("div",{ref:l,className:"relative",children:[T.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":o,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(h=>!h),className:Qt("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",a?"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:T.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),o&&T.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:Aj.map(({value:h,label:f,Icon:m})=>{const y=e===h;return T.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),s(!1)},className:Qt("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:[T.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),T.jsx("span",{children:f})]},h)})})]})}function jP({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:o,glassChrome:s=!1}){const u=Wn()?.pathname||"/",{theme:h,resolvedTheme:f,setTheme:m}=kj(),{resolvedLocale:y}=Pd(),v=k.useMemo(()=>OP(),[y]);return T.jsxs(T.Fragment,{children:[a?T.jsx("div",{className:"flex justify-end px-2 pt-2 pb-2",children:T.jsx("button",{type:"button",onClick:o,"aria-label":Ie("nav.close_menu"),title:Ie("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:T.jsx(Zm,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})}):null,T.jsx("nav",{"aria-label":Ie("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:v.map((_,x)=>T.jsxs("div",{className:"flex flex-col",children:[T.jsx(Sj,{label:_.label,collapsed:e,first:x===0}),T.jsx("div",{className:"flex flex-col gap-0.5",children:_.items.filter(C=>!(C.to==="/widgets"&&Km())).map(C=>T.jsx(Cj,{item:C,collapsed:e,active:Pj(u,C.to),onClick:n},C.id))})]},_.id))}),T.jsxs("div",{className:"px-2 py-3 space-y-2",children:[T.jsx(Tj,{collapsed:e}),T.jsxs("div",{className:Qt("flex items-center",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[T.jsx(Rj,{theme:h,resolvedTheme:f,onSetTheme:m,glassChrome:s}),T.jsx("div",{className:"flex items-center gap-1.5",children:!a&&T.jsx("button",{type:"button",onClick:t,"aria-label":Ie(e?"nav.expand":"nav.collapse"),title:Ie(e?"nav.expand":"nav.collapse"),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:e?T.jsx(RI,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0}):T.jsx(EI,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})})]})]})]})}function Dj({collapsed:e,onToggleCollapsed:t}){const n=k.useMemo(()=>typeof window>"u"?!1:wa()||Wm(),[]);return T.jsx("aside",{"aria-label":Ie("nav.aside_label"),className:Qt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:T.jsx(jP,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function Lj({open:e,onClose:t}){return k.useEffect(()=>{if(!e)return;const n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),k.useEffect(()=>{if(!e)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e]),e?T.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[T.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),T.jsx("aside",{"aria-label":Ie("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:T.jsx(jP,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function Ij({onOpenDrawer:e}){return T.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:[T.jsx(Ej,{title:Ie("nav.menu"),onClick:e,children:T.jsx(VI,{className:"h-5 w-5","aria-hidden":!0})}),T.jsxs(gd,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[T.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),T.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),T.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function Mj({children:e}){const{collapsed:t,toggle:n}=xj(),[a,o]=k.useState(!1),s=k.useCallback(()=>o(!0),[]),l=k.useCallback(()=>o(!1),[]),u=k.useMemo(()=>typeof window>"u"?!1:wa()||Wm(),[]);return T.jsxs("div",{className:Qt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",Km()&&"tt-native-glass-shell",u?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[u&&T.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),T.jsxs("div",{className:"flex-1 min-h-0 flex",children:[T.jsx(Dj,{collapsed:t,onToggleCollapsed:n}),T.jsx(Lj,{open:a,onClose:l}),T.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:T.jsxs("div",{className:Qt("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:[T.jsx(Ij,{onOpenDrawer:s}),T.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}function Nj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})})}function Oj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:T.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"})})}function jj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})})}function Uj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"})})}function Bj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})})}function zj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M4.125 20.149c-2.69 5.959 3.036 7.453 7.26 3.966 1.24 3.91 5.898.993 7.569-2.036 3.682-6.678 2.195-13.49 1.813-14.895-2.617-9.582-15.699-9.592-17.95.049-.526 1.687-.535 3.606-.833 5.598-.15 1.005-.256 1.646-.645 2.703-.223.607-.53 1.147-1.014 2.056-.75 1.412-.434 4.138 3.434 2.724v.001ZM11.895 11.332c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.395.9.395 1.578 0 1.283-.493 2.048-1.319 2.048Zm4.416 0c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.396.9.396 1.578 0 1.283-.494 2.048-1.32 2.048Z"})})}function Fj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function Vj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:[T.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),T.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]})}function $j({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"})})}function Hj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 60",fill:"none",className:t,"aria-hidden":"true",children:[T.jsx("path",{fill:"currentColor",d:"M37.2114 3.75318C37.6821 3.33106 37.7106 3.31457 38.0558 3.29385C38.6149 3.2531 39.1272 3.52199 39.9989 4.31564C42.0356 6.16652 44.8714 9.97183 46.6346 13.2212L47.3163 14.4819L48.2782 14.9605C49.2072 15.4299 50.7308 16.3923 51.3672 16.9085C51.655 17.1464 51.6956 17.1508 51.9947 17.0344C53.3454 16.5084 55.2803 17.206 56.9869 18.8432C58.5231 20.3155 59.9943 22.8312 60.558 24.9308C60.6403 25.2687 60.7493 25.9952 60.7891 26.5362C60.9177 28.4358 60.3092 29.9532 59.1362 30.64C58.8965 30.7784 58.8801 30.8158 58.8868 31.4132C58.9409 34.2583 58.1741 37.0985 56.6335 39.8679C54.8946 42.9773 51.7981 46.1938 47.6074 49.2243C45.357 50.8619 40.0323 53.964 37.6248 55.0532C31.8578 57.6496 27.2346 58.646 23.2188 58.154C20.8236 57.8638 18.1124 56.9287 16.5082 55.8433C16.086 55.5515 16.0191 55.5329 15.6966 55.6251C13.9793 56.1185 11.73 55.1053 9.81931 52.9844C9.05725 52.1366 7.82714 50.0548 7.42839 48.9409C6.50606 46.3339 6.68976 43.9816 7.91836 42.5767C8.23573 42.2149 8.2453 42.1995 8.17598 41.5912C8.06148 40.5951 8.00971 39.1206 8.06202 38.1692L8.10361 37.2803L6.76977 34.9212C4.70378 31.2451 3.3912 28.1582 2.88489 25.7998C2.61762 24.5066 2.63385 23.9324 2.96214 23.5078C3.16198 23.2515 3.81796 22.9866 4.60785 22.8407C6.59665 22.4917 10.9334 22.8076 15.7581 23.6595L16.259 23.7458L17.3608 22.7713C19.1891 21.1519 20.4038 20.244 22.6429 18.8478C24.9768 17.3876 27.6108 16.1858 30.577 15.2346L31.5295 14.9294L32.0526 13.5561C33.9257 8.61146 35.8437 4.96584 37.2114 3.75318ZM21.5208 29.0919C19.404 30.314 18.3453 30.9251 17.5676 31.6099C14.4179 34.3835 13.2414 38.777 14.5823 42.7537C14.9135 43.7357 15.5247 44.7942 16.7469 46.9111C17.9691 49.0279 18.5801 50.0865 19.2649 50.8643C22.0385 54.014 26.4316 55.1918 30.4084 53.8509C31.3904 53.5198 32.4489 52.9085 34.5657 51.6863L46.7442 44.6551C48.8613 43.4328 49.9205 42.8214 50.6983 42.1365C53.8479 39.363 55.0245 34.9695 53.6835 30.9927C53.3524 30.0107 52.7412 28.9522 51.519 26.8354C50.2968 24.7185 49.6858 23.66 49.0009 22.8822C46.2274 19.7325 41.8342 18.5547 37.8575 19.8956C36.8754 20.2267 35.8163 20.8383 33.6993 22.0606L21.5208 29.0919Z"}),T.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:T.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),T.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:T.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function Wj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:T.jsx("path",{d:"M7 2h10a5 5 0 015 5v10a5 5 0 01-5 5H7a5 5 0 01-5-5V7a5 5 0 015-5zm0 4.5v11h2.35v-4.55h5.3V17.5H17v-11h-2.35v4.1h-5.3V6.5H7z"})})}function Kj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:t,children:T.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function Gj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:T.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:T.jsx("path",{d:"M3.17890888,3.6 L3.17890888,0 L16,0 L16,3.6 L3.17890888,3.6 Z M9.642,7.2 L9.64218223,10.8 L0,10.8 L0,3.6 L16,3.6 L16,7.2 L9.642,7.2 Z M3.17890888,18 L3.178,14.4 L0,14.4 L0,10.8 L16,10.8 L16,18 L3.17890888,18 Z",fillRule:"nonzero"})})})}function qj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[T.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),T.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),T.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),T.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),T.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),T.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function Yj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[T.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),T.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),T.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}function Zj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[T.jsx("path",{d:"M9 3v2"}),T.jsx("path",{d:"M15 3v2"}),T.jsx("rect",{x:"4",y:"6",width:"16",height:"13",rx:"3"}),T.jsx("circle",{cx:"9",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),T.jsx("circle",{cx:"15",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),T.jsx("path",{d:"M9 16h6"})]})}const Xj={CLAUDE:Nj,CODEBUDDY:Hj,CODEX:Oj,COPILOT:$j,CRAFT:Gj,CURSOR:jj,DROID:Zj,GEMINI:Uj,GITHUB:Kj,GROK:Bj,HERMES:Wj,KIMI:Vj,KIRO:zj,OPENCODE:Fj,OMP:qj,PI:Yj},Qj={ANTIGRAVITY:"/brand-logos/antigravity.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",GEMINI:"/brand-logos/gemini.svg",HERMES:"/brand-logos/hermes.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"};function Jj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:T.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function e8({provider:e,size:t=16,color:n,className:a=""}){const o=e?.toUpperCase?.()||"",s=Qj[o];if(s)return T.jsx("img",{src:s,alt:"",width:t,height:t,className:a,style:{width:t,height:t,objectFit:"contain"},"aria-hidden":!0});const l=Xj[o];return l?T.jsx(l,{size:t,className:a}):T.jsx(Jj,{size:t,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${a}`})}const UP="tokentracker-skills";async function Gi(e){const t=new URL(`/functions/${UP}`,window.location.origin);if(e)for(const[o,s]of Object.entries(e))s!=null&&s!==""&&t.searchParams.set(o,String(s));const n=await fetch(t.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),a=await n.json().catch(()=>null);if(!n.ok)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}async function ii(e){const t=await wd(),n=await fetch(`/functions/${UP}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...t},cache:"no-store",body:JSON.stringify(e)}),a=await n.json().catch(()=>null);if(!n.ok||a?.ok===!1)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}function t8(){return Gi({mode:"installed"})}function f7(e={}){return Gi({mode:"discover",...e.force?{force:1}:{}})}function p7(e,t=0,n=20){return Gi({mode:"search",q:e,offset:t,limit:n})}function m7(){return Gi({mode:"repos"})}function g7(e,t){return ii({action:"install",skill:e,targets:t})}function y7(e){return ii({action:"uninstall",id:e})}function v7(e){return ii({action:"restore",id:e})}function b7(e,t){return ii({action:"set_targets",id:e,targets:t})}function k7(e,t){return ii({action:"import_local",directory:e,targets:t})}function _7(e,t){return ii({action:"delete_local",directory:e,targets:t||[]})}function w7(e){return ii({action:"add_repo",repo:e})}function x7(e,t){return ii({action:"remove_repo",owner:e,name:t})}function P7(e={}){return Gi({mode:"popular",...e.force?{force:1}:{}})}function S7(e={}){return Gi({mode:"updates",...e.force?{force:1}:{}})}function C7(e={}){return Gi({mode:"skill_usage",...e.force?{force:1}:{}})}const n8=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function a8(){const e=pd(),t=u6(),[n,a]=k.useState(!1),[o,s]=k.useState(""),[l,u]=k.useState(0),[h,f]=k.useState([]),m=k.useRef(null),y=k.useRef(null);k.useEffect(()=>{const A=E=>{(E.metaKey||E.ctrlKey)&&(E.key==="k"||E.key==="K")&&(E.preventDefault(),a($=>!$))};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[]),k.useEffect(()=>{if(!n)return;s(""),u(0);const A=requestAnimationFrame(()=>m.current?.focus());return n8&&!h.length&&t8().then(E=>f(E?.skills||[])).catch(()=>f([])),()=>cancelAnimationFrame(A)},[n,h.length]);const v=k.useMemo(()=>{const A=OP().flatMap(B=>B.items.map($=>({kind:"page",id:`page:${$.id}`,label:$.label,sub:Ie("cmdk.group.pages"),Icon:$.icon,run:()=>e($.to)}))),E=(h||[]).map(B=>({kind:"skill",id:`skill:${B.id||B.directory}`,label:B.name||B.directory,sub:B.repoOwner&&B.repoName?`${B.repoOwner}/${B.repoName}`:Ie("cmdk.group.skills"),provider:(B.targets||[])[0]||"claude",run:()=>e(`/skills?skill=${encodeURIComponent(B.directory||B.id)}`)}));return[...A,...E]},[e,h]),_=k.useMemo(()=>{const A=o.trim().toLowerCase();return A?v.filter(E=>E.label.toLowerCase().includes(A)||String(E.sub||"").toLowerCase().includes(A)):v},[v,o]);k.useEffect(()=>{l>=_.length&&u(_.length?_.length-1:0)},[l,_.length]),k.useEffect(()=>{if(!n)return;y.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,n]);const x=k.useCallback(()=>a(!1),[]),C=k.useCallback(A=>{A&&(x(),A.run())},[x]),S=A=>{A.key==="ArrowDown"?(A.preventDefault(),u(E=>Math.min(E+1,Math.max(0,_.length-1)))):A.key==="ArrowUp"?(A.preventDefault(),u(E=>Math.max(E-1,0))):A.key==="Enter"?(A.preventDefault(),C(_[l])):A.key==="Escape"&&(A.preventDefault(),x())},M={duration:t?0:.12},R=t?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return T.jsx(oP,{children:n?T.jsxs(cl.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:t?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:M,children:[T.jsx("button",{type:"button","aria-label":Ie("cmdk.close"),onClick:x,className:"absolute inset-0 cursor-default bg-oai-black/40"}),T.jsxs(cl.div,{role:"dialog","aria-modal":"true","aria-label":Ie("cmdk.open_aria"),initial:t?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:t?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:R,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[T.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[T.jsx(XI,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),T.jsx("input",{ref:m,type:"text",value:o,onChange:A=>{s(A.target.value),u(0)},onKeyDown:S,"aria-label":Ie("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":_[l]?`cmdk-opt-${l}`:void 0,role:"combobox","aria-expanded":"true",placeholder:Ie("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),T.jsx("div",{ref:y,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:_.length===0?T.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:Ie("cmdk.empty")}):_.map((A,E)=>{const B=E===l;return T.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${E}`,"data-cmdk-index":E,"aria-selected":B,onMouseMove:()=>u(E),onClick:()=>C(A),className:Qt("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",B?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[T.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:A.kind==="skill"?T.jsx(e8,{provider:A.provider,size:16}):T.jsx(A.Icon,{className:"h-4 w-4","aria-hidden":!0})}),T.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:A.label}),T.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:A.sub}),B?T.jsx(LI,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},A.id)})})]})]}):null})}function Rd(){return typeof window<"u"}function Rg(e){return Dg(e)?(e.nodeName||"").toLowerCase():"#document"}function ti(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function r8(e){var t;return(t=(Dg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Dg(e){return Rd()?e instanceof Node||e instanceof ti(e).Node:!1}function BP(e){return Rd()?e instanceof Element||e instanceof ti(e).Element:!1}function Dd(e){return Rd()?e instanceof HTMLElement||e instanceof ti(e).HTMLElement:!1}function Zp(e){return!Rd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ti(e).ShadowRoot}function zP(e){const{overflow:t,overflowX:n,overflowY:a,display:o}=VP(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&o!=="inline"&&o!=="contents"}function T7(e){return/^(table|td|th)$/.test(Rg(e))}function i8(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const o8=/transform|translate|scale|rotate|perspective|filter/,s8=/paint|layout|strict|content/,Si=e=>!!e&&e!=="none";let Xf;function l8(e){const t=BP(e)?VP(e):e;return Si(t.transform)||Si(t.translate)||Si(t.scale)||Si(t.rotate)||Si(t.perspective)||!c8()&&(Si(t.backdropFilter)||Si(t.filter))||o8.test(t.willChange||"")||s8.test(t.contain||"")}function E7(e){let t=Xp(e);for(;Dd(t)&&!FP(t);){if(l8(t))return t;if(i8(t))return null;t=Xp(t)}return null}function c8(){return Xf==null&&(Xf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Xf}function FP(e){return/^(html|body|#document)$/.test(Rg(e))}function VP(e){return ti(e).getComputedStyle(e)}function A7(e){return BP(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xp(e){if(Rg(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zp(e)&&e.host||r8(e);return Zp(t)?t.host:t}function $P(e){const t=Xp(e);return FP(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dd(t)&&zP(t)?t:$P(t)}function a0(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=$P(e),s=o===((a=e.ownerDocument)==null?void 0:a.body),l=ti(o);if(s){const u=u8(l);return t.concat(l,l.visualViewport||[],zP(o)?o:[],u&&n?a0(u):[])}else return t.concat(o,a0(o,[],n))}function u8(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bo(e){return e?.ownerDocument||document}const r0={};function Ul(e,t){const n=k.useRef(r0);return n.current===r0&&(n.current=e(t)),n}const Qf=cm[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],d8=Qf&&Qf!==k.useLayoutEffect?Qf:e=>e();function Ln(e){const t=Ul(h8).current;return t.next=e,d8(t.effect),t.trampoline}function h8(){const e={next:void 0,callback:f8,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function f8(){}let i0=0;function HP(e){return i0+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${i0}`}const p8=[];function WP(e){k.useEffect(e,p8)}const Ks=0;class wl{static create(){return new wl}currentId=Ks;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ks,n()},t)}isStarted(){return this.currentId!==Ks}clear=()=>{this.currentId!==Ks&&(clearTimeout(this.currentId),this.currentId=Ks)};disposeEffect=()=>this.clear}function R7(){const e=Ul(wl.create).current;return WP(e.disposeEffect),e}const ns=typeof navigator<"u",Jf=y8(),KP=b8(),GP=v8(),D7=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),L7=Jf.platform==="MacIntel"&&Jf.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Jf.platform),m8=ns&&/apple/i.test(navigator.vendor),I7=ns&&/android/i.test(KP)||/android/i.test(GP);ns&&KP.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const g8=GP.includes("jsdom/");function y8(){if(!ns)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function v8(){if(!ns)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function b8(){if(!ns)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const o0="data-base-ui-focusable",M7="active",N7="selected",k8="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",O7="ArrowLeft",j7="ArrowRight",U7="ArrowUp",B7="ArrowDown";function xl(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ni(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Zp(n)){let a=t;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function Qp(e){return"composedPath"in e?e.composedPath()[0]:e.target}function z7(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function F7(e){return e.matches("html,body")}function Ld(e){return e?.ownerDocument||document}function _8(e){return Dd(e)&&e.matches(k8)}function V7(e){return e?e.getAttribute("role")==="combobox"&&_8(e):!1}function Jp(e){if(!e||g8)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function $7(e){return e?e.hasAttribute(o0)?e:e.querySelector(`[${o0}]`)||e:null}function Bl(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(a=>n.searchParams.append("args[]",a)),`Base UI error #${e}; visit ${n} for the full message.`}var w8=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ld=w8.join(","),qP=typeof Element>"u",Zo=qP?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,cd=!qP&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ud=function(t,n){var a;n===void 0&&(n=!0);var o=t==null||(a=t.getAttribute)===null||a===void 0?void 0:a.call(t,"inert"),s=o===""||o==="true",l=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ud(t.parentNode));return l},x8=function(t){var n,a=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return a===""||a==="true"},YP=function(t,n,a){if(ud(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ld));return n&&Zo.call(t,ld)&&o.unshift(t),o=o.filter(a),o},dd=function(t,n,a){for(var o=[],s=Array.from(t);s.length;){var l=s.shift();if(!ud(l,!1))if(l.tagName==="SLOT"){var u=l.assignedElements(),h=u.length?u:l.children,f=dd(h,!0,a);a.flatten?o.push.apply(o,f):o.push({scopeParent:l,candidates:f})}else{var m=Zo.call(l,ld);m&&a.filter(l)&&(n||!t.includes(l))&&o.push(l);var y=l.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(l),v=!ud(y,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(l));if(y&&v){var _=dd(y===!0?l.children:y.children,!0,a);a.flatten?o.push.apply(o,_):o.push({scopeParent:l,candidates:_})}else s.unshift.apply(s,l.children)}}return o},ZP=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},XP=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||x8(t))&&!ZP(t)?0:t.tabIndex},P8=function(t,n){var a=XP(t);return a<0&&n&&!ZP(t)?0:a},S8=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},QP=function(t){return t.tagName==="INPUT"},C8=function(t){return QP(t)&&t.type==="hidden"},T8=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(a){return a.tagName==="SUMMARY"});return n},E8=function(t,n){for(var a=0;a<t.length;a++)if(t[a].checked&&t[a].form===n)return t[a]},A8=function(t){if(!t.name)return!0;var n=t.form||cd(t),a=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=a(window.CSS.escape(t.name));else try{o=a(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var s=E8(o,t.form);return!s||s===t},R8=function(t){return QP(t)&&t.type==="radio"},D8=function(t){return R8(t)&&!A8(t)},L8=function(t){var n,a=t&&cd(t),o=(n=a)===null||n===void 0?void 0:n.host,s=!1;if(a&&a!==t){var l,u,h;for(s=!!((l=o)!==null&&l!==void 0&&(u=l.ownerDocument)!==null&&u!==void 0&&u.contains(o)||t!=null&&(h=t.ownerDocument)!==null&&h!==void 0&&h.contains(t));!s&&o;){var f,m,y;a=cd(o),o=(f=a)===null||f===void 0?void 0:f.host,s=!!((m=o)!==null&&m!==void 0&&(y=m.ownerDocument)!==null&&y!==void 0&&y.contains(o))}}return s},s0=function(t){var n=t.getBoundingClientRect(),a=n.width,o=n.height;return a===0&&o===0},I8=function(t,n){var a=n.displayCheck,o=n.getShadowRoot;if(a==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var l=Zo.call(t,"details>summary:first-of-type"),u=l?t.parentElement:t;if(Zo.call(u,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof o=="function"){for(var h=t;t;){var f=t.parentElement,m=cd(t);if(f&&!f.shadowRoot&&o(f)===!0)return s0(t);t.assignedSlot?t=t.assignedSlot:!f&&m!==t.ownerDocument?t=m.host:t=f}t=h}if(L8(t))return!t.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return s0(t);return!1},M8=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var a=0;a<n.children.length;a++){var o=n.children.item(a);if(o.tagName==="LEGEND")return Zo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},em=function(t,n){return!(n.disabled||C8(n)||I8(n,t)||T8(n)||M8(n))},tm=function(t,n){return!(D8(n)||XP(n)<0||!em(t,n))},N8=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},JP=function(t){var n=[],a=[];return t.forEach(function(o,s){var l=!!o.scopeParent,u=l?o.scopeParent:o,h=P8(u,l),f=l?JP(o.candidates):u;h===0?l?n.push.apply(n,f):n.push(u):a.push({documentOrder:s,tabIndex:h,item:o,isScope:l,content:f})}),a.sort(S8).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Lg=function(t,n){n=n||{};var a;return n.getShadowRoot?a=dd([t],n.includeContainer,{filter:tm.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:N8}):a=YP(t,n.includeContainer,tm.bind(null,n)),JP(a)},H7=function(t,n){n=n||{};var a;return n.getShadowRoot?a=dd([t],n.includeContainer,{filter:em.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):a=YP(t,n.includeContainer,em.bind(null,n)),a},W7=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Zo.call(t,ld)===!1?!1:tm(n,t)};const Ig=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eS(e,t){const n=Lg(e,Ig()),a=n.length;if(a===0)return;const o=xl(Ld(e)),s=n.indexOf(o),l=s===-1?t===1?0:a-1:s+t;return n[l]}function O8(e){return eS(Ld(e).body,1)||e}function j8(e){return eS(Ld(e).body,-1)||e}function tS(e,t){if(!e)return null;const n=Lg(Ld(e).body,Ig()),a=n.length;if(a===0)return null;const o=n.indexOf(e);if(o===-1)return null;const s=(o+t+a)%a;return n[s]}function K7(e){return tS(e,1)}function G7(e){return tS(e,-1)}function ep(e,t){const n=t||e.currentTarget,a=e.relatedTarget;return!a||!Ni(n,a)}function U8(e){Lg(e,Ig()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function l0(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const a=n.dataset.tabindex;delete n.dataset.tabindex,a?n.setAttribute("tabindex",a):n.removeAttribute("tabindex")})}const Mg=k.createContext(void 0);function Ng(){const e=k.useContext(Mg);if(!e)throw new Error(Bl(73));return e}function tp(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const B8=function(t){const{children:n,timeout:a=5e3,limit:o=3,toastManager:s}=t,[l,u]=k.useState([]),[h,f]=k.useState(!1),[m,y]=k.useState(!1),[v,_]=k.useState(null);l.length===0&&(h&&f(!1),m&&y(!1));const x=h||m,C=k.useRef(new Map),S=k.useRef(null),M=k.useRef(!0),R=k.useRef(!1);function A(J){const re=xl(Bo(S.current));if(!S.current||!Ni(S.current,re)||!Jp(re))return;const ue=l.findIndex(F=>F.id===J);let Q=null,ie=ue+1;for(;ie<l.length;){if(l[ie].transitionStatus!=="ending"){Q=l[ie];break}ie+=1}if(!Q)for(ie=ue-1;ie>=0;){if(l[ie].transitionStatus!=="ending"){Q=l[ie];break}ie-=1}Q?Q.ref?.current?.focus():v?.focus({preventScroll:!0})}const E=Ln(()=>{R.current||(R.current=!0,C.current.forEach(J=>{if(J.timeout){J.timeout.clear();const re=Date.now()-J.start,ue=J.delay-re;J.remaining=ue>0?ue:0}}))}),B=Ln(()=>{R.current&&(R.current=!1,C.current.forEach((J,re)=>{J.remaining=J.remaining>0?J.remaining:J.delay,J.timeout??=wl.create(),J.timeout.start(J.remaining,()=>{C.current.delete(re),J.callback()}),J.start=Date.now()}))}),$=Ln(J=>{u(Q=>{const ie=Q.map(Y=>Y.id===J?{...Y,transitionStatus:"ending",height:0}:Y),F=ie.filter(Y=>Y.transitionStatus!=="ending");return ie.map(Y=>{if(Y.transitionStatus==="ending")return Y;const z=F.indexOf(Y)>=o;return{...Y,limited:z}})});const re=C.current.get(J);re&&re.timeout&&(re.timeout.clear(),C.current.delete(J)),l.find(Q=>Q.id===J)?.onClose?.(),A(J),l.length===1&&(f(!1),y(!1))}),V=Ln(J=>{u(ue=>ue.filter(Q=>Q.id!==J)),l.find(ue=>ue.id===J)?.onRemove?.()}),P=Ln((J,re,ue)=>{const Q=Date.now(),ie=M.current&&!h&&!m,F=ie?wl.create():void 0;F?.start(re,()=>{C.current.delete(J),ue()}),C.current.set(J,{timeout:F,start:ie?Q:0,delay:re,remaining:re,callback:ue})}),Z=Ln(J=>{const re=J.id||HP("toast"),ue={...J,id:re,transitionStatus:"starting"};u(ie=>{const F=[ue,...ie],Y=F.filter(z=>z.transitionStatus!=="ending");if(Y.length>o){const z=Y.length-o,I=Y.slice(-z);return F.map(W=>I.some(ge=>ge.id===W.id)?{...W,limited:!0}:{...W,limited:!1})}return F.map(z=>({...z,limited:!1}))});const Q=ue.timeout??a;return ue.type!=="loading"&&Q>0&&P(re,Q,()=>$(re)),(h||m||!M.current)&&E(),re}),X=Ln((J,re)=>{const ue=l.find(pe=>pe.id===J)??null,Q=ue?{...ue,...re}:null;if($i.flushSync(()=>{u(pe=>pe.map(me=>me.id===J?{...me,...re}:me))}),!Q)return;const ie=Q.timeout??a,F=ue?.timeout??a,Y=Object.hasOwn(re,"timeout"),z=Q.transitionStatus!=="ending"&&Q.type!=="loading"&&ie>0,I=C.current.has(J),W=F!==ie,ge=ue?.type==="loading";if(!z&&I){C.current.get(J)?.timeout?.clear(),C.current.delete(J);return}if(z&&(!I||W||Y||ge)){const pe=C.current.get(J);pe&&(pe.timeout?.clear(),C.current.delete(J)),P(J,ie,()=>$(J)),(h||m||!M.current)&&E()}}),fe=Ln((J,re)=>{const ue=tp(re.loading),Q=Z({...ue,type:"loading"}),ie=J.then(F=>{const Y=tp(re.success,F);return X(Q,{...Y,type:"success",timeout:Y.timeout}),F}).catch(F=>{const Y=tp(re.error,F);return X(Q,{...Y,type:"error",timeout:Y.timeout}),Promise.reject(F)});return{}.hasOwnProperty.call(re,"setPromise")&&re.setPromise(ie),ie});k.useEffect(function(){return s?s[" subscribe"](({action:ue,options:Q})=>{const ie=Q.id;ue==="promise"&&Q.promise?fe(Q.promise,Q):ue==="update"&&ie?X(ie,Q):ue==="close"&&ie?$(ie):Z(Q)}):void 0},[Z,X,P,a,s,fe,$]);const he=k.useMemo(()=>({toasts:l,setToasts:u,hovering:h,setHovering:f,focused:m,setFocused:y,expanded:x,add:Z,close:$,remove:V,update:X,promise:fe,pauseTimers:E,resumeTimers:B,prevFocusElement:v,setPrevFocusElement:_,viewportRef:S,scheduleTimer:P,windowFocusedRef:M}),[Z,$,m,h,x,E,v,fe,V,B,P,l,X]);return T.jsx(Mg.Provider,{value:he,children:n})},nS={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},aS={...nS,position:"fixed",top:0,left:0},q7={...nS,position:"absolute"},z8=()=>{},zl=typeof document<"u"?k.useLayoutEffect:z8,ul=k.forwardRef(function(t,n){const[a,o]=k.useState();zl(()=>{m8&&o("button")},[]);const s={tabIndex:0,role:a};return T.jsx("span",{...t,ref:n,style:aS,"aria-hidden":a?void 0:!0,...s,"data-base-ui-focus-guard":""})}),F8=k.createContext(void 0);function c0(e,t,n,a){const o=Ul(rS).current;return $8(o,e,t,n,a)&&iS(o,[e,t,n,a]),o.callback}function V8(e){const t=Ul(rS).current;return H8(t,e)&&iS(t,e),t.callback}function rS(){return{callback:null,cleanup:null,refs:[]}}function $8(e,t,n,a,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==a||e.refs[3]!==o}function H8(e,t){return e.refs.length!==t.length||e.refs.some((n,a)=>n!==t[a])}function iS(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const a=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(a[o]=l);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=a[o];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}const W8=parseInt(k.version,10);function oS(e){return W8>=e}function u0(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return(oS(19)?n?.ref:t.ref)??null}function nm(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function K8(e,t){const n={};for(const a in e){const o=e[a];if(t?.hasOwnProperty(a)){const s=t[a](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${a.toLowerCase()}`]="":o&&(n[`data-${a.toLowerCase()}`]=o.toString())}return n}function G8(e,t){return typeof e=="function"?e(t):e}function q8(e,t){return typeof e=="function"?e(t):e}const dl={};function sS(e,t,n,a,o){let s={...am(e,dl)};return t&&(s=Js(s,t)),n&&(s=Js(s,n)),a&&(s=Js(s,a)),o&&(s=Js(s,o)),s}function Y8(e){if(e.length===0)return dl;if(e.length===1)return am(e[0],dl);let t={...am(e[0],dl)};for(let n=1;n<e.length;n+=1)t=Js(t,e[n]);return t}function Js(e,t){return lS(t)?t(e):Z8(e,t)}function Z8(e,t){if(!t)return e;for(const n in t){const a=t[n];switch(n){case"style":{e[n]=nm(e.style,a);break}case"className":{e[n]=cS(e.className,a);break}default:X8(n,a)?e[n]=Q8(e[n],a):e[n]=a}}return e}function X8(e,t){const n=e.charCodeAt(0),a=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&a===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function lS(e){return typeof e=="function"}function am(e,t){return lS(e)?e(t):e??dl}function Q8(e,t){return t?e?n=>{if(J8(n)){const o=n;rm(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const a=t(n);return e?.(n),a}:t:e}function rm(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function cS(e,t){return t?e?t+" "+e:t:e}function J8(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Y7(){}const Z7=Object.freeze([]),qr=Object.freeze({}),X7=500,Q7={style:{transition:"none"}},J7="data-base-ui-click-trigger",eB={fallbackAxisSide:"none"},tB={fallbackAxisSide:"end"},eU={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Fl(e,t,n={}){const a=t.render,o=tU(t,n);if(n.enabled===!1)return null;const s=n.state??qr;return nU(e,a,o,s)}function tU(e,t={}){const{className:n,style:a,render:o}=e,{state:s=qr,ref:l,props:u,stateAttributesMapping:h,enabled:f=!0}=t,m=f?G8(n,s):void 0,y=f?q8(a,s):void 0,v=f?K8(s,h):qr,_=f?nm(v,Array.isArray(u)?Y8(u):u)??qr:qr;return typeof document<"u"&&(f?Array.isArray(l)?_.ref=V8([_.ref,u0(o),...l]):_.ref=c0(_.ref,u0(o),l):c0(null,null)),f?(m!==void 0&&(_.className=cS(_.className,m)),y!==void 0&&(_.style=nm(_.style,y)),_):qr}function nU(e,t,n,a){if(t){if(typeof t=="function")return t(n,a);const o=sS(n,t.props);return o.ref=n.ref,k.cloneElement(t,o)}if(e&&typeof e=="string")return aU(e,n);throw new Error(Bl(8))}function aU(e,t){return e==="button"?k.createElement("button",{type:"button",...t,key:t.key}):e==="img"?k.createElement("img",{alt:"",...t,key:t.key}):k.createElement(e,t)}let rU=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const iU=k.forwardRef(function(t,n){const{render:a,className:o,children:s,...l}=t,{toasts:u,pauseTimers:h,resumeTimers:f,setHovering:m,setFocused:y,viewportRef:v,windowFocusedRef:_,prevFocusElement:x,setPrevFocusElement:C,expanded:S,focused:M}=Ng(),R=k.useRef(!1),A=k.useRef(!1),E=u.length,B=u[0]?.height??0,$=k.useMemo(()=>u.some(F=>F.transitionStatus==="ending"),[u]);k.useEffect(()=>{if(!v.current)return;function F(z){E!==0&&z.key==="F6"&&z.target!==v.current&&(z.preventDefault(),C(xl(Bo(v.current))),v.current?.focus({preventScroll:!0}),h(),y(!0))}const Y=ti(v.current);return Y.addEventListener("keydown",F),()=>{Y.removeEventListener("keydown",F)}},[h,y,C,E,v]),k.useEffect(()=>{if(!v.current||!E)return;const F=ti(v.current);function Y(I){I.target===F&&(_.current=!1,h())}function z(I){if(I.relatedTarget||I.target===F)return;const W=Qp(I),ge=xl(Bo(v.current));(!Ni(v.current,W)||!Jp(ge))&&f(),setTimeout(()=>{_.current=!0})}return F.addEventListener("blur",Y,!0),F.addEventListener("focus",z,!0),()=>{F.removeEventListener("blur",Y,!0),F.removeEventListener("focus",z,!0)}},[h,f,v,_,y,E]),k.useEffect(()=>{const F=v.current;if(!F||E===0)return;const Y=Bo(F);function z(I){if(I.pointerType!=="touch")return;const W=Qp(I);Ni(F,W)||(f(),m(!1),y(!1))}return Y.addEventListener("pointerdown",z,!0),()=>{Y.removeEventListener("pointerdown",z,!0)}},[E,f,y,m,v]);function V(F){v.current&&(R.current=!0,F.relatedTarget===v.current?u[0]?.ref?.current?.focus():x?.focus({preventScroll:!0}))}function P(F){F.key==="Tab"&&F.shiftKey&&F.target===v.current&&(F.preventDefault(),x?.focus({preventScroll:!0}),f())}k.useEffect(()=>{!_.current||$||!A.current||(f(),m(!1),A.current=!1)},[$,f,m,_]);function Z(){h(),m(!0),A.current=!1}function X(){u.some(F=>F.transitionStatus==="ending")?A.current=!0:(f(),m(!1))}function fe(){if(R.current){R.current=!1;return}M||Jp(Bo(v.current).activeElement)&&(y(!0),h())}function he(F){!M||Ni(v.current,F.relatedTarget)||(y(!1),f())}const J={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:Z,onMouseMove:Z,onMouseLeave:X,onFocus:fe,onBlur:he,onKeyDown:P,onClick:fe},re=k.useMemo(()=>({expanded:S}),[S]),ue=Fl("div",t,{ref:[n,v],state:re,props:[J,{style:{[rU.frontmostHeight]:B?`${B}px`:void 0}},l,{children:T.jsxs(k.Fragment,{children:[E>0&&x&&T.jsx(ul,{onFocus:V}),s,E>0&&x&&T.jsx(ul,{onFocus:V})]})}]}),Q=k.useMemo(()=>({viewportRef:v}),[v]),ie=k.useMemo(()=>u.filter(F=>F.priority==="high"),[u]);return T.jsxs(F8.Provider,{value:Q,children:[E>0&&x&&T.jsx(ul,{onFocus:V}),ue,!M&&ie.length>0&&T.jsx("div",{style:aS,children:ie.map(F=>T.jsxs("div",{role:"alert","aria-atomic":!0,children:[T.jsx("div",{children:F.title}),T.jsx("div",{children:F.description})]},F.id))})]})});function oU(e){return oS(19)?e:e?"true":void 0}const uS=k.createContext(void 0);function im(){const e=k.useContext(uS);if(!e)throw new Error(Bl(66));return e}let Og=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const sU={[Og.startingStyle]:""},lU={[Og.endingStyle]:""},cU={transitionStatus(e){return e==="starting"?sU:e==="ending"?lU:null}},su=null;class uU{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const lu=new uU;class jg{static create(){return new jg}static request(t){return lu.request(t)}static cancel(t){return lu.cancel(t)}currentId=su;request(t){this.cancel(),this.currentId=lu.request(()=>{this.currentId=su,t()})}cancel=()=>{this.currentId!==su&&(lu.cancel(this.currentId),this.currentId=su)};disposeEffect=()=>this.cancel}function dU(){const e=Ul(jg.create).current;return WP(e.disposeEffect),e}function hU(e){return e==null?e:"current"in e?e.current:e}function fU(e,t=!1,n=!0){const a=dU();return Ln((o,s=null)=>{a.cancel();function l(){$i.flushSync(o)}const u=hU(e);if(u==null)return;const h=u;if(typeof h.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let f=function(){const y=Og.startingStyle;if(!h.hasAttribute(y)){a.request(m);return}const v=new MutationObserver(()=>{h.hasAttribute(y)||(v.disconnect(),m())});v.observe(h,{attributes:!0,attributeFilter:[y]}),s?.addEventListener("abort",()=>v.disconnect(),{once:!0})},m=function(){Promise.all(h.getAnimations().map(y=>y.finished)).then(()=>{s?.aborted||l()}).catch(()=>{const y=h.getAnimations();if(n){if(s?.aborted)return;l()}else y.length>0&&y.some(v=>v.pending||v.playState!=="finished")&&m()})};if(t){f();return}a.request(m)}})}function pU(e){const{enabled:t=!0,open:n,ref:a,onComplete:o}=e,s=Ln(o),l=fU(a,n,!1);k.useEffect(()=>{if(!t)return;const u=new AbortController;return l(s,u.signal),()=>{u.abort()}},[t,n,s,l])}let Ci=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const mU={...cU,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Gs=40,gU=10,Vr=.5,yU=1;function d0(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function vU(e){const n=window.getComputedStyle(e).transform;let a=0,o=0,s=1;if(n&&n!=="none"){const l=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(l){const u=l[1].split(", ").map(parseFloat);u.length===6?(a=u[4],o=u[5],s=Math.sqrt(u[0]*u[0]+u[1]*u[1])):u.length===16&&(a=u[12],o=u[13],s=u[0])}}return{x:a,y:o,scale:s}}const bU=k.forwardRef(function(t,n){const{toast:a,render:o,className:s,swipeDirection:l=["down","right"],...u}=t,h=a.positionerProps?.anchor!==void 0;let f=[];h||(f=Array.isArray(l)?l:[l]);const m=f.length>0,{toasts:y,focused:v,close:_,remove:x,setToasts:C,pauseTimers:S,expanded:M,setHovering:R}=Ng(),[A,E]=k.useState(void 0),[B,$]=k.useState(!1),[V,P]=k.useState(!1),[Z,X]=k.useState(!1),[fe,he]=k.useState({x:0,y:0}),[J,re]=k.useState({x:0,y:0,scale:1}),[ue,Q]=k.useState(),[ie,F]=k.useState(),[Y,z]=k.useState(null),I=k.useRef(null),W=k.useRef({x:0,y:0}),ge=k.useRef({x:0,y:0,scale:1}),pe=k.useRef(void 0),me=k.useRef(0),be=k.useRef(!1),Be=k.useRef({x:0,y:0}),Ye=k.useRef(!1),Ne=k.useMemo(()=>y.indexOf(a),[a,y]),Rt=k.useMemo(()=>y.filter(Ke=>Ke.transitionStatus!=="ending").indexOf(a),[a,y]),Mn=k.useMemo(()=>y.slice(0,y.indexOf(a)).reduce((Ke,Ve)=>Ke+(Ve.height||0),0),[y,a]);pU({open:a.transitionStatus!=="ending",ref:I,onComplete(){a.transitionStatus==="ending"&&x(a.id)}});const Pn=Ln((Ke=!1)=>{const Ve=I.current;if(!Ve)return;const pt=Ve.style.height;Ve.style.height="auto";const Pt=Ve.offsetHeight;Ve.style.height=pt;function Ot(){C(yt=>yt.map(dt=>dt.id===a.id?{...dt,ref:I,height:Pt,transitionStatus:void 0}:dt))}Ke?$i.flushSync(Ot):Ot()});zl(Pn,[Pn]);function mt(Ke,Ve){let pt=Ke,Pt=Ve;return!f.includes("left")&&!f.includes("right")?pt=Ke>0?Ke**Vr:-(Math.abs(Ke)**Vr):(!f.includes("right")&&Ke>0&&(pt=Ke**Vr),!f.includes("left")&&Ke<0&&(pt=-(Math.abs(Ke)**Vr))),!f.includes("up")&&!f.includes("down")?Pt=Ve>0?Ve**Vr:-(Math.abs(Ve)**Vr):(!f.includes("down")&&Ve>0&&(Pt=Ve**Vr),!f.includes("up")&&Ve<0&&(Pt=-(Math.abs(Ve)**Vr))),{x:pt,y:Pt}}function Jt(Ke){if(Ke.button!==0)return;Ke.pointerType==="touch"&&S();const Ve=Qp(Ke.nativeEvent);if(!(Ve&&Ve.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(be.current=!1,pe.current=void 0,me.current=0,W.current={x:Ke.clientX,y:Ke.clientY},Be.current=W.current,I.current){const Pt=vU(I.current);ge.current=Pt,re(Pt),he({x:Pt.x,y:Pt.y})}R(!0),$(!0),P(!1),z(null),Ye.current=!0,I.current?.setPointerCapture(Ke.pointerId)}}function oi(Ke){if(!B)return;Ke.preventDefault(),Ye.current&&(W.current={x:Ke.clientX,y:Ke.clientY},Ye.current=!1);const{clientY:Ve,clientX:pt,movementX:Pt,movementY:Ot}=Ke;(Ot<0&&Ve>Be.current.y||Ot>0&&Ve<Be.current.y)&&(Be.current={x:Be.current.x,y:Ve}),(Pt<0&&pt>Be.current.x||Pt>0&&pt<Be.current.x)&&(Be.current={x:pt,y:Be.current.y});const yt=pt-W.current.x,dt=Ve-W.current.y,Ya=Ve-Be.current.y,as=pt-Be.current.x;if(!V&&Math.sqrt(yt*yt+dt*dt)>=yU&&(P(!0),Y===null)){const ca=f.includes("left")||f.includes("right"),li=f.includes("up")||f.includes("down");if(ca&&li){const mr=Math.abs(yt),On=Math.abs(dt);z(mr>On?"horizontal":"vertical")}}let Gt;if(!pe.current)Y==="vertical"?dt>0?Gt="down":dt<0&&(Gt="up"):Y==="horizontal"?yt>0?Gt="right":yt<0&&(Gt="left"):Math.abs(yt)>=Math.abs(dt)?Gt=yt>0?"right":"left":Gt=dt>0?"down":"up",Gt&&f.includes(Gt)&&(pe.current=Gt,me.current=d0(Gt,yt,dt),E(Gt));else{const Ta=pe.current,ca=d0(Ta,as,Ya);ca>Gs?(be.current=!1,E(Ta)):!(f.includes("left")&&f.includes("right"))&&!(f.includes("up")&&f.includes("down"))&&me.current-ca>=gU&&(be.current=!0)}const Za=mt(yt,dt);let mn=ge.current.x,Ca=ge.current.y;Y==="horizontal"?(f.includes("left")||f.includes("right"))&&(mn+=Za.x):(Y==="vertical"||(f.includes("left")||f.includes("right"))&&(mn+=Za.x),(f.includes("up")||f.includes("down"))&&(Ca+=Za.y)),he({x:mn,y:Ca})}function qi(Ke){if(!B)return;if($(!1),P(!1),z(null),I.current?.releasePointerCapture(Ke.pointerId),be.current){he({x:J.x,y:J.y}),E(void 0);return}let Ve=!1;const pt=fe.x-J.x,Pt=fe.y-J.y;let Ot;for(const yt of f){switch(yt){case"right":pt>Gs&&(Ve=!0,Ot="right");break;case"left":pt<-Gs&&(Ve=!0,Ot="left");break;case"down":Pt>Gs&&(Ve=!0,Ot="down");break;case"up":Pt<-Gs&&(Ve=!0,Ot="up");break}if(Ve)break}Ve?(E(Ot),X(!0),_(a.id)):(he({x:J.x,y:J.y}),E(void 0))}function Nn(Ke){if(Ke.key==="Escape"){if(!I.current||!Ni(I.current,xl(Bo(I.current))))return;_(a.id)}}k.useEffect(()=>{if(!m)return;const Ke=I.current;if(!Ke)return;function Ve(pt){Ni(Ke,pt.target)&&pt.preventDefault()}return Ke.addEventListener("touchmove",Ve,{passive:!1}),()=>{Ke.removeEventListener("touchmove",Ve)}},[m]);function Yi(){if(!B&&fe.x===J.x&&fe.y===J.y&&!Z)return{[Ci.swipeMovementX]:"0px",[Ci.swipeMovementY]:"0px"};const Ke=fe.x-J.x,Ve=fe.y-J.y;return{transition:B?"none":void 0,transform:B?`translateX(${fe.x}px) translateY(${fe.y}px) scale(${J.scale})`:void 0,[Ci.swipeMovementX]:`${Ke}px`,[Ci.swipeMovementY]:`${Ve}px`}}const pr=a.priority==="high",Sa={role:pr?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":ue,"aria-describedby":ie,"aria-hidden":pr&&!v?!0:void 0,onPointerDown:m?Jt:void 0,onPointerMove:m?oi:void 0,onPointerUp:m?qi:void 0,onKeyDown:Nn,inert:oU(a.limited),style:{...Yi(),[Ci.index]:a.transitionStatus==="ending"?Ne:Rt,[Ci.offsetY]:`${Mn}px`,[Ci.height]:a.height?`${a.height}px`:void 0}},pn=k.useMemo(()=>({rootRef:I,toast:a,titleId:ue,setTitleId:Q,descriptionId:ie,setDescriptionId:F,swiping:B,swipeDirection:A,recalculateHeight:Pn,index:Ne,visibleIndex:Rt,expanded:M}),[a,ue,ie,B,A,Pn,Ne,Rt,M]),si=k.useMemo(()=>({transitionStatus:a.transitionStatus,expanded:M,limited:a.limited||!1,type:a.type,swiping:pn.swiping,swipeDirection:pn.swipeDirection}),[M,a.transitionStatus,a.limited,a.type,pn.swiping,pn.swipeDirection]),Zi=Fl("div",t,{ref:[n,pn.rootRef],state:si,stateAttributesMapping:mU,props:[Sa,u]});return T.jsx(uS.Provider,{value:pn,children:Zi})}),kU={...cm};let h0=0;function _U(e,t="mui"){const[n,a]=k.useState(e),o=e||n;return k.useEffect(()=>{n==null&&(h0+=1,a(`${t}-${h0}`))},[n,t]),o}const f0=kU.useId;function dS(e,t){if(f0!==void 0){const n=f0();return e??(t?`${t}-${n}`:n)}return _U(e,t)}const wU=k.forwardRef(function(t,n){const{render:a,className:o,id:s,children:l,...u}=t,{toast:h}=im(),f=l??h.title,m=!!f,y=dS(s),{setTitleId:v}=im();zl(()=>{if(m)return v(y),()=>{v(void 0)}},[m,y,v]);const _=k.useMemo(()=>({type:h.type}),[h.type]),x=Fl("h2",t,{ref:n,state:_,props:{...u,id:y,children:f}});return m?x:null}),xU=k.createContext(void 0);function PU(e=!1){const t=k.useContext(xU);if(t===void 0&&!e)throw new Error(Bl(16));return t}function SU(e){const{focusableWhenDisabled:t,disabled:n,composite:a=!1,tabIndex:o=0,isNativeButton:s}=e,l=a&&t!==!1,u=a&&t===!1;return{props:k.useMemo(()=>{const f={onKeyDown(m){n&&t&&m.key!=="Tab"&&m.preventDefault()}};return a||(f.tabIndex=o,!s&&n&&(f.tabIndex=t?o:-1)),(s&&(t||l)||!s&&n)&&(f["aria-disabled"]=n),s&&(!t||u)&&(f.disabled=n),f},[a,n,t,l,u,s,o])}}function CU(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:a=0,native:o=!0}=e,s=k.useRef(null),l=PU(!0)!==void 0,u=Ln(()=>{const v=s.current;return!!(v?.tagName==="A"&&v?.href)}),{props:h}=SU({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:a,isNativeButton:o}),f=k.useCallback(()=>{const v=s.current;TU(v)&&l&&t&&h.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,h.disabled,l]);zl(f,[f]);const m=k.useCallback((v={})=>{const{onClick:_,onMouseDown:x,onKeyUp:C,onKeyDown:S,onPointerDown:M,...R}=v;return sS({type:o?"button":void 0,onClick(E){if(t){E.preventDefault();return}_?.(E)},onMouseDown(E){t||x?.(E)},onKeyDown(E){if(t||(rm(E),S?.(E)),E.baseUIHandlerPrevented)return;const B=E.target===E.currentTarget&&!o&&!u()&&!t,$=E.key==="Enter",V=E.key===" ";B&&((V||$)&&E.preventDefault(),$&&_?.(E))},onKeyUp(E){t||(rm(E),C?.(E)),!E.baseUIHandlerPrevented&&E.target===E.currentTarget&&!o&&!t&&E.key===" "&&_?.(E)},onPointerDown(E){if(t){E.preventDefault();return}M?.(E)}},o?void 0:{role:"button"},h,R)},[t,h,o,u]),y=Ln(v=>{s.current=v,f()});return{getButtonProps:m,buttonRef:y}}function TU(e){return Dd(e)&&e.tagName==="BUTTON"}const EU=k.forwardRef(function(t,n){const{render:a,className:o,disabled:s,nativeButton:l=!0,...u}=t,{close:h,expanded:f}=Ng(),{toast:m}=im(),[y,v]=k.useState(!1),{getButtonProps:_,buttonRef:x}=CU({disabled:s,native:l}),C=k.useMemo(()=>({type:m.type}),[m.type]);return Fl("button",t,{ref:[n,x],state:C,props:[{"aria-hidden":!f&&!y,onClick(){h(m.id)},onFocus(){v(!0)},onBlur(){v(!1)}},u,_]})}),nB="none",aB="trigger-press",rB="trigger-hover",iB="outside-press",oB="item-press",sB="close-press",AU="focus-out",lB="escape-key",cB="list-navigation",uB="cancel-open",dB="imperative-action",hB="window-resize";function RU(e,t,n,a){let o=!1,s=!1;const l=qr;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...l}}function DU(e){return`data-base-ui-${e}`}const hS=k.createContext(null),LU=()=>k.useContext(hS),IU=DU("portal");function fS(e={}){const{ref:t,container:n,componentProps:a=qr,elementProps:o,elementState:s}=e,l=dS(),h=LU()?.portalNode,[f,m]=k.useState(null),[y,v]=k.useState(null),_=Ln(M=>{M!==null&&v(M)}),x=k.useRef(null);zl(()=>{if(n===null){x.current&&(x.current=null,v(null),m(null));return}if(l==null)return;const M=(n&&(Dg(n)?n:n.current))??h??document.body;if(M==null){x.current&&(x.current=null,v(null),m(null));return}x.current!==M&&(x.current=M,v(null),m(M))},[n,h,l]);const C=Fl("div",a,{ref:[t,_],state:s,props:[{id:l,[IU]:""},o]});return{portalNode:y,portalSubtree:f&&C?$i.createPortal(C,f):null}}const fB=k.forwardRef(function(t,n){const{children:a,container:o,className:s,render:l,renderGuards:u,...h}=t,{portalNode:f,portalSubtree:m}=fS({container:o,ref:n,componentProps:t,elementProps:h}),y=k.useRef(null),v=k.useRef(null),_=k.useRef(null),x=k.useRef(null),[C,S]=k.useState(null),M=C?.modal,R=C?.open,A=typeof u=="boolean"?u:!!C&&!C.modal&&C.open&&!!f;k.useEffect(()=>{if(!f||M)return;function B($){f&&$.relatedTarget&&ep($)&&($.type==="focusin"?l0:U8)(f)}return f.addEventListener("focusin",B,!0),f.addEventListener("focusout",B,!0),()=>{f.removeEventListener("focusin",B,!0),f.removeEventListener("focusout",B,!0)}},[f,M]),k.useEffect(()=>{!f||R||l0(f)},[R,f]);const E=k.useMemo(()=>({beforeOutsideRef:y,afterOutsideRef:v,beforeInsideRef:_,afterInsideRef:x,portalNode:f,setFocusManagerState:S}),[f]);return T.jsxs(k.Fragment,{children:[m,T.jsxs(hS.Provider,{value:E,children:[A&&f&&T.jsx(ul,{"data-type":"outside",ref:y,onFocus:B=>{if(ep(B,f))_.current?.focus();else{const $=C?C.domReference:null;j8($)?.focus()}}}),A&&f&&T.jsx("span",{"aria-owns":f.id,style:eU}),f&&$i.createPortal(a,f),A&&f&&T.jsx(ul,{"data-type":"outside",ref:v,onFocus:B=>{if(ep(B,f))x.current?.focus();else{const $=C?C.domReference:null;O8($)?.focus(),C?.closeOnFocusOut&&C?.onOpenChange(!1,RU(AU,B.nativeEvent))}}})]})]})}),MU=k.forwardRef(function(t,n){const{children:a,container:o,className:s,render:l,...u}=t,{portalNode:h,portalSubtree:f}=fS({container:o,ref:n,componentProps:t,elementProps:u});return!f&&!h?null:T.jsxs(k.Fragment,{children:[f,h&&$i.createPortal(a,h)]})}),NU=MU;function OU(){const e=k.useContext(Mg);if(!e)throw new Error(Bl(73));const{toasts:t,add:n,close:a,update:o,promise:s}=e;return k.useMemo(()=>({toasts:t,add:n,close:a,update:o,promise:s}),[t,n,a,o,s])}function jU(){const e=[];function t(n){e.forEach(a=>a(n))}return{" subscribe":function(a){return e.push(a),()=>{const o=e.indexOf(a);o!==-1&&e.splice(o,1)}},add(n){const a=n.id||HP("toast"),o={...n,id:a,transitionStatus:"starting"};return t({action:"add",options:o}),a},close(n){t({action:"close",options:{id:n}})},update(n,a){t({action:"update",options:{...a,id:n}})},promise(n,a){let o=n;return t({action:"promise",options:{...a,promise:n,setPromise(s){o=s}}}),o}}}const Ug=jU();function pB(e){return Ug.add(e)}function UU({children:e}){return T.jsxs(B8,{toastManager:Ug,children:[e,T.jsx(NU,{children:T.jsx(iU,{className:"fixed inset-x-0 top-6 z-[100] mx-auto flex w-full max-w-sm flex-col items-center gap-2 px-4 outline-none",children:T.jsx(BU,{})})})]})}function BU(){const{toasts:e}=OU();return e.map(t=>{const n=t.data?.onUndo;return T.jsxs(bU,{toast:t,className:Qt("pointer-events-auto flex w-full items-center gap-3 rounded-xl border border-oai-gray-200 bg-oai-white px-4 py-3 shadow-xl transition-all duration-200 ease-out","data-[starting-style]:-translate-y-3 data-[starting-style]:opacity-0","data-[ending-style]:-translate-y-3 data-[ending-style]:opacity-0","dark:border-oai-gray-800 dark:bg-oai-gray-900"),children:[T.jsx(wU,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),n?T.jsx("button",{type:"button",onClick:()=>{n(),Ug.close(t.id)},className:"shrink-0 rounded-md px-2 py-1 text-xs font-semibold text-oai-gray-600 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:Ie("shared.action.undo")}):null,T.jsx(EU,{"aria-label":Ie("shared.action.dismiss"),className:"-mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-oai-gray-400 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:T.jsx(Zm,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},t.id)})}const Bg=Object.freeze(["limits","leaderboard"]),zU=Object.freeze({limits:"/limits",leaderboard:"/leaderboard"}),FU=Object.freeze({limits:()=>In(()=>import("./LimitsPage-C8TUI9WR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),leaderboard:()=>In(()=>import("./LeaderboardPage-UVovfRN_.js"),__vite__mapDeps([8,9,10,11,12,13]))}),pS="total",mS=0,p0=20,VU=Object.freeze([10,20,50,100]),$U="tokentracker:leaderboard:pageSize",HU=20,WU=Object.freeze(["dashboard-existing","silent-preload","page-load","manual-refresh"]);let m0=0,ra;class KU{constructor(t={}){this.limits=null,this.leaderboard=new Map,this.leaderboardMaxEntries=YU(t.leaderboardMaxEntries)}read(t,n){return Vl(t),t==="limits"?!this.limits||this.limits.contextKey!==n?null:Du(this.limits):n?Du(this.leaderboard.get(n)):null}write(t,n={}){if(t.targetKey==="limits"){this.limits=t;return}this.leaderboard.has(t.contextKey)&&this.leaderboard.delete(t.contextKey),this.leaderboard.set(t.contextKey,t),this.evictLeaderboardEntries(n.activeContextKey||t.contextKey)}evictLeaderboardEntries(t=null){for(;this.leaderboard.size>this.leaderboardMaxEntries;){const n=Array.from(this.leaderboard.keys()).find(a=>a!==t)||this.leaderboard.keys().next().value;this.leaderboard.delete(n)}}snapshot(){return{limits:Du(this.limits),leaderboard:{maxEntries:this.leaderboardMaxEntries,size:this.leaderboard.size,keys:Array.from(this.leaderboard.keys())}}}}class GU{constructor(t={}){m0+=1,this.sessionId=`dashboard-preload-${m0}`,this.createdAt=Date.now(),this.completedAt=null,this.startedAfterMainContentVisible=!1,this.cache=new KU(t),this.targets={limits:g0("limits"),leaderboard:g0("leaderboard")}}}function g0(e){return{key:e,route:zU[e],resourceStatus:"idle",stateStatus:"idle",error:null,resourcePromise:null,resourceModule:null,resourceRequestId:0,statePromise:null,stateRequestId:0,pendingStateContextKey:null}}function qU(e={}){return new GU(e)}function YU(e){const t=Number(e);return!Number.isInteger(t)||t<1?HU:t}ra=qU();function Vl(e){if(!Bg.includes(e))throw new Error(`Unknown dashboard preload target: ${e}`)}function gS(e){return e?typeof e=="string"?e:e.message||String(e):null}function ZU(e,t){return WU.includes(e)?e:t}function XU(e){const t=Number(e);return Number.isFinite(t)?t:Date.now()}function Du(e){return e?{...e}:null}function y0(){const e=Bg.every(t=>{const n=ra.targets[t];return n.resourceStatus==="fulfilled"||n.resourceStatus==="rejected"});ra.completedAt=e?Date.now():null}function QU(){ra.startedAfterMainContentVisible=!0}function zg(e,t={}){Vl(e);const n=Object.entries(t).filter(([,a])=>a!==void 0).sort(([a],[o])=>a.localeCompare(o)).map(([a,o])=>`${a}=${o===null?"null":String(o)}`);return`${e}:${n.join("|")}`}function yS(e,t={}){Vl(e);const n=ra.targets[e];if(n.resourceStatus==="fulfilled")return Promise.resolve(n.resourceModule);if(n.resourceStatus==="pending"&&n.resourcePromise)return n.resourcePromise;const a=t.loader||FU[e],o=n.resourceRequestId+1;n.resourceRequestId=o,n.resourceStatus="pending",n.error=null;const s=Promise.resolve().then(()=>a()).then(l=>n.resourceRequestId!==o||n.resourcePromise!==s?null:(n.resourceStatus="fulfilled",n.resourceModule=l,n.error=null,y0(),l)).catch(l=>(n.resourceRequestId!==o||n.resourcePromise!==s||(n.resourceStatus="rejected",n.error=gS(l),y0()),null));return n.resourcePromise=s,s}function JU(e={}){const t=e.loaders||{};return Promise.all(Bg.map(n=>yS(n,{loader:t[n]})))}function vS(e,t){Vl(e);const n=ra.targets[e],a=t?.status||"fulfilled",o={targetKey:e,status:a,data:t?.data??null,error:gS(t?.error),source:ZU(t?.source,"silent-preload"),generatedAt:XU(t?.generatedAt),updatedAt:Date.now(),contextKey:t?.contextKey||zg(e,t?.context||{})};return n.stateStatus=a,a==="rejected"||a==="skipped"?n.error=o.error:a==="fulfilled"&&(n.error=null,ra.cache.write(o,{activeContextKey:t?.activeContextKey})),Du(o)}function bS(e,t){return Vl(e),ra.cache.read(e,t)}function mB(e,t={}){return vS("limits",{data:e,source:t.source||"dashboard-existing",contextKey:t.contextKey||kS(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function kS(e={}){return zg("limits",{state:"current",...e})}function gB(e=kS()){return bS("limits",e)}function om(e,t={}){return vS("leaderboard",{activeContextKey:t.activeContextKey,data:e,source:t.source||"silent-preload",contextKey:t.contextKey||Fg(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function e9(e){return bS("leaderboard",e)}function _S(){if(typeof window>"u")return p0;try{const e=window.localStorage.getItem($U),t=Number(e);if(VU.includes(t))return t}catch{}return p0}function wS(e={}){const t=e.userId;return t!==void 0?t||null:e.cloudUser?.id||null}function xS(e={}){return typeof e.accessMode=="string"&&e.accessMode.trim()?e.accessMode.trim():e.mockEnabled?"mock":e.baseUrl?"cloud":"unavailable"}function Fg(e={}){const t=!!e.mockEnabled,n=e.baseUrl??"";return zg("leaderboard",{accessMode:xS({...e,baseUrl:n,mockEnabled:t}),baseUrl:n,mockEnabled:t,offset:e.offset??mS,pageSize:e.pageSize??_S(),period:e.period||pS,userId:wS(e)})}function cu(e,t){const n=ra.targets.leaderboard;return n.stateRequestId+=1,n.statePromise=null,n.pendingStateContextKey=null,om(null,{contextKey:t,status:"skipped",error:e})}function t9(e={}){const t=ra,n=!!e.mockEnabled,a=e.baseUrl??"",o=xS({...e,baseUrl:a,mockEnabled:n}),s=e.period||pS,l=e.pageSize??_S(),u=e.offset??mS,h=wS(e),f=Fg({accessMode:o,baseUrl:a,mockEnabled:n,offset:u,pageSize:l,period:s,userId:h});if(!n&&e.authLoading)return Promise.resolve(cu("auth-loading",f));if(!n&&!e.signedIn&&o!=="public")return Promise.resolve(cu("not-signed-in",f));if(!n&&!a)return Promise.resolve(cu("missing-base-url",f));if(!n&&o==="unavailable")return Promise.resolve(cu("access-unavailable",f));const m=t.targets.leaderboard,y=e9(f);if(y)return Promise.resolve(y);if(m.stateStatus==="pending"&&m.statePromise&&m.pendingStateContextKey===f)return m.statePromise;const v=m.stateRequestId+1;m.stateRequestId=v,m.stateStatus="pending",m.pendingStateContextKey=f,m.error=null;const _=Promise.resolve().then(()=>iL({userId:h,period:s,limit:l,offset:u})).then(x=>ra!==t||m.stateRequestId!==v||m.statePromise!==_?null:(m.pendingStateContextKey=null,om(x,{contextKey:f}))).catch(x=>(ra!==t||m.stateRequestId!==v||m.statePromise!==_||(m.pendingStateContextKey=null,om(null,{contextKey:f,status:"rejected",error:x})),null));return m.statePromise=_,_}const n9=typeof window<"u"?window.location.search:"",v0=new URLSearchParams(n9),uu=v0.get("insforge_code")||v0.get("code")||null,a9=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function r9(){Pd();const{loading:e,signedIn:t}=Il(),n=pd(),[a,o]=k.useState("processing"),[s,l]=k.useState(null),u=k.useRef(!1);k.useEffect(()=>{if(!(!uu||u.current)){if(u.current=!0,a9){l(!1);return}(async()=>{try{const m=await(await fetch("/api/auth-bridge/verifier")).json();l(!!m?.native)}catch{l(!1)}})()}},[]),k.useEffect(()=>{if(s!==!0||!uu)return;o("redirecting");const f=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(uu)}`},200);return()=>clearTimeout(f)},[s]),k.useEffect(()=>{if(s!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const f=setTimeout(()=>{t||o("failed")},12e3);return()=>clearTimeout(f)},[s,e,t,n]),k.useEffect(()=>{if(!uu&&s===null){const f=setTimeout(()=>o("failed"),3e3);return()=>clearTimeout(f)}},[s]);const h=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&s!==!0&&(s===null||s===!1&&e)?T.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):T.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:T.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),T.jsx("p",{className:"text-oai-gray-400 text-sm",children:Ie("auth.callback.processing")})]}),a==="redirecting"&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:T.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:T.jsx("path",{d:"M20 6 9 17l-5-5"})})}),T.jsx("p",{className:"text-white text-sm font-medium",children:Ie("auth.callback.success")}),T.jsx("p",{className:"text-oai-gray-500 text-xs",children:Ie("auth.callback.redirecting")})]}),a==="failed"&&T.jsxs("div",{className:"space-y-3",children:[T.jsx("p",{className:"text-oai-gray-300 text-sm",children:Ie("auth.callback.failed")}),T.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:Ie("auth.callback.close")})]})]})})}const i9=k.lazy(()=>In(()=>import("./DashboardPage-BddfbhCM.js"),__vite__mapDeps([14,1,12,15,16,17,11,3,9,10,18,19,4])).then(e=>({default:e.DashboardPage}))),o9=k.lazy(()=>In(()=>import("./IpCheckPage-Cb8Qy06W.js"),[])),s9=k.lazy(()=>In(()=>import("./LandingPage-C2pfu66z.js"),__vite__mapDeps([20,21,18])).then(e=>({default:e.LandingPage}))),l9=k.lazy(()=>In(()=>import("./LeaderboardPage-UVovfRN_.js"),__vite__mapDeps([8,9,10,11,12,13])).then(e=>({default:e.LeaderboardPage}))),c9=k.lazy(()=>In(()=>import("./LeaderboardProfilePage-CLguRtzc.js"),__vite__mapDeps([22,12,21,23,13,15,16,6,11,17])).then(e=>({default:e.LeaderboardProfilePage}))),u9=k.lazy(()=>In(()=>import("./LimitsPage-C8TUI9WR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(e=>({default:e.LimitsPage}))),d9=k.lazy(()=>In(()=>import("./LoginPage-DokQyzBF.js"),[]).then(e=>({default:e.LoginPage}))),h9=k.lazy(()=>In(()=>import("./DevicePage-CLHb8o6u.js"),[])),f9=k.lazy(()=>In(()=>import("./WrappedPage-DeMlihPZ.js"),[])),p9=k.lazy(()=>In(()=>import("./SettingsPage-CNp2lKqF.js"),__vite__mapDeps([24,2,25,3,11,12,9,10,16,7])).then(e=>({default:e.SettingsPage}))),m9=k.lazy(()=>In(()=>import("./SkillsPage-tqrRcb24.js"),__vite__mapDeps([26,5,6,7,3,17,11,16,12,19,10])).then(e=>({default:e.SkillsPage}))),g9=k.lazy(()=>In(()=>import("./WidgetsPage-C1sAmvzO.js"),__vite__mapDeps([27,9,10,11,25,3,4,6,7])).then(e=>({default:e.WidgetsPage})));function y9(){if(typeof window>"u")return!1;const e=window.location.hostname;return e!=="localhost"&&e!=="127.0.0.1"&&e!=="::1"}function v9(){const{resolvedLocale:e}=Pd(),t=Wn(),n=Il();bj();const a=k.useRef(!1),o=k.useRef(!1),s=k.useRef(new Set),l=xn(),u=y9(),h=k.useMemo(()=>typeof window>"u"?!1:dj(window.location.search),[]),f=t?.pathname||"/",m=new URL(window.location.href),y=m.pathname.replace(/\/+$/,"")||"/",_=y.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,x=m.searchParams.get("token")||null,C=_||x,S=y==="/share"||y==="/share.html"||y.startsWith("/share/"),M=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),R=f.replace(/\/+$/,"")||"/",A=R==="/"||R==="/dashboard",E=R==="/leaderboard",B=R.match(/^\/u\/([^/]+)$/i),$=B?B[1]:null,V=!!(n.enabled&&n.signedIn),P=M||V,Z=!1,X=cj(),fe=!P&&!l&&!M,he=l?"mock":n.loading?"unavailable":V?"cloud":P?"local":"unavailable",J=k.useCallback(()=>{if(M||!a.current||!l&&n.loading||!l&&!P)return;const me={accessMode:he,baseUrl:uj(),mockEnabled:l,signedIn:P,authLoading:!!n.loading,userId:V&&n.user?.id||null},be=Fg(me);s.current.has(be)||(s.current.add(be),t9(me))},[V,n.loading,n.user?.id,M,he,l,P]),re=k.useCallback(()=>{A&&(a.current||(a.current=!0,QU()),o.current||(o.current=!0,M?yS("limits"):JU()),J())},[A,M,J]);k.useEffect(()=>{J()},[J]);const ue=k.useMemo(()=>!n.enabled||!V?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[V,n]);let Q=M||l||h?"dashboard":"landing";R==="/landing"&&(Q="landing"),R==="/dashboard"&&(Q="dashboard"),E&&(Q="dashboard"),$&&(Q="dashboard");const ie=R==="/limits",F=R==="/settings",Y=R==="/skills",z=R==="/widgets",I=R==="/ip-check";(ie||F||Y||z||I)&&(Q="dashboard");let W=i9;$?W=c9:R==="/leaderboard"?W=l9:ie?W=u9:F?W=p9:Y?W=m9:z?W=g9:I&&(W=o9);const ge=!S&&!fe&&(R==="/dashboard"||R==="/"||E||ie||F||Y||z||I);let pe=null;if(R==="/auth/callback"||R==="/auth/native-callback")pe=T.jsx(r9,{});else if(R==="/login")pe=T.jsx(d9,{});else if(R==="/device")pe=T.jsx(h9,{});else if(R==="/wrapped")pe=T.jsx(f9,{});else if(Q==="landing")pe=T.jsx(s9,{signInUrl:"/login",signUpUrl:"/login"});else{const me=T.jsx(W,{baseUrl:X,auth:ue,signedIn:P,sessionSoftExpired:Z,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:S,publicToken:C,userId:$,signInUrl:"/login",signUpUrl:"/login",onMainContentVisible:re},e);ge?pe=T.jsx(Mj,{children:me}):pe=me}return T.jsx(sM,{children:T.jsx(uM,{children:T.jsx(UU,{children:T.jsxs(dM,{children:[T.jsx(k.Suspense,{fallback:null,children:pe}),ge?T.jsx(a8,{}):null,T.jsx(sj,{}),u?T.jsx(sI,{}):null,u?T.jsx(vI,{}):null]})})})})}const b9=wE([{path:"*",element:T.jsx(v9,{})}]);hT.createRoot(document.getElementById("root")).render(T.jsx(lm.StrictMode,{children:T.jsx(zL,{children:T.jsx(GL,{children:T.jsx(uL,{children:T.jsx(ME,{router:b9})})})})}));export{Z9 as $,Ie as A,ku as B,F9 as C,z9 as D,gl as E,oM as F,c7 as G,J9 as H,D9 as I,R9 as J,RI as K,gd as L,oP as M,kj as N,Qt as O,e8 as P,EI as Q,lm as R,Km as S,Il as T,j9 as U,iL as V,Pd as W,Zm as X,dj as Y,Gr as Z,In as _,Fl as a,sS as a$,V9 as a0,SD as a1,L9 as a2,I9 as a3,mB as a4,X9 as a5,B9 as a6,hM as a7,d7 as a8,O9 as a9,JI as aA,a7 as aB,k9 as aC,dD as aD,Xm as aE,Pk as aF,W9 as aG,Ax as aH,Ex as aI,HI as aJ,U9 as aK,Go as aL,Ku as aM,yx as aN,vx as aO,bx as aP,kx as aQ,YI as aR,wa as aS,rl as aT,l7 as aU,o7 as aV,Bl as aW,Ln as aX,zl as aY,Y7 as aZ,c0 as a_,l4 as aa,gt as ab,an as ac,td as ad,Qm as ae,Yo as af,Pg as ag,Lx as ah,ei as ai,Gk as aj,$i as ak,Wn as al,pd as am,uj as an,pD as ao,Fg as ap,e9 as aq,om as ar,fD as as,T9 as at,h7 as au,E9 as av,K9 as aw,rM as ax,Wm as ay,gB as az,RU as b,u8 as b$,qr as b0,q7 as b1,aS as b2,nB as b3,pU as b4,cU as b5,t8 as b6,m7 as b7,f7 as b8,P7 as b9,Ul as bA,WP as bB,dB as bC,J7 as bD,ul as bE,G7 as bF,ep as bG,K7 as bH,O8 as bI,fB as bJ,tB as bK,fU as bL,oU as bM,Dd as bN,KL as bO,Vm as bP,s7 as bQ,i7 as bR,U7 as bS,B7 as bT,O7 as bU,j7 as bV,dU as bW,_8 as bX,a0 as bY,r8 as bZ,ti as b_,S7 as ba,C7 as bb,XI as bc,p7 as bd,g7 as be,pB as bf,y7 as bg,_7 as bh,v7 as bi,b7 as bj,k7 as bk,x7 as bl,w7 as bm,R7 as bn,DU as bo,k8 as bp,rB as bq,Ld as br,Qp as bs,BP as bt,Ni as bu,wl as bv,aB as bw,lB as bx,X7 as by,AU as bz,Kt as c,VP as c0,c8 as c1,i8 as c2,Xp as c3,FP as c4,T7 as c5,l8 as c6,E7 as c7,Rg as c8,zP as c9,sm as cA,oS as cB,jg as cC,o0 as cD,M7 as cE,N7 as cF,Og as cG,L7 as cH,q9 as cI,Y9 as cJ,G9 as cK,hr as cL,A7 as ca,dS as cb,$7 as cc,V7 as cd,xl as ce,cB as cf,Z7 as cg,Bo as ch,iB as ci,uB as cj,eB as ck,Q7 as cl,D7 as cm,hB as cn,oB as co,I7 as cp,g8 as cq,LU as cr,Lg as cs,Ig as ct,hU as cu,j8 as cv,W7 as cw,H7 as cx,F7 as cy,z7 as cz,sB as d,u6 as e,A9 as f,lx as g,bD as h,xn as i,T as j,r7 as k,MD as l,cl as m,ND as n,e7 as o,N9 as p,H9 as q,k as r,n7 as s,t7 as t,CU as u,M9 as v,Ct as w,$9 as x,Q9 as y,sx as z};
999
+ `),()=>{u.current?.removeAttribute("data-motion-pop-id"),B.contains(E)&&B.removeChild(E)}},[t]),T.jsx(J5,{isPresent:t,childRef:u,sizeRef:h,pop:s,children:s===!1?e:k.cloneElement(e,{ref:y})})}const tO=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:o,presenceAffectsLayout:s,mode:l,anchorX:u,anchorY:h,root:f})=>{const m=Qm(nO),y=k.useId();let v=!0,_=k.useMemo(()=>(v=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:x=>{m.set(x,!0);for(const C of m.values())if(!C)return;a&&a()},register:x=>(m.set(x,!1),()=>m.delete(x))}),[n,m,a]);return s&&v&&(_={..._}),k.useMemo(()=>{m.forEach((x,C)=>m.set(C,!1))},[n]),k.useEffect(()=>{!n&&!m.size&&a&&a()},[n]),e=T.jsx(eO,{pop:l==="popLayout",isPresent:n,anchorX:u,anchorY:h,root:f,children:e}),T.jsx(Sd.Provider,{value:_,children:e})};function nO(){return new Map}function iP(e=!0){const t=k.useContext(Sd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:o}=t,s=k.useId();k.useEffect(()=>{if(e)return o(s)},[e]);const l=k.useCallback(()=>e&&a&&a(s),[s,a,e]);return!n&&a?[!1,l]:[!0]}const nu=e=>e.key||"";function N_(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const oP=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:s="sync",propagate:l=!1,anchorX:u="left",anchorY:h="top",root:f})=>{const[m,y]=iP(l),v=k.useMemo(()=>N_(e),[e]),_=l&&!m?[]:v.map(nu),x=k.useRef(!0),C=k.useRef(v),S=Qm(()=>new Map),M=k.useRef(new Set),[R,A]=k.useState(v),[E,B]=k.useState(v);Lx(()=>{x.current=!1,C.current=v;for(let P=0;P<E.length;P++){const Z=nu(E[P]);_.includes(Z)?(S.delete(Z),M.current.delete(Z)):S.get(Z)!==!0&&S.set(Z,!1)}},[E,_.length,_.join("-")]);const $=[];if(v!==R){let P=[...v];for(let Z=0;Z<E.length;Z++){const X=E[Z],fe=nu(X);_.includes(fe)||(P.splice(Z,0,X),$.push(X))}return s==="wait"&&$.length&&(P=$),B(N_(P)),A(v),null}const{forceRender:V}=k.useContext(Xm);return T.jsx(T.Fragment,{children:E.map(P=>{const Z=nu(P),X=l&&!m?!1:v===E||_.includes(Z),fe=()=>{if(M.current.has(Z))return;if(S.has(Z))M.current.add(Z),S.set(Z,!0);else return;let he=!0;S.forEach(J=>{J||(he=!1)}),he&&(V?.(),B(C.current),l&&y?.(),a&&a())};return T.jsx(tO,{isPresent:X,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:f,onExitComplete:X?void 0:fe,anchorX:u,anchorY:h,children:P},Z)})})},sP=k.createContext({strict:!1}),O_={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 j_=!1;function aO(){if(j_)return;const e={};for(const t in O_)e[t]={isEnabled:n=>O_[t].some(a=>!!n[a])};N1(e),j_=!0}function lP(){return aO(),FN()}function rO(e){const t=lP();for(const n in e)t[n]={...t[n],...e[n]};N1(t)}const iO=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 od(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||iO.has(e)}let cP=e=>!od(e);function oO(e){typeof e=="function"&&(cP=t=>t.startsWith("on")?!od(t):e(t))}try{oO(require("@emotion/is-prop-valid").default)}catch{}function sO(e,t,n){const a={};for(const o in e)o==="values"&&typeof e.values=="object"||an(e[o])||(cP(o)||n===!0&&od(o)||!t&&!od(o)||e.draggable&&o.startsWith("onDrag"))&&(a[o]=e[o]);return a}const Ad=k.createContext({});function lO(e,t){if(Ed(e)){const{initial:n,animate:a}=e;return{initial:n===!1||kl(n)?n:void 0,animate:kl(a)?a:void 0}}return e.inherit!==!1?t:{}}function cO(e){const{initial:t,animate:n}=lO(e,k.useContext(Ad));return k.useMemo(()=>({initial:t,animate:n}),[U_(t),U_(n)])}function U_(e){return Array.isArray(e)?e.join(" "):e}const Sg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function uP(e,t,n){for(const a in t)!an(t[a])&&!V1(a,n)&&(e[a]=t[a])}function uO({transformTemplate:e},t){return k.useMemo(()=>{const n=Sg();return wg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function dO(e,t){const n=e.style||{},a={};return uP(a,n,e),Object.assign(a,uO(e,t)),a}function hO(e,t){const n={},a=dO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.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=a,n}const dP=()=>({...Sg(),attrs:{}});function fO(e,t,n,a){const o=k.useMemo(()=>{const s=dP();return $1(s,t,W1(a),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};uP(s,e.style,e),o.style={...s,...o.style}}return o}const pO=["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 Cg(e){return typeof e!="string"||e.includes("-")?!1:!!(pO.indexOf(e)>-1||/[A-Z]/u.test(e))}function mO(e,t,n,{latestValues:a},o,s=!1,l){const h=(l??Cg(e)?fO:hO)(t,a,o,e),f=sO(t,typeof e=="string",s),m=e!==k.Fragment?{...f,...h,ref:n}:{},{children:y}=t,v=k.useMemo(()=>an(y)?y.get():y,[y]);return k.createElement(e,{...m,children:v})}function gO({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,o){return{latestValues:yO(n,a,o,e),renderState:t()}}function yO(e,t,n,a){const o={},s=a(e,{});for(const v in s)o[v]=Au(s[v]);let{initial:l,animate:u}=e;const h=Ed(e),f=I1(e);t&&f&&!h&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const y=m?u:l;if(y&&typeof y!="boolean"&&!Td(y)){const v=Array.isArray(y)?y:[y];for(let _=0;_<v.length;_++){const x=fg(e,v[_]);if(x){const{transitionEnd:C,transition:S,...M}=x;for(const R in M){let A=M[R];if(Array.isArray(A)){const E=m?A.length-1:0;A=A[E]}A!==null&&(o[R]=A)}for(const R in C)o[R]=C[R]}}}return o}const hP=e=>(t,n)=>{const a=k.useContext(Ad),o=k.useContext(Sd),s=()=>gO(e,t,a,o);return n?s():Qm(s)},vO=hP({scrapeMotionValuesFromProps:xg,createRenderState:Sg}),bO=hP({scrapeMotionValuesFromProps:K1,createRenderState:dP}),kO=Symbol.for("motionComponentSymbol");function _O(e,t,n){const a=k.useRef(n);k.useInsertionEffect(()=>{a.current=n});const o=k.useRef(null);return k.useCallback(s=>{s&&e.onMount?.(s);const l=a.current;if(typeof l=="function")if(s){const u=l(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):l(s);else l&&(l.current=s);t&&(s?t.mount(s):t.unmount())},[t])}const fP=k.createContext({});function Io(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function wO(e,t,n,a,o,s){const{visualElement:l}=k.useContext(Ad),u=k.useContext(sP),h=k.useContext(Sd),f=k.useContext(Pg),m=f.reducedMotion,y=f.skipAnimations,v=k.useRef(null),_=k.useRef(!1);a=a||u.renderer,!v.current&&a&&(v.current=a(e,{visualState:t,parent:l,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:s}),_.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const x=v.current,C=k.useContext(fP);x&&!x.projection&&o&&(x.type==="html"||x.type==="svg")&&xO(v.current,n,o,C);const S=k.useRef(!1);k.useInsertionEffect(()=>{x&&S.current&&x.update(n,h)});const M=n[k1],R=k.useRef(!!M&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(M)&&window.MotionHasOptimisedAnimation?.(M));return Lx(()=>{_.current=!0,x&&(S.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),R.current&&x.animationState&&x.animationState.animateChanges())}),k.useEffect(()=>{x&&(!R.current&&x.animationState&&x.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(M)}),R.current=!1),x.enteringChildren=void 0)}),x}function xO(e,t,n,a){const{layoutId:o,layout:s,drag:l,dragConstraints:u,layoutScroll:h,layoutRoot:f,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:pP(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!l||u&&Io(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:a,crossfade:y,layoutScroll:h,layoutRoot:f,layoutAnchor:m})}function pP(e){if(e)return e.options.allowProjection!==!1?e.projection:pP(e.parent)}function Hf(e,{forwardMotionProps:t=!1,type:n}={},a,o){a&&rO(a);const s=n?n==="svg":Cg(e),l=s?bO:vO;function u(f,m){let y;const v={...k.useContext(Pg),...f,layoutId:PO(f)},{isStatic:_}=v,x=cO(f),C=l(f,_);if(!_&&typeof window<"u"){SO();const S=CO(v);y=S.MeasureLayout,x.visualElement=wO(e,C,v,o,S.ProjectionNode,s)}return T.jsxs(Ad.Provider,{value:x,children:[y&&x.visualElement?T.jsx(y,{visualElement:x.visualElement,...v}):null,mO(e,f,_O(C,x.visualElement,m),C,_,t,s)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=k.forwardRef(u);return h[kO]=e,h}function PO({layoutId:e}){const t=k.useContext(Xm).id;return t&&e!==void 0?t+"-"+e:e}function SO(e,t){k.useContext(sP).strict}function CO(e){const t=lP(),{drag:n,layout:a}=t;if(!n&&!a)return{};const o={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function TO(e,t){if(typeof Proxy>"u")return Hf;const n=new Map,a=(s,l)=>Hf(s,l,e,t),o=(s,l)=>a(s,l);return new Proxy(o,{get:(s,l)=>l==="create"?a:(n.has(l)||n.set(l,Hf(l,void 0,e,t)),n.get(l))})}const EO=(e,t)=>t.isSVG??Cg(e)?new r5(t):new QN(t,{allowProjection:e!==k.Fragment});class AO extends ai{constructor(t){super(t),t.animationState||(t.animationState=c5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Td(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 RO=0;class DO extends ai{constructor(){super(...arguments),this.id=RO++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;if(t&&a===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"){const u=Mi(this.node,s,l);if(u){const{transition:h,transitionEnd:f,...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 LO={animation:{Feature:AO},exit:{Feature:DO}};function jl(e){return{point:{x:e.pageX,y:e.pageY}}}const IO=e=>t=>yg(t)&&e(t,jl(t));function ll(e,t,n,a){return _l(e,t,IO(n),a)}const mP=({current:e})=>e?e.ownerDocument.defaultView:null,B_=(e,t)=>Math.abs(e-t);function MO(e,t){const n=B_(e.x,t.x),a=B_(e.y,t.y);return Math.sqrt(n**2+a**2)}const z_=new Set(["auto","scroll"]);class gP{constructor(t,n,{transformPagePoint:a,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:l=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=_=>{this.handleScroll(_.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=au(this.lastRawMoveEventInfo,this.transformPagePoint));const _=Wf(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,C=MO(_.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!C)return;const{point:S}=_,{timestamp:M}=nn;this.history.push({...S,timestamp:M});const{onStart:R,onMove:A}=this.handlers;x||(R&&R(this.lastMoveEvent,_),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,_)},this.handlePointerMove=(_,x)=>{this.lastMoveEvent=_,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=au(x,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(_,x)=>{this.end();const{onEnd:C,onSessionEnd:S,resumeAnimation:M}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&M&&M(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=Wf(_.type==="pointercancel"?this.lastMoveEventInfo:au(x,this.transformPagePoint),this.history);this.startEvent&&C&&C(_,R),S&&S(_,R)},!yg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=l,this.contextWindow=o||window;const h=jl(t),f=au(h,this.transformPagePoint),{point:m}=f,{timestamp:y}=nn;this.history=[{...m,timestamp:y}];const{onSessionStart:v}=n;v&&v(t,Wf(f,this.history)),this.removeListeners=Ml(ll(this.contextWindow,"pointermove",this.handlePointerMove),ll(this.contextWindow,"pointerup",this.handlePointerUp),ll(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(z_.has(a.overflowX)||z_.has(a.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 a=t===window,o=a?{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||(a?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),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ei(this.updatePoint)}}function au(e,t){return t?{point:t(e.point)}:e}function F_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wf({point:e},t){return{point:e,delta:F_(e,yP(t)),offset:F_(e,NO(t)),velocity:OO(t,.1)}}function NO(e){return e[0]}function yP(e){return e[e.length-1]}function OO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const o=yP(e);for(;n>=0&&(a=e[n],!(o.timestamp-a.timestamp>Hn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&o.timestamp-a.timestamp>Hn(t)*2&&(a=e[1]);const s=ta(o.timestamp-a.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-a.x)/s,y:(o.y-a.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function jO(e,{min:t,max:n},a){return t!==void 0&&e<t?e=a?xt(t,e,a.min):Math.max(e,t):n!==void 0&&e>n&&(e=a?xt(n,e,a.max):Math.min(e,n)),e}function V_(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 UO(e,{top:t,left:n,bottom:a,right:o}){return{x:V_(e.x,n,o),y:V_(e.y,t,a)}}function $_(e,t){let n=t.min-e.min,a=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,a]=[a,n]),{min:n,max:a}}function BO(e,t){return{x:$_(e.x,t.x),y:$_(e.y,t.y)}}function zO(e,t){let n=.5;const a=kn(e),o=kn(t);return o>a?n=vl(t.min,t.max-a,e.min):a>o&&(n=vl(e.min,e.max-o,t.min)),Wa(0,1,n)}function FO(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 VO(e=Kp){return e===!1?e=0:e===!0&&(e=Kp),{x:H_(e,"left","right"),y:H_(e,"top","bottom")}}function H_(e,t,n){return{min:W_(e,t),max:W_(e,n)}}function W_(e,t){return typeof e=="number"?e:e[t]||0}const $O=new WeakMap;class HO{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=Wt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=y=>{n&&this.snapToCursor(jl(y).point),this.stopAnimation()},l=(y,v)=>{const{drag:_,dragPropagation:x,onDragStart:C}=this.getProps();if(_&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=vN(_),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Oa(M=>{let R=this.getAxisMotionValue(M).get()||0;if(za.test(R)){const{projection:A}=this.visualElement;if(A&&A.layout){const E=A.layout.layoutBox[M];E&&(R=kn(E)*(parseFloat(R)/100))}}this.originPoint[M]=R}),C&&gt.update(()=>C(y,v),!1,!0),Up(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},u=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:_,dragDirectionLock:x,onDirectionLock:C,onDrag:S}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:M}=v;if(x&&this.currentDirection===null){this.currentDirection=KO(M),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",v.point,M),this.updateAxis("y",v.point,M),this.visualElement.render(),S&&gt.update(()=>S(y,v),!1,!0)},h=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new gP(t,{onSessionStart:s,onStart:l,onMove:u,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:a,contextWindow:mP(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!a)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&gt.postRender(()=>u(a,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&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,a){const{drag:o}=this.getProps();if(!a||!ru(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(l=jO(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Io(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=UO(a.layoutBox,t):this.constraints=!1,this.elastic=VO(n),o!==this.constraints&&!Io(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&Oa(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=FO(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Io(t))return!1;const a=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=KN(a,o.root,this.visualElement.getTransformPagePoint());let l=BO(o.layout.layoutBox,s);if(n){const u=n($N(l));this.hasMutatedConstraints=!!u,u&&(l=j1(u))}return l}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},f=Oa(m=>{if(!ru(m,n,this.currentDirection))return;let y=h&&h[m]||{};(l===!0||l===m)&&(y={min:0,max:0});const v=o?200:1e6,_=o?40:1e7,x={type:"inertia",velocity:a?t[m]:0,bounceStiffness:v,bounceDamping:_,timeConstant:750,restDelta:1,restSpeed:10,...s,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return Up(this.visualElement,t),a.start(hg(t,a,0,n,this.visualElement,!1))}stopAnimation(){Oa(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),o=a[n];return o||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){Oa(n=>{const{drag:a}=this.getProps();if(!ru(n,a,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:u}=o.layout.layoutBox[n],h=s.get()||0;s.set(t[n]-xt(l,u,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!Io(n)||!a||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Oa(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const h=u.get();o[l]=zO({min:h,max:h},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),Oa(l=>{if(!ru(l,t,null))return;const u=this.getAxisMotionValue(l),{min:h,max:f}=this.constraints[l];u.set(xt(h,f,o[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;$O.set(this.visualElement,this);const t=this.visualElement.current,n=ll(t,"pointerdown",f=>{const{drag:m,dragListener:y=!0}=this.getProps(),v=f.target,_=v!==t&&PN(v);m&&y&&!_&&this.start(f)});let a;const o=()=>{const{dragConstraints:f}=this.getProps();Io(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),a||(a=WO(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,l=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),gt.read(o);const u=_l(window,"resize",()=>this.scalePositionWithinConstraints()),h=s.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:m})=>{this.isDragging&&m&&(Oa(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=f[y].translate,v.set(v.get()+f[y].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),h&&h(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=Kp,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:u}}}function K_(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function WO(e,t,n){const a=Jk(e,K_(n)),o=Jk(t,K_(n));return()=>{a(),o()}}function ru(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function KO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class GO extends ai{constructor(t){super(t),this.removeGroupControls=aa,this.removeListeners=aa,this.controls=new HO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||aa}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 Kf=e=>(t,n)=>{e&&gt.update(()=>e(t,n),!1,!0)};class qO extends ai{constructor(){super(...arguments),this.removePointerDownListener=aa}onPointerDown(t){this.session=new gP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:Kf(t),onStart:Kf(n),onMove:Kf(a),onEnd:(s,l)=>{delete this.session,o&&gt.postRender(()=>o(s,l))}}}mount(){this.removePointerDownListener=ll(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 Gf=!1;class YO extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),a&&a.register&&o&&a.register(s),Gf&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ru.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:o,isPresent:s}=this.props,{projection:l}=a;return l&&(l.isPresent=s,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),Gf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||gt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:a}=t;a&&(a.options.layoutAnchor=n,a.root.didUpdate(),gg.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:o}=t;Gf=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),a&&a.deregister&&a.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function vP(e){const[t,n]=iP(),a=k.useContext(Xm);return T.jsx(YO,{...e,layoutGroup:a,switchLayoutGroup:k.useContext(fP),isPresent:t,safeToRemove:n})}const ZO={pan:{Feature:qO},drag:{Feature:GO,ProjectionNode:rP,MeasureLayout:vP}};function G_(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=a[o];s&&gt.postRender(()=>s(t,jl(t)))}class XO extends ai{mount(){const{current:t}=this.node;t&&(this.unmount=kN(t,(n,a)=>(G_(this.node,a,"Start"),o=>G_(this.node,o,"End"))))}unmount(){}}class QO extends ai{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=Ml(_l(this.node.current,"focus",()=>this.onFocus()),_l(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function q_(e,t,n){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=a[o];s&&gt.postRender(()=>s(t,jl(t)))}class JO extends ai{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=CN(t,(o,s)=>(q_(this.node,s,"Start"),(l,{success:u})=>q_(this.node,l,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const Gp=new WeakMap,qf=new WeakMap,e6=e=>{const t=Gp.get(e.target);t&&t(e)},t6=e=>{e.forEach(e6)};function n6({root:e,...t}){const n=e||document;qf.has(n)||qf.set(n,{});const a=qf.get(n),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(t6,{root:e,...t})),a[o]}function a6(e,t,n){const a=n6(t);return Gp.set(e,n),a.observe(e),()=>{Gp.delete(e),a.unobserve(e)}}const r6={some:0,all:1};class i6 extends ai{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:o="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:r6[o]},u=h=>{const{isIntersecting:f}=h;if(this.isInView===f||(this.isInView=f,s&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),v=f?m:y;v&&v(h)};this.stopObserver=a6(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(o6(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function o6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const s6={inView:{Feature:i6},tap:{Feature:JO},focus:{Feature:QO},hover:{Feature:XO}},l6={layout:{ProjectionNode:rP,MeasureLayout:vP}},c6={...LO,...s6,...ZO,...l6},cl=TO(c6,EO);function u6(){!_g.current&&M1();const[e]=k.useState(nd.current);return e}function bP(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=bP(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function d6(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=bP(e))&&(a&&(a+=" "),a+=t);return a}const h6=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},f6=(e,t)=>({classGroupId:e,validator:t}),kP=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),sd="-",Y_=[],p6="arbitrary..",m6=e=>{const t=y6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return g6(l);const u=l.split(sd),h=u[0]===""&&u.length>1?1:0;return _P(u,h,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const h=a[l],f=n[l];return h?f?h6(f,h):h:f||Y_}return n[l]||Y_}}},_P=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const f=_P(e,t+1,s);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(sd):e.slice(t).join(sd),h=l.length;for(let f=0;f<h;f++){const m=l[f];if(m.validator(u))return m.classGroupId}},g6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?p6+a:void 0})(),y6=e=>{const{theme:t,classGroups:n}=e;return v6(n,t)},v6=(e,t)=>{const n=kP();for(const a in e){const o=e[a];Tg(o,n,a,t)}return n},Tg=(e,t,n,a)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];b6(l,t,n,a)}},b6=(e,t,n,a)=>{if(typeof e=="string"){k6(e,t,n);return}if(typeof e=="function"){_6(e,t,n,a);return}w6(e,t,n,a)},k6=(e,t,n)=>{const a=e===""?t:wP(t,e);a.classGroupId=n},_6=(e,t,n,a)=>{if(x6(e)){Tg(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(f6(n,e))},w6=(e,t,n,a)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[u,h]=o[l];Tg(h,wP(t,u),n,a)}},wP=(e,t)=>{let n=e;const a=t.split(sd),o=a.length;for(let s=0;s<o;s++){const l=a[s];let u=n.nextPart.get(l);u||(u=kP(),n.nextPart.set(l,u)),n=u}return n},x6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,P6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=a[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},qp="!",Z_=":",S6=[],X_=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),C6=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const s=[];let l=0,u=0,h=0,f;const m=o.length;for(let C=0;C<m;C++){const S=o[C];if(l===0&&u===0){if(S===Z_){s.push(o.slice(h,C)),h=C+1;continue}if(S==="/"){f=C;continue}}S==="["?l++:S==="]"?l--:S==="("?u++:S===")"&&u--}const y=s.length===0?o:o.slice(h);let v=y,_=!1;y.endsWith(qp)?(v=y.slice(0,-1),_=!0):y.startsWith(qp)&&(v=y.slice(1),_=!0);const x=f&&f>h?f-h:void 0;return X_(s,_,v,x)};if(t){const o=t+Z_,s=a;a=l=>l.startsWith(o)?s(l.slice(o.length)):X_(S6,!1,l,void 0,!0)}if(n){const o=a;a=s=>n({className:s,parseClassName:o})}return a},T6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],u=l[0]==="[",h=t.has(l);u||h?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(l)):o.push(l)}return o.length>0&&(o.sort(),a.push(...o)),a}},E6=e=>({cache:P6(e.cacheSize),parseClassName:C6(e),sortModifiers:T6(e),...m6(e)}),A6=/\s+/,R6=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],u=e.trim().split(A6);let h="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:y,modifiers:v,hasImportantModifier:_,baseClassName:x,maybePostfixModifierPosition:C}=n(m);if(y){h=m+(h.length>0?" "+h:h);continue}let S=!!C,M=a(S?x.substring(0,C):x);if(!M){if(!S){h=m+(h.length>0?" "+h:h);continue}if(M=a(x),!M){h=m+(h.length>0?" "+h:h);continue}S=!1}const R=v.length===0?"":v.length===1?v[0]:s(v).join(":"),A=_?R+qp:R,E=A+M;if(l.indexOf(E)>-1)continue;l.push(E);const B=o(M,S);for(let $=0;$<B.length;++$){const V=B[$];l.push(A+V)}h=m+(h.length>0?" "+h:h)}return h},D6=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=xP(n))&&(o&&(o+=" "),o+=a);return o},xP=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=xP(e[a]))&&(n&&(n+=" "),n+=t);return n},L6=(e,...t)=>{let n,a,o,s;const l=h=>{const f=t.reduce((m,y)=>y(m),e());return n=E6(f),a=n.cache.get,o=n.cache.set,s=u,u(h)},u=h=>{const f=a(h);if(f)return f;const m=R6(h,n);return o(h,m),m};return s=l,(...h)=>s(D6(...h))},I6=[],Ht=e=>{const t=n=>n[e]||I6;return t.isThemeGetter=!0,t},PP=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,SP=/^\((?:(\w[\w-]*):)?(.+)\)$/i,M6=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,N6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O6=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,j6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,U6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zr=e=>M6.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),Fr=e=>!!e&&Number.isInteger(Number(e)),Yf=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),lr=e=>N6.test(e),CP=()=>!0,z6=e=>O6.test(e)&&!j6.test(e),Eg=()=>!1,F6=e=>U6.test(e),V6=e=>B6.test(e),$6=e=>!Pe(e)&&!Ce(e),H6=e=>ri(e,AP,Eg),Pe=e=>PP.test(e),Pi=e=>ri(e,RP,z6),Q_=e=>ri(e,Q6,Xe),W6=e=>ri(e,LP,CP),K6=e=>ri(e,DP,Eg),J_=e=>ri(e,TP,Eg),G6=e=>ri(e,EP,V6),iu=e=>ri(e,IP,F6),Ce=e=>SP.test(e),Ws=e=>Ki(e,RP),q6=e=>Ki(e,DP),e0=e=>Ki(e,TP),Y6=e=>Ki(e,AP),Z6=e=>Ki(e,EP),ou=e=>Ki(e,IP,!0),X6=e=>Ki(e,LP,!0),ri=(e,t,n)=>{const a=PP.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ki=(e,t,n=!1)=>{const a=SP.exec(e);return a?a[1]?t(a[1]):n:!1},TP=e=>e==="position"||e==="percentage",EP=e=>e==="image"||e==="url",AP=e=>e==="length"||e==="size"||e==="bg-size",RP=e=>e==="length",Q6=e=>e==="number",DP=e=>e==="family-name",LP=e=>e==="number"||e==="weight",IP=e=>e==="shadow",J6=()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),a=Ht("font-weight"),o=Ht("tracking"),s=Ht("leading"),l=Ht("breakpoint"),u=Ht("container"),h=Ht("spacing"),f=Ht("radius"),m=Ht("shadow"),y=Ht("inset-shadow"),v=Ht("text-shadow"),_=Ht("drop-shadow"),x=Ht("blur"),C=Ht("perspective"),S=Ht("aspect"),M=Ht("ease"),R=Ht("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...E(),Ce,Pe],$=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],P=()=>[Ce,Pe,h],Z=()=>[zr,"full","auto",...P()],X=()=>[Fr,"none","subgrid",Ce,Pe],fe=()=>["auto",{span:["full",Fr,Ce,Pe]},Fr,Ce,Pe],he=()=>[Fr,"auto",Ce,Pe],J=()=>["auto","min","max","fr",Ce,Pe],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ue=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...P()],ie=()=>[zr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],F=()=>[zr,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Y=()=>[zr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],z=()=>[e,Ce,Pe],I=()=>[...E(),e0,J_,{position:[Ce,Pe]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ge=()=>["auto","cover","contain",Y6,H6,{size:[Ce,Pe]}],pe=()=>[Yf,Ws,Pi],me=()=>["","none","full",f,Ce,Pe],be=()=>["",Xe,Ws,Pi],Be=()=>["solid","dashed","dotted","double"],Ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[Xe,Yf,e0,J_],Rt=()=>["","none",x,Ce,Pe],Mn=()=>["none",Xe,Ce,Pe],Pn=()=>["none",Xe,Ce,Pe],mt=()=>[Xe,Ce,Pe],Jt=()=>[zr,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lr],breakpoint:[lr],color:[CP],container:[lr],"drop-shadow":[lr],ease:["in","out","in-out"],font:[$6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lr],shadow:[lr],spacing:["px",Xe],text:[lr],"text-shadow":[lr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zr,Pe,Ce,S]}],container:["container"],columns:[{columns:[Xe,Pe,Ce,u]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:B()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[Fr,"auto",Ce,Pe]}],basis:[{basis:[zr,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,zr,"auto","initial","none",Pe]}],grow:[{grow:["",Xe,Ce,Pe]}],shrink:[{shrink:["",Xe,Ce,Pe]}],order:[{order:[Fr,"first","last","none",Ce,Pe]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...ue()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...ue(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ue(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...ue(),"baseline"]}],"place-self":[{"place-self":["auto",...ue()]}],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:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mbs:[{mbs:Q()}],mbe:[{mbe:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:ie()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[u,"screen",...ie()]}],"min-w":[{"min-w":[u,"screen","none",...ie()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...ie()]}],h:[{h:["screen","lh",...ie()]}],"min-h":[{"min-h":["screen","lh","none",...ie()]}],"max-h":[{"max-h":["screen","lh",...ie()]}],"font-size":[{text:["base",n,Ws,Pi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,X6,W6]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Yf,Pe]}],"font-family":[{font:[q6,K6,t]}],"font-features":[{"font-features":[Pe]}],"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,Ce,Pe]}],"line-clamp":[{"line-clamp":[Xe,"none",Ce,Q_]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",Ce,Pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,Pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Be(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",Ce,Pi]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Xe,"auto",Ce,Pe]}],"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",Ce,Pe]}],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",Ce,Pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:ge()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fr,Ce,Pe],radial:["",Ce,Pe],conic:[Fr,Ce,Pe]},Z6,G6]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:be()}],"border-w-x":[{"border-x":be()}],"border-w-y":[{"border-y":be()}],"border-w-s":[{"border-s":be()}],"border-w-e":[{"border-e":be()}],"border-w-bs":[{"border-bs":be()}],"border-w-be":[{"border-be":be()}],"border-w-t":[{"border-t":be()}],"border-w-r":[{"border-r":be()}],"border-w-b":[{"border-b":be()}],"border-w-l":[{"border-l":be()}],"divide-x":[{"divide-x":be()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":be()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Be(),"hidden","none"]}],"divide-style":[{divide:[...Be(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...Be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,Ce,Pe]}],"outline-w":[{outline:["",Xe,Ws,Pi]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",m,ou,iu]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",y,ou,iu]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Xe,Pi]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":be()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",v,ou,iu]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Xe,Ce,Pe]}],"mix-blend":[{"mix-blend":[...Ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ye()}],"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":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[Ce,Pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"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":E()}],"mask-image-conic-pos":[{"mask-conic":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:ge()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Pe]}],filter:[{filter:["","none",Ce,Pe]}],blur:[{blur:Rt()}],brightness:[{brightness:[Xe,Ce,Pe]}],contrast:[{contrast:[Xe,Ce,Pe]}],"drop-shadow":[{"drop-shadow":["","none",_,ou,iu]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Xe,Ce,Pe]}],"hue-rotate":[{"hue-rotate":[Xe,Ce,Pe]}],invert:[{invert:["",Xe,Ce,Pe]}],saturate:[{saturate:[Xe,Ce,Pe]}],sepia:[{sepia:["",Xe,Ce,Pe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Pe]}],"backdrop-blur":[{"backdrop-blur":Rt()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,Ce,Pe]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,Ce,Pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,Ce,Pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,Ce,Pe]}],"backdrop-invert":[{"backdrop-invert":["",Xe,Ce,Pe]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,Ce,Pe]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,Ce,Pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,Ce,Pe]}],"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",Ce,Pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",Ce,Pe]}],ease:[{ease:["linear","initial",M,Ce,Pe]}],delay:[{delay:[Xe,Ce,Pe]}],animate:[{animate:["none",R,Ce,Pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,Ce,Pe]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:Mn()}],"rotate-x":[{"rotate-x":Mn()}],"rotate-y":[{"rotate-y":Mn()}],"rotate-z":[{"rotate-z":Mn()}],scale:[{scale:Pn()}],"scale-x":[{"scale-x":Pn()}],"scale-y":[{"scale-y":Pn()}],"scale-z":[{"scale-z":Pn()}],"scale-3d":["scale-3d"],skew:[{skew:mt()}],"skew-x":[{"skew-x":mt()}],"skew-y":[{"skew-y":mt()}],transform:[{transform:[Ce,Pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Jt()}],"translate-x":[{"translate-x":Jt()}],"translate-y":[{"translate-y":Jt()}],"translate-z":[{"translate-z":Jt()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"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",Ce,Pe]}],"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",Ce,Pe]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[Xe,Ws,Pi,Q_]}],stroke:[{stroke:["none",...z()]}],"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"]}},ej=L6(J6);function Qt(...e){return ej(d6(e))}const tj=T.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[T.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"}),T.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"}),T.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"}),T.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"})]}),nj=T.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:T.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"})}),aj={google:tj,github:nj},rj={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function ij(e){return rj[e]||String(e||"").replace(/-/g," ")}function oj({title:e,subtitle:t,className:n="",onSuccess:a,hideLogo:o=!1}){Pd();const{enabled:s,signedIn:l,refreshUser:u,signInWithPassword:h,signUp:f,signInWithOAuth:m,getPublicAuthConfig:y}=Il(),[v,_]=k.useState("signin"),[x,C]=k.useState(""),[S,M]=k.useState(""),[R,A]=k.useState(""),[E,B]=k.useState(!1),[$,V]=k.useState(null),[P,Z]=k.useState(null),[X,fe]=k.useState(!1),[he,J]=k.useState(!0),[re,ue]=k.useState([]),[Q,ie]=k.useState(8);k.useEffect(()=>{if(!s)return;let I=!0;return J(!0),(async()=>{const{data:W,error:ge}=await y();if(I){if(ge||!W)ue(["google","github"]);else{const pe=Array.isArray(W.oAuthProviders)?W.oAuthProviders:[],me=Array.isArray(W.customOAuthProviders)?W.customOAuthProviders:[];ue([...pe,...me]),typeof W.passwordMinLength=="number"&&W.passwordMinLength>0&&ie(W.passwordMinLength)}J(!1)}})(),()=>{I=!1}},[s,y]),k.useEffect(()=>{l&&a&&a()},[l,a]);const F=k.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),Y=k.useCallback(async I=>{V(null),B(!0);try{const{error:W}=await m(I,F);W&&V(W.message||String(W))}finally{B(!1)}},[m,F]),z=k.useCallback(async I=>{I.preventDefault(),V(null),B(!0);try{if(v==="signup"){const{data:ge,error:pe}=await f({email:x.trim(),password:S,name:R.trim()||void 0});if(pe){V(pe.message||String(pe));return}if(ge?.requireEmailVerification){Z(Ie("login.verify_email_pending")),_("signin");return}await u();return}const{error:W}=await h({email:x.trim(),password:S});if(W){V(W.message||String(W));return}await u()}finally{B(!1)}},[v,x,S,R,f,h,u]);return s?T.jsxs("div",{className:Qt("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",n),children:[T.jsxs("div",{className:"text-center mb-6",children:[!o&&T.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[T.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),T.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white font-oai tracking-tight",children:Ie("shared.app_name")})]}),T.jsx("h2",{className:Qt("text-sm font-semibold text-oai-black dark:text-white tracking-tight mb-1",o&&"text-base font-bold md:text-lg"),children:e||Ie("login_modal.subtitle")}),t&&T.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px] mx-auto",children:t})]}),P&&T.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:P}),$&&T.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:$}),T.jsx("div",{className:"space-y-2.5 mb-5",children:he?T.jsxs("div",{className:"space-y-2.5",children:[T.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),T.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):re.map(I=>T.jsxs("button",{type:"button",disabled:E,onClick:()=>Y(I),className:Qt("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:[aj[I]||null,Ie("login.oauth.continue",{provider:ij(I)})]},I))}),X?T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"relative mb-5",children:[T.jsx("div",{className:"absolute inset-0 flex items-center",children:T.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),T.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:T.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Ie("login_modal.divider_email")})})]}),T.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:[T.jsx("button",{type:"button",className:Qt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",v==="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:()=>{_("signin"),V(null)},children:Ie("login.tab.sign_in")}),T.jsx("button",{type:"button",className:Qt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",v==="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:()=>{_("signup"),V(null)},children:Ie("login.tab.sign_up")})]}),T.jsxs("form",{onSubmit:z,className:"space-y-3",children:[v==="signup"&&T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Ie("login.field.name")}),T.jsx("input",{id:"card-name",type:"text",autoComplete:"name",value:R,onChange:I=>A(I.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:Ie("login.field.name_placeholder")})]}),T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Ie("login.field.email")}),T.jsx("input",{id:"card-email",type:"email",autoComplete:"email",required:!0,value:x,onChange:I=>C(I.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"})]}),T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Ie("login.field.password")}),T.jsx("input",{id:"card-password",type:"password",autoComplete:v==="signup"?"new-password":"current-password",required:!0,minLength:v==="signup"?Q:void 0,value:S,onChange:I=>M(I.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"}),v==="signup"&&T.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:Ie("login.password_hint",{min:String(Q)})})]}),T.jsx("button",{type:"submit",disabled:E,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:Ie(v==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"relative mb-5",children:[T.jsx("div",{className:"absolute inset-0 flex items-center",children:T.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),T.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:T.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Ie("login.divider")})})]}),T.jsxs("button",{type:"button",onClick:()=>fe(!0),className:Qt("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:[T.jsx(zI,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),Ie("login_modal.continue_email")]})]})]}):null}function sj(){const{isOpen:e,closeLoginModal:t}=hM(),{enabled:n}=Il();return k.useEffect(()=>{if(!e)return;const a=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),n?T.jsx(oP,{children:e&&T.jsxs(cl.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:[T.jsx(cl.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),T.jsxs(cl.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 shadow-2xl overflow-hidden",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:a=>a.stopPropagation(),children:[T.jsx("button",{type:"button",onClick:t,className:"absolute right-4 top-4 z-10 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:T.jsx(Zm,{className:"h-5 w-5"})}),T.jsx(oj,{onSuccess:t,className:"p-6 bg-transparent"})]})]})}):null}const lj={},d7="https://tokentracker.statuspage.io/";function cj(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?lj:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||hr()).trim()}function uj(){return hr()}function dj(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 hj=300*1e3,fj=720*60*1e3;function Ag(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function pj(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+fj<=t:!0}async function MP(e,t){const n=hr();if(!Ag(n)||!e)return;const a=n.replace(/\/$/,""),o=Al(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};o&&(s.apikey=o);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:t})})}catch{}}async function mj(e){const t=hr();if(!Ag(t)||!e)return null;const n=t.replace(/\/$/,""),a=Al(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(o.apikey=a);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:o,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:s})});if(!l.ok)return null;const u=await l.json().catch(()=>null),h=typeof u?.token=="string"?u.token:null,f=typeof u?.device_id=="string"?u.device_id:null;return!h||!f?null:{token:h,deviceId:f,issuedAt:typeof u?.created_at=="string"?u.created_at:new Date().toISOString()}}async function t0(e){const{deviceToken:t,insforgeBaseUrl:n}=e,a={deviceToken:t},o=n||hr();Ag(o)&&(a.insforgeBaseUrl=o.trim());const s=await wd(),l=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...s},body:JSON.stringify(a)}),u=await l.json().catch(()=>({}));if(!l.ok){const h=typeof u.error=="string"?u.error:`HTTP ${l.status}`;throw new Error(h)}return u}async function n0(e){const t=await e();if(!t)return null;const n=qw();if(n&&!pj(n))return n;const a=await mj(t);return a?(mD(a),a):null}async function NP(e){let t=await e();if(!t)return null;let n=await n0(async()=>t);if(!n)return t;try{return await t0({deviceToken:n.token,insforgeBaseUrl:hr()}),t}catch(a){if(!qw()||(Yw(),t=await e(),!t)||(n=await n0(async()=>t),!n))throw a;return await t0({deviceToken:n.token,insforgeBaseUrl:hr()}),t}}async function gj(e){const t=gD();if(Date.now()-t<hj)return;const n=await NP(e);n&&(Zw(Date.now()),await MP(n,"cloud-sync-auto"))}async function h7(e){const t=await NP(e);t&&(Zw(Date.now()),await MP(t,"cloud-sync-now"))}function yj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function vj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||yj(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function bj(){const e=Wn(),t=Il(),n=k.useRef(!1);k.useEffect(()=>{if(!fD()||!vj(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!pD())return;let a=!1;const o=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await gj(()=>t.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(o)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function kj(){const e=k.useContext(Rx);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}const Yp="tt.sidebarCollapsed",Zf="0.39.17".trim();function _j(){if(typeof window>"u")return!1;const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"||e==="::1"}function OP({includeLeaderboard:e=!_j()}={}){const t=[{id:"usage",to:"/dashboard",icon:CI,label:Ie("nav.usage")},{id:"limits",to:"/limits",icon:MI,label:Ie("nav.limits")}];return e&&t.push({id:"leaderboard",to:"/leaderboard",icon:rM,label:Ie("nav.leaderboard")}),[{id:"general",label:Ie("nav.group.general"),items:t},{id:"tools",label:Ie("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:UI,label:Ie("nav.widgets")},{id:"skills",to:"/skills",icon:GI,label:Ie("nav.skills")},{id:"ip-check",to:"/ip-check",icon:OI,label:Ie("nav.ip_check")}]},{id:"account",label:Ie("nav.group.account"),items:[{id:"settings",to:"/settings",icon:JI,label:Ie("nav.settings")}]}]}function wj(){if(typeof window>"u")return!0;try{const e=window.localStorage.getItem(Yp);return e!=="0"}catch{return!0}}function xj(){const[e,t]=k.useState(wj),n=k.useCallback(()=>{t(a=>{const o=!a;try{typeof window<"u"&&window.localStorage.setItem(Yp,o?"1":"0")}catch{}return o})},[]);return k.useEffect(()=>{if(typeof window>"u")return;const a=o=>{o.key===Yp&&t(o.newValue!=="0")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function Pj(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function Sj({label:e,collapsed:t,first:n}){return t?n?null:T.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):T.jsx("div",{className:Qt("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 Cj({item:e,collapsed:t,active:n,onClick:a}){const o=e.icon;return T.jsxs(gd,{to:e.to,onClick:a,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:Qt("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:[T.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:T.jsx(o,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&T.jsx("span",{className:"truncate",children:e.label})]})}function Tj({collapsed:e}){if(!Zf)return null;const t=Ie("nav.version",{version:Zf});return T.jsx("div",{className:Qt("px-2 text-[10px] font-medium tabular-nums text-oai-gray-400 dark:text-oai-gray-600",e?"text-center":"truncate"),title:t,"aria-label":t,children:`v${Zf}`})}function Ej({as:e="button",title:t,onClick:n,href:a,children:o,className:s,...l}){const u=Qt("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"?T.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...l,children:o}):T.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...l,children:o})}const Aj=[{value:"light",label:"Light",Icon:Ax},{value:"dark",label:"Dark",Icon:Ex},{value:"system",label:"System",Icon:HI}];function Rj({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[o,s]=k.useState(!1),l=k.useRef(null),u=t==="dark"?Ex:Ax;return k.useEffect(()=>{if(!o)return;const h=m=>{l.current&&!l.current.contains(m.target)&&s(!1)},f=m=>{m.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",f)}},[o]),T.jsxs("div",{ref:l,className:"relative",children:[T.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":o,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(h=>!h),className:Qt("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",a?"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:T.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),o&&T.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:Aj.map(({value:h,label:f,Icon:m})=>{const y=e===h;return T.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),s(!1)},className:Qt("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:[T.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),T.jsx("span",{children:f})]},h)})})]})}function jP({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:o,glassChrome:s=!1}){const u=Wn()?.pathname||"/",{theme:h,resolvedTheme:f,setTheme:m}=kj(),{resolvedLocale:y}=Pd(),v=k.useMemo(()=>OP(),[y]);return T.jsxs(T.Fragment,{children:[a?T.jsx("div",{className:"flex justify-end px-2 pt-2 pb-2",children:T.jsx("button",{type:"button",onClick:o,"aria-label":Ie("nav.close_menu"),title:Ie("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:T.jsx(Zm,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})}):null,T.jsx("nav",{"aria-label":Ie("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:v.map((_,x)=>T.jsxs("div",{className:"flex flex-col",children:[T.jsx(Sj,{label:_.label,collapsed:e,first:x===0}),T.jsx("div",{className:"flex flex-col gap-0.5",children:_.items.filter(C=>!(C.to==="/widgets"&&Km())).map(C=>T.jsx(Cj,{item:C,collapsed:e,active:Pj(u,C.to),onClick:n},C.id))})]},_.id))}),T.jsxs("div",{className:"px-2 py-3 space-y-2",children:[T.jsx(Tj,{collapsed:e}),T.jsxs("div",{className:Qt("flex items-center",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[T.jsx(Rj,{theme:h,resolvedTheme:f,onSetTheme:m,glassChrome:s}),T.jsx("div",{className:"flex items-center gap-1.5",children:!a&&T.jsx("button",{type:"button",onClick:t,"aria-label":Ie(e?"nav.expand":"nav.collapse"),title:Ie(e?"nav.expand":"nav.collapse"),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:e?T.jsx(RI,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0}):T.jsx(EI,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})})]})]})]})}function Dj({collapsed:e,onToggleCollapsed:t}){const n=k.useMemo(()=>typeof window>"u"?!1:wa()||Wm(),[]);return T.jsx("aside",{"aria-label":Ie("nav.aside_label"),className:Qt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:T.jsx(jP,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function Lj({open:e,onClose:t}){return k.useEffect(()=>{if(!e)return;const n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),k.useEffect(()=>{if(!e)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e]),e?T.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[T.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),T.jsx("aside",{"aria-label":Ie("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:T.jsx(jP,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function Ij({onOpenDrawer:e}){return T.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:[T.jsx(Ej,{title:Ie("nav.menu"),onClick:e,children:T.jsx(VI,{className:"h-5 w-5","aria-hidden":!0})}),T.jsxs(gd,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[T.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),T.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),T.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function Mj({children:e}){const{collapsed:t,toggle:n}=xj(),[a,o]=k.useState(!1),s=k.useCallback(()=>o(!0),[]),l=k.useCallback(()=>o(!1),[]),u=k.useMemo(()=>typeof window>"u"?!1:wa()||Wm(),[]);return T.jsxs("div",{className:Qt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",Km()&&"tt-native-glass-shell",u?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[u&&T.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),T.jsxs("div",{className:"flex-1 min-h-0 flex",children:[T.jsx(Dj,{collapsed:t,onToggleCollapsed:n}),T.jsx(Lj,{open:a,onClose:l}),T.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:T.jsxs("div",{className:Qt("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:[T.jsx(Ij,{onOpenDrawer:s}),T.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}function Nj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})})}function Oj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:T.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"})})}function jj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})})}function Uj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"})})}function Bj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})})}function zj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M4.125 20.149c-2.69 5.959 3.036 7.453 7.26 3.966 1.24 3.91 5.898.993 7.569-2.036 3.682-6.678 2.195-13.49 1.813-14.895-2.617-9.582-15.699-9.592-17.95.049-.526 1.687-.535 3.606-.833 5.598-.15 1.005-.256 1.646-.645 2.703-.223.607-.53 1.147-1.014 2.056-.75 1.412-.434 4.138 3.434 2.724v.001ZM11.895 11.332c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.395.9.395 1.578 0 1.283-.493 2.048-1.319 2.048Zm4.416 0c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.396.9.396 1.578 0 1.283-.494 2.048-1.32 2.048Z"})})}function Fj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function Vj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:[T.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),T.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]})}function $j({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"})})}function Hj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 60",fill:"none",className:t,"aria-hidden":"true",children:[T.jsx("path",{fill:"currentColor",d:"M37.2114 3.75318C37.6821 3.33106 37.7106 3.31457 38.0558 3.29385C38.6149 3.2531 39.1272 3.52199 39.9989 4.31564C42.0356 6.16652 44.8714 9.97183 46.6346 13.2212L47.3163 14.4819L48.2782 14.9605C49.2072 15.4299 50.7308 16.3923 51.3672 16.9085C51.655 17.1464 51.6956 17.1508 51.9947 17.0344C53.3454 16.5084 55.2803 17.206 56.9869 18.8432C58.5231 20.3155 59.9943 22.8312 60.558 24.9308C60.6403 25.2687 60.7493 25.9952 60.7891 26.5362C60.9177 28.4358 60.3092 29.9532 59.1362 30.64C58.8965 30.7784 58.8801 30.8158 58.8868 31.4132C58.9409 34.2583 58.1741 37.0985 56.6335 39.8679C54.8946 42.9773 51.7981 46.1938 47.6074 49.2243C45.357 50.8619 40.0323 53.964 37.6248 55.0532C31.8578 57.6496 27.2346 58.646 23.2188 58.154C20.8236 57.8638 18.1124 56.9287 16.5082 55.8433C16.086 55.5515 16.0191 55.5329 15.6966 55.6251C13.9793 56.1185 11.73 55.1053 9.81931 52.9844C9.05725 52.1366 7.82714 50.0548 7.42839 48.9409C6.50606 46.3339 6.68976 43.9816 7.91836 42.5767C8.23573 42.2149 8.2453 42.1995 8.17598 41.5912C8.06148 40.5951 8.00971 39.1206 8.06202 38.1692L8.10361 37.2803L6.76977 34.9212C4.70378 31.2451 3.3912 28.1582 2.88489 25.7998C2.61762 24.5066 2.63385 23.9324 2.96214 23.5078C3.16198 23.2515 3.81796 22.9866 4.60785 22.8407C6.59665 22.4917 10.9334 22.8076 15.7581 23.6595L16.259 23.7458L17.3608 22.7713C19.1891 21.1519 20.4038 20.244 22.6429 18.8478C24.9768 17.3876 27.6108 16.1858 30.577 15.2346L31.5295 14.9294L32.0526 13.5561C33.9257 8.61146 35.8437 4.96584 37.2114 3.75318ZM21.5208 29.0919C19.404 30.314 18.3453 30.9251 17.5676 31.6099C14.4179 34.3835 13.2414 38.777 14.5823 42.7537C14.9135 43.7357 15.5247 44.7942 16.7469 46.9111C17.9691 49.0279 18.5801 50.0865 19.2649 50.8643C22.0385 54.014 26.4316 55.1918 30.4084 53.8509C31.3904 53.5198 32.4489 52.9085 34.5657 51.6863L46.7442 44.6551C48.8613 43.4328 49.9205 42.8214 50.6983 42.1365C53.8479 39.363 55.0245 34.9695 53.6835 30.9927C53.3524 30.0107 52.7412 28.9522 51.519 26.8354C50.2968 24.7185 49.6858 23.66 49.0009 22.8822C46.2274 19.7325 41.8342 18.5547 37.8575 19.8956C36.8754 20.2267 35.8163 20.8383 33.6993 22.0606L21.5208 29.0919Z"}),T.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:T.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),T.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:T.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function Wj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:T.jsx("path",{d:"M7 2h10a5 5 0 015 5v10a5 5 0 01-5 5H7a5 5 0 01-5-5V7a5 5 0 015-5zm0 4.5v11h2.35v-4.55h5.3V17.5H17v-11h-2.35v4.1h-5.3V6.5H7z"})})}function Kj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:t,children:T.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function Gj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:T.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:T.jsx("path",{d:"M3.17890888,3.6 L3.17890888,0 L16,0 L16,3.6 L3.17890888,3.6 Z M9.642,7.2 L9.64218223,10.8 L0,10.8 L0,3.6 L16,3.6 L16,7.2 L9.642,7.2 Z M3.17890888,18 L3.178,14.4 L0,14.4 L0,10.8 L16,10.8 L16,18 L3.17890888,18 Z",fillRule:"nonzero"})})})}function qj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[T.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),T.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),T.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),T.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),T.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),T.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function Yj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[T.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),T.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),T.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}function Zj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[T.jsx("path",{d:"M9 3v2"}),T.jsx("path",{d:"M15 3v2"}),T.jsx("rect",{x:"4",y:"6",width:"16",height:"13",rx:"3"}),T.jsx("circle",{cx:"9",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),T.jsx("circle",{cx:"15",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),T.jsx("path",{d:"M9 16h6"})]})}const Xj={CLAUDE:Nj,CODEBUDDY:Hj,CODEX:Oj,COPILOT:$j,CRAFT:Gj,CURSOR:jj,DROID:Zj,GEMINI:Uj,GITHUB:Kj,GROK:Bj,HERMES:Wj,KIMI:Vj,KIRO:zj,OPENCODE:Fj,OMP:qj,PI:Yj},Qj={ANTIGRAVITY:"/brand-logos/antigravity.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",GEMINI:"/brand-logos/gemini.svg",HERMES:"/brand-logos/hermes.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"};function Jj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:T.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function e8({provider:e,size:t=16,color:n,className:a=""}){const o=e?.toUpperCase?.()||"",s=Qj[o];if(s)return T.jsx("img",{src:s,alt:"",width:t,height:t,className:a,style:{width:t,height:t,objectFit:"contain"},"aria-hidden":!0});const l=Xj[o];return l?T.jsx(l,{size:t,className:a}):T.jsx(Jj,{size:t,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${a}`})}const UP="tokentracker-skills";async function Gi(e){const t=new URL(`/functions/${UP}`,window.location.origin);if(e)for(const[o,s]of Object.entries(e))s!=null&&s!==""&&t.searchParams.set(o,String(s));const n=await fetch(t.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),a=await n.json().catch(()=>null);if(!n.ok)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}async function ii(e){const t=await wd(),n=await fetch(`/functions/${UP}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...t},cache:"no-store",body:JSON.stringify(e)}),a=await n.json().catch(()=>null);if(!n.ok||a?.ok===!1)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}function t8(){return Gi({mode:"installed"})}function f7(e={}){return Gi({mode:"discover",...e.force?{force:1}:{}})}function p7(e,t=0,n=20){return Gi({mode:"search",q:e,offset:t,limit:n})}function m7(){return Gi({mode:"repos"})}function g7(e,t){return ii({action:"install",skill:e,targets:t})}function y7(e){return ii({action:"uninstall",id:e})}function v7(e){return ii({action:"restore",id:e})}function b7(e,t){return ii({action:"set_targets",id:e,targets:t})}function k7(e,t){return ii({action:"import_local",directory:e,targets:t})}function _7(e,t){return ii({action:"delete_local",directory:e,targets:t||[]})}function w7(e){return ii({action:"add_repo",repo:e})}function x7(e,t){return ii({action:"remove_repo",owner:e,name:t})}function P7(e={}){return Gi({mode:"popular",...e.force?{force:1}:{}})}function S7(e={}){return Gi({mode:"updates",...e.force?{force:1}:{}})}function C7(e={}){return Gi({mode:"skill_usage",...e.force?{force:1}:{}})}const n8=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function a8(){const e=pd(),t=u6(),[n,a]=k.useState(!1),[o,s]=k.useState(""),[l,u]=k.useState(0),[h,f]=k.useState([]),m=k.useRef(null),y=k.useRef(null);k.useEffect(()=>{const A=E=>{(E.metaKey||E.ctrlKey)&&(E.key==="k"||E.key==="K")&&(E.preventDefault(),a($=>!$))};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[]),k.useEffect(()=>{if(!n)return;s(""),u(0);const A=requestAnimationFrame(()=>m.current?.focus());return n8&&!h.length&&t8().then(E=>f(E?.skills||[])).catch(()=>f([])),()=>cancelAnimationFrame(A)},[n,h.length]);const v=k.useMemo(()=>{const A=OP().flatMap(B=>B.items.map($=>({kind:"page",id:`page:${$.id}`,label:$.label,sub:Ie("cmdk.group.pages"),Icon:$.icon,run:()=>e($.to)}))),E=(h||[]).map(B=>({kind:"skill",id:`skill:${B.id||B.directory}`,label:B.name||B.directory,sub:B.repoOwner&&B.repoName?`${B.repoOwner}/${B.repoName}`:Ie("cmdk.group.skills"),provider:(B.targets||[])[0]||"claude",run:()=>e(`/skills?skill=${encodeURIComponent(B.directory||B.id)}`)}));return[...A,...E]},[e,h]),_=k.useMemo(()=>{const A=o.trim().toLowerCase();return A?v.filter(E=>E.label.toLowerCase().includes(A)||String(E.sub||"").toLowerCase().includes(A)):v},[v,o]);k.useEffect(()=>{l>=_.length&&u(_.length?_.length-1:0)},[l,_.length]),k.useEffect(()=>{if(!n)return;y.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,n]);const x=k.useCallback(()=>a(!1),[]),C=k.useCallback(A=>{A&&(x(),A.run())},[x]),S=A=>{A.key==="ArrowDown"?(A.preventDefault(),u(E=>Math.min(E+1,Math.max(0,_.length-1)))):A.key==="ArrowUp"?(A.preventDefault(),u(E=>Math.max(E-1,0))):A.key==="Enter"?(A.preventDefault(),C(_[l])):A.key==="Escape"&&(A.preventDefault(),x())},M={duration:t?0:.12},R=t?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return T.jsx(oP,{children:n?T.jsxs(cl.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:t?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:M,children:[T.jsx("button",{type:"button","aria-label":Ie("cmdk.close"),onClick:x,className:"absolute inset-0 cursor-default bg-oai-black/40"}),T.jsxs(cl.div,{role:"dialog","aria-modal":"true","aria-label":Ie("cmdk.open_aria"),initial:t?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:t?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:R,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[T.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[T.jsx(XI,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),T.jsx("input",{ref:m,type:"text",value:o,onChange:A=>{s(A.target.value),u(0)},onKeyDown:S,"aria-label":Ie("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":_[l]?`cmdk-opt-${l}`:void 0,role:"combobox","aria-expanded":"true",placeholder:Ie("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),T.jsx("div",{ref:y,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:_.length===0?T.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:Ie("cmdk.empty")}):_.map((A,E)=>{const B=E===l;return T.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${E}`,"data-cmdk-index":E,"aria-selected":B,onMouseMove:()=>u(E),onClick:()=>C(A),className:Qt("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",B?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[T.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:A.kind==="skill"?T.jsx(e8,{provider:A.provider,size:16}):T.jsx(A.Icon,{className:"h-4 w-4","aria-hidden":!0})}),T.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:A.label}),T.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:A.sub}),B?T.jsx(LI,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},A.id)})})]})]}):null})}function Rd(){return typeof window<"u"}function Rg(e){return Dg(e)?(e.nodeName||"").toLowerCase():"#document"}function ti(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function r8(e){var t;return(t=(Dg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Dg(e){return Rd()?e instanceof Node||e instanceof ti(e).Node:!1}function BP(e){return Rd()?e instanceof Element||e instanceof ti(e).Element:!1}function Dd(e){return Rd()?e instanceof HTMLElement||e instanceof ti(e).HTMLElement:!1}function Zp(e){return!Rd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ti(e).ShadowRoot}function zP(e){const{overflow:t,overflowX:n,overflowY:a,display:o}=VP(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&o!=="inline"&&o!=="contents"}function T7(e){return/^(table|td|th)$/.test(Rg(e))}function i8(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const o8=/transform|translate|scale|rotate|perspective|filter/,s8=/paint|layout|strict|content/,Si=e=>!!e&&e!=="none";let Xf;function l8(e){const t=BP(e)?VP(e):e;return Si(t.transform)||Si(t.translate)||Si(t.scale)||Si(t.rotate)||Si(t.perspective)||!c8()&&(Si(t.backdropFilter)||Si(t.filter))||o8.test(t.willChange||"")||s8.test(t.contain||"")}function E7(e){let t=Xp(e);for(;Dd(t)&&!FP(t);){if(l8(t))return t;if(i8(t))return null;t=Xp(t)}return null}function c8(){return Xf==null&&(Xf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Xf}function FP(e){return/^(html|body|#document)$/.test(Rg(e))}function VP(e){return ti(e).getComputedStyle(e)}function A7(e){return BP(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xp(e){if(Rg(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zp(e)&&e.host||r8(e);return Zp(t)?t.host:t}function $P(e){const t=Xp(e);return FP(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dd(t)&&zP(t)?t:$P(t)}function a0(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=$P(e),s=o===((a=e.ownerDocument)==null?void 0:a.body),l=ti(o);if(s){const u=u8(l);return t.concat(l,l.visualViewport||[],zP(o)?o:[],u&&n?a0(u):[])}else return t.concat(o,a0(o,[],n))}function u8(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bo(e){return e?.ownerDocument||document}const r0={};function Ul(e,t){const n=k.useRef(r0);return n.current===r0&&(n.current=e(t)),n}const Qf=cm[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],d8=Qf&&Qf!==k.useLayoutEffect?Qf:e=>e();function Ln(e){const t=Ul(h8).current;return t.next=e,d8(t.effect),t.trampoline}function h8(){const e={next:void 0,callback:f8,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function f8(){}let i0=0;function HP(e){return i0+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${i0}`}const p8=[];function WP(e){k.useEffect(e,p8)}const Ks=0;class wl{static create(){return new wl}currentId=Ks;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ks,n()},t)}isStarted(){return this.currentId!==Ks}clear=()=>{this.currentId!==Ks&&(clearTimeout(this.currentId),this.currentId=Ks)};disposeEffect=()=>this.clear}function R7(){const e=Ul(wl.create).current;return WP(e.disposeEffect),e}const ns=typeof navigator<"u",Jf=y8(),KP=b8(),GP=v8(),D7=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),L7=Jf.platform==="MacIntel"&&Jf.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Jf.platform),m8=ns&&/apple/i.test(navigator.vendor),I7=ns&&/android/i.test(KP)||/android/i.test(GP);ns&&KP.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const g8=GP.includes("jsdom/");function y8(){if(!ns)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function v8(){if(!ns)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function b8(){if(!ns)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const o0="data-base-ui-focusable",M7="active",N7="selected",k8="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",O7="ArrowLeft",j7="ArrowRight",U7="ArrowUp",B7="ArrowDown";function xl(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ni(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Zp(n)){let a=t;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function Qp(e){return"composedPath"in e?e.composedPath()[0]:e.target}function z7(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function F7(e){return e.matches("html,body")}function Ld(e){return e?.ownerDocument||document}function _8(e){return Dd(e)&&e.matches(k8)}function V7(e){return e?e.getAttribute("role")==="combobox"&&_8(e):!1}function Jp(e){if(!e||g8)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function $7(e){return e?e.hasAttribute(o0)?e:e.querySelector(`[${o0}]`)||e:null}function Bl(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(a=>n.searchParams.append("args[]",a)),`Base UI error #${e}; visit ${n} for the full message.`}var w8=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ld=w8.join(","),qP=typeof Element>"u",Zo=qP?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,cd=!qP&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ud=function(t,n){var a;n===void 0&&(n=!0);var o=t==null||(a=t.getAttribute)===null||a===void 0?void 0:a.call(t,"inert"),s=o===""||o==="true",l=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ud(t.parentNode));return l},x8=function(t){var n,a=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return a===""||a==="true"},YP=function(t,n,a){if(ud(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ld));return n&&Zo.call(t,ld)&&o.unshift(t),o=o.filter(a),o},dd=function(t,n,a){for(var o=[],s=Array.from(t);s.length;){var l=s.shift();if(!ud(l,!1))if(l.tagName==="SLOT"){var u=l.assignedElements(),h=u.length?u:l.children,f=dd(h,!0,a);a.flatten?o.push.apply(o,f):o.push({scopeParent:l,candidates:f})}else{var m=Zo.call(l,ld);m&&a.filter(l)&&(n||!t.includes(l))&&o.push(l);var y=l.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(l),v=!ud(y,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(l));if(y&&v){var _=dd(y===!0?l.children:y.children,!0,a);a.flatten?o.push.apply(o,_):o.push({scopeParent:l,candidates:_})}else s.unshift.apply(s,l.children)}}return o},ZP=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},XP=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||x8(t))&&!ZP(t)?0:t.tabIndex},P8=function(t,n){var a=XP(t);return a<0&&n&&!ZP(t)?0:a},S8=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},QP=function(t){return t.tagName==="INPUT"},C8=function(t){return QP(t)&&t.type==="hidden"},T8=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(a){return a.tagName==="SUMMARY"});return n},E8=function(t,n){for(var a=0;a<t.length;a++)if(t[a].checked&&t[a].form===n)return t[a]},A8=function(t){if(!t.name)return!0;var n=t.form||cd(t),a=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=a(window.CSS.escape(t.name));else try{o=a(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var s=E8(o,t.form);return!s||s===t},R8=function(t){return QP(t)&&t.type==="radio"},D8=function(t){return R8(t)&&!A8(t)},L8=function(t){var n,a=t&&cd(t),o=(n=a)===null||n===void 0?void 0:n.host,s=!1;if(a&&a!==t){var l,u,h;for(s=!!((l=o)!==null&&l!==void 0&&(u=l.ownerDocument)!==null&&u!==void 0&&u.contains(o)||t!=null&&(h=t.ownerDocument)!==null&&h!==void 0&&h.contains(t));!s&&o;){var f,m,y;a=cd(o),o=(f=a)===null||f===void 0?void 0:f.host,s=!!((m=o)!==null&&m!==void 0&&(y=m.ownerDocument)!==null&&y!==void 0&&y.contains(o))}}return s},s0=function(t){var n=t.getBoundingClientRect(),a=n.width,o=n.height;return a===0&&o===0},I8=function(t,n){var a=n.displayCheck,o=n.getShadowRoot;if(a==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var l=Zo.call(t,"details>summary:first-of-type"),u=l?t.parentElement:t;if(Zo.call(u,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof o=="function"){for(var h=t;t;){var f=t.parentElement,m=cd(t);if(f&&!f.shadowRoot&&o(f)===!0)return s0(t);t.assignedSlot?t=t.assignedSlot:!f&&m!==t.ownerDocument?t=m.host:t=f}t=h}if(L8(t))return!t.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return s0(t);return!1},M8=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var a=0;a<n.children.length;a++){var o=n.children.item(a);if(o.tagName==="LEGEND")return Zo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},em=function(t,n){return!(n.disabled||C8(n)||I8(n,t)||T8(n)||M8(n))},tm=function(t,n){return!(D8(n)||XP(n)<0||!em(t,n))},N8=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},JP=function(t){var n=[],a=[];return t.forEach(function(o,s){var l=!!o.scopeParent,u=l?o.scopeParent:o,h=P8(u,l),f=l?JP(o.candidates):u;h===0?l?n.push.apply(n,f):n.push(u):a.push({documentOrder:s,tabIndex:h,item:o,isScope:l,content:f})}),a.sort(S8).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Lg=function(t,n){n=n||{};var a;return n.getShadowRoot?a=dd([t],n.includeContainer,{filter:tm.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:N8}):a=YP(t,n.includeContainer,tm.bind(null,n)),JP(a)},H7=function(t,n){n=n||{};var a;return n.getShadowRoot?a=dd([t],n.includeContainer,{filter:em.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):a=YP(t,n.includeContainer,em.bind(null,n)),a},W7=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Zo.call(t,ld)===!1?!1:tm(n,t)};const Ig=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eS(e,t){const n=Lg(e,Ig()),a=n.length;if(a===0)return;const o=xl(Ld(e)),s=n.indexOf(o),l=s===-1?t===1?0:a-1:s+t;return n[l]}function O8(e){return eS(Ld(e).body,1)||e}function j8(e){return eS(Ld(e).body,-1)||e}function tS(e,t){if(!e)return null;const n=Lg(Ld(e).body,Ig()),a=n.length;if(a===0)return null;const o=n.indexOf(e);if(o===-1)return null;const s=(o+t+a)%a;return n[s]}function K7(e){return tS(e,1)}function G7(e){return tS(e,-1)}function ep(e,t){const n=t||e.currentTarget,a=e.relatedTarget;return!a||!Ni(n,a)}function U8(e){Lg(e,Ig()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function l0(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const a=n.dataset.tabindex;delete n.dataset.tabindex,a?n.setAttribute("tabindex",a):n.removeAttribute("tabindex")})}const Mg=k.createContext(void 0);function Ng(){const e=k.useContext(Mg);if(!e)throw new Error(Bl(73));return e}function tp(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const B8=function(t){const{children:n,timeout:a=5e3,limit:o=3,toastManager:s}=t,[l,u]=k.useState([]),[h,f]=k.useState(!1),[m,y]=k.useState(!1),[v,_]=k.useState(null);l.length===0&&(h&&f(!1),m&&y(!1));const x=h||m,C=k.useRef(new Map),S=k.useRef(null),M=k.useRef(!0),R=k.useRef(!1);function A(J){const re=xl(Bo(S.current));if(!S.current||!Ni(S.current,re)||!Jp(re))return;const ue=l.findIndex(F=>F.id===J);let Q=null,ie=ue+1;for(;ie<l.length;){if(l[ie].transitionStatus!=="ending"){Q=l[ie];break}ie+=1}if(!Q)for(ie=ue-1;ie>=0;){if(l[ie].transitionStatus!=="ending"){Q=l[ie];break}ie-=1}Q?Q.ref?.current?.focus():v?.focus({preventScroll:!0})}const E=Ln(()=>{R.current||(R.current=!0,C.current.forEach(J=>{if(J.timeout){J.timeout.clear();const re=Date.now()-J.start,ue=J.delay-re;J.remaining=ue>0?ue:0}}))}),B=Ln(()=>{R.current&&(R.current=!1,C.current.forEach((J,re)=>{J.remaining=J.remaining>0?J.remaining:J.delay,J.timeout??=wl.create(),J.timeout.start(J.remaining,()=>{C.current.delete(re),J.callback()}),J.start=Date.now()}))}),$=Ln(J=>{u(Q=>{const ie=Q.map(Y=>Y.id===J?{...Y,transitionStatus:"ending",height:0}:Y),F=ie.filter(Y=>Y.transitionStatus!=="ending");return ie.map(Y=>{if(Y.transitionStatus==="ending")return Y;const z=F.indexOf(Y)>=o;return{...Y,limited:z}})});const re=C.current.get(J);re&&re.timeout&&(re.timeout.clear(),C.current.delete(J)),l.find(Q=>Q.id===J)?.onClose?.(),A(J),l.length===1&&(f(!1),y(!1))}),V=Ln(J=>{u(ue=>ue.filter(Q=>Q.id!==J)),l.find(ue=>ue.id===J)?.onRemove?.()}),P=Ln((J,re,ue)=>{const Q=Date.now(),ie=M.current&&!h&&!m,F=ie?wl.create():void 0;F?.start(re,()=>{C.current.delete(J),ue()}),C.current.set(J,{timeout:F,start:ie?Q:0,delay:re,remaining:re,callback:ue})}),Z=Ln(J=>{const re=J.id||HP("toast"),ue={...J,id:re,transitionStatus:"starting"};u(ie=>{const F=[ue,...ie],Y=F.filter(z=>z.transitionStatus!=="ending");if(Y.length>o){const z=Y.length-o,I=Y.slice(-z);return F.map(W=>I.some(ge=>ge.id===W.id)?{...W,limited:!0}:{...W,limited:!1})}return F.map(z=>({...z,limited:!1}))});const Q=ue.timeout??a;return ue.type!=="loading"&&Q>0&&P(re,Q,()=>$(re)),(h||m||!M.current)&&E(),re}),X=Ln((J,re)=>{const ue=l.find(pe=>pe.id===J)??null,Q=ue?{...ue,...re}:null;if($i.flushSync(()=>{u(pe=>pe.map(me=>me.id===J?{...me,...re}:me))}),!Q)return;const ie=Q.timeout??a,F=ue?.timeout??a,Y=Object.hasOwn(re,"timeout"),z=Q.transitionStatus!=="ending"&&Q.type!=="loading"&&ie>0,I=C.current.has(J),W=F!==ie,ge=ue?.type==="loading";if(!z&&I){C.current.get(J)?.timeout?.clear(),C.current.delete(J);return}if(z&&(!I||W||Y||ge)){const pe=C.current.get(J);pe&&(pe.timeout?.clear(),C.current.delete(J)),P(J,ie,()=>$(J)),(h||m||!M.current)&&E()}}),fe=Ln((J,re)=>{const ue=tp(re.loading),Q=Z({...ue,type:"loading"}),ie=J.then(F=>{const Y=tp(re.success,F);return X(Q,{...Y,type:"success",timeout:Y.timeout}),F}).catch(F=>{const Y=tp(re.error,F);return X(Q,{...Y,type:"error",timeout:Y.timeout}),Promise.reject(F)});return{}.hasOwnProperty.call(re,"setPromise")&&re.setPromise(ie),ie});k.useEffect(function(){return s?s[" subscribe"](({action:ue,options:Q})=>{const ie=Q.id;ue==="promise"&&Q.promise?fe(Q.promise,Q):ue==="update"&&ie?X(ie,Q):ue==="close"&&ie?$(ie):Z(Q)}):void 0},[Z,X,P,a,s,fe,$]);const he=k.useMemo(()=>({toasts:l,setToasts:u,hovering:h,setHovering:f,focused:m,setFocused:y,expanded:x,add:Z,close:$,remove:V,update:X,promise:fe,pauseTimers:E,resumeTimers:B,prevFocusElement:v,setPrevFocusElement:_,viewportRef:S,scheduleTimer:P,windowFocusedRef:M}),[Z,$,m,h,x,E,v,fe,V,B,P,l,X]);return T.jsx(Mg.Provider,{value:he,children:n})},nS={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},aS={...nS,position:"fixed",top:0,left:0},q7={...nS,position:"absolute"},z8=()=>{},zl=typeof document<"u"?k.useLayoutEffect:z8,ul=k.forwardRef(function(t,n){const[a,o]=k.useState();zl(()=>{m8&&o("button")},[]);const s={tabIndex:0,role:a};return T.jsx("span",{...t,ref:n,style:aS,"aria-hidden":a?void 0:!0,...s,"data-base-ui-focus-guard":""})}),F8=k.createContext(void 0);function c0(e,t,n,a){const o=Ul(rS).current;return $8(o,e,t,n,a)&&iS(o,[e,t,n,a]),o.callback}function V8(e){const t=Ul(rS).current;return H8(t,e)&&iS(t,e),t.callback}function rS(){return{callback:null,cleanup:null,refs:[]}}function $8(e,t,n,a,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==a||e.refs[3]!==o}function H8(e,t){return e.refs.length!==t.length||e.refs.some((n,a)=>n!==t[a])}function iS(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const a=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(a[o]=l);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=a[o];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}const W8=parseInt(k.version,10);function oS(e){return W8>=e}function u0(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return(oS(19)?n?.ref:t.ref)??null}function nm(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function K8(e,t){const n={};for(const a in e){const o=e[a];if(t?.hasOwnProperty(a)){const s=t[a](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${a.toLowerCase()}`]="":o&&(n[`data-${a.toLowerCase()}`]=o.toString())}return n}function G8(e,t){return typeof e=="function"?e(t):e}function q8(e,t){return typeof e=="function"?e(t):e}const dl={};function sS(e,t,n,a,o){let s={...am(e,dl)};return t&&(s=Js(s,t)),n&&(s=Js(s,n)),a&&(s=Js(s,a)),o&&(s=Js(s,o)),s}function Y8(e){if(e.length===0)return dl;if(e.length===1)return am(e[0],dl);let t={...am(e[0],dl)};for(let n=1;n<e.length;n+=1)t=Js(t,e[n]);return t}function Js(e,t){return lS(t)?t(e):Z8(e,t)}function Z8(e,t){if(!t)return e;for(const n in t){const a=t[n];switch(n){case"style":{e[n]=nm(e.style,a);break}case"className":{e[n]=cS(e.className,a);break}default:X8(n,a)?e[n]=Q8(e[n],a):e[n]=a}}return e}function X8(e,t){const n=e.charCodeAt(0),a=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&a===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function lS(e){return typeof e=="function"}function am(e,t){return lS(e)?e(t):e??dl}function Q8(e,t){return t?e?n=>{if(J8(n)){const o=n;rm(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const a=t(n);return e?.(n),a}:t:e}function rm(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function cS(e,t){return t?e?t+" "+e:t:e}function J8(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Y7(){}const Z7=Object.freeze([]),qr=Object.freeze({}),X7=500,Q7={style:{transition:"none"}},J7="data-base-ui-click-trigger",eB={fallbackAxisSide:"none"},tB={fallbackAxisSide:"end"},eU={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Fl(e,t,n={}){const a=t.render,o=tU(t,n);if(n.enabled===!1)return null;const s=n.state??qr;return nU(e,a,o,s)}function tU(e,t={}){const{className:n,style:a,render:o}=e,{state:s=qr,ref:l,props:u,stateAttributesMapping:h,enabled:f=!0}=t,m=f?G8(n,s):void 0,y=f?q8(a,s):void 0,v=f?K8(s,h):qr,_=f?nm(v,Array.isArray(u)?Y8(u):u)??qr:qr;return typeof document<"u"&&(f?Array.isArray(l)?_.ref=V8([_.ref,u0(o),...l]):_.ref=c0(_.ref,u0(o),l):c0(null,null)),f?(m!==void 0&&(_.className=cS(_.className,m)),y!==void 0&&(_.style=nm(_.style,y)),_):qr}function nU(e,t,n,a){if(t){if(typeof t=="function")return t(n,a);const o=sS(n,t.props);return o.ref=n.ref,k.cloneElement(t,o)}if(e&&typeof e=="string")return aU(e,n);throw new Error(Bl(8))}function aU(e,t){return e==="button"?k.createElement("button",{type:"button",...t,key:t.key}):e==="img"?k.createElement("img",{alt:"",...t,key:t.key}):k.createElement(e,t)}let rU=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const iU=k.forwardRef(function(t,n){const{render:a,className:o,children:s,...l}=t,{toasts:u,pauseTimers:h,resumeTimers:f,setHovering:m,setFocused:y,viewportRef:v,windowFocusedRef:_,prevFocusElement:x,setPrevFocusElement:C,expanded:S,focused:M}=Ng(),R=k.useRef(!1),A=k.useRef(!1),E=u.length,B=u[0]?.height??0,$=k.useMemo(()=>u.some(F=>F.transitionStatus==="ending"),[u]);k.useEffect(()=>{if(!v.current)return;function F(z){E!==0&&z.key==="F6"&&z.target!==v.current&&(z.preventDefault(),C(xl(Bo(v.current))),v.current?.focus({preventScroll:!0}),h(),y(!0))}const Y=ti(v.current);return Y.addEventListener("keydown",F),()=>{Y.removeEventListener("keydown",F)}},[h,y,C,E,v]),k.useEffect(()=>{if(!v.current||!E)return;const F=ti(v.current);function Y(I){I.target===F&&(_.current=!1,h())}function z(I){if(I.relatedTarget||I.target===F)return;const W=Qp(I),ge=xl(Bo(v.current));(!Ni(v.current,W)||!Jp(ge))&&f(),setTimeout(()=>{_.current=!0})}return F.addEventListener("blur",Y,!0),F.addEventListener("focus",z,!0),()=>{F.removeEventListener("blur",Y,!0),F.removeEventListener("focus",z,!0)}},[h,f,v,_,y,E]),k.useEffect(()=>{const F=v.current;if(!F||E===0)return;const Y=Bo(F);function z(I){if(I.pointerType!=="touch")return;const W=Qp(I);Ni(F,W)||(f(),m(!1),y(!1))}return Y.addEventListener("pointerdown",z,!0),()=>{Y.removeEventListener("pointerdown",z,!0)}},[E,f,y,m,v]);function V(F){v.current&&(R.current=!0,F.relatedTarget===v.current?u[0]?.ref?.current?.focus():x?.focus({preventScroll:!0}))}function P(F){F.key==="Tab"&&F.shiftKey&&F.target===v.current&&(F.preventDefault(),x?.focus({preventScroll:!0}),f())}k.useEffect(()=>{!_.current||$||!A.current||(f(),m(!1),A.current=!1)},[$,f,m,_]);function Z(){h(),m(!0),A.current=!1}function X(){u.some(F=>F.transitionStatus==="ending")?A.current=!0:(f(),m(!1))}function fe(){if(R.current){R.current=!1;return}M||Jp(Bo(v.current).activeElement)&&(y(!0),h())}function he(F){!M||Ni(v.current,F.relatedTarget)||(y(!1),f())}const J={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:Z,onMouseMove:Z,onMouseLeave:X,onFocus:fe,onBlur:he,onKeyDown:P,onClick:fe},re=k.useMemo(()=>({expanded:S}),[S]),ue=Fl("div",t,{ref:[n,v],state:re,props:[J,{style:{[rU.frontmostHeight]:B?`${B}px`:void 0}},l,{children:T.jsxs(k.Fragment,{children:[E>0&&x&&T.jsx(ul,{onFocus:V}),s,E>0&&x&&T.jsx(ul,{onFocus:V})]})}]}),Q=k.useMemo(()=>({viewportRef:v}),[v]),ie=k.useMemo(()=>u.filter(F=>F.priority==="high"),[u]);return T.jsxs(F8.Provider,{value:Q,children:[E>0&&x&&T.jsx(ul,{onFocus:V}),ue,!M&&ie.length>0&&T.jsx("div",{style:aS,children:ie.map(F=>T.jsxs("div",{role:"alert","aria-atomic":!0,children:[T.jsx("div",{children:F.title}),T.jsx("div",{children:F.description})]},F.id))})]})});function oU(e){return oS(19)?e:e?"true":void 0}const uS=k.createContext(void 0);function im(){const e=k.useContext(uS);if(!e)throw new Error(Bl(66));return e}let Og=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const sU={[Og.startingStyle]:""},lU={[Og.endingStyle]:""},cU={transitionStatus(e){return e==="starting"?sU:e==="ending"?lU:null}},su=null;class uU{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const lu=new uU;class jg{static create(){return new jg}static request(t){return lu.request(t)}static cancel(t){return lu.cancel(t)}currentId=su;request(t){this.cancel(),this.currentId=lu.request(()=>{this.currentId=su,t()})}cancel=()=>{this.currentId!==su&&(lu.cancel(this.currentId),this.currentId=su)};disposeEffect=()=>this.cancel}function dU(){const e=Ul(jg.create).current;return WP(e.disposeEffect),e}function hU(e){return e==null?e:"current"in e?e.current:e}function fU(e,t=!1,n=!0){const a=dU();return Ln((o,s=null)=>{a.cancel();function l(){$i.flushSync(o)}const u=hU(e);if(u==null)return;const h=u;if(typeof h.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let f=function(){const y=Og.startingStyle;if(!h.hasAttribute(y)){a.request(m);return}const v=new MutationObserver(()=>{h.hasAttribute(y)||(v.disconnect(),m())});v.observe(h,{attributes:!0,attributeFilter:[y]}),s?.addEventListener("abort",()=>v.disconnect(),{once:!0})},m=function(){Promise.all(h.getAnimations().map(y=>y.finished)).then(()=>{s?.aborted||l()}).catch(()=>{const y=h.getAnimations();if(n){if(s?.aborted)return;l()}else y.length>0&&y.some(v=>v.pending||v.playState!=="finished")&&m()})};if(t){f();return}a.request(m)}})}function pU(e){const{enabled:t=!0,open:n,ref:a,onComplete:o}=e,s=Ln(o),l=fU(a,n,!1);k.useEffect(()=>{if(!t)return;const u=new AbortController;return l(s,u.signal),()=>{u.abort()}},[t,n,s,l])}let Ci=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const mU={...cU,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Gs=40,gU=10,Vr=.5,yU=1;function d0(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function vU(e){const n=window.getComputedStyle(e).transform;let a=0,o=0,s=1;if(n&&n!=="none"){const l=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(l){const u=l[1].split(", ").map(parseFloat);u.length===6?(a=u[4],o=u[5],s=Math.sqrt(u[0]*u[0]+u[1]*u[1])):u.length===16&&(a=u[12],o=u[13],s=u[0])}}return{x:a,y:o,scale:s}}const bU=k.forwardRef(function(t,n){const{toast:a,render:o,className:s,swipeDirection:l=["down","right"],...u}=t,h=a.positionerProps?.anchor!==void 0;let f=[];h||(f=Array.isArray(l)?l:[l]);const m=f.length>0,{toasts:y,focused:v,close:_,remove:x,setToasts:C,pauseTimers:S,expanded:M,setHovering:R}=Ng(),[A,E]=k.useState(void 0),[B,$]=k.useState(!1),[V,P]=k.useState(!1),[Z,X]=k.useState(!1),[fe,he]=k.useState({x:0,y:0}),[J,re]=k.useState({x:0,y:0,scale:1}),[ue,Q]=k.useState(),[ie,F]=k.useState(),[Y,z]=k.useState(null),I=k.useRef(null),W=k.useRef({x:0,y:0}),ge=k.useRef({x:0,y:0,scale:1}),pe=k.useRef(void 0),me=k.useRef(0),be=k.useRef(!1),Be=k.useRef({x:0,y:0}),Ye=k.useRef(!1),Ne=k.useMemo(()=>y.indexOf(a),[a,y]),Rt=k.useMemo(()=>y.filter(Ke=>Ke.transitionStatus!=="ending").indexOf(a),[a,y]),Mn=k.useMemo(()=>y.slice(0,y.indexOf(a)).reduce((Ke,Ve)=>Ke+(Ve.height||0),0),[y,a]);pU({open:a.transitionStatus!=="ending",ref:I,onComplete(){a.transitionStatus==="ending"&&x(a.id)}});const Pn=Ln((Ke=!1)=>{const Ve=I.current;if(!Ve)return;const pt=Ve.style.height;Ve.style.height="auto";const Pt=Ve.offsetHeight;Ve.style.height=pt;function Ot(){C(yt=>yt.map(dt=>dt.id===a.id?{...dt,ref:I,height:Pt,transitionStatus:void 0}:dt))}Ke?$i.flushSync(Ot):Ot()});zl(Pn,[Pn]);function mt(Ke,Ve){let pt=Ke,Pt=Ve;return!f.includes("left")&&!f.includes("right")?pt=Ke>0?Ke**Vr:-(Math.abs(Ke)**Vr):(!f.includes("right")&&Ke>0&&(pt=Ke**Vr),!f.includes("left")&&Ke<0&&(pt=-(Math.abs(Ke)**Vr))),!f.includes("up")&&!f.includes("down")?Pt=Ve>0?Ve**Vr:-(Math.abs(Ve)**Vr):(!f.includes("down")&&Ve>0&&(Pt=Ve**Vr),!f.includes("up")&&Ve<0&&(Pt=-(Math.abs(Ve)**Vr))),{x:pt,y:Pt}}function Jt(Ke){if(Ke.button!==0)return;Ke.pointerType==="touch"&&S();const Ve=Qp(Ke.nativeEvent);if(!(Ve&&Ve.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(be.current=!1,pe.current=void 0,me.current=0,W.current={x:Ke.clientX,y:Ke.clientY},Be.current=W.current,I.current){const Pt=vU(I.current);ge.current=Pt,re(Pt),he({x:Pt.x,y:Pt.y})}R(!0),$(!0),P(!1),z(null),Ye.current=!0,I.current?.setPointerCapture(Ke.pointerId)}}function oi(Ke){if(!B)return;Ke.preventDefault(),Ye.current&&(W.current={x:Ke.clientX,y:Ke.clientY},Ye.current=!1);const{clientY:Ve,clientX:pt,movementX:Pt,movementY:Ot}=Ke;(Ot<0&&Ve>Be.current.y||Ot>0&&Ve<Be.current.y)&&(Be.current={x:Be.current.x,y:Ve}),(Pt<0&&pt>Be.current.x||Pt>0&&pt<Be.current.x)&&(Be.current={x:pt,y:Be.current.y});const yt=pt-W.current.x,dt=Ve-W.current.y,Ya=Ve-Be.current.y,as=pt-Be.current.x;if(!V&&Math.sqrt(yt*yt+dt*dt)>=yU&&(P(!0),Y===null)){const ca=f.includes("left")||f.includes("right"),li=f.includes("up")||f.includes("down");if(ca&&li){const mr=Math.abs(yt),On=Math.abs(dt);z(mr>On?"horizontal":"vertical")}}let Gt;if(!pe.current)Y==="vertical"?dt>0?Gt="down":dt<0&&(Gt="up"):Y==="horizontal"?yt>0?Gt="right":yt<0&&(Gt="left"):Math.abs(yt)>=Math.abs(dt)?Gt=yt>0?"right":"left":Gt=dt>0?"down":"up",Gt&&f.includes(Gt)&&(pe.current=Gt,me.current=d0(Gt,yt,dt),E(Gt));else{const Ta=pe.current,ca=d0(Ta,as,Ya);ca>Gs?(be.current=!1,E(Ta)):!(f.includes("left")&&f.includes("right"))&&!(f.includes("up")&&f.includes("down"))&&me.current-ca>=gU&&(be.current=!0)}const Za=mt(yt,dt);let mn=ge.current.x,Ca=ge.current.y;Y==="horizontal"?(f.includes("left")||f.includes("right"))&&(mn+=Za.x):(Y==="vertical"||(f.includes("left")||f.includes("right"))&&(mn+=Za.x),(f.includes("up")||f.includes("down"))&&(Ca+=Za.y)),he({x:mn,y:Ca})}function qi(Ke){if(!B)return;if($(!1),P(!1),z(null),I.current?.releasePointerCapture(Ke.pointerId),be.current){he({x:J.x,y:J.y}),E(void 0);return}let Ve=!1;const pt=fe.x-J.x,Pt=fe.y-J.y;let Ot;for(const yt of f){switch(yt){case"right":pt>Gs&&(Ve=!0,Ot="right");break;case"left":pt<-Gs&&(Ve=!0,Ot="left");break;case"down":Pt>Gs&&(Ve=!0,Ot="down");break;case"up":Pt<-Gs&&(Ve=!0,Ot="up");break}if(Ve)break}Ve?(E(Ot),X(!0),_(a.id)):(he({x:J.x,y:J.y}),E(void 0))}function Nn(Ke){if(Ke.key==="Escape"){if(!I.current||!Ni(I.current,xl(Bo(I.current))))return;_(a.id)}}k.useEffect(()=>{if(!m)return;const Ke=I.current;if(!Ke)return;function Ve(pt){Ni(Ke,pt.target)&&pt.preventDefault()}return Ke.addEventListener("touchmove",Ve,{passive:!1}),()=>{Ke.removeEventListener("touchmove",Ve)}},[m]);function Yi(){if(!B&&fe.x===J.x&&fe.y===J.y&&!Z)return{[Ci.swipeMovementX]:"0px",[Ci.swipeMovementY]:"0px"};const Ke=fe.x-J.x,Ve=fe.y-J.y;return{transition:B?"none":void 0,transform:B?`translateX(${fe.x}px) translateY(${fe.y}px) scale(${J.scale})`:void 0,[Ci.swipeMovementX]:`${Ke}px`,[Ci.swipeMovementY]:`${Ve}px`}}const pr=a.priority==="high",Sa={role:pr?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":ue,"aria-describedby":ie,"aria-hidden":pr&&!v?!0:void 0,onPointerDown:m?Jt:void 0,onPointerMove:m?oi:void 0,onPointerUp:m?qi:void 0,onKeyDown:Nn,inert:oU(a.limited),style:{...Yi(),[Ci.index]:a.transitionStatus==="ending"?Ne:Rt,[Ci.offsetY]:`${Mn}px`,[Ci.height]:a.height?`${a.height}px`:void 0}},pn=k.useMemo(()=>({rootRef:I,toast:a,titleId:ue,setTitleId:Q,descriptionId:ie,setDescriptionId:F,swiping:B,swipeDirection:A,recalculateHeight:Pn,index:Ne,visibleIndex:Rt,expanded:M}),[a,ue,ie,B,A,Pn,Ne,Rt,M]),si=k.useMemo(()=>({transitionStatus:a.transitionStatus,expanded:M,limited:a.limited||!1,type:a.type,swiping:pn.swiping,swipeDirection:pn.swipeDirection}),[M,a.transitionStatus,a.limited,a.type,pn.swiping,pn.swipeDirection]),Zi=Fl("div",t,{ref:[n,pn.rootRef],state:si,stateAttributesMapping:mU,props:[Sa,u]});return T.jsx(uS.Provider,{value:pn,children:Zi})}),kU={...cm};let h0=0;function _U(e,t="mui"){const[n,a]=k.useState(e),o=e||n;return k.useEffect(()=>{n==null&&(h0+=1,a(`${t}-${h0}`))},[n,t]),o}const f0=kU.useId;function dS(e,t){if(f0!==void 0){const n=f0();return e??(t?`${t}-${n}`:n)}return _U(e,t)}const wU=k.forwardRef(function(t,n){const{render:a,className:o,id:s,children:l,...u}=t,{toast:h}=im(),f=l??h.title,m=!!f,y=dS(s),{setTitleId:v}=im();zl(()=>{if(m)return v(y),()=>{v(void 0)}},[m,y,v]);const _=k.useMemo(()=>({type:h.type}),[h.type]),x=Fl("h2",t,{ref:n,state:_,props:{...u,id:y,children:f}});return m?x:null}),xU=k.createContext(void 0);function PU(e=!1){const t=k.useContext(xU);if(t===void 0&&!e)throw new Error(Bl(16));return t}function SU(e){const{focusableWhenDisabled:t,disabled:n,composite:a=!1,tabIndex:o=0,isNativeButton:s}=e,l=a&&t!==!1,u=a&&t===!1;return{props:k.useMemo(()=>{const f={onKeyDown(m){n&&t&&m.key!=="Tab"&&m.preventDefault()}};return a||(f.tabIndex=o,!s&&n&&(f.tabIndex=t?o:-1)),(s&&(t||l)||!s&&n)&&(f["aria-disabled"]=n),s&&(!t||u)&&(f.disabled=n),f},[a,n,t,l,u,s,o])}}function CU(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:a=0,native:o=!0}=e,s=k.useRef(null),l=PU(!0)!==void 0,u=Ln(()=>{const v=s.current;return!!(v?.tagName==="A"&&v?.href)}),{props:h}=SU({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:a,isNativeButton:o}),f=k.useCallback(()=>{const v=s.current;TU(v)&&l&&t&&h.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,h.disabled,l]);zl(f,[f]);const m=k.useCallback((v={})=>{const{onClick:_,onMouseDown:x,onKeyUp:C,onKeyDown:S,onPointerDown:M,...R}=v;return sS({type:o?"button":void 0,onClick(E){if(t){E.preventDefault();return}_?.(E)},onMouseDown(E){t||x?.(E)},onKeyDown(E){if(t||(rm(E),S?.(E)),E.baseUIHandlerPrevented)return;const B=E.target===E.currentTarget&&!o&&!u()&&!t,$=E.key==="Enter",V=E.key===" ";B&&((V||$)&&E.preventDefault(),$&&_?.(E))},onKeyUp(E){t||(rm(E),C?.(E)),!E.baseUIHandlerPrevented&&E.target===E.currentTarget&&!o&&!t&&E.key===" "&&_?.(E)},onPointerDown(E){if(t){E.preventDefault();return}M?.(E)}},o?void 0:{role:"button"},h,R)},[t,h,o,u]),y=Ln(v=>{s.current=v,f()});return{getButtonProps:m,buttonRef:y}}function TU(e){return Dd(e)&&e.tagName==="BUTTON"}const EU=k.forwardRef(function(t,n){const{render:a,className:o,disabled:s,nativeButton:l=!0,...u}=t,{close:h,expanded:f}=Ng(),{toast:m}=im(),[y,v]=k.useState(!1),{getButtonProps:_,buttonRef:x}=CU({disabled:s,native:l}),C=k.useMemo(()=>({type:m.type}),[m.type]);return Fl("button",t,{ref:[n,x],state:C,props:[{"aria-hidden":!f&&!y,onClick(){h(m.id)},onFocus(){v(!0)},onBlur(){v(!1)}},u,_]})}),nB="none",aB="trigger-press",rB="trigger-hover",iB="outside-press",oB="item-press",sB="close-press",AU="focus-out",lB="escape-key",cB="list-navigation",uB="cancel-open",dB="imperative-action",hB="window-resize";function RU(e,t,n,a){let o=!1,s=!1;const l=qr;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...l}}function DU(e){return`data-base-ui-${e}`}const hS=k.createContext(null),LU=()=>k.useContext(hS),IU=DU("portal");function fS(e={}){const{ref:t,container:n,componentProps:a=qr,elementProps:o,elementState:s}=e,l=dS(),h=LU()?.portalNode,[f,m]=k.useState(null),[y,v]=k.useState(null),_=Ln(M=>{M!==null&&v(M)}),x=k.useRef(null);zl(()=>{if(n===null){x.current&&(x.current=null,v(null),m(null));return}if(l==null)return;const M=(n&&(Dg(n)?n:n.current))??h??document.body;if(M==null){x.current&&(x.current=null,v(null),m(null));return}x.current!==M&&(x.current=M,v(null),m(M))},[n,h,l]);const C=Fl("div",a,{ref:[t,_],state:s,props:[{id:l,[IU]:""},o]});return{portalNode:y,portalSubtree:f&&C?$i.createPortal(C,f):null}}const fB=k.forwardRef(function(t,n){const{children:a,container:o,className:s,render:l,renderGuards:u,...h}=t,{portalNode:f,portalSubtree:m}=fS({container:o,ref:n,componentProps:t,elementProps:h}),y=k.useRef(null),v=k.useRef(null),_=k.useRef(null),x=k.useRef(null),[C,S]=k.useState(null),M=C?.modal,R=C?.open,A=typeof u=="boolean"?u:!!C&&!C.modal&&C.open&&!!f;k.useEffect(()=>{if(!f||M)return;function B($){f&&$.relatedTarget&&ep($)&&($.type==="focusin"?l0:U8)(f)}return f.addEventListener("focusin",B,!0),f.addEventListener("focusout",B,!0),()=>{f.removeEventListener("focusin",B,!0),f.removeEventListener("focusout",B,!0)}},[f,M]),k.useEffect(()=>{!f||R||l0(f)},[R,f]);const E=k.useMemo(()=>({beforeOutsideRef:y,afterOutsideRef:v,beforeInsideRef:_,afterInsideRef:x,portalNode:f,setFocusManagerState:S}),[f]);return T.jsxs(k.Fragment,{children:[m,T.jsxs(hS.Provider,{value:E,children:[A&&f&&T.jsx(ul,{"data-type":"outside",ref:y,onFocus:B=>{if(ep(B,f))_.current?.focus();else{const $=C?C.domReference:null;j8($)?.focus()}}}),A&&f&&T.jsx("span",{"aria-owns":f.id,style:eU}),f&&$i.createPortal(a,f),A&&f&&T.jsx(ul,{"data-type":"outside",ref:v,onFocus:B=>{if(ep(B,f))x.current?.focus();else{const $=C?C.domReference:null;O8($)?.focus(),C?.closeOnFocusOut&&C?.onOpenChange(!1,RU(AU,B.nativeEvent))}}})]})]})}),MU=k.forwardRef(function(t,n){const{children:a,container:o,className:s,render:l,...u}=t,{portalNode:h,portalSubtree:f}=fS({container:o,ref:n,componentProps:t,elementProps:u});return!f&&!h?null:T.jsxs(k.Fragment,{children:[f,h&&$i.createPortal(a,h)]})}),NU=MU;function OU(){const e=k.useContext(Mg);if(!e)throw new Error(Bl(73));const{toasts:t,add:n,close:a,update:o,promise:s}=e;return k.useMemo(()=>({toasts:t,add:n,close:a,update:o,promise:s}),[t,n,a,o,s])}function jU(){const e=[];function t(n){e.forEach(a=>a(n))}return{" subscribe":function(a){return e.push(a),()=>{const o=e.indexOf(a);o!==-1&&e.splice(o,1)}},add(n){const a=n.id||HP("toast"),o={...n,id:a,transitionStatus:"starting"};return t({action:"add",options:o}),a},close(n){t({action:"close",options:{id:n}})},update(n,a){t({action:"update",options:{...a,id:n}})},promise(n,a){let o=n;return t({action:"promise",options:{...a,promise:n,setPromise(s){o=s}}}),o}}}const Ug=jU();function pB(e){return Ug.add(e)}function UU({children:e}){return T.jsxs(B8,{toastManager:Ug,children:[e,T.jsx(NU,{children:T.jsx(iU,{className:"fixed inset-x-0 top-6 z-[100] mx-auto flex w-full max-w-sm flex-col items-center gap-2 px-4 outline-none",children:T.jsx(BU,{})})})]})}function BU(){const{toasts:e}=OU();return e.map(t=>{const n=t.data?.onUndo;return T.jsxs(bU,{toast:t,className:Qt("pointer-events-auto flex w-full items-center gap-3 rounded-xl border border-oai-gray-200 bg-oai-white px-4 py-3 shadow-xl transition-all duration-200 ease-out","data-[starting-style]:-translate-y-3 data-[starting-style]:opacity-0","data-[ending-style]:-translate-y-3 data-[ending-style]:opacity-0","dark:border-oai-gray-800 dark:bg-oai-gray-900"),children:[T.jsx(wU,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),n?T.jsx("button",{type:"button",onClick:()=>{n(),Ug.close(t.id)},className:"shrink-0 rounded-md px-2 py-1 text-xs font-semibold text-oai-gray-600 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:Ie("shared.action.undo")}):null,T.jsx(EU,{"aria-label":Ie("shared.action.dismiss"),className:"-mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-oai-gray-400 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:T.jsx(Zm,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},t.id)})}const Bg=Object.freeze(["limits","leaderboard"]),zU=Object.freeze({limits:"/limits",leaderboard:"/leaderboard"}),FU=Object.freeze({limits:()=>In(()=>import("./LimitsPage-pAu3DHwj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),leaderboard:()=>In(()=>import("./LeaderboardPage-DjQR8Fa-.js"),__vite__mapDeps([8,9,10,11,12,13]))}),pS="total",mS=0,p0=20,VU=Object.freeze([10,20,50,100]),$U="tokentracker:leaderboard:pageSize",HU=20,WU=Object.freeze(["dashboard-existing","silent-preload","page-load","manual-refresh"]);let m0=0,ra;class KU{constructor(t={}){this.limits=null,this.leaderboard=new Map,this.leaderboardMaxEntries=YU(t.leaderboardMaxEntries)}read(t,n){return Vl(t),t==="limits"?!this.limits||this.limits.contextKey!==n?null:Du(this.limits):n?Du(this.leaderboard.get(n)):null}write(t,n={}){if(t.targetKey==="limits"){this.limits=t;return}this.leaderboard.has(t.contextKey)&&this.leaderboard.delete(t.contextKey),this.leaderboard.set(t.contextKey,t),this.evictLeaderboardEntries(n.activeContextKey||t.contextKey)}evictLeaderboardEntries(t=null){for(;this.leaderboard.size>this.leaderboardMaxEntries;){const n=Array.from(this.leaderboard.keys()).find(a=>a!==t)||this.leaderboard.keys().next().value;this.leaderboard.delete(n)}}snapshot(){return{limits:Du(this.limits),leaderboard:{maxEntries:this.leaderboardMaxEntries,size:this.leaderboard.size,keys:Array.from(this.leaderboard.keys())}}}}class GU{constructor(t={}){m0+=1,this.sessionId=`dashboard-preload-${m0}`,this.createdAt=Date.now(),this.completedAt=null,this.startedAfterMainContentVisible=!1,this.cache=new KU(t),this.targets={limits:g0("limits"),leaderboard:g0("leaderboard")}}}function g0(e){return{key:e,route:zU[e],resourceStatus:"idle",stateStatus:"idle",error:null,resourcePromise:null,resourceModule:null,resourceRequestId:0,statePromise:null,stateRequestId:0,pendingStateContextKey:null}}function qU(e={}){return new GU(e)}function YU(e){const t=Number(e);return!Number.isInteger(t)||t<1?HU:t}ra=qU();function Vl(e){if(!Bg.includes(e))throw new Error(`Unknown dashboard preload target: ${e}`)}function gS(e){return e?typeof e=="string"?e:e.message||String(e):null}function ZU(e,t){return WU.includes(e)?e:t}function XU(e){const t=Number(e);return Number.isFinite(t)?t:Date.now()}function Du(e){return e?{...e}:null}function y0(){const e=Bg.every(t=>{const n=ra.targets[t];return n.resourceStatus==="fulfilled"||n.resourceStatus==="rejected"});ra.completedAt=e?Date.now():null}function QU(){ra.startedAfterMainContentVisible=!0}function zg(e,t={}){Vl(e);const n=Object.entries(t).filter(([,a])=>a!==void 0).sort(([a],[o])=>a.localeCompare(o)).map(([a,o])=>`${a}=${o===null?"null":String(o)}`);return`${e}:${n.join("|")}`}function yS(e,t={}){Vl(e);const n=ra.targets[e];if(n.resourceStatus==="fulfilled")return Promise.resolve(n.resourceModule);if(n.resourceStatus==="pending"&&n.resourcePromise)return n.resourcePromise;const a=t.loader||FU[e],o=n.resourceRequestId+1;n.resourceRequestId=o,n.resourceStatus="pending",n.error=null;const s=Promise.resolve().then(()=>a()).then(l=>n.resourceRequestId!==o||n.resourcePromise!==s?null:(n.resourceStatus="fulfilled",n.resourceModule=l,n.error=null,y0(),l)).catch(l=>(n.resourceRequestId!==o||n.resourcePromise!==s||(n.resourceStatus="rejected",n.error=gS(l),y0()),null));return n.resourcePromise=s,s}function JU(e={}){const t=e.loaders||{};return Promise.all(Bg.map(n=>yS(n,{loader:t[n]})))}function vS(e,t){Vl(e);const n=ra.targets[e],a=t?.status||"fulfilled",o={targetKey:e,status:a,data:t?.data??null,error:gS(t?.error),source:ZU(t?.source,"silent-preload"),generatedAt:XU(t?.generatedAt),updatedAt:Date.now(),contextKey:t?.contextKey||zg(e,t?.context||{})};return n.stateStatus=a,a==="rejected"||a==="skipped"?n.error=o.error:a==="fulfilled"&&(n.error=null,ra.cache.write(o,{activeContextKey:t?.activeContextKey})),Du(o)}function bS(e,t){return Vl(e),ra.cache.read(e,t)}function mB(e,t={}){return vS("limits",{data:e,source:t.source||"dashboard-existing",contextKey:t.contextKey||kS(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function kS(e={}){return zg("limits",{state:"current",...e})}function gB(e=kS()){return bS("limits",e)}function om(e,t={}){return vS("leaderboard",{activeContextKey:t.activeContextKey,data:e,source:t.source||"silent-preload",contextKey:t.contextKey||Fg(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function e9(e){return bS("leaderboard",e)}function _S(){if(typeof window>"u")return p0;try{const e=window.localStorage.getItem($U),t=Number(e);if(VU.includes(t))return t}catch{}return p0}function wS(e={}){const t=e.userId;return t!==void 0?t||null:e.cloudUser?.id||null}function xS(e={}){return typeof e.accessMode=="string"&&e.accessMode.trim()?e.accessMode.trim():e.mockEnabled?"mock":e.baseUrl?"cloud":"unavailable"}function Fg(e={}){const t=!!e.mockEnabled,n=e.baseUrl??"";return zg("leaderboard",{accessMode:xS({...e,baseUrl:n,mockEnabled:t}),baseUrl:n,mockEnabled:t,offset:e.offset??mS,pageSize:e.pageSize??_S(),period:e.period||pS,userId:wS(e)})}function cu(e,t){const n=ra.targets.leaderboard;return n.stateRequestId+=1,n.statePromise=null,n.pendingStateContextKey=null,om(null,{contextKey:t,status:"skipped",error:e})}function t9(e={}){const t=ra,n=!!e.mockEnabled,a=e.baseUrl??"",o=xS({...e,baseUrl:a,mockEnabled:n}),s=e.period||pS,l=e.pageSize??_S(),u=e.offset??mS,h=wS(e),f=Fg({accessMode:o,baseUrl:a,mockEnabled:n,offset:u,pageSize:l,period:s,userId:h});if(!n&&e.authLoading)return Promise.resolve(cu("auth-loading",f));if(!n&&!e.signedIn&&o!=="public")return Promise.resolve(cu("not-signed-in",f));if(!n&&!a)return Promise.resolve(cu("missing-base-url",f));if(!n&&o==="unavailable")return Promise.resolve(cu("access-unavailable",f));const m=t.targets.leaderboard,y=e9(f);if(y)return Promise.resolve(y);if(m.stateStatus==="pending"&&m.statePromise&&m.pendingStateContextKey===f)return m.statePromise;const v=m.stateRequestId+1;m.stateRequestId=v,m.stateStatus="pending",m.pendingStateContextKey=f,m.error=null;const _=Promise.resolve().then(()=>iL({userId:h,period:s,limit:l,offset:u})).then(x=>ra!==t||m.stateRequestId!==v||m.statePromise!==_?null:(m.pendingStateContextKey=null,om(x,{contextKey:f}))).catch(x=>(ra!==t||m.stateRequestId!==v||m.statePromise!==_||(m.pendingStateContextKey=null,om(null,{contextKey:f,status:"rejected",error:x})),null));return m.statePromise=_,_}const n9=typeof window<"u"?window.location.search:"",v0=new URLSearchParams(n9),uu=v0.get("insforge_code")||v0.get("code")||null,a9=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function r9(){Pd();const{loading:e,signedIn:t}=Il(),n=pd(),[a,o]=k.useState("processing"),[s,l]=k.useState(null),u=k.useRef(!1);k.useEffect(()=>{if(!(!uu||u.current)){if(u.current=!0,a9){l(!1);return}(async()=>{try{const m=await(await fetch("/api/auth-bridge/verifier")).json();l(!!m?.native)}catch{l(!1)}})()}},[]),k.useEffect(()=>{if(s!==!0||!uu)return;o("redirecting");const f=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(uu)}`},200);return()=>clearTimeout(f)},[s]),k.useEffect(()=>{if(s!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const f=setTimeout(()=>{t||o("failed")},12e3);return()=>clearTimeout(f)},[s,e,t,n]),k.useEffect(()=>{if(!uu&&s===null){const f=setTimeout(()=>o("failed"),3e3);return()=>clearTimeout(f)}},[s]);const h=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&s!==!0&&(s===null||s===!1&&e)?T.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):T.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:T.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),T.jsx("p",{className:"text-oai-gray-400 text-sm",children:Ie("auth.callback.processing")})]}),a==="redirecting"&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:T.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:T.jsx("path",{d:"M20 6 9 17l-5-5"})})}),T.jsx("p",{className:"text-white text-sm font-medium",children:Ie("auth.callback.success")}),T.jsx("p",{className:"text-oai-gray-500 text-xs",children:Ie("auth.callback.redirecting")})]}),a==="failed"&&T.jsxs("div",{className:"space-y-3",children:[T.jsx("p",{className:"text-oai-gray-300 text-sm",children:Ie("auth.callback.failed")}),T.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:Ie("auth.callback.close")})]})]})})}const i9=k.lazy(()=>In(()=>import("./DashboardPage-DWBqSObe.js"),__vite__mapDeps([14,1,12,15,16,17,11,3,9,10,18,19,4])).then(e=>({default:e.DashboardPage}))),o9=k.lazy(()=>In(()=>import("./IpCheckPage-CiOG0q8b.js"),[])),s9=k.lazy(()=>In(()=>import("./LandingPage-cN4IqFF_.js"),__vite__mapDeps([20,21,18])).then(e=>({default:e.LandingPage}))),l9=k.lazy(()=>In(()=>import("./LeaderboardPage-DjQR8Fa-.js"),__vite__mapDeps([8,9,10,11,12,13])).then(e=>({default:e.LeaderboardPage}))),c9=k.lazy(()=>In(()=>import("./LeaderboardProfilePage-BsE2gp5R.js"),__vite__mapDeps([22,12,21,23,13,15,16,6,11,17])).then(e=>({default:e.LeaderboardProfilePage}))),u9=k.lazy(()=>In(()=>import("./LimitsPage-pAu3DHwj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(e=>({default:e.LimitsPage}))),d9=k.lazy(()=>In(()=>import("./LoginPage-DVX_NT_Q.js"),[]).then(e=>({default:e.LoginPage}))),h9=k.lazy(()=>In(()=>import("./DevicePage-DR-6hUT5.js"),[])),f9=k.lazy(()=>In(()=>import("./WrappedPage-dup_KGKH.js"),[])),p9=k.lazy(()=>In(()=>import("./SettingsPage-DrprCoQ1.js"),__vite__mapDeps([24,2,25,3,11,12,9,10,16,7])).then(e=>({default:e.SettingsPage}))),m9=k.lazy(()=>In(()=>import("./SkillsPage-j5yFYxaw.js"),__vite__mapDeps([26,5,6,7,3,17,11,16,12,19,10])).then(e=>({default:e.SkillsPage}))),g9=k.lazy(()=>In(()=>import("./WidgetsPage-Bcwh0w7U.js"),__vite__mapDeps([27,9,10,11,25,3,4,6,7])).then(e=>({default:e.WidgetsPage})));function y9(){if(typeof window>"u")return!1;const e=window.location.hostname;return e!=="localhost"&&e!=="127.0.0.1"&&e!=="::1"}function v9(){const{resolvedLocale:e}=Pd(),t=Wn(),n=Il();bj();const a=k.useRef(!1),o=k.useRef(!1),s=k.useRef(new Set),l=xn(),u=y9(),h=k.useMemo(()=>typeof window>"u"?!1:dj(window.location.search),[]),f=t?.pathname||"/",m=new URL(window.location.href),y=m.pathname.replace(/\/+$/,"")||"/",_=y.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,x=m.searchParams.get("token")||null,C=_||x,S=y==="/share"||y==="/share.html"||y.startsWith("/share/"),M=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),R=f.replace(/\/+$/,"")||"/",A=R==="/"||R==="/dashboard",E=R==="/leaderboard",B=R.match(/^\/u\/([^/]+)$/i),$=B?B[1]:null,V=!!(n.enabled&&n.signedIn),P=M||V,Z=!1,X=cj(),fe=!P&&!l&&!M,he=l?"mock":n.loading?"unavailable":V?"cloud":P?"local":"unavailable",J=k.useCallback(()=>{if(M||!a.current||!l&&n.loading||!l&&!P)return;const me={accessMode:he,baseUrl:uj(),mockEnabled:l,signedIn:P,authLoading:!!n.loading,userId:V&&n.user?.id||null},be=Fg(me);s.current.has(be)||(s.current.add(be),t9(me))},[V,n.loading,n.user?.id,M,he,l,P]),re=k.useCallback(()=>{A&&(a.current||(a.current=!0,QU()),o.current||(o.current=!0,M?yS("limits"):JU()),J())},[A,M,J]);k.useEffect(()=>{J()},[J]);const ue=k.useMemo(()=>!n.enabled||!V?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[V,n]);let Q=M||l||h?"dashboard":"landing";R==="/landing"&&(Q="landing"),R==="/dashboard"&&(Q="dashboard"),E&&(Q="dashboard"),$&&(Q="dashboard");const ie=R==="/limits",F=R==="/settings",Y=R==="/skills",z=R==="/widgets",I=R==="/ip-check";(ie||F||Y||z||I)&&(Q="dashboard");let W=i9;$?W=c9:R==="/leaderboard"?W=l9:ie?W=u9:F?W=p9:Y?W=m9:z?W=g9:I&&(W=o9);const ge=!S&&!fe&&(R==="/dashboard"||R==="/"||E||ie||F||Y||z||I);let pe=null;if(R==="/auth/callback"||R==="/auth/native-callback")pe=T.jsx(r9,{});else if(R==="/login")pe=T.jsx(d9,{});else if(R==="/device")pe=T.jsx(h9,{});else if(R==="/wrapped")pe=T.jsx(f9,{});else if(Q==="landing")pe=T.jsx(s9,{signInUrl:"/login",signUpUrl:"/login"});else{const me=T.jsx(W,{baseUrl:X,auth:ue,signedIn:P,sessionSoftExpired:Z,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:S,publicToken:C,userId:$,signInUrl:"/login",signUpUrl:"/login",onMainContentVisible:re},e);ge?pe=T.jsx(Mj,{children:me}):pe=me}return T.jsx(sM,{children:T.jsx(uM,{children:T.jsx(UU,{children:T.jsxs(dM,{children:[T.jsx(k.Suspense,{fallback:null,children:pe}),ge?T.jsx(a8,{}):null,T.jsx(sj,{}),u?T.jsx(sI,{}):null,u?T.jsx(vI,{}):null]})})})})}const b9=wE([{path:"*",element:T.jsx(v9,{})}]);hT.createRoot(document.getElementById("root")).render(T.jsx(lm.StrictMode,{children:T.jsx(zL,{children:T.jsx(GL,{children:T.jsx(uL,{children:T.jsx(ME,{router:b9})})})})}));export{Z9 as $,Ie as A,ku as B,F9 as C,z9 as D,gl as E,oM as F,c7 as G,J9 as H,D9 as I,R9 as J,RI as K,gd as L,oP as M,kj as N,Qt as O,e8 as P,EI as Q,lm as R,Km as S,Il as T,j9 as U,iL as V,Pd as W,Zm as X,dj as Y,Gr as Z,In as _,Fl as a,sS as a$,V9 as a0,SD as a1,L9 as a2,I9 as a3,mB as a4,X9 as a5,B9 as a6,hM as a7,d7 as a8,O9 as a9,JI as aA,a7 as aB,k9 as aC,dD as aD,Xm as aE,Pk as aF,W9 as aG,Ax as aH,Ex as aI,HI as aJ,U9 as aK,Go as aL,Ku as aM,yx as aN,vx as aO,bx as aP,kx as aQ,YI as aR,wa as aS,rl as aT,l7 as aU,o7 as aV,Bl as aW,Ln as aX,zl as aY,Y7 as aZ,c0 as a_,l4 as aa,gt as ab,an as ac,td as ad,Qm as ae,Yo as af,Pg as ag,Lx as ah,ei as ai,Gk as aj,$i as ak,Wn as al,pd as am,uj as an,pD as ao,Fg as ap,e9 as aq,om as ar,fD as as,T9 as at,h7 as au,E9 as av,K9 as aw,rM as ax,Wm as ay,gB as az,RU as b,u8 as b$,qr as b0,q7 as b1,aS as b2,nB as b3,pU as b4,cU as b5,t8 as b6,m7 as b7,f7 as b8,P7 as b9,Ul as bA,WP as bB,dB as bC,J7 as bD,ul as bE,G7 as bF,ep as bG,K7 as bH,O8 as bI,fB as bJ,tB as bK,fU as bL,oU as bM,Dd as bN,KL as bO,Vm as bP,s7 as bQ,i7 as bR,U7 as bS,B7 as bT,O7 as bU,j7 as bV,dU as bW,_8 as bX,a0 as bY,r8 as bZ,ti as b_,S7 as ba,C7 as bb,XI as bc,p7 as bd,g7 as be,pB as bf,y7 as bg,_7 as bh,v7 as bi,b7 as bj,k7 as bk,x7 as bl,w7 as bm,R7 as bn,DU as bo,k8 as bp,rB as bq,Ld as br,Qp as bs,BP as bt,Ni as bu,wl as bv,aB as bw,lB as bx,X7 as by,AU as bz,Kt as c,VP as c0,c8 as c1,i8 as c2,Xp as c3,FP as c4,T7 as c5,l8 as c6,E7 as c7,Rg as c8,zP as c9,sm as cA,oS as cB,jg as cC,o0 as cD,M7 as cE,N7 as cF,Og as cG,L7 as cH,q9 as cI,Y9 as cJ,G9 as cK,hr as cL,A7 as ca,dS as cb,$7 as cc,V7 as cd,xl as ce,cB as cf,Z7 as cg,Bo as ch,iB as ci,uB as cj,eB as ck,Q7 as cl,D7 as cm,hB as cn,oB as co,I7 as cp,g8 as cq,LU as cr,Lg as cs,Ig as ct,hU as cu,j8 as cv,W7 as cw,H7 as cx,F7 as cy,z7 as cz,sB as d,u6 as e,A9 as f,lx as g,bD as h,xn as i,T as j,r7 as k,MD as l,cl as m,ND as n,e7 as o,N9 as p,H9 as q,k as r,n7 as s,t7 as t,CU as u,M9 as v,Ct as w,$9 as x,Q9 as y,sx as z};